pharmaobservatory 0.1.29 → 0.1.30
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.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/CompaniesRow.md +4 -2
- data/docs/RareDiseaseFamiliesRow.md +2 -0
- data/docs/RareDiseaseFamilyOrganisationsResponse.md +58 -0
- data/docs/RareDiseaseFamilyOrganisationsRow.md +58 -0
- data/docs/RareDiseasesApi.md +80 -0
- data/lib/pharmaobservatory/api/rare_diseases_api.rb +84 -0
- data/lib/pharmaobservatory/models/companies_row.rb +14 -3
- data/lib/pharmaobservatory/models/rare_disease_families_row.rb +12 -1
- data/lib/pharmaobservatory/models/rare_disease_family_organisations_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_family_organisations_row.rb +449 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +2 -0
- metadata +6 -2
|
@@ -0,0 +1,449 @@
|
|
|
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 rare_disease_family_organisations dataset: one row per (disease family, patient organisation that declares a disease in it). A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class RareDiseaseFamilyOrganisationsRow
|
|
19
|
+
# The identifier of the (family, organisation) pair.
|
|
20
|
+
attr_accessor :family_organisation_id
|
|
21
|
+
|
|
22
|
+
# The MONDO identifier of the family, the key of rare_disease_families.
|
|
23
|
+
attr_accessor :family_id
|
|
24
|
+
|
|
25
|
+
# The family's name as MONDO files it.
|
|
26
|
+
attr_accessor :family_name
|
|
27
|
+
|
|
28
|
+
# The ORPHA code of the family's own term when it is an active Orphanet concept; null otherwise. The entry key from rare_diseases.
|
|
29
|
+
attr_accessor :parent_orpha_code
|
|
30
|
+
|
|
31
|
+
# The organisation's id, as on the patient_organisation dataset: a spine organisation id when the organisation folded onto one we already hold, else pag:<registrable domain of its website>.
|
|
32
|
+
attr_accessor :patient_organisation_id
|
|
33
|
+
|
|
34
|
+
# True when the organisation declares the family's own disease (an Orphanet concept whose MONDO term is the family, or the family's own condition when it is listed); false when it declares only diseases below the family.
|
|
35
|
+
attr_accessor :serves_family
|
|
36
|
+
|
|
37
|
+
# The verdict over the organisation's declarations of the family's own disease: serves, unclear (asked and not callable) or unjudged (not yet asked); null when serves_family is false.
|
|
38
|
+
attr_accessor :family_edge_verdict
|
|
39
|
+
|
|
40
|
+
# The verdict over all the organisation's declarations in the family: serves when any serves, else unclear when any is unclear, else unjudged. The rows that serve are organisation_serves_count on rare_disease_families.
|
|
41
|
+
attr_accessor :edge_verdict
|
|
42
|
+
|
|
43
|
+
# The ORPHA codes of the diseases of the family the organisation declares (the family's own concepts and the diseases below it), by disease name then code; empty when its only declaration is the family's own condition. Parallel to served_disease_names and served_edge_verdicts.
|
|
44
|
+
attr_accessor :served_orpha_codes
|
|
45
|
+
|
|
46
|
+
# The preferred names of those diseases, in the same order as served_orpha_codes.
|
|
47
|
+
attr_accessor :served_disease_names
|
|
48
|
+
|
|
49
|
+
# The verdict of the organisation's declaration of each of those diseases, in the same order as served_orpha_codes.
|
|
50
|
+
attr_accessor :served_edge_verdicts
|
|
51
|
+
|
|
52
|
+
# How many diseases of the family the organisation declares; the length of served_orpha_codes.
|
|
53
|
+
attr_accessor :served_disease_count
|
|
54
|
+
|
|
55
|
+
# Of served_disease_count, the diseases strictly below the family.
|
|
56
|
+
attr_accessor :member_disease_count
|
|
57
|
+
|
|
58
|
+
# How much of its work the organisation says the disease is on its representative statement: sole_focus, one_of_several or umbrella; null when it states none.
|
|
59
|
+
attr_accessor :declared_scope
|
|
60
|
+
|
|
61
|
+
# The disease name the organisation declared on its representative statement.
|
|
62
|
+
attr_accessor :declared_name
|
|
63
|
+
|
|
64
|
+
# The page of the organisation's own website the representative statement came from.
|
|
65
|
+
attr_accessor :source_url
|
|
66
|
+
|
|
67
|
+
# The date that page was retrieved.
|
|
68
|
+
attr_accessor :retrieved_on
|
|
69
|
+
|
|
70
|
+
# The source credit line for the row: Source: <organisation name>, <page address>, retrieved <date>. Mandatory wherever the row is shown.
|
|
71
|
+
attr_accessor :credit
|
|
72
|
+
|
|
73
|
+
# The MONDO release the family was read from.
|
|
74
|
+
attr_accessor :source_release
|
|
75
|
+
|
|
76
|
+
# The licence of the MONDO release.
|
|
77
|
+
attr_accessor :license_name
|
|
78
|
+
|
|
79
|
+
# The attribution line the sources require; quote it with any figure taken from the row.
|
|
80
|
+
attr_accessor :attribution
|
|
81
|
+
|
|
82
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
83
|
+
def self.attribute_map
|
|
84
|
+
{
|
|
85
|
+
:'family_organisation_id' => :'family_organisation_id',
|
|
86
|
+
:'family_id' => :'family_id',
|
|
87
|
+
:'family_name' => :'family_name',
|
|
88
|
+
:'parent_orpha_code' => :'parent_orpha_code',
|
|
89
|
+
:'patient_organisation_id' => :'patient_organisation_id',
|
|
90
|
+
:'serves_family' => :'serves_family',
|
|
91
|
+
:'family_edge_verdict' => :'family_edge_verdict',
|
|
92
|
+
:'edge_verdict' => :'edge_verdict',
|
|
93
|
+
:'served_orpha_codes' => :'served_orpha_codes',
|
|
94
|
+
:'served_disease_names' => :'served_disease_names',
|
|
95
|
+
:'served_edge_verdicts' => :'served_edge_verdicts',
|
|
96
|
+
:'served_disease_count' => :'served_disease_count',
|
|
97
|
+
:'member_disease_count' => :'member_disease_count',
|
|
98
|
+
:'declared_scope' => :'declared_scope',
|
|
99
|
+
:'declared_name' => :'declared_name',
|
|
100
|
+
:'source_url' => :'source_url',
|
|
101
|
+
:'retrieved_on' => :'retrieved_on',
|
|
102
|
+
:'credit' => :'credit',
|
|
103
|
+
:'source_release' => :'source_release',
|
|
104
|
+
:'license_name' => :'license_name',
|
|
105
|
+
:'attribution' => :'attribution'
|
|
106
|
+
}
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
# Returns attribute mapping this model knows about
|
|
110
|
+
def self.acceptable_attribute_map
|
|
111
|
+
attribute_map
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Returns all the JSON keys this model knows about
|
|
115
|
+
def self.acceptable_attributes
|
|
116
|
+
acceptable_attribute_map.values
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
# Attribute type mapping.
|
|
120
|
+
def self.openapi_types
|
|
121
|
+
{
|
|
122
|
+
:'family_organisation_id' => :'String',
|
|
123
|
+
:'family_id' => :'String',
|
|
124
|
+
:'family_name' => :'String',
|
|
125
|
+
:'parent_orpha_code' => :'String',
|
|
126
|
+
:'patient_organisation_id' => :'String',
|
|
127
|
+
:'serves_family' => :'Boolean',
|
|
128
|
+
:'family_edge_verdict' => :'String',
|
|
129
|
+
:'edge_verdict' => :'String',
|
|
130
|
+
:'served_orpha_codes' => :'Array<String>',
|
|
131
|
+
:'served_disease_names' => :'Array<String>',
|
|
132
|
+
:'served_edge_verdicts' => :'Array<String>',
|
|
133
|
+
:'served_disease_count' => :'Integer',
|
|
134
|
+
:'member_disease_count' => :'Integer',
|
|
135
|
+
:'declared_scope' => :'String',
|
|
136
|
+
:'declared_name' => :'String',
|
|
137
|
+
:'source_url' => :'String',
|
|
138
|
+
:'retrieved_on' => :'Date',
|
|
139
|
+
:'credit' => :'String',
|
|
140
|
+
:'source_release' => :'String',
|
|
141
|
+
:'license_name' => :'String',
|
|
142
|
+
:'attribution' => :'String'
|
|
143
|
+
}
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
# List of attributes with nullable: true
|
|
147
|
+
def self.openapi_nullable
|
|
148
|
+
Set.new([
|
|
149
|
+
:'family_organisation_id',
|
|
150
|
+
:'family_id',
|
|
151
|
+
:'family_name',
|
|
152
|
+
:'parent_orpha_code',
|
|
153
|
+
:'patient_organisation_id',
|
|
154
|
+
:'serves_family',
|
|
155
|
+
:'family_edge_verdict',
|
|
156
|
+
:'edge_verdict',
|
|
157
|
+
:'served_orpha_codes',
|
|
158
|
+
:'served_disease_names',
|
|
159
|
+
:'served_edge_verdicts',
|
|
160
|
+
:'served_disease_count',
|
|
161
|
+
:'member_disease_count',
|
|
162
|
+
:'declared_scope',
|
|
163
|
+
:'declared_name',
|
|
164
|
+
:'source_url',
|
|
165
|
+
:'retrieved_on',
|
|
166
|
+
:'credit',
|
|
167
|
+
:'source_release',
|
|
168
|
+
:'license_name',
|
|
169
|
+
:'attribution'
|
|
170
|
+
])
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
# Initializes the object
|
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
175
|
+
def initialize(attributes = {})
|
|
176
|
+
if (!attributes.is_a?(Hash))
|
|
177
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::RareDiseaseFamilyOrganisationsRow` initialize method"
|
|
178
|
+
end
|
|
179
|
+
|
|
180
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
181
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
182
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
183
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
184
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::RareDiseaseFamilyOrganisationsRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
185
|
+
end
|
|
186
|
+
h[k.to_sym] = v
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
if attributes.key?(:'family_organisation_id')
|
|
190
|
+
self.family_organisation_id = attributes[:'family_organisation_id']
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
if attributes.key?(:'family_id')
|
|
194
|
+
self.family_id = attributes[:'family_id']
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
if attributes.key?(:'family_name')
|
|
198
|
+
self.family_name = attributes[:'family_name']
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
if attributes.key?(:'parent_orpha_code')
|
|
202
|
+
self.parent_orpha_code = attributes[:'parent_orpha_code']
|
|
203
|
+
end
|
|
204
|
+
|
|
205
|
+
if attributes.key?(:'patient_organisation_id')
|
|
206
|
+
self.patient_organisation_id = attributes[:'patient_organisation_id']
|
|
207
|
+
end
|
|
208
|
+
|
|
209
|
+
if attributes.key?(:'serves_family')
|
|
210
|
+
self.serves_family = attributes[:'serves_family']
|
|
211
|
+
end
|
|
212
|
+
|
|
213
|
+
if attributes.key?(:'family_edge_verdict')
|
|
214
|
+
self.family_edge_verdict = attributes[:'family_edge_verdict']
|
|
215
|
+
end
|
|
216
|
+
|
|
217
|
+
if attributes.key?(:'edge_verdict')
|
|
218
|
+
self.edge_verdict = attributes[:'edge_verdict']
|
|
219
|
+
end
|
|
220
|
+
|
|
221
|
+
if attributes.key?(:'served_orpha_codes')
|
|
222
|
+
if (value = attributes[:'served_orpha_codes']).is_a?(Array)
|
|
223
|
+
self.served_orpha_codes = value
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'served_disease_names')
|
|
228
|
+
if (value = attributes[:'served_disease_names']).is_a?(Array)
|
|
229
|
+
self.served_disease_names = value
|
|
230
|
+
end
|
|
231
|
+
end
|
|
232
|
+
|
|
233
|
+
if attributes.key?(:'served_edge_verdicts')
|
|
234
|
+
if (value = attributes[:'served_edge_verdicts']).is_a?(Array)
|
|
235
|
+
self.served_edge_verdicts = value
|
|
236
|
+
end
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'served_disease_count')
|
|
240
|
+
self.served_disease_count = attributes[:'served_disease_count']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'member_disease_count')
|
|
244
|
+
self.member_disease_count = attributes[:'member_disease_count']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'declared_scope')
|
|
248
|
+
self.declared_scope = attributes[:'declared_scope']
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'declared_name')
|
|
252
|
+
self.declared_name = attributes[:'declared_name']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'source_url')
|
|
256
|
+
self.source_url = attributes[:'source_url']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'retrieved_on')
|
|
260
|
+
self.retrieved_on = attributes[:'retrieved_on']
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if attributes.key?(:'credit')
|
|
264
|
+
self.credit = attributes[:'credit']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'source_release')
|
|
268
|
+
self.source_release = attributes[:'source_release']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'license_name')
|
|
272
|
+
self.license_name = attributes[:'license_name']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'attribution')
|
|
276
|
+
self.attribution = attributes[:'attribution']
|
|
277
|
+
end
|
|
278
|
+
end
|
|
279
|
+
|
|
280
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
281
|
+
# @return Array for valid properties with the reasons
|
|
282
|
+
def list_invalid_properties
|
|
283
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
284
|
+
invalid_properties = Array.new
|
|
285
|
+
invalid_properties
|
|
286
|
+
end
|
|
287
|
+
|
|
288
|
+
# Check to see if the all the properties in the model are valid
|
|
289
|
+
# @return true if the model is valid
|
|
290
|
+
def valid?
|
|
291
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
292
|
+
true
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
# Checks equality by comparing each attribute.
|
|
296
|
+
# @param [Object] Object to be compared
|
|
297
|
+
def ==(o)
|
|
298
|
+
return true if self.equal?(o)
|
|
299
|
+
self.class == o.class &&
|
|
300
|
+
family_organisation_id == o.family_organisation_id &&
|
|
301
|
+
family_id == o.family_id &&
|
|
302
|
+
family_name == o.family_name &&
|
|
303
|
+
parent_orpha_code == o.parent_orpha_code &&
|
|
304
|
+
patient_organisation_id == o.patient_organisation_id &&
|
|
305
|
+
serves_family == o.serves_family &&
|
|
306
|
+
family_edge_verdict == o.family_edge_verdict &&
|
|
307
|
+
edge_verdict == o.edge_verdict &&
|
|
308
|
+
served_orpha_codes == o.served_orpha_codes &&
|
|
309
|
+
served_disease_names == o.served_disease_names &&
|
|
310
|
+
served_edge_verdicts == o.served_edge_verdicts &&
|
|
311
|
+
served_disease_count == o.served_disease_count &&
|
|
312
|
+
member_disease_count == o.member_disease_count &&
|
|
313
|
+
declared_scope == o.declared_scope &&
|
|
314
|
+
declared_name == o.declared_name &&
|
|
315
|
+
source_url == o.source_url &&
|
|
316
|
+
retrieved_on == o.retrieved_on &&
|
|
317
|
+
credit == o.credit &&
|
|
318
|
+
source_release == o.source_release &&
|
|
319
|
+
license_name == o.license_name &&
|
|
320
|
+
attribution == o.attribution
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
# @see the `==` method
|
|
324
|
+
# @param [Object] Object to be compared
|
|
325
|
+
def eql?(o)
|
|
326
|
+
self == o
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Calculates hash code according to all attributes.
|
|
330
|
+
# @return [Integer] Hash code
|
|
331
|
+
def hash
|
|
332
|
+
[family_organisation_id, family_id, family_name, parent_orpha_code, patient_organisation_id, serves_family, family_edge_verdict, edge_verdict, served_orpha_codes, served_disease_names, served_edge_verdicts, served_disease_count, member_disease_count, declared_scope, declared_name, source_url, retrieved_on, credit, source_release, license_name, attribution].hash
|
|
333
|
+
end
|
|
334
|
+
|
|
335
|
+
# Builds the object from hash
|
|
336
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
337
|
+
# @return [Object] Returns the model itself
|
|
338
|
+
def self.build_from_hash(attributes)
|
|
339
|
+
return nil unless attributes.is_a?(Hash)
|
|
340
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
341
|
+
transformed_hash = {}
|
|
342
|
+
openapi_types.each_pair do |key, type|
|
|
343
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
344
|
+
transformed_hash["#{key}"] = nil
|
|
345
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
346
|
+
# check to ensure the input is an array given that the attribute
|
|
347
|
+
# is documented as an array but the input is not
|
|
348
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
349
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
350
|
+
end
|
|
351
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
352
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
353
|
+
end
|
|
354
|
+
end
|
|
355
|
+
new(transformed_hash)
|
|
356
|
+
end
|
|
357
|
+
|
|
358
|
+
# Deserializes the data based on type
|
|
359
|
+
# @param string type Data type
|
|
360
|
+
# @param string value Value to be deserialized
|
|
361
|
+
# @return [Object] Deserialized data
|
|
362
|
+
def self._deserialize(type, value)
|
|
363
|
+
case type.to_sym
|
|
364
|
+
when :Time
|
|
365
|
+
Time.parse(value)
|
|
366
|
+
when :Date
|
|
367
|
+
Date.parse(value)
|
|
368
|
+
when :String
|
|
369
|
+
value.to_s
|
|
370
|
+
when :Integer
|
|
371
|
+
value.to_i
|
|
372
|
+
when :Float
|
|
373
|
+
value.to_f
|
|
374
|
+
when :Boolean
|
|
375
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
376
|
+
true
|
|
377
|
+
else
|
|
378
|
+
false
|
|
379
|
+
end
|
|
380
|
+
when :Object
|
|
381
|
+
# generic object (usually a Hash), return directly
|
|
382
|
+
value
|
|
383
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
384
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
385
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
386
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
387
|
+
k_type = Regexp.last_match[:k_type]
|
|
388
|
+
v_type = Regexp.last_match[:v_type]
|
|
389
|
+
{}.tap do |hash|
|
|
390
|
+
value.each do |k, v|
|
|
391
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
392
|
+
end
|
|
393
|
+
end
|
|
394
|
+
else # model
|
|
395
|
+
# models (e.g. Pet) or oneOf
|
|
396
|
+
klass = PharmaObservatory.const_get(type)
|
|
397
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
|
|
401
|
+
# Returns the string representation of the object
|
|
402
|
+
# @return [String] String presentation of the object
|
|
403
|
+
def to_s
|
|
404
|
+
to_hash.to_s
|
|
405
|
+
end
|
|
406
|
+
|
|
407
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
408
|
+
# @return [Hash] Returns the object in the form of hash
|
|
409
|
+
def to_body
|
|
410
|
+
to_hash
|
|
411
|
+
end
|
|
412
|
+
|
|
413
|
+
# Returns the object in the form of hash
|
|
414
|
+
# @return [Hash] Returns the object in the form of hash
|
|
415
|
+
def to_hash
|
|
416
|
+
hash = {}
|
|
417
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
418
|
+
value = self.send(attr)
|
|
419
|
+
if value.nil?
|
|
420
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
421
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
422
|
+
end
|
|
423
|
+
|
|
424
|
+
hash[param] = _to_hash(value)
|
|
425
|
+
end
|
|
426
|
+
hash
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
# Outputs non-array value in the form of hash
|
|
430
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
431
|
+
# @param [Object] value Any valid value
|
|
432
|
+
# @return [Hash] Returns the value in the form of hash
|
|
433
|
+
def _to_hash(value)
|
|
434
|
+
if value.is_a?(Array)
|
|
435
|
+
value.compact.map { |v| _to_hash(v) }
|
|
436
|
+
elsif value.is_a?(Hash)
|
|
437
|
+
{}.tap do |hash|
|
|
438
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
439
|
+
end
|
|
440
|
+
elsif value.respond_to? :to_hash
|
|
441
|
+
value.to_hash
|
|
442
|
+
else
|
|
443
|
+
value
|
|
444
|
+
end
|
|
445
|
+
end
|
|
446
|
+
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
end
|
data/lib/pharmaobservatory.rb
CHANGED
|
@@ -332,6 +332,8 @@ require 'pharmaobservatory/models/rare_disease_families_response'
|
|
|
332
332
|
require 'pharmaobservatory/models/rare_disease_families_row'
|
|
333
333
|
require 'pharmaobservatory/models/rare_disease_family_members_response'
|
|
334
334
|
require 'pharmaobservatory/models/rare_disease_family_members_row'
|
|
335
|
+
require 'pharmaobservatory/models/rare_disease_family_organisations_response'
|
|
336
|
+
require 'pharmaobservatory/models/rare_disease_family_organisations_row'
|
|
335
337
|
require 'pharmaobservatory/models/rare_disease_genes_response'
|
|
336
338
|
require 'pharmaobservatory/models/rare_disease_genes_row'
|
|
337
339
|
require 'pharmaobservatory/models/rare_disease_hierarchy_response'
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pharmaobservatory
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.30
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Scientist.com
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-12-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -415,6 +415,8 @@ files:
|
|
|
415
415
|
- docs/RareDiseaseFamiliesRow.md
|
|
416
416
|
- docs/RareDiseaseFamilyMembersResponse.md
|
|
417
417
|
- docs/RareDiseaseFamilyMembersRow.md
|
|
418
|
+
- docs/RareDiseaseFamilyOrganisationsResponse.md
|
|
419
|
+
- docs/RareDiseaseFamilyOrganisationsRow.md
|
|
418
420
|
- docs/RareDiseaseGenesResponse.md
|
|
419
421
|
- docs/RareDiseaseGenesRow.md
|
|
420
422
|
- docs/RareDiseaseHierarchyResponse.md
|
|
@@ -994,6 +996,8 @@ files:
|
|
|
994
996
|
- lib/pharmaobservatory/models/rare_disease_families_row.rb
|
|
995
997
|
- lib/pharmaobservatory/models/rare_disease_family_members_response.rb
|
|
996
998
|
- lib/pharmaobservatory/models/rare_disease_family_members_row.rb
|
|
999
|
+
- lib/pharmaobservatory/models/rare_disease_family_organisations_response.rb
|
|
1000
|
+
- lib/pharmaobservatory/models/rare_disease_family_organisations_row.rb
|
|
997
1001
|
- lib/pharmaobservatory/models/rare_disease_genes_response.rb
|
|
998
1002
|
- lib/pharmaobservatory/models/rare_disease_genes_row.rb
|
|
999
1003
|
- lib/pharmaobservatory/models/rare_disease_hierarchy_response.rb
|