HealthyLifeHRA: Web Application

by

NING XIA

Submitted in partial fulfillment of the requirements

for the degree of Master of Science

Thesis Advisor: Dr. Gultekin Ozsoyoglu

Department of Electrical Engineering and Computer Science

CASE WESTERN RESERVE UNIVERSITY

August, 2014

CASE WESTERN RESERVE UNIVERSITY SCHOOL OF GRADUATE STUDIES

We hereby approve the thesis of

Ning Xia

candidate for the Master of Science

degree*.

committee chair Gultekin Ozsoyoglu, Ph.D.

Andy Podgurski, Ph.D.

Joseph Sudano, Ph.D.

Adam Perzynski, Ph.D.

date of defense June 16th, 2014

*We also certify that written approval has been obtained for any proprietary material contained therein.

2

Acknowledgements

First of all I would like to express my wholehearted gratitude to my advisor, Prof.

Gultekin Ozsoyoglu for his devoted guidance, encouragement and great mentorship throughout my time as a master’s student. I have learned a lot while under his supervision.

I would also like to thank the members of my master’s thesis defense committee:

Prof. Andy Podgurski, Prof. Adam Perzynski, Prof. Joseph Sudano and Prof. Meral

Ozsoyoglu. The time you have invested into reading my thesis and serving on the committee is much appreciated.

I would like to thank the software members of the HRA team Eamon Johnson,

Xiangcao Liu, Umang Banugaria, Tiancheng Wu, Peng Li, Can Tuzla and Pinar

Uskaner, as well as the team from Metro Health, Prof. Adam Perzynski, Prof. Joseph

Sudano, Sandra Andrukat, and Misty Harris, for their help with the development of the HealthyLifeHRA application for which this thesis also contributes to.

Last but not least, I would like to recognize the support that my friends and family have provided me throughout my graduate studies.

This thesis and the HealthyLifeHRA project was supported by an Agency for Health

Research and Quality research grant: AHRQ:1R01HS020919, Joseph Sudano, PhD,

Principal Investigator.

3

Table of Contents

Page

Acknowledgements ...... 3

Table of Contents ...... 4

List of Figures ...... 8

Abstract ...... 10

Chapter 1 Introduction ...... 12

1.1 Background...... 12

1.2 Overview ...... 13

1.3 Contributions ...... 16

1.4 Organization ...... 17

Chapter 2 HealthyLifeHRA Application Requirements and Database Design... 19

2.1 Application Requirements ...... 19

2.2 HealthyLife HRA Application Data Model Design ...... 23

2.2.1 ER Data Model ...... 23

2.2.2 Transforming ER Model to Relational Model ...... 44

Chapter 3 HealthyLifeHRA Application User Interface ...... 56

3.1 Information Pages ...... 60

3.1.1 Home Page ...... 61

3.1.2 About Us Page ...... 62

3.1.3 How It Works Page ...... 63

3.1.4 For Clinicians Page ...... 65

4

3.2 Login/Registration Pages ...... 66

3.2.1 Registration Page ...... 67

3.2.2 Login Page ...... 70

3.2.3 Forgot Password Page ...... 71

3.2.4 Reset Password Page ...... 73

3.3 Questionnaire Pages ...... 73

3.3.1 Getting Started Page ...... 74

3.3.2 Questionnaires ...... 77

3.3.3 HRA Reporting ...... 83

3.4 Administration Interface ...... 88

Chapter 4 HealthyLifeHRA Application Evolution ...... 95

4.1 Introduction ...... 95

4.2 HealthyLifeHRA Version 1 ...... 96

4.3 HealthyLifeHRA Version 2 ...... 98

4.4 HealthyLifeHRA Version 3 ...... 100

Chapter 5 HealthyLifeHRA Web Application Development ...... 102

5.1 HealthyLifeHRA Model-View-Controller--Basics ...... 103

5.2 Back-end Server Implementation ...... 107

5.2.1 Play Model Implementation ...... 107

5.2.2 Risk Computation Engine ...... 113

5.2.3 RESTful Web Service Development ...... 118

5.2.4 HTTPs Based Communication with Play Framework ...... 119

5.2.5 Security and Password Encryption ...... 121

5.3 Front-end Interface Implementation ...... 124

5

5.3.1 HTTP Routing ...... 124

5.3.2 Controllers ...... 125

5.3.3 Template Engine...... 127

5.3.4 Templates ...... 130

5.3.5 Information Pages...... 132

5.3.6 Login/Registration Pages ...... 133

5.3.7 Questionnaire Pages ...... 136

5.3.8 Administration Area ...... 144

Chapter 6 HealthyLifeHRA Stand-Alone Desktop Application Development . 146

6.1 Background...... 146

6.2 Server Implementation ...... 147

6.3 Creating a MySQL Database and a User ...... 154

6.4 User Interface Implementation ...... 156

6.5 Integration ...... 157

Chapter 7 Conclusion and Future Work ...... 162

7.1 Conclusion ...... 162

7.2 Future Work ...... 165

Appendices ...... 167

Appendix A - Facility Type Enum: ...... 167

Appendix B - Organization Type Enum ...... 167

Appendix C - Provider Type Enum ...... 167

Appendix D – Provider Access Level Enum ...... 168

Appendix E – Mortality Table ...... 168

Appendix F – HealthCategory List ...... 188

6

Appendix G – QuestionGroup List ...... 189

Appendix H – Response Type (AnswerPart) ...... 192

Appendix I – Question Skip Pattern ...... 201

Appendix J – Feedback Message Rules ...... 205

Appendix K – Typing Validation Rules ...... 209

Appendix L – MySQL Installation ...... 216

Appendix M – hra_initial. ...... 217

Appendix N – Database Creation Commands ...... 277

Bibliography ...... 290

7

List of Figures

Figures Page Figure 2.1 ER Diagram ...... 25 Figure 2.2ER diagram for mortality table entities ...... 42 Figure 2.3 Database Schema ...... 45 Figure 3.1 Home Page Mock-up ...... 57 Figure 3.2 System Flowchart ...... 59 Figure 3.3 Home Page ...... 61 Figure 3.4 About Page ...... 63 Figure 3.5 How It Works Page ...... 64 Figure 3.6 For Clinicians Page ...... 65 Figure 3.7 Registration Page ...... 67 Figure 3.8 Registration Input Errors ...... 68 Figure 3.9 Guest Registration ...... 69 Figure 3.10 Login Page ...... 70 Figure 3.11 Login Page Error ...... 71 Figure 3.12 Forgot Password Page ...... 72 Figure 3.13 Resetting Password Email Sent ...... 72 Figure 3.14 Reset Password Page...... 73 Figure 3.15 Getting Started Page ...... 75 Figure 3.16 Getting Started Page with Invalid Inputs ...... 76 Figure 3.17 Questionnaire Page ...... 77 Figure 3.18 Questionnaire Data Models and Relationship to Display ...... 79 Figure 3.19 Navigable Category List...... 80 Figure 3.20 Multi-part Question ...... 81 Figure 3.21 Question with Required Response ...... 81 Figure 3.22 Feedback Message ...... 82 Figure 3.23 Feedback for Out-of-range Answers ...... 82 Figure 3.24 Questionnaire Summary ...... 83 Figure 3.25 Report Page ...... 84

8

Figure 3.26 User Friendly Instruction ...... 85 Figure 3.27 Recommendations to Patient ...... 86 Figure 3.28 Response Explanations ...... 86 Figure 3.29 Action Plan ...... 88 Figure 3.30 Admin Login Window ...... 89 Figure 3.31 Admin Interface Home...... 89 Figure 3.32 List of Recoreds ...... 90 Figure 3.33 Record Editing ...... 91 Figure 3.34 Evaluating Questionnaires Page ...... 91 Figure 3.35 Compare Results ...... 92 Figure 3.36 Risk Recalculation ...... 93 Figure 4.1Client Risk Engine based HealthyLifeHRA System Architecture ...... 98 Figure 4.2 Server Risk Engine Based HealthyLifeHRA System Architecture ...... 100 Figure 5.1 HTTP Request Path of Play Framework Applications...... 105 Figure 5.2 Sample ER Diagram ...... 111 Figure 5.3 Risk Calculation Steps ...... 115 Figure 6.1 Folder Structure ...... 148 Figure 6.2 Platypus Configuration ...... 157 Figure 6.3 Mac OS App ...... 158 Figure 6.4 Bat to Exe Convert Configuration ...... 160 Figure 6.5 Windows App ...... 161

9

HealthyLifeHRA: Web Application

Abstract

by

NING XIA

A health risk assessment (HRA) system is an important tool for helping people realize what lifestyle changes they should have in order to live a healthier and longer life, and what benefits they can have by doing the right things. In this thesis, we discuss the design and implementation of various components of the web-based version of a health risk assessment system, called the HealthyLifeHRA system, which is being developed by a multi-institutional team of researchers.

The HealthyLifeHRA system allows a user to take a questionnaire, and produces a visualized report with statistics, messages, pictures, and bar charts about the user’s health status, that highlights potential mortality risks of the participant. Questions in the questionnaire include basic demographic information, epidemiologic data, and life-style information. This tool can be used by health care providers to communicate with patients on their health status. And individual users can use it to

10

become aware of their health situation, and, perhaps, take early measures to deal with various higher-level mortality risks in their lifestyles.

The HealthyLifeHRA family consists of a website version, a standalone version, an iPad version and an Android tablet version. Web-based version of the HealthyLifeHRA family takes advantage of various computing and web technologies, and provides multiple HRA client systems for use in primary care clinical settings. The web-based version includes a client-side interface library, a client-side report generation library and a server-side risk computation engine.

11

Chapter 1

Introduction

1.1 Background

Research studies [1] [2] [3] [4] show that lifestyle factors cause over half of the death before age 65. These research studies also help people realize the benefits that they can possibly have by making efforts to reduce lifestyle-related death risks.

In order to reduce such risks, it is essential to understand how lifestyle factors contribute to death risks of a person and how these lifestyle-related factors can be modified or improved to reduce these health risks. The health risk appraisal or assessment (HRA) can be an important tool in evaluating the impact of these lifestyle factors and current health conditions of an individual.

The Centers for Disease Control (CDC) and Prevention / Carter Center Health Risk

Appraisal Update Project, completed in 1987 [5] was a major contribution to the science of HRA. From 1987 to 1991, the Health Risk Appraisal program was distributed in the public domain through the Carter Center HRA program directed by Dr. Edwin B. Hutchins. The Carter Center HRA became the standard from which most current HRAs have been derived. In 1991, Dr. Edwin B. Hutchins established

The Healthier People Network, Inc. (HPN) as a non-profit corporation to continue the work originated at the CDC. HPN updated the HRA in 1997, by adding a version

12

for elderly populations. Over the past two decades, the HPN-HRA has been used by about 5000 health providers. There are also several commercialized HRA systems such as Sharecare [6] and [7] have been developed in recent years.

There is a need for the use of HRA for all groups of people, especially among racial/ethnicity minority groups, the uninsured, the poor, or those with limited health literacy. A HRA tool that can easily provide convenience for the general public becomes an urgent.

1.2 Overview

This thesis describes the design the architecture of a HRA application family called

HealthyLifeHRA, the implementation of a HRA website and the implementation of stand-alone desktop applications. The HRA website, stand-alone desktop applications along with (other team members’ contributions) HealthyLifeiPad and

HealthyLifeAndroid, forms the HealthyLifeHRA application family. Although each specific application in the HRA application family has its own specific variations, all applications share a common design style and common main components. In the rest of the document, we refer to this “common application” as the HRA application.

HealthyLifeHRA family of applications provides individuals (hereafter, called the participant, user, or patient) a questionnaire with a list of questions, and calculates, based on the answers, patients’ risk factors for 44 different causes of death. The

HRA application maintains questionnaire answers and computed risks indefinitely

13

for future trend analysis, and also produces multiple reports with messages, pictures and bar charts over a range of calculated statistics about the patient’s health status, which highlights potential death risks to the patient. The questions in the questionnaire include basic demographic information, epidemiologic data, and lifestyle information. Since the application tracks all questionnaire answers over time, health providers can use this tool to communicate with patients on their current health status as well as their health risk changes, and individual users can use it to stay aware of their health situation in different time periods, and, thus, take early measures to deal with risks in their lifestyles. Health providers may suggest useful actions for the patient to improve their health situation.

The design and implementation of the HRA web application over the last three years has been an evolving process, resulting in three distinct versions. As our understanding grew about the needs of the HRA application and the relevant technology evolved, we have responded by revising our software architecture and rolling out a new version of the application after thoughtful discussions of the evolving requirements and challenges. As an example, we originally designed static questionnaires with a typical non-historical relational database with no provenance information on any attribute values. It became clear that all of these decisions have to be reversed, resulting in new versions. The evolution of the HRA system is discussed in detail in Chapter 4.

Since the questionnaire interface is the core of our HRA system, we thrive to design a very flexible questionnaire representing method during the development process.

14

We started from the original simple template based questionnaire interface. It was very simple, but also not very extensible and not very convenient to change question’s position in a questionnaire. It was hard to customize and generate multiple questionnaires with existing questions. These new requirement prompted us to explore more flexible ways of customizing and presenting questionnaires. The notion of “positionless question” has been introduced to achieve this goal where each question had an identifier within its own health category, and could be placed into any (consistent) position within a questionnaire. This was necessary since each question is relatively independent of most of the other questions, and can be used at different questionnaire positions for generating multiple questionnaires.

We use a historical database for auditing needs, as medical institutions are required to maintain all of their patient data for certain time periods. In addition, we employ full data provenance as, over the time, questionnaire questions may change, risk computation formulas and auxiliary tables may vary, and all these changes are recorded and maintained in the database for consistent trend analysis over patients’ lifetimes.

For traditional paper based questionnaires, patients have to read specific instructions in order to proceed to the questionnaire properly without wasting time on unnecessary questions. These instructions could be misleading or easy to overlook, especially for older people. Therefore there was a need of introducing automatic skip patterns for questions or question groups, according to patients’ information and answers to previous questions. In order to ensure that the system

15

works properly on the patients’ input, it is necessary to validate the input. We have also designed a feedback message library to give some messages to patients based on their questionnaire responses.

We keep patient account safety in mind when design and develop our applications.

Several efforts have been made during our development process. We design and implement security mechanism including: authentication with built in secure module of Play framework, password encryption with salted password hashing algorithm and secure client-server HTTP connection.

We take advantage of web development technologies to create stand-alone desktop application for doctors who want to ask their patients to take HRA questionnaires and manage all their patients’ questionnaire data and information in a relatively closed environment other than the Internet.

1.3 Contributions

Contributions of this master thesis are listed as follows, MetroHealth and Case team members made tremendous contributions to the interface design:

 Design and implement the HealthyLifeHRA website application architecture

and interface.

 Design and implement the HealthyLifeHRA web application interface, feedback

messages and type validation.

16

 Design and implement the database data model and data communication

between the client and the server.

 Design and implement the security mechanism for enforcing patient privacy,

account safety and The Health Insurance Portability and Accountability Act of

1996 (HIPAA) [8] compliancy.

 Design and implement desktop stand-alone applications.

 Collaborate with other team members to develop the risk calculation engine

and report generation engine.

 Generate and email PDF version of the report.

1.4 Organization

This thesis is organized into seven chapters. Chapter 2 describes the HealthyLifeHRA application requirements specifications, and the data model design. The data model design part includes the ER data model design and the transformation of the ER model to the relational model. In Chapter 3, we present the design details for four function groups of our HealthyLifeHRA web application, namely, information pages, login/registration pages, questionnaire pages and administration pages. Chapter 4 discusses our HealthyLifeHRA application evolution. In this chapter, we list the issues we have encountered, the new requirements we have had with each version, and the modifications that we have made for each version. Chapter 5 presents the

HealthyLifeHRA web application development details, and discusses the technologies that we use for developing the web application. Chapter 6 describes the

17

HealthyLifeHRA desktop application development. Chapter 7 concludes, and lists the future work.

18

Chapter 2

HealthyLifeHRA Application Requirements and

Database Design

2.1 Application Requirements

The HealthyLifeHRA application shall have the following requirement specifications.

1. For patients, reports are tailored to provide information on the measure of

“risk age”, diet, physical activity levels, preventive services use, and many

other aspects of health improvement or maintenance.

2. HRA shall focus provider’s “attention” on aspects of care that patients would

most benefit from. For example, an HRA that included stages of change items

shall help providers get a sense of where the patients are regarding health

behavior changes that are likely to improve their overall or specific condition

risk, and whether or not to engage in intense educational interventions for

one or more changes, gently prod the patient along to the first or next stage

of change, or to table the discussion until the patient expresses a desire to

change.

3. The application shall have following type of users: patient and user. The user

refers to any user that will be able to access part of admin interface and

19

manage some of the admin functionalities for authorization purpose. The

user can be categorized into provider and software administrator.

4. The application shall allow for, optionally, the registration and login of

patients. This involves password-based authentication. The password shall

be encrypted and the website shall enable HTTPS connection to enforce the

maximum security for the patient’s account.

5. Patients shall take questionnaires, and questionnaires shall be kept in a

historical database. Historical database refers to a database with the

capability to retain in the database all users, questionnaires, and

(questionnaire) responses, risk computation formulas/tables forever.

6. The database shall maintain data pedigree information or have full data

provenance capability. Full Data Provenance refers to the capability to

capture and maintain data provenance/lineage/pedigree for all data—except

display formatting data--in the database. That is, over time, questionnaire

questions may change, risk computation formulas may change, auxiliary

tables used for risk computations may change; and, yet, all of these changes

are recorded and maintained in the database.

7. Patients shall have the ability, if permitted by the doctors, to login and access

patient and questionnaire information (if they are registered users).

8. Users with multiple roles shall login and access patient information as well as

questionnaire information (content, date/time, place, etc.). Each specific role

20

for the user shall access certain part of the administration area if

authenticated via the login process.

9. Users with different roles shall have many different types of search

capabilities involving questionnaires of patients.

10. Doctors shall access questionnaire information per questionnaire and per

specific question responses across multiple questionnaires of the same user.

11. Doctors shall obtain statistical summary information of the questionnaires

for given a user or a set of user names/ids.

12. The system administrator shall be allowed to make modifications or even

delete questionnaire-related records.

13. Questionnaire response options shall be provided in the forms of checkbox,

filling-in or drop-down alternatives, whichever is appropriate.

14. Since the questionnaire has many questions, one single page is not sufficient

to hold all of the questions; thus, we break all the questions into several

health categories and this health category is also used for displaying

questions page by page. There shall be a forward and backward link to allow

the user to browse the previous questions. After the user answers all the

questions before submitting the questionnaire, the pages shall show the

current status for the questionnaire.

21

15. Recent research on similar tools suggests that the visual communication of

risk via outcome wheels, visual roulette wheels and pie charts is superior to

communication of risks using relative risks, probability coefficients or other

descriptive statistics (Cunningham 2008; Hoffman, Wilkes & Day 2006). HRA

results shall be displayed in the forms of visual communication of risk via

outcome wheels, visual roulette wheels and pie charts, or graphs, as elected

by the administrators, doctors, and/or patients.

By following the application requirement specifications, we identify the following database requirement specifications.

1. The HealthyLifeHRA database shall be maintained by users as specified in the

application requirement specification item 3: user, provider and software

administrator.

2. Users shall have the attributes id, name, email and password.

3. Patients shall have attributes: id, name, email, password, date of birth,

gender, address, zip code and phone number.

4. Patient questionnaires shall be maintained in the database, and shall not be

deleted, due to the historical database requirement of the application.

5. The database shall keep “create date” and “dropped from use” provenance

information for all attributes and relations to fulfill the data provenance

requirement.

22

2.2 HealthyLife HRA Application Data Model Design

2.2.1 ER Data Model

We use the ER Data Model [9] to capture the semantic contents of the database. The

ER diagram is shown in Figure 2.1. Notice that this ER diagram does not include the risk computation entities.

Our HealthyLifeHRA database has two design goals:

1. The database shall provide the capability to retain all the historical

information about patients, users, questionnaires, (questionnaire) answers and

risk calculation formulas/tables in the database. Put another words, the

database is a historical database (except for some display-related meta-entity

information), as far as the following temporal changes are concerned.

 No “instance” information is ever deleted. As an example, questionnaires,

patients, risk values, etc., never get deleted, but, if they are not in use, they

are marked as “not in use”.

 Risk computation formulas are never deleted. Whenever a formula is

changed, old versions are labeled with a time range, specifying when the

formula was in use. This way, any old questionnaire response and its risk

computations can be regenerated and verified, if need be.

23

24

Figure 2.1 ER Diagram

 No mortality/variable tables used for risk computations are ever deleted.

Whenever, say, a population mortality table gets revised, the old version

is marked as “not in use”, and labeled with a time range, specifying when

the table was in use, and, then, it is kept in the database.

This capability is needed for auditing purposes.

2. The database shall have the capability to maintain data

provenance/lineage/pedigree for all data—except display formatting data in

the database. Capturing provenance allows for trend analysis studies over

questionnaires with changing questions/risk computation formulas/risk

computation-related tables, etc. That is, over time, questionnaire questions

may change, risk computation formulas may change, auxiliary tables used for

risk computations may change; and, yet, all of these changes are recorded

and maintained in the database. This is referred to as maintaining data

provenance/lineage/pedigree [10] in the data management research

community, and is useful for, say, a trend analysis researcher: with proper

algorithms, the researcher can make use of the data as it changes. To give an

example, let’s say, there have been 40 questionnaires filled by a patient over

40 years, and, during this time, many aspects of HRA have changed such as

questionnaire questions, risk computation formulas, mortality tables, etc.

However, the HRA database provides a researcher the capability to identify

the changes, make the necessary algorithmic adjustments (if needed), and

25

perform trend analysis for the patient using all 40 of the available

questionnaires.

In the sections below, all instance entities (minus some attributes such as patient email address or patient home address) and all risk computation entities are historical and their provenance information is fully kept. In addition, provenance information about mappings between question ids and questionnaires, necessary to trace the provenance of questionnaire and response entities, are also maintained.

2.2.1.1 Entities for Questionnaire Layout

The questionnaire layout portion of the database ER diagram contains a total of 7 entities. These entities define the different parts of the questionnaire

Below are the entity specifications with the key attributes are underlined:

QuestionnaireFrame (QnrF_Id[short], QnrF_ReportType[enum{midlife,20min,full}],

QnrF_CreateDate[datetime], QnrF_DroppedFromUseDate[datetime])

HealthCategory (HC_Id [int], HC_Title [string], HC_Description [string],

HC_CreateDate[datetime], HC_DroppedFromUseDate[datetime]))

QuestionGroup (QG_Id [int] , QG_CreateDate[datetime],

QG_DroppedFromUseDate[datetime]))

26

Question (Ques_Id [int], Ques_Title [string], Ques_Description [string],

Ques_IsRequired [boolean] , Ques_CreateDate[datetime],

Ques_DroppedFromUseDate[datetime]))

AnswerPart (AnsP_Id [int], AnsP_Name [string], AnsP_Title [string], AnsP_Unit

[string], AnsP_Type [enum{radio, text, dropdown}],

AnsP_CreateDate[datetime], AnsP_DroppedFromUseDate[datetime]))

AnswerPartOption (AnsPO_Id [int], AnsPO_Value [string], AnsPO_Label [string])

PreloadValue (PV_Id [int], PV_Gender [enum{male, female}], PV_Value [string],

PV_Type [enum{default, optimum}], PV_CreateDate[datetime],

PV_DroppedFromUseDate[datetime]))

Below are details of what each entity and its attributes will represent:

 QuestionnaireFrame defines a specific questionnaire. For example, in the

current state of the HRA, the midlife, older adult 20-minute, and older

adult comprehensive questionnaires would each be their own

QuestionnaireFrame. The QnrF_Id attribute is for unique identification.

The QnrF_ReportType attribute is used to determine what type of report

should be displayed to the user once the questionnaire is submitted. It is

an enum which can take on three values: midlife, 20min, and full. This

entity also contains CreateDate and DroppedFromUseDate attributes

which are used to maintain a historical record of the questionnaire

layouts. The CreateDate is assigned to the current date-time when the

27

entity is created. The DroppedFromUseDate will remain null until the

entity is no longer used at which point the attribute will be give the value

of the date-time when it became no longer relevant. The

DroppedFromUseDate must always be greater than the CreateDate.

 HealthCategory defines a category for related questions to be displayed

together. Generally, a HealthCategory will be used to group together all

the required questions for one or more risk factors. The HC_Id is for

unique identification, HC_Title is the title for the category, and

HC_Description is a string that will be used to give the user instructions

for the questions that will be contained within the category. The entity

also contains the CreateDate and DroppedFromUseDate attributes which

serve the same purpose as in the QuestionnaireFrame.

 QuestionGroup defines a group of questions that will be displayed

together and will have the same numerical value when the questions are

displayed. Although this entity does not contain any attributes other than

an id, it is important to be able to dynamically assign the question

numbering when questions are presented to the user. The QG_Id is used

for unique identification. The entity also contains the CreateDate and

DroppedFromUseDate attributes which serve the same purpose as in the

QuestionnaireFrame.

 Question defines a single question that can be included in questionnaires.

The Ques_Id is used for unique identification, Ques_Title is the main text

that will be displayed at the top of each question, Ques_Description is any

28

further instruction that would be presented to the user, and

Ques_IsRequired is a boolean stating whether a question must be answer

or not before a report can be generated. The entity also contains the

CreateDate and DroppedFromUseDate attributes which serve the same

purpose as in the QuestionnaireFrame.

 AnswerPart defines each answer that will be contained within each

question. This allows for containing multiple response values in a single

question, such as having separate response values for the feet and inches

in a question asking for the user’s height. The AnsP_Id is used for unique

identification, AnsP_Title is a string that will be displayed alongside the

input control, and AnsP_Unit is a string stating what the units will be for

the value the user inputs. The AnsP_Name attribute refers to the name of

a variable that will correspond to either a risk variable directly used in

risk calculations or a variable used in intermediate computations. The

AnsP_Type attribute can hold a value of “text,” “dropdown”, or “radio” and

will define the type on input control that is used to obtain a response

from the user. The AnsP_High and AnsP_Low attributes define the

expected range for the response value. Theses two attributes only apply

to the AnswerParts that take in a numerical value in a text box. The entity

also contains the CreateDate and DroppedFromUseDate attributes which

serve the same purpose as in the QuestionnaireFrame.

 AnswerPartOption defines the different options a user will have to select

from when a dropdown box or radio buttons are used for an AnswerPart.

29

The AnsPO_Id is used for unique identification, AnsPO_Value is the value

that will be stored in the variable defined by the corresponding

AnswerPart, and AnsPO_Label is the string that will be displayed to the

user when they are making a selection from radio buttons or a drop down

box.

 PreloadValue defines either the default or optimal value for an

AnswerPart. A default value is used in the case a user does not provide a

response to a question. An optimal value is used when computing the

risk years and other parts of the report. The PV_Id is used for unique

identification, PV_Gender can either be left blank, or be “male” or “female”

and it defines if the value is specific to a single gender, PV_Value is a string

containing the value itself or a formula that can be evaluated to obtain the

value, and PV_Type which can be either “default” or “optimum” and

defines if the value is a default value or an optimum value. The entity also

contains the CreateDate and DroppedFromUseDate attributes which

serve the same purpose as in the QuestionnaireFrame.

2.2.1.2 Relationships for Questionnaire Layout

The questionnaire layout portion of the ER diagram contains 6 relationships, each of which is listed below with its cardinality in parentheses:

 QuestionFrame (N) – HealthCategory (N)

 HealthCategory (N) – QuestionGroup (N)

 QuestionGroup (N) – Question (N)

30

 Question (N) – AnswerPart (N)

 AnswerPart (N) – AnswerPartOption (N)

 AnswerPart (1) – PreloadValue (N)

Below, each of these relationships is described in more detail:

 QuestionFrame – HealthCategory:

o This relationship allows linking multiple HealthCategories to multiple

QuestionnaireFrames. This is needed because generally each

questionnaire will contain multiple health categories and each health

category can belong in multiple questionnaires. The Position attribute

is an integer that marks the local position index of the HealthCategory

within the QuestionFrame. The position index for the first

HealthCategory within the QuestionFrame will have a value of 0 and

each HealthCategory afterwards will increment the position index by

1.

 HealthCategory – QuestionGroup

o This relationship allows for a HealthCategory to contain multiple

QuestionGroups and for a QuestionGroup to belong to multiple

HealthCategories. It contains the Position attribute, which serves the

same purpose as the previous relationship. In addition to these

attribute, there is also a Gender attribute that can take a value of “”,

“male”, or “female”. The purpose of this attribute is to specify if a

QuestionGroup should only be displayed for a specific gender or both.

31

 QuestionGroup - Question

o This relationship allows for a QuestionGroup to contain multiple

Questions and for a Question to belong to multiple QuestionGroups. It

contains the Position attribute, which serves the same purpose as the

previous relationships.

 Question - AnswerPart

o This relationship allows for a Question to contain multiple

AnswerParts and for an AnswerPart to belong to multiple Questions.

It contains the Position attribute, which serves the same purpose as

the previous relationships.

 AnswerPart - AnswerPartOption

o This relationship allows for an AnswerPart to contain multiple

AnswerPartOptions and for an AnswerPartOption to belong to

multiple AnswerParts. It contains the Position attribute, which serves

the same purpose as the previous relationships. The relationship

does not include the CreateDate and DroppedFromUseDate attributes

since we are not interested in the historical record of answer ranges.

 AnswerPart – PreloadValue

This relationship allows for an AnswerPart to have multiple PreloadValues but each

PreloadValue must belong to a single AnswerPart. The relationship does not include the CreateDate and DroppedFromUseDate attributes since we are not interested in

32

the historical record of answer ranges. The relationship also does not contain the

Position attribute since a position is not relevant to PreloadValue.

2.2.1.3 Entities for Patient Information

The patient information portion of the ER diagram in Figure 2.1 contains a total of 5 entities. These entities are used to define a patient and the responses they provided each time they submitted a questionnaire.

Below are the entity specifications with the key attributes underlined:

Patient (P_Id [int], P_FirstName [string], P_LastName [string],

P_Gender[enum{“male”, “female”}], P_DateOfBirth [date], P_Email [string],

P_Password [string], P_Salt [string], P_PhoneNumber [string], P_Street

[string], P_City [string], P_State [state], P_ZipCode [string])

QuestionnaireInstance (QnrIns_Id [int], QnrIns_Date [date])

Answer (Ans_Id [int], Ans_Value [string])

Risk (Rk_Id [int], Rk_Value [string])

RiskType (RkT_Id [int], RkT_Name [string], RkT_CreateDate [datetime],

RkT_DroppedFromUseDate [datetime])

Below are details of what each entity and its attributes represent:

 The Patient entity defines each patient that has taken a questionnaire. The

P_Id attribute is used for unique identification. The P_FirstName,

33

P_LastName, P_Gender, P_DateOfBirth, P_Email, P_Password, P_Salt,

P_PhoneNumber, P_Street, P_City, P_State, and P_ZipCode attributes are all

used to store personal information about the patient

 The QuestionnaireInstance entity is used to record each time a patient

submits one of the questionnaires. It contains the QnrIns_Id attribute, which

is used for unique identification. The QnrIns_Date is assigned to the current

date-time when the entity is created.

 The Answer entity is used to store the response that a user provides for each

AnswerPart in the corresponding QuestionnaireInstance. It contains the

Ans_Id attribute, which is used for unique identification, and the Ans_Value

attribute which stores the response value.

 The Risk entity contains the risk value for a certain RiskType computed for a

specific QuestionnaireInstance. Each Risk entity contains a Rk_Id which is

used for unique identification and a Rk_Value which is used for storing the

computed risk value.

 The RiskType entity defines a specific type of risk that can be computed from

the Answer response values. It has a RkT_Id attribute which is used for

unique identification and a RkT_Name attribute which will be used as a lable

to describe the risk type. This entity also contains RkT_CreateDate and

RkT_DroppedFromUseDate attributes which are used to maintain a historical

record of the risk types. The RkT_CreateDate is assigned to the current date-

time when the entity is created. The RkT_DroppedFromUseDate will remain

null until the entity is no longer used at which point the attribute will be

34

given the value of the date-time when it became no longer relevant. The

RkT_DroppedFromUseDate must always be greater than the RkT_CreateDate.

2.2.1.4 Relationships for Patient Information

The patient information portion of the ER diagram contains 6 relationships, each of which is listed below with its cardinality in parentheses:

 Patient (1) – QuestionnaireInstance (N)

 QuestionnaireInstance (1) – Answer (N)

 Answer (N) – AnswerPart (1)

 QuestionnaireInstance (1) – Risk (N)

 Risk (N) – RiskType (1)

 QuestionnaireInstance (N) – QuestionnaireFrame (1)

Below, each of these relationships is described in more detail:

 Patient – QuestionnaireInstance

o This relationship links each questionnaire instance to the patient that

submitted the questionnaire. It contains one attribute (Date) which

stores the date when the questionnaire was submitted. This date can

be used along with the provenance information in the questionnaire

layout entities to regenerate the questionnaire instance when it was

originally taken.

 QuestionnaireInstance – Answer

35

o This relationship ties each Answer to a specific

QuestionnaireInstance. There are no extra attributes for this

relationship.

 Answer – AnswerPart

o This relationship ties each Answer to a specific AnswerPart from the

questionnaire that the patient had taken. This allows us to tie the

Answer provided by the user to the variable that the corresponding

AnswerPart represents.

 QuestionnaireInstance – Risk

o This relationship ties each computed Risk to the specific

QuestionnaireFrame that the risk value was computed from. Each

Risk is associated with a since QuestionnaireFrame but each

QuestionnaireFrame can have multiple Risks.

 Risk – RiskType

o This relationship defines what RiskType each Risk is associated with.

Each Risk is associated with a single RiskType.

 QuestionnaireInstance – QuestionnaireFrame

o This relationship defines which QuestionnaireFrame the

QuestionnaireInstance is an instance of.

36

2.2.1.5 Entities for Provider/Admin Information

The portion of the database ER diagram defining the provider and admin information contains a total of 5 entities. These entities define the system management roles and their facility and organization.

Below are the entity specifications with the key attributes underlined:

User (User_Id [int], User_FirstName [string], User_LastName [string],

User_Email[string], User_Type[enum{Provider, SoftwareAdmin}])

Facility (Fac_Id [int], Fac_Name [string], Fac_Type[enum {see Appendix A}],

Fac_Street [string], Fac_City [string], Fac_State [string], Fac_ZipCode [string])

Organization (Org_Id [int], Org_Name [string], Org_Type [enum{see Appendix B}],

Org_Street [string], Org_City [string], Org_State [string], Org_ZipCode

[string])

Provider (Prvdr_Id [int], Prvdr_Type [enum{see Appendix C}], Prvdr_AccessLevel

[enum{see Appendix D}])

SoftwareAdmin (SA_Id [int])

Below are details of what each entity and its attributes represent:

 The User entity defines any user that will be able to log into the admin

interface. The User_Id attribute will be used to uniquely identify a user. A

user can be either a Provider or a Software Administrator and this is defined

37

in the User_Type attribute. The User_FirstName, User_LastName, and

User_Email all define the corresponding information about the user.

 The Facility entity defines the facility at which users may work. The Fac_Id

attribute is used for unique identification. The Fac_Type attribute is an emun

that can have one of the values listed in Appendix A and it describes the type

of a facility. The address of the facility is defined by the Fac_Street, Fac_City,

Fac_State, and Fac_ZipCode attributes. The name of facility is defined in the

Fac_Name attribute.

 The Organization entity defines the organizations that operate at one or

more Facilities. The Org_Id attribute is used for unique identification. The

Org_Type attribute define the type of organization and can have one of the

values listed in Appendix B. The name of the organization is stored in

Org_Name and the location for the organization is stored in the attributes

Org_Street, Org_City, Org_State, and Org_ZipCode.

 The Provider entity defines a type of User that works with Patients and has

some sort of admin access. The Prvdr_Id attribute is used for unique

identification. There are multiple different type of providers and this is

defined by the Prvdr_Type attribute which is an enum that can have one of

the values listed in Appendix C. Providers can also have different levels of

admin access, which is defined by the Prvdr_Type attribute which is an enum

that can have one of the values listed in Appendix D.

38

 The SoftwareAdmin entity defines a type of User that will have admin access

to be able to manage the HRA system. The SA_Id attribute is used for unique

identification.

2.2.1.6 Relationships for Provider/Admin Information

The provider/admin information portion of the ER diagram contains 5 relationships, each of which is listed below with its cardinality in parentheses:

 User (N) – Facility (N)

 Facility (N) – Organization (N)

 User (1) – SoftwareAdmin (1)

 User (1) – Provider (1)

 Provider (N) – Patient (N)

Below, each of these relationships are described in more detail:

 User – Facility

o This relationship describes the Facility at which a User works at. A

User can work at multiple Facilities and a Facility can have multiple

Users work at it.

 Facility – Organization

o This relationship describes which Facilities an Organization operates

at. A Facility can be used by multiple Organizations and an

Organization can operate at multiple Facilities.

 User – SoftwareAdmin

39

o This relationship defines that a SoftwareAdmin is a type of User. All

SoftwareAdmins are Users but not all Users are SoftwareAdmins.

 User – Provider

o This relationship defines that a Provider is a type of User. All

Providers are Users but not all Users are Providers.

 Provider – Patient

o This relationship defines the Providers that a Patient visits. A Patient

can visit have multiple Providers and a Provider can have multiple

Patients under their care.

2.2.1.7 Risk Calculation Entities

Please note that risk calculations only involve entities, and there are no relationships involving risk computations. There are three types of risk calculation entities: cause entity, mortality table entities and coefficient table entities.

Cause Entity: Currently, there are 44 causes for death. Cause entity is historical, and its provenance information is kept. The entity specification is given below.

Cause (CauseName [varchar: 100 bytes], CauseFormula [varchar: 200 bytes],

Cause_CreatDate[date], Cause_DroppedFromUseDate[date])

Mortality Table Entities: there are 36 mortality tables (for different causes) that are used in risk calculations, listed in Appendix E.

“Current” 5-year mortality table entity and its historical version:

40

mo-5 (age_min[int:4 bytes], age_max[int: 4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], mo-5.CreatDate [Date])

All old mo-5 table entities in all old mo-5 tables are kept in a single historical table, named mo-5-old, with the following specification: mo-5-old (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], mo-5.CreatDate [Date], mo-

5.DroppedFromUseDate [Date])

10-year mortality table entity: mo-10 (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double] , mo-10.CreatDate [Date])

All old mo-10 table entities in all old mo-10 tables are kept in a single historical table, named mo-10-old, with the following specification: mo-10-old (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], mo-10.CreatDate [Date], mo-

10.DroppedFromUseDate [Date])

20-year mortality table entity:

41

mo-20 (age_min[int:4 bytes], age_max[int: 4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], mo-20.CreatDate [Date])

All old mo-20 table entities in all old mo-20 tables are kept in a single historical table, named mo-20-old, with the following specification: mo-20-old (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], mo-20.CreatDate [Date], mo-

20.DroppedFromUseDate [Date])

The specific mortality table to be used in the patient risk computations (from among the 5-, 10-, or 20-year mortality tables) is selected based on the patient’s age as follows. If the age of the patient is in the range [18, 35], [36, 65], or above 65 then the HRA system uses the 20-year, 10-year, or 5-year tables, respectively, to calculate the mortality risk.

Figure 2.2ER diagram for mortality table entities

We also create similar mortality tables for the older adult computations. We have two tables, one for the 20-minute risk computations and one for the comprehensive risk computations.

42

twentyminute_mo (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double] , createDate [date])

All old twentyminute_mo table entities are kept in a single historical table, named twentyminute_mo-old, with the following specification: twentyminute_mo-old (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], createDate [date], droppedFromUseDate [date]) comprehensive_mo (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double] , createDate [date])

All old comprehensive_mo table entities are kept in a single historical table, named comprehensive_mo-old, with the following specification: comprehensive_mo-old (age_min[int:4 bytes], age_max[int:4 bytes], sex[varchar:45 bytes], causename[varchar:200 bytes], value[double], createDate [date], droppedFromUseDate [date])

Metropolitan Insurance Company Weight Table: This table is used in heart attack risk calculation. mw - Metropolitan insurance company weight table entity has the current table mw, and its historical version, namely, mw-old, as specified below.

43

mw (mw_id [short int], sex [varchar : 10 bytes], heighta[int: 4 bytes], height [int: 4 bytes], value [double], mw.CreatDate [Date])

All old mw table entities in all old mw tables are kept in a single historical table, named mw-old, with the following specification: mw-old (mw_id [short int], sex [varchar : 10 bytes], heighta[int: 4 bytes], height [int:

4 bytes], value [double], mw.CreatDate [Date], mw.DroppedFromUseDate [Date])

There are several other entities related to each specific cause risk value calculations.

Please refer Umang’s thesis [25] for detail information.

2.2.2 Transforming ER Model to Relational Model

This section presents the transforming from ER model to the relational model and the database implementation. Figure 2.3 shows the database schema except for all the risk related tables, since each risk related tables are simply transformed from the ER model.

44

Figure 2.3 Database Schema

The following tables directly represent correspondingly named entities of the ER model.

QuestionnaireFrame (id: short, createDate: date, droppedFromUseDate: date, questionnaireType: int, name: string)

Constraint:

Primary Key: id

Not Null: createDate

Foreign Key: none

Reference: none

45

Degree: 5

HealthCategory (id: short, createDate: date, droppedFromUseDate: date, title: string, type: int, description: string)

Constraint:

Primary Key: id

Not Null: createDate, title, type

Foreign Key: none

Reference: none

Degree: 6

QuestionGroup (id: short, createDate: date, droppedFromUseDate: date, description: string)

Constraint:

Primary Key: id

Not Null: createDate

Foreign Key: none

Reference: none

Degree: 4

Question (id: short, createDate: date, droppedFromUseDate: date, isRequired: boolean, title: string, description: string)

Constraint:

Primary Key: id

46

Not Null: createDate, isRequired

Foreign Key: none

Reference: none

Degree: 6

AnswerPart (id: short, createDate: date, droppedFromUseDate: date, name: string, title: string, input: int, unit: string, high: int, low: int)

Constraint:

Primary Key: id

Not Null: createDate

Foreign Key: none

Reference: none

Degree: 9

AnswerPartOption (id: short, label: string, value: string)

Constraint:

Primary Key: id

Not Null: none

Foreign Key: none

Reference: none

Degree: 3

RiskType (id: short, createDate: date, droppedFromUseDate: date, name: string)

Constraint:

47

Primary Key: id

Not Null: createDate, name

Foreign Key: none

Reference: none

Degree: 4

Patient (id: long, firstName: string, lastName: string, dateOfBirth: string, gender: int, race: string, hispanicOrigin: string, email: string, password: string, salt: string, resetKey: string, state: string, city: string, street: string, zipCode: string, phoneNumber: string)

Constraint:

Primary Key: id

Not Null: none

Foreign Key: none

Reference: none

Degree: 16

User (id: long, firstName: string, lastName: string, string, email: string, password: string, salt: string, resetKey: string, userType: int)

Constraint:

Primary Key: id

Not Null: none

Foreign Key: none

Reference: none

48

Degree: 8

Facility (id: short, name: string, facilityType: int, state: string, city: string, street: string)

Constraint:

Primary Key: id

Not Null: name, facilityType

Foreign Key: none

Reference: none

Degree: 7

Organization (id: short, name: string, organizationType: int, state: string, city: string, street: string, zipCode: string)

Constraint:

Primary Key: id

Not Null: name, organizationType

Foreign Key: none

Reference: none

Degree: 7

The following One-To-Many or One-To-One relationships are captured as part of the associated entities on either the Many side (if any) or the One-side. We transform these relationships and entities into tables as follows:

49

PreloadValue (id: short, createDate: date, droppedFromUseDate: date, gender: int, type: string, value: string, answerPart_id: short):

This table captures PreloadValue entity and AnswerPart (1) – PreloadValue (N) relationship.

Constraint:

Primary Key: id

Not Null: createDate, gender, type, value

Foreign Key: answerPart_id

Reference: AnswerPart

Degree: 7

Answer (id: long, value: string, answerPart_id: short, questionnaire_id: long), this table captures Answer entity and AnswerPart (1) – Answer (N) and Questionnaire

(1) – Answer (N) relationships.

Constraint:

Primary Key: id

Not Null: value

Foreign Key: answerPart_id, questionnaire_id

Reference: AnswerPart, Questionnaire

Degree: 4

Risk (id: long, value: string, riskType_id: short, questionnaire_id, long), this table captures Risk entity and RiskType (1) – Risk (N) and Questionnaire (1) – Risk (N) relationships.

50

Constraint:

Primary Key: id

Not Null: value

Foreign Key: riskType_id, questionnaire_id

Reference: RiskType, Questionnaire

Degree: 4

Provider (id: short, providerAccessLevel: int, providerType: int, user_id: long), this table captures Provider entity and User (1) – Provider (1) relationship.

Constraint:

Primary Key: id

Not Null: providerType, providerAccessLevel

Foreign Key: user_id

Reference: User

Degree: 4

SoftwareAdmin (id: short, user_id: long), this table captures SoftwareAdmin entity and User (1) – SoftwareAdmin (1) relationship.

Constraint:

Primary Key: id

Not Null: none

Foreign Key: user_id

Reference: User

Degree: 2

51

The following Many-To-Many relationships are transformed into a new join table and two One-To-Many relationships. These two relationships are captured in this join table. We transform these relationships into tables as follows:

QuestionnaireFrame_HealthCategory (id: short, position: short, category_id: short, frame_id: short):

This table captures QuestionnaireFrame (N) – HealthCategory (N) relationship.

Constraint:

Primary Key: id

Not Null: position

Foreign Key: frame_id, category_id

Reference: QuestionnaireFame, HealthCategory

Degree: 4

HealthCategory_QuestionGroup (id: short, gender: int, position: short, category_id: short, group_id: short):

This table captures HealthCategory (N) – QuestionGroup (N) relationship.

Constraint:

Primary Key: id

Not Null: position

Foreign Key: category_id, group_id

Reference: HealthCategory, QuestionGroup

Degree: 4

52

QuestionGroup_Question (id: short, position: short, question_id: short, group_id: short):

This table captures QuestionGroup (N) – Question (N) relationship.

Constraint:

Primary Key: id

Not Null: position

Foreign Key: group_id, question_id

Reference: QuestionGroup, Question

Degree: 4

Question_AnswerPart (id: short, position: short, question_id: short, answerPart_id: short):

This table captures Question (N) – AnswerPart(N) relationship.

Constraint:

Primary Key: id

Not Null: position

Foreign Key: question_id, answerPart_id

Reference: Question, AnswerPart

Degree: 4

AnswerPart_AnswerPartOption (id: short, position: short, answerPartOption_id: short, answerPart_id: short):

This table captures AnswerPart(N) – AnswerPartOption (N) relationship.

Constraint:

53

Primary Key: id

Not Null: position

Foreign Key: answerPart_id, answerPartOption_id

Reference: AnswerPart, AnswerPartOption

Degree: 4

Patient_Provider (id: short, patient_id: long, provider_id: short):

This table captures Patient (N) – Provider (N) relationship.

Constraint:

Primary Key: id

Not Null: none

Foreign Key: patient_id, provider_id

Reference: Patient, Provider

Degree: 3

User_Facility (id: short, user_id: long, facility_id: short):

This table captures User (N) – Facility (N) relationship.

Constraint:

Primary Key: id

Not Null: none

Foreign Key: user_id, facility_id

Reference: User, Facility

Degree: 3

54

Organization_Facility (id: short, organization_id: short, facility_id: short):

This table captures Organization (N) – Facility (N) relationship.

Constraint:

Primary Key: id

Not Null: none

Foreign Key: organization_id, facility_id

Reference: Organization, Facility

Degree: 3

2.2.2.1 Database Creation commands

For creating tables in our database, we have the detailed database creation commands in Appendix N.

55

Chapter 3

HealthyLifeHRA Application User Interface

The HealthyLifeHRA software architecture is designed for scalability, easily serving many concurrent users at a time: all user interface functionalities are implemented on the client-side. The client-side rendering of survey results is graphically visualized, as much as possible, for effective and user-friendly presentation purposes, without sapping the server-side computational power. The server-side of the application deals with (i) the execution of the website functions, (ii) receiving

JSON document from client-side and execute risk computations, and (iii) storing and returning the results to the client-side as JSON document when needed.

Besides the software architecture, there are another two issues that our

HealthyLifeHRA application development effort has paid attention to: user interface design and the presentation of results. On the user interface side, we have unified the user experience across the applications even though the interface itself and the result presentation look-and-feel may change to a degree from application to application. The interface has been configured to filter out empty-results.

Collapsible/expandable panels have been used when necessary within the interface and during result presentation for users to reduce visual clutter.

56

Figure 3.1 Home Page Mock-up

Wireframing is an important first step for website application design and implementation. It primarily allows you to organize the information hierarchy of your page, making it easier for you to plan the layout according to how you want your user to access the information. Wireframing is important because it allows the

57

designer to concentrate on planning the layout and the interactions of the interface without being distracted by colors, typography. The user interface design of

HealthyLifeHRA web application is based on the mock-up graphical user interface wireframes. Figure 3.1 shows such a wireframe of home page.

In order to organize the whole website’s functionalities, it is necessary for us to follow a clear system flowchart to design and implement interfaces for each such functionality. The web pages of our system can also be categorized into several such functional groups, namely, information pages, login/registration pages, questionnaire pages and report pages. This system flowchart commonly serves as the site map for some websites. Figure 3.2 shows the flowchart of the system.

58

Figure 3.2 System Flowchart

We also provide an administration interface for customizing the questionnaire and evaluating the questionnaire results.

59

3.1 Information Pages

The information pages provide general information concerning every aspect of the system for patients. These pages include: “Home” page, “About Us” page, “How It

Works” page, “For Clinicians” page and “Term of Service” page.

60

3.1.1 Home Page

Figure 3.3 Home Page

The home page for most websites serves as the welcoming page, highlights the most important functionalities and guides the patients to the pages with information that

61

they are interested in. Figure 3.3 shows the home page. The home page of our

HealthyLifeHRA consists of several sections: navigation bar, welcome window, main content and footer. The navigation bar contains several tabs: “Home”, “Get Started”,

“About Us”, “How It Works” and “For Clinicians”. The welcoming window contains a video demonstration and three buttons, namely, “Take Your Personalized HRA”,

“View a Sample HRA” and “See a Sample Report”. By clicking these tabs and buttons, the system will lead patients to corresponding pages. The main content portion of the home page is designed to provide other useful information and the updates of the system.

3.1.2 About Us Page

As shown in Figure 3.2 the system flowchart, the “About Us” tab will take patients to the page where the patients can learn about the team. Figure 3.4 shows the about page.

62

Figure 3.4 About Page

3.1.3 How It Works Page

Buttons “View a Sample HRA” and “See a Sample Report” on the home page provide another access point to the “How It Works” page, which includes the background information about the health risk assessment and several sample questionnaires and sample reports. Therefore patients can have a general idea about the

63

questionnaires that they are about to take and what kind of information or results that they could get by taking the questionnaires.

Figure 3.5 How It Works Page

Figure 3.5 shows the “How It Works” page.

64

3.1.4 For Clinicians Page

The “For Clinicians” page provides a set of information pages organized by the left navigation list. The “For Clinicians” page provides information for clinicians who want to adopt our system for their practices. The clinicians can also get the scientific and technical details behind our system.

Figure 3.6 For Clinicians Page

65

Figure 3.6 shows the partners and participating institution information of the “For

Clinician” page.

3.2 Login/Registration Pages

By clicking the button “Take Your Personalized HRA” or the tab “Get Started”, patients can log into an existing account, create a new account, or continue to the questionnaire as a guest. The registration and login functionality is one of important functionalities of our system. It also serves as the interface for the authentication mechanism of our system.

Authentication is the process of verification that an individual or an entity is who it claims to be. This process helps verify and protect the identity and privacy of the user of the system or website. Authentication is commonly performed by submitting a user name and password, which are private information that the specific user should know herself and herself only. We design our web application with several common website development practices. Email address is used as one of common credentials for the authentication has its own advantages. With the help of email address account, the user can be verified by her clicking of the verification email.

And the email address account name can also be served as a mechanism for resetting the password if the user forgets the password in the future. Password strength control is another important factor for the authentication process. A strong password policy along with password encryption and storage mechanism makes it difficult to crack the password through manual or automated efforts. The login

66

process is also very important for protecting the user account. A practical way to protect against the login interception during login is by using a certificate-based encryption scheme (for example, SSL). We design our system with security in mind to ensure the maximum safety of user’s account.

3.2.1 Registration Page

The registration or signup page allows patients to create a new account or continue to take questionnaires as a guest. Figure 3.7 shows the registration page.

Figure 3.7 Registration Page

The registration or signup page contains several required fields for patients to input: first name, last name, email address and password. When the patients click the “Create Account” button, all the input fields values will be sent to the server. In

67

order to successfully create a new account, patients have to input valid information accordingly. There is a set of rules for the inputs of creating the account. Each Input field is validated either via interface while inputting or via server-side validation process after clicking the “Create Account” button.

Figure 3.8 Registration Input Errors

68

As shown in Figure 3.8, there is a notification message above those input fields if any input value violates the validation rules. Once those validations rules are met, the system can create the account for patient.

The patients can also login with their existing account by clicking the link “Click here go login”. If the patients decide not to signup now, they can still get the chance to take the questionnaire by clicking the link “Skip signup for now and take an HRA as guest.”. After taking the questionnaire as a guest, patients still have the chance to store the questionnaire responses and results from the report page. We will discuss this functionality in detail later. Figure 3.9 shows the register page from the report page.

Figure 3.9 Guest Registration

69

3.2.2 Login Page

Figure 3.10 Login Page

As shown in Figure 3.10, the login page contains fields for the patient’s email and password and a “Login Now” button. By clicking this button, the credential with be verified on the server-side before continuing to the next page. If the credentials are correct, the Getting Started Page will be rendered but if the credentials are incorrect, an alert message will be displayed informing the user that the email/password combination was incorrect or there is no record for the input credentials. Figure 3.11 shows such a login error.

70

Figure 3.11 Login Page Error

3.2.3 Forgot Password Page

If the patients happen to forget their password, we provide a functionality of resetting the password. From the login page, patients can click the link “Forgot your password? Reset here.” to reset the password by providing registered email address. Figure 3.12 shows the forgot password page.

71

Figure 3.12 Forgot Password Page

Figure 3.13 shows the message after clicking the “Reset” button on the forgot password page.

Figure 3.13 Resetting Password Email Sent

72

The server will generate a temporary link for resetting the password and send this link to the provided email address.

3.2.4 Reset Password Page

Once patients click the link in the password resetting email, the browser will open the page for resetting the password. Figure 3.14 shows the password-resetting page.

Figure 3.14 Reset Password Page

3.3 Questionnaire Pages

Since the HealthyLifeHRA web application currently has three different types of questionnaires, the Adult, the 20-Minute Older Adult and the Comprehensive Older

Adult, it is necessary to gather some basic information from the patients that can be retained on their accounts. This basic information is also used for providing

73

recommendations of selecting different questionnaires and rendering corresponding questionnaire from the server side. Once patients select a specific questionnaire configuration the system will take them to the questionnaire page of their choice. After answering the questionnaire questions and submitting the questionnaire, a report will be displayed according to the questionnaire type that chosen by patients.

3.3.1 Getting Started Page

As mentioned previously, this page provides several input fields for gathering basic information on the left hand side and displays a text box on the right hand side that describes each questionnaire and who should take it. To further aid the user in selecting the correct questionnaire, a recommendation will also be provided in the text box based on the user’s date of birth when patients finish typing their date of birth. Users under the age of 65 are recommended to take the Adult HRA, whereas users with age 65 and older are recommended the 20-Minute Older Adult HRA.

Figure 3.15 shows the getting started page with recommendation.

74

Figure 3.15 Getting Started Page

Once the user has filled out the form, the user select one of three buttons at the bottom of the scene, with each taking the user to one of the three questionnaires.

When a button is clicked, a form validation will take place to ensure that all required fields are provided responses and all inputs are valid on the server side. The required fields for the form are first name, last name, gender, date of birth, race, if the patient is Hispanic, and zip code. The phone number, email, and zip code are also validated to ensure that a valid input was provided. If any of these fields fail the validation, an alert message describing the error is displayed and the corresponding labels for the invalid field are highlighted red labels to attract the patient’s attention.

Figure 3.16 shows the invalid input with highlighted labels.

75

Figure 3.16 Getting Started Page with Invalid Inputs

If all fields pass the validation, the patient is taken to the selected questionnaire page.

76

3.3.2 Questionnaires

Figure 3.17 Questionnaire Page

In order to organize and display the questionnaire questions properly we take the interface representation into consideration when design our data model. Figure

3.17 shows the questionnaire page. The questionnaire questions are related to the

77

age and sex of the patient. Some questions are suitable for patients with certain age range, while other questions are suitable for all age ranges. We also want to provide the flexibility that the healthcare provider can configure the questionnaire with existing questions. We define QuestionnaireFrame to represent these specific questionnaire configurations: adult questionnaire, older adult 20-minute questionnaire, and older adult comprehensive questionnaires.

Each such specific questionnaire consist of several questionnaire sections or categories, we divide all the questionnaire questions into such sections according to the sex of the patient, age range and question type. We define HealthCategory to represent each such section. For example, “Blood Pressure” represents a category of questions related to the blood pressure: take blood pressure medicine, blood pressure, estimated blood pressure, etc. Appendix F lists all health categories.

Some questions are highly related to each other or belong to the same conceptual question family. We define QuestionGroup to represent such question family. Each

QuestionGroup consists of several Questions. For example, “Blood Pressure

Medication”, “Blood Pressure” and “Estimate Blood Pressure” belong to the same

QuestionGroup. Appendix G lists all question groups.

The response format of questionnaire questions can be very flexible. For some questions, patient can choose an option from multiple options, while other questions require the patient to input multiple parts. For example, question

“Describe your body frame size” requires the patient to choose an option from

78

“Small”, “Medium” and “Large”. Questions like “Height” include two parts “feet” and

“inches” value. We define AnswerPart to represent this response data abstraction, and AnswerPartOption to be the options for each such AnswerPart. Appendix H lists all response names and their type. Please also refer [11] for complete question information.

Since the responses to AnswerPart are important for the risk value calculation and report generation, we capture each such response corresponding to AnswerPart. We design this data model abstraction to facilitate the questionnaire representation and data capture. Figure 3.18 shows the data model of the questionnaire.

Figure 3.18 Questionnaire Data Models and Relationship to Display

79

The questionnaire shall also be user friendly, interactive, concise and functional.

From the data model abstraction design intuition, we derive the questionnaire to be with the following functionalities for various platforms:

 Display the ordered list of questions to the patient, one category a time. The

designer of the questionnaire shall define the categories for a specific patient.

 The questionnaire page shall have functionalities to allow the patient to

continue the questionnaire, and navigate back to previous questions that

have been answered. To this end, the questionnaire shall have a “Go back”

button and a “Continue” button. In addition, it shall have a navigation menu,

which allows the patient to return to previous completed sections. Figure

3.19 shows an example of the navigable health category list.

Figure 3.19 Navigable Category List

 Questions may have multi-part answers. Figure 3.20 shows an example of the

multi-part question.

80

Figure 3.20 Multi-part Question

 Answers are given by interaction with a drop-down list, radio buttons, or a

text box.

 A response to a question may be required in order to continue with the

questionnaire. Figure 3.21 shows a question requires a response.

Figure 3.21 Question with Required Response

 The display of some questions may depend on answers to prior questions

(e.g., sex, smoking)

 The questionnaire presents a summary of responses before continuing to the

calculation portion.

 The questionnaire presents a summary of responses before continuing to the

calculation portion.

 The questionnaire presents feedback for out-of-range answers and feedback

based on answers. Figure 3.22 shows a feedback based on specific answers.

Figure 3.23 shows the feedback for out-of-range answers.

81

Figure 3.22 Feedback Message

Figure 3.23 Feedback for Out-of-range Answers

The patient is able to view a summary of their questionnaire responses before proceeding to the report. When viewing the summary, the patient can revisit one of the health categories to correct their response by clicking one of the questions on the summary page. This will load the health category that contains the selected question and the may modify their response. Figure 3.24 shows the summary page.

82

Figure 3.24 Questionnaire Summary

3.3.3 HRA Reporting

The presentation of the HRA report is designed to be with the following characteristics: user friendly, informative, functional and interactive. Figure 3.25 shows a part of the report page.

83

Figure 3.25 Report Page

In addition to the report itself, patients are also able to create a PDF version of their report for printing and email the report by entering an email address in a text field at the top of the page by clicking corresponding buttons. We use a JavaScript library to generate the Data URL string [44] and send it back to the server for generating the email attachment. The server will send the PDF report to the provided email address upon receiving the Data URL string. We will discuss this in detail later.

84

We design the report to be user friendly that we want to provide the patient with intuitive and easy understanding pictures, charts and cartoons, etc. Figure 3.26 shows a user-friendly instruction.

Figure 3.26 User Friendly Instruction

We also want to design the report representation to be very informative and functional enough to provide actually useful information for the patient. The patients could get very useful recommendations or explanations of their responses.

Figure 3.27 shows recommendations according to the patient’s response.

85

Figure 3.27 Recommendations to Patient

Figure 3.28 shows several explanations to the responses.

Figure 3.28 Response Explanations

One of the major purposes of the report is to inform the user how they can live a healthier life. This is in part accomplished with the Action plan shown in Figure

86

3.29. The Action Plan gives the patient a list of actions that they can take to improve and maintain their health. This part of the report is intractable so the user can actually select the actions they plan on taking and provide a date for when they hope to improve their health by.

The Action Plan contains three sections of selectable actions. The first section contains selectable actions based on the user’s stage of change responses for smoking, exercise, alcohol usage, and nutrition. Along with each of these selectable actions is a message displaying the user’s response to the stage of change questions.

The second section contains more selectable actions based on the remainder of the questionnaire responses. The third section displays specific actions that the user can take and the displayed actions in this section are dependent on the actions selected in the first two sections.

87

Figure 3.29 Action Plan

3.4 Administration Interface

The administration area of our web application has several functionalities. It allow administrator with different privileges to view and manage parts of the admin area.

Since we are still working on the admin interface to provide more functionality for

88

the admins, the flowing discussion is based on our previous version. Figure 3.30 shows the admin login page.

Figure 3.30 Admin Login Window

Once logged in, the admins should see different portion of the admin interface according to their privileges. Figure 3.31 shows the home of admin interface.

Figure 3.31 Admin Interface Home

Admins can view each entity’s detail information by clicking corresponding purple buttons. This is a simple way of viewing and managing the database data. Figure

3.32 shows the detail information of a list of records in our database.

89

Figure 3.32 List of Recoreds

By clicking a record, the admin can enter the interface for editing the record. Figure

3.33 shows the record-editing page.

90

Figure 3.33 Record Editing

By clicking the “Evaluating Questionnaires” button, admin can enter the page for evaluating questionnaires. Figure 3.34 shows the page.

Figure 3.34 Evaluating Questionnaires Page

91

There are two functionalities on this page. The admin could select questionnaires from these two dropdown lists. One will show the comparison results against the test data (Figure 3.35), and the other will recalculate the risk values according to the existing questionnaire responses (Figure 3.36).

Figure 3.35 Compare Results

92

Figure 3.36 Risk Recalculation

Another important feature of the administration area is to allow administrators to customize or modify questionnaires according to their needs. As shown in Figure

3.18, we have already demonstrated the relationship between the entities and questionnaire representation. We can add an instance of an entity in the admin area

93

by adding a record in the admin area. This record will be persisted into our database automatically. In the following of this thesis we refer this automatic process for adding database record as adding an instance of an entity. We show the following process of adding a questionnaire from scratch in the admin area. We first add a

QuestionnaireFrame entity instance, which defines the specific questionnaire to be added and several HealthCategory entity instances according to the requirement.

Then we add instances of QuestionnaireFrameHealthCategory, which will link the newly added QuestionnaireFrame entity to each of the HealthCategory instances.

We follow the same way to add the rest parts of the questionnaire. Once we finish all the entries, we have the whole questionnaire.

94

Chapter 4

HealthyLifeHRA Application Evolution

4.1 Introduction

We originally designed static questionnaires with a typical non-historical relational database with no provenance information on any attribute values, as well as a thick client within a client-server software architecture. It became clear during our development that these decisions had to be changed as our expectations from the application have evolved and changed over time. We decided to have many different questionnaires, e.g., adult, older adult questionnaires as well as shorter questionnaires for patients with limited time to take a questionnaire. Later, we realized that doctors might personalize questionnaires of different patients based on their patients’ history of lifestyles. We also realized that questionnaires had to have very flexible layouts, leading way to “positionless questions” in questionnaires, etc.

We were also not helped by browser companies’ recent decisions to request an acknowledgement from clients each time an applet execution is called for. And, we encountered many issues such as browser limitations such as Apple operating systems switching to 64-bit Java runtime, and, yet, Google providing only a 32-bit

Google Chrome browser, or unresolved browser bugs such as string passing errors

95

between client JavaScript and Java applets for Safari browsers. These issues forced us to change our designs and our software architecture. To summarize, each system design evolution has been driven by many issues, leading to multiple redesigns of our HRA application family. Below we briefly discuss some of these design issues and our actions as a response.

4.2 HealthyLifeHRA Version 1

Our first HRA web application had client-server architecture with a thick client, where the risk calculation engine, written in JavaScript, resided at the client. This resulted in a very server-side scalable design with only a couple of client-server communications per questionnaire.

With the huge computing power improvements for personal computing devices, we believed that the client side devices, such as personal computers (specifically browsers), smart phones and tablets could easily handle the computational requirements of risk calculations. So, we took advantage of the client side computability by implementing the risk calculation engine at the client side in

JavaScript. JavaScript is a dynamic programming language. It can interact with users via client side browsers, and also perform as a general purpose programming language. With all these consideration, we designed and implemented the client side risk calculation engine and the interface interaction library with a JavaScript library called jQuery. Since we used JavaScript to calculate risks at the client side browser,

96

we change the data communication format from XML to JSON (JavaScript Object

Notation).

Below we list the salient features of version1.

 Client-server architecture: o Thick client that has the rick computation engine. o Client written fully in JavaScript. o First, XML-based then Jason-based data exchange between server and client.  Questionnaires: o Static questionnaire layouts. o Full skip pattern implementations in queries o Limited data validation constraints for questionnaire answers.

 Risk engine: o Risk formulas in the database o Manual risk computation correctness testing. o Gender and age-specific mortality tables used in risk computation.

 Relational database: o Non-historical database o No data provenance maintenance  Report generation: o Report generation with hard-coded “rules”. o No e-mailing capability.

97

Figure 4.1Client Risk Engine based HealthyLifeHRA System Architecture

Figure 4.1 shows our design of HealthyLifeHRA system architecture in a client-centric way that we can fully take advantage of the client side computability to alleviate the server load. The questionnaire responses are captured by the client-side JavaScript library to generate JSON document, and used as inputs for the client-side JavaScript risk engine. The JSON format responses and the JSON format risk values are sent back to the server for storage after the client-side calculation.

4.3 HealthyLifeHRA Version 2

We encountered performance issue with the JavaScript client-side risk engine when executing the risk calculations for the report generation. We re-implement the

98

client-side risk computation engine into a Java applet, since the Java performance is better than JavaScript.

Below we list the salient features of version 2.

 Client-server architecture: o Still a thick client, but with a Java applet containing the risk engine on the client-side.  Risk engine redesign, reimplementation in Java and C++, and testing: o Risk formulas obtained from the database, and, parsed per risk computation. o One risk computation function per risk type via a decision tree approach. o Risk engine testing: C++ risk engine and JavaScript risk engine testing systems. o Race-, gender, and age-specific mortality tables for risk computation.  Questionnaires: o Three types of questionnaire types o Positionless questions o Flexible questionnaire layouts  Database redesign: o Historical database o Full data provenance maintenance  Integration of web, iPad and android apps: o questionnaire layouts, o account login/creation, o basic information update, o saving responses, and o e-mailing pdf versions of reports.

99

4.4 HealthyLifeHRA Version 3

With our development of mobile platforms, we wanted to design our software architecture a such way that the web server changes or customizations can easily propagated to mobile applications with minimum code changes at the mobile application level.

Figure 4.2 Server Risk Engine Based HealthyLifeHRA System Architecture

We also enforced the security of patients’ account, personal information and questionnaire data across all platforms. All patient data are sent back to the server via secure connection and stored in our encrypted database server. It was also necessary for our system to provide functionalities to support mobile platform communication with the server. We added to the architecture new web service functionalities so that each application in the HealthyLifeHRA application family, as

100

well as any other future third-party applications, can access the HRA database easily and safely. Also, we had to re-implement the risk engine in C++ for the iPad app, and in Java for the Android app and the website. Figure 4.2 shows the server-centric system architecture.

Below we list the salient features of the third and the current version.

 Client-server architecture:

o Very thick server, all questionnaire risk computations and report

related risk computations on the server-side.

o Server provides web service for mobile apps’ access.

o Add guest session and allow guest to signup after finishing sample

questionnaire.

 Risk Engine:

o C++ risk engine for iOS apps and Java risk engine for Android apps

and website.

 Report Generation:

o All report generation rules are stored in the database.

101

Chapter 5

HealthyLifeHRA Web Application Development

The HRA website development takes advantage of two open-source modern web technologies namely, the Play Framework [12] and jQuery [13]. The Play

Framework is a popular Java based modern web development frameworks. The jQuery is a popular feature-rich cross-platform JavaScript library, which is designed to simplify the client-side scripting of HTML and provides simple event handling, animation, Ajax [14], with an API that works across many browsers. The website version of HRA application family uses the Play Framework to organize the data model and database access, and to provide the back-end support for the whole website. The Play Framework also provides a template engine, which enables the front-end programmer to manipulate the objects in a similar fashion as the back- end object manipulation. The HRA application includes a client side interface

JavaScript/jQuery library and a visualization library for HRA report generation and rendering. The client side interface engine manages the interactions between the patient and the system, which provides question navigation, patient input validation and feedback messages without issuing server communications.

The HRA application is designed to provide convenience for the patient to take the questionnaires on multiple platforms. Patients can take questionnaires via an

HTTPS-enabled secure website or on mobile devices with the iOS app and an

102

Android app. The stand-alone desktop version of the HRA application is designed to provide use for doctors to use it in their offices without connecting to the Internet.

The HealthyLifeHRA family is designed and developed to keep the privacy of participants and maintain patient information securely. The website version of

HealthyLifeHRA employs HTTPS protocol communication between the client patient and the server. We also enforce a secure authenticated login process by employing the Play Framework secure module and salt-hashed password encryption [15] on the server side.

5.1 HealthyLifeHRA Model-View-Controller--Basics

Model-View-Controller (MVC) is a software architectural pattern for user interface implementation. It has been widely adopted as a design pattern for web application development nowadays. Next we summarize the basics of the Play framework for our further discussion of implementation. Play framework provides so many features with respect to each M-V-C development components [30]. For our

HealthyLifeHRA we use most of major features to develop each component. We will discuss implementation details in the following sections.

The Play framework is a simple Java MVC framework without requiring complex configuration and setup. It focuses on developer productivity, and targets

RESTful[16] architecture. The Play framework’s goal is to ease web applications development while allowing Java use. A Play application follows the MVC

103

architectural pattern applied to the web architecture. This pattern splits the application into separate layers: the Presentation layer and the Model layer. The

Presentation layer is further split into a View and a Controller layer [17].

The Play framework is fully stateless, and request/response-oriented. All HTTP

Requests follow the same path:

1. The framework receives an HTTP Request.

2. The Router component tries to find the most specific route that able to

accept this request. The corresponding action method is then invoked.

3. The application code is executed.

4. If a complex view needs to be generated, a template file is rendered.

5. The result of the action method (HTTP Response code, Content) is then

written as an HTTP Response.

Figure 5.1 summarizes the HTTP Request path of Play Framework Applications.

104

Figure 5.1 HTTP Request Path of Play Framework Applications

The Model is the domain-specific representation of the information on which the application operates. Domain logic adds ‘meaning’ to raw data (e.g., calculating if today is the user’s birthday, or the totals, taxes, and shipping charges for a shopping cart). Most applications use a persistent storage mechanism such as a database to store data. MVC does not specifically mention the data access layer because it is understood to be underneath, or encapsulated by, the Model.

The model has a central position in a Play application. It is the domain-specific representation of the information on which the application operates. The Play

105

framework use [18] (through Java Persistence API (JPA) [19]) to persist

Java objects in database automatically. JPA is a specification without the actual implementation, while the Play framework use Hibernate JPA implementation to fulfill the JPA specifications. The Play framework also provides a set of useful helpers to simplify the management of JPA entities. We call this Play JPA Hibernate implementation Play JPA in the rest of the thesis. In our HealthyLifeHRA web application, we use Play JPA to implement and manage our models. Most of time, we need to save the model object data permanently. The most natural way is to save this data into a database. The Play distribution includes JDBC for MySQL database— which is what we use.

The View renders the model into a form suitable for interactions, typically a user interface. Multiple views can exist for a single model, for different purposes. In a

Web application the view is usually rendered in a ‘web format’ like HTML, XML or

JSON. However there are some cases where the view can be expressed in a binary form, e.g. dynamically rendered chart diagrams.

The Controller responds to events (typically, user actions) and processes them, and may also invoke changes on the model. In a Web application, events are typically

HTTP requests: a Controller listens for HTTP requests, extracts relevant data from the ‘event’, such as query string parameters, request headers…, and applies changes to the underlying model objects.

106

Figure 4.2. HTTP Request via Play Framework Controller

With the Play framework, you can define parameters in the action method signature.

The framework from the corresponding HTTP parameters automatically resolves these parameters. The Play framework provides full, straightforward access to

HTTP and its concepts.

5.2 Back-end Server Implementation

5.2.1 Play Model Implementation

Most modern websites are developed with object oriented programming languages such as Java, C#, Ruby and JavaScript, and, a (usually, relational) database management system (RDBMS) such as MySQL, PostgreSQL and SQLite. For

107

relational DBMSs, this creates an object-relational “impedance mismatch” issue in that data types in a programming language are not set-oriented, and in a database system are set-oriented, and, thus, creating incompatibilities. This issue is exacerbated when the programming language is object-oriented with “rich” objects.

In Java terms, we would like the state of objects to live outside the scope of JVM so that the same state is available later.

Object-Relational Mapping (ORM) technique is a technique that connects the rich object in a programming language specific application to flat tables in a relational database management system. Using the ORM frameworks such as Hibernate, the properties and relationships of the objects in an application can be stored and retrieved more easily, from a database without writing SQL statements directly and with less overall database access code.

The model (the M in MVC) plays an essential role in a Play application. It is the domain-specific representation of the data on which the application operates. The

Play framework uses Hibernate ORM (with Java Persistence API (JPA) specification) to persist Java objects in database automatically. For our web application, we use

MySQL as our persistence database with the MySQL JDBC driver shipped with the

Play distribution.

JPA entity is defined as the persistence domain object. Typically an entity in JPA represents a table in a relational database, and each entity instance corresponds to a row in that table. In Java these entities are defined as Java classes. And a JPA entity maps to a table in the database, therefore the task of converting ER model to Play

108

model can be simplified as defining JPA entity classes, and the Play framework will persist entities to the corresponding tables in database automatically.

JPA defines several types of annotations for the application development [20]. There are three most important types of annotations:

 JPA annotations for Classes

 JPA annotations for Fields

 JPA annotations for Relationships

Play will start the Hibernate entity manager when it finds one or more classes annotated with @javax.persistence.Entity. Since each entity annotated with

@javax.persistence.Entity will be persisted in a table in the database, the table name will be the same with the class name. However, the database table name for this entity can also be modified by adding annotation

@javax.persistence.Table(name = “custom_name”). Play framework provides a set of useful helpers to simplify the management of JPA entities. The play.db.jpa.Model class is the main helper class for JPA. By extending this class, it provides a lot of helper methods to simplify the JPA access. The play.db.jpa.Model class automatically provides an auto-generated Long id field. However, if one does not want use the provided Long id as the primary key of the entity, the JPA class can also extend play.db.jpa.GenericModel class and add annotation to the customized id field:

@Id @GeneratedValue

109

public short id

In Java, it is suggested [21] to make all fields private, and provide accessors and mutators or getter and setter methods to access these fields for the best practice.

This is to promote encapsulation. Play framework takes care of this issue by default under the hood. As matter of fact, there are a lot of fields in the Play application defined as public (e.g. public short id) for easy accessing yet ensuring encapsulation.

Relationships are persistent fields in persistable classes that reference other entity objects. The four relationship modes are represented by the following annotations:

 @javax.persistence.ManyToMany

 @javax.persistence.ManyToOne

 @javax.persistence.OneToMany

 @javax.persistence.OneToOne

We show here a concrete example of (a) creating two entities and the relationship of these two entities to illustrate the model development, and (b) mapping the JPA entities and relationships to the corresponding relational tables.

110

Figure 5.2 Sample ER Diagram

As shown in figure 5.2, we have the following two entities:

 QuestionnaireFrame (QnrF_Id[short],

QnrF_ReportType[enum{midlife,20min,full}], QnrF_CreateDate[datetime],

QnrF_DroppedFromUseDate[datetime])

 HealthCategory (HC_Id [int], HC_Title [string], HC_Description [string],

HC_CreateDate[datetime], HC_DroppedFromUseDate[datetime]))

We also have a many-to-many relationship:

 QnrF-Contains-HC

The QuestionnaireFrame entity class:

@Entity public class QuestionnaireFrame extends GenericModel {

@Id @GeneratedValue(strategy=GenerationType.AUTO) private short id;

...

111

@OneToMany(mappedBy = "frame") @OrderBy("position") public List questionnaireFrameHealthCategories;

...

}

As we can see from the implementation code, we first annotate the class with

@Entity to indicate this class is a JPA entity, and the QuestionnaireFrame class extends the play.db.jpa.GenericModel class to customize a short id field.

Similarly we implement the HealthCategory entity class:

@Entity public class HealthCategory extends GenericModel {

@Id @GeneratedValue(strategy=GenerationType.AUTO) private short id;

...

@OneToMany(mappedBy = "category") public List questionnaireFrameHealthCategories;

...

}

For the many-to-many relationship between two entities, there are several ways of implement with Play JPA. However, for our ER model, usually there is a position field for the many-to-many relationships. We could have used @ManyToMany annotation to implement the many-to-many relationship. However, this would cause

JPA persistence issues. The best solution in this case is to create a class that models

112

the join table of these two entities [22]. Therefore, we define a joint entity

QuestionnaireFrameHealthCategory and add @ManyToOne annotations to frame and category. We also add @OneToMany annotations to a list of this entity in

QuestionnaireFrame and a list of this entity in HealthCategory to complete the many-to-many implementation.

@Entity @Table(name = "QuestionnaireFrame_HealthCategory") public class QuestionnaireFrameHealthCategory extends GenericModel {

@Id @GeneratedValue(strategy=GenerationType.AUTO) private short id;

@Required @NotNull @ManyToOne public QuestionnaireFrame frame;

@Required @NotNull @ManyToOne public HealthCategory category;

public short position;

... }

5.2.2 Risk Computation Engine

The HRA risk computation engine is the core functional library of our HRA system.

We have adapted, and modified when necessary, the risk computations specified in

113

the HEALTHIER PEOPLE NETWORK Version 6.0 (HPNV6.0) [23] Health Risk

Appraisal Software Program. This program uses an individual's health-related behaviors and personal characteristics, U.S. mortality statistics, and epidemiologic data to compute that race specific individual's probability of dying in the next 5, or

10, or 20 years from 44 different causes of death, including heart attack, cancers, and injuries. The questionnaire covers such habits as smoking, seat belt use, and exercise. In addition, physiological data such as weight, blood pressure, and cholesterol are requested [23]. In this section we discuss data format design and method design for the risk computation engine. Please find the implementation details and all data tables in corresponding references. The version 3 server-side risk engine is implemented in Java programming language based on our previous client-side JavaScript implementation [24][43]. The Java risk computation engine

[25][26] closely resembles the JavaScript engine follow the same risk computation method. Umang also developed the C++ version for the iOS applications [25].

Our risk computation engine uses the questionnaire responses, mortality statistics and the auxiliary data tables as input for all causes. Intuitively, we could write a function or method for each such cause and pass all necessary parameters into this specific function and calculate the risk value. Since it is necessary to calculate quite amount of cause risk values, while each risk calculation uses different formula and corresponding data tables, it is not convenient to manage the source code if modify or add causes. We want to simplify the risks calculation in a unified manner yet with maximum flexibility for adding more causes. Considering the complexity of the

114

cause formula, the multi-dimensional nature of the data tables and the extensibility of the software library, we design the risk calculation engine in a string evaluation manner. We store the formula of each cause in a string, which consists of constant values, variables and operators and other symbols. The calculation involves three basic steps (Figure 5.3):

Figure 5.3 Risk Calculation Steps

The first part of risk calculation is the precursor transformation. Precursors are a group of life characteristics that create mortality risks for individuals. As examples, sex, age, smoking, alcohol use are precursors. Some of the precursors are

“modifiable precursors” such as smoking or alcohol usage. For a given patient and a given questionnaire question, the question answer value forms a specific precursor value for the patient, e.g., sex value of “female” and age value of “25” for questions with labels “sex” and “age”, respectively.

There are altogether 44 different causes of deaths. The risk computation of each cause (of death) needs “constants” that are obtained from “data tables”, given the

115

precursor values (i.e., question answer values) for the patient. Here, by “precursor transformation”, we refer to the task of locating a certain constant, given the precursor values of a patient from the mortality table for the cause.

Clearly, some of the precursor values (i.e., question answer values) are strings, e.g.,

“female”. And, other question answer values fall within an integer range of certain data table.

Notice that range definitions are not independent of the other columns. For instance, one table could define multiple overlapping age ranges, which are only distinct given the values in the other columns.

Taking all of these to our consideration, we design an efficient JSON format to access specific value for some given string values.

“riskfactorname”: { “data”: [ [ val1, val2, val3 ], [ val4, val5, val6 ], …. ], “mapping”: { “sex”: { “male”: 0, “female”: 1

116

}, “age_min|age_max”: { “1|44”: 0, “45|64”: 1, “65|150”: 2 }, … }, “mapOrder”: [ “sex”, “age_min|age_max”, … ] }

This JSON format is comprised of three attributes:

 “data”: stores the values from the tables as a multidimensional array, each of

the table is regarded as a dimension of the array.

 “mapping”: maps each column’s real values into an index value of the

corresponding dimension of the multidimensional array.

 “mapOrder”: determines the ordering of the objects in the mapping object.

The second step of the risk calculation is the actual risk formula evaluation (risk calculation) for causes. When a cause value is being calculated, it involves the following steps:

 Find the corresponding formula for this cause by the cause name.

 Parse the formula into four types of symbols:

o Numbers: 0123456789

o Operators: /*-+()

117

o Precursor symbols

o Lookup symbols

 For each precursor symbol, find the corresponding value from the

multidimensional array with the string of the precursor symbol.

 For each lookup symbol, find the corresponding value from the

multidimensional structured mortality tables.

The third part of risk calculation is the reporting value calculation. Since the reporting of the HRA contains multiple charts and tables, which collectively visualize the results of different statistics for the risk calculations and list messages that vary according to questionnaire answers. Since some of the values for reporting require modification of responses, we cannot use the original responses to calculate the specific reporting values. However, the mechanism for calculating this modified version of risk is the same with the original risk calculation.

5.2.3 RESTful Web Service Development

A web services API for the server is created to allow data to be shared between the web, Android, and iPad clients. This enables each of the clients to create and log into the same set of accounts, store the questionnaire responses in a central location, and email reports. It is very simple to implement this web services API due to the

RESTful nature of Play framework. The API is implemented with several controller methods and a HTTP routes configuration file.

118

We list all API related routes in the routes configuration file:

# Method URL Path Controller Method

GET /api/midlifeLayout API.getMidlifeLayout

GET /api/20minuteLayout API.get20MinuteLayout

GET /api/comprehensiveLayout API.getComprehensiveLayout

POST /api/emailReport Application.mail

POST /api/login API.login

POST /api/updateInfo API.updateInfo

POST /api/saveResponses API.saveResponses

POST /api/createAccount API.createAccount

POST /api/heartBeat API.heartBeat

The values in the first column define the type of HTTP request that the URL accepts.

The second column defines that path that the web service can be accessed at. The last column defines the method in the controller classes that is called when a proper request is made to one of the web services. Please see Banugaria’s thesis for more details [25].

5.2.4 HTTPs Based Communication with Play Framework

The built-in server of Play Framework supports the HTTPS protocol, which can be used in the production application. It provides the support of certificate management, either via classical Java KeyStore or simple “.cert” and “.key” files. To

119

start an HTTPS in the application, just declare the “https.port” configuration property in the “application.conf” configuration file:

http.port=9000

https.port=9443

Play Framework support various kinds of certificates, including: X509 certificates,

Java KeyStore certificates and self-signed certificates with OpenSSL. For our website we purchase a third party SSL certificate to enable the HTTPs secure connection.

It is worth mentioning the following configurations for X509 certificate and Java

KeyStore in case of switching to different certificates in the future. For the X509 certificate, the certificate files have to be placed in the “conf” directory of the application. The X509 certificates must be named as follows:

“host.cert”: the certificate

“host.key” : the key for the certificate

The following parameters for X509 can be configured in “application.conf” file:

certificate.file=conf/host.cert

certificate.key.file=conf/host.key

trustmanager.algorithm=JKS

# Incase the key file is password protected.

120

certificate.password=secret_password

For the Java KeyStore certificates, the following properties can be configured in the

“application.conf” file:

ssl.KeyManagerFactory.algorithm=SunX509

trustmanager.algorithm=JKS

keystore.file=conf/certificate.jks

keystore.password=secret_password

5.2.5 Security and Password Encryption

It is necessary to enforce the security for the user account system. The most important aspect of a user account system is the mechanism for protecting the user passwords. The best way to protect the password is to employ “salted password hashing” [27].

Hash algorithms are one-way functions that turn any amount of data into a fixed- length “fingerprint” that cannot be reversed. They also have the property that if the input changes by a tiny bit, the resulting hash is completely different. But merely run the password through a cryptographic hash function is far more than enough to enforce the password security. There are existing ways of cracking the hashed

121

password, such as: dictionary and brute force attacks, lookup tables, reverse lookup tables and rainbow tables [15].

Lookup tables and rainbow tables only work because each password is hashed the exact same way. If two passwords were the same, and the password hashes would be the same. We can prevent these attacks by randomizing the hash, so that when the passwords with the same string format will have different hashes. We use java.security.SecureRandom class to randomize the hashes by appending or prepending a random string called “salt”, to the password before hashing. There are several well-designed algorithms for enforcing the salted password hashing:

PBKDF2, bcrypt and scrypt.

We implement the PBKDF2[28] salted password hashing algorithm with Java, and store the “salt” and hashed password in our database for validating the login password. We list the following function signatures with explanations of the controller “PasswordHash.java”.

Function signature: public byte[] genSalt(), this method generates a random salt byte array with java.security.SecureRandom class for generating the salted password hashing.

Function signature: private String toHex(byte[] binary), “binary” is a byte array and this method is a private method that can be called within this class for converting a byte array to hexadecimal string.

122

Function signature: private byte[] fromHex(String hex), “hex” is the string with hexadecimal characters, this private method converts the hexadecimal string to a byte array.

Function signature: private byte[] pbkdf2(char[] password, byte[] salt, int iterations, int bytes), “password” is a character array of the original password string, “salt” is a byte array of generated random bytes, “iterations” is the iteration count for the

PBKDF2 algorithm and the “bytes” is the length of the hash to compute in bytes for

PBKDF2.

Function signature: public String createHash(String password, byte[] saltArray),

“password” is the string format of the original password without salted hashing, and the input “saltArray” is the byte array of the salt string. This method generates the salted password hashing.

Function signature: private boolean slowEquals(byte[] a, byte[] b), this method compares two byte arrays “a” and “b” in length-constant time. This comparison method is used so that password hashes cannot be extracted from an on-line system using a timing attack and then attacked off-line.

Function signature: public boolean validatePassword(String password, String correctSalt, String correctHash), “password” is the password string to be regenerated with the “correctSalt” stored in our database, the regenerated salted hash will be compared to the stored “correctHash” in ourdatabase. The method returns the comparison result as a boolean value.

123

5.3 Front-end Interface Implementation

The frontend or the presentation layer implementation of HealthyLifeHRA web application takes advantage of modern web development technologies such as Play framework, Twitter Bootstrap [29] and JavaScript/jQuery/Ajax. In order to explain the interface implementation clearly, next we cover some of the basics of HTTP routing, controller and template engine [30]. After that, we discuss the three major functionalities for the HealthyLifeHRA web application: basic information management and login/registration management, questionnaire interaction and report generating, the administration area management, and the implementation of these three major functionalities in terms of controllers and views. Without loss of generality, we discuss typical controller methods and important controller methods in detail as examples.

5.3.1 HTTP Routing

Play’s router is the component in charge of translating the incoming HTTP requests into action calls (controller methods) and configured by a route file with the content:

# Method URL Path Controller Action

GET /home Application.index

124

This would be translated into get the HTTP GET request for “/home” to be handled by the controller method Application.index. The controller method then renders the actual HTML page as the response to the GET request.

5.3.2 Controllers

Controller is an essential part bridging the model and the view. After routing has determined which controller to use for a request, the controller is responsible for making sense of the request and producing the appropriate output.

A controller in Play framework is a Java class: package controllers; import play.mvc.Controller;

/** * The Application controller class. */ public class Application extends Controller {

/** * Render Index page. */ public static void index() {

render();

}

}

Each public, static method in a Controller class is called an action. The signature of for an action method is: public static void action_name(parameters ...);

125

The “parameters” can be defined in the action method signature. These parameters will be automatically resolved by Play from the corresponding HTTP request parameters. These HTTP request parameters can also be retrieved within the action method with the “params” map: String id = params.get(“id”);

There are many other features provided by the Play framework controller [31], such as:

 Retrieve HTTP parameters from URI path, query string and form data. We

use this feature to get HTTP parameters for our web application.

 Advanced HTTP to Java binding, JPA object binding and custom binding. We

use JPA object binding to retrieve related object in our web application.

 Results type for the response generated by the action method can be plain

text, JSON string, XML string, template execution, URL redirection and

interceptions. We use all of these great features for our web application.

 Session and Flash scopes.

Session and Flash scopes are two most frequently used features. Due to the stateless nature of Play session, it handles session differently with respect to the traditional server session saving. It is important to understand that Session and

Flash data are not stored in the server, but are added to each subsequent HTTP

Request, using the Cookie mechanism.

126

5.3.3 Template Engine

The Play framework provides interface supports for the whole web application. Play has an efficient template system, which allows to dynamically generate HTML, XML,

JSON or any text-based formatted document. A tag system allows front-end developers to create reusable functions.

A template is a text file, and some parts of the file are placeholders for dynamically generated contents. The template’s dynamic elements are written using the Groovy.

Groovy’s syntax is very close to Java’s. Usually, these dynamic elements are objects rendered from controller methods. Dynamic elements are resolved during the template execution. Then the result is sent as part of the HTML response.

Expressions: ${…}

The simplest way to make a dynamic element is to declare an expression ${…}. The result of evaluating the expression is inserted in the place of the expression. For example, if we want to display the name of a different patient, we can write:

Patient: ${patient.firstName} ${patient.lastName}

. Each time, the patient object could be different. Therefore this would display different patient’s names.

Template decorators: #{extends /} and #{doLayout /}

Decorators provide a solution to share a page layout or design cross several pages.

We create templates with common layout and design elements, then we add:

Main Template

127

#{doLayout /}

to the position that we want other partial HTML pages to inherit from. And we add

#{extends ‘template.html’ /} to the beginning of the partial HTML file, therefore all layout and design elements are inherited from the “template.html”.

Tags: #{tagName /}

A tag is a template fragment that can be called with parameters. These parameters usually are Java objects rendered from controller methods. You can manipulate these objects as you do in the Java codes. For example, if you want to list all the patients, you can use #{list} tag like this:

    #{list items:patientList, as ‘p’}

  • ${p.firstName} ${p.lastName}
  • #{/list}

Actions: @{…}

From a template you can generate a URL corresponding to a specific route which associated with a controller method with @{…}. For example

Home will create a URL for the home page: http://localhost/home if we have the route configured with

GET /home Application.index

128

Scripts: %{…}%

A script is a more complicated set of expressions with variable declarations and statement definitions. For example, if you want to display a patient’s name in upper case you can write:

%{

fullName = patient.firstName.toUpperCase() + ‘ ’

patient.lastName.toUpperCase()

}%

${fullName}

Implicit objects available in a template

When a template is rendered from an action, Play adds implicit objects:

Variable Description API documentation errors Validation errors play.data.validation.Validation.errors() flash Flash scope play.mvc.Scope.Flash lang The current language play.i18n.Lang messages The messages map play.i18n.Messages The output stream out java.io.PrintWriter writer params Current parameters play.mvc.Scope.Params play Main framework class play.Play The current HTTP request play.mvc.Http.Request request session Session scope play.mvc.Scope.Session

129

5.3.4 Templates

We design a “main.html” template for pages that provide basic information with

Twitter Bootstrap. Since we want to show navigation bar buttons and footer links for most pages, we implement the “main.html” template as follows:

#{get 'title' /} ...

131

...

#{get 'title' /}” will get the HTML title defined in the

HTML that inherit this “main.html” template. The action syntax @{...} can not only generate URL based on the route file configuration, but also serve the static files. For example,

Logo"> will serve our logo image file.

For the “About Us” tab, will be translated into

“http://domainname/about” with the route configuration:

GET /about Application.about

Similarly we create another two templates “clean.html” and “admin.html”.

In the flowing sections, we discuss the development detail in a way that we list the necessary routes first, and then explain the corresponding controller actions and necessary interface techniques that we use if necessary. We omit some simple implementation details and concentrate on important functionalities.

5.3.5 Information Pages

The Application.java controller is our main controller. This controller is responsible for providing all information pages and the login/registration pages with the help of other controllers.

132

We list all the routes for information pages in chapter 3. Since these pages provide simple information via basic HTML.

# Method URL Path Controller Action

GET / Application.index

GET /about Application.about

GET /how Application.how

GET /clinician Application.clinician

GET /privacy Application.privacy

5.3.6 Login/Registration Pages

The login/registration is an essential functionality of our HealthyLifeHRA web application. This part is responsible for creating new patient account and authenticating the existing patient account. We implement this part with the Secure module of Play framework [32] and PasswordHash controller.

5.3.6.1 Signup Page

GET /signup Application.signup

POST /account Application.create

Function signature: public static void signup(), this action renders the signup page.

The signup page contains a HTML form, which is implemented with #{form} syntax of Play template engine:

#{form @Application.create(), method:'POST'}

133

#{field 'patient.firstName'}

#{/field}

...

#{/form}

This will define a HTML form with the “POST” method, each value inside the #{field} tag represents each field of a Patient model object, and this Patient object will be posted back to the server controller action “Application.create”.

Function signature: public static void create(Patient patient, String password, String confirmPassword). In this action, the patient’s first name, last name, and email will be validated, also the confirm password has to match the password. If the patient passes all validation rules, it will be saved into the patient table in the database, and the patient’s email address will be added into the Session scope as logged-in patient.

Otherwise it will be rendered back to the login page to correct those errors.

5.3.6.2 Login Page

This page is implemented with the Play Secure module. This module provides the interface for patient authentication and protects controllers or some of the controller actions.

GET /login Secure.login

POST /login Secure.authenticate

134

#{form @Secure.authenticate(), method:'POST'} this will generate the form for inputting login email and password. All credentials therefore will be post to the “Secure.authenticate” action.

Function signature: static boolean authenticate(String email, String password), this method will validate the email and password posted from the login page with the

PasswordHash controller method validatePassword(String password, String correctSalt, String correctHash), it will first find patient’s record in the Patient table of database, and get the stored “correctSalt”. This validatePassword will generate a test hash based on the posted password and the “correctSalt”, if this test hash matches the “correctHash”, it will return true, otherwise return false. Once the patients pass the authentication, their email addresses will be added into the

Session scope as authenticated patient via the Secure module controller.

5.3.6.3 Forgot Password Page

GET /forgot_password Application.forgotPassword

POST /fortog_password Applicaiton.sendResetEmail

The forgot password page rendered by “Application.forgotPassword” action provide a form: #{form @Application.sendResetEmail(), method:'POST'} that allow patients to input the email address if they forgot the password. The action sendResetEmail receives the posted email address and send a password-resetting link to the email address. This method also calls a method of PasswordHash to

135

generate a resetKey concatenated with the current timestamp for validating the reset link expiration.

5.3.6.4 Reset Password Page

GET /reset_password/{key} Application.resetPassword

When the patient clicks the link inside the password-resetting email, the browser will open a page via the HTTP GET method, {key} is the HTTP parameter generated in the sendResetEmail method.

Function signature: public static void resetPassword(String key), this method will parse the parameter key to check if this key has been expired. If this key is expired, this method will redirect the patient to the forgot password page to reset the password again, otherwise it will render the reset password page with resetAccount method that updates the patient’s password.

5.3.7 Questionnaire Pages

The questionnaire functionality is the essential part of HealthyLifeHRA web application. After creating a new account or logging in with existing account, patients will see the getting started page. By filling some basic information in the getting started page, the system recommends a certain type of questionnaire to patients. Patients can choose one to take by clicking the corresponding button. The system then will take patients to the questionnaire page of their choice.

136

5.3.7.1 Getting Started Page

This page provide a form for patients to input basic information:

POST / Application.savePatient

#{form @savePatient, method: ‘POST’}

We implement the questionnaire recommendation with jQuery, which provides an event listener for element. When patients choose the date of birth, the change event is sent to this element, within the event handler we get the input value for the date of birth. We calculate the age of the patient with date of birth value and recommend adult questionnaire if the patient’s age is under 65 years old, otherwise recommend the 20-minute adult questionnaire. When the patient chooses a questionnaire type, we also post a “type” object back to the savePatient method on the server side. With the “type” object, we query the QuestionnaireFrame table to get the corresponding

QuestionnaireFrame object:

QuestionnaireFrame frame =

QuestionnaireFrame.find(“questionnaireType is ?”, type);

As mentioned in early chapters, patient’s email will be add in to the Session scope if successfully create or log in to the account. The savePatient method will retrieve the

“patient” object with Secure.connected() method.

The savePatient method will render the “frame” and “patient” to corresponding questionnaire page according to “type”.

137

5.3.7.2 Questionnaire Page

Once patients choose a questionnaire from the getting started page, a corresponding questionnaire page will be displayed. The questionnaire page is basically a form with the questionnaire question inputs and these questions are dynamically displayed according to the questionnaire configuration. Base on our data model design we implement the questionnaire page by iterating multiple object lists:

#{form @Questionnaires.save(patient.id)} #{list items:frame.getHC(), as:'category'}

#{/list}

#{/form}

All the question response will be posted to the Questionnaire.save method.

Please also refer to Figure 3.18 for the following explanations. “#{list items:frame.getHC(), as:'category'}” in this code snippet, “frame” is the

QuestionnaireFrame object and method “getHC()” will get all HealthCategory

140

objects belongs to this “frame”. This code snippet will loop through the

HealthCategory list and each element in this list will be displayed on the page. The same for “#{list items:category.getQG(patient), as:'group'}” the “category” is the

HealthCategory object and method “getQG(patient)” will get all QuestionGroup objects belong to this HealthCategory according to Patient object “patient” in the parenthesis. In this fashion, we can display all elements in the questionnaire.

Questionnaire Page Navigation

Since each questionnaire may contain quite amount of questions, it is necessary to employ a pagination mechanism to improve the user experience. The questionnaire is grouped according to the health categories, only a single health category will be displayed a time. We implement this pagination library with jQuery by manipulating the display property of each health category according to the patient’s interaction.

At the very beginning of the questionnaire, the first health category will be displayed while other health categories will be hidden. When the patients click the next button on the questionnaire page, the first health category will be hidden and the second health category will be displayed. The questionnaire page can also be navigated via the navigable category list in Figure 3.19. Once a health category is clicked in this list, the corresponding health category portion will be displayed while other health categories will be hidden.

Questionnaire Summary

The patient is able to view a summary of their questionnaire responses before proceeding to the report. When viewing the summary, the patient can revisit one of

141

the health categories to correct their response by clicking one of the questions on the summary page. This will load the health category that contains the selected question and the may modify their response. We use a similar code structure of questionnaire page to display all questions for summary page. We implement these functions with jQuery combining with questionnaire page navigation library.

Question Skip Patterns

For traditional paper based questionnaires, patients have to read specific instructions in order to proceed the questionnaire properly without wasting time on unnecessary questions. These instructions could be misleading or easy to overlook, especially for older people. Therefore there is a need of introducing automatic question skip pattern according to patients’ information and answers for our system.

Since jQuery can toggle the visibility of HTML elements, we hide the question if the patient’s response fails the validation rule for this question, and display the question vise versa. For example, if a question is needed to be hidden, we first select HTML element of this question by jQuery selector “$()” and call “hide()” method on this selected element, and call “show()” on this element if this question has to be shown.

We list all question skip patterns in Appendix I. Please also refer [23][33][11] for question variable names.

Feedback Messages Library

In general, for a given program, user feedback message is the process of giving some messages to the user based on input data. The feedback message library provides

142

reinforcement for good behaviors and positive suggestions for behaviors that create health risks.

The feedback message library is implemented with jQuery by monitoring the patient’s inputs and display messages according to the feedback message rules. The feedback messages are displayed on an encouraging basis, which provides encouragements for good behaviors and positive suggestions for behaviors that may increase the risk according to the patient’s responses.

Each questionnaire consists of certain numbers of questions whose values are freely entered by the user. We have feedback message rules for combination of some questions or for each question response to meet specific requirements. We list these rules for each question or combination of question types in Appendix J.

Typing Validation Library

In order to ensure the system works properly on the patients’ input, it is necessary to check the input while typing. This typing validation library includes required question input validation, which works together with the questionnaire navigation library to prevent patients from proceeding if they don’t answer those required questions and other input value validation. Since JavaScript can handle expression in string evaluation manner, we take advantage of this feature. For example, we have the rule that the weight should be between 50lbs and 700lbs, we compile the rule as “weight >= 50 && weight <= 700”, we call “eval” method of JavaScript on this

143

rule string, in which “weight” is the variable obtained via jQuery representing the actual patient input. We list all the typing validation rules in Appendix K.

5.3.7.3 Report Generation

Using the patient’s questionnaire responses and computed risks, a personalized report is created for the patient. This report serves as an informative tool for the patient to be able to quickly and easily understand their risks and what can be done to reduce their risks. In addition to the patient, healthcare providers can use the reports as a quick summary of their patient’s health. Numerous graphs and tables are used to provide easy to understand interpretations of the computed risks. We use JavaScript based libraries to implement various elements on the report page.

Please also refer [24][25][26] for all implementation details.

5.3.8 Administration Area

The main functionality for the administration area is to assist administrators to manage the database records, customize questionnaires and evaluate the questionnaire results. At mean time, administrators with different privileges can only access parts of the area. We implement the administration area with the Play

CRUD module, which provides the application with create, read, update and delete functionalities and Secure module, which provide the authentication and authorization for different privileges. The CRUD module provides a set of CRUD templates for all entities via corresponding controller methods. For example, by defining the controller method in this way:

144

@Check("Provider SoftwareAdmin")

@With(Secure.class) public class Patients extends CRUD {

}

The logged-in administrator will be checked the privileges by the Secure module via

@Check(“Provider SoftwareAdmin”) and @With(Secure.class) for the patient entity.

In this case, only administrators with “Provider” and “SoftwareAdmin” privileges can access the Patients controller related views. This Patients controller class can provide all CRUD views by extending the CRUD module as shown in Figure 3.32 and

Figure 3.33. We design the method for implementing all these functionalities.

However, the administration area needs further development.

145

Chapter 6

HealthyLifeHRA Stand-Alone Desktop

Application Development

For some primary care clinical settings, doctors may want to use the HRA in a relatively closed environment other than the Internet, even for their own practice in their offices. Doctors want to ask their patients to take HRA questionnaires and manage all their patients’ questionnaire data and information in their offices. The operating systems may vary for their desktop computers. It is necessary to develop cross platform desktop applications to meet this requirement. We also want to develop these applications to keep the same user experience with other applications of the HealthyLifeHRA application family.

6.1 Background

There is a trend for developing mobile apps with website development technologies, such as HTML5, CSS3 and JavaScript. It is worth mentioning that there are several cross-platform tools for developing mobile applications: Apache Cordova/PhoneGap,

Appcelerator, Adobe AIR, Sencha and Qt [34]. Even taking into account of Adobe AIR and Qt, there are quite few tools for developing cross platform desktop applications.

There are even fewer tools to create desktop with web technologies.

146

Play framework application can be deployed virtually anywhere: inside Servlet containers, as standalone servers, in Google Application Engine, a Cloud, etc. Play provides a method to package the application into a war file in order to deploy it into Java web servers. In this case we don’t have to install the Play distribution in the deployment environment. This prompt us to explore a way of deploying and running the war file into a web server in an integrated environment with a user interface for viewing the web pages.

6.2 Server Implementation

For creating a stand-alone “Desktop” HealthyLifeHRA application, we use the following approach.

1. Generating a war file. In software engineering, a WAR file (or Web application

ARchive) is a JAR file used to distribute a collection of JavaServer Pages, Java

classes, static web pages (HTML and related files) and other resources that

together constitute a web application. So, we first generate a war file with the

Play command:

play war HealthyLifeHRA –o HealthyLifeHRA.war

2. Creating a Java-based web server and Java Servlet Container. Jetty is a pure Java-

based HTTP (Web) server and Java Servlet container. While Web Servers are

usually associated with serving documents to humans, Jetty is now often used

for machine-to-machine communications, usually within larger software

147

frameworks. Jetty is developed as a free and open source project as part of the

Eclipse Foundation. Jetty server has embedded mode, and we deployed the Jetty

server inside the application. In our case, we deploy the embedded Jetty server

into our war file to create a runnable war file. Our approach is borrowed from a

github project “executable war with embedded Jetty” [35]. Figure 6.1 shows the

folder structure for generating the executable war.

Figure 6.1 Folder Structure

We create the “pom.xml” file shown in Figure 6.2 to pack all necessary libraries.

Note that the “webapp” folder contains a folder “WEB-INF”, which is extracted from the war file that we create, and contains all our web application’s required libraries and classes. The “Runner.java” is the main class that starts the Jetty server with port

8088 when the executable war is started.

148

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

4.0.0

edu.cwru.dblab

HealthyLifeHRA-Standalone

war

0.0.1-SNAPSHOT

HealthyLife HRA

http://maven.apache.org

org.eclipse.jetty

jetty-server

${jettyVersion}

provided

org.eclipse.jetty

jetty-webapp

${jettyVersion}

provided

149

org.eclipse.jetty.orbit

org.apache.jasper.

2.2.2.v201112011158

provided

org.eclipse.jetty.orbit

javax.el

2.2.0.v201108011116

provided

HealthyLifeHRA-Standalone

org.apache.maven.plugins

maven-war-plugin

2.3

Runner

org.apache.maven.plugins

maven-antrun-plugin

1.7

main-class-placement

prepare-package

run

151

org.apache.maven.plugins

maven-dependency-plugin

2.5.1

jetty-classpath

prepare-package

unpack-dependencies

org.eclipse.jetty, org.eclipse.jetty.orbit

provided

*, about_files/*, META-INF/*

${project.build.directory}/${project.artifactId}

152

org.apache.maven.plugins

maven-compiler-plugin

2.5.1

1.6

1.6

UTF-8

8.1.7.v20120910

Figure 6.2. “pom.xml” file

3. Running the maven command [36]:

mvn clean install

153

we generate the executable war file “HealthyLIfeHRA-Standalone.war”

integrating Jetty server and our web application resources.

4. Running the executable war with the following command to run a jar file:

java –jar HealthyLifeHRA-Standalone.war

6.3 Creating a MySQL Database and a User

Our web application’s questionnaire interface representation relies on information in questionnaire layout-related tables. Based on the user’s choice of the questionnaire to take, the corresponding questionnaire frame is brought from the database. For the web application, we use MySQL as the database server, which has to be installed and configured before the HealthyLifeHRA application is used.

With the stand-alone “desktop” application, our goal is install the application in an easy and simple manner by administrators (e.g., a nurse or a doctor) with minimal computer science background. To that end, we have explored a way of installing an

HealthyLifeHRA database for a stand-alone desktop-only application, which requires the administrators to perform the following tasks.

a. Install the MySQL DBMS (See Appendix L),

b. Create the HealthyLifeHRA database schema and initialize the database tables

using a script (i.e., an SQL file “hra_initial.sql”) (see Appendix M),

The SQL file “hra_initial.sql” that we created for deployment contains the following commands:

154

1. Create a specific database for the desktop application with the command:

CREATE DATABASE hra;

2. Create a user for this database and grant privileges with the command:

CREATE USER ‘hra_user’@’localhost’ IDENTIFIED BY

‘hra_user_passwd’;

GRANT ALL ON hra.* TO ‘hra_user’@’localhost’;

FLUSH PRIVILEGES;

USE hra;

3. Create tables for this database with the commands listed in section 2.2.2 and

import necessary data with commands like:

INSERT INTO `AnswerPart` (`id`, `createDate`,

`droppedFromUseDate`, `high`, `low`, `name`, `title`,

`inputType`, `unit`)

VALUES

(1,'2014-03-11 14:32:33',NULL,NULL,NULL,'sex',NULL,0,NULL),

(2,'2014-03-11

14:32:33',NULL,'120','18','age',NULL,1,'years'),

...

Once the MySQL server is installed and started, the administrators can run the following command to import the SQL file to the MySQL server: mysql –u root –p < hra_initial.sql

155

6.4 User Interface Implementation

Since we want to provide our desktop application with native application feel, there is usually no way to hide desktop browsers’ address bar and other buttons. Node-

WebKit [37] is a software library that combines the Node.js, a platform built on

Chrome’s JavaScript runtime for easily building fast and scalable network applications [38] and WebKit, an open source browser engine [39]. The browser window of Node-WebKit can be customized according to requirements. It is also available on Mac OS, Linux and Windows. Therefore we choose Node-WebKit to implement our GUI (Graphical User Interface).

Once we have both the GUI and the “server”, we can write a shell script to call these two parts. The script first check if the “server” running status, if the “server” is running, then open the GUI directly, otherwise start the server and open the GUI.

#!/bin/sh cd "$(dirname "$0")"

PROCESS=HealthyLifeHRA-Standalone.war number=$(ps ax | grep -v grep | grep $PROCESS | wc -l)

if [ $number -gt 0 ]

then

open HealthyLifeHRA.app;

else

156

nohup java -XX:MaxDirectMemorySize=1G -Xmx2G -Xms256m -

DMBST_PLATFORM=prod -Dserver.port=8088 -jar HealthyLifeHRA-

Standalone.war 2>/dev/null 1>/dev/null &;

sleep 15;

open HealthyLifeHRA.app; fi

6.5 Integration

Figure 6.2 Platypus Configuration

157

The final step is to pack all these parts into an executable file. For Mac OS, we use

Platypus [40] to pack shell script and dependency files into .app file. We first create a script file called “start.sh” with the commands described in section 6.2. In the

Platypus, we select the script file that we just created and include all needed files and apps in the final .app file according to the Figure 6.2. Finally, by clicking the

“Create” button, the Platypus will generate the final Mac OS app in Figure 6.3.

Figure 6.3 Mac OS App

We can follow the same procedure to create desktop apps for Windows. We first create a batch script file “start.bat” with the commands:

@echo off wmic process where(name="java.exe") get commandline | findstr

"HealthyLifeHRA-Standalone.war"

158

set result=%ERRORLEVEL% if "%result%"=="1" (

echo Server Not Started

java -jar HealthyLifeHRA-Standalone.war

@ping 123.45.67.89 -n 1 -w 25000 >nul 2>&1

HealthyLifeHRA.exe

) else "%result%"=="0" (

echo Server Started

HealthyLifeHRA.exe

)

We use similar software in the Windows called “Bat to Exe Converter” [41] with the configuration showed in Figure 6.4 to convert the batch file to executable file.

159

Figure 6.4 Bat to Exe Convert Configuration

Finally, we got the Windows application running as shown in Figure 6.5.

160

Figure 6.5 Windows App

For the Linux app, we create a similar bash script file to the Mac OS script file and pack the script file, executable war file and the Node-WebKit Linux distribution in to a zip file. The Linux app can be run with the bash script file. We omit the details for

Linux app.

161

Chapter 7

Conclusion and Future Work

7.1 Conclusion

The HealthyLifeHRA web application and desktop applications, developed as part of this thesis and as a guideline for HealthyLifeiPad and HealthyLifeAndroid applications, provides the patient with an interactive and informative interface for questionnaire taking and reporting. The HRA applications maintain questionnaire answers and compute risks indefinitely for future trend analysis, and also produce multiple reports with messages, pictures and bar charts over a range of calculated statistics about the patient’s health status, which highlights potential death risks to the patient. The questions in the questionnaire include basic demographic information, epidemiologic data, and lifestyle information. Since the application tracks all questionnaire answers over time, health providers can use this tool to communicate with patients on their current health status as well as their health risk changes, and individual users can use it to stay aware of their health situation in different time periods, and, thus, take early measures to deal with risks in their lifestyles. Health providers may suggest useful actions for the patient to improve their health situation.

The design and development of the HRA web application has been an evolving process, resulting in three distinct versions. As our understanding grew about the

162

needs of the HRA applications and the relevant technology evolved, we have responded by revising our software architecture and rolling out a new version of the application after thoughtful discussions of the evolving requirements and challenges.

To provide flexible ways of customizing and presenting questionnaires, the notion of “positionless question” has been introduced to achieve this goal where each question had an identifier within its own health category, and could be placed into any (consistent) position within a questionnaire. This was necessary since each question is relatively independent of most of the other questions, and can be used at different questionnaire positions for generating multiple questionnaires. Even though our database design is very sophisticated, the purpose of using of Play framework is to reduce the complexity to the minimum extent. There were so many subtleties during the development process. We made great effort to make all these work properly via quite amount of research. The innovation for the data model design lies on the unique structure for breaking the whole questionnaire into several re-usable components.

To satisfy the database auditing needs, we use a historical database, as medical institutions are required to maintain all of their patient data for certain time periods.

In addition, we employ full data provenance as, over the time, questionnaire questions may change, risk computation formulas and auxiliary tables may vary, and all these changes are recorded and maintained in the database for consistent trend analysis over patients’ lifetimes.

163

To help patients to avoid unnecessary questions and save time, automatic skip patterns for questions or question groups has been introduced, according to patients’ information and answers to previous questions. In order to ensure that the system works properly on the patients’ input, it is necessary to validate the input.

We have also designed a feedback message library to give some messages to patients based on their questionnaire responses.

In order to enforce the patient account safety, several efforts have been made during our development process. We design and implement security mechanism including: authentication with built in secure module of Play framework, password encryption with salted password hashing algorithm and secure client-server HTTP connection.

To allow for the generalized risk computations, the JSON objects containing all the data values were transformed to follow a new format that has enough expressibility to compute current and hypothetical (i.e., when modifiable precursors are removed) risk calculations, and is structured so that it can work in a generalized computation function.

To help doctors who want to ask their patients to take HRA questionnaires and manage all their patients’ questionnaire data and information in a relatively closed environment other than the Internet for some primary care clinical settings, stand- alone desktop applications are designed and developed.

164

7.2 Future Work

Although the HealthyLifeHRA web application and stand-alone desktop applications are fully implemented, they also can be enriched with additional functionalities.

First, since the application deals with a patients’ health information, it must comply with the requirements of the HIPAA. The web application and stand-alone applications provide authentication mechanism to enforce this requirement.

However the web services use an authentication token generated at login to prevent unauthorized access and modifications of user accounts, which may not be enough to prevent all possible attacks.

Another possibility for future work is to add many data analytics capabilities to the application. For example, a trend analysis (i.e., a time series analysis) of the earlier questionnaire results of a user (over, say, a 10 year time period involving 10 different questionnaires) may allow users (or their healthcare providers) to track their health over time with visualizations of their apprised risks over time, and pinpoint possible improvements or existing risk trends more forcefully. The goal of the current HealthlyLife system is to inform users of their current risks and what can be done to reduce those risks. This can be expanded to look into the user’s past in many ways, and see the progress a user has made in reducing their risks over time.

The generated reports do include the action plan to encourage users to set their goals to live healthier, however, it is up to the user to hold themselves accountable and track their own progress.

165

Similar to how the risk engine was simplified using a generalized approach for the risk computations; a rules engine can also be created to handle the various types of rules enforced in the questionnaires. For example, many questions have branching logic rules that determine when the question should be hidden based on responses to other questions. A similar rules-based approach is also used in determining the validations of inputs into text fields and performs behaviors based on the validation.

To reduce the amount of this logic that is hard-coded into the application a new rules language can be defined that could represent all rules in the application. An accompanying rules engine would also need to be created to parse and evaluate the rules and perform their accompanying behavior.

Since we have accumulated several valuable JavaScript resources such as risk engine, questionnaire navigation library, question skip pattern library, feedback message library and typing validation library, we can take advantage of JavaScript fullstack development technologies on the Node.js platform, such as MEAN.io [42] to build more efficient stand-alone desktop applications.

166

Appendices

Appendix A - Facility Type Enum:

 Primary Care Clinic

 Specialty Clinic

 Other Facility Type

Appendix B - Organization Type Enum

 For Profit Hospital/Hospital System

 Not For Profit Hospital/Hospital System

 Private Practice

 Federally Qualified Health Center

 Health Department or Government Agency

 Academic Research Organization

 Insurance/HMO Organization

 Other Employer Organization

Appendix C - Provider Type Enum

 Doctor

 Nurse

167

 PA

 Nurse Practitioner/Advanced Clinical Nurse

 Registered Dietician

 Social Worker

Appendix D – Provider Access Level Enum

 Practice Director

 Assistant Staff

Appendix E – Mortality Table

Below is one of the 36 sex-, age-, race-, and ethnicity-specific mortality tables that are used for the risk calculations. This table is used for 5-year risks of male users who did not specify a specific race.

168

Cause\Age 5 6 7 8 9 10 11 12 13

HIV/AIDS 1.62E-07 3.20E-07 3.20E-07 4.78E-07 4.72E-07 4.72E-07 4.66E-07 4.66E-07 6.01E-07

Mouth Cancer 1.61E-07 0 0 0 0 0 1.52E-07 3.01E-07 4.47E-07

Throat Cancer 1.62E-07 1.62E-07 1.62E-07 1.62E-07 3.19E-07 1.57E-07 1.57E-07 4.54E-07 6.00E-07

Esophageal Cancer 0 0 0 0 1.57E-07 1.57E-07 3.08E-07 3.08E-07 3.08E-07

Stomach Cancer 0 0 0 0 3.13E-07 4.68E-07 6.20E-07 7.69E-07 1.21E-06

Colon Cancer 0 0 0 0 1.57E-07 1.57E-07 3.08E-07 4.57E-07 7.50E-07

Rectal Cancer 0 0 0 0 0 0 0 1.49E-07 2.95E-07

Pancreatic Cancer 4.87E-07 4.87E-07 4.84E-07 4.84E-07 3.22E-07 1.60E-07 3.12E-07 3.01E-07 3.01E-07

Laryngeal Cancer 0 0 0 0 0 0 0 0 0

Lung Cancer 4.87E-07 4.87E-07 4.84E-07 9.58E-07 6.34E-07 7.89E-07 1.40E-06 1.98E-06 2.24E-06

Skin Cancer/Melanoma 0 0 0 0 0 0 1.52E-07 3.01E-07 3.01E-07

Breast Cancer 0 0 1.60E-07 1.60E-07 1.60E-07 1.60E-07 1.60E-07 0 0

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0 0 0 0 0 0 0 0 0

Bladder Cancer 0 0 0 0 0 0 0 0 0

Brain Cancer 4.47E-05 4.13E-05 4.04E-05 3.62E-05 3.29E-05 3.06E-05 2.96E-05 2.70E-05 2.49E-05

Lymphoma 5.35E-06 5.17E-06 5.16E-06 5.76E-06 6.83E-06 6.61E-06 8.72E-06 1.01E-05 1.10E-05

Leukemia 2.70E-05 2.90E-05 3.03E-05 3.13E-05 3.49E-05 3.67E-05 3.91E-05 4.14E-05 4.43E-05

Diabetes Mellitus 1.78E-06 2.57E-06 3.21E-06 4.14E-06 4.45E-06 5.50E-06 5.62E-06 6.46E-06 6.79E-06

Alcohol Toxicity 0 0 0 0 0 0 0 2.97E-07 5.90E-07

Rheumatic Heart Disease 3.24E-07 3.24E-07 4.84E-07 6.42E-07 6.37E-07 6.30E-07 9.34E-07 9.23E-07 9.11E-07

Hypertensive Heart Disease 1.62E-07 1.62E-07 0 0 1.57E-07 3.12E-07 4.64E-07 7.61E-07 9.08E-07

Heart Attack 1.98E-05 1.97E-05 2.07E-05 2.26E-05 2.73E-05 3.20E-05 4.12E-05 5.20E-05 6.74E-05

Stroke 1.12E-05 1.32E-05 1.30E-05 1.31E-05 1.24E-05 1.24E-05 1.20E-05 1.38E-05 1.61E-05

Arterial Vascular Disease 8.11E-07 9.68E-07 1.61E-06 1.45E-06 1.90E-06 2.36E-06 2.96E-06 3.36E-06 4.53E-06

Influenza/Pneumonia 1.62E-05 1.40E-05 1.38E-05 1.30E-05 1.43E-05 1.48E-05 1.55E-05 1.66E-05 1.94E-05

Emphysema/Chronic Bronchitis 9.72E-07 1.29E-06 1.45E-06 1.12E-06 9.52E-07 1.41E-06 1.10E-06 1.23E-06 1.66E-06

169

Pneumoconiosis 8.10E-07 1.13E-06 8.01E-07 6.35E-07 9.49E-07 9.42E-07 7.78E-07 1.37E-06 1.65E-06

Peptic, Gastric, Duodenal Ulcer 1.61E-07 0 0 0 1.57E-07 1.57E-07 3.08E-07 3.08E-07 4.55E-07

Liver Cirrhosis 6.47E-07 4.86E-07 4.86E-07 3.20E-07 1.58E-07 6.24E-07 9.28E-07 1.23E-06 1.36E-06

Kidney Failure 1.62E-07 1.62E-07 1.60E-07 1.60E-07 3.16E-07 3.16E-07 4.68E-07 4.57E-07 6.03E-07

Motor Vehicle Injury 3.98E-05 4.11E-05 4.56E-05 4.73E-05 5.17E-05 6.38E-05 8.38E-05 0.00013364 0.000210353

Pedestrian Injury 3.32E-05 2.81E-05 2.72E-05 2.71E-05 2.98E-05 3.52E-05 4.58E-05 5.47E-05 6.63E-05

Poisoning 3.56E-06 3.39E-06 3.69E-06 4.47E-06 6.96E-06 1.13E-05 2.36E-05 4.55E-05 8.22E-05

Falling 4.69E-06 3.39E-06 3.22E-06 3.68E-06 3.33E-06 4.71E-06 6.82E-06 8.99E-06 1.14E-05

Fire Injury 2.56E-05 2.05E-05 1.95E-05 1.64E-05 1.51E-05 1.44E-05 1.40E-05 1.10E-05 1.27E-05

Drowning 4.58E-05 3.64E-05 3.03E-05 2.91E-05 3.04E-05 3.86E-05 4.96E-05 6.62E-05 8.18E-05

Suicide 2.60E-06 5.12E-06 1.09E-05 2.24E-05 4.42E-05 7.83E-05 0.000133618 0.000213048 0.000313052

Homicide/Assault 2.83E-05 2.74E-05 2.81E-05 3.16E-05 3.72E-05 5.72E-05 0.000103951 0.000192694 0.000330485

All Other Unintentional Injury 0.000107459 9.19E-05 8.81E-05 9.05E-05 9.77E-05 0.000115676 0.000146638 0.000190721 0.000254875

Alzheimers 0 0 0 0 0 0 0 0 0

All Other Causes 0.000282768 0.000292057 0.000297767 0.00030505 0.000321849 0.00034077 0.000378252 0.000454997 0.00056389

TOTAL 0.000705083 0.000680055 0.000687485 0.000710054 0.000778902 0.00090746 0.001149317 0.001553354 0.002135338

170

Cause\Age 14 15 16 17 18 19 20 21 22

HIV/AIDS 2.02E-06 4.31E-06 7.71E-06 1.35E-05 2.05E-05 3.10E-05 3.83E-05 4.84E-05 5.78E-05

Mouth Cancer 4.47E-07 5.90E-07 7.34E-07 1.04E-06 1.20E-06 1.36E-06 1.21E-06 1.07E-06 1.09E-06

Throat Cancer 5.87E-07 1.45E-06 1.45E-06 2.21E-06 3.14E-06 3.77E-06 3.53E-06 4.30E-06 3.56E-06

Esophageal Cancer 2.95E-07 4.38E-07 4.34E-07 5.86E-07 8.93E-07 1.37E-06 1.22E-06 1.54E-06 1.86E-06

Stomach Cancer 1.75E-06 2.60E-06 3.49E-06 6.06E-06 8.54E-06 1.08E-05 1.27E-05 1.63E-05 1.94E-05

Colon Cancer 1.02E-06 1.88E-06 2.17E-06 3.54E-06 4.78E-06 6.52E-06 7.67E-06 1.03E-05 1.16E-05

Rectal Cancer 4.38E-07 7.25E-07 8.73E-07 1.33E-06 1.49E-06 1.81E-06 2.92E-06 3.85E-06 4.19E-06

Pancreatic Cancer 3.01E-07 3.01E-07 4.45E-07 4.47E-07 9.08E-07 1.22E-06 1.84E-06 2.47E-06 3.11E-06

Laryngeal Cancer 0 0 0 0 0 0 1.55E-07 1.55E-07 1.55E-07

Lung Cancer 2.24E-06 2.37E-06 2.50E-06 2.97E-06 3.01E-06 4.70E-06 5.81E-06 6.77E-06 7.61E-06

Skin Cancer/Melanoma 8.73E-07 1.45E-06 3.37E-06 4.58E-06 6.27E-06 8.17E-06 1.05E-05 1.30E-05 1.47E-05

Breast Cancer 0 1.43E-07 2.91E-07 2.91E-07 2.91E-07 2.91E-07 1.48E-07 0 1.58E-07

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0 0 0 1.51E-07 1.51E-07 3.06E-07 3.06E-07 3.06E-07 1.54E-07

Bladder Cancer 0 1.43E-07 1.43E-07 4.46E-07 4.46E-07 4.46E-07 6.13E-07 9.22E-07 6.19E-07

Brain Cancer 2.30E-05 2.46E-05 2.63E-05 2.56E-05 3.00E-05 3.29E-05 3.22E-05 3.40E-05 3.91E-05

Lymphoma 1.34E-05 1.60E-05 1.89E-05 2.37E-05 2.69E-05 2.94E-05 3.23E-05 3.43E-05 3.38E-05

Leukemia 4.58E-05 4.78E-05 5.00E-05 5.52E-05 5.89E-05 6.21E-05 6.60E-05 6.92E-05 6.65E-05

Diabetes Mellitus 9.60E-06 1.15E-05 1.59E-05 2.04E-05 2.42E-05 2.88E-05 3.50E-05 3.88E-05 4.21E-05

Alcohol Toxicity 7.33E-07 7.33E-07 1.03E-06 1.49E-06 2.58E-06 4.13E-06 5.53E-06 7.55E-06 9.63E-06

Rheumatic Heart Disease 8.97E-07 8.85E-07 5.81E-07 1.34E-06 1.19E-06 1.21E-06 1.22E-06 1.99E-06 1.87E-06

Hypertensive Heart Disease 1.61E-06 2.31E-06 4.97E-06 6.49E-06 8.65E-06 1.21E-05 1.65E-05 1.94E-05 2.28E-05

Heart Attack 8.32E-05 9.97E-05 0.000124663 0.000145536 0.00016071 0.000175334 0.00020004 0.000217539 0.000243795

Stroke 1.78E-05 1.97E-05 2.13E-05 2.20E-05 2.26E-05 2.48E-05 2.91E-05 3.30E-05 3.65E-05

Arterial Vascular Disease 5.18E-06 5.55E-06 5.97E-06 6.75E-06 7.73E-06 8.77E-06 1.07E-05 1.37E-05 1.44E-05

Influenza/Pneumonia 2.15E-05 2.20E-05 2.82E-05 3.28E-05 3.72E-05 4.06E-05 4.61E-05 5.05E-05 5.56E-05

Emphysema/Chronic Bronchitis 2.22E-06 1.60E-06 2.04E-06 2.05E-06 2.38E-06 2.59E-06 3.21E-06 3.23E-06 4.35E-06

171

Pneumoconiosis 2.34E-06 3.62E-06 5.10E-06 5.71E-06 6.96E-06 8.28E-06 9.48E-06 9.86E-06 1.05E-05

Peptic, Gastric, Duodenal Ulcer 2.98E-07 5.85E-07 5.81E-07 1.19E-06 1.35E-06 1.66E-06 1.37E-06 1.53E-06 1.71E-06

Liver Cirrhosis 1.65E-06 2.04E-06 3.07E-06 3.83E-06 6.00E-06 7.72E-06 1.03E-05 1.48E-05 1.94E-05

Kidney Failure 4.47E-07 4.47E-07 5.91E-07 8.96E-07 1.21E-06 1.52E-06 2.29E-06 2.31E-06 2.01E-06

Motor Vehicle Injury 0.000336435 0.000460035 0.000583812 0.000698537 0.000780784 0.000794697 0.00079743 0.00078694 0.000749091

Pedestrian Injury 7.77E-05 9.37E-05 0.00010262 0.000118168 0.000124908 0.000131779 0.000135008 0.000136699 0.000131467

Poisoning 0.000158329 0.000254865 0.000373032 0.000505418 0.000629115 0.000735279 0.000828615 0.000900144 0.000965781

Falling 1.75E-05 2.38E-05 3.09E-05 4.03E-05 4.86E-05 5.36E-05 5.71E-05 5.80E-05 5.91E-05

Fire Injury 1.25E-05 1.42E-05 1.71E-05 1.92E-05 1.94E-05 2.13E-05 2.29E-05 2.32E-05 2.55E-05

Drowning 0.000100385 0.000114828 0.000125697 0.000130326 0.00013094 0.00012735 0.000121232 0.000121457 0.00011639

Suicide 0.000438106 0.000571067 0.000694832 0.000821353 0.000934001 0.001014545 0.00106545 0.001103407 0.001101117

Homicide/Assault 0.000527116 0.000727736 0.00092038 0.001073832 0.001165507 0.001189462 0.001180959 0.001138807 0.001098357

All Other Unintentional Injury 0.000363286 0.00049529 0.000646776 0.000810596 0.000950963 0.001066913 0.001163837 0.001237532 0.001298436

Alzheimers 0 0 0 0 0 0 0 0 1.58E-07

All Other Causes 0.000701717 0.000859104 0.000957336 0.001012486 0.001058976 0.00100749 0.000936294 0.000847118 0.00075286

TOTAL 0.002969867 0.003885103 0.004777462 0.005611491 0.006279788 0.006640791 0.006880567 0.006997339 0.007011175

172

Cause\Age 23 24 25 26 27 28 29 30 31

HIV/AIDS 7.13E-05 8.35E-05 0.000100138 0.000111354 0.000125395 0.000139914 0.000149826 0.000172444 0.000197173

Mouth Cancer 1.25E-06 1.57E-06 1.73E-06 2.70E-06 4.61E-06 5.51E-06 5.72E-06 6.43E-06 7.02E-06

Throat Cancer 3.26E-06 2.80E-06 3.15E-06 2.86E-06 3.40E-06 3.30E-06 3.84E-06 3.92E-06 4.29E-06

Esophageal Cancer 2.18E-06 2.66E-06 3.79E-06 4.29E-06 5.18E-06 6.43E-06 7.74E-06 9.21E-06 1.15E-05

Stomach Cancer 2.15E-05 2.47E-05 2.90E-05 3.30E-05 3.84E-05 4.81E-05 5.63E-05 6.64E-05 7.69E-05

Colon Cancer 1.26E-05 1.48E-05 1.86E-05 2.00E-05 2.42E-05 3.16E-05 3.54E-05 4.11E-05 5.01E-05

Rectal Cancer 5.76E-06 6.87E-06 7.73E-06 8.25E-06 1.19E-05 1.38E-05 1.55E-05 1.65E-05 2.09E-05

Pancreatic Cancer 2.80E-06 3.75E-06 3.94E-06 4.77E-06 6.20E-06 7.41E-06 9.42E-06 1.26E-05 1.55E-05

Laryngeal Cancer 3.11E-07 4.68E-07 4.74E-07 4.74E-07 6.45E-07 6.59E-07 5.02E-07 5.14E-07 8.56E-07

Lung Cancer 9.50E-06 1.05E-05 1.23E-05 1.52E-05 1.76E-05 1.97E-05 2.38E-05 3.10E-05 3.76E-05

Skin Cancer/Melanoma 1.81E-05 1.98E-05 2.17E-05 2.30E-05 2.80E-05 3.07E-05 3.20E-05 3.37E-05 3.77E-05

Breast Cancer 1.58E-07 1.58E-07 4.80E-07 8.00E-07 6.42E-07 9.83E-07 9.83E-07 8.35E-07 8.56E-07

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 3.11E-07 3.13E-07 3.13E-07 3.13E-07 3.13E-07 1.57E-07 0 0 0

Bladder Cancer 7.76E-07 9.33E-07 7.84E-07 6.35E-07 8.05E-07 1.50E-06 1.86E-06 3.61E-06 4.13E-06

Brain Cancer 3.81E-05 4.33E-05 4.80E-05 5.17E-05 5.64E-05 6.03E-05 6.24E-05 6.82E-05 7.21E-05

Lymphoma 3.73E-05 3.90E-05 4.32E-05 4.47E-05 4.72E-05 5.06E-05 5.64E-05 5.72E-05 6.14E-05

Leukemia 6.51E-05 6.49E-05 6.66E-05 6.63E-05 7.01E-05 7.07E-05 7.14E-05 7.40E-05 7.46E-05

Diabetes Mellitus 4.73E-05 5.19E-05 5.77E-05 6.49E-05 7.36E-05 8.34E-05 9.53E-05 0.000111233 0.000123946

Alcohol Toxicity 1.18E-05 1.38E-05 1.67E-05 1.98E-05 2.52E-05 3.00E-05 3.48E-05 3.96E-05 4.49E-05

Rheumatic Heart Disease 2.50E-06 2.50E-06 2.83E-06 2.69E-06 3.10E-06 3.84E-06 4.72E-06 4.93E-06 4.80E-06

Hypertensive Heart Disease 2.68E-05 3.17E-05 3.85E-05 4.74E-05 5.80E-05 7.31E-05 8.54E-05 9.79E-05 0.000108788

Heart Attack 0.000271578 0.00030925 0.000338905 0.000378503 0.000424955 0.000477093 0.000529456 0.000592216 0.000664148

Stroke 3.94E-05 4.37E-05 4.62E-05 5.51E-05 6.53E-05 7.44E-05 8.42E-05 9.58E-05 0.000107226

Arterial Vascular Disease 1.41E-05 1.61E-05 1.85E-05 2.05E-05 2.41E-05 2.79E-05 3.09E-05 3.32E-05 3.45E-05

Influenza/Pneumonia 5.82E-05 6.25E-05 6.46E-05 6.53E-05 6.56E-05 6.87E-05 7.00E-05 7.42E-05 7.70E-05

Emphysema/Chronic Bronchitis 4.84E-06 5.48E-06 5.99E-06 8.41E-06 8.01E-06 8.65E-06 9.49E-06 1.11E-05 1.15E-05

173

Pneumoconiosis 1.15E-05 1.20E-05 1.08E-05 1.20E-05 1.25E-05 1.33E-05 1.39E-05 1.49E-05 1.30E-05

Peptic, Gastric, Duodenal Ulcer 2.19E-06 2.19E-06 3.16E-06 3.33E-06 2.71E-06 2.95E-06 2.98E-06 2.37E-06 2.74E-06

Liver Cirrhosis 2.60E-05 3.17E-05 4.02E-05 5.26E-05 6.72E-05 8.03E-05 9.42E-05 0.000114324 0.000131608

Kidney Failure 1.86E-06 1.87E-06 1.26E-06 2.07E-06 2.76E-06 3.30E-06 3.85E-06 4.56E-06 3.95E-06

Motor Vehicle Injury 0.000710115 0.000675693 0.000643107 0.000602372 0.000572032 0.000542167 0.00052552 0.000507196 0.000507176

Pedestrian Injury 0.000132976 0.00013049 0.000128918 0.000129492 0.000130152 0.000127415 0.000125307 0.000122964 0.00011956

Poisoning 0.001027683 0.001072423 0.001120547 0.001143097 0.001152934 0.001156108 0.001152027 0.001113621 0.001103552

Falling 5.77E-05 5.83E-05 6.08E-05 6.57E-05 6.60E-05 6.57E-05 6.65E-05 6.38E-05 6.26E-05

Fire Injury 2.63E-05 2.70E-05 2.77E-05 2.81E-05 2.60E-05 2.70E-05 2.64E-05 2.50E-05 2.52E-05

Drowning 0.000109314 0.000104706 0.000101211 9.28E-05 8.96E-05 8.65E-05 8.39E-05 7.75E-05 7.37E-05

Suicide 0.001082594 0.001074374 0.001073937 0.001058672 0.00106637 0.001071998 0.001077395 0.001076839 0.001094752

Homicide/Assault 0.001044793 0.000997831 0.000977166 0.000953315 0.000914039 0.000884873 0.000842991 0.000781608 0.000730728

All Other Unintentional Injury 0.001357514 0.00140407 0.00145225 0.001475893 0.001484339 0.001487013 0.001485405 0.00143817 0.001426511

Alzheimers 1.58E-07 3.15E-07 3.15E-07 3.15E-07 1.57E-07 1.57E-07 0 0 0

All Other Causes 0.000657549 0.000592584 0.000509609 0.000497616 0.000489035 0.000444636 0.000446986 0.000535934 0.000591787

TOTAL 0.006998193 0.007025296 0.007085383 0.007152516 0.007246345 0.007312867 0.007405178 0.007516455 0.007714931

174

Cause\Age 32 33 34 35 36 37 38 39 40

HIV/AIDS 0.000220421 0.000242193 0.000270266 0.000294042 0.000315287 0.000347178 0.000396827 0.000441776 0.000493499

Mouth Cancer 6.50E-06 7.10E-06 9.23E-06 1.10E-05 1.23E-05 1.42E-05 1.68E-05 1.96E-05 2.37E-05

Throat Cancer 5.65E-06 7.26E-06 8.90E-06 1.03E-05 1.12E-05 1.28E-05 1.47E-05 1.74E-05 2.12E-05

Esophageal Cancer 1.32E-05 1.61E-05 2.01E-05 2.42E-05 3.00E-05 3.77E-05 4.55E-05 5.19E-05 6.40E-05

Stomach Cancer 8.96E-05 0.000105033 0.000118288 0.000132159 0.000151047 0.000164142 0.000183601 0.000210781 0.000242608

Colon Cancer 5.76E-05 6.75E-05 7.92E-05 8.86E-05 9.96E-05 0.000109985 0.000125288 0.000144615 0.000166851

Rectal Cancer 2.28E-05 2.62E-05 3.27E-05 3.76E-05 4.24E-05 5.02E-05 5.76E-05 6.33E-05 7.21E-05

Pancreatic Cancer 1.82E-05 2.32E-05 2.79E-05 3.45E-05 4.23E-05 5.47E-05 7.09E-05 8.48E-05 0.000105262

Laryngeal Cancer 1.37E-06 1.52E-06 2.46E-06 3.53E-06 4.62E-06 5.41E-06 6.87E-06 1.02E-05 1.30E-05

Lung Cancer 4.73E-05 6.08E-05 7.20E-05 8.44E-05 0.000101764 0.000132084 0.000166401 0.000215376 0.00027481

Skin Cancer/Melanoma 3.97E-05 4.17E-05 4.70E-05 5.24E-05 5.63E-05 6.59E-05 7.43E-05 8.27E-05 9.12E-05

Breast Cancer 1.20E-06 1.51E-06 1.98E-06 1.96E-06 2.26E-06 2.90E-06 2.57E-06 3.20E-06 3.50E-06

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 6.81E-07 1.01E-06 1.01E-06 1.47E-06 2.75E-06 2.88E-06 3.53E-06 5.41E-06 8.31E-06

Bladder Cancer 5.15E-06 5.61E-06 6.97E-06 7.24E-06 8.78E-06 1.05E-05 1.25E-05 1.58E-05 1.85E-05

Brain Cancer 7.71E-05 8.70E-05 9.42E-05 9.91E-05 0.000104384 0.000112121 0.000122051 0.000131181 0.000148524

Lymphoma 6.48E-05 6.48E-05 6.69E-05 7.13E-05 7.58E-05 8.23E-05 8.76E-05 9.43E-05 0.000101387

Leukemia 7.55E-05 7.85E-05 8.49E-05 8.67E-05 8.87E-05 9.36E-05 9.95E-05 0.000106577 0.000117998

Diabetes Mellitus 0.000134796 0.00015325 0.000169512 0.000187317 0.000213954 0.000248256 0.000278049 0.000312776 0.000356652

Alcohol Toxicity 4.83E-05 5.34E-05 6.66E-05 7.89E-05 8.95E-05 0.000106527 0.000128207 0.000142828 0.000162916

Rheumatic Heart Disease 4.45E-06 4.07E-06 4.13E-06 4.22E-06 4.82E-06 4.46E-06 5.10E-06 6.52E-06 6.96E-06

Hypertensive Heart Disease 0.000124069 0.000134156 0.000149901 0.000165342 0.000187772 0.000208424 0.00023567 0.000265373 0.000294304

Heart Attack 0.000741127 0.000841496 0.000949063 0.001073599 0.00122492 0.001404249 0.001604047 0.001818743 0.002088097

Stroke 0.000121991 0.000138628 0.000152619 0.000176585 0.000194666 0.000217041 0.000244596 0.000286845 0.000326794

Arterial Vascular Disease 3.67E-05 4.53E-05 5.31E-05 5.93E-05 6.70E-05 7.32E-05 7.67E-05 7.78E-05 8.38E-05

Influenza/Pneumonia 8.29E-05 8.61E-05 9.63E-05 0.000102412 0.000114465 0.000124441 0.000137319 0.000144101 0.000162496

Emphysema/Chronic Bronchitis 1.58E-05 1.93E-05 2.36E-05 2.90E-05 3.42E-05 3.99E-05 4.96E-05 6.17E-05 7.81E-05

175

Pneumoconiosis 1.29E-05 1.21E-05 1.24E-05 1.46E-05 1.67E-05 1.93E-05 2.17E-05 2.37E-05 2.66E-05

Peptic, Gastric, Duodenal Ulcer 3.25E-06 3.53E-06 5.07E-06 6.90E-06 8.75E-06 1.00E-05 1.13E-05 1.35E-05 1.41E-05

Liver Cirrhosis 0.000153516 0.000180245 0.000217454 0.000248724 0.000290027 0.000342259 0.000401706 0.000472846 0.000561032

Kidney Failure 3.94E-06 3.91E-06 4.46E-06 4.37E-06 4.81E-06 5.59E-06 5.91E-06 7.33E-06 8.08E-06

Motor Vehicle Injury 0.000498419 0.000487626 0.000474398 0.000460096 0.000447975 0.000449788 0.000460409 0.000464297 0.000478649

Pedestrian Injury 0.000115246 0.000113968 0.000114264 0.000113575 0.000118556 0.000126218 0.000133871 0.000139081 0.000141556

Poisoning 0.001088896 0.001080315 0.001079501 0.001099751 0.001108942 0.001137215 0.001162737 0.001175903 0.001212543

Falling 6.21E-05 6.93E-05 7.30E-05 7.90E-05 8.37E-05 9.53E-05 0.000103756 0.000111781 0.000124767

Fire Injury 2.69E-05 2.55E-05 2.65E-05 2.83E-05 3.16E-05 3.45E-05 3.61E-05 4.01E-05 4.37E-05

Drowning 6.89E-05 7.01E-05 7.09E-05 7.57E-05 7.30E-05 7.85E-05 7.89E-05 8.00E-05 7.91E-05

Suicide 0.001101385 0.001133789 0.001149211 0.001171995 0.001190707 0.001218836 0.001235101 0.00124672 0.001280025

Homicide/Assault 0.000681507 0.000637423 0.000598304 0.000556171 0.000518684 0.00048923 0.000460247 0.00044392 0.000433517

All Other Unintentional Injury 0.001410172 0.001418209 0.001422196 0.001461255 0.001478729 0.001535741 0.001570807 0.001605855 0.001667547

Alzheimers 0 0 1.57E-07 3.12E-07 6.30E-07 7.94E-07 1.44E-06 2.07E-06 2.37E-06

All Other Causes 0.00068969 0.000811799 0.000938856 0.001013293 0.001185468 0.001322796 0.001481726 0.001690936 0.001915404

TOTAL 0.007950743 0.008335255 0.008767332 0.009220133 0.009803988 0.010550279 0.01136401 0.012278485 0.013449149

176

Cause\Age 41 42 43 44 45 46 47 48 49

HIV/AIDS 0.000538579 0.000573834 0.000589887 0.000597964 0.00059006 0.000588822 0.000581918 0.000571492 0.000558761

Mouth Cancer 2.96E-05 3.39E-05 3.98E-05 4.39E-05 5.12E-05 5.64E-05 6.79E-05 7.72E-05 8.87E-05

Throat Cancer 2.57E-05 3.15E-05 3.84E-05 4.46E-05 5.41E-05 6.41E-05 7.33E-05 8.23E-05 9.62E-05

Esophageal Cancer 8.00E-05 9.72E-05 0.000123957 0.000150971 0.000181779 0.000215582 0.000255737 0.000292254 0.000340275

Stomach Cancer 0.000274774 0.000324388 0.000369 0.000415389 0.000462804 0.000525292 0.000578729 0.000648447 0.000730606

Colon Cancer 0.000190888 0.000221973 0.000251528 0.000283107 0.000318543 0.000365571 0.000410534 0.000463791 0.000525614

Rectal Cancer 8.42E-05 9.29E-05 0.000106717 0.000118172 0.000135991 0.000146539 0.000169097 0.000183363 0.000202683

Pancreatic Cancer 0.000121677 0.000144218 0.000168572 0.000208478 0.000247904 0.000302273 0.000358466 0.000419865 0.000475556

Laryngeal Cancer 1.61E-05 2.16E-05 2.82E-05 3.57E-05 4.66E-05 6.24E-05 7.29E-05 8.52E-05 9.64E-05

Lung Cancer 0.000358474 0.000457687 0.000588767 0.000739303 0.000932997 0.001135598 0.001368261 0.001628107 0.001912633

Skin Cancer/Melanoma 0.000105338 0.000112041 0.000124857 0.000139134 0.000156822 0.000166765 0.000183035 0.00020065 0.000220132

Breast Cancer 3.61E-06 3.82E-06 4.97E-06 4.75E-06 6.49E-06 7.24E-06 7.86E-06 9.01E-06 1.06E-05

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 1.18E-05 1.69E-05 2.44E-05 3.56E-05 4.63E-05 6.07E-05 7.97E-05 0.000103242 0.000130066

Bladder Cancer 2.43E-05 3.05E-05 3.81E-05 4.26E-05 5.65E-05 6.63E-05 7.62E-05 9.15E-05 0.000109735

Brain Cancer 0.000163207 0.000174187 0.000189755 0.000206977 0.00021662 0.000237284 0.000257504 0.000282187 0.000301082

Lymphoma 0.00011285 0.000124372 0.000136597 0.000146512 0.00015954 0.000173805 0.000192103 0.000210617 0.000236503

Leukemia 0.000130506 0.000141435 0.00016393 0.000176561 0.000194714 0.000218817 0.000248155 0.000275495 0.000307298

Diabetes Mellitus 0.000397886 0.000443662 0.000504504 0.000554525 0.000613073 0.000677894 0.000746917 0.00082072 0.000914145

Alcohol Toxicity 0.000192375 0.000215686 0.000240667 0.000270253 0.000297236 0.000323389 0.000351377 0.000374183 0.000395941

Rheumatic Heart Disease 8.09E-06 1.12E-05 1.18E-05 1.19E-05 1.48E-05 1.51E-05 1.63E-05 1.70E-05 1.91E-05

Hypertensive Heart Disease 0.000329597 0.000374468 0.00041987 0.000460482 0.000503265 0.000551569 0.000585531 0.000623919 0.000666669

Heart Attack 0.002378758 0.002725272 0.003099511 0.003513693 0.003948789 0.004460075 0.004954772 0.005517417 0.006153151

Stroke 0.000373066 0.000420587 0.000476668 0.000524577 0.00057765 0.000644119 0.000713956 0.00078164 0.00085961

Arterial Vascular Disease 9.17E-05 0.000100226 0.000110415 0.000127087 0.000142593 0.000152544 0.000166344 0.000184441 0.000198231

Influenza/Pneumonia 0.000171782 0.000186023 0.000198846 0.000214939 0.000230666 0.000254307 0.000275083 0.000304858 0.000330062

Emphysema/Chronic Bronchitis 0.000100538 0.000130642 0.000161568 0.000197135 0.000241796 0.000297952 0.000369416 0.000449452 0.000553575

177

Pneumoconiosis 3.13E-05 3.61E-05 3.88E-05 4.49E-05 4.61E-05 5.19E-05 5.79E-05 6.91E-05 7.73E-05

Peptic, Gastric, Duodenal Ulcer 1.50E-05 1.91E-05 2.17E-05 2.38E-05 2.83E-05 3.18E-05 3.22E-05 3.64E-05 4.05E-05

Liver Cirrhosis 0.000646349 0.000744321 0.000861726 0.000972787 0.001092233 0.001216958 0.001352584 0.001478533 0.00160515

Kidney Failure 8.77E-06 9.51E-06 1.18E-05 1.04E-05 1.42E-05 1.67E-05 2.02E-05 2.44E-05 3.08E-05

Motor Vehicle Injury 0.000477167 0.000481604 0.000482169 0.000491466 0.000496699 0.00050758 0.000503909 0.000501272 0.000499242

Pedestrian Injury 0.000145105 0.000151313 0.000153172 0.000158809 0.000167852 0.00016944 0.000168167 0.000169611 0.000169796

Poisoning 0.001256841 0.001298206 0.001338151 0.001373231 0.001380523 0.001368898 0.001352808 0.001314588 0.001276646

Falling 0.000136151 0.000145062 0.000155261 0.000171964 0.00018076 0.000201732 0.000216606 0.000231363 0.000244026

Fire Injury 4.42E-05 4.59E-05 5.14E-05 5.49E-05 6.07E-05 6.27E-05 6.52E-05 6.86E-05 7.19E-05

Drowning 8.57E-05 8.81E-05 9.02E-05 9.14E-05 9.33E-05 9.46E-05 9.07E-05 8.94E-05 8.91E-05

Suicide 0.001314793 0.00135875 0.00138512 0.001421805 0.001438094 0.001464441 0.001468726 0.0014812 0.001491844

Homicide/Assault 0.000422261 0.000407147 0.000396803 0.000382596 0.00036708 0.000357852 0.000344977 0.000332382 0.0003143

All Other Unintentional Injury 0.00174095 0.001803599 0.001872234 0.001937755 0.001977815 0.002000264 0.002002856 0.001992466 0.001976649

Alzheimers 3.40E-06 4.13E-06 4.66E-06 5.05E-06 6.64E-06 7.54E-06 9.97E-06 1.13E-05 1.23E-05

All Other Causes 0.002149422 0.002356035 0.002536834 0.002809054 0.003098447 0.003469959 0.003983769 0.004572187 0.00512868

TOTAL 0.014713136 0.016064094 0.017498622 0.019079916 0.020719272 0.022604661 0.024608931 0.026807243 0.029149882

178

Cause\Age 50 51 52 53 54 55 56 57 58

HIV/AIDS 0.000552641 0.000549899 0.000538629 0.000521482 0.000514536 0.000491856 0.000455242 0.000419968 0.000387317

Mouth Cancer 0.000100388 0.000118129 0.000129965 0.000141699 0.000150163 0.00016016 0.000168829 0.000187049 0.000200259

Throat Cancer 0.000109471 0.000122118 0.000135228 0.000150792 0.000161373 0.000168954 0.000177703 0.000185766 0.000189302

Esophageal Cancer 0.000387098 0.00043727 0.00049044 0.00054185 0.000601837 0.000681276 0.000768393 0.000837125 0.000939556

Stomach Cancer 0.000814534 0.000895433 0.000996595 0.001093651 0.001196738 0.001305891 0.001442642 0.001563331 0.001709169

Colon Cancer 0.00058805 0.000651976 0.000722707 0.0008012 0.000875948 0.000958743 0.001056052 0.001150729 0.001258389

Rectal Cancer 0.000215176 0.000239238 0.000261259 0.000282735 0.00030706 0.00033254 0.000355831 0.000373931 0.000402197

Pancreatic Cancer 0.000538215 0.000609672 0.000680913 0.000764859 0.00085922 0.000947587 0.001044474 0.001161581 0.001277073

Laryngeal Cancer 0.000107992 0.000118784 0.000131891 0.000148424 0.00016468 0.000182775 0.000206322 0.000224849 0.000238748

Lung Cancer 0.002202746 0.002517883 0.002871893 0.003222644 0.003601689 0.004043624 0.004549013 0.005043071 0.00561517

Skin Cancer/Melanoma 0.00024349 0.000269575 0.000301408 0.000330589 0.000363016 0.000393334 0.000432705 0.000463561 0.000496822

Breast Cancer 1.26E-05 1.48E-05 1.70E-05 1.83E-05 1.96E-05 2.02E-05 2.27E-05 2.53E-05 2.99E-05

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0.000167233 0.00020997 0.000260318 0.000320323 0.000378197 0.000456618 0.000547551 0.000644386 0.000753313

Bladder Cancer 0.000127474 0.00015602 0.000182303 0.000207412 0.000232191 0.000259476 0.000291451 0.000327053 0.000368199

Brain Cancer 0.000328585 0.000351583 0.000382175 0.000404869 0.000439876 0.00046941 0.000510437 0.000548477 0.000578991

Lymphoma 0.000270909 0.000303187 0.000334882 0.000373772 0.000417255 0.000453616 0.000495754 0.000544065 0.000588615

Leukemia 0.000338244 0.00038185 0.000430528 0.000480945 0.000547268 0.000617709 0.000696324 0.000783777 0.000894737

Diabetes Mellitus 0.00100091 0.001110664 0.001241014 0.001354547 0.001495687 0.001633118 0.00178344 0.001944081 0.002123453

Alcohol Toxicity 0.000414892 0.00041947 0.000429722 0.000444704 0.000450837 0.000461301 0.000467757 0.000458953 0.000446763

Rheumatic Heart Disease 2.11E-05 2.27E-05 2.40E-05 2.98E-05 3.17E-05 3.35E-05 3.64E-05 3.84E-05 4.08E-05

Hypertensive Heart Disease 0.000719989 0.000758176 0.000811269 0.000863442 0.000917141 0.0009489 0.000984175 0.001014936 0.001040649

Heart Attack 0.006775738 0.007439426 0.00814561 0.008869606 0.009588327 0.010370258 0.011224193 0.012037742 0.012952449

Stroke 0.000946103 0.001031037 0.001126562 0.001229116 0.001328186 0.001432246 0.001553869 0.00166087 0.001792887

Arterial Vascular Disease 0.000213021 0.000242559 0.00027215 0.000295572 0.000328604 0.00035991 0.000393235 0.000434729 0.000482425

Influenza/Pneumonia 0.000359906 0.000388207 0.000426256 0.000461382 0.000499888 0.000533019 0.000580684 0.000614039 0.000662279

Emphysema/Chronic Bronchitis 0.000659986 0.000776983 0.000898516 0.001058241 0.001221025 0.001423605 0.001652077 0.001901862 0.002180299

179

Pneumoconiosis 9.11E-05 9.94E-05 0.000110884 0.000124462 0.000135856 0.000145241 0.000169478 0.000189711 0.000207227

Peptic, Gastric, Duodenal Ulcer 4.32E-05 4.82E-05 5.47E-05 5.93E-05 6.37E-05 7.16E-05 7.50E-05 7.84E-05 8.22E-05

Liver Cirrhosis 0.001721344 0.001843912 0.001944529 0.002020126 0.002067258 0.002117111 0.002130234 0.002094185 0.002065811

Kidney Failure 3.38E-05 3.92E-05 4.38E-05 4.77E-05 5.23E-05 5.52E-05 6.12E-05 6.46E-05 7.30E-05

Motor Vehicle Injury 0.000487532 0.000485281 0.000479494 0.00047207 0.000461648 0.000459155 0.000452029 0.000442582 0.000437988

Pedestrian Injury 0.000166771 0.000167007 0.000168084 0.000172269 0.000166371 0.000160977 0.000155936 0.000152171 0.000140825

Poisoning 0.001236844 0.00119681 0.001128549 0.00105841 0.000985372 0.000901651 0.000808191 0.000706887 0.000624945

Falling 0.000263476 0.000276661 0.000295705 0.00031414 0.00032991 0.000342289 0.000356029 0.000369543 0.000383048

Fire Injury 7.10E-05 7.49E-05 7.63E-05 7.66E-05 7.68E-05 7.71E-05 8.05E-05 8.42E-05 8.66E-05

Drowning 9.06E-05 9.08E-05 9.05E-05 9.22E-05 9.44E-05 9.28E-05 8.97E-05 8.89E-05 8.99E-05

Suicide 0.001490275 0.001479207 0.001475384 0.001456117 0.0014394 0.001417661 0.00138305 0.001327665 0.001273459

Homicide/Assault 0.000301866 0.000283793 0.000269369 0.00025685 0.000242889 0.000229522 0.000216669 0.000200757 0.000184952

All Other Unintentional Injury 0.001951402 0.001939172 0.001897848 0.001848887 0.001800225 0.001735219 0.001660679 0.001589111 0.001538467

Alzheimers 1.46E-05 1.78E-05 2.06E-05 3.08E-05 3.98E-05 5.25E-05 6.75E-05 8.51E-05 0.000100963

All Other Causes 0.005717905 0.006380037 0.006880389 0.007448195 0.007943868 0.008515309 0.009008448 0.009810439 0.010555787

TOTAL 0.031533742 0.034132574 0.036686794 0.039324267 0.041947608 0.044778708 0.047776171 0.050925081 0.054411708

180

Cause\Age 59 60 61 62 63 64 65 66 67

HIV/AIDS 0.000357587 0.000334235 0.000316104 0.000294243 0.000276102 0.000254599 0.000229494 0.000210959 0.000201869

Mouth Cancer 0.000217718 0.000229901 0.000241315 0.000244394 0.00025467 0.000262319 0.000277535 0.000285271 0.000298864

Throat Cancer 0.00019818 0.000203713 0.000214174 0.000217177 0.000225889 0.000232913 0.000243022 0.000241406 0.00023778

Esophageal Cancer 0.00102001 0.001105417 0.001176825 0.001256808 0.001309745 0.001398753 0.001450228 0.001526132 0.001604213

Stomach Cancer 0.001876117 0.002059097 0.002234375 0.002424755 0.002638804 0.002833204 0.003057359 0.003268198 0.003551779

Colon Cancer 0.00137519 0.001514512 0.001654476 0.001805339 0.001956642 0.002115295 0.002274153 0.00243261 0.00262831

Rectal Cancer 0.000431025 0.000476614 0.000505775 0.000542147 0.000566243 0.000604305 0.000617585 0.000655705 0.000688597

Pancreatic Cancer 0.001401712 0.00155599 0.001682866 0.001822098 0.001944543 0.002088765 0.002240005 0.002388236 0.002521095

Laryngeal Cancer 0.000261699 0.000285207 0.000303008 0.000331565 0.000355098 0.000375272 0.000397968 0.000417097 0.000417942

Lung Cancer 0.006311441 0.007087069 0.00796157 0.008924847 0.009963407 0.010997876 0.01196669 0.012954607 0.013892362

Skin Cancer/Melanoma 0.000533269 0.000576776 0.00061376 0.000656448 0.000708117 0.000765002 0.000797908 0.000849026 0.000887907

Breast Cancer 3.23E-05 3.61E-05 3.86E-05 4.10E-05 4.06E-05 4.67E-05 4.86E-05 5.06E-05 5.10E-05

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0.000896144 0.0010513 0.001214826 0.00141112 0.00162313 0.001857652 0.002113619 0.002469856 0.002788585

Bladder Cancer 0.000438566 0.000505681 0.000571053 0.000654592 0.000741443 0.000822485 0.000896601 0.00098627 0.001070277

Brain Cancer 0.000614984 0.000650823 0.000690618 0.000728292 0.000769363 0.000806666 0.000833273 0.000862798 0.000883628

Lymphoma 0.000650984 0.000733582 0.000803506 0.00087932 0.000986882 0.001075165 0.001155618 0.001268513 0.001374476

Leukemia 0.001010039 0.00114211 0.001265761 0.001408976 0.001528626 0.001671179 0.001891132 0.002104446 0.002327301

Diabetes Mellitus 0.00228282 0.002492552 0.002685893 0.002880737 0.003103254 0.003325788 0.003565806 0.003822931 0.004092725

Alcohol Toxicity 0.000444035 0.000426087 0.00041545 0.000409122 0.00039897 0.000388697 0.000377511 0.000364909 0.000351994

Rheumatic Heart Disease 4.49E-05 4.99E-05 5.42E-05 5.91E-05 6.38E-05 6.94E-05 7.06E-05 7.57E-05 8.67E-05

Hypertensive Heart Disease 0.001073247 0.001114336 0.001139241 0.001164028 0.001179441 0.001190882 0.001207953 0.001240132 0.001264869

Heart Attack 0.014003367 0.015279102 0.016451091 0.017801378 0.019146375 0.020563754 0.022011278 0.023686554 0.025578656

Stroke 0.001950321 0.002158107 0.002364269 0.00262 0.002917068 0.003264343 0.003624142 0.004028431 0.004478261

Arterial Vascular Disease 0.000527547 0.000605378 0.000678275 0.000765927 0.000858523 0.000967764 0.001075498 0.001191185 0.001279037

Influenza/Pneumonia 0.000726807 0.000791658 0.000867544 0.000975022 0.00107416 0.001184974 0.001310017 0.001481376 0.001659699

Emphysema/Chronic Bronchitis 0.002547393 0.002988119 0.003473059 0.004037732 0.004683819 0.005350415 0.00606384 0.006860333 0.007708759

181

Pneumoconiosis 0.000227475 0.000265411 0.000288364 0.000307517 0.00032977 0.000367617 0.000414432 0.000476808 0.00055518

Peptic, Gastric, Duodenal Ulcer 8.51E-05 8.48E-05 9.37E-05 9.75E-05 0.000104337 0.000106728 0.000117142 0.000117863 0.000127179

Liver Cirrhosis 0.00205524 0.002018025 0.001986504 0.001991666 0.001957684 0.001935711 0.001907696 0.001911183 0.001883928

Kidney Failure 8.59E-05 9.86E-05 0.000109136 0.000124671 0.00014184 0.00015094 0.000176079 0.000208964 0.000246513

Motor Vehicle Injury 0.000439335 0.000438446 0.0004331 0.000425345 0.000410812 0.00039746 0.000389016 0.000384549 0.0003909

Pedestrian Injury 0.000136374 0.00013883 0.000137254 0.000139873 0.00014728 0.00015791 0.000155439 0.000161502 0.000158717

Poisoning 0.000544818 0.000470223 0.000406768 0.000357 0.000317288 0.000280022 0.000248775 0.000220242 0.000204198

Falling 0.000406192 0.000448231 0.000476566 0.000505579 0.000551175 0.000602117 0.000651237 0.000721672 0.000827483

Fire Injury 8.96E-05 9.27E-05 9.42E-05 9.63E-05 0.000103314 0.000104892 0.000111487 0.000112154 0.000117355

Drowning 8.64E-05 8.85E-05 8.76E-05 8.47E-05 8.15E-05 8.25E-05 8.28E-05 8.80E-05 9.32E-05

Suicide 0.001225924 0.001191292 0.001164482 0.001157566 0.001158558 0.001156979 0.001155159 0.001162227 0.001167792

Homicide/Assault 0.00018039 0.00017042 0.00016186 0.000159891 0.000159603 0.000152466 0.000151762 0.000147547 0.000144259

All Other Unintentional Injury 0.001490283 0.001469083 0.001449098 0.001454964 0.001485107 0.001524759 0.001578124 0.001652999 0.001781256

Alzheimers 0.000125134 0.000153209 0.000190664 0.000239271 0.000302718 0.0003807 0.00047815 0.00059935 0.000760032

All Other Causes 0.011618981 0.012443505 0.013635548 0.014788596 0.015917984 0.016932499 0.018363068 0.019883391 0.021549168

TOTAL 0.058761242 0.063544848 0.06860592 0.074257972 0.080113367 0.086099123 0.092588555 0.099847799 0.107590911

182

Cause\Age 68 69 70 71 72 73 74 75 76

HIV/AIDS 0.000190324 0.000175525 0.000161931 0.000146039 0.000132695 0.000118728 0.000107316 9.58E-05 8.21E-05

Mouth Cancer 0.000327413 0.000345404 0.000357694 0.000376581 0.000383269 0.000374382 0.0003879 0.00041347 0.000418408

Throat Cancer 0.000234298 0.000237163 0.000235109 0.000229346 0.000242635 0.000255738 0.000259858 0.00026624 0.000286662

Esophageal Cancer 0.001676628 0.001715378 0.001788171 0.001848848 0.001903198 0.002012672 0.002109978 0.002162016 0.002256321

Stomach Cancer 0.00382761 0.00412683 0.004409184 0.004752192 0.005047082 0.00537173 0.005741642 0.006121541 0.006492963

Colon Cancer 0.002836407 0.003070933 0.003285588 0.003522463 0.003749439 0.004017644 0.004264 0.004557851 0.004870843

Rectal Cancer 0.000726699 0.000753941 0.000801784 0.000836983 0.000877984 0.000899292 0.000941268 0.000971007 0.001029271

Pancreatic Cancer 0.002670574 0.002819389 0.002945364 0.003172585 0.003362474 0.003554289 0.00373249 0.003928175 0.004081611

Laryngeal Cancer 0.000442325 0.000458136 0.000466995 0.000477733 0.000509264 0.000523466 0.000541445 0.000564631 0.000582212

Lung Cancer 0.014796007 0.015679709 0.016663311 0.017603351 0.018560113 0.019506168 0.020483527 0.021362313 0.02227978

Skin Cancer/Melanoma 0.000947205 0.000990337 0.001070512 0.001145277 0.001244804 0.001335232 0.00145821 0.00158066 0.001711533

Breast Cancer 5.84E-05 5.90E-05 6.26E-05 7.13E-05 7.58E-05 7.37E-05 7.84E-05 8.17E-05 8.10E-05

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0.00316567 0.003577207 0.003998657 0.004441471 0.00499039 0.005589725 0.006294044 0.007078066 0.007966529

Bladder Cancer 0.001184334 0.00129396 0.001450644 0.001613795 0.001796148 0.002007288 0.002235734 0.002462305 0.002725488

Brain Cancer 0.0009164 0.00095409 0.000997995 0.001032548 0.001087865 0.001124205 0.001153521 0.001184716 0.001207247

Lymphoma 0.001502001 0.001622387 0.001755779 0.001915595 0.002126642 0.002339412 0.002568107 0.002767894 0.003008905

Leukemia 0.002597867 0.002843493 0.003050105 0.003297114 0.003551496 0.003823359 0.004153858 0.004506342 0.004878705

Diabetes Mellitus 0.004400414 0.004728534 0.00503458 0.005427078 0.005824194 0.006222692 0.006650701 0.007074167 0.007557638

Alcohol Toxicity 0.000340118 0.000320514 0.000306761 0.000298861 0.000290819 0.000278142 0.000261231 0.000254339 0.00024413

Rheumatic Heart Disease 9.18E-05 0.000101867 0.000115924 0.00013736 0.000155574 0.000176703 0.000203235 0.000224388 0.000240386

Hypertensive Heart Disease 0.001324131 0.001376909 0.001451444 0.00154155 0.001652743 0.001776467 0.001904015 0.002015397 0.002171398

Heart Attack 0.027826659 0.0303289 0.033201954 0.036537372 0.040159547 0.044233229 0.048693785 0.053565522 0.059235413

Stroke 0.005021554 0.005592312 0.006220344 0.006999938 0.007874795 0.008842203 0.009901268 0.011126892 0.012509718

Arterial Vascular Disease 0.001432262 0.001587826 0.001737484 0.001933709 0.002170034 0.002368148 0.002592882 0.00286853 0.00315807

Influenza/Pneumonia 0.001875083 0.002086568 0.002354828 0.002671398 0.003039421 0.003467966 0.004011371 0.004594429 0.0052513

Emphysema/Chronic Bronchitis 0.008642159 0.009645982 0.010771875 0.01195519 0.013191248 0.014507896 0.015959126 0.017422739 0.019005247

183

Pneumoconiosis 0.000648671 0.000767331 0.00089257 0.001019573 0.001179687 0.001378605 0.001600406 0.001862896 0.002196098

Peptic, Gastric, Duodenal Ulcer 0.00013878 0.000152098 0.00016466 0.000182722 0.000192348 0.000211745 0.00023973 0.000272663 0.000305246

Liver Cirrhosis 0.001904169 0.001911322 0.001910516 0.001898364 0.00191346 0.001920787 0.001908305 0.001916036 0.001928728

Kidney Failure 0.000281068 0.000332204 0.000365744 0.000418491 0.00047451 0.000547025 0.000653074 0.000755188 0.000883118

Motor Vehicle Injury 0.000394317 0.000392528 0.000403868 0.00041279 0.00041132 0.000430856 0.000455957 0.000468849 0.000481529

Pedestrian Injury 0.00015607 0.000160963 0.000168774 0.000172106 0.000186065 0.000197647 0.000207031 0.00021631 0.0002262

Poisoning 0.000178224 0.000164455 0.000158026 0.000150234 0.000151029 0.000153557 0.00015433 0.000148173 0.000156584

Falling 0.000933914 0.001064196 0.001179549 0.001352348 0.001522788 0.001752153 0.002009455 0.002338161 0.002706782

Fire Injury 0.000121796 0.000132185 0.000134547 0.000146124 0.000146971 0.000154997 0.000159615 0.000165372 0.000169628

Drowning 0.000101322 0.000100008 0.00010479 0.000107495 0.000112474 0.000109948 0.000117401 0.000117946 0.000116406

Suicide 0.001182659 0.001223308 0.001247059 0.001279747 0.001336972 0.001386839 0.00139937 0.001466544 0.001523357

Homicide/Assault 0.000140744 0.000132824 0.000129781 0.000123796 0.000119178 0.000112838 0.000117731 0.000115628 0.000118404

All Other Unintentional Injury 0.001915003 0.002084999 0.002243894 0.002482992 0.002705792 0.003008628 0.003361074 0.003794955 0.00428404

Alzheimers 0.000972577 0.001256926 0.001613183 0.002059501 0.002578904 0.0032282 0.004027533 0.004952784 0.006040412

All Other Causes 0.023535501 0.026144288 0.028988615 0.032367283 0.035714517 0.039506407 0.043733875 0.048551277 0.053833177

TOTAL 0.116537566 0.126452321 0.137228532 0.149586604 0.1625451 0.17674264 0.192307095 0.209051047 0.227540095

184

Cause\Age 77 78 79 80 81 82 83 84 85

HIV/AIDS 7.45E-05 6.68E-05 6.33E-05 5.52E-05 5.49E-05 4.76E-05 4.32E-05 3.12E-05 2.87E-05

Mouth Cancer 0.000452376 0.000470933 0.000496928 0.000510748 0.000529183 0.000527563 0.000532526 0.000503542 0.000452782

Throat Cancer 0.000282025 0.000276623 0.0002811 0.000286122 0.000276405 0.000278055 0.000256214 0.00021311 0.000174775

Esophageal Cancer 0.002365147 0.002400164 0.0024508 0.002510874 0.002463629 0.002367026 0.002212282 0.002015228 0.001746212

Stomach Cancer 0.006930162 0.007338343 0.007736052 0.008255106 0.008600632 0.008717303 0.008584833 0.008209197 0.007468762

Colon Cancer 0.005226662 0.005575592 0.005939587 0.006361655 0.006627639 0.006723207 0.006574053 0.006278527 0.005746195

Rectal Cancer 0.001070419 0.001161904 0.001212848 0.001290565 0.001343016 0.001416236 0.00149674 0.001625284 0.001723865

Pancreatic Cancer 0.004250244 0.004430896 0.004610258 0.004789236 0.004827015 0.004806525 0.004587517 0.004237426 0.003730877

Laryngeal Cancer 0.000590647 0.000605196 0.000616749 0.000623249 0.000624541 0.000604309 0.000579897 0.000535538 0.000470209

Lung Cancer 0.023111488 0.023755638 0.024157052 0.024659111 0.024245535 0.023196515 0.021584494 0.019411423 0.016432339

Skin Cancer/Melanoma 0.001836683 0.001963932 0.002067014 0.002151012 0.002208787 0.002256048 0.002225387 0.002131167 0.001960341

Breast Cancer 8.27E-05 8.98E-05 0.000102965 0.000113852 0.000117748 0.00012134 0.000126926 0.000110045 9.39E-05

Cervical Cancer NA NA NA NA NA NA NA NA NA

Uterine Cancer NA NA NA NA NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA NA NA NA NA

Prostatic Cancer 0.008915923 0.010050734 0.011163546 0.012535298 0.013670343 0.014540864 0.015033165 0.015150073 0.014479727

Bladder Cancer 0.003047148 0.003348483 0.003734515 0.004188389 0.00445533 0.004640827 0.004699684 0.00458932 0.004279049

Brain Cancer 0.001195378 0.001206547 0.001190864 0.001193816 0.001186524 0.001166661 0.001079289 0.000980798 0.000832735

Lymphoma 0.003218783 0.003433344 0.003635865 0.003942189 0.004085872 0.004192378 0.004109263 0.003912979 0.003528605

Leukemia 0.005239968 0.005671676 0.006016734 0.006374225 0.006514502 0.006511738 0.006283337 0.005931 0.005264481

Diabetes Mellitus 0.008136682 0.008683921 0.009300438 0.010032183 0.010518903 0.010842917 0.010804163 0.01046665 0.009608002

Alcohol Toxicity 0.000240596 0.000248239 0.000246332 0.00024606 0.000240412 0.000225554 0.000196488 0.000178484 0.000149534

Rheumatic Heart Disease 0.000269482 0.000295052 0.00032461 0.0003635 0.000402013 0.000418617 0.000435096 0.000421351 0.00039889

Hypertensive Heart Disease 0.002354023 0.002570086 0.00279689 0.003166641 0.003475838 0.003761356 0.00395667 0.004064679 0.003952231

Heart Attack 0.065868828 0.073446389 0.082234771 0.09243884 0.101549704 0.108565206 0.113048393 0.114363542 0.111285282

Stroke 0.014077316 0.01583036 0.017941273 0.020279922 0.022331284 0.023836594 0.024669789 0.024753477 0.023728369

Arterial Vascular Disease 0.003479091 0.003831576 0.00420964 0.00464728 0.005050391 0.005370067 0.005531511 0.005546081 0.005305996

Influenza/Pneumonia 0.005969146 0.006886323 0.007890791 0.009192138 0.010357307 0.011339746 0.011989823 0.012415396 0.01217763

Emphysema/Chronic Bronchitis 0.020735876 0.022664227 0.0245273 0.026560009 0.028041724 0.028770856 0.028564779 0.027410404 0.025329795

185

Pneumoconiosis 0.002586736 0.003027885 0.003539904 0.004194895 0.004738751 0.005212321 0.005554861 0.00571583 0.005632169

Peptic, Gastric, Duodenal Ulcer 0.000345087 0.000376335 0.000418131 0.000459454 0.000507547 0.000527684 0.000541605 0.000531388 0.000505742

Liver Cirrhosis 0.001937996 0.001944868 0.001939253 0.001905842 0.001808748 0.001685188 0.001524639 0.001352913 0.001156596

Kidney Failure 0.001050211 0.001232847 0.001410095 0.001674313 0.001884097 0.002072077 0.002224452 0.002312379 0.002291115

Motor Vehicle Injury 0.000494418 0.000505611 0.000522079 0.000535337 0.000540843 0.000546531 0.000523156 0.000482719 0.000438885

Pedestrian Injury 0.000225612 0.000235651 0.00024717 0.000255705 0.000282648 0.000289925 0.000275901 0.000244549 0.000219127

Poisoning 0.000147929 0.000142977 0.000151782 0.000173699 0.000177351 0.000174281 0.000186217 0.00016975 0.00013821

Falling 0.003130647 0.003539412 0.004034907 0.004632235 0.005162757 0.005613187 0.006024604 0.006144594 0.005982122

Fire Injury 0.000176378 0.000180974 0.00020705 0.000223649 0.000235533 0.000245122 0.000238213 0.000208023 0.00018169

Drowning 0.00011512 0.00011911 0.00011922 0.000117961 0.000120307 0.000114812 0.000113011 0.000112695 9.82E-05

Suicide 0.001590247 0.001661735 0.001735792 0.001787552 0.0018447 0.001811273 0.001711708 0.001601895 0.001443996

Homicide/Assault 0.000121349 0.000120014 0.000116988 0.000107156 0.000100978 9.49E-05 8.72E-05 8.24E-05 7.30E-05

All Other Unintentional Injury 0.004841286 0.005402395 0.006112929 0.006973924 0.007736351 0.008322389 0.008860999 0.008954057 0.008633881

Alzheimers 0.00730216 0.008833133 0.010515689 0.012663131 0.014653229 0.01647178 0.017890272 0.018846238 0.018710843

All Other Causes 0.059833506 0.066714557 0.074070803 0.082033219 0.05913666 0.040378206 0.025157208 0.014602642 0.011767112

TOTAL 0.247957366 0.270283291 0.294011134 0.320793951 0.318932953 0.315970262 0.309627266 0.299670847 0.284527571

186

Cause\Age 86 87 88 89 90

HIV/AIDS 2.00E-05 1.30E-05 6.07E-06 3.47E-06 0

Mouth Cancer 0.000399242 0.000342435 0.000292719 0.000257875 0.00024222

Throat Cancer 0.000136318 9.97E-05 8.23E-05 7.53E-05 6.49E-05

Esophageal Cancer 0.00149304 0.001276393 0.001129728 0.001020772 0.00099021

Stomach Cancer 0.006598181 0.005838924 0.00526754 0.00485428 0.004628639

Colon Cancer 0.005104293 0.004542043 0.004139799 0.003836633 0.003645627

Rectal Cancer 0.001837159 0.001934171 0.001993421 0.002014591 0.002036194

Pancreatic Cancer 0.003162837 0.002645098 0.002288834 0.00202871 0.001884616

Laryngeal Cancer 0.000415657 0.000383972 0.000347209 0.000330531 0.00033304

Lung Cancer 0.013631435 0.011405583 0.009758735 0.008699358 0.008200594

Skin Cancer/Melanoma 0.00173743 0.00151021 0.001333052 0.001211011 0.001158771

Breast Cancer 8.33E-05 7.63E-05 6.23E-05 6.06E-05 6.06E-05

Cervical Cancer NA NA NA NA NA

Uterine Cancer NA NA NA NA NA

Ovarian Cancer NA NA NA NA NA

Prostatic Cancer 0.013572173 0.012746184 0.011959876 0.011369558 0.011153663

Bladder Cancer 0.003914102 0.003537951 0.003234899 0.002978759 0.002808594

Brain Cancer 0.000669205 0.000536595 0.000453765 0.000402363 0.00038061

Lymphoma 0.003082072 0.002642326 0.002329334 0.002119405 0.001992593

Leukemia 0.004586031 0.004004368 0.003500267 0.003130681 0.002972593

Diabetes Mellitus 0.008653957 0.007700226 0.00704696 0.006550353 0.006402989

Alcohol Toxicity 0.000118942 9.37E-05 7.45E-05 6.06E-05 5.19E-05

Rheumatic Heart Disease 0.000372233 0.000350119 0.0003316 0.000328804 0.000328716

Hypertensive Heart Disease 0.003788995 0.003599685 0.003423634 0.003314402 0.003270326

Heart Attack 0.105713991 0.100443972 0.095692018 0.091933121 0.09001326

Stroke 0.022094238 0.020618127 0.019357366 0.018280916 0.017772355

Arterial Vascular Disease 0.004926516 0.004559761 0.004278483 0.004065123 0.003969072

Influenza/Pneumonia 0.011760776 0.011375762 0.011014698 0.010648924 0.010531872

Emphysema/Chronic Bronchitis 0.022617071 0.020268618 0.018331381 0.017061448 0.016236297

187

Pneumoconiosis 0.00542709 0.005188826 0.004971158 0.004799011 0.004654497

Peptic, Gastric, Duodenal Ulcer 0.000465009 0.000448887 0.000431165 0.000421379 0.000415206

Liver Cirrhosis 0.000981425 0.000832935 0.00071693 0.00064025 0.000614109

Kidney Failure 0.002241032 0.00216236 0.002082607 0.002025123 0.001996912

Motor Vehicle Injury 0.000383575 0.000334575 0.000303954 0.000278644 0.00025952

Pedestrian Injury 0.00017359 0.000149081 0.000137674 0.00013586 0.000134092

Poisoning 0.000122365 0.000118773 0.000101314 9.69E-05 9.95E-05

Falling 0.00568237 0.005370418 0.005035007 0.00483688 0.004744996

Fire Injury 0.000157094 0.000138689 0.000128162 0.000120282 0.000121116

Drowning 7.99E-05 6.85E-05 4.94E-05 3.03E-05 2.60E-05

Suicide 0.001228449 0.001065827 0.00097049 0.000887624 0.000838919

Homicide/Assault 6.16E-05 4.86E-05 4.25E-05 3.03E-05 3.03E-05

All Other Unintentional Injury 0.008153089 0.007734764 0.007250469 0.006970329 0.00686339

Alzheimers 0.01820881 0.017575269 0.016871125 0.016234897 0.016001452

All Other Causes 0.048463004 0.078243803 0.101838383 0.118749688 0.126780274

TOTAL 0.295787068 0.303867189 0.309897723 0.314061321 0.315944757

Appendix F – HealthCategory List

 Basic Information

 Blood Pressure

 Smoking Related

 Driving Related

 Gender Related

 Physical Related

 Food Related

188

 Mental Health

 Other

 Medical Conditions

 Falls

 Immunizations and Checkups

 Activities and Functions

 Mobility

 Social Support

 Dental, Hearing and Vision Checkups

 Home Safety

 Nutrition

 Demographics

Appendix G – QuestionGroup List

 Sex (ML1)

 Age (ML2)

 Height (ML3)

 Weight (ML4)

 Body Frame Size (ML5)

 Diabetes Stroke Heart (ML6, X2 - X4)

 Blood Pressure Medication (ML7)

 Blood Pressure (ML8)

189

 Estimate Blood Pressure (ML9)

 Cholesterol Level (ML10)

 HDL Cholesterol (ML11)

 Smoking (ML15)

 Used to Smoke (ML17a - ML17b)

 Still Smoke (ML16)

 Daily Cigar (ML12)

 Daily Pipe (ML13)

 Daily Tobacco (ML14)

 Travel Miles (ML18a - ML18b)

 Travel Method (ML19)

 Safety Belt Usage (ML20)

 Driving Speed (ML21)

 Drinking and Driving (ML22)

 Drinking (ML23a, ML23b)

 Men Only (ML33)

 Women Only (ML24 - ML32)

 Home Safety (ML34)

 Overall Health (ML35)

 Weekly Physical Activity (ML36)

 Helmet Usage (ML37)

 Healthy Food (ML38)

190

 High Cholesterol Food (ML39)

 Mental Health (PHQa - PHQi)

 Stage Of Change (SOC_SMOK, SOC_ALC, SOC_NUT, SOC_EXE)

 Misfortune or Life Impact (ML41)

 Race and Origin (ML42a - ML42b)

 Education (HEALTH_LIT - ML43)

 Medical Conditions (X5, X12, X7 - X10, X13 - X16)

 Falls (X17 - X20)

 Immunizations and Checkups (X26, X27, X29)

 Activities and Functions (F4 - F11)

 Mobility (F2, F18, F17, F21, F20, F19, F22)

 Social Support (B13, B12)

 Dental, Hearing, Vision Checkups (H1 - H3)

 Vision (H4 - H7, H9, H8, H10, H11)

 Hearing (H12 - H21)

 Home Safety (E2, E4, E7 - E10)

 Nutrition (N3, N7, N21)

 Demographics (D1, D3 - D6, D8)

 Falls (X21, ML23b, ML23c)

 Falls (X24, X25)

 Immunizations and Checkups (X28)

 Activities and Functions (F12 - F14)

191

 Activities and Functions (F15, F16)

 Activities and Functions (F1, F3)

 Social Support (B1 - B12)

 Home Safety (E1 - E13)

 Nutrition (N1 - N12, N14 - N19, N21 - N26)

Appendix H – Response Type (AnswerPart)

 sex radio

 age text

 heightFoot text

 heightInch text

 weight text

 bodySize dropdown

 diabetes radio

 X2 radio

 X3 radio

 X4 radio

 bloodPressureMedicine radio

 bloodPressureHigh text

 bloodPressureLow text

 bloodPressureEstimate dropdown

 totalCholesterol text

192

 hdlCholesterol text

 cigaretteSmoking radio

 usedToSmokeYear text

 usedToSmokeCigarette text

 ML17c text

 ML17d text

 stillSmoke text

 dailyCigar text

 dailyPipe text

 dailyTobacco text

 travelMilesCar text

 travelMilesMotorcycle text

 travelMethod dropdown

 buckleBelt text

 closeToSpeedLimit dropdown

 drinkDrive text

 weeklyBeer text

 weeklyWine text

 weeklyCooler text

 weeklyMixed text

 BINGE_DRINK radio

 rectalProstateExam dropdown

193

 firstPeriod text

 ageBearChild text

 mammogram dropdown

 breastCancerWomen text

 hysterectomy dropdown

 papSmearTest dropdown

 lumpExam dropdown

 breastExam dropdown

 rectalExam dropdown

 violentActivity radio

 physicalHealth dropdown

 physicalActivity dropdown

 helmetUsage dropdown

 healthyFood radio

 highCholesterolFood radio

 SOC_SMOK dropdown

 SOC_ALC dropdown

 SOC_NUT dropdown

 SOC_EXE dropdown

 misfortune dropdown

 PHQa dropdown

 PHQb dropdown

194

 PHQc dropdown

 PHQd dropdown

 PHQe dropdown

 PHQf dropdown

 PHQg dropdown

 PHQh dropdown

 PHQi dropdown

 race dropdown

 hispanicOrigin radio

 HEALTH_LIT dropdown

 education dropdown

 X5 radio

 X12 radio

 X7 radio

 X8 radio

 X9 radio

 X10 radio

 X13 radio

 X14 radio

 X15 radio

 X16 radio

 X17 radio

195

 X18 radio

 X19 radio

 X20 radio

 X21 radio

 ML23b radio

 ML23c text

 X24 radio

 X25 radio

 X26 radio

 X27 radio

 X29 dropdown

 X28 dropdown

 F4 radio

 F5 radio

 F6 radio

 F7 radio

 F8 radio

 F9 radio

 F10 radio

 F11 radio

 F12 radio

 F13 radio

196

 F14 radio

 F15 radio

 F16 radio

 F1 dropdown

 F3 dropdown

 F2 radio

 F18 radio

 F17 radio

 F21 radio

 F20 radio

 F19 radio

 F22 radio

 B13 dropdown

 B12 dropdown

 H1 dropdown

 H2 dropdown

 H3 dropdown

 E2 radio

 E4 radio

 E7 radio

 E8 radio

 E9 radio

197

 E10 radio

 N3 radio

 N7 radio

 N21 radio

 D1 text

 D3 dropdown

 D4 dropdown

 D5 radio

 D6 dropdown

 D8 radio

 H4 radio

 H5 radio

 H6 radio

 H7 radio

 H9 radio

 H8 radio

 H10 radio

 H11 radio

 H12 radio

 H13 radio

 H14 radio

 H15 radio

198

 H16 radio

 H17 radio

 H18 radio

 H19 radio

 H20 radio

 H21 radio

 B1 dropdown

 B2 dropdown

 B3 dropdown

 B4 dropdown

 B5 dropdown

 B6 dropdown

 B7 dropdown

 B8 dropdown

 B9 radio

 B10 dropdown

 B11 dropdown

 E1 radio

 E3 radio

 E5 radio

 E6 radio

 E11 radio

199

 E12 radio

 E13 radio

 N1 radio

 N2 radio

 N4 radio

 N5 radio

 N6 radio

 N8 radio

 N9 radio

 N10 radio

 N11 radio

 N12 radio

 N14 radio

 N15 radio

 N16 radio

 N17 radio

 N18 radio

 N19 radio

 N22 radio

 N23 radio

 N24 radio

 N25 radio

200

 N26 radio

Appendix I – Question Skip Pattern

Question variables Rules

If Never smoked go to ML14

If Used to smoke go to ML17a and [ML15] ML17b

If Still Smoke go to ML16

[If drinks of alcohol [SUM (ML23a_a

+ ML23a_b + ML23a_c + ML23a_d)] [BINGE_DRINK] > 4

Display this question.

[If SMOKING [ML15] = Answer

[SOC_SMOKE] Value 3]

Display this question.

201

[If drinks of alcohol [SUM

(ML23a_a + ML23a_b + ML23a_c +

ML23a_d)] > 14/week for men; [SOC_ALC] >7/week for women] OR If binge

drinking[BINGE_DRINK] = Yes

Display this question.

[If BMI > 25] OR

[If Blood Pressure [ML8] > 130/80]

OR

[If Diabetes [ML6] = Yes] OR

[If Total Cholesterol [ML10] is >

[SOC_NUT] 200] OR

[If HDL [ML11] < 45 for men; <55

for women] OR

[If High Fiber Food [ML38] = No]

OR

[If High Fat Food [ML39] = Yes]

202

Display this question.

[If Physical Activity [ML36] =

[SOC_EXE] Answer Value 1 or 2]

Display this question.

[If X7 = No] [X24]

Display this question.

[If X7 = No] [X25]

Display this question.

[If Yes] skip to F21 [F2] [If No] go to F18

203

[If No] skip to F21 [F18] [If Yes] go to F17

[F21] [If No] skip to F22

[F20] [If No] skip to F22

[If Yes] go to F19

[H4] [If Yes] skip to H9

[If Yes] skip to H9 [H5] [If No] go to H6

204

[H6] [If Yes] skip to H9

[If No] go to H7

[H9] [If Yes] skip to H8

[If No] go to H10

Appendix J – Feedback Message Rules

Condition/Criteria Real Time Message

Cigarette risk = 0 & Cigar risk = 0 & Pipe risk = 0 Not smoking is the single best thing you

[ML16] [ML12] [ML13] can do for your health.

Drinks/week < 4 & drunken trips = 0 Remember: Alcohol in moderation is

[ML23a] [ML22] best.

Mammography = < 1 year ago & Getting regular checkups can help clinical Breast exam < 1 year ago [ML26] promote breast health.

205

Pap smear risk = < 1 year ago & Getting regular checkups can help hysterectomy = no [ML29] [ML28] detect problems early on.

Systolic BP < 140 & Diastolic BP < Great job keeping your BP under 90 & BP Medicine = yes [ML8] [ML7] control! Give yourself a pat on the back!

Blood pressure < 140/90 & BP Your BP is at a good level. Give yourself Medicine = no [ML8] [ML7] a pat on the back!

Good job, your cholesterol is in a good Cholesterol < 180 (age < 30) range. Keeping your cholesterol in this

Cholesterol < 200 (age >= 30) range lowers your risk for heart

[ML10] problems or stroke.

HDL is “good cholesterol” and in general HDL of 55 or more (sex = male) the higher the number the better. Your [ML11] HDL is great!

HDL of 65 or more (sex = female, age HDL is “good cholesterol” and in general

< 40) the higher the number the better. Your

[ML11] HDL is great!

HDL is “good cholesterol” and in general HDL of 60 or more (sex = female, age the higher the number the better. Your < 65) HDL is great!

206

[ML11]

HDL of 55 or more (sex = female, age HDL is “good cholesterol” and in general

~ 65) the higher the number the better. Your

[ML11] HDL is great!

BMI < 25 You’re doing great with your weight! Hypertension risk = 0

Safety belt use = 100% Fantastic! Seat belts save lives! [ML20]

Activity level = 3 times per week Your activity level promotes lifelong

[ML36] health.

Flu shot = Yes Protecting yourself against the flu is a

good health decision! [X27]

Wellness Visit with Healthcare Staying in touch regularly with your Provider = Answer Value 1 or 2 Provider will help you stay healthy. [X28]

207

Do you ever walk a mile [F2] Answer Walking is a great way to maintain your value = Yes independence. [F2]

How many relatives do you feel close Having good relationships is good for your to? = Answer value > 0 health! [B3]

About when was the last time you saw a dentist about your teeth? = Healthy mouth = healthy life. Answer value L or 1

[H1]

Does your home have a smoke Great job keeping your home detector? = Yes safe…remember to have the batteries

[E12] checked twice a year.

I eat alone most of the time. = No Having someone to share meals with is

[N23] just as important as what you eat.

208

Appendix K – Typing Validation Rules

Outside of Still

range outside of

Variable Integer Message range Question Name value behavior

for

software

ML2 What is your Age? 18 - 120 N/A N/A

Please enter Do not

a value allow user

between 2 to proceed 2 – 7 for and 7 (feet). until a feet valid value ML3 What is your height? Please enter 0 – 11 for is entered. a value inches between 0

and 11

(inches).

Please enter Do not

a value allow user ML4 What is your Weight? 50 - 700 between 50 to proceed

and 700. until a

209

valid value

is entered.

What is your blood pressure ML8 See below now?

Please Do not

Enter a allow user

Value to proceed Blood Pressure Systolic 70 - 200 Between 70 until a

and 200. valid value

is entered.

Please Do not

Enter a allow user

Value to proceed Blood Pressure Diastolic 40 - 120 Between 40 until a

and 120. valid value

is entered.

Are you Round out

Sure? of range

What is your TOTAL cholesterol values to ML10 90 - 400 (based on a blood test)? minimum

or

maximum

210

(whichever

is closest).

Are you Round out

sure? of range

What is your HDL cholesterol values to ML11 25 -100 (based on a blood test)? minimum

and

maximum.

Are you Treat How may cigars to you usually ML12 0 - 10 Sure? entries >10 smoke per day? as 10

Are you Treat How many pipes of tobacco do ML13 0 - 10 Sure? entries >10 you usually smoke per day? as 10

Are you Treat How many times per day to you ML14 0 - 10 Sure? entries >10 usually use smokeless tobacco? as 10

Are you Treat How may cigarettes a day do you ML16 0 - 80 Sure? values >80 smoke? as 80.

ML17a How many years has it been 0 - 80 Are you Treat

211

since you smoked cigarettes Sure? values >80

fairly regularly? as 80.

What was the average number of Are you Treat

cigarettes per day that you Sure? values >80 ML17b 0 - 80 smoked I the 2 years before you as 80.

quit?

What was the average number of Are you Treat

ML17c cigars per day that you smoked 0 - 10 Sure? entries >10

the 2 years before you quit? as 10

What was the average number of Are you Treat

ML17d pipes per day that you smoked 0 - 10 Sure? entries >10

the 2 years before you quit? as 10

In the next 12 months, how may Are you Treat

thousands of miles will you Sure? values > ML18a 0 - 150 probably travel by a) car, truck 150 as 150.

or van or b) motorcycle?

In the next 12 months, how Are you Treat

many thousands of miles will Sure? values >20 ML18b 0 - 20 you probably travel by as 20

motorcycle.

ML20 What percent of time to you 0 - 100 Please enter If user

212

usually buckle your safety belt a value begins

when driving or riding? between 0 - entering

100 value do

not allow

user to

proceed

until

correct

value is

entered.

How many times in the last Are you Treat

month did you drive or ride Sure? values >50 ML22 0-50 when the driver had perhaps too as 50

much alcohol to drink?

Are you Treat How may drinks of beer do you ML23a 0-99 Sure? values >99 have in a typical week? as 99

Are you Treat How many drinks of wine do you ML23b 0 - 99 Sure? values >99 have in a typical week? as 99

How many drinks of wine Are you Treat ML23c 0 - 99 coolers do you have in a typical Sure? values >99

213

week? as 99

Are you Treat How many mixed drinks do you ML23d 0 - 99 Sure? values >99 have in a typical week? as 99

Please enter If user

a value begins 5 – 20 between 5 entering [VALUE and 20 value do CANNOT not allow At what age did you have your BE ML24 user to first menstrual period? GREATER proceed THAN until CURRENT correct AGE] value is

entered.

214

Please enter If user

a value begins 10 – 55 between 10 entering [VALUE and 55. value do CANNOT not allow How old were you when your BE ML25 user to first child was born? GREATER proceed THAN until CURRENT correct AGE] value is

entered.

How many women in your Are you Treat

natural family (mother and Sure? entries >10 ML27 0 - 10 sisters only) have had breast as 10

cancer?

In an average week, how many Are you Treat

different types of medicines, Sure? entries >20

drugs, and vitamins do you take as 20 ML23c 0 - 20 (types, NOT number of pills -

include both prescription and

non-prescription drugs.)

215

Appendix L – MySQL Installation

Step 1: download MySQL

Download MySQL from http://dev.mysql.com/downloads/ and click the “MySQL

Community Server” link. Choose the installer according to the computer’s platform, i.e. Mac OS, Windows, etc.

Step 2: install MySQL

Windows:

1. Unzip the downloaded installation zip file and double click the .msi to start

the installer.

2. Select “Install MySQL Products” from the installer window.

3. Click “Execute” on the following page and click “Next” to continue.

4. Use default settings on the “Setup Type” page and click “Next”.

5. On the “Check Requirements” page click “Execute” and “Next”.

6. On the “Installation” page click “Execute”. The installer will start installing all

needed components. Click “Next” after installation.

7. Click “Next” on “Configuration” page, use default settings and click “Next”.

8. Create MySQL root password and click “Next”.

9. Use default “Windows Service Name” and “Standard System Account”

settings and click “Next”.

10. Uncheck the box “Start MySQL Workbench after Setup” and click “Finish”.

216

Mac OS:

1. Double click the downloaded .dmg file to open the disk image.

2. Double-click the MySQL installer package. It will be named according to the

version of MySQL you have downloaded. For example, if you have

downloaded MySQL server 5.6.20, double-click mysql-5.6.20-osx-10.7-

x86_64.pkg.

3. Follow the instructions and click “Continue”.

4. Double click “MySQLStartupItem.pkg” and follow the instructions to install.

5. Double click “MySQL.prefPane” and follow the instructions to install.

Appendix M – hra_initial.sql

# Create database and user # ------CREATE DATABASE hra;

CREATE USER 'hra_usr'@'localhost' IDENTIFIED BY 'hra_usr_passwd';

GRANT ALL ON hra.* TO 'hra_usr'@'localhost';

FLUSH PRIVILEGES;

USE hra;

# Dump of table Answer # ------

DROP TABLE IF EXISTS `Answer`;

CREATE TABLE `Answer` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `value` varchar(255) NOT NULL,

217

`answerPart_id` smallint(6) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FK752F2BDE92D1A65E` (`answerPart_id`), KEY `FK752F2BDEF3F1BE36` (`questionnaire_id`), CONSTRAINT `FK752F2BDEF3F1BE36` FOREIGN KEY (`questionnaire_id`) REFERENCES `Questionnaire` (`id`), CONSTRAINT `FK752F2BDE92D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table AnswerPart # ------

DROP TABLE IF EXISTS `AnswerPart`;

CREATE TABLE `AnswerPart` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `droppedFromUseDate` datetime DEFAULT NULL, `high` varchar(255) DEFAULT NULL, `low` varchar(255) DEFAULT NULL, `name` varchar(255) DEFAULT NULL, `title` varchar(255) DEFAULT NULL, `inputType` int(11) DEFAULT NULL, `unit` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `AnswerPart` WRITE; /*!40000 ALTER TABLE `AnswerPart` DISABLE KEYS */;

INSERT INTO `AnswerPart` (`id`, `createDate`, `droppedFromUseDate`, `high`, `low`, `name`, `title`, `inputType`, `unit`) VALUES (1,'2014-03-11 14:32:33',NULL,NULL,NULL,'sex',NULL,0,NULL), (2,'2014-03-11 14:32:33',NULL,'120','18','age',NULL,1,'years'), (3,'2014-03-11 14:32:33',NULL,'7','2','heightFoot',NULL,1,'feet'), (4,'2014-03-11 14:32:33',NULL,'11','0','heightInch',NULL,1,'inches'), (5,'2014-03-11 14:32:33',NULL,'700','50','weight',NULL,1,'pounds'), (6,'2014-03-11 14:32:33',NULL,NULL,NULL,'bodySize',NULL,2,NULL), (7,'2014-03-11 14:32:33',NULL,NULL,NULL,'diabetes',NULL,0,NULL), (8,'2014-03-11 14:32:33',NULL,NULL,NULL,'X2',NULL,0,NULL),

218

(9,'2014-03-11 14:32:33',NULL,NULL,NULL,'X3',NULL,0,NULL), (10,'2014-03-11 14:32:33',NULL,NULL,NULL,'X4',NULL,0,NULL), (11,'2014-03-11 14:32:33',NULL,NULL,NULL,'bloodPressureMedicine',NULL,0,NULL), (12,'2014-03-11 14:32:33',NULL,'200','70','bloodPressureHigh',NULL,1,'high number'), (13,'2014-03-11 14:32:33',NULL,'120','40','bloodPressureLow',NULL,1,'low number'), (14,'2014-03-11 14:32:33',NULL,NULL,NULL,'bloodPressureEstimate',NULL,2,NULL), (15,'2014-03-11 14:32:33',NULL,'400','90','totalCholesterol',NULL,1,'mg/dl'), (16,'2014-03-11 14:32:33',NULL,'100','25','hdlCholesterol',NULL,1,'mg/dl'), (17,'2014-03-11 14:32:33',NULL,NULL,NULL,'cigaretteSmoking',NULL,0,NULL), (18,'2014-03-11 14:32:33',NULL,'50','0','usedToSmokeYear','a. How many years has it been since you smoked regularly?',1,'years'), (19,'2014-03-11 14:32:33',NULL,'80','0','usedToSmokeCigarette','b. What was the average number per day that you smoked in the 2 years before you quit?',1,'cigarettes/day'), (20,'2014-03-11 14:32:33',NULL,'10','0','ML17c',NULL,1,'cigars/day'), (21,'2014-03-11 14:32:33',NULL,'10','0','ML17d',NULL,1,'pipes/day'), (22,'2014-03-11 14:32:33',NULL,'80','0','stillSmoke',NULL,1,'cigarettes/day'), (23,'2014-03-11 14:32:33',NULL,'10','0','dailyCigar',NULL,1,'cigars/day'), (24,'2014-03-11 14:32:33',NULL,'10','0','dailyPipe',NULL,1,'pipes/day'), (25,'2014-03-11 14:32:33',NULL,'10','0','dailyTobacco',NULL,1,'times/day'), (26,'2014-03-11 14:32:33',NULL,'50','0','travelMilesCar',NULL,1,',000 miles'), (27,'2014-03-11 14:32:33',NULL,'50','0','travelMilesMotorcycle',NULL,1,',000 miles'), (28,'2014-03-11 14:32:33',NULL,NULL,NULL,'travelMethod',NULL,2,NULL), (29,'2014-03-11 14:32:33',NULL,'100','0','buckleBelt',NULL,1,'%'), (30,'2014-03-11 14:32:33',NULL,NULL,NULL,'closeToSpeedLimit',NULL,2,NULL), (31,'2014-03-11 14:32:33',NULL,'50','0','drinkDrive',NULL,1,'times last month'), (32,'2014-03-11 14:32:33',NULL,'99','0','weeklyBeer',NULL,1,'beer'), (33,'2014-03-11 14:32:33',NULL,'99','0','weeklyWine',NULL,1,'wine'), (34,'2014-03-11 14:32:33',NULL,'99','0','weeklyCooler',NULL,1,'wine coolers'), (35,'2014-03-11 14:32:33',NULL,'99','0','weeklyMixed',NULL,1,'mixed drinks'), (36,'2014-03-11 14:32:33',NULL,NULL,NULL,'BINGE_DRINK',NULL,0,NULL), (37,'2014-03-11 14:32:33',NULL,NULL,NULL,'rectalProstateExam',NULL,2,NULL), (38,'2014-03-11 14:32:33',NULL,'20','5','firstPeriod',NULL,1,'years old'), (39,'2014-03-11 14:32:33',NULL,'50','10','ageBearChild',NULL,1,'years old'),

219

(40,'2014-03-11 14:32:33',NULL,NULL,NULL,'mammogram',NULL,2,NULL), (41,'2014-03-11 14:32:33',NULL,'10','0','breastCancerWomen',NULL,1,'women'), (42,'2014-03-11 14:32:33',NULL,NULL,NULL,'hysterectomy',NULL,2,NULL), (43,'2014-03-11 14:32:33',NULL,NULL,NULL,'papSmearTest',NULL,2,NULL), (44,'2014-03-11 14:32:33',NULL,NULL,NULL,'lumpExam',NULL,2,NULL), (45,'2014-03-11 14:32:33',NULL,NULL,NULL,'breastExam',NULL,2,NULL), (46,'2014-03-11 14:32:33',NULL,NULL,NULL,'rectalExam',NULL,2,NULL), (47,'2014-03-11 14:32:33',NULL,NULL,NULL,'violentActivity',NULL,0,NULL), (48,'2014-03-11 14:32:33',NULL,NULL,NULL,'physicalHealth',NULL,2,NULL), (49,'2014-03-11 14:32:33',NULL,NULL,NULL,'physicalActivity',NULL,2,NULL), (50,'2014-03-11 14:32:33',NULL,NULL,NULL,'helmetUsage',NULL,2,NULL), (51,'2014-03-11 14:32:33',NULL,NULL,NULL,'healthyFood',NULL,0,NULL), (52,'2014-03-11 14:32:33',NULL,NULL,NULL,'highCholesterolFood',NULL,0,NULL), (53,'2014-03-11 14:32:33',NULL,NULL,NULL,'SOC_SMOK',NULL,2,NULL), (54,'2014-03-11 14:32:33',NULL,NULL,NULL,'SOC_ALC',NULL,2,NULL), (55,'2014-03-11 14:32:33',NULL,NULL,NULL,'SOC_NUT',NULL,2,NULL), (56,'2014-03-11 14:32:33',NULL,NULL,NULL,'SOC_EXE',NULL,2,NULL), (57,'2014-03-11 14:32:33',NULL,NULL,NULL,'misfortune',NULL,2,NULL), (58,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQa',NULL,2,NULL), (59,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQb',NULL,2,NULL), (60,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQc',NULL,2,NULL), (61,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQd',NULL,2,NULL), (62,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQe',NULL,2,NULL), (63,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQf',NULL,2,NULL), (64,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQg',NULL,2,NULL), (65,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQh',NULL,2,NULL), (66,'2014-03-11 14:32:33',NULL,NULL,NULL,'PHQi',NULL,2,NULL), (67,'2014-03-11 14:32:33',NULL,NULL,NULL,'race',NULL,2,NULL), (68,'2014-03-11 14:32:33',NULL,NULL,NULL,'hispanicOrigin',NULL,0,NULL), (69,'2014-03-11 14:32:33',NULL,NULL,NULL,'HEALTH_LIT',NULL,2,NULL), (70,'2014-03-11 14:32:33',NULL,NULL,NULL,'education',NULL,2,NULL), (71,'2014-03-11 14:32:33',NULL,NULL,NULL,'X5',NULL,0,NULL), (72,'2014-03-11 14:32:33',NULL,NULL,NULL,'X12',NULL,0,NULL), (73,'2014-03-11 14:32:33',NULL,NULL,NULL,'X7',NULL,0,NULL), (74,'2014-03-11 14:32:33',NULL,NULL,NULL,'X8',NULL,0,NULL), (75,'2014-03-11 14:32:33',NULL,NULL,NULL,'X9',NULL,0,NULL), (76,'2014-03-11 14:32:33',NULL,NULL,NULL,'X10',NULL,0,NULL), (77,'2014-03-11 14:32:33',NULL,NULL,NULL,'X13',NULL,0,NULL), (78,'2014-03-11 14:32:33',NULL,NULL,NULL,'X14',NULL,0,NULL), (79,'2014-03-11 14:32:33',NULL,NULL,NULL,'X15',NULL,0,NULL), (80,'2014-03-11 14:32:33',NULL,NULL,NULL,'X16',NULL,0,NULL), (81,'2014-03-11 14:32:33',NULL,NULL,NULL,'X17',NULL,0,NULL),

220

(82,'2014-03-11 14:32:33',NULL,NULL,NULL,'X18',NULL,0,NULL), (83,'2014-03-11 14:32:33',NULL,NULL,NULL,'X19',NULL,0,NULL), (84,'2014-03-11 14:32:33',NULL,NULL,NULL,'X20',NULL,0,NULL), (85,'2014-03-11 14:32:33',NULL,NULL,NULL,'X21',NULL,0,NULL), (86,'2014-03-11 14:32:33',NULL,NULL,NULL,'ML23b',NULL,0,NULL), (87,'2014-03-11 14:32:33',NULL,NULL,NULL,'ML23c',NULL,1,'types per week'), (88,'2014-03-11 14:32:33',NULL,NULL,NULL,'X24',NULL,0,NULL), (89,'2014-03-11 14:32:33',NULL,NULL,NULL,'X25',NULL,0,NULL), (90,'2014-03-11 14:32:33',NULL,NULL,NULL,'X26',NULL,0,NULL), (91,'2014-03-11 14:32:33',NULL,NULL,NULL,'X27',NULL,0,NULL), (92,'2014-03-11 14:32:33',NULL,NULL,NULL,'X29',NULL,2,NULL), (93,'2014-03-11 14:32:33',NULL,NULL,NULL,'X28',NULL,2,NULL), (94,'2014-03-11 14:32:33',NULL,NULL,NULL,'F4',NULL,0,NULL), (95,'2014-03-11 14:32:33',NULL,NULL,NULL,'F5',NULL,0,NULL), (96,'2014-03-11 14:32:33',NULL,NULL,NULL,'F6',NULL,0,NULL), (97,'2014-03-11 14:32:33',NULL,NULL,NULL,'F7',NULL,0,NULL), (98,'2014-03-11 14:32:33',NULL,NULL,NULL,'F8',NULL,0,NULL), (99,'2014-03-11 14:32:33',NULL,NULL,NULL,'F9',NULL,0,NULL), (100,'2014-03-11 14:32:33',NULL,NULL,NULL,'F10',NULL,0,NULL), (101,'2014-03-11 14:32:33',NULL,NULL,NULL,'F11',NULL,0,NULL), (102,'2014-03-11 14:32:33',NULL,NULL,NULL,'F12',NULL,0,NULL), (103,'2014-03-11 14:32:33',NULL,NULL,NULL,'F13',NULL,0,NULL), (104,'2014-03-11 14:32:33',NULL,NULL,NULL,'F14',NULL,0,NULL), (105,'2014-03-11 14:32:33',NULL,NULL,NULL,'F15',NULL,0,NULL), (106,'2014-03-11 14:32:33',NULL,NULL,NULL,'F16',NULL,0,NULL), (107,'2014-03-11 14:32:33',NULL,NULL,NULL,'F1',NULL,2,NULL), (108,'2014-03-11 14:32:33',NULL,NULL,NULL,'F3',NULL,2,NULL), (109,'2014-03-11 14:32:33',NULL,NULL,NULL,'F2','',0,NULL), (110,'2014-03-11 14:32:33',NULL,NULL,NULL,'F18',NULL,0,NULL), (111,'2014-03-11 14:32:33',NULL,NULL,NULL,'F17',NULL,0,NULL), (112,'2014-03-11 14:32:33',NULL,NULL,NULL,'F21',NULL,0,NULL), (113,'2014-03-11 14:32:33',NULL,NULL,NULL,'F20',NULL,0,NULL), (114,'2014-03-11 14:32:33',NULL,NULL,NULL,'F19',NULL,0,NULL), (115,'2014-03-11 14:32:33',NULL,NULL,NULL,'F22',NULL,0,NULL), (116,'2014-03-11 14:32:33',NULL,NULL,NULL,'B13',NULL,2,NULL), (117,'2014-03-11 14:32:33',NULL,NULL,NULL,'B12',NULL,2,NULL), (118,'2014-03-11 14:32:33',NULL,NULL,NULL,'H1',NULL,2,NULL), (119,'2014-03-11 14:32:33',NULL,NULL,NULL,'H2',NULL,2,NULL), (120,'2014-03-11 14:32:33',NULL,NULL,NULL,'H3',NULL,2,NULL), (121,'2014-03-11 14:32:33',NULL,NULL,NULL,'E2',NULL,0,NULL), (122,'2014-03-11 14:32:33',NULL,NULL,NULL,'E4',NULL,0,NULL), (123,'2014-03-11 14:32:33',NULL,NULL,NULL,'E7',NULL,0,NULL), (124,'2014-03-11 14:32:33',NULL,NULL,NULL,'E8',NULL,0,NULL), (125,'2014-03-11 14:32:33',NULL,NULL,NULL,'E9',NULL,0,NULL),

221

(126,'2014-03-11 14:32:33',NULL,NULL,NULL,'E10',NULL,0,NULL), (127,'2014-03-11 14:32:33',NULL,NULL,NULL,'N3',NULL,0,NULL), (128,'2014-03-11 14:32:33',NULL,NULL,NULL,'N7',NULL,0,NULL), (129,'2014-03-11 14:32:33',NULL,NULL,NULL,'N21',NULL,0,NULL), (130,'2014-03-11 14:32:33',NULL,NULL,NULL,'D1',NULL,1,NULL), (131,'2014-03-11 14:32:33',NULL,NULL,NULL,'D3',NULL,2,NULL), (132,'2014-03-11 14:32:33',NULL,NULL,NULL,'D4',NULL,2,NULL), (133,'2014-03-11 14:32:33',NULL,NULL,NULL,'D5',NULL,0,NULL), (134,'2014-03-11 14:32:33',NULL,NULL,NULL,'D6',NULL,2,NULL), (135,'2014-03-11 14:32:33',NULL,NULL,NULL,'D8',NULL,0,NULL), (136,'2014-03-11 14:32:33',NULL,NULL,NULL,'H4',NULL,0,NULL), (137,'2014-03-11 14:32:33',NULL,NULL,NULL,'H5',NULL,0,NULL), (138,'2014-03-11 14:32:33',NULL,NULL,NULL,'H6',NULL,0,NULL), (139,'2014-03-11 14:32:33',NULL,NULL,NULL,'H7',NULL,0,NULL), (140,'2014-03-11 14:32:33',NULL,NULL,NULL,'H9',NULL,0,NULL), (141,'2014-03-11 14:32:33',NULL,NULL,NULL,'H8',NULL,0,NULL), (142,'2014-03-11 14:32:33',NULL,NULL,NULL,'H10',NULL,0,NULL), (143,'2014-03-11 14:32:33',NULL,NULL,NULL,'H11',NULL,0,NULL), (144,'2014-03-11 14:32:33',NULL,NULL,NULL,'H12',NULL,0,NULL), (145,'2014-03-11 14:32:33',NULL,NULL,NULL,'H13',NULL,0,NULL), (146,'2014-03-11 14:32:33',NULL,NULL,NULL,'H14',NULL,0,NULL), (147,'2014-03-11 14:32:33',NULL,NULL,NULL,'H15',NULL,0,NULL), (148,'2014-03-11 14:32:33',NULL,NULL,NULL,'H16',NULL,0,NULL), (149,'2014-03-11 14:32:33',NULL,NULL,NULL,'H17',NULL,0,NULL), (150,'2014-03-11 14:32:33',NULL,NULL,NULL,'H18',NULL,0,NULL), (151,'2014-03-11 14:32:33',NULL,NULL,NULL,'H19',NULL,0,NULL), (152,'2014-03-11 14:32:33',NULL,NULL,NULL,'H20',NULL,0,NULL), (153,'2014-03-11 14:32:33',NULL,NULL,NULL,'H21',NULL,0,NULL), (154,'2014-03-11 14:32:33',NULL,NULL,NULL,'B1',NULL,2,NULL), (155,'2014-03-11 14:32:33',NULL,NULL,NULL,'B2',NULL,2,NULL), (156,'2014-03-11 14:32:33',NULL,NULL,NULL,'B3',NULL,2,NULL), (157,'2014-03-11 14:32:33',NULL,NULL,NULL,'B4',NULL,2,NULL), (158,'2014-03-11 14:32:33',NULL,NULL,NULL,'B5',NULL,2,NULL), (159,'2014-03-11 14:32:33',NULL,NULL,NULL,'B6',NULL,2,NULL), (160,'2014-03-11 14:32:33',NULL,NULL,NULL,'B7',NULL,2,NULL), (161,'2014-03-11 14:32:33',NULL,NULL,NULL,'B8',NULL,2,NULL), (162,'2014-03-11 14:32:33',NULL,NULL,NULL,'B9',NULL,0,NULL), (163,'2014-03-11 14:32:33',NULL,NULL,NULL,'B10',NULL,2,NULL), (164,'2014-03-11 14:32:33',NULL,NULL,NULL,'B11',NULL,2,NULL), (165,'2014-03-11 14:32:33',NULL,NULL,NULL,'E1',NULL,0,NULL), (166,'2014-03-11 14:32:33',NULL,NULL,NULL,'E3',NULL,0,NULL), (167,'2014-03-11 14:32:33',NULL,NULL,NULL,'E5',NULL,0,NULL), (168,'2014-03-11 14:32:33',NULL,NULL,NULL,'E6',NULL,0,NULL), (169,'2014-03-11 14:32:33',NULL,NULL,NULL,'E11',NULL,0,NULL), (170,'2014-03-11 14:32:33',NULL,NULL,NULL,'E12',NULL,0,NULL),

222

(171,'2014-03-11 14:32:33',NULL,NULL,NULL,'E13',NULL,0,NULL), (172,'2014-03-11 14:32:33',NULL,NULL,NULL,'N1',NULL,0,NULL), (173,'2014-03-11 14:32:33',NULL,NULL,NULL,'N2',NULL,0,NULL), (174,'2014-03-11 14:32:33',NULL,NULL,NULL,'N4',NULL,0,NULL), (175,'2014-03-11 14:32:33',NULL,NULL,NULL,'N5',NULL,0,NULL), (176,'2014-03-11 14:32:33',NULL,NULL,NULL,'N6',NULL,0,NULL), (177,'2014-03-11 14:32:33',NULL,NULL,NULL,'N8',NULL,0,NULL), (178,'2014-03-11 14:32:33',NULL,NULL,NULL,'N9',NULL,0,NULL), (179,'2014-03-11 14:32:33',NULL,NULL,NULL,'N10',NULL,0,NULL), (180,'2014-03-11 14:32:33',NULL,NULL,NULL,'N11',NULL,0,NULL), (181,'2014-03-11 14:32:33',NULL,NULL,NULL,'N12',NULL,0,NULL), (182,'2014-03-11 14:32:33',NULL,NULL,NULL,'N14',NULL,0,NULL), (183,'2014-03-11 14:32:33',NULL,NULL,NULL,'N15',NULL,0,NULL), (184,'2014-03-11 14:32:33',NULL,NULL,NULL,'N16',NULL,0,NULL), (185,'2014-03-11 14:32:33',NULL,NULL,NULL,'N17',NULL,0,NULL), (186,'2014-03-11 14:32:33',NULL,NULL,NULL,'N18',NULL,0,NULL), (187,'2014-03-11 14:32:33',NULL,NULL,NULL,'N19',NULL,0,NULL), (188,'2014-03-11 14:32:33',NULL,NULL,NULL,'N22',NULL,0,NULL), (189,'2014-03-11 14:32:33',NULL,NULL,NULL,'N23',NULL,0,NULL), (190,'2014-03-11 14:32:33',NULL,NULL,NULL,'N24',NULL,0,NULL), (191,'2014-03-11 14:32:33',NULL,NULL,NULL,'N25',NULL,0,NULL), (192,'2014-03-11 14:32:33',NULL,NULL,NULL,'N26',NULL,0,NULL);

/*!40000 ALTER TABLE `AnswerPart` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table AnswerPart_AnswerPartOption # ------

DROP TABLE IF EXISTS `AnswerPart_AnswerPartOption`;

CREATE TABLE `AnswerPart_AnswerPartOption` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `position` smallint(6) NOT NULL, `answerPart_id` smallint(6) NOT NULL, `answerPartOption_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK3315FE54D985B75E` (`answerPartOption_id`), KEY `FK3315FE5492D1A65E` (`answerPart_id`), CONSTRAINT `FK3315FE5492D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`), CONSTRAINT `FK3315FE54D985B75E` FOREIGN KEY (`answerPartOption_id`) REFERENCES `AnswerPartOption` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

223

LOCK TABLES `AnswerPart_AnswerPartOption` WRITE; /*!40000 ALTER TABLE `AnswerPart_AnswerPartOption` DISABLE KEYS */;

INSERT INTO `AnswerPart_AnswerPartOption` (`id`, `position`, `answerPart_id`, `answerPartOption_id`) VALUES (1,0,1,1), (2,1,1,2), (3,0,6,3), (4,1,6,4), (5,2,6,5), (6,3,6,6), (7,0,7,7), (9,1,7,8), (10,0,8,9), (12,1,8,10), (13,0,9,9), (14,1,9,10), (15,0,10,9), (16,1,10,10), (17,0,11,8), (18,1,11,9), (19,0,14,11), (20,1,14,12), (21,2,14,13), (22,3,14,14), (23,0,17,15), (24,1,17,16), (25,2,17,17), (26,0,28,18), (27,1,28,19), (28,2,28,20), (29,3,28,21), (30,4,28,22), (31,5,28,23), (32,6,28,24), (33,7,28,25), (34,8,28,26), (35,0,30,27), (36,1,30,28), (37,2,30,29), (38,3,30,30), (39,4,30,31), (40,0,36,9),

224

(41,1,36,10), (42,0,37,32), (43,1,37,33), (44,2,37,34), (45,3,37,35), (46,4,37,36), (47,5,37,37), (48,0,40,32), (49,1,40,33), (50,2,40,34), (51,3,40,35), (52,4,40,36), (53,5,40,37), (54,0,42,38), (55,1,42,39), (56,2,42,40), (57,3,42,41), (58,0,43,32), (59,1,43,33), (60,2,43,34), (61,3,43,35), (62,4,43,36), (63,5,43,37), (64,0,44,42), (65,1,44,43), (66,2,44,44), (67,3,44,45), (68,0,45,32), (69,1,45,33), (70,2,45,34), (71,3,45,35), (72,4,45,36), (73,5,45,37), (75,0,46,32), (76,1,46,33), (77,2,46,34), (78,3,46,35), (79,4,46,36), (80,5,46,37), (81,0,47,7), (82,1,47,8), (83,0,48,46), (84,1,48,47), (85,2,48,48), (86,3,48,49),

225

(87,4,48,50), (88,0,49,51), (89,1,49,52), (90,2,49,53), (91,3,49,54), (92,0,50,55), (93,1,50,56), (94,2,50,57), (95,3,50,58), (96,4,50,59), (97,0,51,7), (98,1,51,8), (99,0,52,7), (100,1,52,8), (101,0,53,60), (102,1,53,61), (103,2,53,62), (104,3,53,63), (105,4,53,64), (106,0,54,65), (108,1,54,66), (109,2,54,67), (110,3,54,68), (111,4,54,69), (112,0,55,70), (113,1,55,71), (114,2,55,72), (115,3,55,73), (116,4,55,74), (117,0,56,75), (118,1,56,76), (120,2,56,77), (121,3,56,78), (122,4,56,79), (123,0,57,80), (124,1,57,81), (125,2,57,82), (126,3,57,83), (127,0,58,84), (128,1,58,85), (129,2,58,86), (130,3,58,87), (131,4,58,88), (132,0,59,84), (133,1,59,85),

226

(134,2,59,86), (135,3,59,87), (136,4,59,88), (137,0,60,84), (138,1,60,85), (139,2,60,86), (140,3,60,87), (141,4,60,88), (142,0,61,84), (143,1,61,85), (144,2,61,86), (145,3,61,87), (146,4,61,88), (147,0,62,84), (148,1,62,85), (150,2,62,86), (151,3,62,87), (152,4,62,88), (153,0,63,84), (154,1,63,85), (155,2,63,86), (156,3,63,87), (157,4,63,88), (158,0,64,84), (159,1,64,85), (160,2,64,86), (161,3,64,87), (162,4,64,88), (163,0,65,84), (164,1,65,85), (165,2,65,86), (167,3,65,87), (168,4,65,88), (169,0,66,84), (170,1,66,85), (171,2,66,86), (172,3,66,87), (173,4,66,88), (174,0,67,89), (175,1,67,90), (176,2,67,91), (177,3,67,92), (178,4,67,93), (179,5,67,94), (180,6,67,95),

227

(181,7,67,96), (182,0,68,7), (183,1,68,8), (184,0,69,97), (185,1,69,98), (186,2,69,99), (187,3,69,100), (188,4,69,101), (189,5,69,102), (190,0,70,103), (191,1,70,104), (192,2,70,105), (193,3,70,106), (194,4,70,107), (195,5,70,108), (196,6,70,109), (197,0,71,7), (198,1,71,8), (199,0,72,9), (200,1,72,10), (201,0,73,110), (202,1,73,111), (203,0,74,9), (204,1,74,10), (205,0,75,9), (206,1,75,10), (207,0,76,7), (208,1,76,8), (209,0,77,7), (210,1,77,8), (211,0,78,9), (212,1,78,10), (213,0,79,7), (214,1,79,8), (215,0,80,7), (216,1,80,8), (218,0,81,9), (219,1,81,10), (220,0,82,9), (221,1,82,10), (222,0,83,7), (223,1,83,8), (225,0,84,9), (226,1,84,10), (227,0,85,9),

228

(228,1,85,10), (229,0,86,9), (230,1,86,10), (231,0,88,110), (232,1,88,111), (233,0,89,110), (234,1,89,111), (235,0,90,9), (236,1,90,10), (237,0,91,9), (238,1,91,10), (239,0,92,112), (240,1,92,113), (241,2,92,114), (242,3,92,115), (243,0,93,116), (244,1,93,117), (245,2,93,118), (246,3,93,119), (248,4,93,120), (249,5,93,121), (250,0,94,9), (251,1,94,10), (252,0,95,9), (253,1,95,10), (254,0,96,9), (255,1,96,10), (256,0,97,9), (257,1,97,10), (258,0,98,9), (259,1,98,10), (260,0,99,9), (261,1,99,10), (262,0,100,9), (263,1,100,10), (264,0,101,9), (265,1,101,10), (266,0,102,9), (267,1,102,10), (268,0,103,9), (269,1,103,10), (270,0,104,9), (271,1,104,10), (272,0,105,9), (273,1,105,10),

229

(274,0,106,9), (275,1,106,10), (276,0,107,122), (277,1,107,123), (278,2,107,124), (279,3,107,125), (280,4,107,126), (281,0,108,127), (282,1,108,128), (283,2,108,129), (284,3,108,130), (285,0,109,9), (286,1,109,10), (287,0,110,9), (288,1,110,10), (289,0,111,9), (290,1,111,10), (291,0,112,9), (292,1,112,10), (293,0,113,9), (294,1,113,10), (295,0,114,9), (296,1,114,10), (297,0,115,9), (298,1,115,10), (299,0,116,131), (300,1,116,132), (301,2,116,133), (302,3,116,134), (303,4,116,135), (304,5,116,136), (305,0,117,137), (306,1,117,138), (307,2,117,139), (308,3,117,140), (309,4,117,141), (310,0,118,32), (311,1,118,33), (312,2,118,34), (313,3,118,35), (314,4,118,36), (315,5,118,37), (316,0,119,142), (317,1,119,143), (318,2,119,144),

230

(319,3,119,145), (320,4,119,146), (321,5,119,147), (322,0,120,142), (323,1,120,143), (324,2,120,144), (325,3,120,145), (326,4,120,146), (327,5,120,147), (328,0,121,9), (329,1,121,10), (330,0,122,9), (331,1,122,10), (332,0,123,9), (333,1,123,10), (334,0,124,9), (335,1,124,10), (336,0,125,9), (337,1,125,10), (338,0,126,9), (339,1,126,10), (340,0,127,9), (341,1,127,10), (342,0,128,9), (343,1,128,10), (344,0,129,9), (345,1,129,10), (346,0,131,148), (347,1,131,149), (348,2,131,150), (349,3,131,151), (350,4,131,152), (351,5,131,153), (352,0,132,154), (353,1,132,155), (354,2,132,156), (355,3,132,157), (356,4,132,158), (357,5,132,159), (358,6,132,160), (359,0,133,9), (360,1,133,10), (361,0,134,161), (362,1,134,162), (363,2,134,163),

231

(364,3,134,164), (365,4,134,165), (366,5,134,166), (367,6,134,167), (368,7,134,168), (369,8,134,169), (370,9,134,170), (371,0,135,7), (372,1,135,8), (373,0,136,9), (374,1,136,10), (375,0,137,9), (376,1,137,10), (377,0,138,9), (378,1,138,10), (379,0,139,9), (380,1,139,10), (381,0,140,9), (382,1,140,10), (383,0,141,9), (385,1,141,10), (386,0,142,9), (387,1,142,10), (388,0,143,9), (389,1,143,10), (390,0,144,9), (391,1,144,10), (392,0,145,9), (393,1,145,10), (394,0,146,9), (395,1,146,10), (396,0,147,9), (397,1,147,10), (398,0,148,9), (399,1,148,10), (400,0,149,171), (401,1,149,172), (402,0,150,9), (403,1,150,10), (404,0,151,9), (405,1,151,10), (406,0,152,9), (407,1,152,10), (408,0,153,9), (409,1,153,10),

232

(410,0,154,173), (411,1,154,174), (412,2,154,175), (413,3,154,176), (414,4,154,177), (415,5,154,178), (416,6,154,179), (417,0,155,180), (418,1,155,181), (419,2,155,182), (420,3,155,183), (421,4,155,184), (422,5,155,185), (423,6,155,186), (424,0,156,173), (425,1,156,174), (426,2,156,175), (427,3,156,176), (428,4,156,177), (429,5,156,178), (430,6,156,179), (431,0,157,173), (432,1,157,174), (433,2,157,175), (434,3,157,176), (435,4,157,177), (436,5,157,178), (437,6,157,179), (439,0,158,173), (440,1,158,174), (441,2,158,175), (442,3,158,176), (443,4,158,177), (444,5,158,178), (445,6,158,179), (447,0,159,180), (448,1,159,181), (449,2,159,182), (450,3,159,183), (451,4,159,184), (452,5,159,185), (453,6,159,186), (454,0,160,187), (455,1,160,188), (456,2,160,189),

233

(457,3,160,190), (458,4,160,191), (459,5,160,192), (460,6,160,193), (461,0,161,187), (462,1,161,188), (463,2,161,189), (464,3,161,190), (465,4,161,191), (466,5,161,192), (467,6,161,193), (468,0,162,9), (469,1,162,10), (470,0,163,187), (471,1,163,188), (472,2,163,189), (473,3,163,190), (474,4,163,191), (475,5,163,192), (476,6,163,193), (477,0,164,194), (478,1,164,195), (479,2,164,196), (480,3,164,197), (481,4,164,198), (482,0,165,9), (483,1,165,10), (484,0,166,9), (485,1,166,10), (486,0,167,9), (487,1,167,10), (488,0,168,9), (489,1,168,10), (490,0,169,9), (491,1,169,10), (492,0,170,9), (493,1,170,10), (494,0,171,9), (495,1,171,10), (496,0,172,9), (497,1,172,10), (498,0,173,9), (499,1,173,10), (500,0,174,9), (501,1,174,10),

234

(502,0,175,9), (503,1,175,10), (504,0,176,9), (505,1,176,10), (506,0,177,9), (507,1,177,10), (508,0,178,9), (509,1,178,10), (510,0,179,9), (511,1,179,10), (512,0,180,9), (513,1,180,10), (514,0,181,9), (515,1,181,10), (516,0,182,9), (517,1,182,10), (518,0,183,9), (519,1,183,10), (520,0,184,9), (521,1,184,10), (522,0,185,9), (523,1,185,10), (524,0,186,9), (525,1,186,10), (526,0,187,9), (527,1,187,10), (528,0,188,9), (529,1,188,10), (530,0,189,9), (531,1,189,10), (532,0,190,9), (533,1,190,10), (534,0,191,9), (535,1,191,10), (536,0,192,9), (537,1,192,10);

/*!40000 ALTER TABLE `AnswerPart_AnswerPartOption` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table AnswerPartOption # ------

DROP TABLE IF EXISTS `AnswerPartOption`;

235

CREATE TABLE `AnswerPartOption` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `label` varchar(255) DEFAULT NULL, `value` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `AnswerPartOption` WRITE; /*!40000 ALTER TABLE `AnswerPartOption` DISABLE KEYS */;

INSERT INTO `AnswerPartOption` (`id`, `label`, `value`) VALUES (1,'male','male'), (2,'female','female'), (3,'choose an answer','not answered'), (4,'Small','small'), (5,'Medium','medium'), (6,'Large','large'), (7,'Yes','yes'), (8,'No','no'), (9,'Yes','1'), (10,'No','2'), (11,'choose an answer','not answered'), (12,'High','high'), (13,'Normal or low','normal or low'), (14,'Don\'t know','don\'t know'), (15,'Never Smoked','never smoked'), (16,'Used to Smoke','used to smoke'), (17,'Still Smoke','still smoke'), (18,'choose an answer','not answered'), (19,'Walk','walk'), (20,'Bicycle','bicycle'), (21,'Motorcycle','motorcycle'), (22,'Sub-compact or compact car','sub-compact or compact car'), (23,'Mid-size or full-size car','mid-size or full-size car'), (24,'Truck or van','truck or van'), (25,'Bus, subway, or train','bus, subway, or train'), (26,'Mostly stay at home','mostly stay at home'), (27,'choose an answer','not answered'), (28,'Within 5 mph of limit','within 5 mph of limit'), (29,'6-10 mph over limit','6-10 mph over limit'), (30,'11-15 mph over limit','11-15 mph over limit'), (31,'More than 15 mph over limit','more than 15 mph over limit'), (32,'choose an answer','not answered'),

236

(33,'Less than 1 year ago','less than 1 year ago'), (34,'1 year ago','1 year ago'), (35,'2 years ago','2 years ago'), (36,'3 or more years ago','3 or more years ago'), (37,'Never','never'), (38,'choose an answer','not answered'), (39,'Yes','yes'), (40,'No','no'), (41,'Not Sure','no'), (42,'choose an answer','not answered'), (43,'Monthly','monthly'), (44,'Once every few months','once every few months'), (45,'Rarely or never','rarely or never'), (46,'choose an answer','not answered'), (47,'Excellent','excellent'), (48,'Good','good'), (49,'Fair','fair'), (50,'Poor','poor'), (51,'choose an answer','not answered'), (52,'Less than 1 time per week','less than 1 time per week'), (53,'1 or 2 times per week','1 or 2 times per week'), (54,'At least 3 times per week','at least 3 times per week'), (55,'choose an answer','not answered'), (56,'75% to 100%','75% to 100%'), (57,'25% to 74%','25% to 74%'), (58,'Less than 25%','less than 25%'), (59,'Does not apply to me','does not apply to me'), (60,'choose an answer','not answered'), (61,'No present interest in quitting smoking','1'), (62,'Plan to quit smoking in the next 6 months','2'), (63,'Plan to quit smoking this month','3'), (64,'Recently began quitting smoking','4'), (65,'choose an answer','not answered'), (66,'No present interest in reducing alcohol','1'), (67,'Plan to reduce alcohol use in the next 6 months','2'), (68,'Plan to reduce alcohol use this month','3'), (69,'Recently began reducing alcohol use','4'), (70,'choose an answer','not answered'), (71,'No present interest in improving nutrition','1'), (72,'Plan to improve nutrition in the next 6 months','2'), (73,'Plan to improve nutrition this month','3'), (74,'Recently began improving nutrition','4'), (75,'choose an answer','not answered'), (76,'No present interest in exercising more','1'), (77,'Plan to start exercising more in the next 6 months','2'),

237

(78,'Plan to start exercising more this month','3'), (79,'Recently began exercising more','4'), (80,'choose an answer','not answered'), (81,'Yes, 1 serious loss or misfortune','yes, 1 serious loss or misfortune'), (82,'Yes, 2 or more','yes, 2 or more'), (83,'No','no'), (84,'choose an answer','not answered'), (85,'Not at all','0'), (86,'Several days','1'), (87,'More than half the days','2'), (88,'Nearly every day','3'), (89,'choose an answer','not answered'), (90,'Aleutian, Alaska native, Eskimo, or American Indian','aleutian, alaska native, eskimo, or american indian'), (91,'Asian','asian'), (92,'Black','black'), (93,'Pacific Islander','pacific islander'), (94,'White','white'), (95,'Other','other'), (96,'Don\'t know','don\'t know'), (97,'choose an answer','not answered'), (98,'Not at all confident','1'), (99,'A little bit confident','2'), (100,'Somewhat confident','3'), (101,'Quite confident','4'), (102,'Extremely confident','5'), (103,'choose an answer','not answered'), (104,'Grade school or less','grade school or less'), (105,'Some high school','some high school'), (106,'High school graduate','high school graduate'), (107,'Some college','some college'), (108,'College graduate','college graduate'), (109,'Post graduate or professional degree','post graduate or professional degree'), (110,'Yes','1'), (111,'No','0'), (112,'choose an answer','not answered'), (113,'Eleven or more years ago','1'), (114,'One to ten years ago','2'), (115,'Don\'t Know','1'), (116,'choose an answer','not answered'), (117,'Less than 1 year ago','less than 1 year ago'), (118,'One year ago','one year ago'), (119,'Two years ago','two years ago'), (120,'Three or more years ago','three or more years ago'),

238

(121,'Never','never'), (122,'choose an answer','not answered'), (123,'Once a day or more','1'), (124,'At least three times a week','2'), (125,'Once or twice per week','3'), (126,'Less than once per week','4'), (127,'choose an answer','not answered'), (128,'Frequently','1'), (129,'Sometimes/Occasionally','2'), (130,'Almost Never','3'), (131,'choose an answer','not answered'), (132,'Always','0'), (133,'Usually','1'), (134,'Sometimes','2'), (135,'Rarely','3'), (136,'Never','4'), (137,'choose an answer','not answered'), (138,'Zero to four hours','0'), (139,'Five to ten hours','1'), (140,'Eleven to fifteen hours','2'), (141,'Sixteen or more hours','3'), (142,'choose an answer','not answered'), (143,'Less than 1 year ago','0'), (144,'1 year ago','1'), (145,'2 years ago','2'), (146,'3 or more years ago','3'), (147,'Never','4'), (148,'choose an answer','not answered'), (149,'Married','married'), (150,'Separated','separated'), (151,'Divorced','divorced'), (152,'Widowed','widowed'), (153,'Never Married','never married'), (154,'choose an answer','not answered'), (155,'$5,000 or less','$5,000 or less'), (156,'$5,001 - $9,999','$5,001 - $9,999'), (157,'$10,000 - $19,999','$10,000 - $19,999'), (158,'$20,000 - $29,999','$20,000 - $29,999'), (159,'$30,000 - $39,999','$30,000 - $39,999'), (160,'$40,000 or more','$40,000 or more'), (161,'choose an answer','not answered'), (162,'No coverage','no coverage'), (163,'Medicare only','medicare only'), (164,'Medicaid/Access only','medicaid/access only'), (165,'Both Medicare and Medicaid','both medicare and medicaid'),

239

(166,'MediGap/Supplemental insurance','medigap/supplemental insurance'), (167,'Veterans B/C','veterans b/c'), (168,'Private Insurance','private insurance'), (169,'Employer Insurance','employer insurance'), (170,'Other','other'), (171,'Yes','0'), (172,'No','1'), (173,'choose an answer','not answered'), (174,'Zero','1'), (175,'One','2'), (176,'Two','3'), (177,'Three or Four','4'), (178,'Five to Eight','5'), (179,'Nine or more','6'), (180,'choose an answer','not answered'), (181,'Less than monthly','1'), (182,'Monthly','2'), (183,'A few times a month','3'), (184,'Weekly','4'), (185,'A few times a week','5'), (186,'Daily','6'), (187,'choose an answer','not answered'), (188,'Always','1'), (189,'Very often','2'), (190,'Often','3'), (191,'Sometimes','4'), (192,'Seldom','5'), (193,'Never','6'), (194,'choose an answer','not answered'), (195,'Live with spouse, and perhaps others','1'), (196,'Live with other relatives or friends','2'), (197,'Live with other unrelated help (e.g. paid help)','3'), (198,'Live alone','4');

/*!40000 ALTER TABLE `AnswerPartOption` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Facility # ------

DROP TABLE IF EXISTS `Facility`;

240

CREATE TABLE `Facility` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `city` varchar(255) DEFAULT NULL, `facilityType` int(11) NOT NULL, `name` varchar(255) NOT NULL, `state` varchar(255) DEFAULT NULL, `street` varchar(255) DEFAULT NULL, `zipCode` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table HealthCategory # ------

DROP TABLE IF EXISTS `HealthCategory`;

CREATE TABLE `HealthCategory` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL, `description` varchar(255) DEFAULT NULL, `droppedFromUseDate` datetime DEFAULT NULL, `title` varchar(255) NOT NULL, `type` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `HealthCategory` WRITE; /*!40000 ALTER TABLE `HealthCategory` DISABLE KEYS */;

INSERT INTO `HealthCategory` (`id`, `createDate`, `description`, `droppedFromUseDate`, `title`, `type`) VALUES (1,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Basic Information',0), (2,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Blood Pressure',0), (3,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Smoking Related',0), (4,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Driving Related',0), (5,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Gender Related',0),

241

(6,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Physical Related',0), (7,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Food Related',0), (8,'2014-03-11 14:32:33','Over the last 2 weeks, how often have you been bothered by any of the following problems?',NULL,'Mental Health',0), (9,'2014-03-11 14:32:33','Please Answer the Following Questions',NULL,'Other',0), (10,'2014-03-11 14:32:33','Have you ever been told by a health care provider that you have...',NULL,'Medical Conditions',1), (11,'2014-03-11 14:32:33','For each item below, choose the best answer.',NULL,'Falls',1), (12,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Immunizations and Checkups',1), (13,'2014-03-11 14:32:33','Because of health or physical problems, do you have any difficulty...',NULL,'Activities and Function',1), (14,'2014-03-11 14:32:33','By yourself and not using aids,',NULL,'Mobility',1), (15,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Social Support',1), (16,'2014-03-11 14:32:33','For each item below, select the answer that best describes when you had checkups.',NULL,'Dental, Hearing, Vision Checkups',1), (17,'2014-03-11 14:32:33','For each item below, select the best answer for your home setting.',NULL,'Home Safety',1), (18,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Nutrition',1), (19,'2014-03-11 14:32:33','For each item below, fill in or select the best answer.',NULL,'Demographics',1), (20,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Social Support',2), (21,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Dental, Hearing, Vision Checkups',2), (22,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Home Safety',2), (23,'2014-03-11 14:32:33','For each item below, select the best answer.',NULL,'Nutrition',2);

/*!40000 ALTER TABLE `HealthCategory` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table HealthCategory_QuestionGroup # ------

DROP TABLE IF EXISTS `HealthCategory_QuestionGroup`;

242

CREATE TABLE `HealthCategory_QuestionGroup` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `gender` int(11) NOT NULL, `position` smallint(6) NOT NULL, `category_id` smallint(6) NOT NULL, `group_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FKF70FCA34D2494991` (`category_id`), KEY `FKF70FCA34DC7DCB9A` (`category_id`), KEY `FKF70FCA3494CF1470` (`group_id`), CONSTRAINT `FKF70FCA3494CF1470` FOREIGN KEY (`group_id`) REFERENCES `QuestionGroup` (`id`), CONSTRAINT `FKF70FCA34DC7DCB9A` FOREIGN KEY (`category_id`) REFERENCES `HealthCategory` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `HealthCategory_QuestionGroup` WRITE; /*!40000 ALTER TABLE `HealthCategory_QuestionGroup` DISABLE KEYS */;

INSERT INTO `HealthCategory_QuestionGroup` (`id`, `gender`, `position`, `category_id`, `group_id`) VALUES (1,2,0,1,1), (2,2,1,1,2), (3,2,2,1,3), (4,2,3,1,4), (5,2,4,1,5), (6,2,5,1,6), (7,2,0,2,7), (8,2,1,2,8), (9,2,2,2,9), (10,2,3,2,10), (11,2,4,2,11), (12,2,0,3,12), (13,2,1,3,13), (14,2,2,3,14), (15,2,3,3,15), (16,2,4,3,16), (17,2,5,3,17), (18,2,0,4,18), (19,2,1,4,19), (20,2,2,4,20), (21,2,3,4,21), (22,2,4,4,22),

243

(23,2,5,4,23), (24,1,0,5,24), (25,0,0,5,25), (26,2,0,6,26), (27,2,1,6,27), (28,2,2,6,28), (29,2,3,6,29), (30,2,0,7,30), (31,2,1,7,31), (32,2,0,8,32), (33,2,0,9,33), (34,2,1,9,34), (35,2,2,9,35), (36,2,3,9,36), (37,2,0,10,37), (38,2,0,11,38), (39,2,1,11,49), (40,2,2,11,50), (41,2,0,12,39), (42,2,1,12,51), (43,2,0,13,40), (44,2,1,13,52), (45,2,2,13,53), (46,2,3,13,54), (47,2,0,14,41), (48,2,0,15,42), (49,2,0,16,43), (50,2,0,17,46), (51,2,0,18,47), (52,2,0,19,48), (53,2,0,20,55), (54,2,0,21,43), (55,2,1,21,44), (56,2,2,21,45), (57,2,0,22,56), (58,2,0,23,57);

/*!40000 ALTER TABLE `HealthCategory_QuestionGroup` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Organization # ------

DROP TABLE IF EXISTS `Organization`;

244

CREATE TABLE `Organization` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `city` varchar(255) DEFAULT NULL, `name` varchar(255) NOT NULL, `organizationType` int(11) NOT NULL, `state` varchar(255) DEFAULT NULL, `street` varchar(255) DEFAULT NULL, `zipCode` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table Organization_Facility # ------

DROP TABLE IF EXISTS `Organization_Facility`;

CREATE TABLE `Organization_Facility` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `facility_id` smallint(6) NOT NULL, `organization_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FKC296902F279251FE` (`organization_id`), KEY `FKC296902F9907CDFE` (`facility_id`), CONSTRAINT `FKC296902F9907CDFE` FOREIGN KEY (`facility_id`) REFERENCES `Facility` (`id`), CONSTRAINT `FKC296902F279251FE` FOREIGN KEY (`organization_id`) REFERENCES `Organization` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table Patient # ------

DROP TABLE IF EXISTS `Patient`;

CREATE TABLE `Patient` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `city` varchar(255) DEFAULT NULL, `dateOfBirth` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `firstName` varchar(255) DEFAULT NULL,

245

`gender` int(11) DEFAULT NULL, `hispanicOrigin` varchar(255) DEFAULT NULL, `lastName` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `phoneNumber` varchar(255) DEFAULT NULL, `race` varchar(255) DEFAULT NULL, `resetKey` varchar(255) DEFAULT NULL, `salt` varchar(255) DEFAULT NULL, `state` varchar(255) DEFAULT NULL, `street` varchar(255) DEFAULT NULL, `zipCode` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `Patient` WRITE; /*!40000 ALTER TABLE `Patient` DISABLE KEYS */;

INSERT INTO `Patient` (`id`, `city`, `dateOfBirth`, `email`, `firstName`, `gender`, `hispanicOrigin`, `lastName`, `password`, `phoneNumber`, `race`, `resetKey`, `salt`, `state`, `street`, `zipCode`) VALUES (1,NULL,'02-17- 1963','[email protected]','Sample',1,'no','Survey','1000:d4137d09b07f2dde6 ed73af371783d973d3d0e2e8d04a463',NULL,'white',NULL,'f0a00a8e6f5883e36e11 78511af5def40e25fe08f3db3393',NULL,NULL,'11234');

/*!40000 ALTER TABLE `Patient` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Patient_Provider # ------

DROP TABLE IF EXISTS `Patient_Provider`;

CREATE TABLE `Patient_Provider` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `patient_id` bigint(20) NOT NULL, `provider_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK38FB8A2BDBAFE33E` (`provider_id`), KEY `FK38FB8A2B633DDFF6` (`patient_id`), CONSTRAINT `FK38FB8A2B633DDFF6` FOREIGN KEY (`patient_id`) REFERENCES `Patient` (`id`),

246

CONSTRAINT `FK38FB8A2BDBAFE33E` FOREIGN KEY (`provider_id`) REFERENCES `Provider` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table PopulationAverageRisk # ------

DROP TABLE IF EXISTS `PopulationAverageRisk`;

CREATE TABLE `PopulationAverageRisk` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `riskType_id` smallint(6) NOT NULL, `value` double NOT NULL, `testCase_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FKAE8E48DFFD8C59BE` (`testCase_id`), CONSTRAINT `FKAE8E48DFFD8C59BE` FOREIGN KEY (`testCase_id`) REFERENCES `TestCase` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table PreloadValue # ------

DROP TABLE IF EXISTS `PreloadValue`;

CREATE TABLE `PreloadValue` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `droppedFromUseDate` datetime DEFAULT NULL, `gender` int(11) NOT NULL, `type` varchar(255) NOT NULL, `value` varchar(255) NOT NULL, `answerPart_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK68A0E50892D1A65E` (`answerPart_id`), CONSTRAINT `FK68A0E50892D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `PreloadValue` WRITE; /*!40000 ALTER TABLE `PreloadValue` DISABLE KEYS */;

247

INSERT INTO `PreloadValue` (`id`, `createDate`, `droppedFromUseDate`, `gender`, `type`, `value`, `answerPart_id`) VALUES (1,'2014-03-11 14:32:33',NULL,0,'default','91.51191+0.749281*age',12), (2,'2014-03-11 14:32:33',NULL,0,'default','80',13), (3,'2014-03-11 14:32:33',NULL,1,'default','113.617244+0.377683*age',12), (4,'2014-03-11 14:32:33',NULL,1,'default','80',13), (5,'2014-03-11 14:32:33',NULL,0,'default','55',16), (6,'2014-03-11 14:32:33',NULL,1,'default','45',16), (7,'2014-03-11 14:32:33',NULL,2,'default','no',7), (8,'2014-03-11 14:32:33',NULL,2,'default','0',23), (9,'2014-03-11 14:32:33',NULL,2,'default','0',24), (10,'2014-03-11 14:32:33',NULL,2,'default','0',25), (11,'2014-03-11 14:32:33',NULL,2,'default','never smoked',17), (12,'2014-03-11 14:32:33',NULL,2,'default','0',22), (13,'2014-03-11 14:32:33',NULL,2,'default','0',19), (14,'2014-03-11 14:32:33',NULL,2,'default','mid-size or full-size car',28), (15,'2014-03-11 14:32:33',NULL,2,'default','100',29), (16,'2014-03-11 14:32:33',NULL,2,'default','within 5 mph of limit',30), (17,'2014-03-11 14:32:33',NULL,2,'default','0',31), (18,'2014-03-11 14:32:33',NULL,2,'default','0',32), (19,'2014-03-11 14:32:33',NULL,2,'default','0',33), (20,'2014-03-11 14:32:33',NULL,2,'default','0',34), (21,'2014-03-11 14:32:33',NULL,2,'default','0',35), (22,'2014-03-11 14:32:33',NULL,0,'default','13',38), (23,'2014-03-11 14:32:33',NULL,0,'default','19',39), (24,'2014-03-11 14:32:33',NULL,0,'default','3 or more years ago',40), (25,'2014-03-11 14:32:33',NULL,0,'default','0',41), (26,'2014-03-11 14:32:33',NULL,0,'default','no',42), (27,'2014-03-11 14:32:33',NULL,0,'default','3 or more years ago',43), (28,'2014-03-11 14:32:33',NULL,2,'optimum','130',12), (29,'2014-03-11 14:32:33',NULL,2,'optimum','85',13), (30,'2014-03-11 14:32:33',NULL,2,'optimum','55',16), (31,'2014-03-11 14:32:33',NULL,2,'optimum','0',23), (32,'2014-03-11 14:32:33',NULL,2,'optimum','0',24), (33,'2014-03-11 14:32:33',NULL,2,'optimum','0',25), (34,'2014-03-11 14:32:33',NULL,2,'optimum','100',29), (35,'2014-03-11 14:32:33',NULL,2,'optimum','within 5 mph of limit',30), (36,'2014-03-11 14:32:33',NULL,2,'optimum','0',31), (37,'2014-03-11 14:32:33',NULL,2,'optimum','0',32), (38,'2014-03-11 14:32:33',NULL,2,'optimum','0',33), (39,'2014-03-11 14:32:33',NULL,2,'optimum','0',34), (40,'2014-03-11 14:32:33',NULL,2,'optimum','0',35), (41,'2014-03-11 14:32:33',NULL,0,'optimum','less than 1 year ago',40),

248

(42,'2014-03-11 14:32:33',NULL,0,'optimum','less than 1 year ago',43), (43,'2014-03-11 14:32:33',NULL,2,'optimum','1',18), (44,'2014-03-11 14:32:33',NULL,2,'optimum','used to smoke',17), (45,'2014-03-11 14:32:33',NULL,2,'default','0',18);

/*!40000 ALTER TABLE `PreloadValue` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Provider # ------

DROP TABLE IF EXISTS `Provider`;

CREATE TABLE `Provider` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `providerAccessLevel` int(11) NOT NULL, `providerType` int(11) NOT NULL, `user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FKC8FE6A1147140EFE` (`user_id`), CONSTRAINT `FKC8FE6A1147140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table Question # ------

DROP TABLE IF EXISTS `Question`;

CREATE TABLE `Question` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `description` varchar(255) DEFAULT NULL, `droppedFromUseDate` datetime DEFAULT NULL, `isRequired` bit(1) NOT NULL, `title` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `Question` WRITE; /*!40000 ALTER TABLE `Question` DISABLE KEYS */;

249

INSERT INTO `Question` (`id`, `createDate`, `description`, `droppedFromUseDate`, `isRequired`, `title`) VALUES (1,'2014-03-11 14:32:33','',NULL,00000001,'Sex'), (2,'2014-03-11 14:32:33','',NULL,00000001,'Age'), (3,'2014-03-11 14:32:33','Without shoes, no fractions.',NULL,00000001,'Height'), (4,'2014-03-11 14:32:33','Without shoes, no fractions.',NULL,00000001,'Weight'), (5,'2014-03-11 14:32:33',NULL,NULL,00000001,'Describe your body frame size.'), (6,'2014-03-11 14:32:33','Have you ever been told that you have diabetes (or sugar diabetes)?',NULL,00000000,'Diabetes'), (7,'2014-03-11 14:32:33','Have you ever been told that you had a stroke?',NULL,00000000,'Stroke'), (8,'2014-03-11 14:32:33','Have you ever been told that you had a heart attack?',NULL,00000000,'Heart Attack'), (9,'2014-03-11 14:32:33','Have you ever been told that you have heart disease?',NULL,00000000,'Heart Disease'), (10,'2014-03-11 14:32:33','Are you taking blood pressure medication?',NULL,00000000,'Blood Pressure Medication'), (11,'2014-03-11 14:32:33','What is your blood pressure now?',NULL,00000000,'Blood Pressure'), (12,'2014-03-11 14:32:33','If you do not know the numbers, choose the option that describes your blood pressure.',NULL,00000000,'Estimate Blood Pressure'), (13,'2014-03-11 14:32:33','What is your total cholesterol level (based on a blood test)?',NULL,00000000,'Cholesterol Level'), (14,'2014-03-11 14:32:33','What is your HDL cholesterol level (based on a blood test)?',NULL,00000000,'HDL Cholesterol'), (15,'2014-03-11 14:32:33','How would you describe your smoking habits?',NULL,00000000,'Smoking'), (16,'2014-03-11 14:32:33',NULL,NULL,00000000,'Used to Smoke'), (17,'2014-03-11 14:32:33','How many cigarettes a day do you smoke?',NULL,00000000,'Still Smoke'), (18,'2014-03-11 14:32:33','How many cigars do you usually smoke per day?',NULL,00000000,'Daily Cigar'), (19,'2014-03-11 14:32:33','How many pipes of tobacco do you usually smoke per day?',NULL,00000000,'Daily Pipe'), (20,'2014-03-11 14:32:33','How many times per day do you use smokeless tobacco? (Chewing tobacco, snuff, pouches, etc.)',NULL,00000000,'Daily Tobacco'), (21,'2014-03-11 14:32:33','In the next 12 months, how many thousands of miles will you probably travel by car, truck or van?',NULL,00000000,'Travel Miles by Automobile'),

250

(22,'2014-03-11 14:32:33','In the next 12 months, how many thousands of miles will you probably travel by motorcycle?',NULL,00000000,'Travel Miles by Motorcycle'), (23,'2014-03-11 14:32:33','On a typical day, how do you usually travel?',NULL,00000000,'Travel Method'), (24,'2014-03-11 14:32:33','What percent of the time do you usually buckle your safety belt when driving or riding?',NULL,00000000,'Safety Belt Usage'), (25,'2014-03-11 14:32:33','On average, how close to the speed limit do you usually drive?',NULL,00000000,'Driving Speed'), (26,'2014-03-11 14:32:33','How many times in the last month did you drive or ride when the driver had perhaps too much alcohol to drink?',NULL,00000000,'Drinking and Driving'), (27,'2014-03-11 14:32:33','How many drinks of an alcoholic beverage do you have in a typical week? (Write number of each type of drink)',NULL,00000000,'Weekly Alcohol Drinking'), (28,'2014-03-11 14:32:33','In the last month have you had 5 or more drinks in a row? ',NULL,00000000,'Binge Drink'), (29,'2014-03-11 14:32:33','About how long has it been since you had a rectal or prostate exam?',NULL,00000000,'Rectal or Prostate Exam'), (30,'2014-03-11 14:32:33','At what age did you have your first menstrual period?',NULL,00000000,'First Menstrual Period Age'), (31,'2014-03-11 14:32:33','How old were you when your first child was born (If no children, write 0) ?',NULL,00000000,'Age of Bearing First Child'), (32,'2014-03-11 14:32:33','How long has it been since your last breast x-ray (mammogram)?',NULL,00000000,'Last Mammogram'), (33,'2014-03-11 14:32:33','How many women in your natural family (mother and sisters only) have had breast cancer?',NULL,00000000,'Family Breast Cancer History'), (34,'2014-03-11 14:32:33','Have you had a hysterectomy operation?',NULL,00000000,'Hysterectomy'), (35,'2014-03-11 14:32:33','How long has it been since you had a pap smear test?',NULL,00000000,'Pap Smear Test'), (36,'2014-03-11 14:32:33','How often do you examine your breasts for lumps?',NULL,00000000,'Lump Exam'), (37,'2014-03-11 14:32:33','About how long has it been since you had your breasts examined by a physician or nurse?',NULL,00000000,'Breast Exam'), (38,'2014-03-11 14:32:33','About how long has it been since you had a colorectal cancer screening?',NULL,00000000,'Colon Cancer Screening'), (39,'2014-03-11 14:32:33','Do you feel safe in your home?',NULL,00000000,'Home Safety'), (40,'2014-03-11 14:32:33','How would you describe your overall physical health?',NULL,00000000,'Overall Health'), (41,'2014-03-11 14:32:33','How many times do you engage in physical activity (exercise or work which lasts at least 20 minutes without stopping and

251

makes you breathe heavier and your heart beat faster)?',NULL,00000000,'Weekly Physical Activity'), (42,'2014-03-11 14:32:33','If you ride a motorcycle or all-terrain vehicle (ATV), what percent of the time do you wear a helmet?',NULL,00000000,'Helmet Usage'), (43,'2014-03-11 14:32:33','Do you eat some food every day that is high in fiber, such as whole grain bread, cereal, fresh fruits, or vegetables?',NULL,00000000,'Healthy Food'), (44,'2014-03-11 14:32:33','Do you eat foods every day that are high in cholesterol or fat, such as fatty meat, cheese, or fried food?',NULL,00000000,'High Cholesterol Food'), (45,'2014-03-11 14:32:33','Describe your readiness to quit smoking.',NULL,00000000,'Readiness to Quit Smoking'), (46,'2014-03-11 14:32:33','Describe your readiness to reduce your use of alcohol.',NULL,00000000,'Readiness to Reduce Alcohol Usage'), (47,'2014-03-11 14:32:33','Describe your readiness to eat healthier.',NULL,00000000,'Readiness to Eat Healthier'), (48,'2014-03-11 14:32:33','Describe your readiness to exercise more.',NULL,00000000,'Readiness to Exercise More'), (49,'2014-03-11 14:32:33','Have you suffered a personal loss or misfortune in the past year that had a serious impact on your life? (For example, a job loss, disability, separation, jail term, or death of someone close to you.)',NULL,00000000,'Misfortune or Life Impact'), (50,'2014-03-11 14:32:33',NULL,NULL,00000000,'Little interest or pleasure in doing things.'), (51,'2014-03-11 14:32:33',NULL,NULL,00000000,'Feeling down, depressed, or hopeless'), (52,'2014-03-11 14:32:33',NULL,NULL,00000000,'Trouble falling or staying asleep, or sleeping too much.'), (53,'2014-03-11 14:32:33',NULL,NULL,00000000,'Feeling tired or having little energy.'), (54,'2014-03-11 14:32:33',NULL,NULL,00000000,'Poor appetite or overeating.'), (55,'2014-03-11 14:32:33',NULL,NULL,00000000,'Feeling bad about yourself or that you are a failure or have let yourself or your family down.'), (56,'2014-03-11 14:32:33',NULL,NULL,00000000,'Trouble concentrating on things, such as reading the newspaper or watching television.'), (57,'2014-03-11 14:32:33',NULL,NULL,00000000,'Moving or speaking so slowly that other people could have noticed. Or the opposite – being so fidgety or restless that you have been moving around a lot more than usual.'), (58,'2014-03-11 14:32:33',NULL,NULL,00000000,'Thoughts that you would be better off dead, or of hurting yourself.'), (59,'2014-03-11 14:32:33',NULL,NULL,00000000,'Race'), (60,'2014-03-11 14:32:33','Are you of Hispanic origin, such as Mexican- American, Puerto Rican, or Cuban?',NULL,00000000,'Hispanic Origin'),

252

(61,'2014-03-11 14:32:33','How confident are you filling out medical or hospital forms by yourself?',NULL,00000000,'Filling Forms'), (62,'2014-03-11 14:32:33','What is the highest grade you completed in school?',NULL,00000000,'Education'), (63,'2014-03-11 14:32:33','',NULL,00000000,'breast cancer?'), (64,'2014-03-11 14:32:33','',NULL,00000000,'Emphysema or chronic lung disease (COPD)?'), (65,'2014-03-11 14:32:33','',NULL,00000000,'loss of urine control?'), (66,'2014-03-11 14:32:33','',NULL,00000000,'arthritis?'), (67,'2014-03-11 14:32:33','',NULL,00000000,'Parkinson’s disease?'), (68,'2014-03-11 14:32:33','',NULL,00000000,'depression?'), (69,'2014-03-11 14:32:33','',NULL,00000000,'hearing impairment?'), (70,'2014-03-11 14:32:33','',NULL,00000000,'vision impairment?'), (71,'2014-03-11 14:32:33','',NULL,00000000,'blindness?'), (72,'2014-03-11 14:32:33','',NULL,00000000,'deafness?'), (73,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you fallen three or more times in the last year?'), (74,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you been injured by a fall one or more times in the past year?'), (75,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have difficulty walking, such as hobbling, shuffling, or not being able to walk in a straight line?'), (76,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have difficulty telling how far things are away from you?'), (77,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you ever had a serious reaction to any medication, nonprescribed or prescribed?'), (78,'2014-03-11 14:32:33','(For example, valium or antidepressants.)',NULL,00000000,'Do you use drugs with a relaxing or sedating effect?'), (79,'2014-03-11 14:32:33','(types, NOT number of pills - include both prescription and non-prescription drugs.)',NULL,00000000,'In an average week, how many different types of medicines, drugs, and vitamins do you take?'), (80,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you ever have difficulty holding your urine until you get to a toilet?'), (81,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you ever leak or lose urine when you cough, sneeze or laugh?'), (82,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you had a pneumonia shot since turning age 55?'), (83,'2014-03-11 14:32:33',NULL,NULL,00000000,'Within the last 12 months, have you had a flu shot?'), (84,'2014-03-11 14:32:33',NULL,NULL,00000000,'About how long has it been since you have had a tetanus-diphtheria-pertussis (Tdap) shot?'), (85,'2014-03-11 14:32:33',NULL,NULL,00000000,'About when was the last time you had a check up or wellness visit with your health provider?'), (86,'2014-03-11 14:32:33',NULL,NULL,00000000,'Bathing or showering?'), (87,'2014-03-11 14:32:33',NULL,NULL,00000000,'Dressing?'),

253

(88,'2014-03-11 14:32:33',NULL,NULL,00000000,'Eating?'), (89,'2014-03-11 14:32:33',NULL,NULL,00000000,'Getting in and out of bed or chairs?'), (90,'2014-03-11 14:32:33',NULL,NULL,00000000,'Walking?'), (91,'2014-03-11 14:32:33',NULL,NULL,00000000,'Getting outside?'), (92,'2014-03-11 14:32:33',NULL,NULL,00000000,'Using the toilet, including getting to the toilet?'), (93,'2014-03-11 14:32:33',NULL,NULL,00000000,'Preparing your own meals?'), (94,'2014-03-11 14:32:33',NULL,NULL,00000000,'Shopping for personal items, such as toilet items or medicine?'), (95,'2014-03-11 14:32:33',NULL,NULL,00000000,'Managing your money, such as keeping track of expenses or paying bills?'), (96,'2014-03-11 14:32:33',NULL,NULL,00000000,'Using the telephone?'), (97,'2014-03-11 14:32:33',NULL,NULL,00000000,'Doing heavy housework, like scrubbing floors, or washing windows?'), (98,'2014-03-11 14:32:33',NULL,NULL,00000000,'Doing light housework, like doing dishes, straightening up, or light cleaning?'), (99,'2014-03-11 14:32:33',NULL,NULL,00000000,'How often do you get out of the house?'), (100,'2014-03-11 14:32:33',NULL,NULL,00000000,'How often do you limit your activities because of crime in your neighborhood?'), (101,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you ever walk a mile?'), (102,'2014-03-11 14:32:33','(about 8 blocks)',NULL,00000000,'Do you have any difficulty walking a half-mile?'), (103,'2014-03-11 14:32:33','(about 2 or 3 blocks)',NULL,00000000,'Do you have any difficulty walking for a quarter of a mile?'), (104,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any difficulty walking up and down the stairs to the second floor without help? '), (105,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any difficulty walking up 10 stairs without resting?'), (106,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any difficulty walking up 10 stairs?'), (107,'2014-03-11 14:32:33','(such as two full bags of groceries)',NULL,00000000,'Do you have any difficulty lifting or carrying something as heavy as 25 pounds?'), (108,'2014-03-11 14:32:33',NULL,NULL,00000000,'How often do you get the social and emotional support you need? '), (109,'2014-03-11 14:32:33',NULL,NULL,00000000,'How many hours a day are you home alone?'), (110,'2014-03-11 14:32:33',NULL,NULL,00000000,'About when was the last time you saw a dentist about your teeth?'), (111,'2014-03-11 14:32:33',NULL,NULL,00000000,'About when was the last time you had your hearing checked?'),

254

(112,'2014-03-11 14:32:33',NULL,NULL,00000000,'About when was the last time you had an eye exam?'), (113,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do all rugs, runners, and mats have non-skid backing?'), (114,'2014-03-11 14:32:33','(For example: glasses, magazines, cords, tools, etc.)',NULL,00000000,'Are all small objects always put away, so that they are never out in walkways and stairways?'), (115,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do bathtubs or showers that you normally use have grab bars?'), (116,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do any stairs or steps that you normally use have poor lighting?'), (117,'2014-03-11 14:32:33',NULL,NULL,00000000,'Are any of the stairs or steps that you normally use loose, crumbling or uneven?'), (118,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do all of the stairs or steps you normally use have sturdy handrails?'), (119,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have trouble biting or chewing any kind of food?'), (120,'2014-03-11 14:32:33',NULL,NULL,00000000,'Last month, for three days or more, did you have any trouble swallowing?'), (121,'2014-03-11 14:32:33',NULL,NULL,00000000,'I have tooth or mouth problems that make it hard for me to eat.'), (122,'2014-03-11 14:32:33','(Use the two-letter abbreviation.)',NULL,00000000,'What state do you live in?'), (123,'2014-03-11 14:32:33',NULL,NULL,00000000,'What is your current marital status?'), (124,'2014-03-11 14:32:33','(This item is optional.)',NULL,00000000,'What is your annual income?'), (125,'2014-03-11 14:32:33',NULL,NULL,00000000,'Are you currently employed?'), (126,'2014-03-11 14:32:33',NULL,NULL,00000000,'What is your main health insurance coverage?'), (127,'2014-03-11 14:32:33','(e.g. living wills)',NULL,00000000,'Would you be interested in free information on how to prepare for difficult health decisions?'), (128,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to recognize a friend across the street?'), (129,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to recognize a friend across a room?'), (130,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to recognize a friend who is at arm’s length away?'), (131,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to recognize a friend if you get close to his/her face?'), (132,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to read large print, such as newspaper headlines?'), (133,'2014-03-11 14:32:33',NULL,NULL,00000000,'Can you see well enough to read ordinary newspapers?'),

255

(134,'2014-03-11 14:32:33',NULL,NULL,00000000,'If you wear glasses, is your prescription up-to-date?'), (135,'2014-03-11 14:32:33',NULL,NULL,00000000,'When looking straight ahead, can you see well enough to realize if a friend is standing directly on either side of you?'), (136,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you to feel embarrassed when you meet new people?'), (137,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you to feel frustrated when talking to members of your family?'), (138,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have difficulty hearing when someone speaks in a whisper?'), (139,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you feel handicapped by a hearing problem?'), (140,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you difficulty when visiting friends, relatives, or neighbors?'), (141,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you to attend religious services less often than you would like?'), (142,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you to have arguments with family members?'), (143,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you difficulty when listening to television and radio?'), (144,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you feel that any difficulty with your hearing limits or hampers your personal or social life?'), (145,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does a hearing problem cause you difficulty when in a restaurant with relatives or friends?'), (146,'2014-03-11 14:32:33','(NOTE: Include in-laws with relatives)',NULL,00000000,'How many relatives do you see or hear from at least once a month?'), (147,'2014-03-11 14:32:33',NULL,NULL,00000000,'How often do you see or hear from the relative with whom you have the most contact?'), (148,'2014-03-11 14:32:33','That is, how many of them do you feel at ease with, can talk to about private matters, or can call on for help?',NULL,00000000,'How many relatives do you feel close to?'), (149,'2014-03-11 14:32:33',NULL,NULL,00000000,'How many close friends with whom you feel at ease, can you talk to about private matters, or can call on for help?'), (150,'2014-03-11 14:32:33',NULL,NULL,00000000,'How many of these friends do you see or hear from at least once a month?'), (151,'2014-03-11 14:32:33',NULL,NULL,00000000,'How often do you hear from the friend with whom you have the most contact?'), (152,'2014-03-11 14:32:33',NULL,NULL,00000000,'When you have an important decision to make, do you have someone you can talk to about it?'), (153,'2014-03-11 14:32:33',NULL,NULL,00000000,'When other people you know have an important decision to make, do they talk to you about it?'),

256

(154,'2014-03-11 14:32:33','(For example: shopping, cooking dinner, doing repairs, cleaning house, providing childcare, etc.)',NULL,00000000,'Does anybody rely on you to do something for them each day?'), (155,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you help anybody with things like shopping, filling out forms, doing repairs, providing childcare, etc.?'), (156,'2014-03-11 14:32:33','(NOTE: Include in-laws with “relatives”)',NULL,00000000,'Do you live alone or with other people?'), (157,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have enough lighting to get rid of shadowy areas?'), (158,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any carpet edges which are curling, uneven, or loose?'), (159,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any areas where you normally go around your house, which can be slippery when wet or icy?'), (160,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you normally use any bathtubs or showers with slippery surfaces or without non-skid mats?'), (161,'2014-03-11 14:32:33',NULL,NULL,00000000,'Are all ladders and step stools you normally use sturdy?'), (162,'2014-03-11 14:32:33',NULL,NULL,00000000,'Does your home have a smoke detector?'), (163,'2014-03-11 14:32:33',NULL,NULL,00000000,'Is the hot water in your house hot enough so that it could burn you?'), (164,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you now have an illness or condition that interferes with your eating?'), (165,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have an illness that has cut down on your appetite?'), (166,'2014-03-11 14:32:33',NULL,NULL,00000000,'Are there any kinds of foods that you don’t eat because they disagree with you?'), (167,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you wear dentures?'), (168,'2014-03-11 14:32:33',NULL,NULL,00000000,'Last month, for three days or more, did you have any spells of pain or discomfort in your abdomen?'), (169,'2014-03-11 14:32:33',NULL,NULL,00000000,'Last month, for three days or more, did you have any vomiting?'), (170,'2014-03-11 14:32:33',NULL,NULL,00000000,'Do you have any bowel trouble that makes you constipated or gives you diarrhea?'), (171,'2014-03-11 14:32:33','(Note: Net gain or loss must exceed 10 lbs.)',NULL,00000000,'Have you gained or lost any weight in the last 30 days?'), (172,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you ever had an operation on your abdomen?'), (173,'2014-03-11 14:32:33',NULL,NULL,00000000,'Have you ever been told by a doctor that you were “anemic” (had iron-poor blood)?'), (174,'2014-03-11 14:32:33',NULL,NULL,00000000,'In the past month, have you taken any medicines prescribed by a doctor?'),

257

(175,'2014-03-11 14:32:33',NULL,NULL,00000000,'In the past month, have you taken any other medicines that were not prescribed by a doctor?'), (176,'2014-03-11 14:32:33',NULL,NULL,00000000,'Are you now on any kind of a special diet?'), (177,'2014-03-11 14:32:33',NULL,NULL,00000000,'I have an illness or condition that made me change the kind and/or amount of food I eat.'), (178,'2014-03-11 14:32:33',NULL,NULL,00000000,'I eat fewer than two meals per day.'), (179,'2014-03-11 14:32:33',NULL,NULL,00000000,'I eat few fruits, vegetables, or milk products.'), (180,'2014-03-11 14:32:33',NULL,NULL,00000000,'I don’t always have enough money to buy the food I need.'), (181,'2014-03-11 14:32:33',NULL,NULL,00000000,'I eat alone most of the time.'), (182,'2014-03-11 14:32:33',NULL,NULL,00000000,'I take three or more different prescribed or over-the-counter drugs a day.'), (183,'2014-03-11 14:32:33',NULL,NULL,00000000,'Without wanting to, I have lost or gained 10 pounds in the last 6 months.'), (184,'2014-03-11 14:32:33',NULL,NULL,00000000,'I am not always physically able to shop, cook and/or feed myself.');

/*!40000 ALTER TABLE `Question` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Question_AnswerPart # ------

DROP TABLE IF EXISTS `Question_AnswerPart`;

CREATE TABLE `Question_AnswerPart` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `position` smallint(6) NOT NULL, `answerPart_id` smallint(6) NOT NULL, `question_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `id` (`id`), KEY `FK16877ACA92D1A65E` (`answerPart_id`), KEY `FK16877ACA8F77231E` (`question_id`), CONSTRAINT `FK16877ACA8F77231E` FOREIGN KEY (`question_id`) REFERENCES `Question` (`id`), CONSTRAINT `FK16877ACA92D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

258

LOCK TABLES `Question_AnswerPart` WRITE; /*!40000 ALTER TABLE `Question_AnswerPart` DISABLE KEYS */;

INSERT INTO `Question_AnswerPart` (`id`, `position`, `answerPart_id`, `question_id`) VALUES (2,0,1,1), (3,0,2,2), (4,0,3,3), (5,1,4,3), (6,0,5,4), (7,0,6,5), (8,0,7,6), (9,0,8,7), (10,0,9,8), (11,0,10,9), (12,0,11,10), (13,0,12,11), (14,1,13,11), (15,0,14,12), (16,0,15,13), (17,0,16,14), (18,0,17,15), (19,0,18,16), (20,1,19,16), (21,2,20,16), (22,3,21,16), (23,0,22,17), (24,0,23,18), (25,0,24,19), (26,0,25,20), (27,0,26,21), (28,0,27,22), (29,0,28,23), (30,0,29,24), (31,0,30,25), (32,0,31,26), (33,0,32,27), (34,1,33,27), (35,2,34,27), (36,3,35,27), (37,0,36,28), (38,0,37,29), (39,0,38,30), (40,0,39,31), (41,0,40,32),

259

(42,0,41,33), (43,0,42,34), (44,0,43,35), (45,0,44,36), (46,0,45,37), (47,0,46,38), (48,0,47,39), (49,0,48,40), (50,0,49,41), (51,0,50,42), (52,0,51,43), (53,0,52,44), (54,0,53,45), (55,0,54,46), (56,0,55,47), (57,0,56,48), (58,0,57,49), (59,0,58,50), (60,0,59,51), (61,0,60,52), (62,0,61,53), (63,0,62,54), (64,0,63,55), (65,0,64,56), (66,0,65,57), (67,0,66,58), (68,0,67,59), (69,0,68,60), (70,0,69,61), (71,0,70,62), (72,0,71,63), (73,0,72,64), (74,0,73,65), (75,0,74,66), (76,0,75,67), (77,0,76,68), (78,0,77,69), (79,0,78,70), (80,0,79,71), (81,0,80,72), (82,0,81,73), (83,0,82,74), (84,0,83,75), (85,0,84,76), (86,0,85,77),

260

(87,0,86,78), (88,0,87,79), (89,0,88,80), (90,0,89,81), (92,0,90,82), (93,0,91,83), (94,0,92,84), (95,0,93,85), (96,0,94,86), (97,0,95,87), (98,0,96,88), (99,0,97,89), (100,0,98,90), (101,0,99,91), (102,0,100,92), (103,0,101,93), (104,0,102,94), (105,0,103,95), (106,0,104,96), (108,0,105,97), (109,0,106,98), (110,0,107,99), (111,0,108,100), (112,0,109,101), (113,0,110,102), (114,0,111,103), (115,0,112,104), (116,0,113,105), (117,0,114,106), (118,0,115,107), (120,0,116,108), (121,0,117,109), (123,0,118,110), (124,0,119,111), (125,0,120,112), (126,0,121,113), (127,0,122,114), (128,0,123,115), (129,0,124,116), (130,0,125,117), (131,0,126,118), (132,0,127,119), (133,0,128,120), (134,0,129,121), (135,0,130,122),

261

(136,0,131,123), (137,0,132,124), (138,0,133,125), (139,0,134,126), (140,0,135,127), (141,0,136,128), (142,0,137,129), (143,0,138,130), (144,0,139,131), (145,0,140,132), (146,0,141,133), (147,0,142,134), (148,0,143,135), (149,0,144,136), (150,0,145,137), (151,0,146,138), (152,0,147,139), (153,0,148,140), (154,0,149,141), (155,0,150,142), (156,0,151,143), (158,0,152,144), (159,0,153,145), (160,0,154,146), (161,0,155,147), (162,0,156,148), (163,0,157,149), (164,0,158,150), (165,0,159,151), (166,0,160,152), (168,0,161,153), (169,0,162,154), (170,0,163,155), (171,0,164,156), (172,0,165,157), (173,0,166,158), (174,0,167,159), (175,0,168,160), (176,0,169,161), (177,0,170,162), (178,0,171,163), (180,0,172,164), (181,0,173,165), (182,0,174,166), (183,0,175,167),

262

(184,0,176,168), (185,0,177,169), (186,0,178,170), (187,0,179,171), (188,0,180,172), (189,0,181,173), (190,0,182,174), (191,0,183,175), (192,0,184,176), (193,0,185,177), (194,0,186,178), (195,0,187,179), (196,0,188,180), (197,0,189,181), (198,0,190,182), (199,0,191,183), (200,0,192,184);

/*!40000 ALTER TABLE `Question_AnswerPart` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table QuestionGroup # ------

DROP TABLE IF EXISTS `QuestionGroup`;

CREATE TABLE `QuestionGroup` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `description` varchar(255) DEFAULT NULL, `droppedFromUseDate` datetime DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `QuestionGroup` WRITE; /*!40000 ALTER TABLE `QuestionGroup` DISABLE KEYS */;

INSERT INTO `QuestionGroup` (`id`, `createDate`, `description`, `droppedFromUseDate`) VALUES (1,'2014-03-11 14:32:33','Sex (ML1)',NULL), (2,'2014-03-11 14:32:33','Age (ML2)',NULL), (3,'2014-03-11 14:32:33','Height (ML3)',NULL), (4,'2014-03-11 14:32:33','Weight (ML4)',NULL),

263

(5,'2014-03-11 14:32:33','Body Frame Size (ML5)',NULL), (6,'2014-03-11 14:32:33','Diabetes Stroke Heart (ML6, X2 - X4)',NULL), (7,'2014-03-11 14:32:33','Blood Pressure Medication (ML7)',NULL), (8,'2014-03-11 14:32:33','Blood Pressure (ML8)',NULL), (9,'2014-03-11 14:32:33','Estimate Blood Pressure (ML9)',NULL), (10,'2014-03-11 14:32:33','Cholesterol Level (ML10)',NULL), (11,'2014-03-11 14:32:33','HDL Cholesterol (ML11)',NULL), (12,'2014-03-11 14:32:33','Smoking (ML15)',NULL), (13,'2014-03-11 14:32:33','Used to Smoke (ML17a - ML17b)',NULL), (14,'2014-03-11 14:32:33','Still Smoke (ML16)',NULL), (15,'2014-03-11 14:32:33','Daily Cigar (ML12)',NULL), (16,'2014-03-11 14:32:33','Daily Pipe (ML13)',NULL), (17,'2014-03-11 14:32:33','Daily Tobacco (ML14)',NULL), (18,'2014-03-11 14:32:33','Travel Miles (ML18a - ML18b)',NULL), (19,'2014-03-11 14:32:33','Travel Method (ML19)',NULL), (20,'2014-03-11 14:32:33','Safety Belt Usage (ML20)',NULL), (21,'2014-03-11 14:32:33','Driving Speed (ML21)',NULL), (22,'2014-03-11 14:32:33','Drinking and Driving (ML22)',NULL), (23,'2014-03-11 14:32:33','Drinking (ML23a, ML23b)',NULL), (24,'2014-03-11 14:32:33','Men Only (ML33)',NULL), (25,'2014-03-11 14:32:33','Women Only (ML24 - ML32)',NULL), (26,'2014-03-11 14:32:33','Home Safety (ML34)',NULL), (27,'2014-03-11 14:32:33','Overall Health (ML35)',NULL), (28,'2014-03-11 14:32:33','Weekly Physical Activity (ML36)',NULL), (29,'2014-03-11 14:32:33','Helmet Usage (ML37)',NULL), (30,'2014-03-11 14:32:33','Healthy Food (ML38)',NULL), (31,'2014-03-11 14:32:33','High Cholesterol Food (ML39)',NULL), (32,'2014-03-11 14:32:33','Mental Health (PHQa - PHQi)',NULL), (33,'2014-03-11 14:32:33','Stage Of Change (SOC_SMOK, SOC_ALC, SOC_NUT, SOC_EXE)',NULL), (34,'2014-03-11 14:32:33','Misfortune or Life Impact (ML41)',NULL), (35,'2014-03-11 14:32:33','Race and Origin (ML42a - ML42b)',NULL), (36,'2014-03-11 14:32:33','Education (HEALTH_LIT - ML43)',NULL), (37,'2014-03-11 14:32:33','Medical Conditions (X5, X12, X7 - X10, X13 - X16)',NULL), (38,'2014-03-11 14:32:33','Falls (X17 - X20)',NULL), (39,'2014-03-11 14:32:33','Immunizations and Checkups (X26, X27, X29)',NULL), (40,'2014-03-11 14:32:33','Activities and Functions (F4 - F11)',NULL), (41,'2014-03-11 14:32:33','Mobility (F2, F18, F17, F21, F20, F19, F22)',NULL), (42,'2014-03-11 14:32:33','Social Support (B13, B12)',NULL), (43,'2014-03-11 14:32:33','Dental, Hearing, Vision Checkups (H1 - H3)',NULL), (44,'2014-03-11 14:32:33','Vision (H4 - H7, H9, H8, H10, H11)',NULL),

264

(45,'2014-03-11 14:32:33','Hearing (H12 - H21)',NULL), (46,'2014-03-11 14:32:33','Home Safety (E2, E4, E7 - E10)',NULL), (47,'2014-03-11 14:32:33','Nutrition (N3, N7, N21)',NULL), (48,'2014-03-11 14:32:33','Demographics (D1, D3 - D6, D8)',NULL), (49,'2014-03-11 14:32:33','Falls (X21, ML23b, ML23c)',NULL), (50,'2014-03-11 14:32:33','Falls (X24, X25)',NULL), (51,'2014-03-11 14:32:33','Immunizations and Checkups (X28)',NULL), (52,'2014-03-11 14:32:33','Activities and Functions (F12 - F14)',NULL), (53,'2014-03-11 14:32:33','Activities and Functions (F15, F16)',NULL), (54,'2014-03-11 14:32:33','Activities and Functions (F1, F3)',NULL), (55,'2014-03-11 14:32:33','Social Support (B1 - B12)',NULL), (56,'2014-03-11 14:32:33','Home Safety (E1 - E13)',NULL), (57,'2014-03-11 14:32:33','Nutrition (N1 - N12, N14 - N19, N21 - N26)',NULL);

/*!40000 ALTER TABLE `QuestionGroup` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table QuestionGroup_Question # ------

DROP TABLE IF EXISTS `QuestionGroup_Question`;

CREATE TABLE `QuestionGroup_Question` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `position` smallint(6) NOT NULL, `group_id` smallint(6) NOT NULL, `question_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK8C34A36C94CF1470` (`group_id`), KEY `FK8C34A36C8F77231E` (`question_id`), CONSTRAINT `FK8C34A36C8F77231E` FOREIGN KEY (`question_id`) REFERENCES `Question` (`id`), CONSTRAINT `FK8C34A36C94CF1470` FOREIGN KEY (`group_id`) REFERENCES `QuestionGroup` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `QuestionGroup_Question` WRITE; /*!40000 ALTER TABLE `QuestionGroup_Question` DISABLE KEYS */;

INSERT INTO `QuestionGroup_Question` (`id`, `position`, `group_id`, `question_id`) VALUES (1,0,1,1), (2,0,2,2),

265

(3,0,3,3), (4,0,4,4), (5,0,5,5), (6,0,6,6), (7,1,6,7), (8,2,6,8), (9,3,6,9), (10,0,7,10), (11,0,8,11), (12,0,9,12), (13,0,10,13), (14,0,11,14), (16,0,12,15), (17,0,13,16), (18,0,14,17), (19,0,15,18), (20,0,16,19), (21,0,17,20), (22,0,18,21), (23,1,18,22), (24,0,19,23), (25,0,20,24), (26,0,21,25), (27,0,22,26), (28,0,23,27), (29,1,23,28), (30,0,24,29), (31,0,25,30), (32,1,25,31), (33,2,25,32), (34,3,25,33), (35,4,25,34), (36,5,25,35), (37,6,25,36), (39,7,25,37), (40,8,25,38), (41,0,26,39), (42,0,27,40), (43,0,28,41), (44,0,29,42), (45,0,30,43), (46,0,31,44), (47,0,32,50), (48,1,32,51), (49,2,32,52),

266

(50,3,32,53), (51,4,32,54), (52,5,32,55), (53,6,32,56), (54,7,32,57), (55,8,32,58), (56,0,33,45), (57,1,33,46), (58,2,33,47), (59,3,33,48), (60,0,34,49), (61,0,35,59), (62,1,35,60), (63,0,36,61), (64,1,36,62), (65,0,37,63), (66,1,37,64), (67,2,37,65), (68,3,37,66), (69,4,37,67), (70,5,37,68), (71,6,37,69), (72,7,37,70), (73,8,37,71), (74,9,37,72), (75,0,38,73), (76,1,38,74), (77,2,38,75), (78,3,38,76), (79,0,49,77), (80,1,49,78), (81,2,49,79), (82,0,50,80), (83,1,50,81), (84,0,39,82), (85,1,39,83), (86,2,39,84), (87,0,51,85), (88,0,40,86), (89,1,40,87), (90,2,40,88), (91,3,40,89), (92,4,40,90), (93,5,40,91), (94,6,40,92),

267

(95,7,40,93), (96,0,52,94), (97,1,52,95), (98,2,52,96), (99,0,53,97), (100,1,53,98), (101,0,54,99), (102,1,54,100), (103,0,41,101), (104,1,41,102), (105,2,41,103), (107,3,41,104), (108,4,41,105), (110,5,41,106), (111,6,41,107), (112,0,42,108), (113,1,42,109), (114,0,43,110), (115,1,43,111), (116,2,43,112), (117,0,46,113), (118,1,46,114), (119,2,46,115), (120,3,46,116), (121,4,46,117), (122,5,46,118), (123,0,47,119), (124,1,47,120), (125,2,47,121), (126,0,48,122), (127,1,48,123), (128,2,48,124), (129,3,48,125), (130,4,48,126), (131,5,48,127), (132,0,44,128), (133,1,44,129), (134,2,44,130), (135,3,44,131), (136,4,44,132), (137,5,44,133), (138,6,44,134), (139,7,44,135), (140,0,45,136), (141,1,45,137),

268

(142,2,45,138), (143,3,45,139), (144,4,45,140), (145,5,45,141), (146,6,45,142), (147,7,45,143), (148,8,45,144), (149,9,45,145), (150,0,55,146), (151,1,55,147), (152,2,55,148), (153,3,55,149), (154,4,55,150), (155,5,55,151), (156,6,55,152), (157,7,55,153), (158,8,55,154), (159,9,55,155), (160,10,55,156), (161,11,55,109), (162,0,56,157), (163,1,56,113), (164,2,56,158), (165,3,56,114), (166,4,56,159), (167,5,56,160), (168,6,56,115), (169,7,56,116), (170,8,56,117), (171,9,56,118), (172,10,56,161), (173,11,56,162), (174,12,56,163), (176,0,57,164), (177,1,57,165), (178,2,57,119), (179,3,57,166), (180,4,57,167), (181,5,57,168), (182,6,57,120), (183,7,57,169), (184,8,57,170), (185,9,57,171), (186,10,57,172), (187,11,57,173),

269

(188,12,57,174), (189,13,57,175), (190,14,57,176), (191,15,57,177), (192,16,57,178), (193,17,57,179), (194,18,57,121), (195,19,57,180), (196,20,57,181), (197,21,57,182), (198,22,57,183), (199,23,57,184);

/*!40000 ALTER TABLE `QuestionGroup_Question` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Questionnaire # ------

DROP TABLE IF EXISTS `Questionnaire`;

CREATE TABLE `Questionnaire` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `date` datetime NOT NULL, `frame_id` smallint(6) NOT NULL, `patient_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FKF3003D837464D4DB` (`frame_id`), KEY `FKF3003D83633DDFF6` (`patient_id`), CONSTRAINT `FKF3003D83633DDFF6` FOREIGN KEY (`patient_id`) REFERENCES `Patient` (`id`), CONSTRAINT `FKF3003D837464D4DB` FOREIGN KEY (`frame_id`) REFERENCES `QuestionnaireFrame` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table QuestionnaireFrame # ------

DROP TABLE IF EXISTS `QuestionnaireFrame`;

CREATE TABLE `QuestionnaireFrame` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

270

`createDate` datetime NOT NULL, `droppedFromUseDate` datetime DEFAULT NULL, `questionnaireType` int(11) NOT NULL, `name` varchar(50) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `QuestionnaireFrame` WRITE; /*!40000 ALTER TABLE `QuestionnaireFrame` DISABLE KEYS */;

INSERT INTO `QuestionnaireFrame` (`id`, `createDate`, `droppedFromUseDate`, `questionnaireType`, `name`) VALUES (1,'2014-03-11 14:32:33',NULL,0,'Midlife'), (2,'2014-03-11 14:32:33',NULL,1,'20-Minute Older Adult'), (3,'2014-03-11 14:32:33',NULL,2,'Comprehensive Older Adult');

/*!40000 ALTER TABLE `QuestionnaireFrame` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table QuestionnaireFrame_HealthCategory # ------

DROP TABLE IF EXISTS `QuestionnaireFrame_HealthCategory`;

CREATE TABLE `QuestionnaireFrame_HealthCategory` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `position` smallint(6) NOT NULL, `category_id` smallint(6) NOT NULL, `frame_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FKBD4782CF7464D4DB` (`frame_id`), KEY `FKBD4782CFDC7DCB9A` (`category_id`), CONSTRAINT `FKBD4782CFDC7DCB9A` FOREIGN KEY (`category_id`) REFERENCES `HealthCategory` (`id`), CONSTRAINT `FKBD4782CF7464D4DB` FOREIGN KEY (`frame_id`) REFERENCES `QuestionnaireFrame` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `QuestionnaireFrame_HealthCategory` WRITE; /*!40000 ALTER TABLE `QuestionnaireFrame_HealthCategory` DISABLE KEYS */;

INSERT INTO `QuestionnaireFrame_HealthCategory` (`id`, `position`, `category_id`, `frame_id`)

271

VALUES (1,0,1,1), (2,1,2,1), (3,2,3,1), (4,3,4,1), (5,4,5,1), (6,5,6,1), (7,6,7,1), (8,7,8,1), (9,8,9,1), (10,0,1,2), (11,1,2,2), (12,2,3,2), (13,3,4,2), (14,4,5,2), (15,5,6,2), (16,6,7,2), (17,7,8,2), (18,8,9,2), (19,9,10,2), (20,10,11,2), (21,11,12,2), (22,12,13,2), (23,13,14,2), (24,14,15,2), (25,15,16,2), (26,16,17,2), (27,17,18,2), (28,18,19,2), (29,0,1,3), (30,1,2,3), (31,2,3,3), (32,3,4,3), (33,4,5,3), (34,5,6,3), (35,6,7,3), (36,7,8,3), (37,8,9,3), (38,9,10,3), (39,10,11,3), (40,11,12,3), (41,12,13,3), (42,13,14,3), (43,14,20,3), (44,15,21,3),

272

(45,16,22,3), (46,17,23,3), (47,18,19,3);

/*!40000 ALTER TABLE `QuestionnaireFrame_HealthCategory` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table Risk # ------

DROP TABLE IF EXISTS `Risk`;

CREATE TABLE `Risk` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `value` varchar(255) NOT NULL, `questionnaire_id` bigint(20) NOT NULL, `riskType_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK26DEEFAD71F05E` (`riskType_id`), KEY `FK26DEEFF3F1BE36` (`questionnaire_id`), CONSTRAINT `FK26DEEFF3F1BE36` FOREIGN KEY (`questionnaire_id`) REFERENCES `Questionnaire` (`id`), CONSTRAINT `FK26DEEFAD71F05E` FOREIGN KEY (`riskType_id`) REFERENCES `RiskType` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table RiskType # ------

DROP TABLE IF EXISTS `RiskType`;

CREATE TABLE `RiskType` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL, `droppedFromUseDate` datetime DEFAULT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

LOCK TABLES `RiskType` WRITE; /*!40000 ALTER TABLE `RiskType` DISABLE KEYS */;

273

INSERT INTO `RiskType` (`id`, `createDate`, `droppedFromUseDate`, `name`) VALUES (1,'2014-03-11 14:32:33',NULL,'Alcohol Toxicity'), (2,'2014-03-11 14:32:33',NULL,'All Other'), (3,'2014-03-11 14:32:33',NULL,'All Other Unintentional Injury'), (4,'2014-03-11 14:32:33',NULL,'Alzheimers'), (5,'2014-03-11 14:32:33',NULL,'Arterial Vascular Disease'), (6,'2014-03-11 14:32:33',NULL,'Bladder Cancer'), (7,'2014-03-11 14:32:33',NULL,'Brain Cancer'), (8,'2014-03-11 14:32:33',NULL,'Breast Cancer'), (9,'2014-03-11 14:32:33',NULL,'Cervical Cancer'), (10,'2014-03-11 14:32:33',NULL,'Colon Cancer'), (11,'2014-03-11 14:32:33',NULL,'Diabetes Mellitus'), (12,'2014-03-11 14:32:33',NULL,'Drowning'), (13,'2014-03-11 14:32:33',NULL,'Emphysema/Bronchitis'), (14,'2014-03-11 14:32:33',NULL,'Esophageal Cancer'), (15,'2014-03-11 14:32:33',NULL,'Falling'), (16,'2014-03-11 14:32:33',NULL,'Fire Injury'), (17,'2014-03-11 14:32:33',NULL,'Heart Attack'), (18,'2014-03-11 14:32:33',NULL,'HIV/AIDS'), (19,'2014-03-11 14:32:33',NULL,'Homicide/Assault'), (20,'2014-03-11 14:32:33',NULL,'Hypertensive Heart Disease'), (21,'2014-03-11 14:32:33',NULL,'Influenza/Pneumonia'), (22,'2014-03-11 14:32:33',NULL,'Kidney Failure'), (23,'2014-03-11 14:32:33',NULL,'Laryngeal Cancer'), (24,'2014-03-11 14:32:33',NULL,'Leukemia'), (25,'2014-03-11 14:32:33',NULL,'Liver Cirrhosis'), (26,'2014-03-11 14:32:33',NULL,'Lung Cancer'), (27,'2014-03-11 14:32:33',NULL,'Lymphoma'), (28,'2014-03-11 14:32:33',NULL,'Motor Vehicle Injury'), (29,'2014-03-11 14:32:33',NULL,'Mouth Cancer'), (30,'2014-03-11 14:32:33',NULL,'Ovarian Cancer'), (31,'2014-03-11 14:32:33',NULL,'Pancreatic Cancer'), (32,'2014-03-11 14:32:33',NULL,'Pedestrian Injury'), (33,'2014-03-11 14:32:33',NULL,'Peptic Ulcer'), (34,'2014-03-11 14:32:33',NULL,'Pneumoconiosis'), (35,'2014-03-11 14:32:33',NULL,'Poisoning'), (36,'2014-03-11 14:32:33',NULL,'Prostatic Cancer'), (37,'2014-03-11 14:32:33',NULL,'Rectal Cancer'), (38,'2014-03-11 14:32:33',NULL,'Rheumatic Heart Disease'), (39,'2014-03-11 14:32:33',NULL,'Skin Cancer/Melanoma'), (40,'2014-03-11 14:32:33',NULL,'Stomach Cancer'), (41,'2014-03-11 14:32:33',NULL,'Stroke'), (42,'2014-03-11 14:32:33',NULL,'Suicide'), (43,'2014-03-11 14:32:33',NULL,'Throat Cancer'),

274

(44,'2014-03-11 14:32:33',NULL,'Uterine Cancer'), (45,'2014-03-11 14:32:33',NULL,'critical_drug_reaction'), (46,'2014-03-11 14:32:33',NULL,'critical_influenza'), (47,'2014-03-11 14:32:33',NULL,'critical_physical_disability_female'), (48,'2014-03-11 14:32:33',NULL,'critical_physical_disability_male'), (49,'2014-03-11 14:32:33',NULL,'environment_falls'), (50,'2014-03-11 14:32:33',NULL,'environment_general'), (51,'2014-03-11 14:32:33',NULL,'environment_stairs'), (52,'2014-03-11 14:32:33',NULL,'falls_ADL'), (53,'2014-03-11 14:32:33',NULL,'falls_arthritis'), (54,'2014-03-11 14:32:33',NULL,'falls_COPD'), (55,'2014-03-11 14:32:33',NULL,'falls_depression'), (56,'2014-03-11 14:32:33',NULL,'falls_depth'), (57,'2014-03-11 14:32:33',NULL,'falls_environmental'), (58,'2014-03-11 14:32:33',NULL,'falls_homealone'), (59,'2014-03-11 14:32:33',NULL,'falls_incontinence'), (60,'2014-03-11 14:32:33',NULL,'falls_injuries'), (61,'2014-03-11 14:32:33',NULL,'falls_lastyear'), (62,'2014-03-11 14:32:33',NULL,'falls_leaveshouse'), (63,'2014-03-11 14:32:33',NULL,'falls_parkinson'), (64,'2014-03-11 14:32:33',NULL,'falls_sedative'), (65,'2014-03-11 14:32:33',NULL,'falls_socialnetwork'), (66,'2014-03-11 14:32:33',NULL,'falls_vision'), (67,'2014-03-11 14:32:33',NULL,'functional_activity_level'), (68,'2014-03-11 14:32:33',NULL,'functional_crime'), (69,'2014-03-11 14:32:33',NULL,'functional_home'), (70,'2014-03-11 14:32:33',NULL,'functional_selfcare'), (71,'2014-03-11 14:32:33',NULL,'functional_walking'), (72,'2014-03-11 14:32:33',NULL,'hearvision1'), (73,'2014-03-11 14:32:33',NULL,'hearvision2'), (74,'2014-03-11 14:32:33',NULL,'hearvision3'), (75,'2014-03-11 14:32:33',NULL,'mentalhealth'), (76,'2014-03-11 14:32:33',NULL,'nutrition1'), (77,'2014-03-11 14:32:33',NULL,'nutrition2'), (78,'2014-03-11 14:32:33',NULL,'nutrition3'), (79,'2014-03-11 14:32:33',NULL,'nutrition4'), (80,'2014-03-11 14:32:33',NULL,'nutrition5'), (81,'2014-03-11 14:32:33',NULL,'nutrition6'), (82,'2014-03-11 14:32:33',NULL,'nutrition7'), (83,'2014-03-11 14:32:33',NULL,'preventBurn'), (84,'2014-03-11 14:32:33',NULL,'preventFlu'), (85,'2014-03-11 14:32:33',NULL,'preventPneumonia'), (86,'2014-03-11 14:32:33',NULL,'preventTetanus'), (87,'2014-03-11 14:32:33',NULL,'preventUrinary'), (88,'2014-03-11 14:32:33',NULL,'socialnetwork1'),

275

(89,'2014-03-11 14:32:33',NULL,'socialnetwork2'), (90,'2014-03-11 14:32:33',NULL,'socialnetwork3'), (91,'2014-03-11 14:32:33',NULL,'socialnetwork4'), (92,'2014-03-11 14:32:33',NULL,'socialnetwork5');

/*!40000 ALTER TABLE `RiskType` ENABLE KEYS */; UNLOCK TABLES;

# Dump of table SoftwareAdmin # ------

DROP TABLE IF EXISTS `SoftwareAdmin`;

CREATE TABLE `SoftwareAdmin` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK35ACD1C847140EFE` (`user_id`), CONSTRAINT `FK35ACD1C847140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

# Dump of table User # ------

DROP TABLE IF EXISTS `User`;

CREATE TABLE `User` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL, `firstName` varchar(255) DEFAULT NULL, `lastName` varchar(255) DEFAULT NULL, `password` varchar(255) DEFAULT NULL, `resetKey` varchar(255) DEFAULT NULL, `salt` varchar(255) DEFAULT NULL, `userType` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

276

# Dump of table User_Facility # ------

DROP TABLE IF EXISTS `User_Facility`;

CREATE TABLE `User_Facility` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `facility_id` smallint(6) NOT NULL, `user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`), KEY `FK545B5C9747140EFE` (`user_id`), KEY `FK545B5C979907CDFE` (`facility_id`), CONSTRAINT `FK545B5C979907CDFE` FOREIGN KEY (`facility_id`) REFERENCES `Facility` (`id`), CONSTRAINT `FK545B5C9747140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

Appendix N – Database Creation Commands

CREATE TABLE `Answer` (

`id` bigint(20) NOT NULL AUTO_INCREMENT, `value` varchar(255) NOT NULL, `answerPart_id` smallint(6) NOT NULL,

`questionnaire_id` bigint(20) NOT NULL, PRIMARY KEY (`id`),

KEY `FK752F2BDE92D1A65E` (`answerPart_id`),

KEY `FK752F2BDEF3F1BE36` (`questionnaire_id`),

CONSTRAINT `FK752F2BDEF3F1BE36` FOREIGN KEY (`questionnaire_id`) REFERENCES `Questionnaire` (`id`), CONSTRAINT `FK752F2BDE92D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

277

CREATE TABLE `AnswerPart` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `droppedFromUseDate` datetime DEFAULT NULL,

`high` varchar(255) DEFAULT NULL, `low` varchar(255) DEFAULT NULL,

`name` varchar(255) DEFAULT NULL,

`title` varchar(255) DEFAULT NULL,

`inputType` int(11) DEFAULT NULL, `unit` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `AnswerPart_AnswerPartOption` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`position` smallint(6) NOT NULL, `answerPart_id` smallint(6) NOT NULL, `answerPartOption_id` smallint(6) NOT NULL,

PRIMARY KEY (`id`),

KEY `FK3315FE54D985B75E` (`answerPartOption_id`),

KEY `FK3315FE5492D1A65E` (`answerPart_id`), CONSTRAINT `FK3315FE5492D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`),

CONSTRAINT `FK3315FE54D985B75E` FOREIGN KEY (`answerPartOption_id`) REFERENCES `AnswerPartOption` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

278

CREATE TABLE `AnswerPartOption` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `label` varchar(255) DEFAULT NULL, `value` varchar(255) DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Facility` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `city` varchar(255) DEFAULT NULL, `facilityType` int(11) NOT NULL,

`name` varchar(255) NOT NULL, `state` varchar(255) DEFAULT NULL,

`street` varchar(255) DEFAULT NULL, `zipCode` varchar(255) DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `HealthCategory` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`createDate` datetime NOT NULL, `description` varchar(255) DEFAULT NULL,

`droppedFromUseDate` datetime DEFAULT NULL, `title` varchar(255) NOT NULL, `type` int(11) NOT NULL,

279

PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `HealthCategory_QuestionGroup` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `gender` int(11) NOT NULL,

`position` smallint(6) NOT NULL, `category_id` smallint(6) NOT NULL,

`group_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FKF70FCA34D2494991` (`category_id`),

KEY `FKF70FCA34DC7DCB9A` (`category_id`), KEY `FKF70FCA3494CF1470` (`group_id`),

CONSTRAINT `FKF70FCA3494CF1470` FOREIGN KEY (`group_id`) REFERENCES `QuestionGroup` (`id`), CONSTRAINT `FKF70FCA34DC7DCB9A` FOREIGN KEY (`category_id`) REFERENCES `HealthCategory` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Organization` ( `id` smallint(6) NOT NULL AUTO_INCREMENT, `city` varchar(255) DEFAULT NULL,

`name` varchar(255) NOT NULL, `organizationType` int(11) NOT NULL,

`state` varchar(255) DEFAULT NULL, `street` varchar(255) DEFAULT NULL,

280

`zipCode` varchar(255) DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Organization_Facility` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`facility_id` smallint(6) NOT NULL, `organization_id` smallint(6) NOT NULL,

PRIMARY KEY (`id`), KEY `FKC296902F279251FE` (`organization_id`), KEY `FKC296902F9907CDFE` (`facility_id`),

CONSTRAINT `FKC296902F9907CDFE` FOREIGN KEY (`facility_id`) REFERENCES `Facility` (`id`),

CONSTRAINT `FKC296902F279251FE` FOREIGN KEY (`organization_id`) REFERENCES `Organization` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Patient` ( `id` bigint(20) NOT NULL AUTO_INCREMENT,

`city` varchar(255) DEFAULT NULL, `dateOfBirth` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL,

`firstName` varchar(255) DEFAULT NULL, `gender` int(11) DEFAULT NULL,

`hispanicOrigin` varchar(255) DEFAULT NULL, `lastName` varchar(255) DEFAULT NULL,

281

`password` varchar(255) DEFAULT NULL,

`phoneNumber` varchar(255) DEFAULT NULL, `race` varchar(255) DEFAULT NULL, `resetKey` varchar(255) DEFAULT NULL,

`salt` varchar(255) DEFAULT NULL, `state` varchar(255) DEFAULT NULL,

`street` varchar(255) DEFAULT NULL,

`zipCode` varchar(255) DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Patient_Provider` ( `id` bigint(20) NOT NULL AUTO_INCREMENT,

`patient_id` bigint(20) NOT NULL, `provider_id` smallint(6) NOT NULL,

PRIMARY KEY (`id`), KEY `FK38FB8A2BDBAFE33E` (`provider_id`), KEY `FK38FB8A2B633DDFF6` (`patient_id`),

CONSTRAINT `FK38FB8A2B633DDFF6` FOREIGN KEY (`patient_id`) REFERENCES `Patient` (`id`),

CONSTRAINT `FK38FB8A2BDBAFE33E` FOREIGN KEY (`provider_id`) REFERENCES `Provider` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `PreloadValue` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

282

`createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33',

`droppedFromUseDate` datetime DEFAULT NULL, `gender` int(11) NOT NULL, `type` varchar(255) NOT NULL,

`value` varchar(255) NOT NULL, `answerPart_id` smallint(6) NOT NULL,

PRIMARY KEY (`id`),

KEY `FK68A0E50892D1A65E` (`answerPart_id`),

CONSTRAINT `FK68A0E50892D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Provider` (

`id` smallint(6) NOT NULL AUTO_INCREMENT,

`providerAccessLevel` int(11) NOT NULL, `providerType` int(11) NOT NULL,

`user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FKC8FE6A1147140EFE` (`user_id`),

CONSTRAINT `FKC8FE6A1147140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Question` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33',

283

`description` varchar(255) DEFAULT NULL,

`droppedFromUseDate` datetime DEFAULT NULL, `isRequired` bit(1) NOT NULL, `title` varchar(255) DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Question_AnswerPart` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `position` smallint(6) NOT NULL, `answerPart_id` smallint(6) NOT NULL,

`question_id` smallint(6) NOT NULL, PRIMARY KEY (`id`),

UNIQUE KEY `id` (`id`), KEY `FK16877ACA92D1A65E` (`answerPart_id`),

KEY `FK16877ACA8F77231E` (`question_id`), CONSTRAINT `FK16877ACA8F77231E` FOREIGN KEY (`question_id`) REFERENCES `Question` (`id`), CONSTRAINT `FK16877ACA92D1A65E` FOREIGN KEY (`answerPart_id`) REFERENCES `AnswerPart` (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `QuestionGroup` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`createDate` datetime NOT NULL DEFAULT '2014-03-11 14:32:33', `description` varchar(255) DEFAULT NULL,

284

`droppedFromUseDate` datetime DEFAULT NULL,

PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `QuestionGroup_Question` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`position` smallint(6) NOT NULL, `group_id` smallint(6) NOT NULL,

`question_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FK8C34A36C94CF1470` (`group_id`),

KEY `FK8C34A36C8F77231E` (`question_id`), CONSTRAINT `FK8C34A36C8F77231E` FOREIGN KEY (`question_id`) REFERENCES `Question` (`id`), CONSTRAINT `FK8C34A36C94CF1470` FOREIGN KEY (`group_id`) REFERENCES `QuestionGroup` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Questionnaire` (

`id` bigint(20) NOT NULL AUTO_INCREMENT, `date` datetime NOT NULL, `frame_id` smallint(6) NOT NULL,

`patient_id` bigint(20) NOT NULL, PRIMARY KEY (`id`),

KEY `FKF3003D837464D4DB` (`frame_id`), KEY `FKF3003D83633DDFF6` (`patient_id`),

285

CONSTRAINT `FKF3003D83633DDFF6` FOREIGN KEY (`patient_id`) REFERENCES `Patient` (`id`), CONSTRAINT `FKF3003D837464D4DB` FOREIGN KEY (`frame_id`) REFERENCES `QuestionnaireFrame` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `QuestionnaireFrame` (

`id` smallint(6) NOT NULL AUTO_INCREMENT,

`createDate` datetime NOT NULL, `droppedFromUseDate` datetime DEFAULT NULL,

`questionnaireType` int(11) NOT NULL, `name` varchar(50) DEFAULT NULL,

PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `QuestionnaireFrame_HealthCategory` ( `id` smallint(6) NOT NULL AUTO_INCREMENT,

`position` smallint(6) NOT NULL, `category_id` smallint(6) NOT NULL,

`frame_id` smallint(6) NOT NULL, PRIMARY KEY (`id`), KEY `FKBD4782CF7464D4DB` (`frame_id`),

KEY `FKBD4782CFDC7DCB9A` (`category_id`), CONSTRAINT `FKBD4782CFDC7DCB9A` FOREIGN KEY (`category_id`) REFERENCES `HealthCategory` (`id`), CONSTRAINT `FKBD4782CF7464D4DB` FOREIGN KEY (`frame_id`) REFERENCES `QuestionnaireFrame` (`id`)

286

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `Risk` ( `id` bigint(20) NOT NULL AUTO_INCREMENT,

`value` varchar(255) NOT NULL, `questionnaire_id` bigint(20) NOT NULL,

`riskType_id` smallint(6) NOT NULL, PRIMARY KEY (`id`),

KEY `FK26DEEFAD71F05E` (`riskType_id`), KEY `FK26DEEFF3F1BE36` (`questionnaire_id`), CONSTRAINT `FK26DEEFF3F1BE36` FOREIGN KEY (`questionnaire_id`) REFERENCES `Questionnaire` (`id`), CONSTRAINT `FK26DEEFAD71F05E` FOREIGN KEY (`riskType_id`) REFERENCES `RiskType` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `RiskType` (

`id` smallint(6) NOT NULL AUTO_INCREMENT, `createDate` datetime NOT NULL,

`droppedFromUseDate` datetime DEFAULT NULL, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `SoftwareAdmin` (

287

`id` smallint(6) NOT NULL AUTO_INCREMENT,

`user_id` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), KEY `FK35ACD1C847140EFE` (`user_id`),

CONSTRAINT `FK35ACD1C847140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `User` (

`id` bigint(20) NOT NULL AUTO_INCREMENT, `email` varchar(255) DEFAULT NULL,

`firstName` varchar(255) DEFAULT NULL, `lastName` varchar(255) DEFAULT NULL,

`password` varchar(255) DEFAULT NULL,

`resetKey` varchar(255) DEFAULT NULL, `salt` varchar(255) DEFAULT NULL,

`userType` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

CREATE TABLE `User_Facility` (

`id` bigint(20) NOT NULL AUTO_INCREMENT, `facility_id` smallint(6) NOT NULL,

`user_id` bigint(20) NOT NULL, PRIMARY KEY (`id`),

KEY `FK545B5C9747140EFE` (`user_id`),

288

KEY `FK545B5C979907CDFE` (`facility_id`),

CONSTRAINT `FK545B5C979907CDFE` FOREIGN KEY (`facility_id`) REFERENCES `Facility` (`id`), CONSTRAINT `FK545B5C9747140EFE` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`)

) ENGINE=InnoDB DEFAULT CHARSET=utf8;

289

Bibliography

[1] Amler RW, Dull HB, eds. (1987) Closing the gap: the burden of unnecessary illness. Oxford University Press, New York.

[2] Amler, RW, & Eddins, D. L. Cross-sectional analysis: Precursors of premature death in the United States. Am J Prev Med, 1987; 3(5, suppl.):181-187.

[3] McGinnis, J. M. & Foege, W. H. (1993). Actual Causes of Death in the United

States. JAMA, 270, 2207-2212.

[4] 2004 Presidential Address: You've Got To Believe!, J Am Pharm

Assoc. 2004;44:542-545. doi:10.1331/1544-3191.44.5.542

[5] Amler, RW, Moriarity, DG, Hutchins, EB. (eds.). HEALTHIER PEOPLE: The Carter

Center of Emory University Health Risk Appraisal Program Guides and

Documentation. Atlanta, Georgia,The Carter Center of Emory University, January,

1988.

[6] Sharecare, http://www.sharecare.com

[7] Pro-Change, http://www.prochange.com/health-risk-assessment-intervention

[8] HIPAA, http://www.hhs.gov/ocr/privacy/index.html

[9] Ramakrishnan R, Gehrke J. Database Management Systems, 3rd ed. McGraw-Hill.

2003.

290

[10] Yogesh L. Simmhan , Beth Plale , Dennis Gannon, A survey of data provenance in e-science, ACM SIGMOD Record, v.34 n.3, September

2005 doi:10.1145/1084805.1084812

[11] Book Five, The Scientific Basis for the Healthy Life Health Risk Appraisal 20

Minute Older Adult Version.

[12] Play Framework, http://www.playframework.com

[13] jQuery, http://jquery.com

[14] Ajax, http://en.wikipedia.org/wiki/Ajax_(programming)

[15] Salted Password Hashing - Doing it Right, https://crackstation.net/hashing- security.htm

[16] RESTful, http://en.wikipedia.org/wiki/Representational_state_transfer

[17] Play framework overview, http://www.playframework.org/documentation/1.2.5/overview

[18] Hibernate, http://en.wikipedia.org/wiki/Hibernate_(Java)

[19] Java Persistence API, http://en.wikipedia.org/wiki/Java_Persistence_API

[20] JPA, http://www.objectdb.com/api/java/jpa

[21] http://docs.oracle.com/cd/A97688_16/generic.903/bp/java.htm

291

[22] Java Persistence/ManyToMany, http://en.wikibooks.org/wiki/Java_Persistence/ManyToMany

[23] Book Two, The Scientific Basis for the HealthyLife Health Risk Assessment

Midlife Version 1.

[24] Xiangcao Liu, HRA Health Risk Assessment System, Masters Project, Case

Western Reserve University, July, 2013.

[25] Umang Banugaria, HealthyLifeiPad Health Risk Assessment System for iPads,

Case Western Reserve University, May 2014.

[26] Can Tuzla, HealthyLifeAndroid Health Risk Assessment System for Android

Tablets, Case Western Reserve University, May 2014.

[27] Salt, http://en.wikipedia.org/wiki/Salt_(cryptography)

[28] PBKDF2, http://en.wikipedia.org/wiki/PBKDF2

[29] Twitter Bootstrap, http://getbootstrap.com/2.3.2/

[30] Play Documentation, http://www.playframework.com/documentation/1.2.5/home

[31] Play controllers, http://www.playframework.com/documentation/1.2.5/controllers

292

[33] Book Four, The Scientific Basis for the Healthy Life Health Risk Appraisal Older

Adult Version.

[34] Pros and Cons of the Top 5 Cross-Platform Tools, http://www.developereconomics.com/pros-cons-top-5-cross-platform-tools/

[35] Executable War with Jetty, https://github.com/todylu/example_executable_war_with_jetty

[36] Run Maven, http://maven.apache.org/run-maven/

[37] Node-WebKit, https://github.com/rogerwang/node-webkit

[38] Node.js, http://nodejs.org

[39] WebKit, http://www.webkit.org

[40] Platypus, http://sveinbjorn.org/platypus

[41] http://www.f2ko.de/programs.php?pid=b2e

[42] http://www.mean.io/#!/

[43] Pinar Uskaner, HRA Health Risk Assessment System, Masters Project, Case

Western Reserve University, December, 2012.

[44] http://tutorials.jenkov.com/html5-canvas/todataurl.html

293