| 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 |
LOINC Linguistic Variants are provided by an international community of volunteer translators.
linguistic_variantslinguistic_variants
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 |
linguistic_variantslinguistic_variants
Retrieving the LOINC CodeSystem resource for FHIR
roinc_codesystem(tabular = TRUE) roinc_codesystem_lookup(code, property = NULL, version = NULL)roinc_codesystem(tabular = TRUE) roinc_codesystem_lookup(code, property = NULL, version = NULL)
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. |
A list or a tibble of LOINC CodeSystem resources for FHIR.
## 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)## 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
roinc_concept_map(code)roinc_concept_map(code)
code |
String value for LOINC code identifier for a LOINC code, part, answer list, or answer. |
A list or a tibble of LOINC ConceptMap resources for FHIR.
## Not run: roinc_concept_map("30657-1") ## End(Not run)## Not run: roinc_concept_map("30657-1") ## End(Not run)
Download LOINC's primary release artifact
roinc_download(version = NULL, directory = NULL)roinc_download(version = NULL, directory = NULL)
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. |
The file path to the downloaded LOINC primary release artifact.
## Not run: roinc_download() ## End(Not run)## Not run: roinc_download() ## End(Not run)
Get LOINC's primary release artifact download metadata
roinc_get_metadata(version = NULL, tabular = TRUE)roinc_get_metadata(version = NULL, tabular = TRUE)
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. |
A list or tibble of the metadata for the current and for every past release of LOINC or for specific version requested.
## Not run: roinc_get_metadata() roinc_get_metadata_version() ## End(Not run)## Not run: roinc_get_metadata() roinc_get_metadata_version() ## End(Not run)
Retrieve LOINC panel/questionnaire resource for FHIR
roinc_questionnaire(panel)roinc_questionnaire(panel)
panel |
A string value for a LOINC panel. |
A list or a tibble of LOINC panel/questionnaire resources for FHIR.
## Not run: roinc_questionnaire(panel = "89689-4") ## End(Not run)## Not run: roinc_questionnaire(panel = "89689-4") ## End(Not run)
Search the LOINC database
roinc_search_loincs( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_answerlists( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_parts( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_groups( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE )roinc_search_loincs( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_answerlists( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_parts( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE ) roinc_search_groups( query, rows = NULL, offset = NULL, sortorder = NULL, language = NULL, includefiltercounts = NULL, tabular = TRUE, summary = FALSE )
query |
Search string. |
rows |
Integer value to indicate the number of rows to return. When set to NULL (default), 50 rows of search results are returned. |
offset |
Integer value to indicate the offset, for paging. When set to NULL (default), offset of 0 is used. |
sortorder |
String value, specifying which field to sort on and order (desc and asc). |
language |
Integer value to indicate which language to return. |
includefiltercounts |
Boolean value to indicate if information for filters should be returned with the results. |
tabular |
Logical. Should response be tabular? If TRUE (default), response is converted to a tibble. If FALSE, response is kept as a list. |
summary |
Logical. Should the results summary be returned? If FALSE (default), full search results are returned. If TRUE, only results summary are returned. |
A list or tibble of results summary or full search results.
## Not run: roinc_search_loincs(query = "glucose") roinc_search_answerlists(query = "glucose") roinc_search_parts(query = "glucose") roinc_search_groups(query = "glucose") ## End(Not run)## Not run: roinc_search_loincs(query = "glucose") roinc_search_answerlists(query = "glucose") roinc_search_parts(query = "glucose") roinc_search_groups(query = "glucose") ## End(Not run)
Set LOINC API credentials
roinc_set_credentials(username, password)roinc_set_credentials(username, password)
username |
LOINC login username |
password |
LOINC login password |
## Not run: roinc_set_credentials(username = "LOINC_USERNAME", password = "LOINC_PASSWORD") ## End(Not run)## Not run: roinc_set_credentials(username = "LOINC_USERNAME", password = "LOINC_PASSWORD") ## End(Not run)
Retrieving the LOINC value set resource for FHIR
roinc_valueset(valueset, expand = FALSE, version = NULL) roinc_valueset_validate(valueset, code)roinc_valueset(valueset, expand = FALSE, version = NULL) roinc_valueset_validate(valueset, code)
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. |
A list or a tibble of LOINC ValueSet resources for FHIR.
## Not run: roinc_valueset("LL1162-8") roinc_valueset("LL1162-8", expand = TRUE) roinc_valueset_validate("LG33055-1", "8867-4") ## End(Not run)## Not run: roinc_valueset("LL1162-8") roinc_valueset("LL1162-8", expand = TRUE) roinc_valueset_validate("LG33055-1", "8867-4") ## End(Not run)