An Open Source GIS Application for Spatial Assessment of Health Care Quality Indicators

: Prevention quality indicators (PQIs) constitute a set of measures that can be combined with hospital inpatient data to identify the quality of care for ambulatory care sensitive conditions (ACSC). Geographical information system (GIS) web mapping and applications contribute to a better representation of PQI spatial distribution. Unlike many countries in the world, in Portugal, this type of application remains underdeveloped. The main objective of this work was to facilitate the assessment of geographical patterns and trends of health data in Portugal. Therefore, two innovative open source applications were developed. Leaﬂet Javascript Library, PostGIS, and GeoServer were used to create a web map application prototype. Python language was used to develop the GIS application. The geospatial assessment of geographical patterns of health data in Portugal can be obtained through a GIS application and a web map application. Both tools proposed allowed for an easy and intuitive assessment of geographical patterns and time trends of PQI values in Portugal, alongside other relevant health data, i.e., the location of health care facilities, which, in turn, showed some association between the location of facilities and quality of health care. However, in the future, more research is still required to map other relevant data, for more in-depth analyses.


Background
Nowadays, Geographical information systems (GIS) have become a crucial tool in all contexts that deal with geographic data, in the public or private sector, and it can be applied in several areas, especially in health management, environment, natural resources exploration, urban planning, etc. [1]. The Free and open source software (FOSS) continues to be an important frontier of information systems, having an impact on society, business, education, and research [2]. FOSS has been used all over the world, increasing day by day. In the GIS domain, the widespread use of FOSS applied to several areas is apparent, including health [3]. The FOSS term represents the free and open source software, meaning that users have the four essential freedoms, namely, (i) to run the program, (ii) to study and change the program in source code form, (iii) to redistribute exact copies, and (iv) to distribute modified versions [4]. FOSS software is accomplished with the GNU General Public License (GNU GPL or simply GPL) operating system so that users can have freedom in their computing. Additionally, FOSS philosophy believes that the program's users should be free to take advantage of them, not solely its developer [4]. FOSS software GIS offer tools capable of spatially locating health needs, associate them with services and programs, and even identify new geographic gaps [13]. It can also have the potential to assess patterns of health care and consequently identify regions that need better access to primary care [14]. In this context, open source software has a high potential to improve GIS research, and web mapping is a very promising tool in human geography and social sciences [1]. GIS also allows for the identification of health trends, because it can contain information on health and disease for specific regions and environmental and population data, connections between a population's living area and their state of health can be made in a more integrated manner when compared to the use of traditional paper-based maps [15]. As a result, GIS technology in health studies can improve the quality of epidemiological research and its impact on health care delivery and accessibility since conclusions can be made about a region's care, services, inequalities, and overall health. GIS combined with remote sensing data has also been used in health studies [16]. Therefore, GIS can be extremely helpful to policymakers and health care providers.
In recent years, the number of web mapping users has been increasing due to easy access, diversity, and more integrated and intelligent geospatial applications in a web GIS environment, providing an online collaborative environment to support users and applications [11]. There are GIS public health web mapping applications all over the world. For instance, in the United States of America (USA), there are 24 web mapping applications such as the Chronic Disease GIS Exchange (CDC), the Diabetes County Data and Maps (DCDC), the EnviroAtlas (US EPA), etc. [17]. Another example is the National Center for Chronic Disease Prevention and Health Promotion, where there is an interactive map. In this map, the user can choose the indicator, select the year, the view (by gender, overall, or race), and the data type [18]. However, the database used is specifically adapted to the USA.
In Portugal, applications based on geographical patterns of health data remain underdeveloped. There is GEOSAUDE [19], a web GIS that offers interactive maps of several health-related indicators and options to filter the information by local and regional administrative units; PORDATA [20], which presents statistical (health and nonhealth related) data in the form of numerical statistics, graphs, and indicators; Statistics Portugal (INE) [21], which is the national statistical office that collects comprehensive (health and nonhealth) data and also presents health data in the form of numerical statistics, graphs, and indicators; BI-CSP (Bilhete de Identidade dos Cuidados de Saúde Primários-Identity Card of Primary Health Care) [22], which is a tool to monitor the primary health care public system, providing tables and graphs of a comprehensive list of indicators; the benchmarking hospitals [23], which is a tool to monitor and benchmark the quality of public hospitals and provides tables and graphs of a list of indicators; and Transparency [24], a website aimed at sharing health information with the citizen that disseminates data on access, quality, and efficiency of the Portuguese National Health Service (NHS). In the five examples above, GEOSAUDE is the only application that provides spatial visualization of health indicators, with interactive maps, allowing to choose one indicator from four groups, namely, (i) National Health Plan 2012-2016, (ii) National Health Plan 2004-2010, (iii) characterization of indicators of Agrupamento de Centros de Saúde-Health Center Group (ACES), and (iv) priority health programs. Several indicators can be accessed from these four groups; even though the spatial representation of PQI values is possible in GEOSAUDE, it is not completely ready for use. In the other applications, spatial information is limited to the distribution of indicators' values, and it is not possible to cross-map other information such as the location of hospitals or primary care units, and the distribution of environmental variables and other health risk factors (including socioeconomic factors). Based on the underdevelopment of GEOSAUDE's functionalities, a tool that allows for assessing the geographical distribution of health indicators and its relationship with environmental data is of crucial importance in Portugal.
The case of Portugal is of particular interest when it comes to health inequalities when compared to other European Union countries since Portugal has considerably high inequalities and risk of poverty [25], with recent evidence showing a substantial impact of socioeconomic factors on health [26,27]. Therefore, mapping solutions allowing for a comprehensive and simple assessment of all these data are essential tools for decision makers in public health and for health system planning.
For those reasons, we focus our study on the need for (and easy access to) spatial representations of healthcare information and indicators, namely, PQI values, in addition to other relevant sociodemographic information. Simultaneously, this work intends to promote open source through a web-based mapping, contributing to the improvement of the Portuguese health care system's information quality and, consequently, the decisionmaking process in the public health domain, leading to more informed and data-based decisions/policies and tailored interventions. The main objective of this work was to perform the geospatial assessment of geographical patterns of health data in Portugal (PQI values, among others), their trend analysis, and their spatial representation in maps. To achieve that, two innovative open source applications were developed-(i) a GIS open source application, developed under QGIS, a GIS open source software, and (ii) a GIS web map prototype, developed using Leaflet library and Geoserver, for health facilities mapping along with the spatial distribution of PQI values.

Database
A database was built containing the PQI values computed from a numerator estimated from hospital administrative data, and a denominator mostly defined from the population projections estimates between 2014 and 2017 [21], according to the AHRQ specifications and stratified by year and geographical region [28,29] using the R software.
The AHRQ specifications implemented include 17 indicators. The database attribute PQI was defined to identify each of these PQIs (Table 1). The hospital administrative data were obtained from the Administração Central da Saúde, IP (Health Central Administration (ACSS)) and comprised information on hospitalizations occurring in mainland Portugal public hospitals, including demographic and clinical information, i.e., age, gender, residence, diagnoses, procedures, and the patient disposition after discharge, etc. [30,31]. Diagnoses and procedures in the ACSS's data are coded using the International Classification of Diseases, Ninth Revision, Clinical Modification (ICD-9-CM), which has been replaced by the International Classification of Diseases, 10th Revision, Clinical Modification/Procedure Coding System (ICD-10-CM/PCS). The ICD-9-CM is based on the World Health Organization's Ninth Revision, International Classification of Diseases (ICD-9), which has been developed to assign codes to diagnoses and procedures associated with hospital utilization in the United States. In Portugal, the transition between ICD-9-CM and ICD-10-CM/PCS occurred during 2016 and 2017, initially only by a few pilot hospitals and, as of 2017, all public hospitals were instructed to code according to the ICD-10-CM/PCS, even if hospitals episodes reported to 2016. Therefore, 2016 is a transitional year in which the two clinical classification systems can coexist. Our database includes a dichotomous attribute, named Codificação (codification), to indicate which coding system the PQI partial value refers to. For example, in 2016, there were a total of 21,662 PQI93-related hospitalizations (20,896 coded in ICD-9-CM and 766 in ICD-10-CM) from patients residing in the Lisbon district.
Other types of data, for instance, socioeconomic data obtained from Statistics Portugal (INE) or PORDATA will be considered in the future. As mentioned, PORDATA [20] presents statistical (health and nonhealth related) data in the form of numerical statistics, graphs, and indicators. These data will be considered to incorporate in the web map application. Statistics Portugal (INE) [21] is the national statistical office that collects comprehensive (health and nonhealth) data, presents health data in the form of numerical statistics, graphs, and indicators. PORDATA [20] presents statistical (health and nonhealth related) data in the form of numerical statistics, graphs, and indicators. These data will be considered to incorporate in the web map application. Additionally, the PQI values will be updated according to new definitions. For instance, Sarmento et al. [32] developed a list of ACSC for Portugal. Other studies can be considered, such as, for instance, Ramalho et al. [33] that analyzed the results of the DMage-sex-adjusted PQI, by groups of health centers (ACES), distributed in the Portuguese territory and the evaluation of the PQI for diabetes mellitus (DM) in Portugal using contemporary data and explores their variability according to PHC quality indicators. The advantage of a web application is that it is open source, and therefore, it can be updated.
Four spatial levels of analysis are presented in the database-an older administrative division of the territory called a district (dividing the mainland territory into 18 regions) and the nomenclature of territorial units for statistics (NUTS I, NUTS II, and NUTS III) [34]. To develop this tool, attributes for gender and age were defined in the database. Even though the PQI has not been computed by gender or age subgroups, this provides a more flexible database that can accommodate filters by gender and age in the future. The chronological segmentation (e.g., yearly, monthly) and the computation of the PQI values are also attributes of the database. Thus, there is one row per PQI, chronological segmentation unit (e.g., year), coding system, gender group, age stratum, and geographic region within a specific geographic segmentation.
PostGIS (version 3.0.0) was used to store and query variables in the GIS application [35]. PostGIS is an open source extension to the PostgreSQL database (version 12) that provides spatial objects, allowing location queries and mapping using Structured Query Language (SQL) [35]. The database was manually added to the PostGIS and the SQL queries were implemented under the GIS application, as explained in the following sections.

Health Care Quality Indicators (HCQIs) GIS Application
The first version of a GIS open source application was developed under QGIS version 3.10 software [36,37]. In this work, the GIS application was substantially improved, and a new version was created. To develop the application, several libraries and Application Programming Languages (APIs) such as QGIS API, Qt API [38], and PyQGIS API [39], were used. Figure 1 presents the class diagram implemented in this application. variability according to PHC quality indicators. The advantage of a web application is that it is open source, and therefore, it can be updated. Four spatial levels of analysis are presented in the database-an older administrative division of the territory called a district (dividing the mainland territory into 18 regions) and the nomenclature of territorial units for statistics (NUTS I, NUTS II, and NUTS III) [34]. To develop this tool, attributes for gender and age were defined in the database. Even though the PQI has not been computed by gender or age subgroups, this provides a more flexible database that can accommodate filters by gender and age in the future. The chronological segmentation (e.g., yearly, monthly) and the computation of the PQI values are also attributes of the database. Thus, there is one row per PQI, chronological segmentation unit (e.g., year), coding system, gender group, age stratum, and geographic region within a specific geographic segmentation.
PostGIS (version 3.0.0) was used to store and query variables in the GIS application [35]. PostGIS is an open source extension to the PostgreSQL database (version 12) that provides spatial objects, allowing location queries and mapping using Structured Query Language (SQL) [35]. The database was manually added to the PostGIS and the SQL queries were implemented under the GIS application, as explained in the following sections.

Health Care Quality Indicators (HCQIs) GIS Application
The first version of a GIS open source application was developed under QGIS version 3.10 software [36,37]. In this work, the GIS application was substantially improved, and a new version was created. To develop the application, several libraries and Application Programming Languages (APIs) such as QGIS API, Qt API [38], and PyQGIS API [39], were used. Figure 1 presents the class diagram implemented in this application. The main graphic user interface (GUI) is composed of two tabs-Symbology and Mapping ( Figure 2). The first tab allows the user to define the parameters to create the PQI distribution on each district, NUTS I, II, or III, while the second one allows accessing additional information to overlap with the PQI values, such as base aerial maps and hospital and PHC facilities' locations. The GIS application allows the connection to a PostGIS database that contains the information about the PQI values. The main graphic user interface (GUI) is composed of two tabs-Symbology and Mapping ( Figure 2). The first tab allows the user to define the parameters to create the PQI distribution on each district, NUTS I, II, or III, while the second one allows accessing additional information to overlap with the PQI values, such as base aerial maps and hospital and PHC facilities' locations. The GIS application allows the connection to a PostGIS database that contains the information about the PQI values.

Web Map Development
Some studies also used open source tools to create web GIS applications [41]. Web programming applications have been used in several contexts. Leaflet, JavaScript, HyperText Markup Language (HTML) and Cascading Style Sheet (CSS) have been integrated with GIS to build web technologies [43][44][45][46].
JavaScript and HTML language were used in the creation of the web map prototype. JavaScript is a structured interpreted programming language, high-level script with light typing and multiparadigm (prototypes, object oriented, imperative, and functional) [47]. It can be combined with HTML and CSS, and it allows the creation of interactive web pages and therefore is an essential part of web applications.
The Leaflet is one of the most used web mapping libraries [48]. The Leaflet is an open source JavaScript library for mobile-friendly interactive maps. It is simple and very used due to the efficiency of desktop and mobile platforms. It is composed of an easy-to-use and well-documented API and tutorials that help to develop the web map [49]. The Leaflet was used in this work to develop the web map.
The layers in shapefile format were added to the web map application as GeoJSON format, a JavaScript object that contains geographic data.
GeoServer is a free and open source server for sharing geospatial data [50]. GeoServer supports several formats such as standard Open Geospatial Consortium (OGC) protocols such as Web Feature Service (WFS), Web Map Service (WMS), and Web Coverage Service (WCS), shapefile, GeoTIFF, Comma-Separated Values (CSV), and Keyhole Markup Language (KML). It supports also databases such as PostGIS, Oracle, and Microsoft SQL Server. GeoServer 2.16.2 was used to connect to Leaflet and PostGIS so that the web map application can handle the data.
In the GeoServer configuration, the database used in the GIS application (and presented in the PostGIS) was connected to GeoServer. The layers already stored in this database can now be accessed through GeoServer.
The web map application prototype was created based on Javascript and HTML language, using Leaflet library, connected to a GeoServer where the data were stored in PostGIS. This means that the database presented in the PostGIS was created and published in the GeoServer. Therefore, to create the web map application, the relation PostGIS-GeoServer-Leaflet was used. The web map application prototype was created based on open source tools (Leaflet, GeoServer, and PostGIS).
In the web map creation, two base maps were added, based on OpenStreetMap (OSM)-OSM Streets and OSM Satellite [51]. In addition to the base maps, more layers were also added from the connection to GeoServer: hospital and the existent PHC facilities in Portugal (this information was added as point file), and PQI information as a polygon file for each district.
Some basic functionalities were also added, such as (i) a control layer that groups all the layers, allowing users to control which layers they want to see on the map; (ii) a numerical scale, i.e., a scale control presenting the scale of the current center of the screen in metric (m/km) and imperial (mi/ft) systems, integrated also as control; (iii) a polyline measure, which is based on a Leaflet plugin to measure distances of simple lines as well as complex polylines; (iv) a standard zoom in and zoom out controls; (v) a popup when clicking in a polygon with the information about the PQI value in each district; (vi) popups in each point with some information regarding hospitals and PHC facilities; and (vii) the possibility to change the visualization between the different layers, containing the legend referring to PQI values by district (hospitalizations per 100,000 inhabitants). Additionally, some actions in the mouse button were implemented, such as the click action under a point, a popup is showed with the information regarding the name of Unidade Funcional (UF); Functional Unit) name, in the case of primary health facilities and the name of Centro Hospitalar (Hospital Center), and the type of emergency care services available.

Ethical Statement/Considerations
Data regarding hospital and PHC localization are publicly available. The PQIs are aggregated health data, which pose a minimal risk of patient privacy breach. Any PQIs generated from a numerator smaller than 10 hospitalizations will not be presented to further safeguard patients' privacy. Hospitalization data used for PQI estimation are anonymized at the patient level, not requiring a complete review by the ethics committee. Confirmation that the data are anonymous is given by the Portuguese Central Authority for Health Services at the time of their assignment.

GIS Open Source Application
The developed GIS application allows a quick and easy assessment of PQI values' spatial distribution and time trends alongside other relevant health data. Some examples of thematic maps, outputs of the GIS application, are presented in this section, depicting different PQI values and considering the parameter options available in both applications, to illustrate results.
As an example, and considering geographical distributions, Figure 3 presents maps with the spatial representation of different PQI values. Figure 3a presents PQI09 (low birth weight) values in 2016, considering ICD9 codification. It reveals that the districts of Beja, Lisboa, and Braga had the highest PQI09 rates in 2016, indicating that in that year low birth weight was higher in these districts. Figure 3b represents the overlapping of these data with other relevant information, namely, the number and location of PHC, hospital facilities, and an aerial satellite base map. This map shows that there may be an association between these high values and insufficient prenatal care in these regions, possibly as a result of a low number and density of PHC. Another example was tested selecting PQI03 (diabetes long-term complications; Figure 3c). In this map, it is possible to see that in 2015, hospitalizations due to diabetes long-term complications were the highest in Beja. As we saw earlier, Beja has a quite low density of PHC facilities, which could lead to a lack of access and, therefore, higher PQI03 rates. These spatial representations are potentially extremely useful in guiding health experts and officials in the design of specific interventions and/or policies. Figure 3d presents the overlap with the location of PHC and hospitals.
The GIS application also allows the evaluation of PQI time trends in a specific period. The Export Bar Variation functionality allows the user to create a plot based on the chosen district and PQI, over time. In this example, Porto and PQ02 (perforated appendix) were chosen (Figure 4), respectively.

Ethical Statement/Considerations
Data regarding hospital and PHC localization are publicly available. The PQIs are aggregated health data, which pose a minimal risk of patient privacy breach. Any PQIs generated from a numerator smaller than 10 hospitalizations will not be presented to further safeguard patients' privacy. Hospitalization data used for PQI estimation are anonymized at the patient level, not requiring a complete review by the ethics committee. Confirmation that the data are anonymous is given by the Portuguese Central Authority for Health Services at the time of their assignment.

GIS Open Source Application
The developed GIS application allows a quick and easy assessment of PQI values' spatial distribution and time trends alongside other relevant health data. Some examples of thematic maps, outputs of the GIS application, are presented in this section, depicting different PQI values and considering the parameter options available in both applications, to illustrate results.
As an example, and considering geographical distributions, Figure 3 presents maps with the spatial representation of different PQI values. Figure 3a presents PQI09 (low birth weight) values in 2016, considering ICD9 codification. It reveals that the districts of Beja, Lisboa, and Braga had the highest PQI09 rates in 2016, indicating that in that year low birth weight was higher in these districts. Figure 3b represents the overlapping of these data with other relevant information, namely, the number and location of PHC, hospital facilities, and an aerial satellite base map. This map shows that there may be an association between these high values and insufficient prenatal care in these regions, possibly as a result of a low number and density of PHC. Another example was tested selecting PQI03 (diabetes long-term complications; Figure 3c). In this map, it is possible to see that in 2015, hospitalizations due to diabetes long-term complications were the highest in Beja. As we saw earlier, Beja has a quite low density of PHC facilities, which could lead to a lack of access and, therefore, higher PQI03 rates. These spatial representations are potentially extremely useful in guiding health experts and officials in the design of specific interventions and/or policies. Figure 3d presents the overlap with the location of PHC and hospitals.  The GIS application also allows the evaluation of PQI time trends in a specific period. The Export Bar Variation functionality allows the user to create a plot based on the chosen district and PQI, over time. In this example, Porto and PQ02 (perforated appendix) were chosen (Figure 4), respectively. In Figure 4a, Porto district and PQI02 were selected for visualization. Figure 4b shows the PQI02 trend in the Porto district between 2014 and 2017. We can observe that there was a continuous increase in hospitalizations due to perforated appendix, most notably in 2017. This trend could potentially indicate that appendicitis is not being detected early enough in a PHC setting, leading to illness progression and appendix rupture at a later, and more severe, stage. Clearly, this is important information for the elaboration of evidence-based interventions and policies to address this issue. The maps generated with the GIS application can be also saved in shapefile or GeoJSON format, which can also be exported and opened in an open source platform.   In Figure 4a, Porto district and PQI02 were selected for visualization. Figure 4b shows the PQI02 trend in the Porto district between 2014 and 2017. We can observe that there was a continuous increase in hospitalizations due to perforated appendix, most notably in 2017. This trend could potentially indicate that appendicitis is not being detected early enough in a PHC setting, leading to illness progression and appendix rupture at a later, and more severe, stage. Clearly, this is important information for the elaboration of evidence-based interventions and policies to address this issue. The maps generated with the GIS application can be also saved in shapefile or GeoJSON format, which can also be exported and opened in an open source platform. In Figure 4a, Porto district and PQI02 were selected for visualization. Figure 4b shows the PQI02 trend in the Porto district between 2014 and 2017. We can observe that there was a continuous increase in hospitalizations due to perforated appendix, most notably in 2017. This trend could potentially indicate that appendicitis is not being detected early enough in a PHC setting, leading to illness progression and appendix rupture at a later, and more severe, stage. Clearly, this is important information for the elaboration of evidence-based interventions and policies to address this issue. The maps generated with the GIS application can be also saved in shapefile or GeoJSON format, which can also be exported and opened in an open source platform.

Web Map
In this section, the information hosted in the web map application and the functionalities added are presented. Figure 5 presents the result of the web map prototype containing the different functionalities described before. Figure 6 presents the popup of PHC facilities. nt. J. Geo-Inf. 2021, 10, x FOR PEER REVIEW 10 of 16

Web Map
In this section, the information hosted in the web map application and the functionalities added are presented. Figure 5 presents the result of the web map prototype containing the different functionalities described before. Figure 6 presents the popup of PHC facilities. The web map application is still under development since this work is dynamic in time and needs to be constantly updated, and there are planned to incorporate more functionalities.

Discussion
Considering the spatial analysis of PQI values, proprietary software, such as ArcGIS [52] can also handle a database and spatially represent the PQI values [33]. However, according to the literature consulted, no application is specifically developed in proprietary software that allows us to spatially represent and analyze the PQI values. Given the fact that ArcGIS (or other proprietary software) is not open source, i.e., the code is not accessible to any user, the FOSS software presents a strong advantage in the context of this

Web Map
In this section, the information hosted in the web map application and the functionalities added are presented. Figure 5 presents the result of the web map prototype containing the different functionalities described before. Figure 6 presents the popup of PHC facilities. The web map application is still under development since this work is dynamic in time and needs to be constantly updated, and there are planned to incorporate more functionalities.

Discussion
Considering the spatial analysis of PQI values, proprietary software, such as ArcGIS [52] can also handle a database and spatially represent the PQI values [33]. However, according to the literature consulted, no application is specifically developed in proprietary software that allows us to spatially represent and analyze the PQI values. Given the fact that ArcGIS (or other proprietary software) is not open source, i.e., the code is not accessible to any user, the FOSS software presents a strong advantage in the context of this The web map application is still under development since this work is dynamic in time and needs to be constantly updated, and there are planned to incorporate more functionalities.

Discussion
Considering the spatial analysis of PQI values, proprietary software, such as Ar-cGIS [52] can also handle a database and spatially represent the PQI values [33]. However, according to the literature consulted, no application is specifically developed in proprietary software that allows us to spatially represent and analyze the PQI values. Given the fact that ArcGIS (or other proprietary software) is not open source, i.e., the code is not accessible to any user, the FOSS software presents a strong advantage in the context of this work because it allowed us to create two applications that easily provide the possibility to analyze the health indicators, contributing to FOSS technologies in the health care context. Additionally, no application is developed in GIS open source software or even freeware software that allows us to perform the procedures presented in this study. Therefore, in this work, two open source and free applications were developed.
A simple and intuitive GIS application integrating Portuguese health indicators' databases and allowing for representations of time and geographical trends can be extremely useful for data analysis and monitoring in health care planning. PQI values, in particular, are extremely useful as important metrics to monitor and evaluate the access, quality, coordination, and efficiency of PHC services [53], especially in areas outside the great metropolitan areas, most afflicted by low access to PHC and poor-quality health care.
Despite similar platforms already available in Portugal, none allowed for the spatial representation and time trend analysis of PQI values. In that regard, this application is a clear breakthrough. The fact that it can also map other health data such as PHC and hospital locations addresses several questions such as are health care facilities adequately distributed to meet the needs of our community? What are the geographic regions most in need of primary care access? Are there large variations in PHC quality across regions? What are the determinants (e.g., population level, health care provider level) of variability in health care quality? Which conditions (PQIs) show signs of low health care quality? Which has seen an improvement/decline in health care quality over time? Additionally, which are associated with larger geographic disparities? [14].
The developed GIS desktop application provides an easy way to generate plots with PQI variation over time, a useful tool to monitor its evolution and, therefore, monitor the quality of primary care and the health system itself [8]. It also lets the user create new maps and select/add new parameters easily, while also overlapping them with base maps and data on the location of hospital and PHC facilities, facilitating comparisons. The mapping of PQI with both hospital and PHC facilities information supports the analysis of the quality of access to health care and possible inequalities [54]. This is useful information for community health profiling, which can "identify the geographical strengths and weaknesses of a specific community to make decisions about their health services to justify the placement of new ones" [55]. Indeed, the distance from the PHC unit and/or proximity to a hospital may have a considerable impact on the accessibility and utilization preferences of health care services [56].
For instance, Figure 3a,b shows the mapping of PQI09 (low birth weight) in 2016. Partially in line with the results found by Santos et al. [57], it is possible to observe that the Lisboa and Beja districts presented some of the highest levels of low birth weight in 2016. Figure 3b shows the overlapping of these values with health care facility information (number, location, and density per district). After adding the health care facility layer to the map, we can see that in some of these areas there is indeed a considerable geographical dispersion when it comes to PHC units, especially the Beja district. These high PQI09 rates could be associated with insufficient prenatal care in these districts, possibly as a result of low access to PHC services, poor quality of care, or a low ratio of health professionals. However, other factors could play a part here, namely, demographic and socioeconomic factors, such as maternal age, maternal level of education/literacy, household monthly income, the existence of private clinics, etc. [18]. On the other hand, Figure 3b also reveals that the Portalegre district, an area in the countryside such as Beja, had the lowest prevalence of low birth weight in that year, while also having few and sparse PHC facilities. The potential role of other factors is clear, and it would be important to map that data as well, for a fuller picture.
In the case of Figure 4b, which shows the PQI02 trend in the Porto district between 2014 and 2017, there was a continuous increase in hospitalizations due to perforated appendix, which could potentially indicate that appendicitis is not being detected early enough in a PHC setting, leading to illness progression and appendix rupture at a later, and more severe, stage, with worse outcomes for the patient and higher related costs (longer hospital stay, surgical and pharmacological costs). Similar to the case above, this apparent association can occur due to poor quality of care at a PHC level as well as other demographic and socioeconomic factors (e.g., age, comorbidities, etc.); in-depth research could identify more detailed associations and root causes.
Additionally, like presented in the previous section, this web map allows users to visualize indicators' time trends-a significant advantage over the GEOSAUDE web map, which does not allow it.
Clearly, this application and the spatial and time trend visualizations it provides are extremely valuable tools for health care administrations, public health officials, policymakers and decision makers when it comes to guidance for research and targeted evidence-based interventions/policies.
Additional technical strengths of the application include the possibility of applying different filters, such as the clinical codification system, which stands out as a particularly interesting feature since it can help to identify some regional variations and difficulties associated with the transition between coding systems ICD9-CM to ICD10-CM/PCS [58].
One of the main drawbacks of the GIS application, however, is the fact that it is highly dependent on the amount and quality of data for the regions studied-a common drawback of all GIS applications [59]. If enough quality data are not available, GIS analysis may not be credible, and researchers/policymakers should not depend completely on them for decision making [15]. Other complexities include the great variation of GIS software applications available, which makes it hard to compare research results [60]. Regarding, for instance, the fact that the filter for sex and age have not been implemented, since the PQI database has not yet been populated with PQI values by sex and age group. The latter could be useful as different indicators are problematic in different ways depending on sex and age, and the potential for informing truly targeted interventions is lost. Other complex functionalities, such as hospitalizations for ACSC per district/region, type of PHC facility (family health unit vs. personalized health care units), and the number of health professionals per district/region, have not been implemented yet but could be useful under the premise that regions with less access to quality health care may have more hospitalizations due to poor disease control, in line with conclusions in [56,61]. However, many authors suggest that, despite evidence that increased physician supply and density of PHC are associated with lower rates of hospitalizations for ACSC, socioeconomic characteristics may play a key role, with a substantial financial burden for the national health system [26], which highlights the need for mapping these characteristics as well.
Regarding the web map application itself, its main strengths include (i) not requiring QGIS software installation, (ii) the possibility of overlapping PQI values with the base maps (in integration with the application), (iii) incorporation of other functionalities to manipulate the map and visualize data, (iv) easy access, (v) versatility due to being able to be modified/complemented to present more indicators, and (vi) being open source. On the other hand, some problems are (i) lack of sex and age-group stratification and other more complex functionalities, such as hospitalizations for ACSC, and (ii) a web-based application requires constant updating of the information retrieved and the functionalities must be working well. This is a barrier for this kind of application, but given the relevance in the health care context in Portugal, this application will be continuously monitored. The spatial visualization of the data itself does not require GIS software installation, which makes it very easy to use. It can have a strong potential for health experts to obtain instantaneous conclusions about health indicators.
The web application developed in this study attempts to answer requirements from health experts. However, analysis tools such as the easy visualization and comparison of indicators over time, between different regions, and for different levels and abstraction must be considered in a future version of the web application. Their importance cannot be understated, and they are planned to be implemented in the near future.
Both applications are designed for public health officials, decision makers, policymakers, and health experts, contributing to quick and easy access to the existent data.
Lastly, ethical issues are of significant importance in this context, as loss of confidentiality may be an intrinsic limitation of GIS [62]. It is very difficult to maintain confidentiality when geographic data are presented in small regions/villages/counties since it may become possible to identify the affected individuals with minimal additional information. Researchers and developers are working on ways to address these concerns [63].

Conclusions
The absence of a working platform allowing for spatial PQI representation and time trend analyses in Portugal led us to the development of a GIS open source application and a web application specially designed for public health officials, decision makers, policymakers, and health experts.
Allowing for the visualization of PQI time trends and geographical patterns in Portugal while at the same time allowing for the overlapping with other health data, i.e., health care facilities' location information, this application can be tremendously useful in health states analyses of the Portuguese population and the identification of regional/local variations and inequalities, regarding health states and access to health care. It can certainly contribute to the improvement of the health care quality information system and the strengthening of the data-driven decision-making process in the public health domain.
As more functionalities are added, more information can be mapped, and more in-depth analyses can be performed.
We believe that our application can have a positive impact on the health care quality information system in the public health dimension through the identification of areas with fewer and more dispersed primary healthcare facilities, fewer health professionals, and type of primary healthcare unit, and through the identification of demographic and socioeconomic characteristics that can lead to worse health outcomes (aging population, lower income, lower educational attainment level, etc.). Data and research on the distribution of disease considering all these characteristics are relatively scarce and not easily available in a convenient manner to public health officials and decision makers. Therefore, our aim was to address this issue and create an application that would promote research and inform evidence-based decision making and tailored policies/interventions.
In the future, more functionalities will be added, such as (i) the possibility to click on each district and have access to a graph with the variation of PQI values (such as the application). This will be performed based on SQL conditions connected to GeoServer; (ii) a chronological slider bar will be added to the web map regarding the years and the different PQI codification so that the user can verify the variation of PQI values in all districts; (iii) the database will be updated (when we have authorization); (iv) new filter regarding PQI values and years will be added to the web map; (v) other important information will also be incorporated in the web map, for instance, the hospitals and primary centers locations (already provided); (vi) we will provide more helpful and intuitive analysis tools under the web map, such as the possibility to manage the indicators and the way they are presented; and vii) the possibility to add an additional set of indicators, for instance, in a given medical contact (e.g., diabetes, mental health). At this stage, our objective was to provide the spatial visualization for PQI data, by district, as proof of concept but we aim to improve the user web map interface, creating a more flexible and intuitive map. As time goes by, we expect more updated and complete data for better and more useful visualizations.
Although this tool has been developed for the Portuguese reality, it can be easily adapted to the reality of other countries, with the necessary changes in fields and rules. This is one of the greatest advantages of all procedures having been implemented in open source software, facilitating the adaptation and optimization of this type of application. Funding: The work was supported by the Portuguese Foundation for Science and Technology (FCT) project UIDB/04683/2020-ICT (Institute of Earth Sciences). It was also supported by FEDER (Fundo Europeu de Desenvolvimento Regional) funds through the COMPETE 2020 Operacional Programme for Competitiveness and Internationalisation (POCI), and by Portuguese funds through FCT (Fundação para a Ciência e a Tecnologia) in the framework of the project POCI-01-0145-FEDER-030766 (" First IndiQare-Quality indicators in primary health care: validation and implementation of quality indicators as an assessment and comparison tool").

Institutional Review Board Statement: Not applicable.
Informed Consent Statement: Not applicable.

Data Availability Statement:
The data presented in this study are available in Supplementary Materials.