Title: | Portuguese 'NHS' Hospitals |
---|---|
Description: | A data set of the Portuguese 'NHS' hospitals. |
Authors: | Ramiro Magno [aut, cre] , CINTESIS [cph, fnd] |
Maintainer: | Ramiro Magno <[email protected]> |
License: | CC0 |
Version: | 0.1.0 |
Built: | 2024-11-04 19:53:27 UTC |
Source: | https://github.com/nhs-pt/hospitals |
get_hospital_attribute
retrieves one of the variables of hospitals
as indicated in x
. Hospitals in x
can be specified by the: (i) hospital
identifier, (ii) acronym, or the (iii) shortened or (iv) full version of the
hospital name.
get_hospital_attribute(x, key = "hospital_id", value = "hospital_short_name")
get_hospital_attribute(x, key = "hospital_id", value = "hospital_short_name")
x |
A character vector of values that refer to hospitals, can be either
the hospital identifier (e.g. |
key |
A string indicating the type of values in |
value |
A string indicating the hospital attribute to be returned, can
be any of the columns of |
A character vector of hospital attributes.
# Get the short name of a hospital # (same as get_hospital_attribute('h0001', value = 'hospital_short_name')) get_hospital_attribute('h0001') # Or get instead the full name get_hospital_attribute('h0001', value = 'hospital_full_name') # Map the hospital short name to its full name get_hospital_attribute('IPO de Lisboa', key = 'hospital_short_name', value = 'hospital_full_name')
# Get the short name of a hospital # (same as get_hospital_attribute('h0001', value = 'hospital_short_name')) get_hospital_attribute('h0001') # Or get instead the full name get_hospital_attribute('h0001', value = 'hospital_full_name') # Map the hospital short name to its full name get_hospital_attribute('IPO de Lisboa', key = 'hospital_short_name', value = 'hospital_full_name')
A dataset of the Portuguese National Health Service hospitals.
hospitals
hospitals
A data frame with 16 variables:
hospital_id
A surrogate identifier created by this R package to identify unambiguously each hospital institution.
hospital_acronym
The acronym or initialism of the hospital name.
hospital_legal_status
Legal entity status: either an administrative public sector (SPA) entity, a corporate public entity (EPE) or a public-private partnership (PPP) entity. The legal status of SPA and EPE entities can be found in Decree-law 18/2017. For information about the legal status of the PPP entities see Decree-law 23/2020. The Portuguese government may also establish contracts with hospitals owned by social enterprises, namely Private Institutions of Social Solidarity (IPSS). In this case, these hospitals become effectively part of the National Health Service. There are three types of contracts that can be established with IPSS which are regulated by the Decree-law 138/2013: Management Agreement (IPSS-MA), Cooperative Agreement (IPSS-CA) and Convention (IPSS-CN).
hospital_integration
The integration level of the hospital
institution: a single hospital unit ('H'
); Centro Hospitalar
('CH'
), comprising two or more individual Hospital units (a case of
horizontal
integration); and Unidade Local de Saúde ('ULS'
), comprising
both Hospital entities and primary care health centres (a case of
vertical
integration).
hospital_group
One of the groups defined by Ordinance 82/2014: I, II, III, IV-a, IV-b or IV-c. This classification is based on the hospital catchment area and the scope of medical specialities provided. Broadly speaking, group I includes local hospitals, group II corresponds to regional hospitals, and group III to central hospitals. Group IV corresponds to specialised hospitals: IV-a, oncology institutes; IV-b, physical medicine and rehabilitation hospitals; and IV-c, psychiatry and mental health hospitals.
hospital_short_name
An abbreviated version of the hospital name.
hospital_full_name
The name of the hospital.
hospital_region_full_name
The name of the Portuguese health region.
hospital_region_short_name
A shortened version of hospital_region_full_name
.
hospital_vatin
VAT identification number (VATIN). In Portuguese, Número de Identificação de Pessoa Colectiva (NIPC).
hospital_latitude
Latitude of the location of the hospital entity expressed in decimal degrees.
hospital_longitude
Longitude of the location of the hospital entity expressed in decimal degrees.
hospital_region_colour
Colour associated with the region
. These
colours are assigned by this package and are provided as a convenience
colour palette for plotting in R.
hospital_bh_group
One of the groups defined by the project Benchmarking of Hospitals. Source: BH | Grupos e Instituições.
hospital_bh_group_colour
Colour associated with the bh_group
. These
colours are assigned by this package and are provided as a convenience
colour palette for plotting in R.
hospital_regex
A regular expression that can be used to identify hospitals
from their names, even when the names are not exactly as in
hospital_full_name
.
The concept of hospital here adopted is that of a legal entity
providing hospital services. Depending on the organisational structure of the
entity, it may be a single hospital unit (H), several hospital units that
have been merged into one Hospital Centre (CH), or a merge of hospital units
and health centres into the so called Unidades Locais de Saúde (ULS);
the column hospital_integration
indicates which case is which.
The set of hospitals included in this dataset was created by manual inspection of the hospital institutions referred in https://www.sns.gov.pt/institucional/entidades-de-saude/, namely those under the sections: Serviço Nacional de Saúde—Setor Público Empresarial, Serviço Nacional de Saúde—Setor Público Administrativo, Hospitais em parceria público-privada (PPP) and Hospitais geridos pelas Misericórdias.
Here are the sources per variable (column) in the dataset:
hospital_id
Own work.
hospital_acronym
Own work.
hospital_legal_status
Obtained from https://www.sns.gov.pt/institucional/entidades-de-saude/ as the hospitals were grouped according to its legal status. In the case of the partnerships with IPSS, the information on the precise type of contract was obtained from inspection of the contracts themselves. In all cases they are Cooperative Agreements (IPSS-CA):
data-raw/source/Acordo_Cooperacao_Hospital_Jose_Luciano_Castro_-Anadia1.pdf
data-raw/source/Acordo_Cooperacao_-Hospital_Sao_Paulo_Serpa.pdf
hospital_integration
The classification in Hospital unit (H), Hospital Centre (CH) or Unidade Local de Saúde (ULS) could be easily inferred from the name of the hospitals. Hospital Centres always start with Centro Hospitalar (CH), and ULS hospitals always start with Unidade Local de Saúde (ULS). The remaining hospitals are therefore single Hospital (H) units.
hospital_group
For the majority of the hospitals this grouping was obtained from the ordinance where these are first defined, i.e., the table annexed to Ordinance 82/2014.
The hospital Instituto de Oftalmologia Dr. Gama Pinto was not assigned to any group in the Ordinance 82/2014. But given that this hospital is exclusively specialised in ophthalmology, we have decided to assign it generically to group IV (for specialised hospitals), following the criteria given in Ordinance 82/2014.
The hospital Hospital Dr. Francisco Zagalo, Ovar was not assigned to any group in the Ordinance 82/2014. It was included in group I however in a work by Luís Pereira, which we followed, see Table 15 in the Appendix 1, page 71 of data-raw/source/Pereira.Unpublished.2019.pdf.
The hospital Hospital Luciano de Castro, Anadia was not assigned to any group in the Ordinance 82/2014. It was included in group I however in a work by Luís Pereira, which we followed, see Table 15 in the Appendix 1, page 71 of data-raw/source/Pereira.Unpublished.2019.pdf.
hospital_short_name
Own work.
hospital_full_name
Obtained from https://www.sns.gov.pt/institucional/entidades-de-saude/.
hospital_region_full_name
Obtained from Decree-law 11/93.
hospital_region_short_name
Own work.
hospital_vatin
From the search engine https://codigopostal.ciberforma.pt/ and from data-raw/source/Infarmed_lista_hospitais.pdf.
hospital_latitude
and hospital_longitude
By searching each hospital in Google Maps and retrieving its coordinates.
hospital_region_colour
Own work.
hospital_bh_group
The ACSS groups defined in the project Hospitals' Benchmarking were collected from these sources:
Page 25 of data-raw/source/ACSS.TechReport.2020.pdf
hospital_bh_group_colour
Own work.
hospital_regex
Own work.
hospitals
hospitals
normalise
tries to match provided hospital names to the Portuguese NHS
hospitals, i.e. to those hospitals included in the data set
hospitals
, thus allowing conversion to standard
hospital names. By default, it returns the shortened version of the hospital
name: column hospital_short_name
in hospitals
. Use
the return
argument to return a different variable, see below for possible
values.
normalise( nm, return = c("hospital_short_name", "hospital_full_name", "hospital_id", "hospital_acronym"), unmatched_as_na = TRUE ) normalize( nm, return = c("hospital_short_name", "hospital_full_name", "hospital_id", "hospital_acronym"), unmatched_as_na = TRUE )
normalise( nm, return = c("hospital_short_name", "hospital_full_name", "hospital_id", "hospital_acronym"), unmatched_as_na = TRUE ) normalize( nm, return = c("hospital_short_name", "hospital_full_name", "hospital_id", "hospital_acronym"), unmatched_as_na = TRUE )
nm |
A character vector of hospital names. |
return |
A string indicating the hospital attribute to be returned:
either |
unmatched_as_na |
A logical indicating whether unmatched hospital names
are returned as |
The method behind normalise
for matching hospital names is based on an
heuristic that uses a minimal set of keywords to identify the hospital. This
is implemented by using regular expressions. The regular expressions are
provided in data set hospitals
, column
hospital_regex
. Moreover, the method is case insensitive and is pretty
tolerant to variations in the name as long as one of the critical keywords is
found in the name. Note however that the regular expressions have been
designed such that matches are mutually exclusive. So the same hospital name
will never match more than one hospital of the data set
hospitals
.
normalise
is aware of deprecated hospital names, and will map those old
designations to the new hospital names, e.g., Hospital do Alto Ave is
correctly mapped to Hospital da Senhora da Oliveira, Guimarães, EPE.
normalise
is lenient with typos associated with accented characters, so,
e.g., both expressions 'Hospital de São João' and 'Hospital de Sao Joao' will
correctly match to the same hospital: CHU de São João.
A character vector.
# Match hospital with a single keyword normalise('Matosinhos') # The same, but return now the full name normalise('Matosinhos', 'hospital_full_name') # Get instead the hospital identifier normalise('Matosinhos', 'hospital_id') # Or even just the acronym (useful for labelling in plots) normalise('Matosinhos', 'hospital_acronym') # Find hospitals from their old names # "Hospital do Alto Ave" is the old name for 'Hospital da Senhora da Oliveira, Guimarães, EPE' normalise('Hospital do Alto Ave', 'hospital_full_name') # `normalise()` is vectorised over `nm` normalise(nm = c('medio tejo', 'oeste', 'guarda'))
# Match hospital with a single keyword normalise('Matosinhos') # The same, but return now the full name normalise('Matosinhos', 'hospital_full_name') # Get instead the hospital identifier normalise('Matosinhos', 'hospital_id') # Or even just the acronym (useful for labelling in plots) normalise('Matosinhos', 'hospital_acronym') # Find hospitals from their old names # "Hospital do Alto Ave" is the old name for 'Hospital da Senhora da Oliveira, Guimarães, EPE' normalise('Hospital do Alto Ave', 'hospital_full_name') # `normalise()` is vectorised over `nm` normalise(nm = c('medio tejo', 'oeste', 'guarda'))