pharmaobservatory 0.1.21 → 0.1.23
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 +40 -4
- data/docs/BiomarkersApi.md +80 -0
- data/docs/InvestigatorsApi.md +80 -0
- data/docs/ProviderBiomarkerCapabilityRow.md +9 -9
- data/docs/ProviderBiomarkerCapabilitySummaryResponse.md +58 -0
- data/docs/ProviderBiomarkerCapabilitySummaryRow.md +70 -0
- data/docs/ProviderCliaLicensureRow.md +1 -1
- data/docs/ProviderRwdDeliveryResponse.md +58 -0
- data/docs/ProviderRwdDeliveryRow.md +76 -0
- data/docs/ProviderRwdDeliveryStudyResponse.md +58 -0
- data/docs/ProviderRwdDeliveryStudyRow.md +60 -0
- data/docs/ProviderRwdFootprintResponse.md +58 -0
- data/docs/ProviderRwdFootprintRow.md +74 -0
- data/docs/RwdConductorsApi.md +160 -0
- data/docs/RwdInstitutionsApi.md +80 -0
- data/docs/RwdSourcesRow.md +1 -1
- data/docs/RwdStudiesApi.md +80 -0
- data/docs/RwdUsNetworkMembershipsResponse.md +58 -0
- data/docs/RwdUsNetworkMembershipsRow.md +98 -0
- data/docs/RwdUsNetworkProjectsResponse.md +58 -0
- data/docs/RwdUsNetworkProjectsRow.md +80 -0
- data/docs/RwdUsNetworksApi.md +313 -0
- data/docs/RwdUsNetworksRecord.md +38 -0
- data/docs/RwdUsNetworksResponse.md +58 -0
- data/docs/RwdUsNetworksRow.md +60 -0
- data/docs/SupplierRwdDeclarationsResponse.md +58 -0
- data/docs/SupplierRwdDeclarationsRow.md +74 -0
- data/docs/SuppliersApi.md +480 -0
- data/docs/TrialPublicationsResponse.md +58 -0
- data/docs/TrialPublicationsRow.md +34 -0
- data/docs/TrialsApi.md +80 -0
- data/lib/pharmaobservatory/api/biomarkers_api.rb +84 -0
- data/lib/pharmaobservatory/api/investigators_api.rb +84 -0
- data/lib/pharmaobservatory/api/rwd_conductors_api.rb +168 -0
- data/lib/pharmaobservatory/api/rwd_institutions_api.rb +84 -0
- data/lib/pharmaobservatory/api/rwd_studies_api.rb +84 -0
- data/lib/pharmaobservatory/api/rwd_us_networks_api.rb +329 -0
- data/lib/pharmaobservatory/api/suppliers_api.rb +504 -0
- data/lib/pharmaobservatory/api/trials_api.rb +84 -0
- data/lib/pharmaobservatory/models/provider_biomarker_capability_row.rb +9 -9
- data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_response.rb +478 -0
- data/lib/pharmaobservatory/models/provider_biomarker_capability_summary_row.rb +509 -0
- data/lib/pharmaobservatory/models/provider_clia_licensure_row.rb +1 -1
- data/lib/pharmaobservatory/models/provider_rwd_delivery_response.rb +478 -0
- data/lib/pharmaobservatory/models/provider_rwd_delivery_row.rb +546 -0
- data/lib/pharmaobservatory/models/provider_rwd_delivery_study_response.rb +478 -0
- data/lib/pharmaobservatory/models/provider_rwd_delivery_study_row.rb +454 -0
- data/lib/pharmaobservatory/models/provider_rwd_footprint_response.rb +478 -0
- data/lib/pharmaobservatory/models/provider_rwd_footprint_row.rb +539 -0
- data/lib/pharmaobservatory/models/rwd_sources_row.rb +1 -1
- data/lib/pharmaobservatory/models/rwd_us_network_memberships_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_us_network_memberships_row.rb +663 -0
- data/lib/pharmaobservatory/models/rwd_us_network_projects_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_us_network_projects_row.rb +564 -0
- data/lib/pharmaobservatory/models/rwd_us_networks_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_us_networks_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_us_networks_row.rb +454 -0
- data/lib/pharmaobservatory/models/supplier_rwd_declarations_response.rb +478 -0
- data/lib/pharmaobservatory/models/supplier_rwd_declarations_row.rb +539 -0
- data/lib/pharmaobservatory/models/trial_publications_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_publications_row.rb +313 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +20 -0
- metadata +42 -2
|
@@ -0,0 +1,454 @@
|
|
|
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 conductor slug: the conductor name key with spaces as hyphens, the entry key of the rwd_conductors object type (the id in /app/rwd-conductors/<id>).
|
|
47
|
+
attr_accessor :conductor_id
|
|
48
|
+
|
|
49
|
+
# The register's own Study ID. The entry key of the rwd_studies object type; the EU PAS number is an attribute.
|
|
50
|
+
attr_accessor :study_id
|
|
51
|
+
|
|
52
|
+
# The EU PAS (post-authorisation study) register number of the study.
|
|
53
|
+
attr_accessor :eu_pas_number
|
|
54
|
+
|
|
55
|
+
# The study's own mandate: mandated (a regulator required it), voluntary, or unknown (the register does not say).
|
|
56
|
+
attr_accessor :study_mandate_stratum
|
|
57
|
+
|
|
58
|
+
# Planned date of the final study report.
|
|
59
|
+
attr_accessor :final_report_planned_on
|
|
60
|
+
|
|
61
|
+
# Actual date of the final study report.
|
|
62
|
+
attr_accessor :final_report_actual_on
|
|
63
|
+
|
|
64
|
+
# Actual minus planned final report date in days (positive is late, negative is early). A plain fact about one study, never a statistic.
|
|
65
|
+
attr_accessor :final_report_slip_days
|
|
66
|
+
|
|
67
|
+
# True when the provider and conductor's all row meets the floor of 10 comparable pairs.
|
|
68
|
+
attr_accessor :all_meets_n_floor
|
|
69
|
+
|
|
70
|
+
# 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).
|
|
71
|
+
attr_accessor :stratum_meets_n_floor
|
|
72
|
+
|
|
73
|
+
# The label of the catalogue snapshot the row was read from (a date).
|
|
74
|
+
attr_accessor :snapshot_label
|
|
75
|
+
|
|
76
|
+
# The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
|
|
77
|
+
attr_accessor :accessed_month
|
|
78
|
+
|
|
79
|
+
# The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
|
|
80
|
+
attr_accessor :restriction_tier
|
|
81
|
+
|
|
82
|
+
# The attribution line EMA requires, including the catalogue URL and the access month; quote it with any figure taken from the row.
|
|
83
|
+
attr_accessor :attribution
|
|
84
|
+
|
|
85
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
86
|
+
def self.attribute_map
|
|
87
|
+
{
|
|
88
|
+
:'provider_rwd_delivery_study_id' => :'provider_rwd_delivery_study_id',
|
|
89
|
+
:'provider_id' => :'provider_id',
|
|
90
|
+
:'provider_uuid' => :'provider_uuid',
|
|
91
|
+
:'provider_slug' => :'provider_slug',
|
|
92
|
+
:'provider_name' => :'provider_name',
|
|
93
|
+
:'institution_id' => :'institution_id',
|
|
94
|
+
:'match_method' => :'match_method',
|
|
95
|
+
:'match_confidence' => :'match_confidence',
|
|
96
|
+
:'conductor_name_key' => :'conductor_name_key',
|
|
97
|
+
:'conductor_id' => :'conductor_id',
|
|
98
|
+
:'study_id' => :'study_id',
|
|
99
|
+
:'eu_pas_number' => :'eu_pas_number',
|
|
100
|
+
:'study_mandate_stratum' => :'study_mandate_stratum',
|
|
101
|
+
:'final_report_planned_on' => :'final_report_planned_on',
|
|
102
|
+
:'final_report_actual_on' => :'final_report_actual_on',
|
|
103
|
+
:'final_report_slip_days' => :'final_report_slip_days',
|
|
104
|
+
:'all_meets_n_floor' => :'all_meets_n_floor',
|
|
105
|
+
:'stratum_meets_n_floor' => :'stratum_meets_n_floor',
|
|
106
|
+
:'snapshot_label' => :'snapshot_label',
|
|
107
|
+
:'accessed_month' => :'accessed_month',
|
|
108
|
+
:'restriction_tier' => :'restriction_tier',
|
|
109
|
+
:'attribution' => :'attribution'
|
|
110
|
+
}
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# Returns attribute mapping this model knows about
|
|
114
|
+
def self.acceptable_attribute_map
|
|
115
|
+
attribute_map
|
|
116
|
+
end
|
|
117
|
+
|
|
118
|
+
# Returns all the JSON keys this model knows about
|
|
119
|
+
def self.acceptable_attributes
|
|
120
|
+
acceptable_attribute_map.values
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Attribute type mapping.
|
|
124
|
+
def self.openapi_types
|
|
125
|
+
{
|
|
126
|
+
:'provider_rwd_delivery_study_id' => :'String',
|
|
127
|
+
:'provider_id' => :'String',
|
|
128
|
+
:'provider_uuid' => :'String',
|
|
129
|
+
:'provider_slug' => :'String',
|
|
130
|
+
:'provider_name' => :'String',
|
|
131
|
+
:'institution_id' => :'String',
|
|
132
|
+
:'match_method' => :'String',
|
|
133
|
+
:'match_confidence' => :'Float',
|
|
134
|
+
:'conductor_name_key' => :'String',
|
|
135
|
+
:'conductor_id' => :'String',
|
|
136
|
+
:'study_id' => :'String',
|
|
137
|
+
:'eu_pas_number' => :'String',
|
|
138
|
+
:'study_mandate_stratum' => :'String',
|
|
139
|
+
:'final_report_planned_on' => :'Date',
|
|
140
|
+
:'final_report_actual_on' => :'Date',
|
|
141
|
+
:'final_report_slip_days' => :'Integer',
|
|
142
|
+
:'all_meets_n_floor' => :'Boolean',
|
|
143
|
+
:'stratum_meets_n_floor' => :'Boolean',
|
|
144
|
+
:'snapshot_label' => :'String',
|
|
145
|
+
:'accessed_month' => :'String',
|
|
146
|
+
:'restriction_tier' => :'String',
|
|
147
|
+
:'attribution' => :'String'
|
|
148
|
+
}
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
# List of attributes with nullable: true
|
|
152
|
+
def self.openapi_nullable
|
|
153
|
+
Set.new([
|
|
154
|
+
:'provider_rwd_delivery_study_id',
|
|
155
|
+
:'provider_id',
|
|
156
|
+
:'provider_uuid',
|
|
157
|
+
:'provider_slug',
|
|
158
|
+
:'provider_name',
|
|
159
|
+
:'institution_id',
|
|
160
|
+
:'match_method',
|
|
161
|
+
:'match_confidence',
|
|
162
|
+
:'conductor_name_key',
|
|
163
|
+
:'conductor_id',
|
|
164
|
+
:'study_id',
|
|
165
|
+
:'eu_pas_number',
|
|
166
|
+
:'study_mandate_stratum',
|
|
167
|
+
:'final_report_planned_on',
|
|
168
|
+
:'final_report_actual_on',
|
|
169
|
+
:'final_report_slip_days',
|
|
170
|
+
:'all_meets_n_floor',
|
|
171
|
+
:'stratum_meets_n_floor',
|
|
172
|
+
:'snapshot_label',
|
|
173
|
+
:'accessed_month',
|
|
174
|
+
:'restriction_tier',
|
|
175
|
+
:'attribution'
|
|
176
|
+
])
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Initializes the object
|
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
181
|
+
def initialize(attributes = {})
|
|
182
|
+
if (!attributes.is_a?(Hash))
|
|
183
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::ProviderRwdDeliveryStudyRow` initialize method"
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
187
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
188
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
189
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
190
|
+
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
|
|
191
|
+
end
|
|
192
|
+
h[k.to_sym] = v
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
if attributes.key?(:'provider_rwd_delivery_study_id')
|
|
196
|
+
self.provider_rwd_delivery_study_id = attributes[:'provider_rwd_delivery_study_id']
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
if attributes.key?(:'provider_id')
|
|
200
|
+
self.provider_id = attributes[:'provider_id']
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
if attributes.key?(:'provider_uuid')
|
|
204
|
+
self.provider_uuid = attributes[:'provider_uuid']
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'provider_slug')
|
|
208
|
+
self.provider_slug = attributes[:'provider_slug']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'provider_name')
|
|
212
|
+
self.provider_name = attributes[:'provider_name']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'institution_id')
|
|
216
|
+
self.institution_id = attributes[:'institution_id']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'match_method')
|
|
220
|
+
self.match_method = attributes[:'match_method']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'match_confidence')
|
|
224
|
+
self.match_confidence = attributes[:'match_confidence']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'conductor_name_key')
|
|
228
|
+
self.conductor_name_key = attributes[:'conductor_name_key']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'conductor_id')
|
|
232
|
+
self.conductor_id = attributes[:'conductor_id']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'study_id')
|
|
236
|
+
self.study_id = attributes[:'study_id']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'eu_pas_number')
|
|
240
|
+
self.eu_pas_number = attributes[:'eu_pas_number']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'study_mandate_stratum')
|
|
244
|
+
self.study_mandate_stratum = attributes[:'study_mandate_stratum']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'final_report_planned_on')
|
|
248
|
+
self.final_report_planned_on = attributes[:'final_report_planned_on']
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'final_report_actual_on')
|
|
252
|
+
self.final_report_actual_on = attributes[:'final_report_actual_on']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'final_report_slip_days')
|
|
256
|
+
self.final_report_slip_days = attributes[:'final_report_slip_days']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'all_meets_n_floor')
|
|
260
|
+
self.all_meets_n_floor = attributes[:'all_meets_n_floor']
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if attributes.key?(:'stratum_meets_n_floor')
|
|
264
|
+
self.stratum_meets_n_floor = attributes[:'stratum_meets_n_floor']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'snapshot_label')
|
|
268
|
+
self.snapshot_label = attributes[:'snapshot_label']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'accessed_month')
|
|
272
|
+
self.accessed_month = attributes[:'accessed_month']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'restriction_tier')
|
|
276
|
+
self.restriction_tier = attributes[:'restriction_tier']
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'attribution')
|
|
280
|
+
self.attribution = attributes[:'attribution']
|
|
281
|
+
end
|
|
282
|
+
end
|
|
283
|
+
|
|
284
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
285
|
+
# @return Array for valid properties with the reasons
|
|
286
|
+
def list_invalid_properties
|
|
287
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
288
|
+
invalid_properties = Array.new
|
|
289
|
+
invalid_properties
|
|
290
|
+
end
|
|
291
|
+
|
|
292
|
+
# Check to see if the all the properties in the model are valid
|
|
293
|
+
# @return true if the model is valid
|
|
294
|
+
def valid?
|
|
295
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
296
|
+
true
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
# Checks equality by comparing each attribute.
|
|
300
|
+
# @param [Object] Object to be compared
|
|
301
|
+
def ==(o)
|
|
302
|
+
return true if self.equal?(o)
|
|
303
|
+
self.class == o.class &&
|
|
304
|
+
provider_rwd_delivery_study_id == o.provider_rwd_delivery_study_id &&
|
|
305
|
+
provider_id == o.provider_id &&
|
|
306
|
+
provider_uuid == o.provider_uuid &&
|
|
307
|
+
provider_slug == o.provider_slug &&
|
|
308
|
+
provider_name == o.provider_name &&
|
|
309
|
+
institution_id == o.institution_id &&
|
|
310
|
+
match_method == o.match_method &&
|
|
311
|
+
match_confidence == o.match_confidence &&
|
|
312
|
+
conductor_name_key == o.conductor_name_key &&
|
|
313
|
+
conductor_id == o.conductor_id &&
|
|
314
|
+
study_id == o.study_id &&
|
|
315
|
+
eu_pas_number == o.eu_pas_number &&
|
|
316
|
+
study_mandate_stratum == o.study_mandate_stratum &&
|
|
317
|
+
final_report_planned_on == o.final_report_planned_on &&
|
|
318
|
+
final_report_actual_on == o.final_report_actual_on &&
|
|
319
|
+
final_report_slip_days == o.final_report_slip_days &&
|
|
320
|
+
all_meets_n_floor == o.all_meets_n_floor &&
|
|
321
|
+
stratum_meets_n_floor == o.stratum_meets_n_floor &&
|
|
322
|
+
snapshot_label == o.snapshot_label &&
|
|
323
|
+
accessed_month == o.accessed_month &&
|
|
324
|
+
restriction_tier == o.restriction_tier &&
|
|
325
|
+
attribution == o.attribution
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# @see the `==` method
|
|
329
|
+
# @param [Object] Object to be compared
|
|
330
|
+
def eql?(o)
|
|
331
|
+
self == o
|
|
332
|
+
end
|
|
333
|
+
|
|
334
|
+
# Calculates hash code according to all attributes.
|
|
335
|
+
# @return [Integer] Hash code
|
|
336
|
+
def hash
|
|
337
|
+
[provider_rwd_delivery_study_id, provider_id, provider_uuid, provider_slug, provider_name, institution_id, match_method, match_confidence, conductor_name_key, conductor_id, 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
|
|
338
|
+
end
|
|
339
|
+
|
|
340
|
+
# Builds the object from hash
|
|
341
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
342
|
+
# @return [Object] Returns the model itself
|
|
343
|
+
def self.build_from_hash(attributes)
|
|
344
|
+
return nil unless attributes.is_a?(Hash)
|
|
345
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
346
|
+
transformed_hash = {}
|
|
347
|
+
openapi_types.each_pair do |key, type|
|
|
348
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
349
|
+
transformed_hash["#{key}"] = nil
|
|
350
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
351
|
+
# check to ensure the input is an array given that the attribute
|
|
352
|
+
# is documented as an array but the input is not
|
|
353
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
354
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
355
|
+
end
|
|
356
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
357
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
358
|
+
end
|
|
359
|
+
end
|
|
360
|
+
new(transformed_hash)
|
|
361
|
+
end
|
|
362
|
+
|
|
363
|
+
# Deserializes the data based on type
|
|
364
|
+
# @param string type Data type
|
|
365
|
+
# @param string value Value to be deserialized
|
|
366
|
+
# @return [Object] Deserialized data
|
|
367
|
+
def self._deserialize(type, value)
|
|
368
|
+
case type.to_sym
|
|
369
|
+
when :Time
|
|
370
|
+
Time.parse(value)
|
|
371
|
+
when :Date
|
|
372
|
+
Date.parse(value)
|
|
373
|
+
when :String
|
|
374
|
+
value.to_s
|
|
375
|
+
when :Integer
|
|
376
|
+
value.to_i
|
|
377
|
+
when :Float
|
|
378
|
+
value.to_f
|
|
379
|
+
when :Boolean
|
|
380
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
381
|
+
true
|
|
382
|
+
else
|
|
383
|
+
false
|
|
384
|
+
end
|
|
385
|
+
when :Object
|
|
386
|
+
# generic object (usually a Hash), return directly
|
|
387
|
+
value
|
|
388
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
389
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
390
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
391
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
392
|
+
k_type = Regexp.last_match[:k_type]
|
|
393
|
+
v_type = Regexp.last_match[:v_type]
|
|
394
|
+
{}.tap do |hash|
|
|
395
|
+
value.each do |k, v|
|
|
396
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
397
|
+
end
|
|
398
|
+
end
|
|
399
|
+
else # model
|
|
400
|
+
# models (e.g. Pet) or oneOf
|
|
401
|
+
klass = PharmaObservatory.const_get(type)
|
|
402
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
403
|
+
end
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
# Returns the string representation of the object
|
|
407
|
+
# @return [String] String presentation of the object
|
|
408
|
+
def to_s
|
|
409
|
+
to_hash.to_s
|
|
410
|
+
end
|
|
411
|
+
|
|
412
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
413
|
+
# @return [Hash] Returns the object in the form of hash
|
|
414
|
+
def to_body
|
|
415
|
+
to_hash
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
# Returns the object in the form of hash
|
|
419
|
+
# @return [Hash] Returns the object in the form of hash
|
|
420
|
+
def to_hash
|
|
421
|
+
hash = {}
|
|
422
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
423
|
+
value = self.send(attr)
|
|
424
|
+
if value.nil?
|
|
425
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
426
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
427
|
+
end
|
|
428
|
+
|
|
429
|
+
hash[param] = _to_hash(value)
|
|
430
|
+
end
|
|
431
|
+
hash
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Outputs non-array value in the form of hash
|
|
435
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
436
|
+
# @param [Object] value Any valid value
|
|
437
|
+
# @return [Hash] Returns the value in the form of hash
|
|
438
|
+
def _to_hash(value)
|
|
439
|
+
if value.is_a?(Array)
|
|
440
|
+
value.compact.map { |v| _to_hash(v) }
|
|
441
|
+
elsif value.is_a?(Hash)
|
|
442
|
+
{}.tap do |hash|
|
|
443
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
444
|
+
end
|
|
445
|
+
elsif value.respond_to? :to_hash
|
|
446
|
+
value.to_hash
|
|
447
|
+
else
|
|
448
|
+
value
|
|
449
|
+
end
|
|
450
|
+
end
|
|
451
|
+
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
end
|