{'fraction_non_alphanumeric': 0.029038660683465653, 'fraction_numerical': 0.014886089057645841, 'mean_word_length': 5.265747499324141, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Enhancing Electronic Health Record Data with Geospatial Information.

Electronic Health Record (EHR)-derived data is a valuable resource for research, and efforts are underway to overcome some of its limitations by using data from external sources to gain a fuller picture of patient characteristics, symptoms, and exposures. Our goal was to assess the utility of augmenting EHR data with geocoded patient addresses to identify geospatial variation of disease that is not explained by EHR-derived demographic factors. Using 2011-2014 encounter data from 27,604 University of Pennsylvania Hospital System asthma patients, we identified factors associated with asthma exacerbations: risk was higher in female, black, middle aged to elderly, and obese patients, as well as those with positive smoking history and with Medicare or Medicaid vs. private insurance. Significant geospatial variability of asthma exacerbations was found using generalized additive models, even after adjusting for demographic factors. Our work shows that geospatial data can be used to cost-effectively enhance EHR data.


Introduction
Electronic Health Records (EHRs) have become an invaluable resource for precision medicine research, including the creation of genetic and tissue biobanks [1][2][3][4][5] , understanding phenotypes and comorbidity relationships in real-life populations [6][7][8] , and recruiting subjects for clinical trials and health services studies [9][10][11] . Additionally, EHRs are necessary for the implementation of precision medicine in clinical practice and to enable patient-centered efforts to improve healthcare [12][13][14][15] . The success of EHR-derived data research is driven in part because EHR data offers a convenient and low-cost way to obtain detailed cross-sectional or longitudinal information for large numbers of subjects. EHR data does have limitations, however, including its biased nature compared to that of traditional epidemiological studies and the narrow insights it provides into patients' lives. To overcome these limitations, efforts are underway to augment EHR data with complementary personalized data from sources such as social media, portable sensors, and mobile phone apps [16][17][18][19][20] . Publicly available geospatial data for a wide range of demographic and environmental factors is another resource to cost-effectively gain insights from EHR data in an effort to understand diseases at the community and individual levels 21,22 .
Asthma is an episodic inflammatory lung disease characterized by airway hyperresponsiveness that affects over 25 million Americans, including 18.7 million adults 23 . Exacerbations, which are episodes of worsening asthma symptoms requiring the use of systemic corticosteroids to prevent serious outcomes, are a major cause of morbidity and health care costs 24,25 . While asthma cannot be cured, national treatment guidelines exist for preventing exacerbations that are able to control symptoms in most patients 26 . Despite the availability of these treatment options that are efficacious in clinical trials, asthma prevalence and exacerbation rates in real-life U.S. populations remain very high with persisting and marked disparities by gender, race/ethnicity and socioeconomic status 27,28 . These and other factors-poor housing conditions, outdoor and indoor pollutants, educational attainment, health literacy-that are related to asthma exacerbations vary in their geospatial distribution [29][30][31] .
To effectively make progress toward understanding demographic and environmental factors that influence asthma exacerbations in real-life populations, EHR data is valuable as a longitudinal repository of many events affecting diverse populations. In combination with patient address information, EHR data can be augmented to include highly relevant and publicly available asthma-related geospatial data, including air quality, pollen, ultraviolet sensitivity index levels, proximity to major sources of pollution, and housing codes. Here, we analyze the geospatial distribution of asthma patients who received care in the University of Pennsylvania Health System (UPHS) to identify regions in the greater Philadelphia area where patients with frequent exacerbations live and lay a foundation for future studies that identify social and environmental factors associated with these areas and their relationship with genetic and biomarker data.

Study population.
Our study population was obtained from Penn Data Store (PDS), a repository of EHR-derived data that is integrated from across multiple systems within UPHS. PDS supports medical research and patient care initiatives through the health system and has been used in the past to study atrial fibrillation and acute kidney injury 10,11 . We obtained de-identified patient-level data for adult (i.e. aged 18 years or older) encounters that occurred between January 1, 2011 and December 31, 2014 and included an asthma International Classification of Disease, Ninth Revision (ICD-9) diagnosis code (i.e., 493*). Variables extracted included codified demographic information (i.e., gender, age, race/ethnicity, height and weight measures, financial class, smoking history, admission date and type (outpatient visit, emergency department visit, observation, or hospitalization), all ICD-9 codes noted during the encounter, and patient addresses. Medications prescribed during encounters were obtained from codified entries as well as NLP-extracted values from inpatient notes. For reference demographics, we obtained counts of the race/ethnicity and gender of all PDS patients encountered during the study period. The University of Pennsylvania Institutional Review Board approved our study (protocol number 824789).
For the current study, we included patients who were (1) less than 80 years old at first encounter, and (2) were followed for at least 3 years during the study period, as determined by earliest and latest encounter dates among all visits (i.e., visits with or without asthma ICD-9 codes). The latter criterion was implemented to increase the likelihood that study patients resided in the area during the study period such that fewer asthma encounters reflected less exacerbations/severe disease, rather than patients having moved elsewhere. We limited our study to patients who were non-Hispanic white and non-Hispanic black or African American, as over 91% of patients fell within these categories. Hereafter, we refer to these categories as white and black. To reduce erroneous weight and height entries, only weight measures within 80 and 700 pounds and height measures within 48 to 84 inches were kept. Patient weight was computed as the mean value of the patient's measures that were within 10 percent of the patient's median weight, and height as the mean of the patient's measures that were within 5 percent of the patient's median height. BMI was computed as the mean weight over mean height squared times 703.0704 and re-leveled into four groups: not overweight or obese (<25.0 kg/m 2 ), overweight (25.0 to <30.0 kg/m 2 ), grade 1 obese (30.0 to <35.0 kg/m 2 ), grade 2 obese (35.0 to <40.0 kg/m 2 ), grades ≥ 3 obese (>40.0 kg/m 2 ). Age was calculated as the patient's age at first encounter. Financial class was obtained from a codified billing field used at each patient's most recent hospital encounter, and was re-leveled into three groups: Private Insurance, Medicare, Medicaid.
Asthma exacerbation definition. Encounters were classified as asthma exacerbations if they had a primary ICD-9 code for asthma (i.e., 493*) and included prescription of an oral corticosteroid. Cases were defined as those patients who had at least one asthma exacerbation during the study period. Controls were defined as those who had no asthma exacerbations.

Statistical analysis.
Statistical analyses were conducted in R 32 . To determine whether demographic factors (i.e., gender, race, age at first encounter, BMI, smoking status, financial class) were associated with asthma exacerbations, we used logistic regression analyses. Crude odds ratios (ORs) were computed with complete cases for each variable individually, and all factors were included in a multivariate logistic regression model from which adjusted ORs were determined. Differences in gender and race distributions between our study population and all UPHS patients were assessed via Chi-squared tests.
Geocoding. Patient addresses were geocoded to geographic (longitude and latitude) coordinates using the Google Maps Geocoding API run in the R environment 32 . Addresses were input as a character string in the format: [house number] [street name], [zipcode], and outputs received included geographic coordinates as well as output addresses (street address, city, state, and zip) corresponding to the geocoded coordinates. Apartment and unit numbers were omitted from the input string when present. Geocoding accuracy was determined by comparing input and output zipcodes, whereby a mismatch indicated an incorrect input address, or one not recognized by Google Maps. Because the aim of this study was to determine exacerbation risk at fine spatial scales, addresses were only included if they were correctly geocoded to a street address. Addresses that were only geocoded to the street level (i.e. with no house number), PO boxes, and incorrectly geocoded addresses were excluded from further analysis. Geospatial analysis. Spatial analysis was performed using a generalized additive model (GAM), which can estimate the log odds of an outcome as a function of location with adjustment for covariates 33,34 . The GAM takes the form logit[p(x,y)] = γ*z + S(x,y), where logit[p(x,y)] is the log odds of exacerbation at latitude and longitude coordinates (x, y), z is a vector of covariates with corresponding regression parameters γ, and S(x,y) is a bivariate smooth of latitude and longitude that represents the spatial variation unexplained by the covariates. The term S(x,y) was smoothed using a loess function, a locally-weighted regression smoother which adapts to local variation in point density. The amount of neighboring points utilized by the loess is determined by a span size optimized by minimizing the Akaike Information Criterion. We used GAM to determine the log odds of asthma exacerbation on a grid of 10,000 points arranged across the study region. The log odds at each point was converted to an odds ratio by using the odds of exacerbation of the entire study population as a reference group 34 . Our model included all covariates found to be significant predictors of exacerbation as determined by multivariate logistic regression pvalues <0.05. While data was complete in the gender, race, age, and financial class variables, BMI measures were missing for 19% of patients and smoking status was missing in 3% of patients. Missingness of BMI was due to lack of height, rather than weight, measures in patients. To maximize the number of subjects used in spatial analysis, we created "missing" categories for BMI and smoking status. A global test was performed to test the null hypothesis that exacerbation odds did not depend on geographic location by running 999 permutations of the assignment of cases and controls over all patient addresses while keeping the total number of cases and controls the same and preserving the covariate information 34 . For the observed data and each of the subsequent permutations, a deviance statistic was calculated as the difference of the deviances of the model with the smoothing term and the model without the smoothing term. The p-value of the global test is the rank of the deviance statistic of the observed data relative to the permutations divided by 1000. Given that the global test indicated geographic location to be a significant predictor of exacerbation, a local test for significance was performed to identify areas of significantly increased and decreased odds of exacerbation. The model fitted to the permutations was used to produce a distribution of log odds at each point on the grid. Points that ranked in the upper or lower 0.5% of the permutation distributions were defined as "hot spots" (areas of elevated odds) or "cold spots" (areas of decreased odds). Spatial analyses were performed with the R package MapGAM, and street maps of the study regions were created using the R package ggmap 35,36 .

Results
We obtained EHR-derived data for 51,178 patients who utilized UPHS between 2011 and 2014 and whose visits included ICD-9 codes for asthma. Compared to all patients who utilized UPHS during this time, asthma patients were more likely to be female and black [ Table 1]. Of all asthma patients, 27,604 white or black patients met our inclusion criteria, including having events spanning at least 3 years between 2011 and 2014, and were selected for further study.

Characteristics of asthma patients with exacerbations.
Of the 27,604 asthma patients who were followed ≥ 3 years for the 4-year study period, 2,773 were cases who had at least one exacerbation, and 24,831 were controls who had no exacerbations. The characteristics of cases and controls are presented in Table 2. According to univariate analyses, the gender distribution of cases and controls was not significantly different, but cases were significantly more likely than controls to be black, middle-aged or older, overweight or obese, have positive smoking history, and have Medicare or Medicaid rather than Private Insurance (p<0.05) [ Table 3]. In multivariate analysis, female gender, black race/ethnicity, older ages, grade ≥3 obesity, passive or quit smoking history, and Medicare or Medicaid financial class vs. Private Insurance were independent predictors of asthma exacerbations [ Table 3].
Geospatial distribution of asthma exacerbations. The geospatial distribution of study patients and location of UPHS facilities (i.e., hospitals and clinics) are displayed in Figure 1. Patient density was spatially heterogeneous and generally decreased with distance from UPHS provider sites. To ensure we had an adequate sample size to appropriately assess differences in exacerbation by location, areas with low patient density were excluded from analyses. The final study region was defined as a square area measuring 38 km on each side and centered over the bulk of patients. Of the 27,604 subjects in our study population, 26,402 had addresses that could be appropriately geocoded for geospatial analysis, and 74% of these address locations fell within the study region. GAM analysis with data from the resulting 19,599 patients (1,892 cases and 17,707 controls) found that asthma exacerbations were associated with geographic location. The global test statistic against the null hypothesis that exacerbation odds did not depend on location was highly significant (p <0.001) suggesting that even after adjusting for covariates (i.e. gender, race, age, BMI, smoking status, financial), asthma exacerbations were highly spatially correlated. Local tests identified two areas with significantly increased and two with significantly decreased exacerbation rates (p <0.01) [ Figure 2]. Cold spots occurred in North Philadelphia and the bordering region of Camden, NJ as well as the Southwest suburbs of Bryn Mawr, Ardmore, Penn Wynne, and Bala Cynwyd. Hot spots were found in Southwest Philadelphia and in/near Media, PA.

Discussion
Asthma prevalence and exacerbation disparities by race/ethnicity and socioeconomic status are a well-known problem in the US 27,28 . Factors contributing to them include non-modifiable factors such as differences in genetic ancestry [37][38][39] , and modifiable factors such as poor health, disease risk factors, medication non-adherence, health literacy and limited access to health care due to social, economic and environmental disadvantages 30,40,41 . U.S. racial/ethnic minority groups disproportionately fall within low socioeconomic status categories, resulting in difficulty separating health factors that are heritable from those that are socioeconomic and environmental 42,43 . Gender is another documented risk factor for adult asthma, with women disproportionately affected compared to men 28 . The characteristics of our study's asthma patients relative to all UPHS patients were consistent with these trends: women and black patients were significantly over-represented in the asthma sample.
The demographic factors we identified as associated with cases (i.e. asthma patients with exacerbations) vs. controls (i.e. asthma patients without exacerbations) were largely consistent with previous reports on exacerbation disparities: women were more likely to have exacerbations than men, black patients were more likely to have exacerbations than white patients, and patients with Medicaid-a crude indicator of low socio-economic status-were more likely to have exacerbations than those with Private Insurance. Our findings were also consistent with the growing body of literature   on the relationship between obesity and asthma 44 , and the known association between smoking and increased risk of asthma 45 . Patients with asthma exacerbations were more likely to be Grades ≥ 3 obese vs. all other BMI categories in the adjusted analysis, and to have passive or previous smoking history. Although BMI was missing in ~18% of subjects, the missing rate was comparable between cases and controls, suggesting our results would hold if this data were available. In future work, we will explore imputation approaches for height and use of weight measures alone to reduce potential bias due to missing BMI measures. Interestingly, current smoking status was not significantly associated with exacerbations in adjusted analyses. Whether this association represents bias in reporting or extracting of smoking status for our subjects cannot be determined from our existing data, but future attempts to recontact UPHS subjects for other projects may provide better estimates of accuracy of codified smoking status in the EHR relative to that provided via interviews and more thorough questionnaires. The strongest factor associated with exacerbations was age: older adult patients (in categories >33 years of age) were 1.88-2.23 times more likely than younger patients (aged 18-33 years) to have exacerbations. The significance of this relationship is likely confounded by other comorbidities, as older adults with asthma are more likely to have other diseases, including chronic obstructive pulmonary disease 46 . In ongoing work, we are performing detailed comorbidity analyses, which might clarify our observed relationship between age and asthma exacerbations.
Beyond measuring demographic associations, we showed that EHR-derived data was enhanced by inclusion of patient-specific geospatial information, as we were able to identify geospatial patterns of asthma exacerbations in the greater Philadelphia area that were independent of known exacerbation predictors. Because asthma rates in Philadelphia have been estimated to be over twice as high as the national average, it is likely that local environmental factors strongly influence disease prevalence and severity 47 . Our results indicate that exacerbation risk varies significantly across the greater Philadelphia area, with predicted odds ratios for the study region ranging from 0.4 to 1.8 and the presence of significant hot spots and cold spots. Whether these differences truly reflect environmental or exposure variability vs. biases in our data remains a question. Independent replication studies using other patient populations in Philadelphia would strengthen our ability to make conclusions based on our current spatial results. Nonetheless, our results raise some interesting hypotheses. For example, an oil refinery is located approximately 2 km south of the hot spot identified in Southwest Philadelphia, where asthma patients were up to 1.6 times more likely to have had an exacerbation compared to the total study region. Thus, it is possible that particulate matter pollution near the refinery is greater than in regions further from it, resulting in increased asthma exacerbations in the nearby area. The two largest cold spots identified corresponded to one of the wealthiest regions in the Philadelphia area (the southwest suburbs of Bryn Mawr, Ardmore, Penn Wynne, and Bala Cynwyd) and one of the poorest (North Philadelphia and neighboring Camden, NJ). In future studies, we will use census data to adjust for socioeconomic status by census block and better understand what factors may be contributing to decreased exacerbations in these areas.
Our data is subject to various limitations, beyond those inherent in EHR-derived data (e.g., missingness and entryerror of measures, phenotyping errors due to use of crude classification schemes such as ICD-9 codes for disease diagnosis and designation of primary ICD-9 codes and oral corticosteroid prescription for exacerbation definition, and ascertainment bias such as including only subjects who more frequently use the healthcare system and are, thus, more likely to be unhealthy). The EHR-derived data we obtained from PDS only records the most current address for each patient, which we used as a proxy for patient's residence over the three-to four-year study period. We limited our analysis to patients with at least three years of UPHS encounters to (1) increase the likelihood that all asthma patients received care within UPHS, and thus, decrease the probability that controls lacked a record of exacerbations due to their seeking care outside of the UPHS system, and (2) to decrease the probability that patients moved out of the Philadelphia area during the study period. Nonetheless, the EHR-derived address data is limited in that we are unable to capture whether patients moved within Philadelphia or actually resided in a location other than the reported address during the study period. In ongoing work, we are incorporating measures related to type of patient housing, neighborhood migration estimates, and density of healthcare providers by location, as well as performing analyses of exacerbation severity to further identify and explicitly address these potential biases.
Although capturing more thorough patient information via wearable sensor devices and other health information technologies will be useful to overcome some of the biases our data is subject to 17 , the integration of geospatial information that is readily captured via patient geocodes offers a low-cost and convenient alternative to more fully characterize EHR-derived patient information.

Conclusion
We have demonstrated the utility of integrating geospatial information with EHR data to uncover spatial variability of health events. Even after adjustment for demographic factors that are known asthma risk factors, the geospatial distribution of asthma exacerbations varied significantly across Philadelphia and surrounding regions. Further study of the regions with increased/decreased exacerbations offers promise to understand environmental factors that influence asthma and tailor interventions to effectively decrease exacerbations.