pharmaobservatory 0.1.25 → 0.1.26

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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +24 -4
  3. data/docs/BiomarkerLiteraturePeopleResponse.md +58 -0
  4. data/docs/BiomarkerLiteraturePeopleRow.md +36 -0
  5. data/docs/BiomarkersApi.md +80 -0
  6. data/docs/CompanyRareDiseaseDeclarationsRow.md +1 -1
  7. data/docs/ConditionLiteraturePeopleResponse.md +58 -0
  8. data/docs/ConditionLiteraturePeopleRow.md +36 -0
  9. data/docs/ConditionsApi.md +160 -0
  10. data/docs/ConditionsRecord.md +2 -0
  11. data/docs/InvestigatorsApi.md +320 -0
  12. data/docs/InvestmentGraphNodesRow.md +4 -2
  13. data/docs/LegalEntitiesApi.md +80 -0
  14. data/docs/OrgLiteraturePeopleResponse.md +58 -0
  15. data/docs/OrgLiteraturePeopleRow.md +36 -0
  16. data/docs/PatientOrganisationResponse.md +58 -0
  17. data/docs/PatientOrganisationRow.md +74 -0
  18. data/docs/RareDiseaseOrganizationsRow.md +1 -1
  19. data/docs/RareDiseaseTrialSitesRow.md +5 -3
  20. data/docs/RareDiseasesApi.md +80 -0
  21. data/docs/RareDiseasesRecord.md +2 -0
  22. data/docs/TargetLiteraturePeopleResponse.md +58 -0
  23. data/docs/TargetLiteraturePeopleRow.md +36 -0
  24. data/docs/TargetsApi.md +80 -0
  25. data/lib/pharmaobservatory/api/biomarkers_api.rb +84 -0
  26. data/lib/pharmaobservatory/api/conditions_api.rb +168 -0
  27. data/lib/pharmaobservatory/api/investigators_api.rb +336 -0
  28. data/lib/pharmaobservatory/api/legal_entities_api.rb +84 -0
  29. data/lib/pharmaobservatory/api/rare_diseases_api.rb +84 -0
  30. data/lib/pharmaobservatory/api/targets_api.rb +84 -0
  31. data/lib/pharmaobservatory/models/biomarker_literature_people_response.rb +478 -0
  32. data/lib/pharmaobservatory/models/biomarker_literature_people_row.rb +322 -0
  33. data/lib/pharmaobservatory/models/company_rare_disease_declarations_row.rb +1 -1
  34. data/lib/pharmaobservatory/models/condition_literature_people_response.rb +478 -0
  35. data/lib/pharmaobservatory/models/condition_literature_people_row.rb +322 -0
  36. data/lib/pharmaobservatory/models/conditions_record.rb +13 -1
  37. data/lib/pharmaobservatory/models/investment_graph_nodes_row.rb +19 -6
  38. data/lib/pharmaobservatory/models/org_literature_people_response.rb +478 -0
  39. data/lib/pharmaobservatory/models/org_literature_people_row.rb +322 -0
  40. data/lib/pharmaobservatory/models/patient_organisation_response.rb +478 -0
  41. data/lib/pharmaobservatory/models/patient_organisation_row.rb +545 -0
  42. data/lib/pharmaobservatory/models/rare_disease_organizations_row.rb +1 -1
  43. data/lib/pharmaobservatory/models/rare_disease_trial_sites_row.rb +15 -4
  44. data/lib/pharmaobservatory/models/rare_diseases_record.rb +13 -1
  45. data/lib/pharmaobservatory/models/target_literature_people_response.rb +478 -0
  46. data/lib/pharmaobservatory/models/target_literature_people_row.rb +322 -0
  47. data/lib/pharmaobservatory/version.rb +1 -1
  48. data/lib/pharmaobservatory.rb +10 -0
  49. metadata +22 -2
@@ -0,0 +1,322 @@
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
+ # One row of the condition_literature_people dataset: one row per condition and author. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class ConditionLiteraturePeopleRow
19
+ # The condition key, a MeSH (Medical Subject Headings) descriptor id (D followed by six to nine digits).
20
+ attr_accessor :condition_id
21
+
22
+ # The author's resolved person key, the id in the web page address (/people/<id>). The entry key of the investigators object type.
23
+ attr_accessor :investigator_person_id
24
+
25
+ # The person's name, resolved across the person's merged name fragments.
26
+ attr_accessor :person_name
27
+
28
+ # The person's affiliation as the person record holds it (null when not recorded).
29
+ attr_accessor :person_affiliation
30
+
31
+ # The person's ORCID iD (Open Researcher and Contributor ID) when the person record carries one (null when none).
32
+ attr_accessor :orcid
33
+
34
+ # Distinct papers on which a ledger decision links a byline to the person.
35
+ attr_accessor :n_papers
36
+
37
+ # The part of n_papers a registered clinical trial cites.
38
+ attr_accessor :n_trial_linked_papers
39
+
40
+ # The newest publication year among those papers.
41
+ attr_accessor :latest_pub_year
42
+
43
+ # The part of n_papers on which the person's linked byline is the first author position.
44
+ attr_accessor :n_first_author
45
+
46
+ # The part of n_papers on which the person's linked byline is the last author position.
47
+ attr_accessor :n_last_author
48
+
49
+ # Attribute mapping from ruby-style variable name to JSON key.
50
+ def self.attribute_map
51
+ {
52
+ :'condition_id' => :'condition_id',
53
+ :'investigator_person_id' => :'investigator_person_id',
54
+ :'person_name' => :'person_name',
55
+ :'person_affiliation' => :'person_affiliation',
56
+ :'orcid' => :'orcid',
57
+ :'n_papers' => :'n_papers',
58
+ :'n_trial_linked_papers' => :'n_trial_linked_papers',
59
+ :'latest_pub_year' => :'latest_pub_year',
60
+ :'n_first_author' => :'n_first_author',
61
+ :'n_last_author' => :'n_last_author'
62
+ }
63
+ end
64
+
65
+ # Returns attribute mapping this model knows about
66
+ def self.acceptable_attribute_map
67
+ attribute_map
68
+ end
69
+
70
+ # Returns all the JSON keys this model knows about
71
+ def self.acceptable_attributes
72
+ acceptable_attribute_map.values
73
+ end
74
+
75
+ # Attribute type mapping.
76
+ def self.openapi_types
77
+ {
78
+ :'condition_id' => :'String',
79
+ :'investigator_person_id' => :'String',
80
+ :'person_name' => :'String',
81
+ :'person_affiliation' => :'String',
82
+ :'orcid' => :'String',
83
+ :'n_papers' => :'Integer',
84
+ :'n_trial_linked_papers' => :'Integer',
85
+ :'latest_pub_year' => :'Integer',
86
+ :'n_first_author' => :'Integer',
87
+ :'n_last_author' => :'Integer'
88
+ }
89
+ end
90
+
91
+ # List of attributes with nullable: true
92
+ def self.openapi_nullable
93
+ Set.new([
94
+ :'condition_id',
95
+ :'investigator_person_id',
96
+ :'person_name',
97
+ :'person_affiliation',
98
+ :'orcid',
99
+ :'n_papers',
100
+ :'n_trial_linked_papers',
101
+ :'latest_pub_year',
102
+ :'n_first_author',
103
+ :'n_last_author'
104
+ ])
105
+ end
106
+
107
+ # Initializes the object
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ def initialize(attributes = {})
110
+ if (!attributes.is_a?(Hash))
111
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ConditionLiteraturePeopleRow` initialize method"
112
+ end
113
+
114
+ # check to see if the attribute exists and convert string to symbol for hash key
115
+ acceptable_attribute_map = self.class.acceptable_attribute_map
116
+ attributes = attributes.each_with_object({}) { |(k, v), h|
117
+ if (!acceptable_attribute_map.key?(k.to_sym))
118
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::ConditionLiteraturePeopleRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
119
+ end
120
+ h[k.to_sym] = v
121
+ }
122
+
123
+ if attributes.key?(:'condition_id')
124
+ self.condition_id = attributes[:'condition_id']
125
+ end
126
+
127
+ if attributes.key?(:'investigator_person_id')
128
+ self.investigator_person_id = attributes[:'investigator_person_id']
129
+ end
130
+
131
+ if attributes.key?(:'person_name')
132
+ self.person_name = attributes[:'person_name']
133
+ end
134
+
135
+ if attributes.key?(:'person_affiliation')
136
+ self.person_affiliation = attributes[:'person_affiliation']
137
+ end
138
+
139
+ if attributes.key?(:'orcid')
140
+ self.orcid = attributes[:'orcid']
141
+ end
142
+
143
+ if attributes.key?(:'n_papers')
144
+ self.n_papers = attributes[:'n_papers']
145
+ end
146
+
147
+ if attributes.key?(:'n_trial_linked_papers')
148
+ self.n_trial_linked_papers = attributes[:'n_trial_linked_papers']
149
+ end
150
+
151
+ if attributes.key?(:'latest_pub_year')
152
+ self.latest_pub_year = attributes[:'latest_pub_year']
153
+ end
154
+
155
+ if attributes.key?(:'n_first_author')
156
+ self.n_first_author = attributes[:'n_first_author']
157
+ end
158
+
159
+ if attributes.key?(:'n_last_author')
160
+ self.n_last_author = attributes[:'n_last_author']
161
+ end
162
+ end
163
+
164
+ # Show invalid properties with the reasons. Usually used together with valid?
165
+ # @return Array for valid properties with the reasons
166
+ def list_invalid_properties
167
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
168
+ invalid_properties = Array.new
169
+ invalid_properties
170
+ end
171
+
172
+ # Check to see if the all the properties in the model are valid
173
+ # @return true if the model is valid
174
+ def valid?
175
+ warn '[DEPRECATED] the `valid?` method is obsolete'
176
+ true
177
+ end
178
+
179
+ # Checks equality by comparing each attribute.
180
+ # @param [Object] Object to be compared
181
+ def ==(o)
182
+ return true if self.equal?(o)
183
+ self.class == o.class &&
184
+ condition_id == o.condition_id &&
185
+ investigator_person_id == o.investigator_person_id &&
186
+ person_name == o.person_name &&
187
+ person_affiliation == o.person_affiliation &&
188
+ orcid == o.orcid &&
189
+ n_papers == o.n_papers &&
190
+ n_trial_linked_papers == o.n_trial_linked_papers &&
191
+ latest_pub_year == o.latest_pub_year &&
192
+ n_first_author == o.n_first_author &&
193
+ n_last_author == o.n_last_author
194
+ end
195
+
196
+ # @see the `==` method
197
+ # @param [Object] Object to be compared
198
+ def eql?(o)
199
+ self == o
200
+ end
201
+
202
+ # Calculates hash code according to all attributes.
203
+ # @return [Integer] Hash code
204
+ def hash
205
+ [condition_id, investigator_person_id, person_name, person_affiliation, orcid, n_papers, n_trial_linked_papers, latest_pub_year, n_first_author, n_last_author].hash
206
+ end
207
+
208
+ # Builds the object from hash
209
+ # @param [Hash] attributes Model attributes in the form of hash
210
+ # @return [Object] Returns the model itself
211
+ def self.build_from_hash(attributes)
212
+ return nil unless attributes.is_a?(Hash)
213
+ attributes = attributes.transform_keys(&:to_sym)
214
+ transformed_hash = {}
215
+ openapi_types.each_pair do |key, type|
216
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
217
+ transformed_hash["#{key}"] = nil
218
+ elsif type =~ /\AArray<(.*)>/i
219
+ # check to ensure the input is an array given that the attribute
220
+ # is documented as an array but the input is not
221
+ if attributes[attribute_map[key]].is_a?(Array)
222
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
223
+ end
224
+ elsif !attributes[attribute_map[key]].nil?
225
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
226
+ end
227
+ end
228
+ new(transformed_hash)
229
+ end
230
+
231
+ # Deserializes the data based on type
232
+ # @param string type Data type
233
+ # @param string value Value to be deserialized
234
+ # @return [Object] Deserialized data
235
+ def self._deserialize(type, value)
236
+ case type.to_sym
237
+ when :Time
238
+ Time.parse(value)
239
+ when :Date
240
+ Date.parse(value)
241
+ when :String
242
+ value.to_s
243
+ when :Integer
244
+ value.to_i
245
+ when :Float
246
+ value.to_f
247
+ when :Boolean
248
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
249
+ true
250
+ else
251
+ false
252
+ end
253
+ when :Object
254
+ # generic object (usually a Hash), return directly
255
+ value
256
+ when /\AArray<(?<inner_type>.+)>\z/
257
+ inner_type = Regexp.last_match[:inner_type]
258
+ value.map { |v| _deserialize(inner_type, v) }
259
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
260
+ k_type = Regexp.last_match[:k_type]
261
+ v_type = Regexp.last_match[:v_type]
262
+ {}.tap do |hash|
263
+ value.each do |k, v|
264
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
265
+ end
266
+ end
267
+ else # model
268
+ # models (e.g. Pet) or oneOf
269
+ klass = PharmaObservatory.const_get(type)
270
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
271
+ end
272
+ end
273
+
274
+ # Returns the string representation of the object
275
+ # @return [String] String presentation of the object
276
+ def to_s
277
+ to_hash.to_s
278
+ end
279
+
280
+ # to_body is an alias to to_hash (backward compatibility)
281
+ # @return [Hash] Returns the object in the form of hash
282
+ def to_body
283
+ to_hash
284
+ end
285
+
286
+ # Returns the object in the form of hash
287
+ # @return [Hash] Returns the object in the form of hash
288
+ def to_hash
289
+ hash = {}
290
+ self.class.attribute_map.each_pair do |attr, param|
291
+ value = self.send(attr)
292
+ if value.nil?
293
+ is_nullable = self.class.openapi_nullable.include?(attr)
294
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
295
+ end
296
+
297
+ hash[param] = _to_hash(value)
298
+ end
299
+ hash
300
+ end
301
+
302
+ # Outputs non-array value in the form of hash
303
+ # For object, use to_hash. Otherwise, just return the value
304
+ # @param [Object] value Any valid value
305
+ # @return [Hash] Returns the value in the form of hash
306
+ def _to_hash(value)
307
+ if value.is_a?(Array)
308
+ value.compact.map { |v| _to_hash(v) }
309
+ elsif value.is_a?(Hash)
310
+ {}.tap do |hash|
311
+ value.each { |k, v| hash[k] = _to_hash(v) }
312
+ end
313
+ elsif value.respond_to? :to_hash
314
+ value.to_hash
315
+ else
316
+ value
317
+ end
318
+ end
319
+
320
+ end
321
+
322
+ end
@@ -15,6 +15,9 @@ require 'time'
15
15
 
16
16
  module PharmaObservatory
17
17
  class ConditionsRecord
18
+ # Sections of the object's web page, by key: patient_organisations, the list the page shows of the organisations that name the disease or condition on their own websites (state, empty_state, coverage, groups of entries carrying the patient_organisation dataset's columns, the per-entry credit and the lane attribution).
19
+ attr_accessor :sections
20
+
18
21
  attr_accessor :object_type
19
22
 
20
23
  attr_accessor :id
@@ -40,6 +43,7 @@ module PharmaObservatory
40
43
  # Attribute mapping from ruby-style variable name to JSON key.
41
44
  def self.attribute_map
42
45
  {
46
+ :'sections' => :'sections',
43
47
  :'object_type' => :'object_type',
44
48
  :'id' => :'id',
45
49
  :'record' => :'record',
@@ -67,6 +71,7 @@ module PharmaObservatory
67
71
  # Attribute type mapping.
68
72
  def self.openapi_types
69
73
  {
74
+ :'sections' => :'Hash<String, Object>',
70
75
  :'object_type' => :'String',
71
76
  :'id' => :'String',
72
77
  :'record' => :'ConditionsRow',
@@ -104,6 +109,12 @@ module PharmaObservatory
104
109
  h[k.to_sym] = v
105
110
  }
106
111
 
112
+ if attributes.key?(:'sections')
113
+ if (value = attributes[:'sections']).is_a?(Hash)
114
+ self.sections = value
115
+ end
116
+ end
117
+
107
118
  if attributes.key?(:'object_type')
108
119
  self.object_type = attributes[:'object_type']
109
120
  else
@@ -243,6 +254,7 @@ module PharmaObservatory
243
254
  def ==(o)
244
255
  return true if self.equal?(o)
245
256
  self.class == o.class &&
257
+ sections == o.sections &&
246
258
  object_type == o.object_type &&
247
259
  id == o.id &&
248
260
  record == o.record &&
@@ -265,7 +277,7 @@ module PharmaObservatory
265
277
  # Calculates hash code according to all attributes.
266
278
  # @return [Integer] Hash code
267
279
  def hash
268
- [object_type, id, record, attributes, datasets, attribution, source_credit, freshness, build, build_state, restriction].hash
280
+ [sections, object_type, id, record, attributes, datasets, attribution, source_credit, freshness, build, build_state, restriction].hash
269
281
  end
270
282
 
271
283
  # Builds the object from hash
@@ -67,9 +67,12 @@ module PharmaObservatory
67
67
  # The sources that state the node's edges.
68
68
  attr_accessor :sources
69
69
 
70
- # For an investor node, its portfolio rows that cannot become a node (a company known only by an SEC filer number, or an organization with no resolved parent); shown as a count and never guessed at. 0 for a company node.
70
+ # For an investor node, its portfolio rows that cannot become a node (a company known only by an SEC filer number, an organization with no resolved parent, or a listing that is page chrome, a section heading, the investor's own name or a name a curator marked as not a company); shown as a count and never guessed at. 0 for a company node.
71
71
  attr_accessor :unlinked_company_count
72
72
 
73
+ # For a company node, the distinct names investors printed for it on their portfolio pages, sorted; empty for an investor node. A name that differs from display_name is how the investors spell a company the registry names otherwise (Scientist.com, listed for Assay Depot Inc). A label, not a statement of identity.
74
+ attr_accessor :listed_names
75
+
73
76
  # Attribute mapping from ruby-style variable name to JSON key.
74
77
  def self.attribute_map
75
78
  {
@@ -90,7 +93,8 @@ module PharmaObservatory
90
93
  :'in_edge_count' => :'in_edge_count',
91
94
  :'node_source_count' => :'node_source_count',
92
95
  :'sources' => :'sources',
93
- :'unlinked_company_count' => :'unlinked_company_count'
96
+ :'unlinked_company_count' => :'unlinked_company_count',
97
+ :'listed_names' => :'listed_names'
94
98
  }
95
99
  end
96
100
 
@@ -124,7 +128,8 @@ module PharmaObservatory
124
128
  :'in_edge_count' => :'Integer',
125
129
  :'node_source_count' => :'Integer',
126
130
  :'sources' => :'Array<String>',
127
- :'unlinked_company_count' => :'Integer'
131
+ :'unlinked_company_count' => :'Integer',
132
+ :'listed_names' => :'Array<String>'
128
133
  }
129
134
  end
130
135
 
@@ -148,7 +153,8 @@ module PharmaObservatory
148
153
  :'in_edge_count',
149
154
  :'node_source_count',
150
155
  :'sources',
151
- :'unlinked_company_count'
156
+ :'unlinked_company_count',
157
+ :'listed_names'
152
158
  ])
153
159
  end
154
160
 
@@ -241,6 +247,12 @@ module PharmaObservatory
241
247
  if attributes.key?(:'unlinked_company_count')
242
248
  self.unlinked_company_count = attributes[:'unlinked_company_count']
243
249
  end
250
+
251
+ if attributes.key?(:'listed_names')
252
+ if (value = attributes[:'listed_names']).is_a?(Array)
253
+ self.listed_names = value
254
+ end
255
+ end
244
256
  end
245
257
 
246
258
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -280,7 +292,8 @@ module PharmaObservatory
280
292
  in_edge_count == o.in_edge_count &&
281
293
  node_source_count == o.node_source_count &&
282
294
  sources == o.sources &&
283
- unlinked_company_count == o.unlinked_company_count
295
+ unlinked_company_count == o.unlinked_company_count &&
296
+ listed_names == o.listed_names
284
297
  end
285
298
 
286
299
  # @see the `==` method
@@ -292,7 +305,7 @@ module PharmaObservatory
292
305
  # Calculates hash code according to all attributes.
293
306
  # @return [Integer] Hash code
294
307
  def hash
295
- [node_id, node_kind, display_name, investor_type, investor_id, org_id, company_id, company_name, group_id, group_name, same_entity_node_id, node_resolution, edge_count, out_edge_count, in_edge_count, node_source_count, sources, unlinked_company_count].hash
308
+ [node_id, node_kind, display_name, investor_type, investor_id, org_id, company_id, company_name, group_id, group_name, same_entity_node_id, node_resolution, edge_count, out_edge_count, in_edge_count, node_source_count, sources, unlinked_company_count, listed_names].hash
296
309
  end
297
310
 
298
311
  # Builds the object from hash