Backend of Ściana Płaczu sciana.placzu.pl
Displays services with the longest waiting time.
- limit[1-50] - amount of results to return, default: 5
https://sciana.placzu.pl/top?limit=1
[
{
"id": 94565,
"name": "ENDOPROTEZOPLASTYKA STAWU KOLANOWEGO",
"provider": {
"name": "SAMODZIELNY PUBLICZNY WOJEWÓDZKI SZPITAL CHIRURGII URAZOWEJ IM.DR J. DAABA",
"voivodeship": "ŚLĄSKIE"
},
"category": "STABLE",
"cell": {
"name": "ODDZIAŁ II URAZOWO-ORTOPEDYCZNY Z PODODDZIAŁEM ARTROSKOPII I CHIRURGII KOLANA",
"city": "PIEKARY ŚLĄSKIE",
"address": "BYTOMSKA 62",
"phone": "323934323"
},
"waiting": 5288,
"removed": 15,
"average_waiting_time": 2225,
"first_available_date": "2040-08-27",
"date_prepared": "2016-09-23",
"date_updated": "2016-08-01",
"date_inserted": "2016-10-22 18:23:22"
}
]
Lists all services.
https://sciana.placzu.pl/services
[
{
"name": "AMBULATORYJNA STACJA DIALIZ",
"cats": [
"STABLE",
"URGENT"
]
},
{
"name": "BADANIA GENETYCZNE",
"waiting_time": 25.4348, //in days
"cats": [
"STABLE",
"URGENT"
]
},
{
"name": "BADANIA MEDYCYNY NUKLEARNEJ",
"waiting_time": 7.9224,
"cats": [
"STABLE",
"URGENT"
]
},
{
"name": "DZIAŁ (PRACOWNIA) FIZJOTERAPII",
"waiting_time": 84.7462,
"cats": [
"STABLE",
"URGENT"
]
},
{
"name": "DZIAŁ (PRACOWNIA) FIZJOTERAPII DLA DZIECI",
"waiting_time": 32.2361,
"cats": [
"STABLE",
"URGENT"
]
},
{
"name": "DZIAŁ (PRACOWNIA) FIZYKOTERAPII",
"waiting_time": 3.75,
"cats": [
"STABLE",
"URGENT"
]
}
]
Displays statistics about the aggregated data.
https://sciana.placzu.pl/stats
{
"records": 141037,
"services": 387,
"providers": 14216
}
- provider - provider's name
{
"provider": {
"name": "SAMODZIELNY PUBLICZNY WOJEWÓDZKI SZPITAL CHIRURGII URAZOWEJ IM.DR J. DAABA",
"voivodeship": "ŚLĄSKIE"
},
"cells": [
{
"name": "DZIAŁ (PRACOWNIA) FIZJOTERAPII",
"city": "KOCHCICE",
"address": "ZAMKOWA 1",
"phone": "343533631"
},
{
"name": "ODDZIAŁ I URAZOWO-ORTOPEDYCZNY MĘSKI",
"city": "PIEKARY ŚLĄSKIE",
"address": "BYTOMSKA 62",
"phone": "323934317"
}
//...
]
}
Returns all services in a specific cell
- provider - provider's name
- cell - cell's name
[
{
"id": 24,
"name": "PORADNIA STOMATOLOGICZNA",
"category": "STABLE",
"waiting": 7,
"removed": 3,
"average_waiting_time": 26,
"first_available_date": "2016-10-18",
"date_prepared": "2016-09-23",
"date_updated": "2016-08-01",
"date_inserted": "2016-10-22 18:16:56"
},
{
"id": 5,
"name": "LECZENIE PROTETYCZNE",
"category": "URGENT",
"waiting": 0,
"removed": 0,
"average_waiting_time": 0,
"first_available_date": "2016-09-26",
"date_prepared": "2016-09-23",
"date_updated": "2016-08-01",
"date_inserted": "2016-10-22 18:16:56"
},
{
"id": 6,
"name": "LECZENIE PROTETYCZNE",
"category": "STABLE",
"waiting": 0,
"removed": 0,
"average_waiting_time": 0,
"first_available_date": "2016-09-26",
"date_prepared": "2016-09-23",
"date_updated": "2016-08-01",
"date_inserted": "2016-10-22 18:16:56"
}
]
Returns services matching specific criteria
- name - service's name
- voivodeship - voivodeship
- category[stable,unstable,undefined] - category
Returns information about a particular
- id - service's id
http://sciana.placzu.pl/service?id=24
{
"id": 24,
"name": "PORADNIA STOMATOLOGICZNA",
"provider": {
"name": "SAMODZIELNY ZESPÓŁ PUBLICZNYCH ZAKŁADÓW OPIEKI ZDROWOTNEJ W OLEŚNICY",
"voivodeship": "DOLNOŚLĄSKIE"
},
"category": "STABLE",
"cell": {
"name": "PORADNIA STOMATOLOGICZNA",
"city": "OLEŚNICA",
"address": "LUDWIKOWSKA 10",
"phone": "717982837"
},
"waiting": 7,
"removed": 3,
"average_waiting_time": 26,
"first_available_date": "2016-10-18",
"date_prepared": "2016-09-23",
"date_updated": "2016-08-01",
"date_inserted": "2016-10-22 18:16:56"
}
go get ./... #install dependencies
go build #build
The application requires either config.json
to be present in the runtime directory or -import configfile.json flag specified.
{
"host": "",
"username": "root",
"password": "PtMXrJjuSXrd5jfMLY",
"database": "scianaplaczu"
}
In order to import the data, go to http://kolejki.nfz.gov.pl/Informator/PobierzDane/Index/ and download all archives. Extract them to a single folder, DON'T CHANGE FILE NAMES
execute ./backend -import ./folder-with-extracted-xlsx-files
and wait: