pharmaobservatory 0.1.21 → 0.1.22

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 (31) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +18 -4
  3. data/docs/BiomarkersApi.md +80 -0
  4. data/docs/ProviderBiomarkerCapabilityRow.md +9 -9
  5. data/docs/ProviderBiomarkerCapabilitySummaryResponse.md +58 -0
  6. data/docs/ProviderBiomarkerCapabilitySummaryRow.md +70 -0
  7. data/docs/ProviderCliaLicensureRow.md +1 -1
  8. data/docs/ProviderRwdDeliveryResponse.md +58 -0
  9. data/docs/ProviderRwdDeliveryRow.md +74 -0
  10. data/docs/ProviderRwdDeliveryStudyResponse.md +58 -0
  11. data/docs/ProviderRwdDeliveryStudyRow.md +58 -0
  12. data/docs/ProviderRwdFootprintResponse.md +58 -0
  13. data/docs/ProviderRwdFootprintRow.md +72 -0
  14. data/docs/RwdInstitutionsApi.md +80 -0
  15. data/docs/SuppliersApi.md +320 -0
  16. data/lib/pharmaobservatory/api/biomarkers_api.rb +84 -0
  17. data/lib/pharmaobservatory/api/rwd_institutions_api.rb +84 -0
  18. data/lib/pharmaobservatory/api/suppliers_api.rb +336 -0
  19. data/lib/pharmaobservatory/models/provider_biomarker_capability_row.rb +9 -9
  20. data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_response.rb +478 -0
  21. data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_row.rb +509 -0
  22. data/lib/pharmaobservatory/models/provider_clia_licensure_row.rb +1 -1
  23. data/lib/pharmaobservatory/models/provider_rwd_delivery_response.rb +478 -0
  24. data/lib/pharmaobservatory/models/provider_rwd_delivery_row.rb +535 -0
  25. data/lib/pharmaobservatory/models/provider_rwd_delivery_study_response.rb +478 -0
  26. data/lib/pharmaobservatory/models/provider_rwd_delivery_study_row.rb +443 -0
  27. data/lib/pharmaobservatory/models/provider_rwd_footprint_response.rb +478 -0
  28. data/lib/pharmaobservatory/models/provider_rwd_footprint_row.rb +528 -0
  29. data/lib/pharmaobservatory/version.rb +1 -1
  30. data/lib/pharmaobservatory.rb +8 -0
  31. metadata +18 -2
@@ -0,0 +1,443 @@
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 provider_rwd_delivery_study dataset: one row per RX provider, register conductor name key and comparable final-report pair of one study. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class ProviderRwdDeliveryStudyRow
19
+ # The row id: a hash of provider_uuid, conductor_name_key and study_id.
20
+ attr_accessor :provider_rwd_delivery_study_id
21
+
22
+ # The supplier id: the Scientist.com provider id as text, the id in the supplier page address (/suppliers/<id>). The entry key of the suppliers object type. A supplier is not a company.
23
+ attr_accessor :provider_id
24
+
25
+ # The Scientist.com public provider uuid, the join key to the RX marketplace. Present on every row, including providers the marketplace does not publish.
26
+ attr_accessor :provider_uuid
27
+
28
+ # The supplier's marketplace slug.
29
+ attr_accessor :provider_slug
30
+
31
+ # The supplier's name.
32
+ attr_accessor :provider_name
33
+
34
+ # The register Institution ID of the winning route to the conductor (strongest method, then lowest id).
35
+ attr_accessor :institution_id
36
+
37
+ # match_method says how the provider was tied to the register institution: org_member_exact (through the supplier's resolved organization, match_confidence carried from that match), rx_name_key_exact (an exact match of the register institution's name key to the supplier's, match_confidence null, a name match and not a verified identity) or org_unit_of_entry (an organization unit of the supplier's organization, one-directional, match_confidence the bridge's own figure). Where a provider reaches one conductor by several routes the strongest wins, in that order, and match_methods lists every route.
38
+ attr_accessor :match_method
39
+
40
+ # The bridge's own confidence for the winning route, 0 to 1; null on an rx_name_key_exact row, whose exact name match defines none. Passed through, never computed here.
41
+ attr_accessor :match_confidence
42
+
43
+ # The normalised institution name key the conductor rollup is keyed on; every register institution whose name folds to it is one conductor. Not a vendor family.
44
+ attr_accessor :conductor_name_key
45
+
46
+ # The register's own Study ID. The entry key of the rwd_studies object type; the EU PAS number is an attribute.
47
+ attr_accessor :study_id
48
+
49
+ # The EU PAS (post-authorisation study) register number of the study.
50
+ attr_accessor :eu_pas_number
51
+
52
+ # The study's own mandate: mandated (a regulator required it), voluntary, or unknown (the register does not say).
53
+ attr_accessor :study_mandate_stratum
54
+
55
+ # Planned date of the final study report.
56
+ attr_accessor :final_report_planned_on
57
+
58
+ # Actual date of the final study report.
59
+ attr_accessor :final_report_actual_on
60
+
61
+ # Actual minus planned final report date in days (positive is late, negative is early). A plain fact about one study, never a statistic.
62
+ attr_accessor :final_report_slip_days
63
+
64
+ # True when the provider and conductor's all row meets the floor of 10 comparable pairs.
65
+ attr_accessor :all_meets_n_floor
66
+
67
+ # True when the row of the study's own mandate stratum meets the floor; null for a study whose mandate is unknown (it belongs to the all row only).
68
+ attr_accessor :stratum_meets_n_floor
69
+
70
+ # The label of the catalogue snapshot the row was read from (a date).
71
+ attr_accessor :snapshot_label
72
+
73
+ # The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
74
+ attr_accessor :accessed_month
75
+
76
+ # The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
77
+ attr_accessor :restriction_tier
78
+
79
+ # The attribution line EMA requires, including the catalogue URL and the access month; 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
+ :'provider_rwd_delivery_study_id' => :'provider_rwd_delivery_study_id',
86
+ :'provider_id' => :'provider_id',
87
+ :'provider_uuid' => :'provider_uuid',
88
+ :'provider_slug' => :'provider_slug',
89
+ :'provider_name' => :'provider_name',
90
+ :'institution_id' => :'institution_id',
91
+ :'match_method' => :'match_method',
92
+ :'match_confidence' => :'match_confidence',
93
+ :'conductor_name_key' => :'conductor_name_key',
94
+ :'study_id' => :'study_id',
95
+ :'eu_pas_number' => :'eu_pas_number',
96
+ :'study_mandate_stratum' => :'study_mandate_stratum',
97
+ :'final_report_planned_on' => :'final_report_planned_on',
98
+ :'final_report_actual_on' => :'final_report_actual_on',
99
+ :'final_report_slip_days' => :'final_report_slip_days',
100
+ :'all_meets_n_floor' => :'all_meets_n_floor',
101
+ :'stratum_meets_n_floor' => :'stratum_meets_n_floor',
102
+ :'snapshot_label' => :'snapshot_label',
103
+ :'accessed_month' => :'accessed_month',
104
+ :'restriction_tier' => :'restriction_tier',
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
+ :'provider_rwd_delivery_study_id' => :'String',
123
+ :'provider_id' => :'String',
124
+ :'provider_uuid' => :'String',
125
+ :'provider_slug' => :'String',
126
+ :'provider_name' => :'String',
127
+ :'institution_id' => :'String',
128
+ :'match_method' => :'String',
129
+ :'match_confidence' => :'Float',
130
+ :'conductor_name_key' => :'String',
131
+ :'study_id' => :'String',
132
+ :'eu_pas_number' => :'String',
133
+ :'study_mandate_stratum' => :'String',
134
+ :'final_report_planned_on' => :'Date',
135
+ :'final_report_actual_on' => :'Date',
136
+ :'final_report_slip_days' => :'Integer',
137
+ :'all_meets_n_floor' => :'Boolean',
138
+ :'stratum_meets_n_floor' => :'Boolean',
139
+ :'snapshot_label' => :'String',
140
+ :'accessed_month' => :'String',
141
+ :'restriction_tier' => :'String',
142
+ :'attribution' => :'String'
143
+ }
144
+ end
145
+
146
+ # List of attributes with nullable: true
147
+ def self.openapi_nullable
148
+ Set.new([
149
+ :'provider_rwd_delivery_study_id',
150
+ :'provider_id',
151
+ :'provider_uuid',
152
+ :'provider_slug',
153
+ :'provider_name',
154
+ :'institution_id',
155
+ :'match_method',
156
+ :'match_confidence',
157
+ :'conductor_name_key',
158
+ :'study_id',
159
+ :'eu_pas_number',
160
+ :'study_mandate_stratum',
161
+ :'final_report_planned_on',
162
+ :'final_report_actual_on',
163
+ :'final_report_slip_days',
164
+ :'all_meets_n_floor',
165
+ :'stratum_meets_n_floor',
166
+ :'snapshot_label',
167
+ :'accessed_month',
168
+ :'restriction_tier',
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::ProviderRwdDeliveryStudyRow` 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::ProviderRwdDeliveryStudyRow`. 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?(:'provider_rwd_delivery_study_id')
190
+ self.provider_rwd_delivery_study_id = attributes[:'provider_rwd_delivery_study_id']
191
+ end
192
+
193
+ if attributes.key?(:'provider_id')
194
+ self.provider_id = attributes[:'provider_id']
195
+ end
196
+
197
+ if attributes.key?(:'provider_uuid')
198
+ self.provider_uuid = attributes[:'provider_uuid']
199
+ end
200
+
201
+ if attributes.key?(:'provider_slug')
202
+ self.provider_slug = attributes[:'provider_slug']
203
+ end
204
+
205
+ if attributes.key?(:'provider_name')
206
+ self.provider_name = attributes[:'provider_name']
207
+ end
208
+
209
+ if attributes.key?(:'institution_id')
210
+ self.institution_id = attributes[:'institution_id']
211
+ end
212
+
213
+ if attributes.key?(:'match_method')
214
+ self.match_method = attributes[:'match_method']
215
+ end
216
+
217
+ if attributes.key?(:'match_confidence')
218
+ self.match_confidence = attributes[:'match_confidence']
219
+ end
220
+
221
+ if attributes.key?(:'conductor_name_key')
222
+ self.conductor_name_key = attributes[:'conductor_name_key']
223
+ end
224
+
225
+ if attributes.key?(:'study_id')
226
+ self.study_id = attributes[:'study_id']
227
+ end
228
+
229
+ if attributes.key?(:'eu_pas_number')
230
+ self.eu_pas_number = attributes[:'eu_pas_number']
231
+ end
232
+
233
+ if attributes.key?(:'study_mandate_stratum')
234
+ self.study_mandate_stratum = attributes[:'study_mandate_stratum']
235
+ end
236
+
237
+ if attributes.key?(:'final_report_planned_on')
238
+ self.final_report_planned_on = attributes[:'final_report_planned_on']
239
+ end
240
+
241
+ if attributes.key?(:'final_report_actual_on')
242
+ self.final_report_actual_on = attributes[:'final_report_actual_on']
243
+ end
244
+
245
+ if attributes.key?(:'final_report_slip_days')
246
+ self.final_report_slip_days = attributes[:'final_report_slip_days']
247
+ end
248
+
249
+ if attributes.key?(:'all_meets_n_floor')
250
+ self.all_meets_n_floor = attributes[:'all_meets_n_floor']
251
+ end
252
+
253
+ if attributes.key?(:'stratum_meets_n_floor')
254
+ self.stratum_meets_n_floor = attributes[:'stratum_meets_n_floor']
255
+ end
256
+
257
+ if attributes.key?(:'snapshot_label')
258
+ self.snapshot_label = attributes[:'snapshot_label']
259
+ end
260
+
261
+ if attributes.key?(:'accessed_month')
262
+ self.accessed_month = attributes[:'accessed_month']
263
+ end
264
+
265
+ if attributes.key?(:'restriction_tier')
266
+ self.restriction_tier = attributes[:'restriction_tier']
267
+ end
268
+
269
+ if attributes.key?(:'attribution')
270
+ self.attribution = attributes[:'attribution']
271
+ end
272
+ end
273
+
274
+ # Show invalid properties with the reasons. Usually used together with valid?
275
+ # @return Array for valid properties with the reasons
276
+ def list_invalid_properties
277
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
278
+ invalid_properties = Array.new
279
+ invalid_properties
280
+ end
281
+
282
+ # Check to see if the all the properties in the model are valid
283
+ # @return true if the model is valid
284
+ def valid?
285
+ warn '[DEPRECATED] the `valid?` method is obsolete'
286
+ true
287
+ end
288
+
289
+ # Checks equality by comparing each attribute.
290
+ # @param [Object] Object to be compared
291
+ def ==(o)
292
+ return true if self.equal?(o)
293
+ self.class == o.class &&
294
+ provider_rwd_delivery_study_id == o.provider_rwd_delivery_study_id &&
295
+ provider_id == o.provider_id &&
296
+ provider_uuid == o.provider_uuid &&
297
+ provider_slug == o.provider_slug &&
298
+ provider_name == o.provider_name &&
299
+ institution_id == o.institution_id &&
300
+ match_method == o.match_method &&
301
+ match_confidence == o.match_confidence &&
302
+ conductor_name_key == o.conductor_name_key &&
303
+ study_id == o.study_id &&
304
+ eu_pas_number == o.eu_pas_number &&
305
+ study_mandate_stratum == o.study_mandate_stratum &&
306
+ final_report_planned_on == o.final_report_planned_on &&
307
+ final_report_actual_on == o.final_report_actual_on &&
308
+ final_report_slip_days == o.final_report_slip_days &&
309
+ all_meets_n_floor == o.all_meets_n_floor &&
310
+ stratum_meets_n_floor == o.stratum_meets_n_floor &&
311
+ snapshot_label == o.snapshot_label &&
312
+ accessed_month == o.accessed_month &&
313
+ restriction_tier == o.restriction_tier &&
314
+ attribution == o.attribution
315
+ end
316
+
317
+ # @see the `==` method
318
+ # @param [Object] Object to be compared
319
+ def eql?(o)
320
+ self == o
321
+ end
322
+
323
+ # Calculates hash code according to all attributes.
324
+ # @return [Integer] Hash code
325
+ def hash
326
+ [provider_rwd_delivery_study_id, provider_id, provider_uuid, provider_slug, provider_name, institution_id, match_method, match_confidence, conductor_name_key, study_id, eu_pas_number, study_mandate_stratum, final_report_planned_on, final_report_actual_on, final_report_slip_days, all_meets_n_floor, stratum_meets_n_floor, snapshot_label, accessed_month, restriction_tier, attribution].hash
327
+ end
328
+
329
+ # Builds the object from hash
330
+ # @param [Hash] attributes Model attributes in the form of hash
331
+ # @return [Object] Returns the model itself
332
+ def self.build_from_hash(attributes)
333
+ return nil unless attributes.is_a?(Hash)
334
+ attributes = attributes.transform_keys(&:to_sym)
335
+ transformed_hash = {}
336
+ openapi_types.each_pair do |key, type|
337
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
338
+ transformed_hash["#{key}"] = nil
339
+ elsif type =~ /\AArray<(.*)>/i
340
+ # check to ensure the input is an array given that the attribute
341
+ # is documented as an array but the input is not
342
+ if attributes[attribute_map[key]].is_a?(Array)
343
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
344
+ end
345
+ elsif !attributes[attribute_map[key]].nil?
346
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
347
+ end
348
+ end
349
+ new(transformed_hash)
350
+ end
351
+
352
+ # Deserializes the data based on type
353
+ # @param string type Data type
354
+ # @param string value Value to be deserialized
355
+ # @return [Object] Deserialized data
356
+ def self._deserialize(type, value)
357
+ case type.to_sym
358
+ when :Time
359
+ Time.parse(value)
360
+ when :Date
361
+ Date.parse(value)
362
+ when :String
363
+ value.to_s
364
+ when :Integer
365
+ value.to_i
366
+ when :Float
367
+ value.to_f
368
+ when :Boolean
369
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
370
+ true
371
+ else
372
+ false
373
+ end
374
+ when :Object
375
+ # generic object (usually a Hash), return directly
376
+ value
377
+ when /\AArray<(?<inner_type>.+)>\z/
378
+ inner_type = Regexp.last_match[:inner_type]
379
+ value.map { |v| _deserialize(inner_type, v) }
380
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
381
+ k_type = Regexp.last_match[:k_type]
382
+ v_type = Regexp.last_match[:v_type]
383
+ {}.tap do |hash|
384
+ value.each do |k, v|
385
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
386
+ end
387
+ end
388
+ else # model
389
+ # models (e.g. Pet) or oneOf
390
+ klass = PharmaObservatory.const_get(type)
391
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
392
+ end
393
+ end
394
+
395
+ # Returns the string representation of the object
396
+ # @return [String] String presentation of the object
397
+ def to_s
398
+ to_hash.to_s
399
+ end
400
+
401
+ # to_body is an alias to to_hash (backward compatibility)
402
+ # @return [Hash] Returns the object in the form of hash
403
+ def to_body
404
+ to_hash
405
+ end
406
+
407
+ # Returns the object in the form of hash
408
+ # @return [Hash] Returns the object in the form of hash
409
+ def to_hash
410
+ hash = {}
411
+ self.class.attribute_map.each_pair do |attr, param|
412
+ value = self.send(attr)
413
+ if value.nil?
414
+ is_nullable = self.class.openapi_nullable.include?(attr)
415
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
416
+ end
417
+
418
+ hash[param] = _to_hash(value)
419
+ end
420
+ hash
421
+ end
422
+
423
+ # Outputs non-array value in the form of hash
424
+ # For object, use to_hash. Otherwise, just return the value
425
+ # @param [Object] value Any valid value
426
+ # @return [Hash] Returns the value in the form of hash
427
+ def _to_hash(value)
428
+ if value.is_a?(Array)
429
+ value.compact.map { |v| _to_hash(v) }
430
+ elsif value.is_a?(Hash)
431
+ {}.tap do |hash|
432
+ value.each { |k, v| hash[k] = _to_hash(v) }
433
+ end
434
+ elsif value.respond_to? :to_hash
435
+ value.to_hash
436
+ else
437
+ value
438
+ end
439
+ end
440
+
441
+ end
442
+
443
+ end