Fetch raw hospital detail HTML from Bundes-Klinik-Atlas
Source:R/adapt_klinikatlas.R
klinikatlas_hospital_detail.RdFetch 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]orcHash.- safe
Logical; if
TRUE(default), apply rate-limiting and cache GET responses totools::R_user_dir("bunddev", "cache").- refresh
Logical; if
TRUE, ignore cached responses and re-fetch from the API (defaultFALSE).- raw
Logical; if
TRUE, return the upstream HTML detail page as a character scalar. DefaultFALSEreturns 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.