pharmaobservatory 0.1.3 → 0.1.4
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 +101 -4
- data/docs/BiomarkerBqpAssertionsRow.md +1 -1
- data/docs/BiomarkerEvidenceRow.md +1 -1
- data/docs/BiomarkerLiteratureRow.md +1 -1
- data/docs/BiomarkerRelationsResponse.md +58 -0
- data/docs/BiomarkerRelationsRow.md +54 -0
- data/docs/BiomarkerSampleCoverageResponse.md +58 -0
- data/docs/BiomarkerSampleCoverageRow.md +36 -0
- data/docs/BiomarkerSamplePrevalenceResponse.md +58 -0
- data/docs/BiomarkerSamplePrevalenceRow.md +56 -0
- data/docs/BiomarkerValidationResponse.md +58 -0
- data/docs/BiomarkerValidationRow.md +70 -0
- data/docs/BiomarkersApi.md +320 -0
- data/docs/BiomarkersRow.md +2 -2
- data/docs/CellLinesRow.md +1 -1
- data/docs/CompaniesApi.md +410 -0
- data/docs/CompaniesRecord.md +1 -1
- data/docs/CompaniesRecordAttributes.md +18 -0
- data/docs/CompaniesRow.md +7 -3
- data/docs/CompanyAssetsResponse.md +58 -0
- data/docs/CompanyAssetsRow.md +42 -0
- data/docs/CompanyFundingEventsResponse.md +58 -0
- data/docs/CompanyFundingEventsRow.md +62 -0
- data/docs/CompanyFundingSummaryResponse.md +58 -0
- data/docs/CompanyFundingSummaryRow.md +46 -0
- data/docs/CompanyProgramsRow.md +2 -2
- data/docs/ConditionAdverseEventsResponse.md +58 -0
- data/docs/ConditionAdverseEventsRow.md +24 -0
- data/docs/ConditionBurdenResponse.md +58 -0
- data/docs/ConditionBurdenRow.md +32 -0
- data/docs/ConditionDeliveryResponse.md +58 -0
- data/docs/ConditionDeliveryRow.md +44 -0
- data/docs/ConditionDrugsResponse.md +58 -0
- data/docs/ConditionDrugsRow.md +26 -0
- data/docs/ConditionPrevalenceResponse.md +58 -0
- data/docs/ConditionPrevalenceRow.md +62 -0
- data/docs/ConditionPublicationsResponse.md +58 -0
- data/docs/ConditionPublicationsRow.md +32 -0
- data/docs/ConditionSitesResponse.md +58 -0
- data/docs/ConditionSitesRow.md +28 -0
- data/docs/ConditionTrialsResponse.md +58 -0
- data/docs/ConditionTrialsRow.md +58 -0
- data/docs/ConditionsApi.md +953 -0
- data/docs/ConditionsRecord.md +38 -0
- data/docs/ConditionsRecordAttributes.md +20 -0
- data/docs/ConditionsResponse.md +58 -0
- data/docs/ConditionsRow.md +32 -0
- data/docs/DrugPatentCliffRow.md +1 -1
- data/docs/InstitutionalHoldingsRow.md +3 -1
- data/docs/LegalEntitiesApi.md +160 -0
- data/docs/LegalEntitiesRow.md +1 -1
- data/docs/OwnershipPositionsResponse.md +58 -0
- data/docs/OwnershipPositionsRow.md +100 -0
- data/docs/PdufaDatesRow.md +2 -2
- data/docs/SiteCroTrialsRow.md +1 -1
- data/docs/SiteTrialConditionsRow.md +1 -1
- data/docs/SiteTrialDrugsRow.md +1 -1
- data/docs/SiteTrialsRow.md +1 -1
- data/docs/SponsorRecruitmentByPhaseRow.md +2 -2
- data/docs/SponsorRecruitmentDurationRow.md +1 -1
- data/docs/SponsorTrialsRow.md +2 -2
- data/docs/TrialAdverseEventsResponse.md +58 -0
- data/docs/TrialAdverseEventsRow.md +28 -0
- data/docs/TrialChangesResponse.md +58 -0
- data/docs/TrialChangesRow.md +36 -0
- data/docs/TrialDeliveryResponse.md +58 -0
- data/docs/TrialDeliveryRow.md +64 -0
- data/docs/TrialDemographicsResponse.md +58 -0
- data/docs/TrialDemographicsRow.md +32 -0
- data/docs/TrialDrugsResponse.md +58 -0
- data/docs/TrialDrugsRow.md +30 -0
- data/docs/TrialEnrollmentHistoryResponse.md +58 -0
- data/docs/TrialEnrollmentHistoryRow.md +36 -0
- data/docs/TrialEnrollmentRateResponse.md +58 -0
- data/docs/TrialEnrollmentRateRow.md +58 -0
- data/docs/TrialExtractedEndpointsResponse.md +58 -0
- data/docs/TrialExtractedEndpointsRow.md +40 -0
- data/docs/TrialOutcomeMeasuresResponse.md +58 -0
- data/docs/TrialOutcomeMeasuresRow.md +28 -0
- data/docs/TrialSitesResponse.md +58 -0
- data/docs/TrialSitesRow.md +46 -0
- data/docs/TrialsApi.md +1033 -0
- data/docs/TrialsRecord.md +38 -0
- data/docs/TrialsRecordAttributes.md +24 -0
- data/docs/TrialsResponse.md +58 -0
- data/docs/TrialsRow.md +116 -0
- data/lib/pharmaobservatory/api/biomarkers_api.rb +336 -0
- data/lib/pharmaobservatory/api/companies_api.rb +455 -0
- data/lib/pharmaobservatory/api/conditions_api.rb +1001 -0
- data/lib/pharmaobservatory/api/legal_entities_api.rb +168 -0
- data/lib/pharmaobservatory/api/trials_api.rb +1085 -0
- data/lib/pharmaobservatory/models/biomarker_bqp_assertions_row.rb +1 -1
- data/lib/pharmaobservatory/models/biomarker_evidence_row.rb +1 -1
- data/lib/pharmaobservatory/models/biomarker_literature_row.rb +1 -1
- data/lib/pharmaobservatory/models/biomarker_relations_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_relations_row.rb +421 -0
- data/lib/pharmaobservatory/models/biomarker_sample_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_sample_coverage_row.rb +322 -0
- data/lib/pharmaobservatory/models/biomarker_sample_prevalence_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_sample_prevalence_row.rb +436 -0
- data/lib/pharmaobservatory/models/biomarker_validation_response.rb +478 -0
- data/lib/pharmaobservatory/models/biomarker_validation_row.rb +509 -0
- data/lib/pharmaobservatory/models/biomarkers_row.rb +2 -2
- data/lib/pharmaobservatory/models/cell_lines_row.rb +1 -1
- data/lib/pharmaobservatory/models/companies_record.rb +1 -1
- data/lib/pharmaobservatory/models/companies_record_attributes.rb +220 -0
- data/lib/pharmaobservatory/models/companies_row.rb +29 -7
- data/lib/pharmaobservatory/models/company_assets_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_assets_row.rb +355 -0
- data/lib/pharmaobservatory/models/company_funding_events_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_funding_events_row.rb +465 -0
- data/lib/pharmaobservatory/models/company_funding_summary_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_funding_summary_row.rb +377 -0
- data/lib/pharmaobservatory/models/company_programs_row.rb +2 -2
- data/lib/pharmaobservatory/models/condition_adverse_events_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_adverse_events_row.rb +256 -0
- data/lib/pharmaobservatory/models/condition_burden_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_burden_row.rb +300 -0
- data/lib/pharmaobservatory/models/condition_delivery_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_delivery_row.rb +366 -0
- data/lib/pharmaobservatory/models/condition_drugs_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_drugs_row.rb +267 -0
- data/lib/pharmaobservatory/models/condition_prevalence_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_prevalence_row.rb +465 -0
- data/lib/pharmaobservatory/models/condition_publications_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_publications_row.rb +300 -0
- data/lib/pharmaobservatory/models/condition_sites_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_sites_row.rb +278 -0
- data/lib/pharmaobservatory/models/condition_trials_response.rb +478 -0
- data/lib/pharmaobservatory/models/condition_trials_row.rb +443 -0
- data/lib/pharmaobservatory/models/conditions_record.rb +385 -0
- data/lib/pharmaobservatory/models/conditions_record_attributes.rb +229 -0
- data/lib/pharmaobservatory/models/conditions_response.rb +478 -0
- data/lib/pharmaobservatory/models/conditions_row.rb +304 -0
- data/lib/pharmaobservatory/models/drug_patent_cliff_row.rb +1 -1
- data/lib/pharmaobservatory/models/institutional_holdings_row.rb +13 -2
- data/lib/pharmaobservatory/models/legal_entities_row.rb +1 -1
- data/lib/pharmaobservatory/models/ownership_positions_response.rb +478 -0
- data/lib/pharmaobservatory/models/ownership_positions_row.rb +674 -0
- data/lib/pharmaobservatory/models/pdufa_dates_row.rb +2 -2
- data/lib/pharmaobservatory/models/site_cro_trials_row.rb +1 -1
- data/lib/pharmaobservatory/models/site_trial_conditions_row.rb +1 -1
- data/lib/pharmaobservatory/models/site_trial_drugs_row.rb +1 -1
- data/lib/pharmaobservatory/models/site_trials_row.rb +1 -1
- data/lib/pharmaobservatory/models/sponsor_recruitment_by_phase_row.rb +2 -2
- data/lib/pharmaobservatory/models/sponsor_recruitment_duration_row.rb +1 -1
- data/lib/pharmaobservatory/models/sponsor_trials_row.rb +2 -2
- data/lib/pharmaobservatory/models/trial_adverse_events_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_adverse_events_row.rb +278 -0
- data/lib/pharmaobservatory/models/trial_changes_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_changes_row.rb +328 -0
- data/lib/pharmaobservatory/models/trial_delivery_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_delivery_row.rb +476 -0
- data/lib/pharmaobservatory/models/trial_demographics_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_demographics_row.rb +300 -0
- data/lib/pharmaobservatory/models/trial_drugs_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_drugs_row.rb +291 -0
- data/lib/pharmaobservatory/models/trial_enrollment_history_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_enrollment_history_row.rb +322 -0
- data/lib/pharmaobservatory/models/trial_enrollment_rate_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_enrollment_rate_row.rb +443 -0
- data/lib/pharmaobservatory/models/trial_extracted_endpoints_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_extracted_endpoints_row.rb +346 -0
- data/lib/pharmaobservatory/models/trial_outcome_measures_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_outcome_measures_row.rb +278 -0
- data/lib/pharmaobservatory/models/trial_sites_response.rb +478 -0
- data/lib/pharmaobservatory/models/trial_sites_row.rb +377 -0
- data/lib/pharmaobservatory/models/trials_record.rb +385 -0
- data/lib/pharmaobservatory/models/trials_record_attributes.rb +247 -0
- data/lib/pharmaobservatory/models/trials_response.rb +478 -0
- data/lib/pharmaobservatory/models/trials_row.rb +784 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +63 -0
- metadata +127 -1
|
@@ -0,0 +1,476 @@
|
|
|
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 trial_delivery dataset: one row per trial. A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class TrialDeliveryRow
|
|
19
|
+
# The trial's ClinicalTrials.gov registry id (NCT, National Clinical Trial, number).
|
|
20
|
+
attr_accessor :trial_id
|
|
21
|
+
|
|
22
|
+
# The lead sponsor name as filed.
|
|
23
|
+
attr_accessor :lead_sponsor_name
|
|
24
|
+
|
|
25
|
+
# A coarse status label (Recruiting, Completed and so on).
|
|
26
|
+
attr_accessor :overall_status_summary
|
|
27
|
+
|
|
28
|
+
# INTERVENTIONAL, OBSERVATIONAL or EXPANDED_ACCESS.
|
|
29
|
+
attr_accessor :study_type
|
|
30
|
+
|
|
31
|
+
# The registry's phase code.
|
|
32
|
+
attr_accessor :phase
|
|
33
|
+
|
|
34
|
+
# Planned enrollment from the earliest snapshot typed ESTIMATED.
|
|
35
|
+
attr_accessor :planned_enrollment
|
|
36
|
+
|
|
37
|
+
# Enrollment from the latest observation typed ACTUAL.
|
|
38
|
+
attr_accessor :actual_enrollment
|
|
39
|
+
|
|
40
|
+
# Enrollment type on the current record (ACTUAL or ESTIMATED).
|
|
41
|
+
attr_accessor :enrollment_type
|
|
42
|
+
|
|
43
|
+
# Actual minus planned enrollment (null without both).
|
|
44
|
+
attr_accessor :enrollment_delta
|
|
45
|
+
|
|
46
|
+
# Actual as a percentage of planned enrollment (null without both).
|
|
47
|
+
attr_accessor :enrollment_attainment_pct
|
|
48
|
+
|
|
49
|
+
# Whether actual enrollment reached the plan (null without both).
|
|
50
|
+
attr_accessor :enrollment_met
|
|
51
|
+
|
|
52
|
+
# Whether a planned and an actual enrollment are both recorded.
|
|
53
|
+
attr_accessor :has_enrollment_delta
|
|
54
|
+
|
|
55
|
+
# Where the planned enrollment came from: history_earliest_estimated, type_estimated_current or none.
|
|
56
|
+
attr_accessor :planned_basis
|
|
57
|
+
|
|
58
|
+
# How the actual enrollment was taken (from the snapshot history, from the current record, or none).
|
|
59
|
+
attr_accessor :actual_basis
|
|
60
|
+
|
|
61
|
+
# Planned primary completion date from the earliest snapshot typed ESTIMATED.
|
|
62
|
+
attr_accessor :planned_primary_completion_date
|
|
63
|
+
|
|
64
|
+
# Primary completion date once typed ACTUAL.
|
|
65
|
+
attr_accessor :actual_primary_completion_date
|
|
66
|
+
|
|
67
|
+
# Planned completion date from the earliest snapshot typed ESTIMATED.
|
|
68
|
+
attr_accessor :planned_completion_date
|
|
69
|
+
|
|
70
|
+
# Completion date once typed ACTUAL.
|
|
71
|
+
attr_accessor :actual_completion_date
|
|
72
|
+
|
|
73
|
+
# Type of the current primary completion date (ACTUAL or ESTIMATED).
|
|
74
|
+
attr_accessor :primary_completion_date_type
|
|
75
|
+
|
|
76
|
+
# Type of the current completion date (ACTUAL or ESTIMATED).
|
|
77
|
+
attr_accessor :completion_date_type
|
|
78
|
+
|
|
79
|
+
# Actual minus planned primary completion date; positive is later than planned (null without both).
|
|
80
|
+
attr_accessor :primary_completion_slip_days
|
|
81
|
+
|
|
82
|
+
# Actual minus planned completion date; positive is later than planned (null without both).
|
|
83
|
+
attr_accessor :completion_slip_days
|
|
84
|
+
|
|
85
|
+
# Whether the primary completion came later than planned (null without both).
|
|
86
|
+
attr_accessor :completion_slipped
|
|
87
|
+
|
|
88
|
+
# Whether a planned and an actual primary completion date are both recorded.
|
|
89
|
+
attr_accessor :has_completion_delta
|
|
90
|
+
|
|
91
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
92
|
+
def self.attribute_map
|
|
93
|
+
{
|
|
94
|
+
:'trial_id' => :'trial_id',
|
|
95
|
+
:'lead_sponsor_name' => :'lead_sponsor_name',
|
|
96
|
+
:'overall_status_summary' => :'overall_status_summary',
|
|
97
|
+
:'study_type' => :'study_type',
|
|
98
|
+
:'phase' => :'phase',
|
|
99
|
+
:'planned_enrollment' => :'planned_enrollment',
|
|
100
|
+
:'actual_enrollment' => :'actual_enrollment',
|
|
101
|
+
:'enrollment_type' => :'enrollment_type',
|
|
102
|
+
:'enrollment_delta' => :'enrollment_delta',
|
|
103
|
+
:'enrollment_attainment_pct' => :'enrollment_attainment_pct',
|
|
104
|
+
:'enrollment_met' => :'enrollment_met',
|
|
105
|
+
:'has_enrollment_delta' => :'has_enrollment_delta',
|
|
106
|
+
:'planned_basis' => :'planned_basis',
|
|
107
|
+
:'actual_basis' => :'actual_basis',
|
|
108
|
+
:'planned_primary_completion_date' => :'planned_primary_completion_date',
|
|
109
|
+
:'actual_primary_completion_date' => :'actual_primary_completion_date',
|
|
110
|
+
:'planned_completion_date' => :'planned_completion_date',
|
|
111
|
+
:'actual_completion_date' => :'actual_completion_date',
|
|
112
|
+
:'primary_completion_date_type' => :'primary_completion_date_type',
|
|
113
|
+
:'completion_date_type' => :'completion_date_type',
|
|
114
|
+
:'primary_completion_slip_days' => :'primary_completion_slip_days',
|
|
115
|
+
:'completion_slip_days' => :'completion_slip_days',
|
|
116
|
+
:'completion_slipped' => :'completion_slipped',
|
|
117
|
+
:'has_completion_delta' => :'has_completion_delta'
|
|
118
|
+
}
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
# Returns attribute mapping this model knows about
|
|
122
|
+
def self.acceptable_attribute_map
|
|
123
|
+
attribute_map
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
# Returns all the JSON keys this model knows about
|
|
127
|
+
def self.acceptable_attributes
|
|
128
|
+
acceptable_attribute_map.values
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
# Attribute type mapping.
|
|
132
|
+
def self.openapi_types
|
|
133
|
+
{
|
|
134
|
+
:'trial_id' => :'String',
|
|
135
|
+
:'lead_sponsor_name' => :'String',
|
|
136
|
+
:'overall_status_summary' => :'String',
|
|
137
|
+
:'study_type' => :'String',
|
|
138
|
+
:'phase' => :'String',
|
|
139
|
+
:'planned_enrollment' => :'Integer',
|
|
140
|
+
:'actual_enrollment' => :'Integer',
|
|
141
|
+
:'enrollment_type' => :'String',
|
|
142
|
+
:'enrollment_delta' => :'Integer',
|
|
143
|
+
:'enrollment_attainment_pct' => :'Float',
|
|
144
|
+
:'enrollment_met' => :'Boolean',
|
|
145
|
+
:'has_enrollment_delta' => :'Boolean',
|
|
146
|
+
:'planned_basis' => :'String',
|
|
147
|
+
:'actual_basis' => :'String',
|
|
148
|
+
:'planned_primary_completion_date' => :'Date',
|
|
149
|
+
:'actual_primary_completion_date' => :'Date',
|
|
150
|
+
:'planned_completion_date' => :'Date',
|
|
151
|
+
:'actual_completion_date' => :'Date',
|
|
152
|
+
:'primary_completion_date_type' => :'String',
|
|
153
|
+
:'completion_date_type' => :'String',
|
|
154
|
+
:'primary_completion_slip_days' => :'Integer',
|
|
155
|
+
:'completion_slip_days' => :'Integer',
|
|
156
|
+
:'completion_slipped' => :'Boolean',
|
|
157
|
+
:'has_completion_delta' => :'Boolean'
|
|
158
|
+
}
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# List of attributes with nullable: true
|
|
162
|
+
def self.openapi_nullable
|
|
163
|
+
Set.new([
|
|
164
|
+
:'trial_id',
|
|
165
|
+
:'lead_sponsor_name',
|
|
166
|
+
:'overall_status_summary',
|
|
167
|
+
:'study_type',
|
|
168
|
+
:'phase',
|
|
169
|
+
:'planned_enrollment',
|
|
170
|
+
:'actual_enrollment',
|
|
171
|
+
:'enrollment_type',
|
|
172
|
+
:'enrollment_delta',
|
|
173
|
+
:'enrollment_attainment_pct',
|
|
174
|
+
:'enrollment_met',
|
|
175
|
+
:'has_enrollment_delta',
|
|
176
|
+
:'planned_basis',
|
|
177
|
+
:'actual_basis',
|
|
178
|
+
:'planned_primary_completion_date',
|
|
179
|
+
:'actual_primary_completion_date',
|
|
180
|
+
:'planned_completion_date',
|
|
181
|
+
:'actual_completion_date',
|
|
182
|
+
:'primary_completion_date_type',
|
|
183
|
+
:'completion_date_type',
|
|
184
|
+
:'primary_completion_slip_days',
|
|
185
|
+
:'completion_slip_days',
|
|
186
|
+
:'completion_slipped',
|
|
187
|
+
:'has_completion_delta'
|
|
188
|
+
])
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Initializes the object
|
|
192
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
193
|
+
def initialize(attributes = {})
|
|
194
|
+
if (!attributes.is_a?(Hash))
|
|
195
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::TrialDeliveryRow` initialize method"
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
199
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
200
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
201
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
202
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::TrialDeliveryRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
203
|
+
end
|
|
204
|
+
h[k.to_sym] = v
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
if attributes.key?(:'trial_id')
|
|
208
|
+
self.trial_id = attributes[:'trial_id']
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
if attributes.key?(:'lead_sponsor_name')
|
|
212
|
+
self.lead_sponsor_name = attributes[:'lead_sponsor_name']
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
if attributes.key?(:'overall_status_summary')
|
|
216
|
+
self.overall_status_summary = attributes[:'overall_status_summary']
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'study_type')
|
|
220
|
+
self.study_type = attributes[:'study_type']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'phase')
|
|
224
|
+
self.phase = attributes[:'phase']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'planned_enrollment')
|
|
228
|
+
self.planned_enrollment = attributes[:'planned_enrollment']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'actual_enrollment')
|
|
232
|
+
self.actual_enrollment = attributes[:'actual_enrollment']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'enrollment_type')
|
|
236
|
+
self.enrollment_type = attributes[:'enrollment_type']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'enrollment_delta')
|
|
240
|
+
self.enrollment_delta = attributes[:'enrollment_delta']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'enrollment_attainment_pct')
|
|
244
|
+
self.enrollment_attainment_pct = attributes[:'enrollment_attainment_pct']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'enrollment_met')
|
|
248
|
+
self.enrollment_met = attributes[:'enrollment_met']
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
if attributes.key?(:'has_enrollment_delta')
|
|
252
|
+
self.has_enrollment_delta = attributes[:'has_enrollment_delta']
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
if attributes.key?(:'planned_basis')
|
|
256
|
+
self.planned_basis = attributes[:'planned_basis']
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
if attributes.key?(:'actual_basis')
|
|
260
|
+
self.actual_basis = attributes[:'actual_basis']
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
if attributes.key?(:'planned_primary_completion_date')
|
|
264
|
+
self.planned_primary_completion_date = attributes[:'planned_primary_completion_date']
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'actual_primary_completion_date')
|
|
268
|
+
self.actual_primary_completion_date = attributes[:'actual_primary_completion_date']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'planned_completion_date')
|
|
272
|
+
self.planned_completion_date = attributes[:'planned_completion_date']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'actual_completion_date')
|
|
276
|
+
self.actual_completion_date = attributes[:'actual_completion_date']
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'primary_completion_date_type')
|
|
280
|
+
self.primary_completion_date_type = attributes[:'primary_completion_date_type']
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if attributes.key?(:'completion_date_type')
|
|
284
|
+
self.completion_date_type = attributes[:'completion_date_type']
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
if attributes.key?(:'primary_completion_slip_days')
|
|
288
|
+
self.primary_completion_slip_days = attributes[:'primary_completion_slip_days']
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'completion_slip_days')
|
|
292
|
+
self.completion_slip_days = attributes[:'completion_slip_days']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if attributes.key?(:'completion_slipped')
|
|
296
|
+
self.completion_slipped = attributes[:'completion_slipped']
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if attributes.key?(:'has_completion_delta')
|
|
300
|
+
self.has_completion_delta = attributes[:'has_completion_delta']
|
|
301
|
+
end
|
|
302
|
+
end
|
|
303
|
+
|
|
304
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
305
|
+
# @return Array for valid properties with the reasons
|
|
306
|
+
def list_invalid_properties
|
|
307
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
308
|
+
invalid_properties = Array.new
|
|
309
|
+
invalid_properties
|
|
310
|
+
end
|
|
311
|
+
|
|
312
|
+
# Check to see if the all the properties in the model are valid
|
|
313
|
+
# @return true if the model is valid
|
|
314
|
+
def valid?
|
|
315
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
316
|
+
true
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Checks equality by comparing each attribute.
|
|
320
|
+
# @param [Object] Object to be compared
|
|
321
|
+
def ==(o)
|
|
322
|
+
return true if self.equal?(o)
|
|
323
|
+
self.class == o.class &&
|
|
324
|
+
trial_id == o.trial_id &&
|
|
325
|
+
lead_sponsor_name == o.lead_sponsor_name &&
|
|
326
|
+
overall_status_summary == o.overall_status_summary &&
|
|
327
|
+
study_type == o.study_type &&
|
|
328
|
+
phase == o.phase &&
|
|
329
|
+
planned_enrollment == o.planned_enrollment &&
|
|
330
|
+
actual_enrollment == o.actual_enrollment &&
|
|
331
|
+
enrollment_type == o.enrollment_type &&
|
|
332
|
+
enrollment_delta == o.enrollment_delta &&
|
|
333
|
+
enrollment_attainment_pct == o.enrollment_attainment_pct &&
|
|
334
|
+
enrollment_met == o.enrollment_met &&
|
|
335
|
+
has_enrollment_delta == o.has_enrollment_delta &&
|
|
336
|
+
planned_basis == o.planned_basis &&
|
|
337
|
+
actual_basis == o.actual_basis &&
|
|
338
|
+
planned_primary_completion_date == o.planned_primary_completion_date &&
|
|
339
|
+
actual_primary_completion_date == o.actual_primary_completion_date &&
|
|
340
|
+
planned_completion_date == o.planned_completion_date &&
|
|
341
|
+
actual_completion_date == o.actual_completion_date &&
|
|
342
|
+
primary_completion_date_type == o.primary_completion_date_type &&
|
|
343
|
+
completion_date_type == o.completion_date_type &&
|
|
344
|
+
primary_completion_slip_days == o.primary_completion_slip_days &&
|
|
345
|
+
completion_slip_days == o.completion_slip_days &&
|
|
346
|
+
completion_slipped == o.completion_slipped &&
|
|
347
|
+
has_completion_delta == o.has_completion_delta
|
|
348
|
+
end
|
|
349
|
+
|
|
350
|
+
# @see the `==` method
|
|
351
|
+
# @param [Object] Object to be compared
|
|
352
|
+
def eql?(o)
|
|
353
|
+
self == o
|
|
354
|
+
end
|
|
355
|
+
|
|
356
|
+
# Calculates hash code according to all attributes.
|
|
357
|
+
# @return [Integer] Hash code
|
|
358
|
+
def hash
|
|
359
|
+
[trial_id, lead_sponsor_name, overall_status_summary, study_type, phase, planned_enrollment, actual_enrollment, enrollment_type, enrollment_delta, enrollment_attainment_pct, enrollment_met, has_enrollment_delta, planned_basis, actual_basis, planned_primary_completion_date, actual_primary_completion_date, planned_completion_date, actual_completion_date, primary_completion_date_type, completion_date_type, primary_completion_slip_days, completion_slip_days, completion_slipped, has_completion_delta].hash
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
# Builds the object from hash
|
|
363
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
364
|
+
# @return [Object] Returns the model itself
|
|
365
|
+
def self.build_from_hash(attributes)
|
|
366
|
+
return nil unless attributes.is_a?(Hash)
|
|
367
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
368
|
+
transformed_hash = {}
|
|
369
|
+
openapi_types.each_pair do |key, type|
|
|
370
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
371
|
+
transformed_hash["#{key}"] = nil
|
|
372
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
373
|
+
# check to ensure the input is an array given that the attribute
|
|
374
|
+
# is documented as an array but the input is not
|
|
375
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
376
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
377
|
+
end
|
|
378
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
379
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
380
|
+
end
|
|
381
|
+
end
|
|
382
|
+
new(transformed_hash)
|
|
383
|
+
end
|
|
384
|
+
|
|
385
|
+
# Deserializes the data based on type
|
|
386
|
+
# @param string type Data type
|
|
387
|
+
# @param string value Value to be deserialized
|
|
388
|
+
# @return [Object] Deserialized data
|
|
389
|
+
def self._deserialize(type, value)
|
|
390
|
+
case type.to_sym
|
|
391
|
+
when :Time
|
|
392
|
+
Time.parse(value)
|
|
393
|
+
when :Date
|
|
394
|
+
Date.parse(value)
|
|
395
|
+
when :String
|
|
396
|
+
value.to_s
|
|
397
|
+
when :Integer
|
|
398
|
+
value.to_i
|
|
399
|
+
when :Float
|
|
400
|
+
value.to_f
|
|
401
|
+
when :Boolean
|
|
402
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
403
|
+
true
|
|
404
|
+
else
|
|
405
|
+
false
|
|
406
|
+
end
|
|
407
|
+
when :Object
|
|
408
|
+
# generic object (usually a Hash), return directly
|
|
409
|
+
value
|
|
410
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
411
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
412
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
413
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
414
|
+
k_type = Regexp.last_match[:k_type]
|
|
415
|
+
v_type = Regexp.last_match[:v_type]
|
|
416
|
+
{}.tap do |hash|
|
|
417
|
+
value.each do |k, v|
|
|
418
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
419
|
+
end
|
|
420
|
+
end
|
|
421
|
+
else # model
|
|
422
|
+
# models (e.g. Pet) or oneOf
|
|
423
|
+
klass = PharmaObservatory.const_get(type)
|
|
424
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
425
|
+
end
|
|
426
|
+
end
|
|
427
|
+
|
|
428
|
+
# Returns the string representation of the object
|
|
429
|
+
# @return [String] String presentation of the object
|
|
430
|
+
def to_s
|
|
431
|
+
to_hash.to_s
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
435
|
+
# @return [Hash] Returns the object in the form of hash
|
|
436
|
+
def to_body
|
|
437
|
+
to_hash
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
# Returns the object in the form of hash
|
|
441
|
+
# @return [Hash] Returns the object in the form of hash
|
|
442
|
+
def to_hash
|
|
443
|
+
hash = {}
|
|
444
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
445
|
+
value = self.send(attr)
|
|
446
|
+
if value.nil?
|
|
447
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
448
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
449
|
+
end
|
|
450
|
+
|
|
451
|
+
hash[param] = _to_hash(value)
|
|
452
|
+
end
|
|
453
|
+
hash
|
|
454
|
+
end
|
|
455
|
+
|
|
456
|
+
# Outputs non-array value in the form of hash
|
|
457
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
458
|
+
# @param [Object] value Any valid value
|
|
459
|
+
# @return [Hash] Returns the value in the form of hash
|
|
460
|
+
def _to_hash(value)
|
|
461
|
+
if value.is_a?(Array)
|
|
462
|
+
value.compact.map { |v| _to_hash(v) }
|
|
463
|
+
elsif value.is_a?(Hash)
|
|
464
|
+
{}.tap do |hash|
|
|
465
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
466
|
+
end
|
|
467
|
+
elsif value.respond_to? :to_hash
|
|
468
|
+
value.to_hash
|
|
469
|
+
else
|
|
470
|
+
value
|
|
471
|
+
end
|
|
472
|
+
end
|
|
473
|
+
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
end
|