From 6b5093026e7a528d9dffb57a3ba2385807096ced Mon Sep 17 00:00:00 2001 From: Andrew Bruce Date: Wed, 11 Dec 2024 09:58:22 -0500 Subject: [PATCH] documentation edits --- R/beneficiaries.R | 2 +- R/generated-globals.R | 5 -- R/laboratories.R | 111 ++++++++++++++++++++++++++---------------- R/ndc.R | 25 +++++++--- R/prescribers.R | 8 +-- man/laboratories.Rd | 51 ++++++++++++++----- man/medline.Rd | 4 +- man/ndc_lookup.Rd | 3 +- man/rxnorm.Rd | 2 +- 9 files changed, 137 insertions(+), 74 deletions(-) diff --git a/R/beneficiaries.R b/R/beneficiaries.R index a0898390..613ab1ed 100644 --- a/R/beneficiaries.R +++ b/R/beneficiaries.R @@ -36,7 +36,7 @@ #' @param tidy < *boolean* > // __default:__ `TRUE` Tidy output #' @param ... Empty #' -#' @return A [tibble][tibble::tibble-package] with the columns: +#' @returns A [tibble][tibble::tibble-package] with the columns: #' #' |**Field** |**Description** | #' |:-------------------|:-------------------------------------------------------| diff --git a/R/generated-globals.R b/R/generated-globals.R index 7f4ad0df..8fb1252f 100644 --- a/R/generated-globals.R +++ b/R/generated-globals.R @@ -170,11 +170,6 @@ utils::globalVariables(c( # # "distribution_title", - # - # - # - # - "distro", # "drug", # diff --git a/R/laboratories.R b/R/laboratories.R index ed1a11d9..bc661a88 100644 --- a/R/laboratories.R +++ b/R/laboratories.R @@ -24,68 +24,97 @@ #' period of two years. They are as follows, in order of increasing complexity: #' #' 1. Certificate of **Waiver**: Issued to a laboratory to perform only waived -#' tests; does not waive the lab from all CLIA requirements. Waived tests are -#' laboratory tests that are simple to perform. Routine inspections are not -#' conducted for waiver labs, although 2% are visited each year to ensure -#' quality laboratory testing. +#' tests; does not waive the lab from all CLIA requirements. Waived tests are +#' laboratory tests that are simple to perform. Routine inspections are not +#' conducted for waiver labs, although 2% are visited each year to ensure +#' quality laboratory testing. #' #' 2. Certificate for **Provider-Performed Microscopy Procedures** (PPM): Issued -#' to a laboratory in which a physician, midlevel practitioner or dentist -#' performs limited tests that require microscopic examination. PPM tests are -#' considered moderate complexity. Waived tests can also be performed under this -#' certificate type. There are no routine inspections conducted for PPM labs. +#' to a laboratory in which a physician, midlevel practitioner or dentist +#' performs limited tests that require microscopic examination. PPM tests are +#' considered moderate complexity. Waived tests can also be performed under this +#' certificate type. There are no routine inspections conducted for PPM labs. #' #' 3. Certificate of **Registration**: Initially issued to a laboratory that has -#' applied for a Certificate of Compliance or Accreditation, enabling the lab to -#' conduct moderate/high complexity testing until the survey is performed and -#' the laboratory is found to be in CLIA compliance. Includes PPM and waived -#' testing. +#' applied for a Certificate of Compliance or Accreditation, enabling the lab to +#' conduct moderate/high complexity testing until the survey is performed and +#' the laboratory is found to be in CLIA compliance. Includes PPM and waived +#' testing. #' #' 4. Certificate of **Compliance**: Allows the laboratory to conduct -#' moderate/high complexity testing and is issued after an inspection finds the -#' lab to be in compliance with all applicable CLIA requirements. Includes PPM -#' and waived testing. +#' moderate/high complexity testing and is issued after an inspection finds the +#' lab to be in compliance with all applicable CLIA requirements. Includes PPM +#' and waived testing. #' #' 5. Certificate of **Accreditation**: Exactly the same as the Certificate of -#' Compliance, except that the laboratory must be accredited by one of the -#' following CMS-approved accreditation organizations: +#' Compliance, except that the laboratory must be accredited by one of the +#' following CMS-approved accreditation organizations: #' -#' + [American Association for Laboratory Accreditation](https://a2la.org/) (A2LA) -#' + [Association for the Advancement of Blood & Biotherapies](https://www.aabb.org/) (AABB) -#' + [American Osteopathic Association](https://osteopathic.org/) (AOA) -#' + [American Society for Histocompatibility and Immunogenetics](https://www.ashi-hla.org/) (ASHI) -#' + [College of American Pathologists](https://www.cap.org/) (CAP) -#' + [Commission on Office Laboratory Accreditation](https://www.cola.org/) (COLA) -#' + [The Joint Commission](https://www.jointcommission.org/) (JCAHO) +#' - [American Association for Laboratory Accreditation](https://a2la.org/) (A2LA) +#' - [Association for the Advancement of Blood & Biotherapies](https://www.aabb.org/) (AABB) +#' - [American Osteopathic Association](https://osteopathic.org/) (AOA) +#' - [American Society for Histocompatibility and Immunogenetics](https://www.ashi-hla.org/) (ASHI) +#' - [College of American Pathologists](https://www.cap.org/) (CAP) +#' - [Commission on Office Laboratory Accreditation](https://www.cola.org/) (COLA) +#' - [The Joint Commission](https://www.jointcommission.org/) (JCAHO) #' -#' Links: +#' @section Resources: #' - [Provider of Services File - Clinical Laboratories](https://data.cms.gov/provider-characteristics/hospitals-and-other-facilities/provider-of-services-file-clinical-laboratories) +#' - [CMS.gov CLIA](https://www.cms.gov/medicare/quality/clinical-laboratory-improvement-amendments) +#' - [CDC.gov CLIA](https://www.cdc.gov/clia/php/about/index.html) +#' - [FDA CLIA Databases](https://www.fda.gov/medical-devices/ivd-regulatory-assistance/public-databases) +#' - [CDC.gov CLIA Certificates](https://www.cdc.gov/labs/clia-certificates/index.html) +#' - [CMS QCOR - S&C's Quality, Certification and Oversight Reports](https://qcor.cms.gov/main.jsp) #' #' *Update Frequency:* **Quarterly** #' -#' @param name < *character* > Provider or clinical laboratory's name -#' @param clia < *character* > 10-character CLIA number -#' @param certificate < *character* > CLIA certificate type: -#' + `"waiver"` -#' + `"ppm"` -#' + `"registration"` -#' + `"compliance"` -#' + `"accreditation"` -#' @param city < *character* > City -#' @param state < *character* > State -#' @param zip < *character* > Zip code -#' @param active < *boolean* > // __default:__ `FALSE` Return only active providers -#' @param tidy < *boolean* > // __default:__ `TRUE` Tidy output -#' @param na.rm < *boolean* > // __default:__ `TRUE` Remove empty rows and columns -#' @param pivot < *boolean* > // __default:__ `TRUE` Pivot output +#' @param name `` Provider or clinical laboratory's name +#' @param clia `` 10-character CLIA number +#' @param certificate `` CLIA certificate type: +#' - `"waiver"` +#' - `"ppm"` +#' - `"registration"` +#' - `"compliance"` +#' - `"accreditation"` +#' @param city `` City +#' @param state `` State +#' @param zip `` Zip code +#' @param active `` // __default:__ `FALSE` Return only active providers +#' @param tidy `` // __default:__ `TRUE` Tidy output +#' @param na.rm `` // __default:__ `TRUE` Remove empty rows and columns +#' @param pivot `` // __default:__ `TRUE` Pivot output #' @param ... Empty #' -#' @return A [tibble][tibble::tibble-package] containing the search results. +#' @returns A [tibble][tibble::tibble-package] containing the search results. #' #' @examplesIf interactive() +#' # Artic Envestigations Program Laboratory, Anchorage, AK +#' laboratories(clia = "02D0873639") +#' +#' # Dengue Laboratory, San Juan, PR +#' laboratories(clia = "40D0869394") +#' +#' # CDC/CGH/DGHA International Laboratory, Atlanta, GA +#' laboratories(clia = "11D1061576") +#' +#' # Infectious Diseases Laboratory, Atlanta, GA +#' laboratories(clia = "11D0668319") +#' +#' # National Center for Environmental Health, Division of Laboratory Science, Atlanta, GA +#' laboratories(clia = "11D0668290") +#' +#' # Vector-Borne Diseases Laboratory, Fort Collins, CO +#' laboratories(clia = "06D0880233") +#' +#' # Wiregrass Georgia Tech College Student Health Center, Valdosta, GA +#' laboratories(clia = "11D2306220") +#' #' laboratories(clia = "11D0265516") +#' #' laboratories(certificate = "ppm", city = "Valdosta", state = "GA", active = TRUE) +#' #' @autoglobal +#' #' @export laboratories <- function(name = NULL, clia = NULL, diff --git a/R/ndc.R b/R/ndc.R index db077743..d74e1eb1 100644 --- a/R/ndc.R +++ b/R/ndc.R @@ -40,8 +40,9 @@ #' chemical subgroups. #' #' @section Links: -#' + [ATCs](https://www.whocc.no/atc/structure_and_principles/) -#' + [RxNorm](https://www.nlm.nih.gov/research/umls/rxnorm/overview.html) +#' - [ATCs](https://www.whocc.no/atc/structure_and_principles/) +#' - [RxNorm](https://www.nlm.nih.gov/research/umls/rxnorm/overview.html) +#' - [NDC-HCPCS Crosswalk](https://ndclist.com/ndc-hcpcs-crosswalk-lookup) #' #' @examplesIf interactive() #' ndc_lookup("0002-1433-80") @@ -50,9 +51,11 @@ #' #' rxnorm("0002-1433-80") #' -#' @param ndc < *character* > // __required__ 10- to 11-digit National Drug Code +#' @param ndc `` **required** 10- to 11-digit National Drug Code +#' #' @param ... Empty -#' @return A [tibble][tibble::tibble-package] with the columns: +#' +#' @returns A [tibble][tibble::tibble-package] with the columns: #' #' |**Field** |**Description** | #' |:------------|:-----------------------------------------------| @@ -70,6 +73,7 @@ #' |`summary` |Medline Plus: Summary | #' #' @autoglobal +#' #' @export ndc_lookup <- function(ndc, ...) { @@ -89,11 +93,16 @@ ndc_lookup <- function(ndc, ...) { } #' Medline Plus API -#' @param ndc < *character* > // **required** 10- to 11-digit National Drug Code -#' @return A [tibble][tibble::tibble-package] with the columns: +#' +#' @param ndc `` **required** 10- to 11-digit National Drug Code +#' +#' @template returns +#' #' @autoglobal -#' @export +#' #' @keywords internal +#' +#' @export medline <- function(ndc) { http <- "https://connect.medlineplus.gov/service?" @@ -131,7 +140,7 @@ medline <- function(ndc) { #' RxNorm API #' @param ndc < *character* > // **required** 10- to 11-digit National Drug Code #' @param ... Empty -#' @return A [tibble][dplyr::tibble()] with the columns: +#' @template returns #' @autoglobal #' @export #' @keywords internal diff --git a/R/prescribers.R b/R/prescribers.R index c3c9c4e5..0053d93c 100644 --- a/R/prescribers.R +++ b/R/prescribers.R @@ -40,10 +40,10 @@ #' subsidies, and any other third-party payers. #' #' @section Links: -#' + [Medicare Part D Prescribers: by Provider](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-provider) -#' + [Medicare Part D Prescribers: by Provider and Drug](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-provider-and-drug) -#' + [Medicare Part D Prescribers: by Geography and Drug](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-geography-and-drug) -#' + [Medicare Part D Prescribers Technical Specifications](https://data.cms.gov/sites/default/files/2021-08/mup_dpr_ry21_20210819_technical_specifications.pdf) +#' - [Medicare Part D Prescribers: by Provider](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-provider) +#' - [Medicare Part D Prescribers: by Provider and Drug](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-provider-and-drug) +#' - [Medicare Part D Prescribers: by Geography and Drug](https://data.cms.gov/provider-summary-by-type-of-service/medicare-part-d-prescribers/medicare-part-d-prescribers-by-geography-and-drug) +#' - [Medicare Part D Prescribers Technical Specifications](https://data.cms.gov/sites/default/files/2021-08/mup_dpr_ry21_20210819_technical_specifications.pdf) #' #' *Update Frequency:* **Annually** #' diff --git a/man/laboratories.Rd b/man/laboratories.Rd index 18379308..735106d0 100644 --- a/man/laboratories.Rd +++ b/man/laboratories.Rd @@ -19,11 +19,11 @@ laboratories( ) } \arguments{ -\item{name}{< \emph{character} > Provider or clinical laboratory's name} +\item{name}{\verb{} Provider or clinical laboratory's name} -\item{clia}{< \emph{character} > 10-character CLIA number} +\item{clia}{\verb{} 10-character CLIA number} -\item{certificate}{< \emph{character} > CLIA certificate type: +\item{certificate}{\verb{} CLIA certificate type: \itemize{ \item \code{"waiver"} \item \code{"ppm"} @@ -32,19 +32,19 @@ laboratories( \item \code{"accreditation"} }} -\item{city}{< \emph{character} > City} +\item{city}{\verb{} City} -\item{state}{< \emph{character} > State} +\item{state}{\verb{} State} -\item{zip}{< \emph{character} > Zip code} +\item{zip}{\verb{} Zip code} -\item{active}{< \emph{boolean} > // \strong{default:} \code{FALSE} Return only active providers} +\item{active}{\verb{} // \strong{default:} \code{FALSE} Return only active providers} -\item{tidy}{< \emph{boolean} > // \strong{default:} \code{TRUE} Tidy output} +\item{tidy}{\verb{} // \strong{default:} \code{TRUE} Tidy output} -\item{na.rm}{< \emph{boolean} > // \strong{default:} \code{TRUE} Remove empty rows and columns} +\item{na.rm}{\verb{} // \strong{default:} \code{TRUE} Remove empty rows and columns} -\item{pivot}{< \emph{boolean} > // \strong{default:} \code{TRUE} Pivot output} +\item{pivot}{\verb{} // \strong{default:} \code{TRUE} Pivot output} \item{...}{Empty} } @@ -109,10 +109,17 @@ following CMS-approved accreditation organizations: \item \href{https://www.cola.org/}{Commission on Office Laboratory Accreditation} (COLA) \item \href{https://www.jointcommission.org/}{The Joint Commission} (JCAHO) } +} + +\section{Resources}{ -Links: \itemize{ \item \href{https://data.cms.gov/provider-characteristics/hospitals-and-other-facilities/provider-of-services-file-clinical-laboratories}{Provider of Services File - Clinical Laboratories} +\item \href{https://www.cms.gov/medicare/quality/clinical-laboratory-improvement-amendments}{CMS.gov CLIA} +\item \href{https://www.cdc.gov/clia/php/about/index.html}{CDC.gov CLIA} +\item \href{https://www.fda.gov/medical-devices/ivd-regulatory-assistance/public-databases}{FDA CLIA Databases} +\item \href{https://www.cdc.gov/labs/clia-certificates/index.html}{CDC.gov CLIA Certificates} +\item \href{https://qcor.cms.gov/main.jsp}{CMS QCOR - S&C's Quality, Certification and Oversight Reports} } \emph{Update Frequency:} \strong{Quarterly} @@ -120,7 +127,29 @@ Links: \examples{ \dontshow{if (interactive()) (if (getRversion() >= "3.4") withAutoprint else force)(\{ # examplesIf} +# Artic Envestigations Program Laboratory, Anchorage, AK +laboratories(clia = "02D0873639") + +# Dengue Laboratory, San Juan, PR +laboratories(clia = "40D0869394") + +# CDC/CGH/DGHA International Laboratory, Atlanta, GA +laboratories(clia = "11D1061576") + +# Infectious Diseases Laboratory, Atlanta, GA +laboratories(clia = "11D0668319") + +# National Center for Environmental Health, Division of Laboratory Science, Atlanta, GA +laboratories(clia = "11D0668290") + +# Vector-Borne Diseases Laboratory, Fort Collins, CO +laboratories(clia = "06D0880233") + +# Wiregrass Georgia Tech College Student Health Center, Valdosta, GA +laboratories(clia = "11D2306220") + laboratories(clia = "11D0265516") + laboratories(certificate = "ppm", city = "Valdosta", state = "GA", active = TRUE) \dontshow{\}) # examplesIf} } diff --git a/man/medline.Rd b/man/medline.Rd index 36f42800..06b9a33b 100644 --- a/man/medline.Rd +++ b/man/medline.Rd @@ -7,10 +7,10 @@ medline(ndc) } \arguments{ -\item{ndc}{< \emph{character} > // \strong{required} 10- to 11-digit National Drug Code} +\item{ndc}{\verb{} \strong{required} 10- to 11-digit National Drug Code} } \value{ -A \link[tibble:tibble-package]{tibble} with the columns: +A \link[tibble:tibble-package]{tibble} containing the search results. } \description{ Medline Plus API diff --git a/man/ndc_lookup.Rd b/man/ndc_lookup.Rd index 5acc5db1..f54ba336 100644 --- a/man/ndc_lookup.Rd +++ b/man/ndc_lookup.Rd @@ -7,7 +7,7 @@ ndc_lookup(ndc, ...) } \arguments{ -\item{ndc}{< \emph{character} > // \strong{required} 10- to 11-digit National Drug Code} +\item{ndc}{\verb{} \strong{required} 10- to 11-digit National Drug Code} \item{...}{Empty} } @@ -81,6 +81,7 @@ chemical subgroups. \itemize{ \item \href{https://www.whocc.no/atc/structure_and_principles/}{ATCs} \item \href{https://www.nlm.nih.gov/research/umls/rxnorm/overview.html}{RxNorm} +\item \href{https://ndclist.com/ndc-hcpcs-crosswalk-lookup}{NDC-HCPCS Crosswalk} } } diff --git a/man/rxnorm.Rd b/man/rxnorm.Rd index 3d1e7d18..e361d142 100644 --- a/man/rxnorm.Rd +++ b/man/rxnorm.Rd @@ -12,7 +12,7 @@ rxnorm(ndc, ...) \item{...}{Empty} } \value{ -A \link[dplyr:reexports]{tibble} with the columns: +A \link[tibble:tibble-package]{tibble} containing the search results. } \description{ RxNorm API