pharmaobservatory 0.1.6 → 0.1.7
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 +269 -4
- data/docs/BrandCompaniesResponse.md +58 -0
- data/docs/BrandCompaniesRow.md +50 -0
- data/docs/BrandRevenueResponse.md +58 -0
- data/docs/BrandRevenueRow.md +60 -0
- data/docs/CatalystsResponse.md +58 -0
- data/docs/CatalystsRow.md +90 -0
- data/docs/CliaCertificatesResponse.md +58 -0
- data/docs/CliaCertificatesRow.md +80 -0
- data/docs/CompaniesApi.md +1675 -117
- data/docs/CompaniesRecordAttributes.md +3 -1
- data/docs/CompanyFundingEventsRow.md +2 -0
- data/docs/CompanyTrialGeographyResponse.md +58 -0
- data/docs/CompanyTrialGeographyRow.md +52 -0
- data/docs/CompanyTrialSitesResponse.md +58 -0
- data/docs/CompanyTrialSitesRow.md +52 -0
- data/docs/ConditionsApi.md +320 -0
- data/docs/CroFootprintResponse.md +58 -0
- data/docs/CroFootprintRow.md +34 -0
- data/docs/CroTrialsResponse.md +58 -0
- data/docs/CroTrialsRow.md +46 -0
- data/docs/DebarmentsResponse.md +58 -0
- data/docs/DebarmentsRow.md +44 -0
- data/docs/DrugApprovalsResponse.md +58 -0
- data/docs/DrugApprovalsRow.md +28 -0
- data/docs/DrugAspCodesResponse.md +58 -0
- data/docs/DrugAspCodesRow.md +28 -0
- data/docs/DrugBrandsResponse.md +58 -0
- data/docs/DrugBrandsRow.md +60 -0
- data/docs/DrugCombinationsResponse.md +58 -0
- data/docs/DrugCombinationsRow.md +32 -0
- data/docs/DrugDeclaredPatentsResponse.md +58 -0
- data/docs/DrugDeclaredPatentsRow.md +58 -0
- data/docs/DrugLabelSafetyResponse.md +58 -0
- data/docs/DrugLabelSafetyRow.md +32 -0
- data/docs/DrugMedicareSpendResponse.md +58 -0
- data/docs/DrugMedicareSpendRow.md +28 -0
- data/docs/DrugPatentCliffRow.md +3 -1
- data/docs/DrugPatentMentionsResponse.md +58 -0
- data/docs/DrugPatentMentionsRow.md +28 -0
- data/docs/DrugPatentOwnersResponse.md +58 -0
- data/docs/DrugPatentOwnersRow.md +42 -0
- data/docs/DrugPricingResponse.md +58 -0
- data/docs/DrugPricingRow.md +32 -0
- data/docs/DrugRecallsResponse.md +58 -0
- data/docs/DrugRecallsRow.md +34 -0
- data/docs/DrugRegulatoryResponse.md +58 -0
- data/docs/DrugRegulatoryRow.md +38 -0
- data/docs/DrugSitesResponse.md +58 -0
- data/docs/DrugSitesRow.md +28 -0
- data/docs/DrugTargetsResponse.md +58 -0
- data/docs/DrugTargetsRow.md +36 -0
- data/docs/DrugTrialConditionsResponse.md +58 -0
- data/docs/DrugTrialConditionsRow.md +30 -0
- data/docs/DrugTrialsResponse.md +58 -0
- data/docs/DrugTrialsRow.md +58 -0
- data/docs/DrugVariantsResponse.md +58 -0
- data/docs/DrugVariantsRow.md +38 -0
- data/docs/DrugsApi.md +2153 -0
- data/docs/DrugsRecord.md +38 -0
- data/docs/DrugsRecordAttributes.md +20 -0
- data/docs/DrugsResponse.md +58 -0
- data/docs/DrugsRow.md +82 -0
- data/docs/EnforcementEventsResponse.md +58 -0
- data/docs/EnforcementEventsRow.md +64 -0
- data/docs/GxpFacilitiesResponse.md +58 -0
- data/docs/GxpFacilitiesRow.md +152 -0
- data/docs/HospitalBedsYearlyResponse.md +58 -0
- data/docs/HospitalBedsYearlyRow.md +28 -0
- data/docs/HospitalFacilityChangesResponse.md +58 -0
- data/docs/HospitalFacilityChangesRow.md +30 -0
- data/docs/HospitalsApi.md +393 -0
- data/docs/HospitalsRecord.md +38 -0
- data/docs/HospitalsResponse.md +58 -0
- data/docs/HospitalsRow.md +40 -0
- data/docs/ImportRefusalsResponse.md +58 -0
- data/docs/ImportRefusalsRow.md +60 -0
- data/docs/InspectionFindingsResponse.md +58 -0
- data/docs/InspectionFindingsRow.md +48 -0
- data/docs/InspectionsResponse.md +58 -0
- data/docs/InspectionsRow.md +60 -0
- data/docs/InstitutionalQuarterTotalsResponse.md +58 -0
- data/docs/InstitutionalQuarterTotalsRow.md +58 -0
- data/docs/LegalEntitiesApi.md +1379 -179
- data/docs/LegalEntitiesRecordAttributes.md +2 -0
- data/docs/OrgRelationshipsRow.md +1 -1
- data/docs/OwnershipPercentagesResponse.md +58 -0
- data/docs/OwnershipPercentagesRow.md +74 -0
- data/docs/PdufaDatesRow.md +1 -1
- data/docs/ProgramLicensingCandidatesResponse.md +58 -0
- data/docs/ProgramLicensingCandidatesRow.md +58 -0
- data/docs/ProgramsResponse.md +58 -0
- data/docs/ProgramsRow.md +46 -0
- data/docs/RareDiseaseGenesResponse.md +58 -0
- data/docs/RareDiseaseGenesRow.md +50 -0
- data/docs/RareDiseaseHierarchyResponse.md +58 -0
- data/docs/RareDiseaseHierarchyRow.md +40 -0
- data/docs/RareDiseaseInvestigatorCoverageResponse.md +58 -0
- data/docs/RareDiseaseInvestigatorCoverageRow.md +38 -0
- data/docs/RareDiseaseInvestigatorsResponse.md +58 -0
- data/docs/RareDiseaseInvestigatorsRow.md +56 -0
- data/docs/RareDiseaseMappingsResponse.md +58 -0
- data/docs/RareDiseaseMappingsRow.md +44 -0
- data/docs/RareDiseaseOrganizationsResponse.md +58 -0
- data/docs/RareDiseaseOrganizationsRow.md +60 -0
- data/docs/RareDiseasePrevalenceResponse.md +58 -0
- data/docs/RareDiseasePrevalenceRow.md +62 -0
- data/docs/RareDiseaseRarityEvidenceResponse.md +58 -0
- data/docs/RareDiseaseRarityEvidenceRow.md +36 -0
- data/docs/RareDiseaseRarityResponse.md +58 -0
- data/docs/RareDiseaseRarityRow.md +54 -0
- data/docs/RareDiseaseReplacementsResponse.md +58 -0
- data/docs/RareDiseaseReplacementsRow.md +40 -0
- data/docs/RareDiseaseSiteCoverageResponse.md +58 -0
- data/docs/RareDiseaseSiteCoverageRow.md +54 -0
- data/docs/RareDiseaseSponsorsResponse.md +58 -0
- data/docs/RareDiseaseSponsorsRow.md +82 -0
- data/docs/RareDiseaseTrialCoverageResponse.md +58 -0
- data/docs/RareDiseaseTrialCoverageRow.md +58 -0
- data/docs/RareDiseaseTrialSitesResponse.md +58 -0
- data/docs/RareDiseaseTrialSitesRow.md +52 -0
- data/docs/RareDiseaseTrialsResponse.md +58 -0
- data/docs/RareDiseaseTrialsRow.md +90 -0
- data/docs/RareDiseasesApi.md +1353 -0
- data/docs/RareDiseasesRecord.md +38 -0
- data/docs/RareDiseasesRecordAttributes.md +22 -0
- data/docs/RareDiseasesResponse.md +58 -0
- data/docs/RareDiseasesRow.md +68 -0
- data/docs/RecallsResponse.md +58 -0
- data/docs/RecallsRow.md +54 -0
- data/docs/RwdCoverageResponse.md +58 -0
- data/docs/RwdCoverageRow.md +52 -0
- data/docs/RwdRegisterProvenanceResponse.md +58 -0
- data/docs/RwdRegisterProvenanceRow.md +74 -0
- data/docs/RwdRegistersApi.md +313 -0
- data/docs/RwdRegistersRecord.md +38 -0
- data/docs/RwdSourceAgeBandsResponse.md +58 -0
- data/docs/RwdSourceAgeBandsRow.md +40 -0
- data/docs/RwdSourceConditionsResponse.md +58 -0
- data/docs/RwdSourceConditionsRow.md +68 -0
- data/docs/RwdSourceEtlMappingsResponse.md +58 -0
- data/docs/RwdSourceEtlMappingsRow.md +44 -0
- data/docs/RwdSourceLinkagesResponse.md +58 -0
- data/docs/RwdSourceLinkagesRow.md +64 -0
- data/docs/RwdSourceTypesResponse.md +58 -0
- data/docs/RwdSourceTypesRow.md +34 -0
- data/docs/RwdSourceVocabulariesResponse.md +58 -0
- data/docs/RwdSourceVocabulariesRow.md +42 -0
- data/docs/RwdSourcesApi.md +713 -0
- data/docs/RwdSourcesRecord.md +38 -0
- data/docs/RwdSourcesResponse.md +58 -0
- data/docs/RwdSourcesRow.md +280 -0
- data/docs/RwdStudiesApi.md +473 -0
- data/docs/RwdStudiesRecord.md +38 -0
- data/docs/RwdStudiesResponse.md +58 -0
- data/docs/RwdStudiesRow.md +180 -0
- data/docs/RwdStudyConditionsResponse.md +58 -0
- data/docs/RwdStudyConditionsRow.md +54 -0
- data/docs/RwdStudyDataSourcesResponse.md +58 -0
- data/docs/RwdStudyDataSourcesRow.md +54 -0
- data/docs/RwdStudyDrugsResponse.md +58 -0
- data/docs/RwdStudyDrugsRow.md +50 -0
- data/docs/RwdStudyMilestonesResponse.md +58 -0
- data/docs/RwdStudyMilestonesRow.md +54 -0
- data/docs/RwdWithheldFieldsResponse.md +58 -0
- data/docs/RwdWithheldFieldsRow.md +36 -0
- data/docs/SecPdufaDatesResponse.md +58 -0
- data/docs/SecPdufaDatesRow.md +64 -0
- data/docs/TrialChangesRow.md +5 -1
- data/docs/TrialsApi.md +80 -0
- data/docs/TrialsRow.md +9 -1
- data/docs/UnmatchedProductRevenueResponse.md +58 -0
- data/docs/UnmatchedProductRevenueRow.md +80 -0
- data/docs/UntitledLettersResponse.md +58 -0
- data/docs/UntitledLettersRow.md +44 -0
- data/docs/WarningLettersResponse.md +58 -0
- data/docs/WarningLettersRow.md +50 -0
- data/lib/pharmaobservatory/api/companies_api.rb +1936 -207
- data/lib/pharmaobservatory/api/conditions_api.rb +336 -0
- data/lib/pharmaobservatory/api/drugs_api.rb +2261 -0
- data/lib/pharmaobservatory/api/hospitals_api.rb +413 -0
- data/lib/pharmaobservatory/api/legal_entities_api.rb +1442 -182
- data/lib/pharmaobservatory/api/rare_diseases_api.rb +1421 -0
- data/lib/pharmaobservatory/api/rwd_registers_api.rb +329 -0
- data/lib/pharmaobservatory/api/rwd_sources_api.rb +749 -0
- data/lib/pharmaobservatory/api/rwd_studies_api.rb +497 -0
- data/lib/pharmaobservatory/api/trials_api.rb +84 -0
- data/lib/pharmaobservatory/models/brand_companies_response.rb +478 -0
- data/lib/pharmaobservatory/models/brand_companies_row.rb +401 -0
- data/lib/pharmaobservatory/models/brand_revenue_response.rb +478 -0
- data/lib/pharmaobservatory/models/brand_revenue_row.rb +454 -0
- data/lib/pharmaobservatory/models/catalysts_response.rb +478 -0
- data/lib/pharmaobservatory/models/catalysts_row.rb +623 -0
- data/lib/pharmaobservatory/models/clia_certificates_response.rb +478 -0
- data/lib/pharmaobservatory/models/clia_certificates_row.rb +568 -0
- data/lib/pharmaobservatory/models/companies_record_attributes.rb +13 -4
- data/lib/pharmaobservatory/models/company_funding_events_row.rb +12 -1
- data/lib/pharmaobservatory/models/company_trial_geography_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_trial_geography_row.rb +410 -0
- data/lib/pharmaobservatory/models/company_trial_sites_response.rb +478 -0
- data/lib/pharmaobservatory/models/company_trial_sites_row.rb +410 -0
- data/lib/pharmaobservatory/models/cro_footprint_response.rb +478 -0
- data/lib/pharmaobservatory/models/cro_footprint_row.rb +311 -0
- data/lib/pharmaobservatory/models/cro_trials_response.rb +478 -0
- data/lib/pharmaobservatory/models/cro_trials_row.rb +381 -0
- data/lib/pharmaobservatory/models/debarments_response.rb +478 -0
- data/lib/pharmaobservatory/models/debarments_row.rb +366 -0
- data/lib/pharmaobservatory/models/drug_approvals_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_approvals_row.rb +278 -0
- data/lib/pharmaobservatory/models/drug_asp_codes_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_asp_codes_row.rb +278 -0
- data/lib/pharmaobservatory/models/drug_brands_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_brands_row.rb +454 -0
- data/lib/pharmaobservatory/models/drug_combinations_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_combinations_row.rb +300 -0
- data/lib/pharmaobservatory/models/drug_declared_patents_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_declared_patents_row.rb +447 -0
- data/lib/pharmaobservatory/models/drug_label_safety_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_label_safety_row.rb +300 -0
- data/lib/pharmaobservatory/models/drug_medicare_spend_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_medicare_spend_row.rb +280 -0
- data/lib/pharmaobservatory/models/drug_patent_cliff_row.rb +13 -2
- data/lib/pharmaobservatory/models/drug_patent_mentions_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_patent_mentions_row.rb +278 -0
- data/lib/pharmaobservatory/models/drug_patent_owners_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_patent_owners_row.rb +357 -0
- data/lib/pharmaobservatory/models/drug_pricing_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_pricing_row.rb +300 -0
- data/lib/pharmaobservatory/models/drug_recalls_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_recalls_row.rb +311 -0
- data/lib/pharmaobservatory/models/drug_regulatory_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_regulatory_row.rb +333 -0
- data/lib/pharmaobservatory/models/drug_sites_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_sites_row.rb +278 -0
- data/lib/pharmaobservatory/models/drug_targets_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_targets_row.rb +324 -0
- data/lib/pharmaobservatory/models/drug_trial_conditions_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_trial_conditions_row.rb +289 -0
- data/lib/pharmaobservatory/models/drug_trials_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_trials_row.rb +445 -0
- data/lib/pharmaobservatory/models/drug_variants_response.rb +478 -0
- data/lib/pharmaobservatory/models/drug_variants_row.rb +333 -0
- data/lib/pharmaobservatory/models/drugs_record.rb +385 -0
- data/lib/pharmaobservatory/models/drugs_record_attributes.rb +229 -0
- data/lib/pharmaobservatory/models/drugs_response.rb +478 -0
- data/lib/pharmaobservatory/models/drugs_row.rb +581 -0
- data/lib/pharmaobservatory/models/enforcement_events_response.rb +478 -0
- data/lib/pharmaobservatory/models/enforcement_events_row.rb +476 -0
- data/lib/pharmaobservatory/models/gxp_facilities_response.rb +478 -0
- data/lib/pharmaobservatory/models/gxp_facilities_row.rb +968 -0
- data/lib/pharmaobservatory/models/hospital_beds_yearly_response.rb +478 -0
- data/lib/pharmaobservatory/models/hospital_beds_yearly_row.rb +278 -0
- data/lib/pharmaobservatory/models/hospital_facility_changes_response.rb +478 -0
- data/lib/pharmaobservatory/models/hospital_facility_changes_row.rb +289 -0
- data/lib/pharmaobservatory/models/hospitals_record.rb +385 -0
- data/lib/pharmaobservatory/models/hospitals_response.rb +478 -0
- data/lib/pharmaobservatory/models/hospitals_row.rb +344 -0
- data/lib/pharmaobservatory/models/import_refusals_response.rb +478 -0
- data/lib/pharmaobservatory/models/import_refusals_row.rb +454 -0
- data/lib/pharmaobservatory/models/inspection_findings_response.rb +478 -0
- data/lib/pharmaobservatory/models/inspection_findings_row.rb +388 -0
- data/lib/pharmaobservatory/models/inspections_response.rb +478 -0
- data/lib/pharmaobservatory/models/inspections_row.rb +454 -0
- data/lib/pharmaobservatory/models/institutional_quarter_totals_response.rb +478 -0
- data/lib/pharmaobservatory/models/institutional_quarter_totals_row.rb +443 -0
- data/lib/pharmaobservatory/models/legal_entities_record_attributes.rb +10 -1
- data/lib/pharmaobservatory/models/org_relationships_row.rb +1 -1
- data/lib/pharmaobservatory/models/ownership_percentages_response.rb +478 -0
- data/lib/pharmaobservatory/models/ownership_percentages_row.rb +531 -0
- data/lib/pharmaobservatory/models/pdufa_dates_row.rb +1 -1
- data/lib/pharmaobservatory/models/program_licensing_candidates_response.rb +478 -0
- data/lib/pharmaobservatory/models/program_licensing_candidates_row.rb +445 -0
- data/lib/pharmaobservatory/models/programs_response.rb +478 -0
- data/lib/pharmaobservatory/models/programs_row.rb +377 -0
- data/lib/pharmaobservatory/models/rare_disease_genes_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_genes_row.rb +399 -0
- data/lib/pharmaobservatory/models/rare_disease_hierarchy_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_hierarchy_row.rb +344 -0
- data/lib/pharmaobservatory/models/rare_disease_investigator_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_investigator_coverage_row.rb +333 -0
- data/lib/pharmaobservatory/models/rare_disease_investigators_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_investigators_row.rb +436 -0
- data/lib/pharmaobservatory/models/rare_disease_mappings_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_mappings_row.rb +366 -0
- data/lib/pharmaobservatory/models/rare_disease_organizations_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_organizations_row.rb +454 -0
- data/lib/pharmaobservatory/models/rare_disease_prevalence_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_prevalence_row.rb +465 -0
- data/lib/pharmaobservatory/models/rare_disease_rarity_evidence_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_rarity_evidence_row.rb +322 -0
- data/lib/pharmaobservatory/models/rare_disease_rarity_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_rarity_row.rb +421 -0
- data/lib/pharmaobservatory/models/rare_disease_replacements_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_replacements_row.rb +344 -0
- data/lib/pharmaobservatory/models/rare_disease_site_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_site_coverage_row.rb +421 -0
- data/lib/pharmaobservatory/models/rare_disease_sponsors_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_sponsors_row.rb +575 -0
- data/lib/pharmaobservatory/models/rare_disease_trial_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_trial_coverage_row.rb +449 -0
- data/lib/pharmaobservatory/models/rare_disease_trial_sites_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_trial_sites_row.rb +412 -0
- data/lib/pharmaobservatory/models/rare_disease_trials_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_disease_trials_row.rb +623 -0
- data/lib/pharmaobservatory/models/rare_diseases_record.rb +385 -0
- data/lib/pharmaobservatory/models/rare_diseases_record_attributes.rb +238 -0
- data/lib/pharmaobservatory/models/rare_diseases_response.rb +478 -0
- data/lib/pharmaobservatory/models/rare_diseases_row.rb +500 -0
- data/lib/pharmaobservatory/models/recalls_response.rb +478 -0
- data/lib/pharmaobservatory/models/recalls_row.rb +421 -0
- data/lib/pharmaobservatory/models/rwd_coverage_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_coverage_row.rb +410 -0
- data/lib/pharmaobservatory/models/rwd_register_provenance_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_register_provenance_row.rb +531 -0
- data/lib/pharmaobservatory/models/rwd_registers_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_source_age_bands_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_age_bands_row.rb +344 -0
- data/lib/pharmaobservatory/models/rwd_source_conditions_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_conditions_row.rb +502 -0
- data/lib/pharmaobservatory/models/rwd_source_etl_mappings_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_etl_mappings_row.rb +366 -0
- data/lib/pharmaobservatory/models/rwd_source_linkages_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_linkages_row.rb +476 -0
- data/lib/pharmaobservatory/models/rwd_source_types_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_types_row.rb +311 -0
- data/lib/pharmaobservatory/models/rwd_source_vocabularies_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_source_vocabularies_row.rb +355 -0
- data/lib/pharmaobservatory/models/rwd_sources_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_sources_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_sources_row.rb +1674 -0
- data/lib/pharmaobservatory/models/rwd_studies_record.rb +385 -0
- data/lib/pharmaobservatory/models/rwd_studies_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_studies_row.rb +1138 -0
- data/lib/pharmaobservatory/models/rwd_study_conditions_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_study_conditions_row.rb +421 -0
- data/lib/pharmaobservatory/models/rwd_study_data_sources_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_study_data_sources_row.rb +423 -0
- data/lib/pharmaobservatory/models/rwd_study_drugs_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_study_drugs_row.rb +401 -0
- data/lib/pharmaobservatory/models/rwd_study_milestones_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_study_milestones_row.rb +421 -0
- data/lib/pharmaobservatory/models/rwd_withheld_fields_response.rb +478 -0
- data/lib/pharmaobservatory/models/rwd_withheld_fields_row.rb +322 -0
- data/lib/pharmaobservatory/models/sec_pdufa_dates_response.rb +478 -0
- data/lib/pharmaobservatory/models/sec_pdufa_dates_row.rb +476 -0
- data/lib/pharmaobservatory/models/trial_changes_row.rb +24 -2
- data/lib/pharmaobservatory/models/trials_row.rb +47 -3
- data/lib/pharmaobservatory/models/unmatched_product_revenue_response.rb +478 -0
- data/lib/pharmaobservatory/models/unmatched_product_revenue_row.rb +564 -0
- data/lib/pharmaobservatory/models/untitled_letters_response.rb +478 -0
- data/lib/pharmaobservatory/models/untitled_letters_row.rb +366 -0
- data/lib/pharmaobservatory/models/warning_letters_response.rb +478 -0
- data/lib/pharmaobservatory/models/warning_letters_row.rb +399 -0
- data/lib/pharmaobservatory/version.rb +1 -1
- data/lib/pharmaobservatory.rb +164 -0
- metadata +330 -2
|
@@ -0,0 +1,502 @@
|
|
|
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_source_conditions dataset: one row per registered data source and MeSH condition that a registered study linked. A grouped request returns the group columns and the measures instead, as additional properties.
|
|
18
|
+
class RwdSourceConditionsRow
|
|
19
|
+
# The register Data source ID. The entry key of the rwd_sources object type. On a row built from a study's data source name it is null unless the name reaches exactly one registered source (see data_source_ids).
|
|
20
|
+
attr_accessor :data_source_id
|
|
21
|
+
|
|
22
|
+
# The normalised name key the study register is joined to the data source on (the study register carries no data source id).
|
|
23
|
+
attr_accessor :data_source_name_key
|
|
24
|
+
|
|
25
|
+
# The condition's MeSH descriptor id (D followed by six to nine digits), the id of the conditions object type.
|
|
26
|
+
attr_accessor :condition_id
|
|
27
|
+
|
|
28
|
+
# The condition's MeSH heading.
|
|
29
|
+
attr_accessor :condition_label
|
|
30
|
+
|
|
31
|
+
# The MeSH tree category the condition sits under.
|
|
32
|
+
attr_accessor :mesh_tree_category
|
|
33
|
+
|
|
34
|
+
# The MeSH tree prefix of that category.
|
|
35
|
+
attr_accessor :mesh_tree_prefix
|
|
36
|
+
|
|
37
|
+
# Whether the MeSH descriptor is a disease descriptor.
|
|
38
|
+
attr_accessor :is_disease_descriptor
|
|
39
|
+
|
|
40
|
+
# The register's own condition terms that resolved to this MeSH descriptor.
|
|
41
|
+
attr_accessor :ema_condition_terms
|
|
42
|
+
|
|
43
|
+
# The number of register condition terms behind the row.
|
|
44
|
+
attr_accessor :ema_condition_term_count
|
|
45
|
+
|
|
46
|
+
# How many registered studies named this source. A registered study NAMED the source; it is never evidence that the source holds data on a condition. Read it with study_register_total and studies_naming_a_registered_source, because a zero is not a finding that the source is unused.
|
|
47
|
+
attr_accessor :study_count
|
|
48
|
+
|
|
49
|
+
# The ids of the registered studies behind the row (studies of this condition that named this source).
|
|
50
|
+
attr_accessor :linked_study_ids
|
|
51
|
+
|
|
52
|
+
# How many registered studies named this source, whatever their condition: the denominator under study_count on this row.
|
|
53
|
+
attr_accessor :source_study_count
|
|
54
|
+
|
|
55
|
+
# How many distinct registered studies of this source carry any MeSH-resolved condition, whatever the condition.
|
|
56
|
+
attr_accessor :source_condition_study_count
|
|
57
|
+
|
|
58
|
+
# How many distinct conditions have a row for this source.
|
|
59
|
+
attr_accessor :source_condition_count
|
|
60
|
+
|
|
61
|
+
# The number of data sources in the whole data source register at the snapshot: the denominator every source count is over. Not a count of real-world data sources in the world.
|
|
62
|
+
attr_accessor :register_source_count
|
|
63
|
+
|
|
64
|
+
# How many registered sources are named by at least one registered study.
|
|
65
|
+
attr_accessor :sources_with_any_study_link
|
|
66
|
+
|
|
67
|
+
# How many registered sources have at least one condition row (named by a study with a resolved condition).
|
|
68
|
+
attr_accessor :sources_with_any_condition_link
|
|
69
|
+
|
|
70
|
+
# The number of studies in the whole study register at the snapshot.
|
|
71
|
+
attr_accessor :study_register_total
|
|
72
|
+
|
|
73
|
+
# How many registered studies name at least one data source that is itself registered; the denominator under study_count.
|
|
74
|
+
attr_accessor :studies_naming_a_registered_source
|
|
75
|
+
|
|
76
|
+
# How many distinct condition terms the study register holds.
|
|
77
|
+
attr_accessor :condition_term_total
|
|
78
|
+
|
|
79
|
+
# How many of those terms resolved to a MeSH descriptor.
|
|
80
|
+
attr_accessor :condition_term_resolved
|
|
81
|
+
|
|
82
|
+
# How many distinct MeSH conditions appear on any row of the dataset.
|
|
83
|
+
attr_accessor :linked_condition_count
|
|
84
|
+
|
|
85
|
+
# The label of the catalogue snapshot the row was read from (a date).
|
|
86
|
+
attr_accessor :snapshot_label
|
|
87
|
+
|
|
88
|
+
# The month and year the catalogue was accessed (YYYY-MM), which EMA's site asks to be cited with its URL.
|
|
89
|
+
attr_accessor :accessed_month
|
|
90
|
+
|
|
91
|
+
# The license restriction tier of the row's source. Every row of this dataset is licensable (PROVISIONAL, legal read pending).
|
|
92
|
+
attr_accessor :restriction_tier
|
|
93
|
+
|
|
94
|
+
# The attribution line EMA requires, including the catalogue URL and the access month; quote it with any figure taken from the row.
|
|
95
|
+
attr_accessor :attribution
|
|
96
|
+
|
|
97
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
98
|
+
def self.attribute_map
|
|
99
|
+
{
|
|
100
|
+
:'data_source_id' => :'data_source_id',
|
|
101
|
+
:'data_source_name_key' => :'data_source_name_key',
|
|
102
|
+
:'condition_id' => :'condition_id',
|
|
103
|
+
:'condition_label' => :'condition_label',
|
|
104
|
+
:'mesh_tree_category' => :'mesh_tree_category',
|
|
105
|
+
:'mesh_tree_prefix' => :'mesh_tree_prefix',
|
|
106
|
+
:'is_disease_descriptor' => :'is_disease_descriptor',
|
|
107
|
+
:'ema_condition_terms' => :'ema_condition_terms',
|
|
108
|
+
:'ema_condition_term_count' => :'ema_condition_term_count',
|
|
109
|
+
:'study_count' => :'study_count',
|
|
110
|
+
:'linked_study_ids' => :'linked_study_ids',
|
|
111
|
+
:'source_study_count' => :'source_study_count',
|
|
112
|
+
:'source_condition_study_count' => :'source_condition_study_count',
|
|
113
|
+
:'source_condition_count' => :'source_condition_count',
|
|
114
|
+
:'register_source_count' => :'register_source_count',
|
|
115
|
+
:'sources_with_any_study_link' => :'sources_with_any_study_link',
|
|
116
|
+
:'sources_with_any_condition_link' => :'sources_with_any_condition_link',
|
|
117
|
+
:'study_register_total' => :'study_register_total',
|
|
118
|
+
:'studies_naming_a_registered_source' => :'studies_naming_a_registered_source',
|
|
119
|
+
:'condition_term_total' => :'condition_term_total',
|
|
120
|
+
:'condition_term_resolved' => :'condition_term_resolved',
|
|
121
|
+
:'linked_condition_count' => :'linked_condition_count',
|
|
122
|
+
:'snapshot_label' => :'snapshot_label',
|
|
123
|
+
:'accessed_month' => :'accessed_month',
|
|
124
|
+
:'restriction_tier' => :'restriction_tier',
|
|
125
|
+
:'attribution' => :'attribution'
|
|
126
|
+
}
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Returns attribute mapping this model knows about
|
|
130
|
+
def self.acceptable_attribute_map
|
|
131
|
+
attribute_map
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Returns all the JSON keys this model knows about
|
|
135
|
+
def self.acceptable_attributes
|
|
136
|
+
acceptable_attribute_map.values
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
# Attribute type mapping.
|
|
140
|
+
def self.openapi_types
|
|
141
|
+
{
|
|
142
|
+
:'data_source_id' => :'String',
|
|
143
|
+
:'data_source_name_key' => :'String',
|
|
144
|
+
:'condition_id' => :'String',
|
|
145
|
+
:'condition_label' => :'String',
|
|
146
|
+
:'mesh_tree_category' => :'String',
|
|
147
|
+
:'mesh_tree_prefix' => :'String',
|
|
148
|
+
:'is_disease_descriptor' => :'Boolean',
|
|
149
|
+
:'ema_condition_terms' => :'Array<String>',
|
|
150
|
+
:'ema_condition_term_count' => :'Integer',
|
|
151
|
+
:'study_count' => :'Integer',
|
|
152
|
+
:'linked_study_ids' => :'Array<String>',
|
|
153
|
+
:'source_study_count' => :'Integer',
|
|
154
|
+
:'source_condition_study_count' => :'Integer',
|
|
155
|
+
:'source_condition_count' => :'Integer',
|
|
156
|
+
:'register_source_count' => :'Integer',
|
|
157
|
+
:'sources_with_any_study_link' => :'Integer',
|
|
158
|
+
:'sources_with_any_condition_link' => :'Integer',
|
|
159
|
+
:'study_register_total' => :'Integer',
|
|
160
|
+
:'studies_naming_a_registered_source' => :'Integer',
|
|
161
|
+
:'condition_term_total' => :'Integer',
|
|
162
|
+
:'condition_term_resolved' => :'Integer',
|
|
163
|
+
:'linked_condition_count' => :'Integer',
|
|
164
|
+
:'snapshot_label' => :'String',
|
|
165
|
+
:'accessed_month' => :'String',
|
|
166
|
+
:'restriction_tier' => :'String',
|
|
167
|
+
:'attribution' => :'String'
|
|
168
|
+
}
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
# List of attributes with nullable: true
|
|
172
|
+
def self.openapi_nullable
|
|
173
|
+
Set.new([
|
|
174
|
+
:'data_source_id',
|
|
175
|
+
:'data_source_name_key',
|
|
176
|
+
:'condition_id',
|
|
177
|
+
:'condition_label',
|
|
178
|
+
:'mesh_tree_category',
|
|
179
|
+
:'mesh_tree_prefix',
|
|
180
|
+
:'is_disease_descriptor',
|
|
181
|
+
:'ema_condition_terms',
|
|
182
|
+
:'ema_condition_term_count',
|
|
183
|
+
:'study_count',
|
|
184
|
+
:'linked_study_ids',
|
|
185
|
+
:'source_study_count',
|
|
186
|
+
:'source_condition_study_count',
|
|
187
|
+
:'source_condition_count',
|
|
188
|
+
:'register_source_count',
|
|
189
|
+
:'sources_with_any_study_link',
|
|
190
|
+
:'sources_with_any_condition_link',
|
|
191
|
+
:'study_register_total',
|
|
192
|
+
:'studies_naming_a_registered_source',
|
|
193
|
+
:'condition_term_total',
|
|
194
|
+
:'condition_term_resolved',
|
|
195
|
+
:'linked_condition_count',
|
|
196
|
+
:'snapshot_label',
|
|
197
|
+
:'accessed_month',
|
|
198
|
+
:'restriction_tier',
|
|
199
|
+
:'attribution'
|
|
200
|
+
])
|
|
201
|
+
end
|
|
202
|
+
|
|
203
|
+
# Initializes the object
|
|
204
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
205
|
+
def initialize(attributes = {})
|
|
206
|
+
if (!attributes.is_a?(Hash))
|
|
207
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PharmaObservatory::RwdSourceConditionsRow` initialize method"
|
|
208
|
+
end
|
|
209
|
+
|
|
210
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
211
|
+
acceptable_attribute_map = self.class.acceptable_attribute_map
|
|
212
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
213
|
+
if (!acceptable_attribute_map.key?(k.to_sym))
|
|
214
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PharmaObservatory::RwdSourceConditionsRow`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
|
|
215
|
+
end
|
|
216
|
+
h[k.to_sym] = v
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
if attributes.key?(:'data_source_id')
|
|
220
|
+
self.data_source_id = attributes[:'data_source_id']
|
|
221
|
+
end
|
|
222
|
+
|
|
223
|
+
if attributes.key?(:'data_source_name_key')
|
|
224
|
+
self.data_source_name_key = attributes[:'data_source_name_key']
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
if attributes.key?(:'condition_id')
|
|
228
|
+
self.condition_id = attributes[:'condition_id']
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
if attributes.key?(:'condition_label')
|
|
232
|
+
self.condition_label = attributes[:'condition_label']
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
if attributes.key?(:'mesh_tree_category')
|
|
236
|
+
self.mesh_tree_category = attributes[:'mesh_tree_category']
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
if attributes.key?(:'mesh_tree_prefix')
|
|
240
|
+
self.mesh_tree_prefix = attributes[:'mesh_tree_prefix']
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
if attributes.key?(:'is_disease_descriptor')
|
|
244
|
+
self.is_disease_descriptor = attributes[:'is_disease_descriptor']
|
|
245
|
+
end
|
|
246
|
+
|
|
247
|
+
if attributes.key?(:'ema_condition_terms')
|
|
248
|
+
if (value = attributes[:'ema_condition_terms']).is_a?(Array)
|
|
249
|
+
self.ema_condition_terms = value
|
|
250
|
+
end
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
if attributes.key?(:'ema_condition_term_count')
|
|
254
|
+
self.ema_condition_term_count = attributes[:'ema_condition_term_count']
|
|
255
|
+
end
|
|
256
|
+
|
|
257
|
+
if attributes.key?(:'study_count')
|
|
258
|
+
self.study_count = attributes[:'study_count']
|
|
259
|
+
end
|
|
260
|
+
|
|
261
|
+
if attributes.key?(:'linked_study_ids')
|
|
262
|
+
if (value = attributes[:'linked_study_ids']).is_a?(Array)
|
|
263
|
+
self.linked_study_ids = value
|
|
264
|
+
end
|
|
265
|
+
end
|
|
266
|
+
|
|
267
|
+
if attributes.key?(:'source_study_count')
|
|
268
|
+
self.source_study_count = attributes[:'source_study_count']
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
if attributes.key?(:'source_condition_study_count')
|
|
272
|
+
self.source_condition_study_count = attributes[:'source_condition_study_count']
|
|
273
|
+
end
|
|
274
|
+
|
|
275
|
+
if attributes.key?(:'source_condition_count')
|
|
276
|
+
self.source_condition_count = attributes[:'source_condition_count']
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
if attributes.key?(:'register_source_count')
|
|
280
|
+
self.register_source_count = attributes[:'register_source_count']
|
|
281
|
+
end
|
|
282
|
+
|
|
283
|
+
if attributes.key?(:'sources_with_any_study_link')
|
|
284
|
+
self.sources_with_any_study_link = attributes[:'sources_with_any_study_link']
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
if attributes.key?(:'sources_with_any_condition_link')
|
|
288
|
+
self.sources_with_any_condition_link = attributes[:'sources_with_any_condition_link']
|
|
289
|
+
end
|
|
290
|
+
|
|
291
|
+
if attributes.key?(:'study_register_total')
|
|
292
|
+
self.study_register_total = attributes[:'study_register_total']
|
|
293
|
+
end
|
|
294
|
+
|
|
295
|
+
if attributes.key?(:'studies_naming_a_registered_source')
|
|
296
|
+
self.studies_naming_a_registered_source = attributes[:'studies_naming_a_registered_source']
|
|
297
|
+
end
|
|
298
|
+
|
|
299
|
+
if attributes.key?(:'condition_term_total')
|
|
300
|
+
self.condition_term_total = attributes[:'condition_term_total']
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
if attributes.key?(:'condition_term_resolved')
|
|
304
|
+
self.condition_term_resolved = attributes[:'condition_term_resolved']
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
if attributes.key?(:'linked_condition_count')
|
|
308
|
+
self.linked_condition_count = attributes[:'linked_condition_count']
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
if attributes.key?(:'snapshot_label')
|
|
312
|
+
self.snapshot_label = attributes[:'snapshot_label']
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
if attributes.key?(:'accessed_month')
|
|
316
|
+
self.accessed_month = attributes[:'accessed_month']
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
if attributes.key?(:'restriction_tier')
|
|
320
|
+
self.restriction_tier = attributes[:'restriction_tier']
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
if attributes.key?(:'attribution')
|
|
324
|
+
self.attribution = attributes[:'attribution']
|
|
325
|
+
end
|
|
326
|
+
end
|
|
327
|
+
|
|
328
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
329
|
+
# @return Array for valid properties with the reasons
|
|
330
|
+
def list_invalid_properties
|
|
331
|
+
warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
|
|
332
|
+
invalid_properties = Array.new
|
|
333
|
+
invalid_properties
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
# Check to see if the all the properties in the model are valid
|
|
337
|
+
# @return true if the model is valid
|
|
338
|
+
def valid?
|
|
339
|
+
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
340
|
+
true
|
|
341
|
+
end
|
|
342
|
+
|
|
343
|
+
# Checks equality by comparing each attribute.
|
|
344
|
+
# @param [Object] Object to be compared
|
|
345
|
+
def ==(o)
|
|
346
|
+
return true if self.equal?(o)
|
|
347
|
+
self.class == o.class &&
|
|
348
|
+
data_source_id == o.data_source_id &&
|
|
349
|
+
data_source_name_key == o.data_source_name_key &&
|
|
350
|
+
condition_id == o.condition_id &&
|
|
351
|
+
condition_label == o.condition_label &&
|
|
352
|
+
mesh_tree_category == o.mesh_tree_category &&
|
|
353
|
+
mesh_tree_prefix == o.mesh_tree_prefix &&
|
|
354
|
+
is_disease_descriptor == o.is_disease_descriptor &&
|
|
355
|
+
ema_condition_terms == o.ema_condition_terms &&
|
|
356
|
+
ema_condition_term_count == o.ema_condition_term_count &&
|
|
357
|
+
study_count == o.study_count &&
|
|
358
|
+
linked_study_ids == o.linked_study_ids &&
|
|
359
|
+
source_study_count == o.source_study_count &&
|
|
360
|
+
source_condition_study_count == o.source_condition_study_count &&
|
|
361
|
+
source_condition_count == o.source_condition_count &&
|
|
362
|
+
register_source_count == o.register_source_count &&
|
|
363
|
+
sources_with_any_study_link == o.sources_with_any_study_link &&
|
|
364
|
+
sources_with_any_condition_link == o.sources_with_any_condition_link &&
|
|
365
|
+
study_register_total == o.study_register_total &&
|
|
366
|
+
studies_naming_a_registered_source == o.studies_naming_a_registered_source &&
|
|
367
|
+
condition_term_total == o.condition_term_total &&
|
|
368
|
+
condition_term_resolved == o.condition_term_resolved &&
|
|
369
|
+
linked_condition_count == o.linked_condition_count &&
|
|
370
|
+
snapshot_label == o.snapshot_label &&
|
|
371
|
+
accessed_month == o.accessed_month &&
|
|
372
|
+
restriction_tier == o.restriction_tier &&
|
|
373
|
+
attribution == o.attribution
|
|
374
|
+
end
|
|
375
|
+
|
|
376
|
+
# @see the `==` method
|
|
377
|
+
# @param [Object] Object to be compared
|
|
378
|
+
def eql?(o)
|
|
379
|
+
self == o
|
|
380
|
+
end
|
|
381
|
+
|
|
382
|
+
# Calculates hash code according to all attributes.
|
|
383
|
+
# @return [Integer] Hash code
|
|
384
|
+
def hash
|
|
385
|
+
[data_source_id, data_source_name_key, condition_id, condition_label, mesh_tree_category, mesh_tree_prefix, is_disease_descriptor, ema_condition_terms, ema_condition_term_count, study_count, linked_study_ids, source_study_count, source_condition_study_count, source_condition_count, register_source_count, sources_with_any_study_link, sources_with_any_condition_link, study_register_total, studies_naming_a_registered_source, condition_term_total, condition_term_resolved, linked_condition_count, snapshot_label, accessed_month, restriction_tier, attribution].hash
|
|
386
|
+
end
|
|
387
|
+
|
|
388
|
+
# Builds the object from hash
|
|
389
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
390
|
+
# @return [Object] Returns the model itself
|
|
391
|
+
def self.build_from_hash(attributes)
|
|
392
|
+
return nil unless attributes.is_a?(Hash)
|
|
393
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
394
|
+
transformed_hash = {}
|
|
395
|
+
openapi_types.each_pair do |key, type|
|
|
396
|
+
if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
|
|
397
|
+
transformed_hash["#{key}"] = nil
|
|
398
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
399
|
+
# check to ensure the input is an array given that the attribute
|
|
400
|
+
# is documented as an array but the input is not
|
|
401
|
+
if attributes[attribute_map[key]].is_a?(Array)
|
|
402
|
+
transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
|
|
403
|
+
end
|
|
404
|
+
elsif !attributes[attribute_map[key]].nil?
|
|
405
|
+
transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
|
|
406
|
+
end
|
|
407
|
+
end
|
|
408
|
+
new(transformed_hash)
|
|
409
|
+
end
|
|
410
|
+
|
|
411
|
+
# Deserializes the data based on type
|
|
412
|
+
# @param string type Data type
|
|
413
|
+
# @param string value Value to be deserialized
|
|
414
|
+
# @return [Object] Deserialized data
|
|
415
|
+
def self._deserialize(type, value)
|
|
416
|
+
case type.to_sym
|
|
417
|
+
when :Time
|
|
418
|
+
Time.parse(value)
|
|
419
|
+
when :Date
|
|
420
|
+
Date.parse(value)
|
|
421
|
+
when :String
|
|
422
|
+
value.to_s
|
|
423
|
+
when :Integer
|
|
424
|
+
value.to_i
|
|
425
|
+
when :Float
|
|
426
|
+
value.to_f
|
|
427
|
+
when :Boolean
|
|
428
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
429
|
+
true
|
|
430
|
+
else
|
|
431
|
+
false
|
|
432
|
+
end
|
|
433
|
+
when :Object
|
|
434
|
+
# generic object (usually a Hash), return directly
|
|
435
|
+
value
|
|
436
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
437
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
438
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
439
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
440
|
+
k_type = Regexp.last_match[:k_type]
|
|
441
|
+
v_type = Regexp.last_match[:v_type]
|
|
442
|
+
{}.tap do |hash|
|
|
443
|
+
value.each do |k, v|
|
|
444
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
445
|
+
end
|
|
446
|
+
end
|
|
447
|
+
else # model
|
|
448
|
+
# models (e.g. Pet) or oneOf
|
|
449
|
+
klass = PharmaObservatory.const_get(type)
|
|
450
|
+
klass.respond_to?(:openapi_any_of) || klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
451
|
+
end
|
|
452
|
+
end
|
|
453
|
+
|
|
454
|
+
# Returns the string representation of the object
|
|
455
|
+
# @return [String] String presentation of the object
|
|
456
|
+
def to_s
|
|
457
|
+
to_hash.to_s
|
|
458
|
+
end
|
|
459
|
+
|
|
460
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
461
|
+
# @return [Hash] Returns the object in the form of hash
|
|
462
|
+
def to_body
|
|
463
|
+
to_hash
|
|
464
|
+
end
|
|
465
|
+
|
|
466
|
+
# Returns the object in the form of hash
|
|
467
|
+
# @return [Hash] Returns the object in the form of hash
|
|
468
|
+
def to_hash
|
|
469
|
+
hash = {}
|
|
470
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
471
|
+
value = self.send(attr)
|
|
472
|
+
if value.nil?
|
|
473
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
474
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
475
|
+
end
|
|
476
|
+
|
|
477
|
+
hash[param] = _to_hash(value)
|
|
478
|
+
end
|
|
479
|
+
hash
|
|
480
|
+
end
|
|
481
|
+
|
|
482
|
+
# Outputs non-array value in the form of hash
|
|
483
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
484
|
+
# @param [Object] value Any valid value
|
|
485
|
+
# @return [Hash] Returns the value in the form of hash
|
|
486
|
+
def _to_hash(value)
|
|
487
|
+
if value.is_a?(Array)
|
|
488
|
+
value.compact.map { |v| _to_hash(v) }
|
|
489
|
+
elsif value.is_a?(Hash)
|
|
490
|
+
{}.tap do |hash|
|
|
491
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
492
|
+
end
|
|
493
|
+
elsif value.respond_to? :to_hash
|
|
494
|
+
value.to_hash
|
|
495
|
+
else
|
|
496
|
+
value
|
|
497
|
+
end
|
|
498
|
+
end
|
|
499
|
+
|
|
500
|
+
end
|
|
501
|
+
|
|
502
|
+
end
|