Skip to content

Commit

Permalink
documentation edits
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewallenbruce committed Dec 11, 2024
1 parent 435d48f commit 6b50930
Show file tree
Hide file tree
Showing 9 changed files with 137 additions and 74 deletions.
2 changes: 1 addition & 1 deletion R/beneficiaries.R
Original file line number Diff line number Diff line change
Expand Up @@ -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** |
#' |:-------------------|:-------------------------------------------------------|
Expand Down
5 changes: 0 additions & 5 deletions R/generated-globals.R
Original file line number Diff line number Diff line change
Expand Up @@ -170,11 +170,6 @@ utils::globalVariables(c(
# <cms_update>
# <distros_main>
"distribution_title",
# <outpatient>
# <prescribers>
# <quality_payment>
# <utilization>
"distro",
# <tidyup_provider.util>
"drug",
# <laboratories>
Expand Down
111 changes: 70 additions & 41 deletions R/laboratories.R
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<chr>` Provider or clinical laboratory's name
#' @param clia `<chr>` 10-character CLIA number
#' @param certificate `<chr>` CLIA certificate type:
#' - `"waiver"`
#' - `"ppm"`
#' - `"registration"`
#' - `"compliance"`
#' - `"accreditation"`
#' @param city `<chr>` City
#' @param state `<chr>` State
#' @param zip `<chr>` Zip code
#' @param active `<lgl>` // __default:__ `FALSE` Return only active providers
#' @param tidy `<lgl>` // __default:__ `TRUE` Tidy output
#' @param na.rm `<lgl>` // __default:__ `TRUE` Remove empty rows and columns
#' @param pivot `<lgl>` // __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,
Expand Down
25 changes: 17 additions & 8 deletions R/ndc.R
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -50,9 +51,11 @@
#'
#' rxnorm("0002-1433-80")
#'
#' @param ndc < *character* > // __required__ 10- to 11-digit National Drug Code
#' @param ndc `<chr>` **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** |
#' |:------------|:-----------------------------------------------|
Expand All @@ -70,6 +73,7 @@
#' |`summary` |Medline Plus: Summary |
#'
#' @autoglobal
#'
#' @export
ndc_lookup <- function(ndc, ...) {

Expand All @@ -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 `<chr>` **required** 10- to 11-digit National Drug Code
#'
#' @template returns
#'
#' @autoglobal
#' @export
#'
#' @keywords internal
#'
#' @export
medline <- function(ndc) {

http <- "https://connect.medlineplus.gov/service?"
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions R/prescribers.R
Original file line number Diff line number Diff line change
Expand Up @@ -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**
#'
Expand Down
51 changes: 40 additions & 11 deletions man/laboratories.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/medline.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion man/ndc_lookup.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/rxnorm.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6b50930

Please sign in to comment.