pharmaobservatory 0.1.7 → 0.1.8

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 (117) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +83 -4
  3. data/docs/BiomarkerAlleleFrequenciesResponse.md +58 -0
  4. data/docs/BiomarkerAlleleFrequenciesRow.md +62 -0
  5. data/docs/BiomarkerAssayProvidersResponse.md +58 -0
  6. data/docs/BiomarkerAssayProvidersRow.md +72 -0
  7. data/docs/BiomarkerEvidenceByYearResponse.md +58 -0
  8. data/docs/BiomarkerEvidenceByYearRow.md +32 -0
  9. data/docs/BiomarkerTraversalStatusResponse.md +58 -0
  10. data/docs/BiomarkerTraversalStatusRow.md +36 -0
  11. data/docs/BiomarkersApi.md +320 -0
  12. data/docs/CompaniesApi.md +1001 -99
  13. data/docs/CompanyAssetsRow.md +5 -1
  14. data/docs/CompanyBiomarkerCapabilityResponse.md +58 -0
  15. data/docs/CompanyBiomarkerCapabilityRow.md +68 -0
  16. data/docs/CompanyProgramsRow.md +5 -1
  17. data/docs/CompanyRareDiseaseDeclarationsResponse.md +58 -0
  18. data/docs/CompanyRareDiseaseDeclarationsRow.md +52 -0
  19. data/docs/GxpFacilitiesRow.md +22 -0
  20. data/docs/LegalEntitiesApi.md +981 -101
  21. data/docs/LegalEntitiesRecordAttributes.md +6 -0
  22. data/docs/LegalEntitySecFilingsResponse.md +58 -0
  23. data/docs/LegalEntitySecFilingsRow.md +44 -0
  24. data/docs/OrgDisclosureTrendResponse.md +58 -0
  25. data/docs/OrgDisclosureTrendRow.md +62 -0
  26. data/docs/OwnershipSourceCoverageResponse.md +58 -0
  27. data/docs/OwnershipSourceCoverageRow.md +62 -0
  28. data/docs/ProgramLicensingCandidatesRow.md +5 -1
  29. data/docs/ProgramsRow.md +1 -1
  30. data/docs/RwdConductorDeliveryResponse.md +58 -0
  31. data/docs/RwdConductorDeliveryRow.md +74 -0
  32. data/docs/RwdConductorFootprintResponse.md +58 -0
  33. data/docs/RwdConductorFootprintRow.md +40 -0
  34. data/docs/RwdConductorStudiesResponse.md +58 -0
  35. data/docs/RwdConductorStudiesRow.md +42 -0
  36. data/docs/RwdConductorsApi.md +393 -0
  37. data/docs/RwdConductorsRecord.md +38 -0
  38. data/docs/RwdConductorsResponse.md +58 -0
  39. data/docs/RwdConductorsRow.md +72 -0
  40. data/docs/RwdInstitutionsApi.md +153 -0
  41. data/docs/RwdInstitutionsRecord.md +38 -0
  42. data/docs/RwdInstitutionsResponse.md +58 -0
  43. data/docs/RwdInstitutionsRow.md +154 -0
  44. data/docs/RwdNetworksApi.md +153 -0
  45. data/docs/RwdNetworksRecord.md +38 -0
  46. data/docs/RwdNetworksResponse.md +58 -0
  47. data/docs/RwdNetworksRow.md +110 -0
  48. data/docs/RwdStudiesApi.md +80 -0
  49. data/docs/SbtiCrosscheckResponse.md +58 -0
  50. data/docs/SbtiCrosscheckRow.md +48 -0
  51. data/docs/SponsorDeliveryResponse.md +58 -0
  52. data/docs/SponsorDeliveryRow.md +52 -0
  53. data/docs/SponsorPatentMentionsResponse.md +58 -0
  54. data/docs/SponsorPatentMentionsRow.md +42 -0
  55. data/docs/SponsorTrialConditionsResponse.md +58 -0
  56. data/docs/SponsorTrialConditionsRow.md +36 -0
  57. data/docs/SponsorTrialDrugsResponse.md +58 -0
  58. data/docs/SponsorTrialDrugsRow.md +34 -0
  59. data/lib/pharmaobservatory/api/biomarkers_api.rb +336 -0
  60. data/lib/pharmaobservatory/api/companies_api.rb +1131 -130
  61. data/lib/pharmaobservatory/api/legal_entities_api.rb +1047 -123
  62. data/lib/pharmaobservatory/api/rwd_conductors_api.rb +413 -0
  63. data/lib/pharmaobservatory/api/rwd_institutions_api.rb +161 -0
  64. data/lib/pharmaobservatory/api/rwd_networks_api.rb +161 -0
  65. data/lib/pharmaobservatory/api/rwd_studies_api.rb +84 -0
  66. data/lib/pharmaobservatory/models/biomarker_allele_frequencies_response.rb +478 -0
  67. data/lib/pharmaobservatory/models/biomarker_allele_frequencies_row.rb +465 -0
  68. data/lib/pharmaobservatory/models/biomarker_assay_providers_response.rb +478 -0
  69. data/lib/pharmaobservatory/models/biomarker_assay_providers_row.rb +520 -0
  70. data/lib/pharmaobservatory/models/biomarker_evidence_by_year_response.rb +478 -0
  71. data/lib/pharmaobservatory/models/biomarker_evidence_by_year_row.rb +300 -0
  72. data/lib/pharmaobservatory/models/biomarker_traversal_status_response.rb +478 -0
  73. data/lib/pharmaobservatory/models/biomarker_traversal_status_row.rb +322 -0
  74. data/lib/pharmaobservatory/models/company_assets_row.rb +24 -2
  75. data/lib/pharmaobservatory/models/company_biomarker_capability_response.rb +478 -0
  76. data/lib/pharmaobservatory/models/company_biomarker_capability_row.rb +498 -0
  77. data/lib/pharmaobservatory/models/company_programs_row.rb +24 -2
  78. data/lib/pharmaobservatory/models/company_rare_disease_declarations_response.rb +478 -0
  79. data/lib/pharmaobservatory/models/company_rare_disease_declarations_row.rb +410 -0
  80. data/lib/pharmaobservatory/models/gxp_facilities_row.rb +122 -1
  81. data/lib/pharmaobservatory/models/legal_entities_record_attributes.rb +28 -1
  82. data/lib/pharmaobservatory/models/legal_entity_sec_filings_response.rb +478 -0
  83. data/lib/pharmaobservatory/models/legal_entity_sec_filings_row.rb +370 -0
  84. data/lib/pharmaobservatory/models/org_disclosure_trend_response.rb +478 -0
  85. data/lib/pharmaobservatory/models/org_disclosure_trend_row.rb +465 -0
  86. data/lib/pharmaobservatory/models/ownership_source_coverage_response.rb +478 -0
  87. data/lib/pharmaobservatory/models/ownership_source_coverage_row.rb +465 -0
  88. data/lib/pharmaobservatory/models/program_licensing_candidates_row.rb +24 -2
  89. data/lib/pharmaobservatory/models/programs_row.rb +1 -1
  90. data/lib/pharmaobservatory/models/rwd_conductor_delivery_response.rb +478 -0
  91. data/lib/pharmaobservatory/models/rwd_conductor_delivery_row.rb +537 -0
  92. data/lib/pharmaobservatory/models/rwd_conductor_footprint_response.rb +478 -0
  93. data/lib/pharmaobservatory/models/rwd_conductor_footprint_row.rb +346 -0
  94. data/lib/pharmaobservatory/models/rwd_conductor_studies_response.rb +478 -0
  95. data/lib/pharmaobservatory/models/rwd_conductor_studies_row.rb +355 -0
  96. data/lib/pharmaobservatory/models/rwd_conductors_record.rb +385 -0
  97. data/lib/pharmaobservatory/models/rwd_conductors_response.rb +478 -0
  98. data/lib/pharmaobservatory/models/rwd_conductors_row.rb +526 -0
  99. data/lib/pharmaobservatory/models/rwd_institutions_record.rb +385 -0
  100. data/lib/pharmaobservatory/models/rwd_institutions_response.rb +478 -0
  101. data/lib/pharmaobservatory/models/rwd_institutions_row.rb +981 -0
  102. data/lib/pharmaobservatory/models/rwd_networks_record.rb +385 -0
  103. data/lib/pharmaobservatory/models/rwd_networks_response.rb +478 -0
  104. data/lib/pharmaobservatory/models/rwd_networks_row.rb +733 -0
  105. data/lib/pharmaobservatory/models/sbti_crosscheck_response.rb +478 -0
  106. data/lib/pharmaobservatory/models/sbti_crosscheck_row.rb +388 -0
  107. data/lib/pharmaobservatory/models/sponsor_delivery_response.rb +478 -0
  108. data/lib/pharmaobservatory/models/sponsor_delivery_row.rb +410 -0
  109. data/lib/pharmaobservatory/models/sponsor_patent_mentions_response.rb +478 -0
  110. data/lib/pharmaobservatory/models/sponsor_patent_mentions_row.rb +355 -0
  111. data/lib/pharmaobservatory/models/sponsor_trial_conditions_response.rb +478 -0
  112. data/lib/pharmaobservatory/models/sponsor_trial_conditions_row.rb +322 -0
  113. data/lib/pharmaobservatory/models/sponsor_trial_drugs_response.rb +478 -0
  114. data/lib/pharmaobservatory/models/sponsor_trial_drugs_row.rb +311 -0
  115. data/lib/pharmaobservatory/version.rb +1 -1
  116. data/lib/pharmaobservatory.rb +46 -0
  117. metadata +94 -2
@@ -0,0 +1,355 @@
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 rwd_conductor_studies dataset: one row per conductor, registered study and role. A grouped request returns the group columns and the measures instead, as additional properties.
18
+ class RwdConductorStudiesRow
19
+ # The conductor slug: the register's normalised institution name key with spaces as hyphens, the id in the web page address (/rwd-conductors/<id>). The entry key of the rwd_conductors object type; injective because no name key carries a hyphen.
20
+ attr_accessor :conductor_id
21
+
22
+ # The register's own Study ID. The entry key of the rwd_studies object type; the EU PAS number is an attribute.
23
+ attr_accessor :study_id
24
+
25
+ # conducting when the register names the conductor as an institution conducting the study, additional when as an additional institution.
26
+ attr_accessor :conductor_role
27
+
28
+ # The study's title as registered.
29
+ attr_accessor :study_title
30
+
31
+ # The study's status as the register words it (Planned, Ongoing, Finalised, and so on).
32
+ attr_accessor :study_status
33
+
34
+ # mandated when a regulator required the study (a post-authorisation obligation), voluntary when the registrant says it did not, unknown when unanswered. Delivery timeliness is only comparable within a stratum.
35
+ attr_accessor :mandate_stratum
36
+
37
+ # Actual study start date.
38
+ attr_accessor :study_start_actual_on
39
+
40
+ # Actual minus planned final report date in days (positive is late); null when either date is missing or the two dates are equal (a backfill).
41
+ attr_accessor :final_report_slip_days
42
+
43
+ # True when the planned and actual final report dates are both present and equal to the day, which reads as a plan entered after the fact rather than perfect delivery.
44
+ attr_accessor :final_report_is_backfilled
45
+
46
+ # The label of the catalogue snapshot the row was read from (a date).
47
+ attr_accessor :snapshot_label
48
+
49
+ # The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
50
+ attr_accessor :accessed_month
51
+
52
+ # The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
53
+ attr_accessor :restriction_tier
54
+
55
+ # The attribution line EMA requires, including the catalogue URL and the access month; quote it with any figure taken from the row.
56
+ attr_accessor :attribution
57
+
58
+ # Attribute mapping from ruby-style variable name to JSON key.
59
+ def self.attribute_map
60
+ {
61
+ :'conductor_id' => :'conductor_id',
62
+ :'study_id' => :'study_id',
63
+ :'conductor_role' => :'conductor_role',
64
+ :'study_title' => :'study_title',
65
+ :'study_status' => :'study_status',
66
+ :'mandate_stratum' => :'mandate_stratum',
67
+ :'study_start_actual_on' => :'study_start_actual_on',
68
+ :'final_report_slip_days' => :'final_report_slip_days',
69
+ :'final_report_is_backfilled' => :'final_report_is_backfilled',
70
+ :'snapshot_label' => :'snapshot_label',
71
+ :'accessed_month' => :'accessed_month',
72
+ :'restriction_tier' => :'restriction_tier',
73
+ :'attribution' => :'attribution'
74
+ }
75
+ end
76
+
77
+ # Returns attribute mapping this model knows about
78
+ def self.acceptable_attribute_map
79
+ attribute_map
80
+ end
81
+
82
+ # Returns all the JSON keys this model knows about
83
+ def self.acceptable_attributes
84
+ acceptable_attribute_map.values
85
+ end
86
+
87
+ # Attribute type mapping.
88
+ def self.openapi_types
89
+ {
90
+ :'conductor_id' => :'String',
91
+ :'study_id' => :'String',
92
+ :'conductor_role' => :'String',
93
+ :'study_title' => :'String',
94
+ :'study_status' => :'String',
95
+ :'mandate_stratum' => :'String',
96
+ :'study_start_actual_on' => :'Date',
97
+ :'final_report_slip_days' => :'Integer',
98
+ :'final_report_is_backfilled' => :'Boolean',
99
+ :'snapshot_label' => :'String',
100
+ :'accessed_month' => :'String',
101
+ :'restriction_tier' => :'String',
102
+ :'attribution' => :'String'
103
+ }
104
+ end
105
+
106
+ # List of attributes with nullable: true
107
+ def self.openapi_nullable
108
+ Set.new([
109
+ :'conductor_id',
110
+ :'study_id',
111
+ :'conductor_role',
112
+ :'study_title',
113
+ :'study_status',
114
+ :'mandate_stratum',
115
+ :'study_start_actual_on',
116
+ :'final_report_slip_days',
117
+ :'final_report_is_backfilled',
118
+ :'snapshot_label',
119
+ :'accessed_month',
120
+ :'restriction_tier',
121
+ :'attribution'
122
+ ])
123
+ end
124
+
125
+ # Initializes the object
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ def initialize(attributes = {})
128
+ if (!attributes.is_a?(Hash))
129
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::RwdConductorStudiesRow` initialize method"
130
+ end
131
+
132
+ # check to see if the attribute exists and convert string to symbol for hash key
133
+ acceptable_attribute_map = self.class.acceptable_attribute_map
134
+ attributes = attributes.each_with_object({}) { |(k, v), h|
135
+ if (!acceptable_attribute_map.key?(k.to_sym))
136
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::RwdConductorStudiesRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
137
+ end
138
+ h[k.to_sym] = v
139
+ }
140
+
141
+ if attributes.key?(:'conductor_id')
142
+ self.conductor_id = attributes[:'conductor_id']
143
+ end
144
+
145
+ if attributes.key?(:'study_id')
146
+ self.study_id = attributes[:'study_id']
147
+ end
148
+
149
+ if attributes.key?(:'conductor_role')
150
+ self.conductor_role = attributes[:'conductor_role']
151
+ end
152
+
153
+ if attributes.key?(:'study_title')
154
+ self.study_title = attributes[:'study_title']
155
+ end
156
+
157
+ if attributes.key?(:'study_status')
158
+ self.study_status = attributes[:'study_status']
159
+ end
160
+
161
+ if attributes.key?(:'mandate_stratum')
162
+ self.mandate_stratum = attributes[:'mandate_stratum']
163
+ end
164
+
165
+ if attributes.key?(:'study_start_actual_on')
166
+ self.study_start_actual_on = attributes[:'study_start_actual_on']
167
+ end
168
+
169
+ if attributes.key?(:'final_report_slip_days')
170
+ self.final_report_slip_days = attributes[:'final_report_slip_days']
171
+ end
172
+
173
+ if attributes.key?(:'final_report_is_backfilled')
174
+ self.final_report_is_backfilled = attributes[:'final_report_is_backfilled']
175
+ end
176
+
177
+ if attributes.key?(:'snapshot_label')
178
+ self.snapshot_label = attributes[:'snapshot_label']
179
+ end
180
+
181
+ if attributes.key?(:'accessed_month')
182
+ self.accessed_month = attributes[:'accessed_month']
183
+ end
184
+
185
+ if attributes.key?(:'restriction_tier')
186
+ self.restriction_tier = attributes[:'restriction_tier']
187
+ end
188
+
189
+ if attributes.key?(:'attribution')
190
+ self.attribution = attributes[:'attribution']
191
+ end
192
+ end
193
+
194
+ # Show invalid properties with the reasons. Usually used together with valid?
195
+ # @return Array for valid properties with the reasons
196
+ def list_invalid_properties
197
+ warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
198
+ invalid_properties = Array.new
199
+ invalid_properties
200
+ end
201
+
202
+ # Check to see if the all the properties in the model are valid
203
+ # @return true if the model is valid
204
+ def valid?
205
+ warn '[DEPRECATED] the `valid?` method is obsolete'
206
+ true
207
+ end
208
+
209
+ # Checks equality by comparing each attribute.
210
+ # @param [Object] Object to be compared
211
+ def ==(o)
212
+ return true if self.equal?(o)
213
+ self.class == o.class &&
214
+ conductor_id == o.conductor_id &&
215
+ study_id == o.study_id &&
216
+ conductor_role == o.conductor_role &&
217
+ study_title == o.study_title &&
218
+ study_status == o.study_status &&
219
+ mandate_stratum == o.mandate_stratum &&
220
+ study_start_actual_on == o.study_start_actual_on &&
221
+ final_report_slip_days == o.final_report_slip_days &&
222
+ final_report_is_backfilled == o.final_report_is_backfilled &&
223
+ snapshot_label == o.snapshot_label &&
224
+ accessed_month == o.accessed_month &&
225
+ restriction_tier == o.restriction_tier &&
226
+ attribution == o.attribution
227
+ end
228
+
229
+ # @see the `==` method
230
+ # @param [Object] Object to be compared
231
+ def eql?(o)
232
+ self == o
233
+ end
234
+
235
+ # Calculates hash code according to all attributes.
236
+ # @return [Integer] Hash code
237
+ def hash
238
+ [conductor_id, study_id, conductor_role, study_title, study_status, mandate_stratum, study_start_actual_on, final_report_slip_days, final_report_is_backfilled, snapshot_label, accessed_month, restriction_tier, attribution].hash
239
+ end
240
+
241
+ # Builds the object from hash
242
+ # @param [Hash] attributes Model attributes in the form of hash
243
+ # @return [Object] Returns the model itself
244
+ def self.build_from_hash(attributes)
245
+ return nil unless attributes.is_a?(Hash)
246
+ attributes = attributes.transform_keys(&:to_sym)
247
+ transformed_hash = {}
248
+ openapi_types.each_pair do |key, type|
249
+ if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
250
+ transformed_hash["#{key}"] = nil
251
+ elsif type =~ /\AArray<(.*)>/i
252
+ # check to ensure the input is an array given that the attribute
253
+ # is documented as an array but the input is not
254
+ if attributes[attribute_map[key]].is_a?(Array)
255
+ transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
256
+ end
257
+ elsif !attributes[attribute_map[key]].nil?
258
+ transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
259
+ end
260
+ end
261
+ new(transformed_hash)
262
+ end
263
+
264
+ # Deserializes the data based on type
265
+ # @param string type Data type
266
+ # @param string value Value to be deserialized
267
+ # @return [Object] Deserialized data
268
+ def self._deserialize(type, value)
269
+ case type.to_sym
270
+ when :Time
271
+ Time.parse(value)
272
+ when :Date
273
+ Date.parse(value)
274
+ when :String
275
+ value.to_s
276
+ when :Integer
277
+ value.to_i
278
+ when :Float
279
+ value.to_f
280
+ when :Boolean
281
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
282
+ true
283
+ else
284
+ false
285
+ end
286
+ when :Object
287
+ # generic object (usually a Hash), return directly
288
+ value
289
+ when /\AArray<(?<inner_type>.+)>\z/
290
+ inner_type = Regexp.last_match[:inner_type]
291
+ value.map { |v| _deserialize(inner_type, v) }
292
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
293
+ k_type = Regexp.last_match[:k_type]
294
+ v_type = Regexp.last_match[:v_type]
295
+ {}.tap do |hash|
296
+ value.each do |k, v|
297
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
298
+ end
299
+ end
300
+ else # model
301
+ # models (e.g. Pet) or oneOf
302
+ klass = PharmaObservatory.const_get(type)
303
+ klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
304
+ end
305
+ end
306
+
307
+ # Returns the string representation of the object
308
+ # @return [String] String presentation of the object
309
+ def to_s
310
+ to_hash.to_s
311
+ end
312
+
313
+ # to_body is an alias to to_hash (backward compatibility)
314
+ # @return [Hash] Returns the object in the form of hash
315
+ def to_body
316
+ to_hash
317
+ end
318
+
319
+ # Returns the object in the form of hash
320
+ # @return [Hash] Returns the object in the form of hash
321
+ def to_hash
322
+ hash = {}
323
+ self.class.attribute_map.each_pair do |attr, param|
324
+ value = self.send(attr)
325
+ if value.nil?
326
+ is_nullable = self.class.openapi_nullable.include?(attr)
327
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
328
+ end
329
+
330
+ hash[param] = _to_hash(value)
331
+ end
332
+ hash
333
+ end
334
+
335
+ # Outputs non-array value in the form of hash
336
+ # For object, use to_hash. Otherwise, just return the value
337
+ # @param [Object] value Any valid value
338
+ # @return [Hash] Returns the value in the form of hash
339
+ def _to_hash(value)
340
+ if value.is_a?(Array)
341
+ value.compact.map { |v| _to_hash(v) }
342
+ elsif value.is_a?(Hash)
343
+ {}.tap do |hash|
344
+ value.each { |k, v| hash[k] = _to_hash(v) }
345
+ end
346
+ elsif value.respond_to? :to_hash
347
+ value.to_hash
348
+ else
349
+ value
350
+ end
351
+ end
352
+
353
+ end
354
+
355
+ end