pharmaobservatory 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -4
  3. data/docs/BiomarkerValidationRow.md +1 -1
  4. data/docs/ChangesList200Response.md +26 -0
  5. data/docs/ChangesList200ResponseBuildState.md +20 -0
  6. data/docs/ChangesList200ResponseItemsInner.md +48 -0
  7. data/docs/ChangesList200ResponseItemsInnerEntryKeys.md +18 -0
  8. data/docs/CompanyFinancialsRow.md +18 -0
  9. data/docs/ConditionAdverseEventsRow.md +5 -1
  10. data/docs/SubscriptionsApi.md +282 -0
  11. data/docs/SubscriptionsCreate201Response.md +22 -0
  12. data/docs/SubscriptionsCreate201ResponseSubscription.md +28 -0
  13. data/docs/SubscriptionsCreate201ResponseSubscriptionTarget.md +22 -0
  14. data/docs/SubscriptionsCreateRequest.md +20 -0
  15. data/docs/SubscriptionsDelete200Response.md +24 -0
  16. data/docs/SubscriptionsList200Response.md +22 -0
  17. data/docs/SubscriptionsList200ResponseSubscriptionsInner.md +28 -0
  18. data/docs/SubscriptionsList200ResponseSubscriptionsInnerTarget.md +26 -0
  19. data/docs/SubscriptionsList200ResponseSubscriptionsInnerTargetFilters.md +18 -0
  20. data/lib/pharmaobservatory/api/subscriptions_api.rb +261 -0
  21. data/lib/pharmaobservatory/models/biomarker_validation_row.rb +1 -1
  22. data/lib/pharmaobservatory/models/changes_list200_response.rb +343 -0
  23. data/lib/pharmaobservatory/models/changes_list200_response_build_state.rb +263 -0
  24. data/lib/pharmaobservatory/models/changes_list200_response_items_inner.rb +627 -0
  25. data/lib/pharmaobservatory/models/changes_list200_response_items_inner_entry_keys.rb +237 -0
  26. data/lib/pharmaobservatory/models/company_financials_row.rb +100 -1
  27. data/lib/pharmaobservatory/models/condition_adverse_events_row.rb +27 -5
  28. data/lib/pharmaobservatory/models/subscriptions_create201_response.rb +289 -0
  29. data/lib/pharmaobservatory/models/subscriptions_create201_response_subscription.rb +369 -0
  30. data/lib/pharmaobservatory/models/subscriptions_create201_response_subscription_target.rb +289 -0
  31. data/lib/pharmaobservatory/models/subscriptions_create_request.rb +263 -0
  32. data/lib/pharmaobservatory/models/subscriptions_delete200_response.rb +315 -0
  33. data/lib/pharmaobservatory/models/subscriptions_list200_response.rb +291 -0
  34. data/lib/pharmaobservatory/models/subscriptions_list200_response_subscriptions_inner.rb +369 -0
  35. data/lib/pharmaobservatory/models/subscriptions_list200_response_subscriptions_inner_target.rb +277 -0
  36. data/lib/pharmaobservatory/models/subscriptions_list200_response_subscriptions_inner_target_filters.rb +237 -0
  37. data/lib/pharmaobservatory/version.rb +1 -1
  38. data/lib/pharmaobservatory.rb +14 -0
  39. metadata +30 -2
@@ -0,0 +1,237 @@
1
+ =begin
2
+ #Pharma Observatory Public REST API
3
+
4
+ #Read-only REST API over the Pharma Observatory biomedical data platform. Reference: https://pharmaobservatory.com/api-reference
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ Generator version: 7.13.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PharmaObservatory
17
+ class ChangesList200ResponseItemsInnerEntryKeys
18
+ attr_accessor :trials
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'trials' => :'trials'
24
+ }
25
+ end
26
+
27
+ # Returns attribute mapping this model knows about
28
+ def self.acceptable_attribute_map
29
+ attribute_map
30
+ end
31
+
32
+ # Returns all the JSON keys this model knows about
33
+ def self.acceptable_attributes
34
+ acceptable_attribute_map.values
35
+ end
36
+
37
+ # Attribute type mapping.
38
+ def self.openapi_types
39
+ {
40
+ :'trials' => :'String'
41
+ }
42
+ end
43
+
44
+ # List of attributes with nullable: true
45
+ def self.openapi_nullable
46
+ Set.new([
47
+ ])
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ if (!attributes.is_a?(Hash))
54
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ChangesList200ResponseItemsInnerEntryKeys` initialize method"
55
+ end
56
+
57
+ # check to see if the attribute exists and convert string to symbol for hash key
58
+ acceptable_attribute_map = self.class.acceptable_attribute_map
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!acceptable_attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::ChangesList200ResponseItemsInnerEntryKeys`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'trials')
67
+ self.trials = attributes[:'trials']
68
+ else
69
+ self.trials = nil
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
77
+ invalid_properties = Array.new
78
+ if @trials.nil?
79
+ invalid_properties.push('invalid value for "trials", trials cannot be nil.')
80
+ end
81
+
82
+ invalid_properties
83
+ end
84
+
85
+ # Check to see if the all the properties in the model are valid
86
+ # @return true if the model is valid
87
+ def valid?
88
+ warn '[DEPRECATED] the `valid?` method is obsolete'
89
+ return false if @trials.nil?
90
+ true
91
+ end
92
+
93
+ # Custom attribute writer method with validation
94
+ # @param [Object] trials Value to be assigned
95
+ def trials=(trials)
96
+ if trials.nil?
97
+ fail ArgumentError, 'trials cannot be nil'
98
+ end
99
+
100
+ @trials = trials
101
+ end
102
+
103
+ # Checks equality by comparing each attribute.
104
+ # @param [Object] Object to be compared
105
+ def ==(o)
106
+ return true if self.equal?(o)
107
+ self.class == o.class &&
108
+ trials == o.trials
109
+ end
110
+
111
+ # @see the `==` method
112
+ # @param [Object] Object to be compared
113
+ def eql?(o)
114
+ self == o
115
+ end
116
+
117
+ # Calculates hash code according to all attributes.
118
+ # @return [Integer] Hash code
119
+ def hash
120
+ [trials].hash
121
+ end
122
+
123
+ # Builds the object from hash
124
+ # @param [Hash] attributes Model attributes in the form of hash
125
+ # @return [Object] Returns the model itself
126
+ def self.build_from_hash(attributes)
127
+ return nil unless attributes.is_a?(Hash)
128
+ attributes = attributes.transform_keys(&:to_sym)
129
+ transformed_hash = {}
130
+ openapi_types.each_pair do |key, type|
131
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
132
+ transformed_hash["#{key}"] = nil
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[attribute_map[key]].is_a?(Array)
137
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
138
+ end
139
+ elsif !attributes[attribute_map[key]].nil?
140
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
141
+ end
142
+ end
143
+ new(transformed_hash)
144
+ end
145
+
146
+ # Deserializes the data based on type
147
+ # @param string type Data type
148
+ # @param string value Value to be deserialized
149
+ # @return [Object] Deserialized data
150
+ def self._deserialize(type, value)
151
+ case type.to_sym
152
+ when :Time
153
+ Time.parse(value)
154
+ when :Date
155
+ Date.parse(value)
156
+ when :String
157
+ value.to_s
158
+ when :Integer
159
+ value.to_i
160
+ when :Float
161
+ value.to_f
162
+ when :Boolean
163
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
164
+ true
165
+ else
166
+ false
167
+ end
168
+ when :Object
169
+ # generic object (usually a Hash), return directly
170
+ value
171
+ when /\AArray<(?<inner_type>.+)>\z/
172
+ inner_type = Regexp.last_match[:inner_type]
173
+ value.map { |v| _deserialize(inner_type, v) }
174
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
175
+ k_type = Regexp.last_match[:k_type]
176
+ v_type = Regexp.last_match[:v_type]
177
+ {}.tap do |hash|
178
+ value.each do |k, v|
179
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
180
+ end
181
+ end
182
+ else # model
183
+ # models (e.g. Pet) or oneOf
184
+ klass = PharmaObservatory.const_get(type)
185
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
186
+ end
187
+ end
188
+
189
+ # Returns the string representation of the object
190
+ # @return [String] String presentation of the object
191
+ def to_s
192
+ to_hash.to_s
193
+ end
194
+
195
+ # to_body is an alias to to_hash (backward compatibility)
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_body
198
+ to_hash
199
+ end
200
+
201
+ # Returns the object in the form of hash
202
+ # @return [Hash] Returns the object in the form of hash
203
+ def to_hash
204
+ hash = {}
205
+ self.class.attribute_map.each_pair do |attr, param|
206
+ value = self.send(attr)
207
+ if value.nil?
208
+ is_nullable = self.class.openapi_nullable.include?(attr)
209
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
210
+ end
211
+
212
+ hash[param] = _to_hash(value)
213
+ end
214
+ hash
215
+ end
216
+
217
+ # Outputs non-array value in the form of hash
218
+ # For object, use to_hash. Otherwise, just return the value
219
+ # @param [Object] value Any valid value
220
+ # @return [Hash] Returns the value in the form of hash
221
+ def _to_hash(value)
222
+ if value.is_a?(Array)
223
+ value.compact.map { |v| _to_hash(v) }
224
+ elsif value.is_a?(Hash)
225
+ {}.tap do |hash|
226
+ value.each { |k, v| hash[k] = _to_hash(v) }
227
+ end
228
+ elsif value.respond_to? :to_hash
229
+ value.to_hash
230
+ else
231
+ value
232
+ end
233
+ end
234
+
235
+ end
236
+
237
+ end
@@ -61,6 +61,33 @@ module PharmaObservatory
61
61
  # The latest fiscal year the filer reported any line item.
62
62
  attr_accessor :latest_financial_fy
63
63
 
64
+ # The end of the latest reported quarter of the filer that has an operating cash flow figure (a 10-Q, or the Q4 derived from a 10-K); the date of the cash figure below. Repeated on every year row of the filer; null for a company with no quarterly SEC filings.
65
+ attr_accessor :quarter_end_date
66
+
67
+ # The date SEC received the filing of that latest quarter.
68
+ attr_accessor :quarter_filed_date
69
+
70
+ # Cash plus short-term investments at quarter_end_date, in USD (non-current investments are not counted).
71
+ attr_accessor :cash_and_investments_latest_q
72
+
73
+ # Net cash from operating activities of that latest quarter alone (year-to-date figures differenced; Q4 is the full year less nine months), in USD; negative means burning.
74
+ attr_accessor :operating_cash_flow_latest_q
75
+
76
+ # How many contiguous quarters burn_basis_quarterly_usd averages over, 1 or 2.
77
+ attr_accessor :burn_basis_quarters
78
+
79
+ # The mean quarterly operating cash flow over the latest two contiguous quarters (the latest alone when no contiguous earlier quarter has a figure), in USD; negative means burning.
80
+ attr_accessor :burn_basis_quarterly_usd
81
+
82
+ # An estimate, derived not reported: cash_and_investments_latest_q divided by the monthly burn (burn_basis_quarterly_usd over 3), in months at quarter_end_date, rounded to 0.1. Null whenever runway_quarterly_null_reason is set.
83
+ attr_accessor :runway_months_quarterly
84
+
85
+ # The version of the derivation behind runway_months_quarterly; trailing_quarter_mean_v1 is the mean of the latest two contiguous discrete quarters.
86
+ attr_accessor :runway_quarterly_method
87
+
88
+ # Why runway_months_quarterly is null, in precedence order: no_quarterly_facts (no 10-Q cash-flow facts: a private company or a 20-F/40-F filer), stale (the latest quarter ended over a year before the newest SEC filing loaded), no_fx_rate, no_cash_at_quarter_end, or positive_cash_flow (no burn to run out of). Null when the runway is published.
89
+ attr_accessor :runway_quarterly_null_reason
90
+
64
91
  # Total revenue for the fiscal year, in USD (a non-USD filer is converted at the calendar-year average rate; null when no rate exists).
65
92
  attr_accessor :revenue
66
93
 
@@ -172,6 +199,15 @@ module PharmaObservatory
172
199
  :'latest_shares_outstanding' => :'latest_shares_outstanding',
173
200
  :'latest_shares_outstanding_fy' => :'latest_shares_outstanding_fy',
174
201
  :'latest_financial_fy' => :'latest_financial_fy',
202
+ :'quarter_end_date' => :'quarter_end_date',
203
+ :'quarter_filed_date' => :'quarter_filed_date',
204
+ :'cash_and_investments_latest_q' => :'cash_and_investments_latest_q',
205
+ :'operating_cash_flow_latest_q' => :'operating_cash_flow_latest_q',
206
+ :'burn_basis_quarters' => :'burn_basis_quarters',
207
+ :'burn_basis_quarterly_usd' => :'burn_basis_quarterly_usd',
208
+ :'runway_months_quarterly' => :'runway_months_quarterly',
209
+ :'runway_quarterly_method' => :'runway_quarterly_method',
210
+ :'runway_quarterly_null_reason' => :'runway_quarterly_null_reason',
175
211
  :'revenue' => :'revenue',
176
212
  :'net_income' => :'net_income',
177
213
  :'rnd' => :'rnd',
@@ -234,6 +270,15 @@ module PharmaObservatory
234
270
  :'latest_shares_outstanding' => :'Float',
235
271
  :'latest_shares_outstanding_fy' => :'Integer',
236
272
  :'latest_financial_fy' => :'Integer',
273
+ :'quarter_end_date' => :'Date',
274
+ :'quarter_filed_date' => :'Date',
275
+ :'cash_and_investments_latest_q' => :'Float',
276
+ :'operating_cash_flow_latest_q' => :'Float',
277
+ :'burn_basis_quarters' => :'Integer',
278
+ :'burn_basis_quarterly_usd' => :'Float',
279
+ :'runway_months_quarterly' => :'Float',
280
+ :'runway_quarterly_method' => :'String',
281
+ :'runway_quarterly_null_reason' => :'String',
237
282
  :'revenue' => :'Float',
238
283
  :'net_income' => :'Float',
239
284
  :'rnd' => :'Float',
@@ -286,6 +331,15 @@ module PharmaObservatory
286
331
  :'latest_shares_outstanding',
287
332
  :'latest_shares_outstanding_fy',
288
333
  :'latest_financial_fy',
334
+ :'quarter_end_date',
335
+ :'quarter_filed_date',
336
+ :'cash_and_investments_latest_q',
337
+ :'operating_cash_flow_latest_q',
338
+ :'burn_basis_quarters',
339
+ :'burn_basis_quarterly_usd',
340
+ :'runway_months_quarterly',
341
+ :'runway_quarterly_method',
342
+ :'runway_quarterly_null_reason',
289
343
  :'revenue',
290
344
  :'net_income',
291
345
  :'rnd',
@@ -396,6 +450,42 @@ module PharmaObservatory
396
450
  self.latest_financial_fy = attributes[:'latest_financial_fy']
397
451
  end
398
452
 
453
+ if attributes.key?(:'quarter_end_date')
454
+ self.quarter_end_date = attributes[:'quarter_end_date']
455
+ end
456
+
457
+ if attributes.key?(:'quarter_filed_date')
458
+ self.quarter_filed_date = attributes[:'quarter_filed_date']
459
+ end
460
+
461
+ if attributes.key?(:'cash_and_investments_latest_q')
462
+ self.cash_and_investments_latest_q = attributes[:'cash_and_investments_latest_q']
463
+ end
464
+
465
+ if attributes.key?(:'operating_cash_flow_latest_q')
466
+ self.operating_cash_flow_latest_q = attributes[:'operating_cash_flow_latest_q']
467
+ end
468
+
469
+ if attributes.key?(:'burn_basis_quarters')
470
+ self.burn_basis_quarters = attributes[:'burn_basis_quarters']
471
+ end
472
+
473
+ if attributes.key?(:'burn_basis_quarterly_usd')
474
+ self.burn_basis_quarterly_usd = attributes[:'burn_basis_quarterly_usd']
475
+ end
476
+
477
+ if attributes.key?(:'runway_months_quarterly')
478
+ self.runway_months_quarterly = attributes[:'runway_months_quarterly']
479
+ end
480
+
481
+ if attributes.key?(:'runway_quarterly_method')
482
+ self.runway_quarterly_method = attributes[:'runway_quarterly_method']
483
+ end
484
+
485
+ if attributes.key?(:'runway_quarterly_null_reason')
486
+ self.runway_quarterly_null_reason = attributes[:'runway_quarterly_null_reason']
487
+ end
488
+
399
489
  if attributes.key?(:'revenue')
400
490
  self.revenue = attributes[:'revenue']
401
491
  end
@@ -556,6 +646,15 @@ module PharmaObservatory
556
646
  latest_shares_outstanding == o.latest_shares_outstanding &&
557
647
  latest_shares_outstanding_fy == o.latest_shares_outstanding_fy &&
558
648
  latest_financial_fy == o.latest_financial_fy &&
649
+ quarter_end_date == o.quarter_end_date &&
650
+ quarter_filed_date == o.quarter_filed_date &&
651
+ cash_and_investments_latest_q == o.cash_and_investments_latest_q &&
652
+ operating_cash_flow_latest_q == o.operating_cash_flow_latest_q &&
653
+ burn_basis_quarters == o.burn_basis_quarters &&
654
+ burn_basis_quarterly_usd == o.burn_basis_quarterly_usd &&
655
+ runway_months_quarterly == o.runway_months_quarterly &&
656
+ runway_quarterly_method == o.runway_quarterly_method &&
657
+ runway_quarterly_null_reason == o.runway_quarterly_null_reason &&
559
658
  revenue == o.revenue &&
560
659
  net_income == o.net_income &&
561
660
  rnd == o.rnd &&
@@ -598,7 +697,7 @@ module PharmaObservatory
598
697
  # Calculates hash code according to all attributes.
599
698
  # @return [Integer] Hash code
600
699
  def hash
601
- [company_id, company_name, group_id, group_name, reporting_org_id, fiscal_year, is_public, edgar_cik, ticker, exchange, public_float_usd, public_float_fy, latest_shares_outstanding, latest_shares_outstanding_fy, latest_financial_fy, revenue, net_income, rnd, assets, equity, public_float, cash, short_term_investments, cash_and_investments, operating_cash_flow, shares_outstanding, stock_based_compensation, operating_expenses, dividends_paid, eps_basic, eps_diluted, total_liabilities, long_term_debt_noncurrent, long_term_debt_total, intangible_assets, property_plant_equipment, goodwill, inventory, accounts_payable, accounts_receivable, weighted_average_shares_basic, weighted_average_shares_diluted, burn_basis_usd, burn_basis_years, runway_months, sec_total_revenue_usd_millions].hash
700
+ [company_id, company_name, group_id, group_name, reporting_org_id, fiscal_year, is_public, edgar_cik, ticker, exchange, public_float_usd, public_float_fy, latest_shares_outstanding, latest_shares_outstanding_fy, latest_financial_fy, quarter_end_date, quarter_filed_date, cash_and_investments_latest_q, operating_cash_flow_latest_q, burn_basis_quarters, burn_basis_quarterly_usd, runway_months_quarterly, runway_quarterly_method, runway_quarterly_null_reason, revenue, net_income, rnd, assets, equity, public_float, cash, short_term_investments, cash_and_investments, operating_cash_flow, shares_outstanding, stock_based_compensation, operating_expenses, dividends_paid, eps_basic, eps_diluted, total_liabilities, long_term_debt_noncurrent, long_term_debt_total, intangible_assets, property_plant_equipment, goodwill, inventory, accounts_payable, accounts_receivable, weighted_average_shares_basic, weighted_average_shares_diluted, burn_basis_usd, burn_basis_years, runway_months, sec_total_revenue_usd_millions].hash
602
701
  end
603
702
 
604
703
  # Builds the object from hash
@@ -28,13 +28,21 @@ module PharmaObservatory
28
28
  # Trials for this condition that report the term.
29
29
  attr_accessor :n_trials
30
30
 
31
+ # Distinct serious adverse event terms across the condition's trials. The rows are only the top 10 of these, so a row count is not the term count; use this.
32
+ attr_accessor :n_terms_total
33
+
34
+ # Results-posting trials of the condition that report at least one serious adverse event term.
35
+ attr_accessor :n_trials_total
36
+
31
37
  # Attribute mapping from ruby-style variable name to JSON key.
32
38
  def self.attribute_map
33
39
  {
34
40
  :'condition_id' => :'condition_id',
35
41
  :'adverse_event_term' => :'adverse_event_term',
36
42
  :'subjects_affected' => :'subjects_affected',
37
- :'n_trials' => :'n_trials'
43
+ :'n_trials' => :'n_trials',
44
+ :'n_terms_total' => :'n_terms_total',
45
+ :'n_trials_total' => :'n_trials_total'
38
46
  }
39
47
  end
40
48
 
@@ -54,7 +62,9 @@ module PharmaObservatory
54
62
  :'condition_id' => :'String',
55
63
  :'adverse_event_term' => :'String',
56
64
  :'subjects_affected' => :'Float',
57
- :'n_trials' => :'Integer'
65
+ :'n_trials' => :'Integer',
66
+ :'n_terms_total' => :'Integer',
67
+ :'n_trials_total' => :'Integer'
58
68
  }
59
69
  end
60
70
 
@@ -64,7 +74,9 @@ module PharmaObservatory
64
74
  :'condition_id',
65
75
  :'adverse_event_term',
66
76
  :'subjects_affected',
67
- :'n_trials'
77
+ :'n_trials',
78
+ :'n_terms_total',
79
+ :'n_trials_total'
68
80
  ])
69
81
  end
70
82
 
@@ -99,6 +111,14 @@ module PharmaObservatory
99
111
  if attributes.key?(:'n_trials')
100
112
  self.n_trials = attributes[:'n_trials']
101
113
  end
114
+
115
+ if attributes.key?(:'n_terms_total')
116
+ self.n_terms_total = attributes[:'n_terms_total']
117
+ end
118
+
119
+ if attributes.key?(:'n_trials_total')
120
+ self.n_trials_total = attributes[:'n_trials_total']
121
+ end
102
122
  end
103
123
 
104
124
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -124,7 +144,9 @@ module PharmaObservatory
124
144
  condition_id == o.condition_id &&
125
145
  adverse_event_term == o.adverse_event_term &&
126
146
  subjects_affected == o.subjects_affected &&
127
- n_trials == o.n_trials
147
+ n_trials == o.n_trials &&
148
+ n_terms_total == o.n_terms_total &&
149
+ n_trials_total == o.n_trials_total
128
150
  end
129
151
 
130
152
  # @see the `==` method
@@ -136,7 +158,7 @@ module PharmaObservatory
136
158
  # Calculates hash code according to all attributes.
137
159
  # @return [Integer] Hash code
138
160
  def hash
139
- [condition_id, adverse_event_term, subjects_affected, n_trials].hash
161
+ [condition_id, adverse_event_term, subjects_affected, n_trials, n_terms_total, n_trials_total].hash
140
162
  end
141
163
 
142
164
  # Builds the object from hash