Skip to contents

Fetch raw hospital detail HTML from Bundes-Klinik-Atlas

Usage

klinikatlas_hospital_detail(
  id,
  params = list(),
  safe = TRUE,
  refresh = FALSE,
  raw = FALSE
)

Arguments

id

Integer hospital identifier from klinikatlas_search().

params

Optional named list of upstream query parameters such as tx_tverzhospitaldata_show[department] or cHash.

safe

Logical; if TRUE (default), apply rate-limiting and cache GET responses to tools::R_user_dir("bunddev", "cache").

refresh

Logical; if TRUE, ignore cached responses and re-fetch from the API (default FALSE).

raw

Logical; if TRUE, return the upstream HTML detail page as a character scalar. Default FALSE returns a one-row tibble with extracted summary fields.

Value

A one-row tibble with extracted hospital detail fields, or a character scalar containing the raw HTML response when raw = TRUE.

Details

The public Klinik-Atlas detail endpoint currently serves HTML. By default this helper extracts a one-row summary tibble with contact details and a few headline metrics from the page. Set raw = TRUE to retrieve the original HTML response instead. API documentation: https://github.com/bundesAPI/klinikatlas-api.

Examples

if (FALSE) { # \dontrun{
klinikatlas_hospital_detail(2610)
} # }