# zdravie: out-patient health-care facilities in Senec, and the polyclinic project

Licensed out-patient facilities (ambulantné zdravotnícke zariadenia) with a Senec town address, taken from
the Bratislava self-governing region's licensing register. The file holds counts by type, the four
primary-care lists (adult GP, paediatric, primary gynaecology, dental), population ratios, the facilities
cancelled in town, and a curated block on the new polyclinic. The town has 94 active and 17 cancelled facilities,
out of 111 entries with a Senec town address. Lists: 15 adult GP, 7 paediatric, 4 gynaecology, 17 dental.

Files: `zdravie.json`, `zdravie.csv`, `zdravie-manual-inputs.json` (the polyclinic block).
Script: `scripts/fetch_zdravie.py`. Raw downloads go to `data/atlas/raw/zdravie/` (not committed).
Shared background, with the polyclinic cost reconciliation: `zdravie-bezpecnost-README.md` ("Health").

## Provenance

Fetched 10 Oct 2026; rebuilt from that download on 15 Oct 2026 with the town filter below.

1. e-VÚC, Bratislavský samosprávny kraj, "Ambulantné zdravotnícke zariadenia", okres Senec. This is the
   regional licensing authority's own register.
   `https://www.e-vuc.sk/bsk/zdravotnictvo/ambulantne-zdravotnicke-zariadenia/senec.html?page_id=60181` and
   `…&page=2`. The script reads the page count from the pagination block.
   Cancelled facilities are in the HTML too, hidden with CSS (`tr.canceled-row`, "Zariadenie bolo zrušené k
   <date>"). From each row the script takes the type (icon alt text), name, detail URL, permit code and address.
2. ŠÚ SR STATdata (open data, CC BY 4.0), population at 31 Dec 2025 (`U_OM_0005`): `om7006rr` for the total
   and `AGE_Y_LE14`, `om7008rr` for `AGE_Y15` to `AGE_Y18`. The script reads both through `fetch_datacube.py`'s
   helpers and keeps them in `raw/zdravie/statdata/`; `meta.population_urls` holds the two requests:
   - `https://statdata.statistics.sk/public/api/dc/opendata/cube/dataset/om7006rr/rows/e_nuts15%2CASC%2CSK0108508217~e_nuts14%2CASC%2Call~e_indic%2CASC%2CU_OM_0005~e_sex%2CASC%2CTOTAL~e_age%2CASC%2CTOTAL%2CAGE_Y_LE14~e_unit%2CASC%2Call/columns/e_year%2CASC%2C2025/context/-?lang=SK&type=CSV`
   - `https://statdata.statistics.sk/public/api/dc/opendata/cube/dataset/om7008rr/rows/e_nuts15%2CASC%2CSK0108508217~e_nuts14%2CASC%2Call~e_indic%2CASC%2CU_OM_0005~e_sex%2CASC%2CTOTAL~e_age%2CASC%2CAGE_Y15%2CAGE_Y16%2CAGE_Y17%2CAGE_Y18~e_unit%2CASC%2Call/columns/e_year%2CASC%2C2025/context/-?lang=SK&type=CSV`

   Until 9 Nov 2026 they came from ŠÚ SR's DATAcube (`data.statistics.sk`), which stopped answering in autumn 2026.

   Terms (read 9 Nov 2026): STATdata's terms of use (`https://statdata.statistics.sk/public/ui/dc/domov/terms-of-use`)
   allow copying, redistribution and commercial use under CC BY 4.0, with ŠÚ SR named as the source and no suggestion
   that ŠÚ SR endorses the use; NKOD records STATdata's open-data downloads as CC BY 4.0. The same terms forbid robots
   and crawlers for collecting data: the script reads only the open-data URLs STATdata generates for reuse, one request
   per cube, 3 s apart.

   The age groups are built as 0–18 = `Y_LE14` + Y15..Y18 = 4 520 and 19+ = total − (0–18) = 15 740.
   `meta.population_source` names only om7006rr, but Y15–18 comes from om7008rr; see `meta.population_urls`.
3. `zdravie-manual-inputs.json` (hand-curated, 16 Sep 2026): the `poliklinika` block. It holds the
   project facts, ten cost figures with date, source URL and quote, the reconciliation, the staffing
   requirements and the June 2026 progress note. The sources are senec.sk news posts, the town's project page
   and press. No script can collect these, so the script copies the block verbatim. `_value_sources` in that
   file gives the URL for each project field. To change the block, edit that file and rerun the script.

## Fields

`meta`: `generated`, `retrieved_at` (the day the register was read), `last_update` (the newest of the practices'),
`population_end_2025`, `population_source`,
`population_urls`, `source_url` (the register listing), `notes`.

`poskytovatelia`:
- `source`: register URL (`url`, and the same value in `source_url`), the pages read, `retrieved` (the day the
  register was read), `last_update` (the day the block last changed; until 9 Nov 2026 the same date as
  `retrieved`), and `okres_total_listed` / `okres_cancelled` (rows in the whole okres listing).
- `senec_town_active_total`, `senec_town_cancelled`.
- `counts`: the four primary-care types.
- `ratios`: population per facility. It covers adults 19+ per adult GP, 0–18 per paediatric, and total
  population per GP, paediatric, dental and gynaecology facility, plus a `caveat`. Values are rounded half-up.
- `all_active_by_type`: active facilities in town by e-VÚC type, ordered by count and then by first
  appearance in the register.
- `list_gp_adults`, `list_paediatric`, `list_gyn`, `list_dental`: `name`, `provider`, `address`,
  `permit_code`, `url` (the facility's e-VÚC page), `source_url` (the same page), `retrieved_at` (the day the
  register was read) and `last_update` (the day this practice's record last changed: kept from build to build while
  it is the same, since 4 Nov 2026; until then the fetch date on every practice), in register order. `provider` is the last parenthesised part of `name`.
- `hours` and `hours_valid_from` (since 21 Oct 2026, `list_dental` and `list_gyn` only; null in the GP lists,
  whose hours are in the `lekari` dataset): the „ordinačné hodiny“ on the practice's own e-VÚC page, one
  `{day, hours, note}` per weekday as printed (the surgery hours, an afternoon block after „||“ included when
  it is only times, and the register's note with words, such as „len objednaní pacienti“), and the date the
  register gives them from. A titled
  person's name in a note is masked as `[meno vynechané]`. Some dates are years old: check with the practice.
- `insurers` and `accepts_new_patients` (since 21 Oct 2026, `list_dental` and `list_gyn` only; null in the GP
  lists, which have them in `lekari`): the health insurers the practice's page names after „Poisťovne:“, as
  printed, and its line „Ambulancia prijíma / neprijíma nových pacientov“ as true or false, null when the page has
  none. A page silent on new patients is not a no.
- `phones` (since 22 Oct 2026, the same two lists): up to three numbers as printed after „Mobil:“ and „Telefón:“,
  null when there are none. A number with the country code starts with „+“ („+421 901 …“): import the CSV's column
  as text, or a spreadsheet may read the cell as a formula.
- `list_specialists` (since 27 Oct 2026): every other active facility in town that a legal person runs, the
  polyclinic (a building) excepted, with `type` (the register's kind: „oftalmologická ambulancia“, „psychiatrická
  ambulancia“, „ambulancia klinickej psychológie“ and the rest) and the same fields as `list_dental`, `hours`,
  `hours_valid_from`, `insurers`, `accepts_new_patients` and `phones` included, read from each practice's own page.
  The web's search answers a specialist („očný lekár“, „psychiater“) from it.
- `recently_cancelled_in_senec`: `type`, `name` (always null), `cancelled` (DD.MM.YYYY), `address`,
  `source_url` (the register listing), `retrieved_at` and `last_update`, as above (kept by `type`, `cancelled` and
  `address` together since 9 Nov 2026).
- `nczi_note`.

`poliklinika`: see the manual-inputs file. Each of `figures` has `source` as written and `source_url`, the bare
URL from it, plus `last_update` (the file's `_last_reviewed`); `project`, `staffing_requirements` and
`progress_2026_06_11` have `source_url` too.

`source_url` and `last_update` were added on 15 Oct 2026 beside the existing `url`, `project_page` and
`source` fields, which stay; no value changed.

`zdravie.csv` has one row per facility in the five lists (`status` = active; `type` is each row's own in
`list_specialists`) and one per cancelled
facility (`status` = cancelled, with no name, provider, permit code or URL). Columns: `list`, `type`,
`name`, `provider`, `address`, `permit_code`, `status`, `cancelled`, `hours`, `hours_valid_from`, `insurers`,
`accepts_new_patients`, `phones`, `url`, `source_url`, `retrieved_at` and `last_update` (each row its own). `hours` is one cell, „pondelok: 7:00–12:00
(note) | …“ as `lekari.csv` writes them; `accepts_new_patients` is `True`, `False` or empty; `phones` are joined
with „ | “. `source_url` is the facility page, or the register listing for a cancelled row. Polyclinic figures are
not in the CSV.

## Natural persons

- The four named lists hold only facilities whose operator is a legal person (s.r.o., o.z., …). If a
  later run finds a natural-person operator there, the script sets that entry's `name` and `provider` to
  null and prints a warning.
- Facility names in the register often embed the physician who works there: "Všeobecná ambulancia pre
  dospelých, MUDr. …, Senec, (… s.r.o.)". Since 27 Oct 2026 the name is as the register prints it, as in
  `lekari`: service directories name providers as the official register does (decided 13 Oct 2026). From
  10 to 27 Oct 2026 that person was masked as `[meno vynechané]` (10 facility names). A titled name in a
  note to the hours is still masked. A company named after a physician ("MUDr. … s. r. o.") is a legal
  person and keeps its name, as everywhere else in this project.
- A phone number the practice's page labels with a person's name („Priezvisko:09xx …“) is left out of `phones`,
  label and number, since 27 Oct 2026 (one practice, `list_dental`); its other numbers stay.
- Cancelled facilities never carry a name. Three of the 17 were run by natural persons.
- Active facilities in town with natural-person operators (dental hygiene, SVaLZ and others) appear only in
  `all_active_by_type` counts: never named and, since 27 Oct 2026, left out of `list_specialists` with their address
  and register page.

## Caveats

- The counts are licensed facilities, not doctors or FTE. A provider can hold several permit codes. Some
  GP facilities are part-time, occupational (Pulmed at ELV PRODUKT) or run by an NGO (TENENET). Senec
  doctors also serve the surrounding villages.
- Town filter (`in_senec_town` in the script, also used by `build_lekari.py`): an entry counts as Senec
  town if its address ends "903 01 Senec" / "90301 Senec", the rule of the 16 Sep build, or, since 15 Oct
  2026, if it ends with another postcode and "Senec" and its street is a street of Senec in `data/ulice.json`.
  The second part brings in the two active dental facilities of Family Dental Care - Senec s.r.o., which the
  register prints as "ELV PRODUKT, Nitrianska 3, 90312 Senec" (dental 15 → 17, active in town 92 → 94; no
  other count changed). The postcode alone is not the rule: "Senecká ulica 122, 90301 Hurbanova Ves" (Ladento)
  is another village. The filter still excludes three ambulance stations addressed "Senec 0/1/2, Senec" (one
  of them cancelled): the register gives them no street.
- Upstream drift: on 16 Sep the okres listing had 290 entries, 46 of them cancelled. On 10 Oct it had
  282, with 38 cancelled. Eight cancelled entries outside Senec town were dropped. Active facilities in the
  okres stayed at 244, and every Senec-town value is unchanged.
- NCZI open data (`data.nczisk.sk`) was not usable on 16 Sep (see `nczi_note`), and it was not retried.
- Regression (10 Oct 2026): the script reproduced every town count, ratio, list entry (name, address,
  permit code, URL, order) and cancelled entry of the hand-built 16 Sep file. The only changes were the
  okres-wide totals above and the added `last_update` and `population_urls`. Each run diffs against the
  published file and prints any change.

## Rebuild

```bash
python3 scripts/fetch_zdravie.py            # 2 register pages and 67 practice pages 10 s apart, 2 STATdata requests; ~12 min
python3 scripts/fetch_zdravie.py --offline  # rebuild from data/atlas/raw/zdravie/
```
Needs `httpx` and `beautifulsoup4`.

## STATdata, 9 Nov 2026

The population moved from DATAcube to STATdata, and its values are the same: 20 260 in all, 3 599 aged 0–14 and
921 aged 15–18. A rebuild from the cached register pages of 30 Oct, with the population from STATdata, changed
only `population_source` (which names STATdata), the two `population_urls` and the dates.

The live run of the same day re-read the register. Every other change in it comes from the register:
- The okres listing has 282 entries, one more, and 39 cancelled, one more.
- TENENET's adult GP practice is listed at Jánošíkova 4185/7B under a new name and page.
- Five specialist practices' pages changed:
  - an orthopaedic practice now names VšZP among its insurers;
  - MED POINT's practice at Hollého is now „Sonografická ambulancia“ and takes new patients;
  - one internal medicine practice has new hours, valid from 5 Nov 2026;
  - three pages print their phone numbers with spaces.

Those six practices take 9 Nov 2026 as their `last_update`. The first build of the day also gave it to seven
cancelled entries that had not changed, through a defect that predates the move: `recently_cancelled_in_senec` kept
its dates by `address`, which is not unique (five of its 16 entries are at Jánošíkova 4185/7B, four at the
polyclinic), so entries sharing an address took the day of every new read. Fixed the same day: an entry keeps its
date by its kind, its day of cancellation and its address together, and `source.last_update` stays while the
source block is the same. Rebuilt from the same cached pages on the file of 30 Oct, the seven entries are back at
30 Oct 2026 and nothing else changed; all 16 entries are the same as on 30 Oct.

## License

Published by Som Senec under the Creative Commons Attribution 4.0 International licence (CC BY 4.0): https://creativecommons.org/licenses/by/4.0/. You may use it for any purpose, commercial use included, if you credit "Som Senec, somsenec.sk". The source documents that each record links to keep their own terms.
