Bridges-C++ 3.5.0-dev2-1-ge3e57bf
Bridges(C++ API)
CancerIncidence.h
Go to the documentation of this file.
1#ifndef CANCER_INCIDENCE_H
2
3#define CANCER_INCIDENCE_H
4#include <string>
5
6using namespace std;
7
8namespace bridges {
9 namespace dataset {
33
34 private:
35
36 double age_adjusted_rate; // expected cancer rate, adjusted for age
37 double age_adjusted_rate_ci[2]; // confidence interval-lower,upper
38 double crude_rate; // cancer rate adjusted by population
39 double crude_rate_ci[2]; // confidence interval
40
41 int count; // incidence count
42 int year; // reporting year
43 int population; // population of this area
44
45 string gender; // gender (male, female, male and female
46 string race;
47 string event_type; // incidence, mortality
48 string affected_area; // location, typically, state
49
50 double loc[2]; // location (cartesian coords
51
52 public:
54 loc[0] = loc[1] = 0.0;
55 age_adjusted_rate_ci[0] = age_adjusted_rate_ci[1] = 0.0;
56 crude_rate_ci[0] = crude_rate_ci[1] = 0.0;
57 }
58
65 double getAgeAdjustedRate() const {
66 return age_adjusted_rate;
67 }
68
74 void setAgeAdjustedRate(double aar) {
75 age_adjusted_rate = aar;
76 }
77
85 double getAgeAdjustedCI_Lower() const {
86 return age_adjusted_rate_ci[0];
87 }
88
95 void setAgeAdjustedCI_Lower(double ci_l) {
96 age_adjusted_rate_ci[0] = ci_l;
97 }
98
105 double getAgeAdjustedCI_Upper() const {
106 return age_adjusted_rate_ci[1];
107 }
108
114 void setAgeAdjustedCI_Upper(double ci_u) {
115 age_adjusted_rate_ci[1] = ci_u;
116 }
117
123 double getCrudeRate() const {
124 return crude_rate;
125 }
131 void setCrudeRate(double cr) {
132 crude_rate = cr;
133 }
134
141 double getCrudeRate_CI_Lower() const {
142 return crude_rate_ci[0];
143 }
144
150 void setCrudeRate_CI_Lower(double cr_l) {
151 crude_rate_ci[0] = cr_l;
152 }
160 double getCrudeRate_CI_Upper() const {
161 return crude_rate_ci[1];
162 }
163
170 void setCrudeRate_CI_Upper(double cr_u) {
171 crude_rate_ci[1] = cr_u;
172 }
173
179 int getYear() const {
180 return year;
181 }
182
183 /*
184 * @brief Set the year of this cancer record
185 *
186 * @param[in] y year
187 */
188 void setYear(int y) {
189 year = y;
190 }
196 string getGender() const {
197 return gender;
198 }
204 void setGender(const string& g) {
205 gender = g;
206 }
207
213 string getRace() const {
214 return race;
215 }
221 void setRace(const string& r) {
222 race = r;
223 }
224
230 string getEventType() const {
231 return event_type;
232 }
238 void setEventType(const string& et) {
239 event_type = et;
240 }
241
247 int getPopulation() const {
248 return population;
249 }
250
256 void setPopulation(int pop) {
257 population = pop;
258 }
259
265 string getAffectedArea() const {
266 return affected_area;
267 }
268
274 void setAffectedArea(const string& area) {
275 affected_area = area;
276 }
277
283 int getCount() const {
284 return count;
285 }
291 void setCount(int c) {
292 count = c;
293 }
294
300 double getLocationX() const {
301 return loc[0];
302 }
308 void setLocationX (double locX) {
309 loc[0] = locX;
310 }
311
317 double getLocationY() const {
318 return loc[1];
319 }
320
326 void setLocationY (double locY) {
327 loc[1] = locY;
328 }
329 };
330 }
331} // namespace bridges
332
333#endif
A class representing the attributes for cancer incidence.
Definition: CancerIncidence.h:32
string getGender() const
Get the gender of the group.
Definition: CancerIncidence.h:196
void setAffectedArea(const string &area)
Set cancer incidenc area.
Definition: CancerIncidence.h:274
int getYear() const
Get the year of this cancer record.
Definition: CancerIncidence.h:179
double getCrudeRate_CI_Upper() const
Definition: CancerIncidence.h:160
CancerIncidence()
Definition: CancerIncidence.h:53
int getCount() const
Get the number of people affected in this group.
Definition: CancerIncidence.h:283
void setAgeAdjustedRate(double aar)
Definition: CancerIncidence.h:74
void setPopulation(int pop)
Set population size.
Definition: CancerIncidence.h:256
double getCrudeRate_CI_Lower() const
Definition: CancerIncidence.h:141
void setAgeAdjustedCI_Upper(double ci_u)
Definition: CancerIncidence.h:114
int getPopulation() const
Get the population size.
Definition: CancerIncidence.h:247
void setYear(int y)
Definition: CancerIncidence.h:188
string getEventType() const
Get the event type (incidence, mortality, etc)
Definition: CancerIncidence.h:230
double getLocationX() const
Definition: CancerIncidence.h:300
void setCrudeRate_CI_Upper(double cr_u)
Set crude rate CI (upper)
Definition: CancerIncidence.h:170
double getAgeAdjustedCI_Upper() const
Definition: CancerIncidence.h:105
void setEventType(const string &et)
Set event type.
Definition: CancerIncidence.h:238
string getRace() const
Get the race of the group.
Definition: CancerIncidence.h:213
double getAgeAdjustedCI_Lower() const
Definition: CancerIncidence.h:85
void setGender(const string &g)
Set gender of the record.
Definition: CancerIncidence.h:204
void setLocationY(double locY)
Set location (Y coord)
Definition: CancerIncidence.h:326
string getAffectedArea() const
Get the cancer incidence area (state, region, etc)
Definition: CancerIncidence.h:265
double getAgeAdjustedRate() const
Definition: CancerIncidence.h:65
void setRace(const string &r)
Set race.
Definition: CancerIncidence.h:221
void setCount(int c)
Set cancer incidence count.
Definition: CancerIncidence.h:291
void setAgeAdjustedCI_Lower(double ci_l)
Definition: CancerIncidence.h:95
void setCrudeRate(double cr)
Definition: CancerIncidence.h:131
double getCrudeRate() const
Definition: CancerIncidence.h:123
void setLocationX(double locX)
Set location (X coord)
Definition: CancerIncidence.h:308
void setCrudeRate_CI_Lower(double cr_l)
Definition: CancerIncidence.h:150
double getLocationY() const
Get the Y coordinate of location.
Definition: CancerIncidence.h:317
these methods convert byte arrays in to base64 codes and are used in BRIDGES to represent the color a...
Definition: alltypes.h:4