From f889aaeaa656bd0b59a8c1b259947a28368ccece Mon Sep 17 00:00:00 2001 From: Ruy Diaz Date: Wed, 11 May 2022 15:17:05 -0700 Subject: [PATCH] Update to 1.0.0 - Added `create_result` - Added `update_order` - Included auto-generated models --- .gitignore | 8 +- .openapi-generator-ignore | 23 + .openapi-generator/FILES | 141 +++++ .openapi-generator/VERSION | 1 + .travis.yml | 3 + CHANGELOG.md | 10 + README.md | 69 ++- docs/Address.md | 30 + docs/CodedValue.md | 22 + docs/DefaultApi.md | 568 ++++++++++++++++++ docs/Error.md | 18 + docs/Event.md | 26 + docs/Events.md | 18 + docs/Identifier.md | 20 + docs/Location.md | 26 + docs/Meta.md | 32 + docs/MetaDestinations.md | 22 + docs/MetaMessage.md | 18 + docs/MetaSource.md | 20 + docs/Name.md | 22 + docs/Order.md | 24 + docs/OrderIds.md | 18 + docs/OrderOrder.md | 56 ++ docs/OrderOrderClinicalInfo.md | 26 + docs/OrderOrderDiagnoses.md | 22 + docs/OrderOrderOrderingFacility.md | 22 + docs/OrderOrderSpecimen.md | 22 + docs/OrderWithEventErrors.md | 20 + docs/Orders.md | 18 + docs/OrdersOrders.md | 22 + docs/Patient.md | 24 + docs/PatientContacts.md | 28 + docs/PatientDemographics.md | 52 ++ docs/PhoneNumber.md | 20 + docs/Provider.md | 32 + docs/Result.md | 50 ++ docs/ResultIds.md | 18 + docs/ResultReferenceRange.md | 22 + docs/ResultReport.md | 22 + docs/ResultSpecimen.md | 22 + docs/Results.md | 20 + docs/Visit.md | 36 ++ docs/VisitCompany.md | 24 + docs/VisitGuarantor.md | 40 ++ docs/VisitGuarantorEmployer.md | 22 + docs/VisitInsurances.md | 40 ++ docs/VisitInsured.md | 30 + docs/VisitPlan.md | 22 + git_push.sh | 11 +- lib/primary_connect_client.rb | 48 +- lib/primary_connect_client/api/default_api.rb | 210 ++++--- lib/primary_connect_client/api_client.rb | 11 +- lib/primary_connect_client/api_error.rb | 2 +- lib/primary_connect_client/configuration.rb | 5 +- lib/primary_connect_client/models/address.rb | 272 +++++++++ .../models/coded_value.rb | 238 ++++++++ lib/primary_connect_client/models/error.rb | 218 +++++++ lib/primary_connect_client/models/event.rb | 254 ++++++++ lib/primary_connect_client/models/events.rb | 221 +++++++ .../models/identifier.rb | 228 +++++++ lib/primary_connect_client/models/location.rb | 255 ++++++++ lib/primary_connect_client/models/meta.rb | 317 ++++++++++ .../models/meta_destinations.rb | 242 ++++++++ .../models/meta_message.rb | 218 +++++++ .../models/meta_source.rb | 227 +++++++ lib/primary_connect_client/models/name.rb | 237 ++++++++ lib/primary_connect_client/models/order.rb | 245 ++++++++ .../models/order_ids.rb | 221 +++++++ .../models/order_order.rb | 485 +++++++++++++++ .../models/order_order_clinical_info.rb | 260 ++++++++ .../models/order_order_diagnoses.rb | 272 +++++++++ .../models/order_order_ordering_facility.rb | 239 ++++++++ .../models/order_order_specimen.rb | 239 ++++++++ .../models/order_with_event_errors.rb | 229 +++++++ lib/primary_connect_client/models/orders.rb | 221 +++++++ .../models/orders_orders.rb | 236 ++++++++ lib/primary_connect_client/models/patient.rb | 253 ++++++++ .../models/patient_contacts.rb | 305 ++++++++++ .../models/patient_demographics.rb | 466 ++++++++++++++ .../models/phone_number.rb | 262 ++++++++ lib/primary_connect_client/models/provider.rb | 288 +++++++++ lib/primary_connect_client/models/result.rb | 434 +++++++++++++ .../models/result_ids.rb | 221 +++++++ .../models/result_reference_range.rb | 240 ++++++++ .../models/result_report.rb | 240 ++++++++ .../models/result_specimen.rb | 239 ++++++++ lib/primary_connect_client/models/results.rb | 230 +++++++ lib/primary_connect_client/models/visit.rb | 306 ++++++++++ .../models/visit_company.rb | 248 ++++++++ .../models/visit_guarantor.rb | 358 +++++++++++ .../models/visit_guarantor_employer.rb | 238 ++++++++ .../models/visit_insurances.rb | 386 ++++++++++++ .../models/visit_insured.rb | 322 ++++++++++ .../models/visit_plan.rb | 238 ++++++++ lib/primary_connect_client/version.rb | 14 +- primary_connect_client.gemspec | 12 +- spec/api/default_api_spec.rb | 85 +-- spec/api_client_spec.rb | 6 +- spec/configuration_spec.rb | 2 +- spec/models/address_spec.rb | 70 +++ spec/models/coded_value_spec.rb | 46 ++ spec/models/error_spec.rb | 34 ++ spec/models/event_spec.rb | 58 ++ spec/models/events_spec.rb | 34 ++ spec/models/identifier_spec.rb | 40 ++ spec/models/location_spec.rb | 58 ++ spec/models/meta_destinations_spec.rb | 46 ++ spec/models/meta_message_spec.rb | 34 ++ spec/models/meta_source_spec.rb | 40 ++ spec/models/meta_spec.rb | 80 +++ spec/models/name_spec.rb | 46 ++ spec/models/order_ids_spec.rb | 34 ++ spec/models/order_order_clinical_info_spec.rb | 58 ++ spec/models/order_order_diagnoses_spec.rb | 50 ++ .../order_order_ordering_facility_spec.rb | 46 ++ spec/models/order_order_spec.rb | 164 +++++ spec/models/order_order_specimen_spec.rb | 46 ++ spec/models/order_spec.rb | 52 ++ spec/models/order_with_event_errors_spec.rb | 40 ++ spec/models/orders_orders_spec.rb | 46 ++ spec/models/orders_spec.rb | 34 ++ spec/models/patient_contacts_spec.rb | 68 +++ spec/models/patient_demographics_spec.rb | 168 ++++++ spec/models/patient_spec.rb | 52 ++ spec/models/phone_number_spec.rb | 44 ++ spec/models/provider_spec.rb | 76 +++ spec/models/result_ids_spec.rb | 34 ++ spec/models/result_reference_range_spec.rb | 46 ++ spec/models/result_report_spec.rb | 46 ++ spec/models/result_spec.rb | 142 +++++ spec/models/result_specimen_spec.rb | 46 ++ spec/models/results_spec.rb | 40 ++ spec/models/visit_company_spec.rb | 52 ++ spec/models/visit_guarantor_employer_spec.rb | 46 ++ spec/models/visit_guarantor_spec.rb | 104 ++++ spec/models/visit_insurances_spec.rb | 112 ++++ spec/models/visit_insured_spec.rb | 78 +++ spec/models/visit_plan_spec.rb | 46 ++ spec/models/visit_spec.rb | 88 +++ spec/spec_helper.rb | 2 +- 140 files changed, 15415 insertions(+), 156 deletions(-) create mode 100644 .openapi-generator-ignore create mode 100644 .openapi-generator/FILES create mode 100644 .openapi-generator/VERSION create mode 100644 docs/Address.md create mode 100644 docs/CodedValue.md create mode 100644 docs/DefaultApi.md create mode 100644 docs/Error.md create mode 100644 docs/Event.md create mode 100644 docs/Events.md create mode 100644 docs/Identifier.md create mode 100644 docs/Location.md create mode 100644 docs/Meta.md create mode 100644 docs/MetaDestinations.md create mode 100644 docs/MetaMessage.md create mode 100644 docs/MetaSource.md create mode 100644 docs/Name.md create mode 100644 docs/Order.md create mode 100644 docs/OrderIds.md create mode 100644 docs/OrderOrder.md create mode 100644 docs/OrderOrderClinicalInfo.md create mode 100644 docs/OrderOrderDiagnoses.md create mode 100644 docs/OrderOrderOrderingFacility.md create mode 100644 docs/OrderOrderSpecimen.md create mode 100644 docs/OrderWithEventErrors.md create mode 100644 docs/Orders.md create mode 100644 docs/OrdersOrders.md create mode 100644 docs/Patient.md create mode 100644 docs/PatientContacts.md create mode 100644 docs/PatientDemographics.md create mode 100644 docs/PhoneNumber.md create mode 100644 docs/Provider.md create mode 100644 docs/Result.md create mode 100644 docs/ResultIds.md create mode 100644 docs/ResultReferenceRange.md create mode 100644 docs/ResultReport.md create mode 100644 docs/ResultSpecimen.md create mode 100644 docs/Results.md create mode 100644 docs/Visit.md create mode 100644 docs/VisitCompany.md create mode 100644 docs/VisitGuarantor.md create mode 100644 docs/VisitGuarantorEmployer.md create mode 100644 docs/VisitInsurances.md create mode 100644 docs/VisitInsured.md create mode 100644 docs/VisitPlan.md create mode 100644 lib/primary_connect_client/models/address.rb create mode 100644 lib/primary_connect_client/models/coded_value.rb create mode 100644 lib/primary_connect_client/models/error.rb create mode 100644 lib/primary_connect_client/models/event.rb create mode 100644 lib/primary_connect_client/models/events.rb create mode 100644 lib/primary_connect_client/models/identifier.rb create mode 100644 lib/primary_connect_client/models/location.rb create mode 100644 lib/primary_connect_client/models/meta.rb create mode 100644 lib/primary_connect_client/models/meta_destinations.rb create mode 100644 lib/primary_connect_client/models/meta_message.rb create mode 100644 lib/primary_connect_client/models/meta_source.rb create mode 100644 lib/primary_connect_client/models/name.rb create mode 100644 lib/primary_connect_client/models/order.rb create mode 100644 lib/primary_connect_client/models/order_ids.rb create mode 100644 lib/primary_connect_client/models/order_order.rb create mode 100644 lib/primary_connect_client/models/order_order_clinical_info.rb create mode 100644 lib/primary_connect_client/models/order_order_diagnoses.rb create mode 100644 lib/primary_connect_client/models/order_order_ordering_facility.rb create mode 100644 lib/primary_connect_client/models/order_order_specimen.rb create mode 100644 lib/primary_connect_client/models/order_with_event_errors.rb create mode 100644 lib/primary_connect_client/models/orders.rb create mode 100644 lib/primary_connect_client/models/orders_orders.rb create mode 100644 lib/primary_connect_client/models/patient.rb create mode 100644 lib/primary_connect_client/models/patient_contacts.rb create mode 100644 lib/primary_connect_client/models/patient_demographics.rb create mode 100644 lib/primary_connect_client/models/phone_number.rb create mode 100644 lib/primary_connect_client/models/provider.rb create mode 100644 lib/primary_connect_client/models/result.rb create mode 100644 lib/primary_connect_client/models/result_ids.rb create mode 100644 lib/primary_connect_client/models/result_reference_range.rb create mode 100644 lib/primary_connect_client/models/result_report.rb create mode 100644 lib/primary_connect_client/models/result_specimen.rb create mode 100644 lib/primary_connect_client/models/results.rb create mode 100644 lib/primary_connect_client/models/visit.rb create mode 100644 lib/primary_connect_client/models/visit_company.rb create mode 100644 lib/primary_connect_client/models/visit_guarantor.rb create mode 100644 lib/primary_connect_client/models/visit_guarantor_employer.rb create mode 100644 lib/primary_connect_client/models/visit_insurances.rb create mode 100644 lib/primary_connect_client/models/visit_insured.rb create mode 100644 lib/primary_connect_client/models/visit_plan.rb create mode 100644 spec/models/address_spec.rb create mode 100644 spec/models/coded_value_spec.rb create mode 100644 spec/models/error_spec.rb create mode 100644 spec/models/event_spec.rb create mode 100644 spec/models/events_spec.rb create mode 100644 spec/models/identifier_spec.rb create mode 100644 spec/models/location_spec.rb create mode 100644 spec/models/meta_destinations_spec.rb create mode 100644 spec/models/meta_message_spec.rb create mode 100644 spec/models/meta_source_spec.rb create mode 100644 spec/models/meta_spec.rb create mode 100644 spec/models/name_spec.rb create mode 100644 spec/models/order_ids_spec.rb create mode 100644 spec/models/order_order_clinical_info_spec.rb create mode 100644 spec/models/order_order_diagnoses_spec.rb create mode 100644 spec/models/order_order_ordering_facility_spec.rb create mode 100644 spec/models/order_order_spec.rb create mode 100644 spec/models/order_order_specimen_spec.rb create mode 100644 spec/models/order_spec.rb create mode 100644 spec/models/order_with_event_errors_spec.rb create mode 100644 spec/models/orders_orders_spec.rb create mode 100644 spec/models/orders_spec.rb create mode 100644 spec/models/patient_contacts_spec.rb create mode 100644 spec/models/patient_demographics_spec.rb create mode 100644 spec/models/patient_spec.rb create mode 100644 spec/models/phone_number_spec.rb create mode 100644 spec/models/provider_spec.rb create mode 100644 spec/models/result_ids_spec.rb create mode 100644 spec/models/result_reference_range_spec.rb create mode 100644 spec/models/result_report_spec.rb create mode 100644 spec/models/result_spec.rb create mode 100644 spec/models/result_specimen_spec.rb create mode 100644 spec/models/results_spec.rb create mode 100644 spec/models/visit_company_spec.rb create mode 100644 spec/models/visit_guarantor_employer_spec.rb create mode 100644 spec/models/visit_guarantor_spec.rb create mode 100644 spec/models/visit_insurances_spec.rb create mode 100644 spec/models/visit_insured_spec.rb create mode 100644 spec/models/visit_plan_spec.rb create mode 100644 spec/models/visit_spec.rb diff --git a/.gitignore b/.gitignore index ac39d10..05a17cb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,9 @@ # Generated by: https://openapi-generator.tech - -# https://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ -Gemfile.lock +# *.gem *.rbc /.config -.idea/** /coverage/ /InstalledFiles /pkg/ @@ -15,12 +12,11 @@ Gemfile.lock /test/tmp/ /test/version_tmp/ /tmp/ -.byebug_history ## Specific to RubyMotion: .dat* .repl_history -/build/ +build/ ## Documentation cache and generated files: /.yardoc/ diff --git a/.openapi-generator-ignore b/.openapi-generator-ignore new file mode 100644 index 0000000..7484ee5 --- /dev/null +++ b/.openapi-generator-ignore @@ -0,0 +1,23 @@ +# OpenAPI Generator Ignore +# Generated by openapi-generator https://github.com/openapitools/openapi-generator + +# Use this file to prevent files from being overwritten by the generator. +# The patterns follow closely to .gitignore or .dockerignore. + +# As an example, the C# client generator defines ApiClient.cs. +# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: +#ApiClient.cs + +# You can match any string of characters against a directory, file or extension with a single asterisk (*): +#foo/*/qux +# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux + +# You can recursively match patterns against a directory, file or extension with a double asterisk (**): +#foo/**/qux +# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux + +# You can also negate patterns with an exclamation (!). +# For example, you can ignore all files in a docs folder with the file extension .md: +#docs/*.md +# Then explicitly reverse the ignore rule for a single file: +#!docs/README.md diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES new file mode 100644 index 0000000..0d5d33b --- /dev/null +++ b/.openapi-generator/FILES @@ -0,0 +1,141 @@ +.gitignore +.openapi-generator-ignore +.rspec +.rubocop.yml +.travis.yml +Gemfile +README.md +Rakefile +docs/Address.md +docs/CodedValue.md +docs/DefaultApi.md +docs/Error.md +docs/Event.md +docs/Events.md +docs/Identifier.md +docs/Location.md +docs/Meta.md +docs/MetaDestinations.md +docs/MetaMessage.md +docs/MetaSource.md +docs/Name.md +docs/Order.md +docs/OrderIds.md +docs/OrderOrder.md +docs/OrderOrderClinicalInfo.md +docs/OrderOrderDiagnoses.md +docs/OrderOrderOrderingFacility.md +docs/OrderOrderSpecimen.md +docs/OrderWithEventErrors.md +docs/Orders.md +docs/OrdersOrders.md +docs/Patient.md +docs/PatientContacts.md +docs/PatientDemographics.md +docs/PhoneNumber.md +docs/Provider.md +docs/Result.md +docs/ResultIds.md +docs/ResultReferenceRange.md +docs/ResultReport.md +docs/ResultSpecimen.md +docs/Results.md +docs/Visit.md +docs/VisitCompany.md +docs/VisitGuarantor.md +docs/VisitGuarantorEmployer.md +docs/VisitInsurances.md +docs/VisitInsured.md +docs/VisitPlan.md +git_push.sh +lib/primary_connect_client.rb +lib/primary_connect_client/api/default_api.rb +lib/primary_connect_client/api_client.rb +lib/primary_connect_client/api_error.rb +lib/primary_connect_client/configuration.rb +lib/primary_connect_client/models/address.rb +lib/primary_connect_client/models/coded_value.rb +lib/primary_connect_client/models/error.rb +lib/primary_connect_client/models/event.rb +lib/primary_connect_client/models/events.rb +lib/primary_connect_client/models/identifier.rb +lib/primary_connect_client/models/location.rb +lib/primary_connect_client/models/meta.rb +lib/primary_connect_client/models/meta_destinations.rb +lib/primary_connect_client/models/meta_message.rb +lib/primary_connect_client/models/meta_source.rb +lib/primary_connect_client/models/name.rb +lib/primary_connect_client/models/order.rb +lib/primary_connect_client/models/order_ids.rb +lib/primary_connect_client/models/order_order.rb +lib/primary_connect_client/models/order_order_clinical_info.rb +lib/primary_connect_client/models/order_order_diagnoses.rb +lib/primary_connect_client/models/order_order_ordering_facility.rb +lib/primary_connect_client/models/order_order_specimen.rb +lib/primary_connect_client/models/order_with_event_errors.rb +lib/primary_connect_client/models/orders.rb +lib/primary_connect_client/models/orders_orders.rb +lib/primary_connect_client/models/patient.rb +lib/primary_connect_client/models/patient_contacts.rb +lib/primary_connect_client/models/patient_demographics.rb +lib/primary_connect_client/models/phone_number.rb +lib/primary_connect_client/models/provider.rb +lib/primary_connect_client/models/result.rb +lib/primary_connect_client/models/result_ids.rb +lib/primary_connect_client/models/result_reference_range.rb +lib/primary_connect_client/models/result_report.rb +lib/primary_connect_client/models/result_specimen.rb +lib/primary_connect_client/models/results.rb +lib/primary_connect_client/models/visit.rb +lib/primary_connect_client/models/visit_company.rb +lib/primary_connect_client/models/visit_guarantor.rb +lib/primary_connect_client/models/visit_guarantor_employer.rb +lib/primary_connect_client/models/visit_insurances.rb +lib/primary_connect_client/models/visit_insured.rb +lib/primary_connect_client/models/visit_plan.rb +lib/primary_connect_client/version.rb +primary_connect_client.gemspec +spec/api/default_api_spec.rb +spec/api_client_spec.rb +spec/configuration_spec.rb +spec/models/address_spec.rb +spec/models/coded_value_spec.rb +spec/models/error_spec.rb +spec/models/event_spec.rb +spec/models/events_spec.rb +spec/models/identifier_spec.rb +spec/models/location_spec.rb +spec/models/meta_destinations_spec.rb +spec/models/meta_message_spec.rb +spec/models/meta_source_spec.rb +spec/models/meta_spec.rb +spec/models/name_spec.rb +spec/models/order_ids_spec.rb +spec/models/order_order_clinical_info_spec.rb +spec/models/order_order_diagnoses_spec.rb +spec/models/order_order_ordering_facility_spec.rb +spec/models/order_order_spec.rb +spec/models/order_order_specimen_spec.rb +spec/models/order_spec.rb +spec/models/order_with_event_errors_spec.rb +spec/models/orders_orders_spec.rb +spec/models/orders_spec.rb +spec/models/patient_contacts_spec.rb +spec/models/patient_demographics_spec.rb +spec/models/patient_spec.rb +spec/models/phone_number_spec.rb +spec/models/provider_spec.rb +spec/models/result_ids_spec.rb +spec/models/result_reference_range_spec.rb +spec/models/result_report_spec.rb +spec/models/result_spec.rb +spec/models/result_specimen_spec.rb +spec/models/results_spec.rb +spec/models/visit_company_spec.rb +spec/models/visit_guarantor_employer_spec.rb +spec/models/visit_guarantor_spec.rb +spec/models/visit_insurances_spec.rb +spec/models/visit_insured_spec.rb +spec/models/visit_plan_spec.rb +spec/models/visit_spec.rb +spec/spec_helper.rb diff --git a/.openapi-generator/VERSION b/.openapi-generator/VERSION new file mode 100644 index 0000000..e230c83 --- /dev/null +++ b/.openapi-generator/VERSION @@ -0,0 +1 @@ +5.3.0 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 1a4331e..529eea0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,9 @@ rvm: - 2.3 - 2.4 - 2.5 + - 2.6 + - 2.7 + - 3.0 script: - bundle install --path vendor/bundle - bundle exec rspec diff --git a/CHANGELOG.md b/CHANGELOG.md index 02be9b7..7539541 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,15 @@ # Change Log +## 1.0.0 + +- Added `create_result` +- Added `update_order` +- Included auto-generated models + +### Breaking changes + +- Updated responses to return models instead of Objects + ## 0.8.0 - Bumped `primary_connect_proto` to `0.9.0` diff --git a/README.md b/README.md index 805d037..7789ff8 100644 --- a/README.md +++ b/README.md @@ -64,12 +64,13 @@ end api_instance = PrimaryConnectClient::DefaultApi.new opts = { - order: Primary::Connect::Order.new.to_json # Order | + order: PrimaryConnectClient::Order.new # Order | } begin #create order - api_instance.create_order(opts) + result = api_instance.create_order(opts) + p result rescue PrimaryConnectClient::ApiError => e puts "Exception when calling DefaultApi->create_order: #{e}" end @@ -80,22 +81,66 @@ end All URIs are relative to *https://connect.primary.health* -| Class | Method | HTTP request | Description | -| ---------------------------------- | --------------------------------------------------- | ---------------------------------------------- | ------------ | -| _PrimaryConnectClient::DefaultApi_ | [**create_order**](docs/DefaultApi.md#create_order) | **POST** /api/v1/orders | create order | -| _PrimaryConnectClient::DefaultApi_ | [**get_order**](docs/DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order | -| _PrimaryConnectClient::DefaultApi_ | [**get_lab_report**](docs/DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report | -| _PrimaryConnectClient::DefaultApi_ | [**get_result**](docs/DefaultApi.md#get_result) | **GET** /api/v1/orders/{order_id}/results/{id} | show result | -| _PrimaryConnectClient::DefaultApi_ | [**list_events**](docs/DefaultApi.md#list_events) | **GET** /api/v1/events | list events | -| _PrimaryConnectClient::DefaultApi_ | [**list_orders**](docs/DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders | -| _PrimaryConnectClient::DefaultApi_ | [**list_results**](docs/DefaultApi.md#list_results) | **GET** /api/v1/orders/{order_id}/results | list results | +Class | Method | HTTP request | Description +------------ | ------------- | ------------- | ------------- +*PrimaryConnectClient::DefaultApi* | [**create_order**](docs/DefaultApi.md#create_order) | **POST** /api/v1/orders | create order +*PrimaryConnectClient::DefaultApi* | [**create_result**](docs/DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result +*PrimaryConnectClient::DefaultApi* | [**get_lab_report**](docs/DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report +*PrimaryConnectClient::DefaultApi* | [**get_order**](docs/DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order +*PrimaryConnectClient::DefaultApi* | [**list_events**](docs/DefaultApi.md#list_events) | **GET** /api/v1/events | list events +*PrimaryConnectClient::DefaultApi* | [**list_orders**](docs/DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders +*PrimaryConnectClient::DefaultApi* | [**list_results**](docs/DefaultApi.md#list_results) | **GET** /api/v1/orders/{order_id}/results | list results +*PrimaryConnectClient::DefaultApi* | [**update_order**](docs/DefaultApi.md#update_order) | **PUT** /api/v1/orders/{id} | update order + ## Documentation for Models -**TODO** + - [PrimaryConnectClient::Address](docs/Address.md) + - [PrimaryConnectClient::CodedValue](docs/CodedValue.md) + - [PrimaryConnectClient::Error](docs/Error.md) + - [PrimaryConnectClient::Event](docs/Event.md) + - [PrimaryConnectClient::Events](docs/Events.md) + - [PrimaryConnectClient::Identifier](docs/Identifier.md) + - [PrimaryConnectClient::Location](docs/Location.md) + - [PrimaryConnectClient::Meta](docs/Meta.md) + - [PrimaryConnectClient::MetaDestinations](docs/MetaDestinations.md) + - [PrimaryConnectClient::MetaMessage](docs/MetaMessage.md) + - [PrimaryConnectClient::MetaSource](docs/MetaSource.md) + - [PrimaryConnectClient::Name](docs/Name.md) + - [PrimaryConnectClient::Order](docs/Order.md) + - [PrimaryConnectClient::OrderIds](docs/OrderIds.md) + - [PrimaryConnectClient::OrderOrder](docs/OrderOrder.md) + - [PrimaryConnectClient::OrderOrderClinicalInfo](docs/OrderOrderClinicalInfo.md) + - [PrimaryConnectClient::OrderOrderDiagnoses](docs/OrderOrderDiagnoses.md) + - [PrimaryConnectClient::OrderOrderOrderingFacility](docs/OrderOrderOrderingFacility.md) + - [PrimaryConnectClient::OrderOrderSpecimen](docs/OrderOrderSpecimen.md) + - [PrimaryConnectClient::OrderWithEventErrors](docs/OrderWithEventErrors.md) + - [PrimaryConnectClient::Orders](docs/Orders.md) + - [PrimaryConnectClient::OrdersOrders](docs/OrdersOrders.md) + - [PrimaryConnectClient::Patient](docs/Patient.md) + - [PrimaryConnectClient::PatientContacts](docs/PatientContacts.md) + - [PrimaryConnectClient::PatientDemographics](docs/PatientDemographics.md) + - [PrimaryConnectClient::PhoneNumber](docs/PhoneNumber.md) + - [PrimaryConnectClient::Provider](docs/Provider.md) + - [PrimaryConnectClient::Result](docs/Result.md) + - [PrimaryConnectClient::ResultIds](docs/ResultIds.md) + - [PrimaryConnectClient::ResultReferenceRange](docs/ResultReferenceRange.md) + - [PrimaryConnectClient::ResultReport](docs/ResultReport.md) + - [PrimaryConnectClient::ResultSpecimen](docs/ResultSpecimen.md) + - [PrimaryConnectClient::Results](docs/Results.md) + - [PrimaryConnectClient::Visit](docs/Visit.md) + - [PrimaryConnectClient::VisitCompany](docs/VisitCompany.md) + - [PrimaryConnectClient::VisitGuarantor](docs/VisitGuarantor.md) + - [PrimaryConnectClient::VisitGuarantorEmployer](docs/VisitGuarantorEmployer.md) + - [PrimaryConnectClient::VisitInsurances](docs/VisitInsurances.md) + - [PrimaryConnectClient::VisitInsured](docs/VisitInsured.md) + - [PrimaryConnectClient::VisitPlan](docs/VisitPlan.md) + ## Documentation for Authorization + ### bearer_auth - **Type**: Bearer authentication + diff --git a/docs/Address.md b/docs/Address.md new file mode 100644 index 0000000..e5f05b9 --- /dev/null +++ b/docs/Address.md @@ -0,0 +1,30 @@ +# PrimaryConnectClient::Address + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **street_address_1** | **String** | | [optional] | +| **street_address_2** | **String** | | [optional] | +| **city** | **String** | | [optional] | +| **state_code** | **String** | | [optional] | +| **zip** | **String** | | [optional] | +| **county** | **String** | | [optional] | +| **country_code** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Address.new( + street_address_1: 123 Sesame St., + street_address_2: Unit 456, + city: Springfield, + state_code: OH, + zip: 12345, + county: null, + country_code: US +) +``` + diff --git a/docs/CodedValue.md b/docs/CodedValue.md new file mode 100644 index 0000000..4fc057a --- /dev/null +++ b/docs/CodedValue.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::CodedValue + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **value** | **String** | E.g. 260373001 (SCT), 3006F (CPT), etc. | [optional] | +| **code_set** | **String** | E.g. SCT, LN, NDC, CPT, CVX, etc. | [optional] | +| **description** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::CodedValue.new( + value: 260373001, + code_set: SCT, + description: null +) +``` + diff --git a/docs/DefaultApi.md b/docs/DefaultApi.md new file mode 100644 index 0000000..2e6b1d1 --- /dev/null +++ b/docs/DefaultApi.md @@ -0,0 +1,568 @@ +# PrimaryConnectClient::DefaultApi + +All URIs are relative to *https://connect.primary.health* + +| Method | HTTP request | Description | +| ------ | ------------ | ----------- | +| [**create_order**](DefaultApi.md#create_order) | **POST** /api/v1/orders | create order | +| [**create_result**](DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result | +| [**get_lab_report**](DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report | +| [**get_order**](DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order | +| [**list_events**](DefaultApi.md#list_events) | **GET** /api/v1/events | list events | +| [**list_orders**](DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders | +| [**list_results**](DefaultApi.md#list_results) | **GET** /api/v1/orders/{order_id}/results | list results | +| [**update_order**](DefaultApi.md#update_order) | **PUT** /api/v1/orders/{id} | update order | + + +## create_order + +> create_order(opts) + +create order + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +opts = { + order: PrimaryConnectClient::Order.new # Order | +} + +begin + # create order + result = api_instance.create_order(opts) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->create_order: #{e}" +end +``` + +#### Using the create_order_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_order_with_http_info(opts) + +```ruby +begin + # create order + data, status_code, headers = api_instance.create_order_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->create_order_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **order** | [**Order**](Order.md) | | [optional] | + +### Return type + +[**OrderIds**](OrderIds.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## create_result + +> create_result(order_id, opts) + +create result + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +order_id = '01FGD44Q6MVCG2VNSMCVX5ZCT6' # String | Order id +opts = { + result: PrimaryConnectClient::Result.new # Result | +} + +begin + # create result + result = api_instance.create_result(order_id, opts) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->create_result: #{e}" +end +``` + +#### Using the create_result_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> create_result_with_http_info(order_id, opts) + +```ruby +begin + # create result + data, status_code, headers = api_instance.create_result_with_http_info(order_id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->create_result_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **order_id** | **String** | Order id | | +| **result** | [**Result**](Result.md) | | [optional] | + +### Return type + +[**ResultIds**](ResultIds.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + + +## get_lab_report + +> get_lab_report(result_id) + +show lab report + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +result_id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Result id + +begin + # show lab report + api_instance.get_lab_report(result_id) +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->get_lab_report: #{e}" +end +``` + +#### Using the get_lab_report_with_http_info variant + +This returns an Array which contains the response data (`nil` in this case), status code and headers. + +> get_lab_report_with_http_info(result_id) + +```ruby +begin + # show lab report + data, status_code, headers = api_instance.get_lab_report_with_http_info(result_id) + p status_code # => 2xx + p headers # => { ... } + p data # => nil +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->get_lab_report_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **result_id** | **String** | Result id | | + +### Return type + +nil (empty response body) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## get_order + +> get_order(id) + +show order + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +id = 'id_example' # String | id + +begin + # show order + result = api_instance.get_order(id) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->get_order: #{e}" +end +``` + +#### Using the get_order_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> get_order_with_http_info(id) + +```ruby +begin + # show order + data, status_code, headers = api_instance.get_order_with_http_info(id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->get_order_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | id | | + +### Return type + +[**OrderWithEventErrors**](OrderWithEventErrors.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_events + +> list_events(opts) + +list events + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +opts = { + last_event_id: '01FGD30NTPNNZE9MKGMWZGHGTZ', # String | Paginate events with event id. 26 character, sortable id. + event_types: 'OrderCreated,OrderComplete' # String | Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived] +} + +begin + # list events + result = api_instance.list_events(opts) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_events: #{e}" +end +``` + +#### Using the list_events_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_events_with_http_info(opts) + +```ruby +begin + # list events + data, status_code, headers = api_instance.list_events_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_events_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **last_event_id** | **String** | Paginate events with event id. 26 character, sortable id. | [optional] | +| **event_types** | **String** | Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived] | [optional] | + +### Return type + +[**Events**](Events.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_orders + +> list_orders(opts) + +list orders + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +opts = { + last_order_id: '01FGD30NTPNNZE9MKGMWZGHGTZ', # String | Paginate orders with order id. 26 character, sortable id. + state: 'new,resulted' # String | Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable] +} + +begin + # list orders + result = api_instance.list_orders(opts) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_orders: #{e}" +end +``` + +#### Using the list_orders_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_orders_with_http_info(opts) + +```ruby +begin + # list orders + data, status_code, headers = api_instance.list_orders_with_http_info(opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_orders_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **last_order_id** | **String** | Paginate orders with order id. 26 character, sortable id. | [optional] | +| **state** | **String** | Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable] | [optional] | + +### Return type + +[**Orders**](Orders.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## list_results + +> list_results(order_id) + +list results + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +order_id = '01FGD44Q6MVCG2VNSMCVX5ZCT6' # String | Order id + +begin + # list results + result = api_instance.list_results(order_id) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_results: #{e}" +end +``` + +#### Using the list_results_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> list_results_with_http_info(order_id) + +```ruby +begin + # list results + data, status_code, headers = api_instance.list_results_with_http_info(order_id) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->list_results_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **order_id** | **String** | Order id | | + +### Return type + +[**Results**](Results.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + + +## update_order + +> update_order(id, opts) + +update order + +### Examples + +```ruby +require 'time' +require 'primary_connect_client' +# setup authorization +PrimaryConnectClient.configure do |config| + # Configure Bearer authorization: bearer_auth + config.access_token = 'YOUR_BEARER_TOKEN' +end + +api_instance = PrimaryConnectClient::DefaultApi.new +id = 'id_example' # String | id +opts = { + order: PrimaryConnectClient::Order.new # Order | +} + +begin + # update order + result = api_instance.update_order(id, opts) + p result +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->update_order: #{e}" +end +``` + +#### Using the update_order_with_http_info variant + +This returns an Array which contains the response data, status code and headers. + +> , Integer, Hash)> update_order_with_http_info(id, opts) + +```ruby +begin + # update order + data, status_code, headers = api_instance.update_order_with_http_info(id, opts) + p status_code # => 2xx + p headers # => { ... } + p data # => +rescue PrimaryConnectClient::ApiError => e + puts "Error when calling DefaultApi->update_order_with_http_info: #{e}" +end +``` + +### Parameters + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | id | | +| **order** | [**Order**](Order.md) | | [optional] | + +### Return type + +[**OrderIds**](OrderIds.md) + +### Authorization + +[bearer_auth](../README.md#bearer_auth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + diff --git a/docs/Error.md b/docs/Error.md new file mode 100644 index 0000000..043ac04 --- /dev/null +++ b/docs/Error.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::Error + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **error** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Error.new( + error: null +) +``` + diff --git a/docs/Event.md b/docs/Event.md new file mode 100644 index 0000000..06867f7 --- /dev/null +++ b/docs/Event.md @@ -0,0 +1,26 @@ +# PrimaryConnectClient::Event + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **eventable_type** | **String** | | [optional] | +| **created_at** | **String** | | [optional] | +| **id** | **String** | | [optional] | +| **eventable_id** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Event.new( + type: null, + eventable_type: null, + created_at: null, + id: null, + eventable_id: null +) +``` + diff --git a/docs/Events.md b/docs/Events.md new file mode 100644 index 0000000..b1e41a6 --- /dev/null +++ b/docs/Events.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::Events + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **events** | [**Array<Event>**](Event.md) | List of events (max 25) | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Events.new( + events: null +) +``` + diff --git a/docs/Identifier.md b/docs/Identifier.md new file mode 100644 index 0000000..e4c602a --- /dev/null +++ b/docs/Identifier.md @@ -0,0 +1,20 @@ +# PrimaryConnectClient::Identifier + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **id_type** | **String** | E.g. MRN, EPI, EHRI, NIST, NPI, Payor ID | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Identifier.new( + id: null, + id_type: 1234567 +) +``` + diff --git a/docs/Location.md b/docs/Location.md new file mode 100644 index 0000000..eaa0798 --- /dev/null +++ b/docs/Location.md @@ -0,0 +1,26 @@ +# PrimaryConnectClient::Location + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | E.g. Clinic, Department, Home, Nursing Unit, Provider's Office, Phone | [optional] | +| **facility** | **String** | | [optional] | +| **department** | **String** | | [optional] | +| **room** | **String** | | [optional] | +| **bed** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Location.new( + type: Clinic, + facility: Community Hospital, + department: null, + room: 136, + bed: B +) +``` + diff --git a/docs/Meta.md b/docs/Meta.md new file mode 100644 index 0000000..f2b2d16 --- /dev/null +++ b/docs/Meta.md @@ -0,0 +1,32 @@ +# PrimaryConnectClient::Meta + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **event_type** | **String** | | [optional] | +| **event_date_and_time** | **Time** | | [optional] | +| **test** | **Boolean** | | [optional] | +| **source** | [**MetaSource**](MetaSource.md) | | [optional] | +| **destinations** | [**Array<MetaDestinations>**](MetaDestinations.md) | | [optional] | +| **message** | [**MetaMessage**](MetaMessage.md) | | [optional] | +| **transmission** | [**MetaMessage**](MetaMessage.md) | | [optional] | +| **facility_code** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Meta.new( + event_type: EVENT_TYPE_NEW, + event_date_and_time: 2021-07-30T20:27:55Z, + test: true, + source: null, + destinations: null, + message: null, + transmission: null, + facility_code: 123 +) +``` + diff --git a/docs/MetaDestinations.md b/docs/MetaDestinations.md new file mode 100644 index 0000000..2ce9a05 --- /dev/null +++ b/docs/MetaDestinations.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::MetaDestinations + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | | +| **name** | **String** | | [optional] | +| **config** | **Object** | Arbitrary key/value pairs for Lab specific use | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::MetaDestinations.new( + id: 01FXNPV4TCTGRSV4EGTJMW0D0Y, + name: Sample Lab, + config: {"key1":"value1","key2":"value2"} +) +``` + diff --git a/docs/MetaMessage.md b/docs/MetaMessage.md new file mode 100644 index 0000000..7dae27d --- /dev/null +++ b/docs/MetaMessage.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::MetaMessage + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::MetaMessage.new( + id: 12345 +) +``` + diff --git a/docs/MetaSource.md b/docs/MetaSource.md new file mode 100644 index 0000000..66bd012 --- /dev/null +++ b/docs/MetaSource.md @@ -0,0 +1,20 @@ +# PrimaryConnectClient::MetaSource + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **name** | **String** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::MetaSource.new( + id: 1, + name: Primary Connect +) +``` + diff --git a/docs/Name.md b/docs/Name.md new file mode 100644 index 0000000..49ec1a7 --- /dev/null +++ b/docs/Name.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::Name + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **first_name** | **String** | | [optional] | +| **last_name** | **String** | | [optional] | +| **middle_name** | **String** | middle name or middle initial. For people with multiple middle names, all their middle names are included in this field. | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Name.new( + first_name: George, + last_name: Lopez, + middle_name: James +) +``` + diff --git a/docs/Order.md b/docs/Order.md new file mode 100644 index 0000000..6f53560 --- /dev/null +++ b/docs/Order.md @@ -0,0 +1,24 @@ +# PrimaryConnectClient::Order + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **order** | [**OrderOrder**](OrderOrder.md) | | [optional] | +| **patient** | [**Patient**](Patient.md) | | [optional] | +| **visit** | [**Visit**](Visit.md) | | [optional] | +| **meta** | [**Meta**](Meta.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Order.new( + order: null, + patient: null, + visit: null, + meta: null +) +``` + diff --git a/docs/OrderIds.md b/docs/OrderIds.md new file mode 100644 index 0000000..46b4105 --- /dev/null +++ b/docs/OrderIds.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::OrderIds + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **orders** | **Array<String>** | List of Order IDs | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderIds.new( + orders: null +) +``` + diff --git a/docs/OrderOrder.md b/docs/OrderOrder.md new file mode 100644 index 0000000..4c459be --- /dev/null +++ b/docs/OrderOrder.md @@ -0,0 +1,56 @@ +# PrimaryConnectClient::OrderOrder + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | ID of the order assigned by the placing system | [optional] | +| **application_order_id** | **String** | ID assigned by the application fulfilling the order | [optional] | +| **status** | **String** | The status of an order. | [optional] | +| **transaction_date_time** | **Time** | Timestamp when the order was placed | [optional] | +| **collection_date_time** | **Time** | Timestamp when the specimen was collected | [optional] | +| **completion_date_time** | **Time** | Timestamp when the results were composed into a report and released. | [optional] | +| **expiration_date** | **String** | YYYY-MM-DD, Date when the order becomes invalid | [optional] | +| **specimen** | [**OrderOrderSpecimen**](OrderOrderSpecimen.md) | | [optional] | +| **procedure** | [**CodedValue**](CodedValue.md) | | [optional] | +| **ordering_provider** | [**Provider**](Provider.md) | | [optional] | +| **result_copy_providers** | [**Array<Provider>**](Provider.md) | Array of providers to be copied on the results | [optional] | +| **ordering_facility** | [**OrderOrderOrderingFacility**](OrderOrderOrderingFacility.md) | | [optional] | +| **priority** | **String** | Priority of the order | [optional] | +| **diagnoses** | [**Array<OrderOrderDiagnoses>**](OrderOrderDiagnoses.md) | List of diagnoses associated with this order | [optional] | +| **clinical_comments** | **String** | Clinically relevant comments regarding the order | [optional] | +| **notes** | **Array<String>** | Order-level notes | [optional] | +| **clinical_info** | [**Array<OrderOrderClinicalInfo>**](OrderOrderClinicalInfo.md) | List of supplementary clinical information associated with the order. Often these are answers to Ask at Order Entry (AOE) questions. | [optional] | +| **results_status** | **String** | Current overall status of the order | [optional] | +| **response_flag** | **String** | Specificity of the response requested from the receiving system | [optional] | +| **results** | [**Array<Result>**](Result.md) | List of result components | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderOrder.new( + id: 12345, + application_order_id: 67890, + status: null, + transaction_date_time: 2021-07-10T12:35:45-07:00, + collection_date_time: 2021-07-10T12:35:45-07:00, + completion_date_time: 2021-07-10T12:35:45-07:00, + expiration_date: 2022-05-23, + specimen: null, + procedure: null, + ordering_provider: null, + result_copy_providers: null, + ordering_facility: null, + priority: null, + diagnoses: null, + clinical_comments: null, + notes: null, + clinical_info: null, + results_status: null, + response_flag: null, + results: null +) +``` + diff --git a/docs/OrderOrderClinicalInfo.md b/docs/OrderOrderClinicalInfo.md new file mode 100644 index 0000000..79814ae --- /dev/null +++ b/docs/OrderOrderClinicalInfo.md @@ -0,0 +1,26 @@ +# PrimaryConnectClient::OrderOrderClinicalInfo + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | [**CodedValue**](CodedValue.md) | | [optional] | +| **value** | **String** | Value of the information element. For AOEs, this is typically the full answer | [optional] | +| **units** | **String** | Units of the value. If the Value is a time range, this may be \"WK\" | [optional] | +| **abbreviation** | **String** | Abbreviation of the value of the information element. Typically only present for text answer AOEs | [optional] | +| **notes** | **Array<String>** | Notes related to the clinical info | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderOrderClinicalInfo.new( + code: null, + value: Yes, + units: null, + abbreviation: null, + notes: null +) +``` + diff --git a/docs/OrderOrderDiagnoses.md b/docs/OrderOrderDiagnoses.md new file mode 100644 index 0000000..1f22566 --- /dev/null +++ b/docs/OrderOrderDiagnoses.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::OrderOrderDiagnoses + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | [**CodedValue**](CodedValue.md) | | [optional] | +| **type** | **String** | Type of the diagnosis | [optional] | +| **documented_date_time** | **Time** | Timestamp of the the diagnosis was documented | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderOrderDiagnoses.new( + code: null, + type: null, + documented_date_time: null +) +``` + diff --git a/docs/OrderOrderOrderingFacility.md b/docs/OrderOrderOrderingFacility.md new file mode 100644 index 0000000..e9ffd01 --- /dev/null +++ b/docs/OrderOrderOrderingFacility.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::OrderOrderOrderingFacility + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderOrderOrderingFacility.new( + name: Test Facility, + address: null, + phone_numbers: null +) +``` + diff --git a/docs/OrderOrderSpecimen.md b/docs/OrderOrderSpecimen.md new file mode 100644 index 0000000..45cbf3e --- /dev/null +++ b/docs/OrderOrderSpecimen.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::OrderOrderSpecimen + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | ID of the collected specimen | [optional] | +| **source** | **String** | Source of the specimen | [optional] | +| **body_site** | **String** | Body site from which the specimen was collected | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderOrderSpecimen.new( + id: PB124567890, + source: nares, + body_site: null +) +``` + diff --git a/docs/OrderWithEventErrors.md b/docs/OrderWithEventErrors.md new file mode 100644 index 0000000..5e1831b --- /dev/null +++ b/docs/OrderWithEventErrors.md @@ -0,0 +1,20 @@ +# PrimaryConnectClient::OrderWithEventErrors + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **order** | [**Order**](Order.md) | | [optional] | +| **errors** | **Array<String>** | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrderWithEventErrors.new( + order: null, + errors: null +) +``` + diff --git a/docs/Orders.md b/docs/Orders.md new file mode 100644 index 0000000..c0812f9 --- /dev/null +++ b/docs/Orders.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::Orders + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **orders** | [**Array<OrdersOrders>**](OrdersOrders.md) | List of orders (max 25) | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Orders.new( + orders: null +) +``` + diff --git a/docs/OrdersOrders.md b/docs/OrdersOrders.md new file mode 100644 index 0000000..537217a --- /dev/null +++ b/docs/OrdersOrders.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::OrdersOrders + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | | [optional] | +| **state** | **String** | | [optional] | +| **order** | [**Order**](Order.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::OrdersOrders.new( + id: null, + state: null, + order: null +) +``` + diff --git a/docs/Patient.md b/docs/Patient.md new file mode 100644 index 0000000..fb0c190 --- /dev/null +++ b/docs/Patient.md @@ -0,0 +1,24 @@ +# PrimaryConnectClient::Patient + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifiers** | [**Array<Identifier>**](Identifier.md) | List of IDs and types that identify the patient | [optional] | +| **demographics** | [**PatientDemographics**](PatientDemographics.md) | | [optional] | +| **notes** | **Array<String>** | Patient-level notes | [optional] | +| **contacts** | [**Array<PatientContacts>**](PatientContacts.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Patient.new( + identifiers: null, + demographics: null, + notes: null, + contacts: null +) +``` + diff --git a/docs/PatientContacts.md b/docs/PatientContacts.md new file mode 100644 index 0000000..95d0420 --- /dev/null +++ b/docs/PatientContacts.md @@ -0,0 +1,28 @@ +# PrimaryConnectClient::PatientContacts + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | [**Name**](Name.md) | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | +| **relation_to_patient** | **String** | Personal relationship to the patient | [optional] | +| **email_addresses** | **Array<String>** | | [optional] | +| **roles** | **Array<String>** | e.g. Employer, Emergency Contact | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::PatientContacts.new( + name: null, + address: null, + phone_numbers: null, + relation_to_patient: null, + email_addresses: null, + roles: null +) +``` + diff --git a/docs/PatientDemographics.md b/docs/PatientDemographics.md new file mode 100644 index 0000000..f768a10 --- /dev/null +++ b/docs/PatientDemographics.md @@ -0,0 +1,52 @@ +# PrimaryConnectClient::PatientDemographics + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | [**Name**](Name.md) | | [optional] | +| **dob** | **String** | | [optional] | +| **ssn** | **String** | | [optional] | +| **sex** | **String** | | [optional] | +| **gender** | **String** | | [optional] | +| **sexual_orientation** | **String** | | [optional] | +| **races** | **Array<String>** | | [optional] | +| **race_details** | **Array<String>** | | [optional] | +| **ethnicity** | **String** | | [optional] | +| **ethnicity_detail** | **Array<String>** | | [optional] | +| **marital_status** | **String** | | [optional] | +| **is_deceased** | **Boolean** | | [optional] | +| **death_date_time** | **Time** | ISO 8601 | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | +| **email_addresses** | **Array<String>** | | [optional] | +| **language_code** | **String** | | [optional] | +| **citizenships** | **Array<String>** | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::PatientDemographics.new( + name: null, + dob: 1992-07-23, + ssn: null, + sex: null, + gender: null, + sexual_orientation: null, + races: null, + race_details: null, + ethnicity: null, + ethnicity_detail: null, + marital_status: null, + is_deceased: null, + death_date_time: null, + phone_numbers: null, + email_addresses: null, + language_code: en, + citizenships: null, + address: null +) +``` + diff --git a/docs/PhoneNumber.md b/docs/PhoneNumber.md new file mode 100644 index 0000000..0a102dd --- /dev/null +++ b/docs/PhoneNumber.md @@ -0,0 +1,20 @@ +# PrimaryConnectClient::PhoneNumber + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **type** | **String** | | [optional] | +| **number** | **String** | E.164 | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::PhoneNumber.new( + type: null, + number: +15555555555 +) +``` + diff --git a/docs/Provider.md b/docs/Provider.md new file mode 100644 index 0000000..dad371d --- /dev/null +++ b/docs/Provider.md @@ -0,0 +1,32 @@ +# PrimaryConnectClient::Provider + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifier** | [**Identifier**](Identifier.md) | | [optional] | +| **npi** | **String** | | [optional] | +| **name** | [**Name**](Name.md) | | [optional] | +| **credentials** | **Array<String>** | List of credentials for the provider. e.g. MD, PhD | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | +| **email_addresses** | **Array<String>** | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | +| **location** | [**Location**](Location.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Provider.new( + identifier: null, + npi: 1234567890, + name: null, + credentials: null, + address: null, + email_addresses: null, + phone_numbers: null, + location: null +) +``` + diff --git a/docs/Result.md b/docs/Result.md new file mode 100644 index 0000000..5fc820f --- /dev/null +++ b/docs/Result.md @@ -0,0 +1,50 @@ +# PrimaryConnectClient::Result + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **code** | [**CodedValue**](CodedValue.md) | | [optional] | +| **related_group_id** | **Array<String>** | ID to group separate result components | [optional] | +| **specimen** | [**ResultSpecimen**](ResultSpecimen.md) | | [optional] | +| **value** | **String** | Value of the result component | [optional] | +| **value_type** | **String** | Data type for the result value | [optional] | +| **completion_date_time** | **Time** | Timestamp when the results were composed into a report and released. | [optional] | +| **report** | [**ResultReport**](ResultReport.md) | | [optional] | +| **units** | **String** | Units of the result | [optional] | +| **notes** | **Array<String>** | Notes about the result component/observation | [optional] | +| **abnormal_flag** | **String** | Indication of whether the result was abnormal | [optional] | +| **status** | **String** | Current status of the result | [optional] | +| **primary_result_interpreter** | [**Provider**](Provider.md) | | [optional] | +| **producer** | **Object** | | [optional] | +| **performer** | [**Provider**](Provider.md) | | [optional] | +| **reference_range** | [**ResultReferenceRange**](ResultReferenceRange.md) | | [optional] | +| **observation_method** | [**CodedValue**](CodedValue.md) | | [optional] | +| **producer_order_id** | **String** | Unique ID generated by resulting entity | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Result.new( + code: null, + related_group_id: null, + specimen: null, + value: negative, + value_type: STRING, + completion_date_time: 2021-07-10T12:35:45-07:00, + report: null, + units: null, + notes: null, + abnormal_flag: null, + status: null, + primary_result_interpreter: null, + producer: null, + performer: null, + reference_range: null, + observation_method: null, + producer_order_id: 12345678 +) +``` + diff --git a/docs/ResultIds.md b/docs/ResultIds.md new file mode 100644 index 0000000..31a5808 --- /dev/null +++ b/docs/ResultIds.md @@ -0,0 +1,18 @@ +# PrimaryConnectClient::ResultIds + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **results** | **Array<String>** | List of Result IDs | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::ResultIds.new( + results: null +) +``` + diff --git a/docs/ResultReferenceRange.md b/docs/ResultReferenceRange.md new file mode 100644 index 0000000..2255fc4 --- /dev/null +++ b/docs/ResultReferenceRange.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::ResultReferenceRange + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **low** | **Integer** | Lower bound for a normal result | [optional] | +| **high** | **Integer** | Upper bound for a normal result | [optional] | +| **text** | **String** | Normal value for non-numeric results | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::ResultReferenceRange.new( + low: null, + high: null, + text: null +) +``` + diff --git a/docs/ResultReport.md b/docs/ResultReport.md new file mode 100644 index 0000000..52d2faa --- /dev/null +++ b/docs/ResultReport.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::ResultReport + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **file_type** | **String** | Report MIME type | [optional] | +| **data** | **String** | Base64 encoded report | [optional] | +| **url** | **String** | Report URL redirect | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::ResultReport.new( + file_type: application/pdf, + data: <BASE64 ENCODED PDF>, + url: https://example.com/report?12345 +) +``` + diff --git a/docs/ResultSpecimen.md b/docs/ResultSpecimen.md new file mode 100644 index 0000000..b66fc70 --- /dev/null +++ b/docs/ResultSpecimen.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::ResultSpecimen + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **id** | **String** | ID of the collected specimen | [optional] | +| **source** | **String** | Source of the specimen | [optional] | +| **body_site** | **String** | Body site from which the specimen was collected | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::ResultSpecimen.new( + id: PB123456789, + source: nasal, + body_site: null +) +``` + diff --git a/docs/Results.md b/docs/Results.md new file mode 100644 index 0000000..01d60b9 --- /dev/null +++ b/docs/Results.md @@ -0,0 +1,20 @@ +# PrimaryConnectClient::Results + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **meta** | [**Meta**](Meta.md) | | [optional] | +| **result** | [**Array<Result>**](Result.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Results.new( + meta: null, + result: null +) +``` + diff --git a/docs/Visit.md b/docs/Visit.md new file mode 100644 index 0000000..78d6aef --- /dev/null +++ b/docs/Visit.md @@ -0,0 +1,36 @@ +# PrimaryConnectClient::Visit + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **visit_number** | **String** | Unique ID of a single visit | [optional] | +| **account_number** | **String** | An ID that can span several visits often related to the same issue - pregnancy, surgeries, research study, etc. | [optional] | +| **patient_class** | **String** | Patient class is used in many EHRs to determine where to put the patient. E.g. Inpatient, Outpatient, Emergency | [optional] | +| **visit_date_time** | **Time** | Timestamp of visit or the arrival time of the visit or admission. | [optional] | +| **attending_provider** | [**Provider**](Provider.md) | | [optional] | +| **consulting_provider** | [**Provider**](Provider.md) | | [optional] | +| **referring_provider** | [**Provider**](Provider.md) | | [optional] | +| **guarantor** | [**VisitGuarantor**](VisitGuarantor.md) | | [optional] | +| **insurances** | [**Array<VisitInsurances>**](VisitInsurances.md) | List of insurance coverages for the patient | [optional] | +| **location** | [**Location**](Location.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::Visit.new( + visit_number: 12345, + account_number: null, + patient_class: null, + visit_date_time: 2021-07-10T12:20:11-07:00, + attending_provider: null, + consulting_provider: null, + referring_provider: null, + guarantor: null, + insurances: null, + location: null +) +``` + diff --git a/docs/VisitCompany.md b/docs/VisitCompany.md new file mode 100644 index 0000000..a54e887 --- /dev/null +++ b/docs/VisitCompany.md @@ -0,0 +1,24 @@ +# PrimaryConnectClient::VisitCompany + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifier** | [**Identifier**](Identifier.md) | | [optional] | +| **name** | **String** | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitCompany.new( + identifier: null, + name: Aetna, + address: null, + phone_numbers: null +) +``` + diff --git a/docs/VisitGuarantor.md b/docs/VisitGuarantor.md new file mode 100644 index 0000000..d2fb012 --- /dev/null +++ b/docs/VisitGuarantor.md @@ -0,0 +1,40 @@ +# PrimaryConnectClient::VisitGuarantor + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **number** | **String** | Number of the guarantor (?) | [optional] | +| **name** | [**Name**](Name.md) | | [optional] | +| **ssn** | **String** | | [optional] | +| **dob** | **String** | Date of Birth | [optional] | +| **sex** | **String** | | [optional] | +| **spouse** | [**Name**](Name.md) | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | +| **email_addresses** | **Array<String>** | | [optional] | +| **type** | **String** | | [optional] | +| **relation_to_patient** | **String** | | [optional] | +| **employer** | [**VisitGuarantorEmployer**](VisitGuarantorEmployer.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitGuarantor.new( + number: null, + name: null, + ssn: null, + dob: 1952-09-03, + sex: null, + spouse: null, + address: null, + phone_numbers: null, + email_addresses: null, + type: null, + relation_to_patient: null, + employer: null +) +``` + diff --git a/docs/VisitGuarantorEmployer.md b/docs/VisitGuarantorEmployer.md new file mode 100644 index 0000000..b1a523a --- /dev/null +++ b/docs/VisitGuarantorEmployer.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::VisitGuarantorEmployer + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **name** | **String** | | [optional] | +| **phone_numbers** | [**Array<PhoneNumber>**](PhoneNumber.md) | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitGuarantorEmployer.new( + name: ABC Inc., + phone_numbers: null, + address: null +) +``` + diff --git a/docs/VisitInsurances.md b/docs/VisitInsurances.md new file mode 100644 index 0000000..0f74342 --- /dev/null +++ b/docs/VisitInsurances.md @@ -0,0 +1,40 @@ +# PrimaryConnectClient::VisitInsurances + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **plan** | [**VisitPlan**](VisitPlan.md) | | [optional] | +| **member_number** | **Array<String>** | Patient member number | [optional] | +| **company** | [**VisitCompany**](VisitCompany.md) | | [optional] | +| **group_number** | **String** | Insurance policy group number | [optional] | +| **group_name** | **String** | Insurance policy group name | [optional] | +| **effective_date** | **String** | YYYY-MM-DD, Effect date of this insurance policy | [optional] | +| **expiration_date** | **String** | YYYY-MM-DD, Expiration date of this insurance policy | [optional] | +| **policy_number** | **String** | Insurance policy number | [optional] | +| **priority** | **String** | The insurance priority sequence | [optional] | +| **agreement_type** | **String** | Type of insurance agreement | [optional] | +| **coverage_type** | **String** | Type of insurance Agreement | [optional] | +| **insured** | [**VisitInsured**](VisitInsured.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitInsurances.new( + plan: null, + member_number: null, + company: null, + group_number: 123456789, + group_name: null, + effective_date: 2021-01-01, + expiration_date: 2050-01-01, + policy_number: 987654321, + priority: null, + agreement_type: null, + coverage_type: null, + insured: null +) +``` + diff --git a/docs/VisitInsured.md b/docs/VisitInsured.md new file mode 100644 index 0000000..5635362 --- /dev/null +++ b/docs/VisitInsured.md @@ -0,0 +1,30 @@ +# PrimaryConnectClient::VisitInsured + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifiers** | [**Array<Identifier>**](Identifier.md) | | [optional] | +| **name** | [**Name**](Name.md) | | [optional] | +| **ssn** | **String** | | [optional] | +| **relationship** | **String** | | [optional] | +| **dob** | **String** | Date of Birth | [optional] | +| **sex** | **String** | | [optional] | +| **address** | [**Address**](Address.md) | | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitInsured.new( + identifiers: null, + name: null, + ssn: null, + relationship: null, + dob: 1949-12-26, + sex: null, + address: null +) +``` + diff --git a/docs/VisitPlan.md b/docs/VisitPlan.md new file mode 100644 index 0000000..05c520d --- /dev/null +++ b/docs/VisitPlan.md @@ -0,0 +1,22 @@ +# PrimaryConnectClient::VisitPlan + +## Properties + +| Name | Type | Description | Notes | +| ---- | ---- | ----------- | ----- | +| **identifier** | [**Identifier**](Identifier.md) | | [optional] | +| **name** | **String** | Name of insurance plan | [optional] | +| **type** | **String** | Type of insurance plan | [optional] | + +## Example + +```ruby +require 'primary_connect_client' + +instance = PrimaryConnectClient::VisitPlan.new( + identifier: null, + name: Insurance Plan name, + type: Insurance Plan Type +) +``` + diff --git a/git_push.sh b/git_push.sh index ced3be2..b559070 100644 --- a/git_push.sh +++ b/git_push.sh @@ -1,7 +1,7 @@ #!/bin/sh # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # -# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" +# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" git_user_id=$1 git_repo_id=$2 @@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then fi if [ "$git_user_id" = "" ]; then - git_user_id="GIT_USER_ID" + git_user_id="PrimaryDotHealth" echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" fi if [ "$git_repo_id" = "" ]; then - git_repo_id="GIT_REPO_ID" + git_repo_id="connect-ruby-client" echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" fi @@ -38,14 +38,14 @@ git add . git commit -m "$release_note" # Sets the new remote -git_remote=`git remote` +git_remote=$(git remote) if [ "$git_remote" = "" ]; then # git remote not defined if [ "$GIT_TOKEN" = "" ]; then echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git else - git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git + git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git fi fi @@ -55,4 +55,3 @@ git pull origin master # Pushes (Forces) the changes in the local repository up to the remote repository echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" git push origin master 2>&1 | grep -v 'To https' - diff --git a/lib/primary_connect_client.rb b/lib/primary_connect_client.rb index b96a7d2..d0eb23c 100644 --- a/lib/primary_connect_client.rb +++ b/lib/primary_connect_client.rb @@ -5,6 +5,9 @@ The version of the OpenAPI document: v1 +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + =end # Common files @@ -13,12 +16,51 @@ require 'primary_connect_client/version' require 'primary_connect_client/configuration' +# Models +require 'primary_connect_client/models/address' +require 'primary_connect_client/models/coded_value' +require 'primary_connect_client/models/error' +require 'primary_connect_client/models/event' +require 'primary_connect_client/models/events' +require 'primary_connect_client/models/identifier' +require 'primary_connect_client/models/location' +require 'primary_connect_client/models/meta' +require 'primary_connect_client/models/meta_destinations' +require 'primary_connect_client/models/meta_message' +require 'primary_connect_client/models/meta_source' +require 'primary_connect_client/models/name' +require 'primary_connect_client/models/order' +require 'primary_connect_client/models/order_ids' +require 'primary_connect_client/models/order_order' +require 'primary_connect_client/models/order_order_clinical_info' +require 'primary_connect_client/models/order_order_diagnoses' +require 'primary_connect_client/models/order_order_ordering_facility' +require 'primary_connect_client/models/order_order_specimen' +require 'primary_connect_client/models/order_with_event_errors' +require 'primary_connect_client/models/orders' +require 'primary_connect_client/models/orders_orders' +require 'primary_connect_client/models/patient' +require 'primary_connect_client/models/patient_contacts' +require 'primary_connect_client/models/patient_demographics' +require 'primary_connect_client/models/phone_number' +require 'primary_connect_client/models/provider' +require 'primary_connect_client/models/result' +require 'primary_connect_client/models/result_ids' +require 'primary_connect_client/models/result_reference_range' +require 'primary_connect_client/models/result_report' +require 'primary_connect_client/models/result_specimen' +require 'primary_connect_client/models/results' +require 'primary_connect_client/models/visit' +require 'primary_connect_client/models/visit_company' +require 'primary_connect_client/models/visit_guarantor' +require 'primary_connect_client/models/visit_guarantor_employer' +require 'primary_connect_client/models/visit_insurances' +require 'primary_connect_client/models/visit_insured' +require 'primary_connect_client/models/visit_plan' + # APIs require 'primary_connect_client/api/default_api' -# Protobufs -require 'primary_connect_proto' - module PrimaryConnectClient class << self # Customize default settings for the SDK using block. diff --git a/lib/primary_connect_client/api/default_api.rb b/lib/primary_connect_client/api/default_api.rb index 2082003..7d532d0 100644 --- a/lib/primary_connect_client/api/default_api.rb +++ b/lib/primary_connect_client/api/default_api.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.3.0-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end @@ -22,7 +22,7 @@ def initialize(api_client = ApiClient.default) # create order # @param [Hash] opts the optional parameters # @option opts [Order] :order - # @return [Object] + # @return [OrderIds] def create_order(opts = {}) data, _status_code, _headers = create_order_with_http_info(opts) data @@ -31,7 +31,7 @@ def create_order(opts = {}) # create order # @param [Hash] opts the optional parameters # @option opts [Order] :order - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers def create_order_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.create_order ...' @@ -47,7 +47,10 @@ def create_order_with_http_info(opts = {}) # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' - header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} @@ -56,7 +59,7 @@ def create_order_with_http_info(opts = {}) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order']) # return_type - return_type = opts[:debug_return_type] || 'Object' + return_type = opts[:debug_return_type] || 'OrderIds' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] @@ -78,29 +81,31 @@ def create_order_with_http_info(opts = {}) return data, status_code, headers end - # show order - # @param id [String] id + # create result + # @param order_id [String] Order id # @param [Hash] opts the optional parameters - # @return [Object] - def get_order(id, opts = {}) - data, _status_code, _headers = get_order_with_http_info(id, opts) + # @option opts [Result] :result + # @return [ResultIds] + def create_result(order_id, opts = {}) + data, _status_code, _headers = create_result_with_http_info(order_id, opts) data end - # show order - # @param id [String] id + # create result + # @param order_id [String] Order id # @param [Hash] opts the optional parameters - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers - def get_order_with_http_info(id, opts = {}) + # @option opts [Result] :result + # @return [Array<(ResultIds, Integer, Hash)>] ResultIds data, response status code and response headers + def create_result_with_http_info(order_id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...' + @api_client.config.logger.debug 'Calling API: DefaultApi.create_result ...' end - # verify the required parameter 'id' is set - if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order" + # verify the required parameter 'order_id' is set + if @api_client.config.client_side_validation && order_id.nil? + fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.create_result" end # resource path - local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + local_var_path = '/api/v1/orders/{order_id}/results'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s)) # query parameters query_params = opts[:query_params] || {} @@ -109,21 +114,26 @@ def get_order_with_http_info(id, opts = {}) header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end # form parameters form_params = opts[:form_params] || {} # http body (model) - post_body = opts[:debug_body] + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'result']) # return_type - return_type = opts[:debug_return_type] || 'Object' + return_type = opts[:debug_return_type] || 'ResultIds' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] new_options = opts.merge( - :operation => :"DefaultApi.get_order", + :operation => :"DefaultApi.create_result", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -132,9 +142,9 @@ def get_order_with_http_info(id, opts = {}) :return_type => return_type ) - data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) + data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: DefaultApi#create_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end @@ -142,9 +152,10 @@ def get_order_with_http_info(id, opts = {}) # show lab report # @param result_id [String] Result id # @param [Hash] opts the optional parameters - # @return report SS: previously generated as nil + # @return [nil] def get_lab_report(result_id, opts = {}) get_lab_report_with_http_info(result_id, opts) + nil end # show lab report @@ -167,6 +178,8 @@ def get_lab_report_with_http_info(result_id, opts = {}) # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -175,7 +188,7 @@ def get_lab_report_with_http_info(result_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'String' # SS: set lab report return type as String + return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] @@ -190,49 +203,44 @@ def get_lab_report_with_http_info(result_id, opts = {}) :return_type => return_type ) - # SS: Previously generated as nil so nothing was returned. Added below to get the lab report data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging @api_client.config.logger.debug "API called: DefaultApi#get_lab_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end - return data + return data, status_code, headers end - # show result - # @param order_id [String] Order id - # @param id [String] Result id + # show order + # @param id [String] id # @param [Hash] opts the optional parameters - # @return [nil] - def get_result(order_id, id, opts = {}) - get_result_with_http_info(order_id, id, opts) - nil + # @return [OrderWithEventErrors] + def get_order(id, opts = {}) + data, _status_code, _headers = get_order_with_http_info(id, opts) + data end - # show result - # @param order_id [String] Order id - # @param id [String] Result id + # show order + # @param id [String] id # @param [Hash] opts the optional parameters - # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def get_result_with_http_info(order_id, id, opts = {}) + # @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers + def get_order_with_http_info(id, opts = {}) if @api_client.config.debugging - @api_client.config.logger.debug 'Calling API: DefaultApi.get_result ...' - end - # verify the required parameter 'order_id' is set - if @api_client.config.client_side_validation && order_id.nil? - fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.get_result" + @api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? - fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_result" + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order" end # resource path - local_var_path = '/api/v1/orders/{order_id}/results/{id}'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s)).sub('{' + 'id' + '}', CGI.escape(id.to_s)) + local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} @@ -241,13 +249,13 @@ def get_result_with_http_info(order_id, id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] + return_type = opts[:debug_return_type] || 'OrderWithEventErrors' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] new_options = opts.merge( - :operation => :"DefaultApi.get_result", + :operation => :"DefaultApi.get_order", :header_params => header_params, :query_params => query_params, :form_params => form_params, @@ -258,16 +266,16 @@ def get_result_with_http_info(order_id, id, opts = {}) data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options) if @api_client.config.debugging - @api_client.config.logger.debug "API called: DefaultApi#get_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + @api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end # list events # @param [Hash] opts the optional parameters - # @option opts [String] :last_event_id Paginate events with event id - # @option opts [String] :event_types Filter event_types, comma delimited - # @return [Object] + # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id. + # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived] + # @return [Events] def list_events(opts = {}) data, _status_code, _headers = list_events_with_http_info(opts) data @@ -275,9 +283,9 @@ def list_events(opts = {}) # list events # @param [Hash] opts the optional parameters - # @option opts [String] :last_event_id Paginate events with event id - # @option opts [String] :event_types Filter event_types, comma delimited - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id. + # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived] + # @return [Array<(Events, Integer, Hash)>] Events data, response status code and response headers def list_events_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...' @@ -302,7 +310,7 @@ def list_events_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'Object' + return_type = opts[:debug_return_type] || 'Events' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] @@ -326,9 +334,9 @@ def list_events_with_http_info(opts = {}) # list orders # @param [Hash] opts the optional parameters - # @option opts [String] :last_order_id Paginate orders with order id - # @option opts [String] :state Filter orders by state, comma delimited - # @return [Object] + # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id. + # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable] + # @return [Orders] def list_orders(opts = {}) data, _status_code, _headers = list_orders_with_http_info(opts) data @@ -336,9 +344,9 @@ def list_orders(opts = {}) # list orders # @param [Hash] opts the optional parameters - # @option opts [String] :last_order_id Paginate orders with order id - # @option opts [String] :state Filter orders by state, comma delimited - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id. + # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable] + # @return [Array<(Orders, Integer, Hash)>] Orders data, response status code and response headers def list_orders_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.list_orders ...' @@ -363,7 +371,7 @@ def list_orders_with_http_info(opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'Object' + return_type = opts[:debug_return_type] || 'Orders' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] @@ -388,7 +396,7 @@ def list_orders_with_http_info(opts = {}) # list results # @param order_id [String] Order id # @param [Hash] opts the optional parameters - # @return [Object] + # @return [Results] def list_results(order_id, opts = {}) data, _status_code, _headers = list_results_with_http_info(order_id, opts) data @@ -397,7 +405,7 @@ def list_results(order_id, opts = {}) # list results # @param order_id [String] Order id # @param [Hash] opts the optional parameters - # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers + # @return [Array<(Results, Integer, Hash)>] Results data, response status code and response headers def list_results_with_http_info(order_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: DefaultApi.list_results ...' @@ -424,7 +432,7 @@ def list_results_with_http_info(order_id, opts = {}) post_body = opts[:debug_body] # return_type - return_type = opts[:debug_return_type] || 'Object' + return_type = opts[:debug_return_type] || 'Results' # auth_names auth_names = opts[:debug_auth_names] || ['bearer_auth'] @@ -445,5 +453,73 @@ def list_results_with_http_info(order_id, opts = {}) end return data, status_code, headers end + + # update order + # @param id [String] id + # @param [Hash] opts the optional parameters + # @option opts [Order] :order + # @return [OrderIds] + def update_order(id, opts = {}) + data, _status_code, _headers = update_order_with_http_info(id, opts) + data + end + + # update order + # @param id [String] id + # @param [Hash] opts the optional parameters + # @option opts [Order] :order + # @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers + def update_order_with_http_info(id, opts = {}) + if @api_client.config.debugging + @api_client.config.logger.debug 'Calling API: DefaultApi.update_order ...' + end + # verify the required parameter 'id' is set + if @api_client.config.client_side_validation && id.nil? + fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_order" + end + # resource path + local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s)) + + # query parameters + query_params = opts[:query_params] || {} + + # header parameters + header_params = opts[:header_params] || {} + # HTTP header 'Accept' (if needed) + header_params['Accept'] = @api_client.select_header_accept(['application/json']) + # HTTP header 'Content-Type' + content_type = @api_client.select_header_content_type(['application/json']) + if !content_type.nil? + header_params['Content-Type'] = content_type + end + + # form parameters + form_params = opts[:form_params] || {} + + # http body (model) + post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order']) + + # return_type + return_type = opts[:debug_return_type] || 'OrderIds' + + # auth_names + auth_names = opts[:debug_auth_names] || ['bearer_auth'] + + new_options = opts.merge( + :operation => :"DefaultApi.update_order", + :header_params => header_params, + :query_params => query_params, + :form_params => form_params, + :body => post_body, + :auth_names => auth_names, + :return_type => return_type + ) + + data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options) + if @api_client.config.debugging + @api_client.config.logger.debug "API called: DefaultApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" + end + return data, status_code, headers + end end end diff --git a/lib/primary_connect_client/api_client.rb b/lib/primary_connect_client/api_client.rb index 4b484aa..36201b5 100644 --- a/lib/primary_connect_client/api_client.rb +++ b/lib/primary_connect_client/api_client.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end @@ -109,8 +109,7 @@ def build_request(http_method, path, opts = {}) :ssl_verifyhost => _verify_ssl_host, :sslcert => @config.cert_file, :sslkey => @config.key_file, - :verbose => @config.debugging, - :followlocation => true # SS: Added to follow redirects + :verbose => @config.debugging } # set custom cert, if provided @@ -297,7 +296,7 @@ def build_request_url(path, opts = {}) @config.base_url(opts[:operation]) + path end - # Update hearder and query params based on authentication settings. + # Update header and query params based on authentication settings. # # @param [Hash] header_params Header parameters # @param [Hash] query_params Query parameters @@ -336,8 +335,8 @@ def select_header_accept(accepts) # @param [Array] content_types array for Content-Type # @return [String] the Content-Type header (e.g. application/json) def select_header_content_type(content_types) - # use application/json by default - return 'application/json' if content_types.nil? || content_types.empty? + # return nil by default + return if content_types.nil? || content_types.empty? # use JSON when present, otherwise use the first one json_content_type = content_types.find { |s| json_mime?(s) } json_content_type || content_types.first diff --git a/lib/primary_connect_client/api_error.rb b/lib/primary_connect_client/api_error.rb index 434682c..19f8a52 100644 --- a/lib/primary_connect_client/api_error.rb +++ b/lib/primary_connect_client/api_error.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end diff --git a/lib/primary_connect_client/configuration.rb b/lib/primary_connect_client/configuration.rb index a5e119e..dfc1911 100644 --- a/lib/primary_connect_client/configuration.rb +++ b/lib/primary_connect_client/configuration.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end @@ -147,13 +147,13 @@ def initialize @server_operation_variables = {} @api_key = {} @api_key_prefix = {} - @timeout = 0 @client_side_validation = true @verify_ssl = true @verify_ssl_host = true @params_encoding = nil @cert_file = nil @key_file = nil + @timeout = 0 @debugging = false @inject_format = false @force_ending_format = false @@ -289,5 +289,6 @@ def server_url(index, variables = {}, servers = nil) url end + end end diff --git a/lib/primary_connect_client/models/address.rb b/lib/primary_connect_client/models/address.rb new file mode 100644 index 0000000..b16890a --- /dev/null +++ b/lib/primary_connect_client/models/address.rb @@ -0,0 +1,272 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Address + attr_accessor :street_address_1 + + attr_accessor :street_address_2 + + attr_accessor :city + + attr_accessor :state_code + + attr_accessor :zip + + attr_accessor :county + + attr_accessor :country_code + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'street_address_1' => :'street_address_1', + :'street_address_2' => :'street_address_2', + :'city' => :'city', + :'state_code' => :'state_code', + :'zip' => :'zip', + :'county' => :'county', + :'country_code' => :'country_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'street_address_1' => :'String', + :'street_address_2' => :'String', + :'city' => :'String', + :'state_code' => :'String', + :'zip' => :'String', + :'county' => :'String', + :'country_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Address` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Address`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'street_address_1') + self.street_address_1 = attributes[:'street_address_1'] + end + + if attributes.key?(:'street_address_2') + self.street_address_2 = attributes[:'street_address_2'] + end + + if attributes.key?(:'city') + self.city = attributes[:'city'] + end + + if attributes.key?(:'state_code') + self.state_code = attributes[:'state_code'] + end + + if attributes.key?(:'zip') + self.zip = attributes[:'zip'] + end + + if attributes.key?(:'county') + self.county = attributes[:'county'] + end + + if attributes.key?(:'country_code') + self.country_code = attributes[:'country_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + street_address_1 == o.street_address_1 && + street_address_2 == o.street_address_2 && + city == o.city && + state_code == o.state_code && + zip == o.zip && + county == o.county && + country_code == o.country_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [street_address_1, street_address_2, city, state_code, zip, county, country_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/coded_value.rb b/lib/primary_connect_client/models/coded_value.rb new file mode 100644 index 0000000..d974144 --- /dev/null +++ b/lib/primary_connect_client/models/coded_value.rb @@ -0,0 +1,238 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class CodedValue + # E.g. 260373001 (SCT), 3006F (CPT), etc. + attr_accessor :value + + # E.g. SCT, LN, NDC, CPT, CVX, etc. + attr_accessor :code_set + + attr_accessor :description + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'value' => :'value', + :'code_set' => :'code_set', + :'description' => :'description' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'value' => :'String', + :'code_set' => :'String', + :'description' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::CodedValue` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::CodedValue`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'code_set') + self.code_set = attributes[:'code_set'] + end + + if attributes.key?(:'description') + self.description = attributes[:'description'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + value == o.value && + code_set == o.code_set && + description == o.description + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [value, code_set, description].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/error.rb b/lib/primary_connect_client/models/error.rb new file mode 100644 index 0000000..5a7a239 --- /dev/null +++ b/lib/primary_connect_client/models/error.rb @@ -0,0 +1,218 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Error + attr_accessor :error + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'error' => :'error' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'error' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Error` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Error`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'error') + self.error = attributes[:'error'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + error == o.error + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [error].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/event.rb b/lib/primary_connect_client/models/event.rb new file mode 100644 index 0000000..42c7378 --- /dev/null +++ b/lib/primary_connect_client/models/event.rb @@ -0,0 +1,254 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Event + attr_accessor :type + + attr_accessor :eventable_type + + attr_accessor :created_at + + attr_accessor :id + + attr_accessor :eventable_id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'eventable_type' => :'eventable_type', + :'created_at' => :'created_at', + :'id' => :'id', + :'eventable_id' => :'eventable_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'eventable_type' => :'String', + :'created_at' => :'String', + :'id' => :'String', + :'eventable_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Event` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Event`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'eventable_type') + self.eventable_type = attributes[:'eventable_type'] + end + + if attributes.key?(:'created_at') + self.created_at = attributes[:'created_at'] + end + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'eventable_id') + self.eventable_id = attributes[:'eventable_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + eventable_type == o.eventable_type && + created_at == o.created_at && + id == o.id && + eventable_id == o.eventable_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, eventable_type, created_at, id, eventable_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/events.rb b/lib/primary_connect_client/models/events.rb new file mode 100644 index 0000000..131bd0f --- /dev/null +++ b/lib/primary_connect_client/models/events.rb @@ -0,0 +1,221 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Events + # List of events (max 25) + attr_accessor :events + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'events' => :'events' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'events' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Events` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Events`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'events') + if (value = attributes[:'events']).is_a?(Array) + self.events = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + events == o.events + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [events].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/identifier.rb b/lib/primary_connect_client/models/identifier.rb new file mode 100644 index 0000000..874105d --- /dev/null +++ b/lib/primary_connect_client/models/identifier.rb @@ -0,0 +1,228 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Identifier + attr_accessor :id + + # E.g. MRN, EPI, EHRI, NIST, NPI, Payor ID + attr_accessor :id_type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'id_type' => :'id_type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'id_type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Identifier` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Identifier`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'id_type') + self.id_type = attributes[:'id_type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + id_type == o.id_type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, id_type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/location.rb b/lib/primary_connect_client/models/location.rb new file mode 100644 index 0000000..a11cc83 --- /dev/null +++ b/lib/primary_connect_client/models/location.rb @@ -0,0 +1,255 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Location + # E.g. Clinic, Department, Home, Nursing Unit, Provider's Office, Phone + attr_accessor :type + + attr_accessor :facility + + attr_accessor :department + + attr_accessor :room + + attr_accessor :bed + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'facility' => :'facility', + :'department' => :'department', + :'room' => :'room', + :'bed' => :'bed' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'facility' => :'String', + :'department' => :'String', + :'room' => :'String', + :'bed' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Location` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Location`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'facility') + self.facility = attributes[:'facility'] + end + + if attributes.key?(:'department') + self.department = attributes[:'department'] + end + + if attributes.key?(:'room') + self.room = attributes[:'room'] + end + + if attributes.key?(:'bed') + self.bed = attributes[:'bed'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + facility == o.facility && + department == o.department && + room == o.room && + bed == o.bed + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, facility, department, room, bed].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/meta.rb b/lib/primary_connect_client/models/meta.rb new file mode 100644 index 0000000..019791a --- /dev/null +++ b/lib/primary_connect_client/models/meta.rb @@ -0,0 +1,317 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Meta + attr_accessor :event_type + + attr_accessor :event_date_and_time + + attr_accessor :test + + attr_accessor :source + + attr_accessor :destinations + + attr_accessor :message + + attr_accessor :transmission + + attr_accessor :facility_code + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'event_type' => :'event_type', + :'event_date_and_time' => :'event_date_and_time', + :'test' => :'test', + :'source' => :'source', + :'destinations' => :'destinations', + :'message' => :'message', + :'transmission' => :'transmission', + :'facility_code' => :'facility_code' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'event_type' => :'String', + :'event_date_and_time' => :'Time', + :'test' => :'Boolean', + :'source' => :'MetaSource', + :'destinations' => :'Array', + :'message' => :'MetaMessage', + :'transmission' => :'MetaMessage', + :'facility_code' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Meta` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'event_type') + self.event_type = attributes[:'event_type'] + end + + if attributes.key?(:'event_date_and_time') + self.event_date_and_time = attributes[:'event_date_and_time'] + end + + if attributes.key?(:'test') + self.test = attributes[:'test'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'destinations') + if (value = attributes[:'destinations']).is_a?(Array) + self.destinations = value + end + end + + if attributes.key?(:'message') + self.message = attributes[:'message'] + end + + if attributes.key?(:'transmission') + self.transmission = attributes[:'transmission'] + end + + if attributes.key?(:'facility_code') + self.facility_code = attributes[:'facility_code'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + event_type_validator = EnumAttributeValidator.new('String', ["EVENT_TYPE_UNKNOWN", "EVENT_TYPE_NEW_UNSOLICITED", "EVENT_TYPE_UPDATE", "EVENT_TYPE_CANCEL", "EVENT_TYPE_QUERY", "EVENT_TYPE_NEW"]) + return false unless event_type_validator.valid?(@event_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] event_type Object to be assigned + def event_type=(event_type) + validator = EnumAttributeValidator.new('String', ["EVENT_TYPE_UNKNOWN", "EVENT_TYPE_NEW_UNSOLICITED", "EVENT_TYPE_UPDATE", "EVENT_TYPE_CANCEL", "EVENT_TYPE_QUERY", "EVENT_TYPE_NEW"]) + unless validator.valid?(event_type) + fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}." + end + @event_type = event_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + event_type == o.event_type && + event_date_and_time == o.event_date_and_time && + test == o.test && + source == o.source && + destinations == o.destinations && + message == o.message && + transmission == o.transmission && + facility_code == o.facility_code + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [event_type, event_date_and_time, test, source, destinations, message, transmission, facility_code].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/meta_destinations.rb b/lib/primary_connect_client/models/meta_destinations.rb new file mode 100644 index 0000000..4163665 --- /dev/null +++ b/lib/primary_connect_client/models/meta_destinations.rb @@ -0,0 +1,242 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class MetaDestinations + attr_accessor :id + + attr_accessor :name + + # Arbitrary key/value pairs for Lab specific use + attr_accessor :config + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name', + :'config' => :'config' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String', + :'config' => :'Object' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::MetaDestinations` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::MetaDestinations`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'config') + self.config = attributes[:'config'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + if @id.nil? + invalid_properties.push('invalid value for "id", id cannot be nil.') + end + + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + return false if @id.nil? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name && + config == o.config + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name, config].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/meta_message.rb b/lib/primary_connect_client/models/meta_message.rb new file mode 100644 index 0000000..b4ab9aa --- /dev/null +++ b/lib/primary_connect_client/models/meta_message.rb @@ -0,0 +1,218 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class MetaMessage + attr_accessor :id + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::MetaMessage` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::MetaMessage`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/meta_source.rb b/lib/primary_connect_client/models/meta_source.rb new file mode 100644 index 0000000..549e1a1 --- /dev/null +++ b/lib/primary_connect_client/models/meta_source.rb @@ -0,0 +1,227 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class MetaSource + attr_accessor :id + + attr_accessor :name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'name' => :'name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::MetaSource` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::MetaSource`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + name == o.name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/name.rb b/lib/primary_connect_client/models/name.rb new file mode 100644 index 0000000..edd691b --- /dev/null +++ b/lib/primary_connect_client/models/name.rb @@ -0,0 +1,237 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Name + attr_accessor :first_name + + attr_accessor :last_name + + # middle name or middle initial. For people with multiple middle names, all their middle names are included in this field. + attr_accessor :middle_name + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'first_name' => :'first_name', + :'last_name' => :'last_name', + :'middle_name' => :'middle_name' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'first_name' => :'String', + :'last_name' => :'String', + :'middle_name' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Name` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Name`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'first_name') + self.first_name = attributes[:'first_name'] + end + + if attributes.key?(:'last_name') + self.last_name = attributes[:'last_name'] + end + + if attributes.key?(:'middle_name') + self.middle_name = attributes[:'middle_name'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + first_name == o.first_name && + last_name == o.last_name && + middle_name == o.middle_name + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [first_name, last_name, middle_name].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order.rb b/lib/primary_connect_client/models/order.rb new file mode 100644 index 0000000..03aa32a --- /dev/null +++ b/lib/primary_connect_client/models/order.rb @@ -0,0 +1,245 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Order + attr_accessor :order + + attr_accessor :patient + + attr_accessor :visit + + attr_accessor :meta + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'order' => :'order', + :'patient' => :'patient', + :'visit' => :'visit', + :'meta' => :'meta' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'order' => :'OrderOrder', + :'patient' => :'Patient', + :'visit' => :'Visit', + :'meta' => :'Meta' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Order` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Order`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + + if attributes.key?(:'patient') + self.patient = attributes[:'patient'] + end + + if attributes.key?(:'visit') + self.visit = attributes[:'visit'] + end + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + order == o.order && + patient == o.patient && + visit == o.visit && + meta == o.meta + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [order, patient, visit, meta].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_ids.rb b/lib/primary_connect_client/models/order_ids.rb new file mode 100644 index 0000000..ad5c35b --- /dev/null +++ b/lib/primary_connect_client/models/order_ids.rb @@ -0,0 +1,221 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderIds + # List of Order IDs + attr_accessor :orders + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'orders' => :'orders' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'orders' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderIds` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderIds`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'orders') + if (value = attributes[:'orders']).is_a?(Array) + self.orders = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + orders == o.orders + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [orders].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_order.rb b/lib/primary_connect_client/models/order_order.rb new file mode 100644 index 0000000..8090b75 --- /dev/null +++ b/lib/primary_connect_client/models/order_order.rb @@ -0,0 +1,485 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderOrder + # ID of the order assigned by the placing system + attr_accessor :id + + # ID assigned by the application fulfilling the order + attr_accessor :application_order_id + + # The status of an order. + attr_accessor :status + + # Timestamp when the order was placed + attr_accessor :transaction_date_time + + # Timestamp when the specimen was collected + attr_accessor :collection_date_time + + # Timestamp when the results were composed into a report and released. + attr_accessor :completion_date_time + + # YYYY-MM-DD, Date when the order becomes invalid + attr_accessor :expiration_date + + attr_accessor :specimen + + attr_accessor :procedure + + attr_accessor :ordering_provider + + # Array of providers to be copied on the results + attr_accessor :result_copy_providers + + attr_accessor :ordering_facility + + # Priority of the order + attr_accessor :priority + + # List of diagnoses associated with this order + attr_accessor :diagnoses + + # Clinically relevant comments regarding the order + attr_accessor :clinical_comments + + # Order-level notes + attr_accessor :notes + + # List of supplementary clinical information associated with the order. Often these are answers to Ask at Order Entry (AOE) questions. + attr_accessor :clinical_info + + # Current overall status of the order + attr_accessor :results_status + + # Specificity of the response requested from the receiving system + attr_accessor :response_flag + + # List of result components + attr_accessor :results + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'application_order_id' => :'application_order_id', + :'status' => :'status', + :'transaction_date_time' => :'transaction_date_time', + :'collection_date_time' => :'collection_date_time', + :'completion_date_time' => :'completion_date_time', + :'expiration_date' => :'expiration_date', + :'specimen' => :'specimen', + :'procedure' => :'procedure', + :'ordering_provider' => :'ordering_provider', + :'result_copy_providers' => :'result_copy_providers', + :'ordering_facility' => :'ordering_facility', + :'priority' => :'priority', + :'diagnoses' => :'diagnoses', + :'clinical_comments' => :'clinical_comments', + :'notes' => :'notes', + :'clinical_info' => :'clinical_info', + :'results_status' => :'results_status', + :'response_flag' => :'response_flag', + :'results' => :'results' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'application_order_id' => :'String', + :'status' => :'String', + :'transaction_date_time' => :'Time', + :'collection_date_time' => :'Time', + :'completion_date_time' => :'Time', + :'expiration_date' => :'String', + :'specimen' => :'OrderOrderSpecimen', + :'procedure' => :'CodedValue', + :'ordering_provider' => :'Provider', + :'result_copy_providers' => :'Array', + :'ordering_facility' => :'OrderOrderOrderingFacility', + :'priority' => :'String', + :'diagnoses' => :'Array', + :'clinical_comments' => :'String', + :'notes' => :'Array', + :'clinical_info' => :'Array', + :'results_status' => :'String', + :'response_flag' => :'String', + :'results' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrder` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'application_order_id') + self.application_order_id = attributes[:'application_order_id'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'transaction_date_time') + self.transaction_date_time = attributes[:'transaction_date_time'] + end + + if attributes.key?(:'collection_date_time') + self.collection_date_time = attributes[:'collection_date_time'] + end + + if attributes.key?(:'completion_date_time') + self.completion_date_time = attributes[:'completion_date_time'] + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + + if attributes.key?(:'specimen') + self.specimen = attributes[:'specimen'] + end + + if attributes.key?(:'procedure') + self.procedure = attributes[:'procedure'] + end + + if attributes.key?(:'ordering_provider') + self.ordering_provider = attributes[:'ordering_provider'] + end + + if attributes.key?(:'result_copy_providers') + if (value = attributes[:'result_copy_providers']).is_a?(Array) + self.result_copy_providers = value + end + end + + if attributes.key?(:'ordering_facility') + self.ordering_facility = attributes[:'ordering_facility'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'diagnoses') + if (value = attributes[:'diagnoses']).is_a?(Array) + self.diagnoses = value + end + end + + if attributes.key?(:'clinical_comments') + self.clinical_comments = attributes[:'clinical_comments'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'clinical_info') + if (value = attributes[:'clinical_info']).is_a?(Array) + self.clinical_info = value + end + end + + if attributes.key?(:'results_status') + self.results_status = attributes[:'results_status'] + end + + if attributes.key?(:'response_flag') + self.response_flag = attributes[:'response_flag'] + end + + if attributes.key?(:'results') + if (value = attributes[:'results']).is_a?(Array) + self.results = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + status_validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW"]) + return false unless status_validator.valid?(@status) + priority_validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_ASAP", "PRIORITY_ROUTINE", "PRIORITY_PREOPERATIVE", "PRIORITY_TIMING_CRITICAL", "PRIORITY_STAT"]) + return false unless priority_validator.valid?(@priority) + results_status_validator = EnumAttributeValidator.new('String', ["UNAVAILABLE", "PRELIMINARY", "IN_PROCESS", "CORRECTED", "CANCELED", "FINAL"]) + return false unless results_status_validator.valid?(@results_status) + response_flag_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "EXCEPTIONS", "REPLACEMENTS", "ASSOCIATED_SEGMENTS", "CONFIRMATIONS", "ACKNOWLEDGEMENT"]) + return false unless response_flag_validator.valid?(@response_flag) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] priority Object to be assigned + def priority=(priority) + validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_ASAP", "PRIORITY_ROUTINE", "PRIORITY_PREOPERATIVE", "PRIORITY_TIMING_CRITICAL", "PRIORITY_STAT"]) + unless validator.valid?(priority) + fail ArgumentError, "invalid value for \"priority\", must be one of #{validator.allowable_values}." + end + @priority = priority + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] results_status Object to be assigned + def results_status=(results_status) + validator = EnumAttributeValidator.new('String', ["UNAVAILABLE", "PRELIMINARY", "IN_PROCESS", "CORRECTED", "CANCELED", "FINAL"]) + unless validator.valid?(results_status) + fail ArgumentError, "invalid value for \"results_status\", must be one of #{validator.allowable_values}." + end + @results_status = results_status + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] response_flag Object to be assigned + def response_flag=(response_flag) + validator = EnumAttributeValidator.new('String', ["UNKNOWN", "EXCEPTIONS", "REPLACEMENTS", "ASSOCIATED_SEGMENTS", "CONFIRMATIONS", "ACKNOWLEDGEMENT"]) + unless validator.valid?(response_flag) + fail ArgumentError, "invalid value for \"response_flag\", must be one of #{validator.allowable_values}." + end + @response_flag = response_flag + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + application_order_id == o.application_order_id && + status == o.status && + transaction_date_time == o.transaction_date_time && + collection_date_time == o.collection_date_time && + completion_date_time == o.completion_date_time && + expiration_date == o.expiration_date && + specimen == o.specimen && + procedure == o.procedure && + ordering_provider == o.ordering_provider && + result_copy_providers == o.result_copy_providers && + ordering_facility == o.ordering_facility && + priority == o.priority && + diagnoses == o.diagnoses && + clinical_comments == o.clinical_comments && + notes == o.notes && + clinical_info == o.clinical_info && + results_status == o.results_status && + response_flag == o.response_flag && + results == o.results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, application_order_id, status, transaction_date_time, collection_date_time, completion_date_time, expiration_date, specimen, procedure, ordering_provider, result_copy_providers, ordering_facility, priority, diagnoses, clinical_comments, notes, clinical_info, results_status, response_flag, results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_order_clinical_info.rb b/lib/primary_connect_client/models/order_order_clinical_info.rb new file mode 100644 index 0000000..0de188c --- /dev/null +++ b/lib/primary_connect_client/models/order_order_clinical_info.rb @@ -0,0 +1,260 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderOrderClinicalInfo + attr_accessor :code + + # Value of the information element. For AOEs, this is typically the full answer + attr_accessor :value + + # Units of the value. If the Value is a time range, this may be \"WK\" + attr_accessor :units + + # Abbreviation of the value of the information element. Typically only present for text answer AOEs + attr_accessor :abbreviation + + # Notes related to the clinical info + attr_accessor :notes + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'value' => :'value', + :'units' => :'units', + :'abbreviation' => :'abbreviation', + :'notes' => :'notes' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'CodedValue', + :'value' => :'String', + :'units' => :'String', + :'abbreviation' => :'String', + :'notes' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrderClinicalInfo` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrderClinicalInfo`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'units') + self.units = attributes[:'units'] + end + + if attributes.key?(:'abbreviation') + self.abbreviation = attributes[:'abbreviation'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + value == o.value && + units == o.units && + abbreviation == o.abbreviation && + notes == o.notes + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, value, units, abbreviation, notes].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_order_diagnoses.rb b/lib/primary_connect_client/models/order_order_diagnoses.rb new file mode 100644 index 0000000..803aaeb --- /dev/null +++ b/lib/primary_connect_client/models/order_order_diagnoses.rb @@ -0,0 +1,272 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderOrderDiagnoses + attr_accessor :code + + # Type of the diagnosis + attr_accessor :type + + # Timestamp of the the diagnosis was documented + attr_accessor :documented_date_time + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'type' => :'type', + :'documented_date_time' => :'documented_date_time' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'CodedValue', + :'type' => :'String', + :'documented_date_time' => :'Time' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrderDiagnoses` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrderDiagnoses`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'documented_date_time') + self.documented_date_time = attributes[:'documented_date_time'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + type_validator = EnumAttributeValidator.new('String', ["TYPE_UNKNOWN", "TYPE_ADMITTING", "TYPE_FINAL", "TYPE_SELF", "TYPE_WORKING", "TYPE_PRINCIPAL"]) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["TYPE_UNKNOWN", "TYPE_ADMITTING", "TYPE_FINAL", "TYPE_SELF", "TYPE_WORKING", "TYPE_PRINCIPAL"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + type == o.type && + documented_date_time == o.documented_date_time + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, type, documented_date_time].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_order_ordering_facility.rb b/lib/primary_connect_client/models/order_order_ordering_facility.rb new file mode 100644 index 0000000..6161013 --- /dev/null +++ b/lib/primary_connect_client/models/order_order_ordering_facility.rb @@ -0,0 +1,239 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Facility this order was placed in + class OrderOrderOrderingFacility + attr_accessor :name + + attr_accessor :address + + attr_accessor :phone_numbers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'address' => :'address', + :'phone_numbers' => :'phone_numbers' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'address' => :'Address', + :'phone_numbers' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrderOrderingFacility` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrderOrderingFacility`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + address == o.address && + phone_numbers == o.phone_numbers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, address, phone_numbers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_order_specimen.rb b/lib/primary_connect_client/models/order_order_specimen.rb new file mode 100644 index 0000000..737cdb3 --- /dev/null +++ b/lib/primary_connect_client/models/order_order_specimen.rb @@ -0,0 +1,239 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderOrderSpecimen + # ID of the collected specimen + attr_accessor :id + + # Source of the specimen + attr_accessor :source + + # Body site from which the specimen was collected + attr_accessor :body_site + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'source' => :'source', + :'body_site' => :'body_site' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'source' => :'String', + :'body_site' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrderSpecimen` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderOrderSpecimen`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'body_site') + self.body_site = attributes[:'body_site'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + source == o.source && + body_site == o.body_site + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, source, body_site].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/order_with_event_errors.rb b/lib/primary_connect_client/models/order_with_event_errors.rb new file mode 100644 index 0000000..1ddf22c --- /dev/null +++ b/lib/primary_connect_client/models/order_with_event_errors.rb @@ -0,0 +1,229 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrderWithEventErrors + attr_accessor :order + + attr_accessor :errors + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'order' => :'order', + :'errors' => :'errors' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'order' => :'Order', + :'errors' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderWithEventErrors` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrderWithEventErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + + if attributes.key?(:'errors') + if (value = attributes[:'errors']).is_a?(Array) + self.errors = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + order == o.order && + errors == o.errors + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [order, errors].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/orders.rb b/lib/primary_connect_client/models/orders.rb new file mode 100644 index 0000000..e9674a8 --- /dev/null +++ b/lib/primary_connect_client/models/orders.rb @@ -0,0 +1,221 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Orders + # List of orders (max 25) + attr_accessor :orders + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'orders' => :'orders' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'orders' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Orders` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Orders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'orders') + if (value = attributes[:'orders']).is_a?(Array) + self.orders = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + orders == o.orders + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [orders].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/orders_orders.rb b/lib/primary_connect_client/models/orders_orders.rb new file mode 100644 index 0000000..3e6a8df --- /dev/null +++ b/lib/primary_connect_client/models/orders_orders.rb @@ -0,0 +1,236 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class OrdersOrders + attr_accessor :id + + attr_accessor :state + + attr_accessor :order + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'state' => :'state', + :'order' => :'order' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'state' => :'String', + :'order' => :'Order' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrdersOrders` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::OrdersOrders`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'state') + self.state = attributes[:'state'] + end + + if attributes.key?(:'order') + self.order = attributes[:'order'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + state == o.state && + order == o.order + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, state, order].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/patient.rb b/lib/primary_connect_client/models/patient.rb new file mode 100644 index 0000000..d4fd415 --- /dev/null +++ b/lib/primary_connect_client/models/patient.rb @@ -0,0 +1,253 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Patient + # List of IDs and types that identify the patient + attr_accessor :identifiers + + attr_accessor :demographics + + # Patient-level notes + attr_accessor :notes + + attr_accessor :contacts + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifiers' => :'identifiers', + :'demographics' => :'demographics', + :'notes' => :'notes', + :'contacts' => :'contacts' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifiers' => :'Array', + :'demographics' => :'PatientDemographics', + :'notes' => :'Array', + :'contacts' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Patient` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Patient`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifiers') + if (value = attributes[:'identifiers']).is_a?(Array) + self.identifiers = value + end + end + + if attributes.key?(:'demographics') + self.demographics = attributes[:'demographics'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'contacts') + if (value = attributes[:'contacts']).is_a?(Array) + self.contacts = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifiers == o.identifiers && + demographics == o.demographics && + notes == o.notes && + contacts == o.contacts + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifiers, demographics, notes, contacts].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/patient_contacts.rb b/lib/primary_connect_client/models/patient_contacts.rb new file mode 100644 index 0000000..94587e1 --- /dev/null +++ b/lib/primary_connect_client/models/patient_contacts.rb @@ -0,0 +1,305 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class PatientContacts + attr_accessor :name + + attr_accessor :address + + attr_accessor :phone_numbers + + # Personal relationship to the patient + attr_accessor :relation_to_patient + + attr_accessor :email_addresses + + # e.g. Employer, Emergency Contact + attr_accessor :roles + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'address' => :'address', + :'phone_numbers' => :'phone_numbers', + :'relation_to_patient' => :'relation_to_patient', + :'email_addresses' => :'email_addresses', + :'roles' => :'roles' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Name', + :'address' => :'Address', + :'phone_numbers' => :'Array', + :'relation_to_patient' => :'String', + :'email_addresses' => :'Array', + :'roles' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::PatientContacts` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::PatientContacts`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'relation_to_patient') + self.relation_to_patient = attributes[:'relation_to_patient'] + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'roles') + if (value = attributes[:'roles']).is_a?(Array) + self.roles = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + relation_to_patient_validator = EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + return false unless relation_to_patient_validator.valid?(@relation_to_patient) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] relation_to_patient Object to be assigned + def relation_to_patient=(relation_to_patient) + validator = EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + unless validator.valid?(relation_to_patient) + fail ArgumentError, "invalid value for \"relation_to_patient\", must be one of #{validator.allowable_values}." + end + @relation_to_patient = relation_to_patient + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + address == o.address && + phone_numbers == o.phone_numbers && + relation_to_patient == o.relation_to_patient && + email_addresses == o.email_addresses && + roles == o.roles + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, address, phone_numbers, relation_to_patient, email_addresses, roles].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/patient_demographics.rb b/lib/primary_connect_client/models/patient_demographics.rb new file mode 100644 index 0000000..ab60a2c --- /dev/null +++ b/lib/primary_connect_client/models/patient_demographics.rb @@ -0,0 +1,466 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class PatientDemographics + attr_accessor :name + + attr_accessor :dob + + attr_accessor :ssn + + attr_accessor :sex + + attr_accessor :gender + + attr_accessor :sexual_orientation + + attr_accessor :races + + attr_accessor :race_details + + attr_accessor :ethnicity + + attr_accessor :ethnicity_detail + + attr_accessor :marital_status + + attr_accessor :is_deceased + + # ISO 8601 + attr_accessor :death_date_time + + attr_accessor :phone_numbers + + attr_accessor :email_addresses + + attr_accessor :language_code + + attr_accessor :citizenships + + attr_accessor :address + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'dob' => :'dob', + :'ssn' => :'ssn', + :'sex' => :'sex', + :'gender' => :'gender', + :'sexual_orientation' => :'sexual_orientation', + :'races' => :'races', + :'race_details' => :'race_details', + :'ethnicity' => :'ethnicity', + :'ethnicity_detail' => :'ethnicity_detail', + :'marital_status' => :'marital_status', + :'is_deceased' => :'is_deceased', + :'death_date_time' => :'death_date_time', + :'phone_numbers' => :'phone_numbers', + :'email_addresses' => :'email_addresses', + :'language_code' => :'language_code', + :'citizenships' => :'citizenships', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'Name', + :'dob' => :'String', + :'ssn' => :'String', + :'sex' => :'String', + :'gender' => :'String', + :'sexual_orientation' => :'String', + :'races' => :'Array', + :'race_details' => :'Array', + :'ethnicity' => :'String', + :'ethnicity_detail' => :'Array', + :'marital_status' => :'String', + :'is_deceased' => :'Boolean', + :'death_date_time' => :'Time', + :'phone_numbers' => :'Array', + :'email_addresses' => :'Array', + :'language_code' => :'String', + :'citizenships' => :'Array', + :'address' => :'Address' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::PatientDemographics` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::PatientDemographics`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'dob') + self.dob = attributes[:'dob'] + end + + if attributes.key?(:'ssn') + self.ssn = attributes[:'ssn'] + end + + if attributes.key?(:'sex') + self.sex = attributes[:'sex'] + end + + if attributes.key?(:'gender') + self.gender = attributes[:'gender'] + end + + if attributes.key?(:'sexual_orientation') + self.sexual_orientation = attributes[:'sexual_orientation'] + end + + if attributes.key?(:'races') + if (value = attributes[:'races']).is_a?(Array) + self.races = value + end + end + + if attributes.key?(:'race_details') + if (value = attributes[:'race_details']).is_a?(Array) + self.race_details = value + end + end + + if attributes.key?(:'ethnicity') + self.ethnicity = attributes[:'ethnicity'] + end + + if attributes.key?(:'ethnicity_detail') + if (value = attributes[:'ethnicity_detail']).is_a?(Array) + self.ethnicity_detail = value + end + end + + if attributes.key?(:'marital_status') + self.marital_status = attributes[:'marital_status'] + end + + if attributes.key?(:'is_deceased') + self.is_deceased = attributes[:'is_deceased'] + end + + if attributes.key?(:'death_date_time') + self.death_date_time = attributes[:'death_date_time'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'language_code') + self.language_code = attributes[:'language_code'] + end + + if attributes.key?(:'citizenships') + if (value = attributes[:'citizenships']).is_a?(Array) + self.citizenships = value + end + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + sex_validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + return false unless sex_validator.valid?(@sex) + gender_validator = EnumAttributeValidator.new('String', ["GENDER_UNKNOWN", "GENDER_FEMALE", "GENDER_MALE", "GENDER_OTHER", "GENDER_NON_BINARY", "GENDER_TRANSGENDER_MALE", "GENDER_TRANSGENDER_FEMALE", "GENDER_PREFER_NOT_TO_DISCLOSE"]) + return false unless gender_validator.valid?(@gender) + sexual_orientation_validator = EnumAttributeValidator.new('String', ["ORIENTATION_UNKNOWN", "ORIENTATION_HOMOSEXUAL", "ORIENTATION_HETEROSEXUAL", "ORIENTATION_BISEXUAL", "ORIENTATION_QUESTIONING", "ORIENTATION_OTHER", "ORIENTATION_PREFER_NOT_TO_DISCLOSE"]) + return false unless sexual_orientation_validator.valid?(@sexual_orientation) + ethnicity_validator = EnumAttributeValidator.new('String', ["ETHNICITY_UNKNOWN", "ETHNICITY_HISPANIC", "ETHNICITY_NON_HISPANIC", "ETHNICITY_PREFER_NOT_TO_DISCLOSE"]) + return false unless ethnicity_validator.valid?(@ethnicity) + marital_status_validator = EnumAttributeValidator.new('String', ["MARITAL_STATUS_UNKNOWN", "MARITAL_STATUS_SEPARATED", "MARITAL_STATUS_UNMARRIED", "MARITAL_STATUS_COMMON_LAW", "MARITAL_STATUS_DIVORCED", "MARITAL_STATUS_LEGALLY_SEPARATED", "MARITAL_STATUS_LIVING_TOGETHER", "MARITAL_STATUS_INTERLOCUTORY", "MARITAL_STATUS_MARRIED", "MARITAL_STATUS_ANNULLED", "MARITAL_STATUS_OTHER", "MARITAL_STATUS_DOMESTIC_PARTNER", "MARITAL_STATUS_REGISTERED_DOMESTIC_PARTNER", "MARITAL_STATUS_SINGLE", "MARITAL_STATUS_UNREPORTED", "MARITAL_STATUS_WIDOWED"]) + return false unless marital_status_validator.valid?(@marital_status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] sex Object to be assigned + def sex=(sex) + validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(sex) + fail ArgumentError, "invalid value for \"sex\", must be one of #{validator.allowable_values}." + end + @sex = sex + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] gender Object to be assigned + def gender=(gender) + validator = EnumAttributeValidator.new('String', ["GENDER_UNKNOWN", "GENDER_FEMALE", "GENDER_MALE", "GENDER_OTHER", "GENDER_NON_BINARY", "GENDER_TRANSGENDER_MALE", "GENDER_TRANSGENDER_FEMALE", "GENDER_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(gender) + fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}." + end + @gender = gender + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] sexual_orientation Object to be assigned + def sexual_orientation=(sexual_orientation) + validator = EnumAttributeValidator.new('String', ["ORIENTATION_UNKNOWN", "ORIENTATION_HOMOSEXUAL", "ORIENTATION_HETEROSEXUAL", "ORIENTATION_BISEXUAL", "ORIENTATION_QUESTIONING", "ORIENTATION_OTHER", "ORIENTATION_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(sexual_orientation) + fail ArgumentError, "invalid value for \"sexual_orientation\", must be one of #{validator.allowable_values}." + end + @sexual_orientation = sexual_orientation + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] ethnicity Object to be assigned + def ethnicity=(ethnicity) + validator = EnumAttributeValidator.new('String', ["ETHNICITY_UNKNOWN", "ETHNICITY_HISPANIC", "ETHNICITY_NON_HISPANIC", "ETHNICITY_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(ethnicity) + fail ArgumentError, "invalid value for \"ethnicity\", must be one of #{validator.allowable_values}." + end + @ethnicity = ethnicity + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] marital_status Object to be assigned + def marital_status=(marital_status) + validator = EnumAttributeValidator.new('String', ["MARITAL_STATUS_UNKNOWN", "MARITAL_STATUS_SEPARATED", "MARITAL_STATUS_UNMARRIED", "MARITAL_STATUS_COMMON_LAW", "MARITAL_STATUS_DIVORCED", "MARITAL_STATUS_LEGALLY_SEPARATED", "MARITAL_STATUS_LIVING_TOGETHER", "MARITAL_STATUS_INTERLOCUTORY", "MARITAL_STATUS_MARRIED", "MARITAL_STATUS_ANNULLED", "MARITAL_STATUS_OTHER", "MARITAL_STATUS_DOMESTIC_PARTNER", "MARITAL_STATUS_REGISTERED_DOMESTIC_PARTNER", "MARITAL_STATUS_SINGLE", "MARITAL_STATUS_UNREPORTED", "MARITAL_STATUS_WIDOWED"]) + unless validator.valid?(marital_status) + fail ArgumentError, "invalid value for \"marital_status\", must be one of #{validator.allowable_values}." + end + @marital_status = marital_status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + dob == o.dob && + ssn == o.ssn && + sex == o.sex && + gender == o.gender && + sexual_orientation == o.sexual_orientation && + races == o.races && + race_details == o.race_details && + ethnicity == o.ethnicity && + ethnicity_detail == o.ethnicity_detail && + marital_status == o.marital_status && + is_deceased == o.is_deceased && + death_date_time == o.death_date_time && + phone_numbers == o.phone_numbers && + email_addresses == o.email_addresses && + language_code == o.language_code && + citizenships == o.citizenships && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, dob, ssn, sex, gender, sexual_orientation, races, race_details, ethnicity, ethnicity_detail, marital_status, is_deceased, death_date_time, phone_numbers, email_addresses, language_code, citizenships, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/phone_number.rb b/lib/primary_connect_client/models/phone_number.rb new file mode 100644 index 0000000..7c41d1f --- /dev/null +++ b/lib/primary_connect_client/models/phone_number.rb @@ -0,0 +1,262 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class PhoneNumber + attr_accessor :type + + # E.164 + attr_accessor :number + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'type' => :'type', + :'number' => :'number' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'type' => :'String', + :'number' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::PhoneNumber` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::PhoneNumber`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + type_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "OFFICE", "MOBILE", "FAX", "HOME"]) + return false unless type_validator.valid?(@type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] type Object to be assigned + def type=(type) + validator = EnumAttributeValidator.new('String', ["UNKNOWN", "OFFICE", "MOBILE", "FAX", "HOME"]) + unless validator.valid?(type) + fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}." + end + @type = type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + type == o.type && + number == o.number + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [type, number].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/provider.rb b/lib/primary_connect_client/models/provider.rb new file mode 100644 index 0000000..eec830a --- /dev/null +++ b/lib/primary_connect_client/models/provider.rb @@ -0,0 +1,288 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Provider + attr_accessor :identifier + + attr_accessor :npi + + attr_accessor :name + + # List of credentials for the provider. e.g. MD, PhD + attr_accessor :credentials + + attr_accessor :address + + attr_accessor :email_addresses + + attr_accessor :phone_numbers + + attr_accessor :location + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifier' => :'identifier', + :'npi' => :'npi', + :'name' => :'name', + :'credentials' => :'credentials', + :'address' => :'address', + :'email_addresses' => :'email_addresses', + :'phone_numbers' => :'phone_numbers', + :'location' => :'location' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifier' => :'Identifier', + :'npi' => :'String', + :'name' => :'Name', + :'credentials' => :'Array', + :'address' => :'Address', + :'email_addresses' => :'Array', + :'phone_numbers' => :'Array', + :'location' => :'Location' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Provider` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Provider`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifier') + self.identifier = attributes[:'identifier'] + end + + if attributes.key?(:'npi') + self.npi = attributes[:'npi'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'credentials') + if (value = attributes[:'credentials']).is_a?(Array) + self.credentials = value + end + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifier == o.identifier && + npi == o.npi && + name == o.name && + credentials == o.credentials && + address == o.address && + email_addresses == o.email_addresses && + phone_numbers == o.phone_numbers && + location == o.location + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifier, npi, name, credentials, address, email_addresses, phone_numbers, location].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/result.rb b/lib/primary_connect_client/models/result.rb new file mode 100644 index 0000000..2e8b460 --- /dev/null +++ b/lib/primary_connect_client/models/result.rb @@ -0,0 +1,434 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Result + attr_accessor :code + + # ID to group separate result components + attr_accessor :related_group_id + + attr_accessor :specimen + + # Value of the result component + attr_accessor :value + + # Data type for the result value + attr_accessor :value_type + + # Timestamp when the results were composed into a report and released. + attr_accessor :completion_date_time + + attr_accessor :report + + # Units of the result + attr_accessor :units + + # Notes about the result component/observation + attr_accessor :notes + + # Indication of whether the result was abnormal + attr_accessor :abnormal_flag + + # Current status of the result + attr_accessor :status + + attr_accessor :primary_result_interpreter + + attr_accessor :producer + + attr_accessor :performer + + attr_accessor :reference_range + + attr_accessor :observation_method + + # Unique ID generated by resulting entity + attr_accessor :producer_order_id + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'code' => :'code', + :'related_group_id' => :'related_group_id', + :'specimen' => :'specimen', + :'value' => :'value', + :'value_type' => :'value_type', + :'completion_date_time' => :'completion_date_time', + :'report' => :'report', + :'units' => :'units', + :'notes' => :'notes', + :'abnormal_flag' => :'abnormal_flag', + :'status' => :'status', + :'primary_result_interpreter' => :'primary_result_interpreter', + :'producer' => :'producer', + :'performer' => :'performer', + :'reference_range' => :'reference_range', + :'observation_method' => :'observation_method', + :'producer_order_id' => :'producer_order_id' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'code' => :'CodedValue', + :'related_group_id' => :'Array', + :'specimen' => :'ResultSpecimen', + :'value' => :'String', + :'value_type' => :'String', + :'completion_date_time' => :'Time', + :'report' => :'ResultReport', + :'units' => :'String', + :'notes' => :'Array', + :'abnormal_flag' => :'String', + :'status' => :'String', + :'primary_result_interpreter' => :'Provider', + :'producer' => :'Object', + :'performer' => :'Provider', + :'reference_range' => :'ResultReferenceRange', + :'observation_method' => :'CodedValue', + :'producer_order_id' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + :'producer', + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Result` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Result`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + + if attributes.key?(:'related_group_id') + if (value = attributes[:'related_group_id']).is_a?(Array) + self.related_group_id = value + end + end + + if attributes.key?(:'specimen') + self.specimen = attributes[:'specimen'] + end + + if attributes.key?(:'value') + self.value = attributes[:'value'] + end + + if attributes.key?(:'value_type') + self.value_type = attributes[:'value_type'] + end + + if attributes.key?(:'completion_date_time') + self.completion_date_time = attributes[:'completion_date_time'] + end + + if attributes.key?(:'report') + self.report = attributes[:'report'] + end + + if attributes.key?(:'units') + self.units = attributes[:'units'] + end + + if attributes.key?(:'notes') + if (value = attributes[:'notes']).is_a?(Array) + self.notes = value + end + end + + if attributes.key?(:'abnormal_flag') + self.abnormal_flag = attributes[:'abnormal_flag'] + end + + if attributes.key?(:'status') + self.status = attributes[:'status'] + end + + if attributes.key?(:'primary_result_interpreter') + self.primary_result_interpreter = attributes[:'primary_result_interpreter'] + end + + if attributes.key?(:'producer') + self.producer = attributes[:'producer'] + end + + if attributes.key?(:'performer') + self.performer = attributes[:'performer'] + end + + if attributes.key?(:'reference_range') + self.reference_range = attributes[:'reference_range'] + end + + if attributes.key?(:'observation_method') + self.observation_method = attributes[:'observation_method'] + end + + if attributes.key?(:'producer_order_id') + self.producer_order_id = attributes[:'producer_order_id'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + value_type_validator = EnumAttributeValidator.new('String', ["UNKNOWN", "CODED_ENTRY", "DATE", "DATE_TIME", "ENCAPSULATED_DATA", "FORMATTED_TEXT", "ID", "ID_AND_NAME", "MONEY", "NAME", "NUMERIC", "PHONE_NUMBER", "PRICE", "REFERENCE_POINTER", "STRING", "TIME", "STRUCTURED_NUMERIC", "ADDRESS"]) + return false unless value_type_validator.valid?(@value_type) + abnormal_flag_validator = EnumAttributeValidator.new('String', ["NONE", "LOW", "VERY_LOW", "HIGH", "VERY_HIGH", "ABNORMAL", "SUSCEPTIBLE", "RESISTANT", "INTERMEDIATE", "MODERATELY_SUSCEPTIBLE", "VERY_SUSCEPTIBLE", "CRITICALLY_ABNORMAL", "CRITICALLY_LOW", "CRITICALLY_HIGH", "NOT_SUSCEPTIBLE", "INCONCLUSIVE", "VERY_ABNORMAL", "NORMAL"]) + return false unless abnormal_flag_validator.valid?(@abnormal_flag) + status_validator = EnumAttributeValidator.new('String', ["NONE_SPECIFIED", "INCOMPLETE", "CORRECTED", "FINAL", "UNAVAILABLE", "PRELIMINARY", "CANCELED", "DELETED", "REJECTED"]) + return false unless status_validator.valid?(@status) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] value_type Object to be assigned + def value_type=(value_type) + validator = EnumAttributeValidator.new('String', ["UNKNOWN", "CODED_ENTRY", "DATE", "DATE_TIME", "ENCAPSULATED_DATA", "FORMATTED_TEXT", "ID", "ID_AND_NAME", "MONEY", "NAME", "NUMERIC", "PHONE_NUMBER", "PRICE", "REFERENCE_POINTER", "STRING", "TIME", "STRUCTURED_NUMERIC", "ADDRESS"]) + unless validator.valid?(value_type) + fail ArgumentError, "invalid value for \"value_type\", must be one of #{validator.allowable_values}." + end + @value_type = value_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] abnormal_flag Object to be assigned + def abnormal_flag=(abnormal_flag) + validator = EnumAttributeValidator.new('String', ["NONE", "LOW", "VERY_LOW", "HIGH", "VERY_HIGH", "ABNORMAL", "SUSCEPTIBLE", "RESISTANT", "INTERMEDIATE", "MODERATELY_SUSCEPTIBLE", "VERY_SUSCEPTIBLE", "CRITICALLY_ABNORMAL", "CRITICALLY_LOW", "CRITICALLY_HIGH", "NOT_SUSCEPTIBLE", "INCONCLUSIVE", "VERY_ABNORMAL", "NORMAL"]) + unless validator.valid?(abnormal_flag) + fail ArgumentError, "invalid value for \"abnormal_flag\", must be one of #{validator.allowable_values}." + end + @abnormal_flag = abnormal_flag + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] status Object to be assigned + def status=(status) + validator = EnumAttributeValidator.new('String', ["NONE_SPECIFIED", "INCOMPLETE", "CORRECTED", "FINAL", "UNAVAILABLE", "PRELIMINARY", "CANCELED", "DELETED", "REJECTED"]) + unless validator.valid?(status) + fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}." + end + @status = status + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + code == o.code && + related_group_id == o.related_group_id && + specimen == o.specimen && + value == o.value && + value_type == o.value_type && + completion_date_time == o.completion_date_time && + report == o.report && + units == o.units && + notes == o.notes && + abnormal_flag == o.abnormal_flag && + status == o.status && + primary_result_interpreter == o.primary_result_interpreter && + producer == o.producer && + performer == o.performer && + reference_range == o.reference_range && + observation_method == o.observation_method && + producer_order_id == o.producer_order_id + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [code, related_group_id, specimen, value, value_type, completion_date_time, report, units, notes, abnormal_flag, status, primary_result_interpreter, producer, performer, reference_range, observation_method, producer_order_id].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/result_ids.rb b/lib/primary_connect_client/models/result_ids.rb new file mode 100644 index 0000000..943faab --- /dev/null +++ b/lib/primary_connect_client/models/result_ids.rb @@ -0,0 +1,221 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class ResultIds + # List of Result IDs + attr_accessor :results + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'results' => :'results' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'results' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::ResultIds` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::ResultIds`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'results') + if (value = attributes[:'results']).is_a?(Array) + self.results = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + results == o.results + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [results].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/result_reference_range.rb b/lib/primary_connect_client/models/result_reference_range.rb new file mode 100644 index 0000000..a95cdca --- /dev/null +++ b/lib/primary_connect_client/models/result_reference_range.rb @@ -0,0 +1,240 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Numeric result values will use the low and high properties Non-numeric result values will put the normal value in the text property + class ResultReferenceRange + # Lower bound for a normal result + attr_accessor :low + + # Upper bound for a normal result + attr_accessor :high + + # Normal value for non-numeric results + attr_accessor :text + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'low' => :'low', + :'high' => :'high', + :'text' => :'text' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'low' => :'Integer', + :'high' => :'Integer', + :'text' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::ResultReferenceRange` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::ResultReferenceRange`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'low') + self.low = attributes[:'low'] + end + + if attributes.key?(:'high') + self.high = attributes[:'high'] + end + + if attributes.key?(:'text') + self.text = attributes[:'text'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + low == o.low && + high == o.high && + text == o.text + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [low, high, text].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/result_report.rb b/lib/primary_connect_client/models/result_report.rb new file mode 100644 index 0000000..c3a76ee --- /dev/null +++ b/lib/primary_connect_client/models/result_report.rb @@ -0,0 +1,240 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Lab produced report of specimen result + class ResultReport + # Report MIME type + attr_accessor :file_type + + # Base64 encoded report + attr_accessor :data + + # Report URL redirect + attr_accessor :url + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'file_type' => :'file_type', + :'data' => :'data', + :'url' => :'url' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'file_type' => :'String', + :'data' => :'String', + :'url' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::ResultReport` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::ResultReport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'file_type') + self.file_type = attributes[:'file_type'] + end + + if attributes.key?(:'data') + self.data = attributes[:'data'] + end + + if attributes.key?(:'url') + self.url = attributes[:'url'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + file_type == o.file_type && + data == o.data && + url == o.url + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [file_type, data, url].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/result_specimen.rb b/lib/primary_connect_client/models/result_specimen.rb new file mode 100644 index 0000000..66ef642 --- /dev/null +++ b/lib/primary_connect_client/models/result_specimen.rb @@ -0,0 +1,239 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class ResultSpecimen + # ID of the collected specimen + attr_accessor :id + + # Source of the specimen + attr_accessor :source + + # Body site from which the specimen was collected + attr_accessor :body_site + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'id' => :'id', + :'source' => :'source', + :'body_site' => :'body_site' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'id' => :'String', + :'source' => :'String', + :'body_site' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::ResultSpecimen` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::ResultSpecimen`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'id') + self.id = attributes[:'id'] + end + + if attributes.key?(:'source') + self.source = attributes[:'source'] + end + + if attributes.key?(:'body_site') + self.body_site = attributes[:'body_site'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + id == o.id && + source == o.source && + body_site == o.body_site + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [id, source, body_site].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/results.rb b/lib/primary_connect_client/models/results.rb new file mode 100644 index 0000000..fa22afd --- /dev/null +++ b/lib/primary_connect_client/models/results.rb @@ -0,0 +1,230 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # List of results + class Results + attr_accessor :meta + + attr_accessor :result + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'meta' => :'meta', + :'result' => :'result' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'meta' => :'Meta', + :'result' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Results` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Results`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'meta') + self.meta = attributes[:'meta'] + end + + if attributes.key?(:'result') + if (value = attributes[:'result']).is_a?(Array) + self.result = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + meta == o.meta && + result == o.result + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [meta, result].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit.rb b/lib/primary_connect_client/models/visit.rb new file mode 100644 index 0000000..dd8abdc --- /dev/null +++ b/lib/primary_connect_client/models/visit.rb @@ -0,0 +1,306 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class Visit + # Unique ID of a single visit + attr_accessor :visit_number + + # An ID that can span several visits often related to the same issue - pregnancy, surgeries, research study, etc. + attr_accessor :account_number + + # Patient class is used in many EHRs to determine where to put the patient. E.g. Inpatient, Outpatient, Emergency + attr_accessor :patient_class + + # Timestamp of visit or the arrival time of the visit or admission. + attr_accessor :visit_date_time + + attr_accessor :attending_provider + + attr_accessor :consulting_provider + + attr_accessor :referring_provider + + attr_accessor :guarantor + + # List of insurance coverages for the patient + attr_accessor :insurances + + attr_accessor :location + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'visit_number' => :'visit_number', + :'account_number' => :'account_number', + :'patient_class' => :'patient_class', + :'visit_date_time' => :'visit_date_time', + :'attending_provider' => :'attending_provider', + :'consulting_provider' => :'consulting_provider', + :'referring_provider' => :'referring_provider', + :'guarantor' => :'guarantor', + :'insurances' => :'insurances', + :'location' => :'location' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'visit_number' => :'String', + :'account_number' => :'String', + :'patient_class' => :'String', + :'visit_date_time' => :'Time', + :'attending_provider' => :'Provider', + :'consulting_provider' => :'Provider', + :'referring_provider' => :'Provider', + :'guarantor' => :'VisitGuarantor', + :'insurances' => :'Array', + :'location' => :'Location' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Visit` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Visit`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'visit_number') + self.visit_number = attributes[:'visit_number'] + end + + if attributes.key?(:'account_number') + self.account_number = attributes[:'account_number'] + end + + if attributes.key?(:'patient_class') + self.patient_class = attributes[:'patient_class'] + end + + if attributes.key?(:'visit_date_time') + self.visit_date_time = attributes[:'visit_date_time'] + end + + if attributes.key?(:'attending_provider') + self.attending_provider = attributes[:'attending_provider'] + end + + if attributes.key?(:'consulting_provider') + self.consulting_provider = attributes[:'consulting_provider'] + end + + if attributes.key?(:'referring_provider') + self.referring_provider = attributes[:'referring_provider'] + end + + if attributes.key?(:'guarantor') + self.guarantor = attributes[:'guarantor'] + end + + if attributes.key?(:'insurances') + if (value = attributes[:'insurances']).is_a?(Array) + self.insurances = value + end + end + + if attributes.key?(:'location') + self.location = attributes[:'location'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + visit_number == o.visit_number && + account_number == o.account_number && + patient_class == o.patient_class && + visit_date_time == o.visit_date_time && + attending_provider == o.attending_provider && + consulting_provider == o.consulting_provider && + referring_provider == o.referring_provider && + guarantor == o.guarantor && + insurances == o.insurances && + location == o.location + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [visit_number, account_number, patient_class, visit_date_time, attending_provider, consulting_provider, referring_provider, guarantor, insurances, location].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_company.rb b/lib/primary_connect_client/models/visit_company.rb new file mode 100644 index 0000000..851ec73 --- /dev/null +++ b/lib/primary_connect_client/models/visit_company.rb @@ -0,0 +1,248 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Insurance company (payor) + class VisitCompany + attr_accessor :identifier + + attr_accessor :name + + attr_accessor :address + + attr_accessor :phone_numbers + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifier' => :'identifier', + :'name' => :'name', + :'address' => :'address', + :'phone_numbers' => :'phone_numbers' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifier' => :'Identifier', + :'name' => :'String', + :'address' => :'Address', + :'phone_numbers' => :'Array' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitCompany` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitCompany`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifier') + self.identifier = attributes[:'identifier'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifier == o.identifier && + name == o.name && + address == o.address && + phone_numbers == o.phone_numbers + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifier, name, address, phone_numbers].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_guarantor.rb b/lib/primary_connect_client/models/visit_guarantor.rb new file mode 100644 index 0000000..d266f76 --- /dev/null +++ b/lib/primary_connect_client/models/visit_guarantor.rb @@ -0,0 +1,358 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Person ultimately responsible for the bill of the appointment + class VisitGuarantor + # Number of the guarantor (?) + attr_accessor :number + + attr_accessor :name + + attr_accessor :ssn + + # Date of Birth + attr_accessor :dob + + attr_accessor :sex + + attr_accessor :spouse + + attr_accessor :address + + attr_accessor :phone_numbers + + attr_accessor :email_addresses + + attr_accessor :type + + attr_accessor :relation_to_patient + + attr_accessor :employer + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'number' => :'number', + :'name' => :'name', + :'ssn' => :'ssn', + :'dob' => :'dob', + :'sex' => :'sex', + :'spouse' => :'spouse', + :'address' => :'address', + :'phone_numbers' => :'phone_numbers', + :'email_addresses' => :'email_addresses', + :'type' => :'type', + :'relation_to_patient' => :'relation_to_patient', + :'employer' => :'employer' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'number' => :'String', + :'name' => :'Name', + :'ssn' => :'String', + :'dob' => :'String', + :'sex' => :'String', + :'spouse' => :'Name', + :'address' => :'Address', + :'phone_numbers' => :'Array', + :'email_addresses' => :'Array', + :'type' => :'String', + :'relation_to_patient' => :'String', + :'employer' => :'VisitGuarantorEmployer' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitGuarantor` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitGuarantor`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'number') + self.number = attributes[:'number'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'ssn') + self.ssn = attributes[:'ssn'] + end + + if attributes.key?(:'dob') + self.dob = attributes[:'dob'] + end + + if attributes.key?(:'sex') + self.sex = attributes[:'sex'] + end + + if attributes.key?(:'spouse') + self.spouse = attributes[:'spouse'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'email_addresses') + if (value = attributes[:'email_addresses']).is_a?(Array) + self.email_addresses = value + end + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + + if attributes.key?(:'relation_to_patient') + self.relation_to_patient = attributes[:'relation_to_patient'] + end + + if attributes.key?(:'employer') + self.employer = attributes[:'employer'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + sex_validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + return false unless sex_validator.valid?(@sex) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] sex Object to be assigned + def sex=(sex) + validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(sex) + fail ArgumentError, "invalid value for \"sex\", must be one of #{validator.allowable_values}." + end + @sex = sex + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + number == o.number && + name == o.name && + ssn == o.ssn && + dob == o.dob && + sex == o.sex && + spouse == o.spouse && + address == o.address && + phone_numbers == o.phone_numbers && + email_addresses == o.email_addresses && + type == o.type && + relation_to_patient == o.relation_to_patient && + employer == o.employer + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [number, name, ssn, dob, sex, spouse, address, phone_numbers, email_addresses, type, relation_to_patient, employer].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_guarantor_employer.rb b/lib/primary_connect_client/models/visit_guarantor_employer.rb new file mode 100644 index 0000000..bca3f3e --- /dev/null +++ b/lib/primary_connect_client/models/visit_guarantor_employer.rb @@ -0,0 +1,238 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class VisitGuarantorEmployer + attr_accessor :name + + attr_accessor :phone_numbers + + attr_accessor :address + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'name' => :'name', + :'phone_numbers' => :'phone_numbers', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'name' => :'String', + :'phone_numbers' => :'Array', + :'address' => :'Address' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitGuarantorEmployer` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitGuarantorEmployer`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'phone_numbers') + if (value = attributes[:'phone_numbers']).is_a?(Array) + self.phone_numbers = value + end + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + name == o.name && + phone_numbers == o.phone_numbers && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [name, phone_numbers, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_insurances.rb b/lib/primary_connect_client/models/visit_insurances.rb new file mode 100644 index 0000000..7ee421f --- /dev/null +++ b/lib/primary_connect_client/models/visit_insurances.rb @@ -0,0 +1,386 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class VisitInsurances + attr_accessor :plan + + # Patient member number + attr_accessor :member_number + + attr_accessor :company + + # Insurance policy group number + attr_accessor :group_number + + # Insurance policy group name + attr_accessor :group_name + + # YYYY-MM-DD, Effect date of this insurance policy + attr_accessor :effective_date + + # YYYY-MM-DD, Expiration date of this insurance policy + attr_accessor :expiration_date + + # Insurance policy number + attr_accessor :policy_number + + # The insurance priority sequence + attr_accessor :priority + + # Type of insurance agreement + attr_accessor :agreement_type + + # Type of insurance Agreement + attr_accessor :coverage_type + + attr_accessor :insured + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'plan' => :'plan', + :'member_number' => :'member_number', + :'company' => :'company', + :'group_number' => :'group_number', + :'group_name' => :'group_name', + :'effective_date' => :'effective_date', + :'expiration_date' => :'expiration_date', + :'policy_number' => :'policy_number', + :'priority' => :'priority', + :'agreement_type' => :'agreement_type', + :'coverage_type' => :'coverage_type', + :'insured' => :'insured' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'plan' => :'VisitPlan', + :'member_number' => :'Array', + :'company' => :'VisitCompany', + :'group_number' => :'String', + :'group_name' => :'String', + :'effective_date' => :'String', + :'expiration_date' => :'String', + :'policy_number' => :'String', + :'priority' => :'String', + :'agreement_type' => :'String', + :'coverage_type' => :'String', + :'insured' => :'VisitInsured' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitInsurances` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitInsurances`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'plan') + self.plan = attributes[:'plan'] + end + + if attributes.key?(:'member_number') + if (value = attributes[:'member_number']).is_a?(Array) + self.member_number = value + end + end + + if attributes.key?(:'company') + self.company = attributes[:'company'] + end + + if attributes.key?(:'group_number') + self.group_number = attributes[:'group_number'] + end + + if attributes.key?(:'group_name') + self.group_name = attributes[:'group_name'] + end + + if attributes.key?(:'effective_date') + self.effective_date = attributes[:'effective_date'] + end + + if attributes.key?(:'expiration_date') + self.expiration_date = attributes[:'expiration_date'] + end + + if attributes.key?(:'policy_number') + self.policy_number = attributes[:'policy_number'] + end + + if attributes.key?(:'priority') + self.priority = attributes[:'priority'] + end + + if attributes.key?(:'agreement_type') + self.agreement_type = attributes[:'agreement_type'] + end + + if attributes.key?(:'coverage_type') + self.coverage_type = attributes[:'coverage_type'] + end + + if attributes.key?(:'insured') + self.insured = attributes[:'insured'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + priority_validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_PRIMARY", "PRIORITY_SECONDARY", "PRIORITY_TERTIARY"]) + return false unless priority_validator.valid?(@priority) + agreement_type_validator = EnumAttributeValidator.new('String', ["AGREEMENT_TYPE_UNKNOWN", "AGREEMENT_TYPE_STANDARD", "AGREEMENT_TYPE_UNIFIED", "AGREEMENT_TYPE_MATERNITY"]) + return false unless agreement_type_validator.valid?(@agreement_type) + coverage_type_validator = EnumAttributeValidator.new('String', ["COVERAGE_TYPE_UNKNOWN", "COVERAGE_TYPE_PATIENT", "COVERAGE_TYPE_CLINIC", "COVERAGE_TYPE_INSURANCE", "COVERAGE_TYPE_OTHER"]) + return false unless coverage_type_validator.valid?(@coverage_type) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] priority Object to be assigned + def priority=(priority) + validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_PRIMARY", "PRIORITY_SECONDARY", "PRIORITY_TERTIARY"]) + unless validator.valid?(priority) + fail ArgumentError, "invalid value for \"priority\", must be one of #{validator.allowable_values}." + end + @priority = priority + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] agreement_type Object to be assigned + def agreement_type=(agreement_type) + validator = EnumAttributeValidator.new('String', ["AGREEMENT_TYPE_UNKNOWN", "AGREEMENT_TYPE_STANDARD", "AGREEMENT_TYPE_UNIFIED", "AGREEMENT_TYPE_MATERNITY"]) + unless validator.valid?(agreement_type) + fail ArgumentError, "invalid value for \"agreement_type\", must be one of #{validator.allowable_values}." + end + @agreement_type = agreement_type + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] coverage_type Object to be assigned + def coverage_type=(coverage_type) + validator = EnumAttributeValidator.new('String', ["COVERAGE_TYPE_UNKNOWN", "COVERAGE_TYPE_PATIENT", "COVERAGE_TYPE_CLINIC", "COVERAGE_TYPE_INSURANCE", "COVERAGE_TYPE_OTHER"]) + unless validator.valid?(coverage_type) + fail ArgumentError, "invalid value for \"coverage_type\", must be one of #{validator.allowable_values}." + end + @coverage_type = coverage_type + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + plan == o.plan && + member_number == o.member_number && + company == o.company && + group_number == o.group_number && + group_name == o.group_name && + effective_date == o.effective_date && + expiration_date == o.expiration_date && + policy_number == o.policy_number && + priority == o.priority && + agreement_type == o.agreement_type && + coverage_type == o.coverage_type && + insured == o.insured + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [plan, member_number, company, group_number, group_name, effective_date, expiration_date, policy_number, priority, agreement_type, coverage_type, insured].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_insured.rb b/lib/primary_connect_client/models/visit_insured.rb new file mode 100644 index 0000000..58cf5be --- /dev/null +++ b/lib/primary_connect_client/models/visit_insured.rb @@ -0,0 +1,322 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + # Individual who has the agreement with the insurance company for the related policy + class VisitInsured + attr_accessor :identifiers + + attr_accessor :name + + attr_accessor :ssn + + attr_accessor :relationship + + # Date of Birth + attr_accessor :dob + + attr_accessor :sex + + attr_accessor :address + + class EnumAttributeValidator + attr_reader :datatype + attr_reader :allowable_values + + def initialize(datatype, allowable_values) + @allowable_values = allowable_values.map do |value| + case datatype.to_s + when /Integer/i + value.to_i + when /Float/i + value.to_f + else + value + end + end + end + + def valid?(value) + !value || allowable_values.include?(value) + end + end + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifiers' => :'identifiers', + :'name' => :'name', + :'ssn' => :'ssn', + :'relationship' => :'relationship', + :'dob' => :'dob', + :'sex' => :'sex', + :'address' => :'address' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifiers' => :'Array', + :'name' => :'Name', + :'ssn' => :'String', + :'relationship' => :'String', + :'dob' => :'String', + :'sex' => :'String', + :'address' => :'Address' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitInsured` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitInsured`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifiers') + if (value = attributes[:'identifiers']).is_a?(Array) + self.identifiers = value + end + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'ssn') + self.ssn = attributes[:'ssn'] + end + + if attributes.key?(:'relationship') + self.relationship = attributes[:'relationship'] + end + + if attributes.key?(:'dob') + self.dob = attributes[:'dob'] + end + + if attributes.key?(:'sex') + self.sex = attributes[:'sex'] + end + + if attributes.key?(:'address') + self.address = attributes[:'address'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + relationship_validator = EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + return false unless relationship_validator.valid?(@relationship) + sex_validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + return false unless sex_validator.valid?(@sex) + true + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] relationship Object to be assigned + def relationship=(relationship) + validator = EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + unless validator.valid?(relationship) + fail ArgumentError, "invalid value for \"relationship\", must be one of #{validator.allowable_values}." + end + @relationship = relationship + end + + # Custom attribute writer method checking allowed values (enum). + # @param [Object] sex Object to be assigned + def sex=(sex) + validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + unless validator.valid?(sex) + fail ArgumentError, "invalid value for \"sex\", must be one of #{validator.allowable_values}." + end + @sex = sex + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifiers == o.identifiers && + name == o.name && + ssn == o.ssn && + relationship == o.relationship && + dob == o.dob && + sex == o.sex && + address == o.address + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifiers, name, ssn, relationship, dob, sex, address].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/models/visit_plan.rb b/lib/primary_connect_client/models/visit_plan.rb new file mode 100644 index 0000000..a9d2462 --- /dev/null +++ b/lib/primary_connect_client/models/visit_plan.rb @@ -0,0 +1,238 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'date' +require 'time' + +module PrimaryConnectClient + class VisitPlan + attr_accessor :identifier + + # Name of insurance plan + attr_accessor :name + + # Type of insurance plan + attr_accessor :type + + # Attribute mapping from ruby-style variable name to JSON key. + def self.attribute_map + { + :'identifier' => :'identifier', + :'name' => :'name', + :'type' => :'type' + } + end + + # Returns all the JSON keys this model knows about + def self.acceptable_attributes + attribute_map.values + end + + # Attribute type mapping. + def self.openapi_types + { + :'identifier' => :'Identifier', + :'name' => :'String', + :'type' => :'String' + } + end + + # List of attributes with nullable: true + def self.openapi_nullable + Set.new([ + ]) + end + + # Initializes the object + # @param [Hash] attributes Model attributes in the form of hash + def initialize(attributes = {}) + if (!attributes.is_a?(Hash)) + fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::VisitPlan` initialize method" + end + + # check to see if the attribute exists and convert string to symbol for hash key + attributes = attributes.each_with_object({}) { |(k, v), h| + if (!self.class.attribute_map.key?(k.to_sym)) + fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::VisitPlan`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect + end + h[k.to_sym] = v + } + + if attributes.key?(:'identifier') + self.identifier = attributes[:'identifier'] + end + + if attributes.key?(:'name') + self.name = attributes[:'name'] + end + + if attributes.key?(:'type') + self.type = attributes[:'type'] + end + end + + # Show invalid properties with the reasons. Usually used together with valid? + # @return Array for valid properties with the reasons + def list_invalid_properties + invalid_properties = Array.new + invalid_properties + end + + # Check to see if the all the properties in the model are valid + # @return true if the model is valid + def valid? + true + end + + # Checks equality by comparing each attribute. + # @param [Object] Object to be compared + def ==(o) + return true if self.equal?(o) + self.class == o.class && + identifier == o.identifier && + name == o.name && + type == o.type + end + + # @see the `==` method + # @param [Object] Object to be compared + def eql?(o) + self == o + end + + # Calculates hash code according to all attributes. + # @return [Integer] Hash code + def hash + [identifier, name, type].hash + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def self.build_from_hash(attributes) + new.build_from_hash(attributes) + end + + # Builds the object from hash + # @param [Hash] attributes Model attributes in the form of hash + # @return [Object] Returns the model itself + def build_from_hash(attributes) + return nil unless attributes.is_a?(Hash) + self.class.openapi_types.each_pair do |key, type| + if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key) + self.send("#{key}=", nil) + elsif type =~ /\AArray<(.*)>/i + # check to ensure the input is an array given that the attribute + # is documented as an array but the input is not + if attributes[self.class.attribute_map[key]].is_a?(Array) + self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) }) + end + elsif !attributes[self.class.attribute_map[key]].nil? + self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) + end + end + + self + end + + # Deserializes the data based on type + # @param string type Data type + # @param string value Value to be deserialized + # @return [Object] Deserialized data + def _deserialize(type, value) + case type.to_sym + when :Time + Time.parse(value) + when :Date + Date.parse(value) + when :String + value.to_s + when :Integer + value.to_i + when :Float + value.to_f + when :Boolean + if value.to_s =~ /\A(true|t|yes|y|1)\z/i + true + else + false + end + when :Object + # generic object (usually a Hash), return directly + value + when /\AArray<(?.+)>\z/ + inner_type = Regexp.last_match[:inner_type] + value.map { |v| _deserialize(inner_type, v) } + when /\AHash<(?.+?), (?.+)>\z/ + k_type = Regexp.last_match[:k_type] + v_type = Regexp.last_match[:v_type] + {}.tap do |hash| + value.each do |k, v| + hash[_deserialize(k_type, k)] = _deserialize(v_type, v) + end + end + else # model + # models (e.g. Pet) or oneOf + klass = PrimaryConnectClient.const_get(type) + klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value) + end + end + + # Returns the string representation of the object + # @return [String] String presentation of the object + def to_s + to_hash.to_s + end + + # to_body is an alias to to_hash (backward compatibility) + # @return [Hash] Returns the object in the form of hash + def to_body + to_hash + end + + # Returns the object in the form of hash + # @return [Hash] Returns the object in the form of hash + def to_hash + hash = {} + self.class.attribute_map.each_pair do |attr, param| + value = self.send(attr) + if value.nil? + is_nullable = self.class.openapi_nullable.include?(attr) + next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) + end + + hash[param] = _to_hash(value) + end + hash + end + + # Outputs non-array value in the form of hash + # For object, use to_hash. Otherwise, just return the value + # @param [Object] value Any valid value + # @return [Hash] Returns the value in the form of hash + def _to_hash(value) + if value.is_a?(Array) + value.compact.map { |v| _to_hash(v) } + elsif value.is_a?(Hash) + {}.tap do |hash| + value.each { |k, v| hash[k] = _to_hash(v) } + end + elsif value.respond_to? :to_hash + value.to_hash + else + value + end + end + + end + +end diff --git a/lib/primary_connect_client/version.rb b/lib/primary_connect_client/version.rb index d09a5f7..dc7ff1a 100644 --- a/lib/primary_connect_client/version.rb +++ b/lib/primary_connect_client/version.rb @@ -1,5 +1,15 @@ -# frozen_string_literal: true +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end module PrimaryConnectClient - VERSION = '0.8.0' + VERSION = '1.0.0' end diff --git a/primary_connect_client.gemspec b/primary_connect_client.gemspec index 1ede03c..79e4c51 100644 --- a/primary_connect_client.gemspec +++ b/primary_connect_client.gemspec @@ -1,5 +1,3 @@ -# frozen_string_literal: true - # -*- encoding: utf-8 -*- =begin @@ -7,6 +5,11 @@ #Client Library to interface with Primary Connect +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + =end $:.push File.expand_path("../lib", __FILE__) @@ -16,7 +19,7 @@ Gem::Specification.new do |s| s.name = "primary_connect_client" s.version = PrimaryConnectClient::VERSION s.platform = Gem::Platform::RUBY - s.authors = [""] + s.authors = ["OpenAPI-Generator"] s.email = [""] s.homepage = "https://openapi-generator.tech" s.summary = "Primary Connect API V1 Ruby Gem" @@ -25,12 +28,11 @@ Gem::Specification.new do |s| s.required_ruby_version = ">= 2.4" s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1' - s.add_runtime_dependency 'primary_connect_proto', '~> 0.9.0' s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0' s.files = `find *`.split("\n").uniq.sort.select { |f| !f.empty? } s.test_files = `find spec/*`.split("\n") s.executables = [] - s.require_paths = ["lib", "lib/protobuf/build"] + s.require_paths = ["lib"] end diff --git a/spec/api/default_api_spec.rb b/spec/api/default_api_spec.rb index 7596c22..efb080a 100644 --- a/spec/api/default_api_spec.rb +++ b/spec/api/default_api_spec.rb @@ -1,12 +1,12 @@ =begin -#API V1 +#Primary Connect API V1 -#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) +#Client Library to interface with Primary Connect The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end @@ -32,90 +32,93 @@ end end - # unit tests for api_v1_events_get - # list events + # unit tests for create_order + # create order # @param [Hash] opts the optional parameters - # @option opts [String] :last_event_id - # @option opts [String] :event_types - # @return [nil] - describe 'api_v1_events_get test' do + # @option opts [Order] :order + # @return [OrderIds] + describe 'create_order test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_messages_get - # list messages + # unit tests for create_result + # create result + # @param order_id Order id # @param [Hash] opts the optional parameters - # @return [Array] - describe 'api_v1_messages_get test' do + # @option opts [Result] :result + # @return [ResultIds] + describe 'create_result test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_orders_get - # list orders + # unit tests for get_lab_report + # show lab report + # @param result_id Result id # @param [Hash] opts the optional parameters # @return [nil] - describe 'api_v1_orders_get test' do + describe 'get_lab_report test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_orders_id_get + # unit tests for get_order # show order # @param id id # @param [Hash] opts the optional parameters - # @return [nil] - describe 'api_v1_orders_id_get test' do + # @return [OrderWithEventErrors] + describe 'get_order test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_orders_order_id_results_get - # list results - # @param order_id Order id + # unit tests for list_events + # list events # @param [Hash] opts the optional parameters - # @return [nil] - describe 'api_v1_orders_order_id_results_get test' do + # @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id. + # @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived] + # @return [Events] + describe 'list_events test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_orders_order_id_results_id_get - # show result - # @param order_id Order id - # @param id id + # unit tests for list_orders + # list orders # @param [Hash] opts the optional parameters - # @return [nil] - describe 'api_v1_orders_order_id_results_id_get test' do + # @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id. + # @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable] + # @return [Orders] + describe 'list_orders test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_orders_post - # create order + # unit tests for list_results + # list results + # @param order_id Order id # @param [Hash] opts the optional parameters - # @option opts [Order] :order - # @return [nil] - describe 'api_v1_orders_post test' do + # @return [Results] + describe 'list_results test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end - # unit tests for api_v1_lab_report_get - # show result - # @param order_id Order id - # @param result_id Result id + # unit tests for update_order + # update order + # @param id id # @param [Hash] opts the optional parameters - # @return [nil] - describe 'api_v1_lab_report_get test' do + # @option opts [Order] :order + # @return [OrderIds] + describe 'update_order test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end diff --git a/spec/api_client_spec.rb b/spec/api_client_spec.rb index b81681a..ae40acf 100644 --- a/spec/api_client_spec.rb +++ b/spec/api_client_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end @@ -197,8 +197,8 @@ let(:api_client) { PrimaryConnectClient::ApiClient.new } it 'works' do - expect(api_client.select_header_content_type(nil)).to eq('application/json') - expect(api_client.select_header_content_type([])).to eq('application/json') + expect(api_client.select_header_content_type(nil)).to be_nil + expect(api_client.select_header_content_type([])).to be_nil expect(api_client.select_header_content_type(['application/json'])).to eq('application/json') expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8') diff --git a/spec/configuration_spec.rb b/spec/configuration_spec.rb index d7ecde9..a754321 100644 --- a/spec/configuration_spec.rb +++ b/spec/configuration_spec.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end diff --git a/spec/models/address_spec.rb b/spec/models/address_spec.rb new file mode 100644 index 0000000..79bfc8b --- /dev/null +++ b/spec/models/address_spec.rb @@ -0,0 +1,70 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Address +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Address do + let(:instance) { PrimaryConnectClient::Address.new } + + describe 'test an instance of Address' do + it 'should create an instance of Address' do + expect(instance).to be_instance_of(PrimaryConnectClient::Address) + end + end + describe 'test attribute "street_address_1"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "street_address_2"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "city"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "state_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "zip"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "county"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "country_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/coded_value_spec.rb b/spec/models/coded_value_spec.rb new file mode 100644 index 0000000..34f2e40 --- /dev/null +++ b/spec/models/coded_value_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::CodedValue +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::CodedValue do + let(:instance) { PrimaryConnectClient::CodedValue.new } + + describe 'test an instance of CodedValue' do + it 'should create an instance of CodedValue' do + expect(instance).to be_instance_of(PrimaryConnectClient::CodedValue) + end + end + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "code_set"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "description"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/error_spec.rb b/spec/models/error_spec.rb new file mode 100644 index 0000000..c29886f --- /dev/null +++ b/spec/models/error_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Error +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Error do + let(:instance) { PrimaryConnectClient::Error.new } + + describe 'test an instance of Error' do + it 'should create an instance of Error' do + expect(instance).to be_instance_of(PrimaryConnectClient::Error) + end + end + describe 'test attribute "error"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/event_spec.rb b/spec/models/event_spec.rb new file mode 100644 index 0000000..7ca2e38 --- /dev/null +++ b/spec/models/event_spec.rb @@ -0,0 +1,58 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Event +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Event do + let(:instance) { PrimaryConnectClient::Event.new } + + describe 'test an instance of Event' do + it 'should create an instance of Event' do + expect(instance).to be_instance_of(PrimaryConnectClient::Event) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "eventable_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "created_at"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "eventable_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/events_spec.rb b/spec/models/events_spec.rb new file mode 100644 index 0000000..734eb16 --- /dev/null +++ b/spec/models/events_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Events +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Events do + let(:instance) { PrimaryConnectClient::Events.new } + + describe 'test an instance of Events' do + it 'should create an instance of Events' do + expect(instance).to be_instance_of(PrimaryConnectClient::Events) + end + end + describe 'test attribute "events"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/identifier_spec.rb b/spec/models/identifier_spec.rb new file mode 100644 index 0000000..59ddd4a --- /dev/null +++ b/spec/models/identifier_spec.rb @@ -0,0 +1,40 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Identifier +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Identifier do + let(:instance) { PrimaryConnectClient::Identifier.new } + + describe 'test an instance of Identifier' do + it 'should create an instance of Identifier' do + expect(instance).to be_instance_of(PrimaryConnectClient::Identifier) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "id_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/location_spec.rb b/spec/models/location_spec.rb new file mode 100644 index 0000000..efd5a86 --- /dev/null +++ b/spec/models/location_spec.rb @@ -0,0 +1,58 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Location +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Location do + let(:instance) { PrimaryConnectClient::Location.new } + + describe 'test an instance of Location' do + it 'should create an instance of Location' do + expect(instance).to be_instance_of(PrimaryConnectClient::Location) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "facility"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "department"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "room"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "bed"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/meta_destinations_spec.rb b/spec/models/meta_destinations_spec.rb new file mode 100644 index 0000000..9b405ac --- /dev/null +++ b/spec/models/meta_destinations_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::MetaDestinations +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::MetaDestinations do + let(:instance) { PrimaryConnectClient::MetaDestinations.new } + + describe 'test an instance of MetaDestinations' do + it 'should create an instance of MetaDestinations' do + expect(instance).to be_instance_of(PrimaryConnectClient::MetaDestinations) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "config"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/meta_message_spec.rb b/spec/models/meta_message_spec.rb new file mode 100644 index 0000000..8bfadfb --- /dev/null +++ b/spec/models/meta_message_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::MetaMessage +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::MetaMessage do + let(:instance) { PrimaryConnectClient::MetaMessage.new } + + describe 'test an instance of MetaMessage' do + it 'should create an instance of MetaMessage' do + expect(instance).to be_instance_of(PrimaryConnectClient::MetaMessage) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/meta_source_spec.rb b/spec/models/meta_source_spec.rb new file mode 100644 index 0000000..b4b1ee1 --- /dev/null +++ b/spec/models/meta_source_spec.rb @@ -0,0 +1,40 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::MetaSource +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::MetaSource do + let(:instance) { PrimaryConnectClient::MetaSource.new } + + describe 'test an instance of MetaSource' do + it 'should create an instance of MetaSource' do + expect(instance).to be_instance_of(PrimaryConnectClient::MetaSource) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/meta_spec.rb b/spec/models/meta_spec.rb new file mode 100644 index 0000000..f97fda2 --- /dev/null +++ b/spec/models/meta_spec.rb @@ -0,0 +1,80 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Meta +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Meta do + let(:instance) { PrimaryConnectClient::Meta.new } + + describe 'test an instance of Meta' do + it 'should create an instance of Meta' do + expect(instance).to be_instance_of(PrimaryConnectClient::Meta) + end + end + describe 'test attribute "event_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["EVENT_TYPE_UNKNOWN", "EVENT_TYPE_NEW_UNSOLICITED", "EVENT_TYPE_UPDATE", "EVENT_TYPE_CANCEL", "EVENT_TYPE_QUERY", "EVENT_TYPE_NEW"]) + # validator.allowable_values.each do |value| + # expect { instance.event_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "event_date_and_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "test"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "destinations"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "message"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "transmission"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "facility_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/name_spec.rb b/spec/models/name_spec.rb new file mode 100644 index 0000000..716feed --- /dev/null +++ b/spec/models/name_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Name +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Name do + let(:instance) { PrimaryConnectClient::Name.new } + + describe 'test an instance of Name' do + it 'should create an instance of Name' do + expect(instance).to be_instance_of(PrimaryConnectClient::Name) + end + end + describe 'test attribute "first_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "last_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "middle_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_ids_spec.rb b/spec/models/order_ids_spec.rb new file mode 100644 index 0000000..871d5a7 --- /dev/null +++ b/spec/models/order_ids_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderIds +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderIds do + let(:instance) { PrimaryConnectClient::OrderIds.new } + + describe 'test an instance of OrderIds' do + it 'should create an instance of OrderIds' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderIds) + end + end + describe 'test attribute "orders"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_order_clinical_info_spec.rb b/spec/models/order_order_clinical_info_spec.rb new file mode 100644 index 0000000..f444adf --- /dev/null +++ b/spec/models/order_order_clinical_info_spec.rb @@ -0,0 +1,58 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderOrderClinicalInfo +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderOrderClinicalInfo do + let(:instance) { PrimaryConnectClient::OrderOrderClinicalInfo.new } + + describe 'test an instance of OrderOrderClinicalInfo' do + it 'should create an instance of OrderOrderClinicalInfo' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderOrderClinicalInfo) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "units"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "abbreviation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_order_diagnoses_spec.rb b/spec/models/order_order_diagnoses_spec.rb new file mode 100644 index 0000000..00c4a1d --- /dev/null +++ b/spec/models/order_order_diagnoses_spec.rb @@ -0,0 +1,50 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderOrderDiagnoses +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderOrderDiagnoses do + let(:instance) { PrimaryConnectClient::OrderOrderDiagnoses.new } + + describe 'test an instance of OrderOrderDiagnoses' do + it 'should create an instance of OrderOrderDiagnoses' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderOrderDiagnoses) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["TYPE_UNKNOWN", "TYPE_ADMITTING", "TYPE_FINAL", "TYPE_SELF", "TYPE_WORKING", "TYPE_PRINCIPAL"]) + # validator.allowable_values.each do |value| + # expect { instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "documented_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_order_ordering_facility_spec.rb b/spec/models/order_order_ordering_facility_spec.rb new file mode 100644 index 0000000..72dcac5 --- /dev/null +++ b/spec/models/order_order_ordering_facility_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderOrderOrderingFacility +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderOrderOrderingFacility do + let(:instance) { PrimaryConnectClient::OrderOrderOrderingFacility.new } + + describe 'test an instance of OrderOrderOrderingFacility' do + it 'should create an instance of OrderOrderOrderingFacility' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderOrderOrderingFacility) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_order_spec.rb b/spec/models/order_order_spec.rb new file mode 100644 index 0000000..b30e0a4 --- /dev/null +++ b/spec/models/order_order_spec.rb @@ -0,0 +1,164 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderOrder +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderOrder do + let(:instance) { PrimaryConnectClient::OrderOrder.new } + + describe 'test an instance of OrderOrder' do + it 'should create an instance of OrderOrder' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderOrder) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "application_order_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "transaction_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "collection_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "completion_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "specimen"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "procedure"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ordering_provider"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "result_copy_providers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ordering_facility"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "priority"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_ASAP", "PRIORITY_ROUTINE", "PRIORITY_PREOPERATIVE", "PRIORITY_TIMING_CRITICAL", "PRIORITY_STAT"]) + # validator.allowable_values.each do |value| + # expect { instance.priority = value }.not_to raise_error + # end + end + end + + describe 'test attribute "diagnoses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "clinical_comments"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "clinical_info"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "results_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["UNAVAILABLE", "PRELIMINARY", "IN_PROCESS", "CORRECTED", "CANCELED", "FINAL"]) + # validator.allowable_values.each do |value| + # expect { instance.results_status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "response_flag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["UNKNOWN", "EXCEPTIONS", "REPLACEMENTS", "ASSOCIATED_SEGMENTS", "CONFIRMATIONS", "ACKNOWLEDGEMENT"]) + # validator.allowable_values.each do |value| + # expect { instance.response_flag = value }.not_to raise_error + # end + end + end + + describe 'test attribute "results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_order_specimen_spec.rb b/spec/models/order_order_specimen_spec.rb new file mode 100644 index 0000000..38b07ec --- /dev/null +++ b/spec/models/order_order_specimen_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderOrderSpecimen +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderOrderSpecimen do + let(:instance) { PrimaryConnectClient::OrderOrderSpecimen.new } + + describe 'test an instance of OrderOrderSpecimen' do + it 'should create an instance of OrderOrderSpecimen' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderOrderSpecimen) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "body_site"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_spec.rb b/spec/models/order_spec.rb new file mode 100644 index 0000000..4ad7db3 --- /dev/null +++ b/spec/models/order_spec.rb @@ -0,0 +1,52 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Order +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Order do + let(:instance) { PrimaryConnectClient::Order.new } + + describe 'test an instance of Order' do + it 'should create an instance of Order' do + expect(instance).to be_instance_of(PrimaryConnectClient::Order) + end + end + describe 'test attribute "order"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "patient"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "visit"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/order_with_event_errors_spec.rb b/spec/models/order_with_event_errors_spec.rb new file mode 100644 index 0000000..1323286 --- /dev/null +++ b/spec/models/order_with_event_errors_spec.rb @@ -0,0 +1,40 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrderWithEventErrors +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrderWithEventErrors do + let(:instance) { PrimaryConnectClient::OrderWithEventErrors.new } + + describe 'test an instance of OrderWithEventErrors' do + it 'should create an instance of OrderWithEventErrors' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrderWithEventErrors) + end + end + describe 'test attribute "order"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "errors"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/orders_orders_spec.rb b/spec/models/orders_orders_spec.rb new file mode 100644 index 0000000..f2be2f8 --- /dev/null +++ b/spec/models/orders_orders_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::OrdersOrders +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::OrdersOrders do + let(:instance) { PrimaryConnectClient::OrdersOrders.new } + + describe 'test an instance of OrdersOrders' do + it 'should create an instance of OrdersOrders' do + expect(instance).to be_instance_of(PrimaryConnectClient::OrdersOrders) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "state"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "order"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/orders_spec.rb b/spec/models/orders_spec.rb new file mode 100644 index 0000000..5f39d3a --- /dev/null +++ b/spec/models/orders_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Orders +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Orders do + let(:instance) { PrimaryConnectClient::Orders.new } + + describe 'test an instance of Orders' do + it 'should create an instance of Orders' do + expect(instance).to be_instance_of(PrimaryConnectClient::Orders) + end + end + describe 'test attribute "orders"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/patient_contacts_spec.rb b/spec/models/patient_contacts_spec.rb new file mode 100644 index 0000000..c6e9211 --- /dev/null +++ b/spec/models/patient_contacts_spec.rb @@ -0,0 +1,68 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::PatientContacts +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::PatientContacts do + let(:instance) { PrimaryConnectClient::PatientContacts.new } + + describe 'test an instance of PatientContacts' do + it 'should create an instance of PatientContacts' do + expect(instance).to be_instance_of(PrimaryConnectClient::PatientContacts) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "relation_to_patient"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + # validator.allowable_values.each do |value| + # expect { instance.relation_to_patient = value }.not_to raise_error + # end + end + end + + describe 'test attribute "email_addresses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "roles"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/patient_demographics_spec.rb b/spec/models/patient_demographics_spec.rb new file mode 100644 index 0000000..3c510c2 --- /dev/null +++ b/spec/models/patient_demographics_spec.rb @@ -0,0 +1,168 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::PatientDemographics +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::PatientDemographics do + let(:instance) { PrimaryConnectClient::PatientDemographics.new } + + describe 'test an instance of PatientDemographics' do + it 'should create an instance of PatientDemographics' do + expect(instance).to be_instance_of(PrimaryConnectClient::PatientDemographics) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "dob"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ssn"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sex"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.sex = value }.not_to raise_error + # end + end + end + + describe 'test attribute "gender"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["GENDER_UNKNOWN", "GENDER_FEMALE", "GENDER_MALE", "GENDER_OTHER", "GENDER_NON_BINARY", "GENDER_TRANSGENDER_MALE", "GENDER_TRANSGENDER_FEMALE", "GENDER_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.gender = value }.not_to raise_error + # end + end + end + + describe 'test attribute "sexual_orientation"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ORIENTATION_UNKNOWN", "ORIENTATION_HOMOSEXUAL", "ORIENTATION_HETEROSEXUAL", "ORIENTATION_BISEXUAL", "ORIENTATION_QUESTIONING", "ORIENTATION_OTHER", "ORIENTATION_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.sexual_orientation = value }.not_to raise_error + # end + end + end + + describe 'test attribute "races"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["RACE_UNKNOWN", "RACE_AMERICAN_INDIAN_OR_ALASKA_NATIVE", "RACE_ASIAN", "RACE_BLACK_OR_AFRICAN_AMERICAN", "RACE_NATIVE_HAWAIIAN_OR_OTHER_PACIFIC_ISLANDER", "RACE_OTHER", "RACE_WHITE", "RACE_PREFER_NOT_TO_DISCLOSE", "RACE_MIDDLE_EASTERN_OR_NORTH_AFRICAN", "RACE_SOUTH_OR_CENTRAL_AMERICAN_INDIAN"]) + # validator.allowable_values.each do |value| + # expect { instance.races = value }.not_to raise_error + # end + end + end + + describe 'test attribute "race_details"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["RACE_DETAIL_UNKNOWN", "RACE_DETAIL_ASIAN_INDIAN", "RACE_DETAIL_CHINESE", "RACE_DETAIL_CAMBODIAN", "RACE_DETAIL_FILIPINO", "RACE_DETAIL_JAPANESE", "RACE_DETAIL_KOREAN", "RACE_DETAIL_LAOTIAN", "RACE_DETAIL_VIETNAMESE", "RACE_DETAIL_OTHER_ASIAN", "RACE_DETAIL_NATIVE_HAWAIIAN", "RACE_DETAIL_GUAMIAN_OR_CHAMORRO", "RACE_DETAIL_SAMOAN", "RACE_DETAIL_OTHER_PACIFIC_ISLANDER", "RACE_DETAIL_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.race_details = value }.not_to raise_error + # end + end + end + + describe 'test attribute "ethnicity"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["ETHNICITY_UNKNOWN", "ETHNICITY_HISPANIC", "ETHNICITY_NON_HISPANIC", "ETHNICITY_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.ethnicity = value }.not_to raise_error + # end + end + end + + describe 'test attribute "ethnicity_detail"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('Array', ["ETHNICITY_DETAIL_UNKNOWN", "ETHNICITY_DETAIL_MEXICAN", "ETHNICITY_DETAIL_PUERTO_RICAN", "ETHNICITY_DETAIL_CUBAN", "ETHNICITY_DETAIL_OTHER", "ETHNICITY_DETAIL_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.ethnicity_detail = value }.not_to raise_error + # end + end + end + + describe 'test attribute "marital_status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["MARITAL_STATUS_UNKNOWN", "MARITAL_STATUS_SEPARATED", "MARITAL_STATUS_UNMARRIED", "MARITAL_STATUS_COMMON_LAW", "MARITAL_STATUS_DIVORCED", "MARITAL_STATUS_LEGALLY_SEPARATED", "MARITAL_STATUS_LIVING_TOGETHER", "MARITAL_STATUS_INTERLOCUTORY", "MARITAL_STATUS_MARRIED", "MARITAL_STATUS_ANNULLED", "MARITAL_STATUS_OTHER", "MARITAL_STATUS_DOMESTIC_PARTNER", "MARITAL_STATUS_REGISTERED_DOMESTIC_PARTNER", "MARITAL_STATUS_SINGLE", "MARITAL_STATUS_UNREPORTED", "MARITAL_STATUS_WIDOWED"]) + # validator.allowable_values.each do |value| + # expect { instance.marital_status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "is_deceased"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "death_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email_addresses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "language_code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "citizenships"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/patient_spec.rb b/spec/models/patient_spec.rb new file mode 100644 index 0000000..0c115f5 --- /dev/null +++ b/spec/models/patient_spec.rb @@ -0,0 +1,52 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Patient +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Patient do + let(:instance) { PrimaryConnectClient::Patient.new } + + describe 'test an instance of Patient' do + it 'should create an instance of Patient' do + expect(instance).to be_instance_of(PrimaryConnectClient::Patient) + end + end + describe 'test attribute "identifiers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "demographics"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "contacts"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/phone_number_spec.rb b/spec/models/phone_number_spec.rb new file mode 100644 index 0000000..1fd7855 --- /dev/null +++ b/spec/models/phone_number_spec.rb @@ -0,0 +1,44 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::PhoneNumber +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::PhoneNumber do + let(:instance) { PrimaryConnectClient::PhoneNumber.new } + + describe 'test an instance of PhoneNumber' do + it 'should create an instance of PhoneNumber' do + expect(instance).to be_instance_of(PrimaryConnectClient::PhoneNumber) + end + end + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["UNKNOWN", "OFFICE", "MOBILE", "FAX", "HOME"]) + # validator.allowable_values.each do |value| + # expect { instance.type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/provider_spec.rb b/spec/models/provider_spec.rb new file mode 100644 index 0000000..e1996b7 --- /dev/null +++ b/spec/models/provider_spec.rb @@ -0,0 +1,76 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Provider +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Provider do + let(:instance) { PrimaryConnectClient::Provider.new } + + describe 'test an instance of Provider' do + it 'should create an instance of Provider' do + expect(instance).to be_instance_of(PrimaryConnectClient::Provider) + end + end + describe 'test attribute "identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "npi"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "credentials"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email_addresses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "location"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/result_ids_spec.rb b/spec/models/result_ids_spec.rb new file mode 100644 index 0000000..407a175 --- /dev/null +++ b/spec/models/result_ids_spec.rb @@ -0,0 +1,34 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::ResultIds +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::ResultIds do + let(:instance) { PrimaryConnectClient::ResultIds.new } + + describe 'test an instance of ResultIds' do + it 'should create an instance of ResultIds' do + expect(instance).to be_instance_of(PrimaryConnectClient::ResultIds) + end + end + describe 'test attribute "results"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/result_reference_range_spec.rb b/spec/models/result_reference_range_spec.rb new file mode 100644 index 0000000..67ad7ac --- /dev/null +++ b/spec/models/result_reference_range_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::ResultReferenceRange +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::ResultReferenceRange do + let(:instance) { PrimaryConnectClient::ResultReferenceRange.new } + + describe 'test an instance of ResultReferenceRange' do + it 'should create an instance of ResultReferenceRange' do + expect(instance).to be_instance_of(PrimaryConnectClient::ResultReferenceRange) + end + end + describe 'test attribute "low"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "high"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "text"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/result_report_spec.rb b/spec/models/result_report_spec.rb new file mode 100644 index 0000000..96072bd --- /dev/null +++ b/spec/models/result_report_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::ResultReport +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::ResultReport do + let(:instance) { PrimaryConnectClient::ResultReport.new } + + describe 'test an instance of ResultReport' do + it 'should create an instance of ResultReport' do + expect(instance).to be_instance_of(PrimaryConnectClient::ResultReport) + end + end + describe 'test attribute "file_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "data"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "url"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/result_spec.rb b/spec/models/result_spec.rb new file mode 100644 index 0000000..a642c7c --- /dev/null +++ b/spec/models/result_spec.rb @@ -0,0 +1,142 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Result +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Result do + let(:instance) { PrimaryConnectClient::Result.new } + + describe 'test an instance of Result' do + it 'should create an instance of Result' do + expect(instance).to be_instance_of(PrimaryConnectClient::Result) + end + end + describe 'test attribute "code"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "related_group_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "specimen"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "value_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["UNKNOWN", "CODED_ENTRY", "DATE", "DATE_TIME", "ENCAPSULATED_DATA", "FORMATTED_TEXT", "ID", "ID_AND_NAME", "MONEY", "NAME", "NUMERIC", "PHONE_NUMBER", "PRICE", "REFERENCE_POINTER", "STRING", "TIME", "STRUCTURED_NUMERIC", "ADDRESS"]) + # validator.allowable_values.each do |value| + # expect { instance.value_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "completion_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "report"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "units"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "notes"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "abnormal_flag"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["NONE", "LOW", "VERY_LOW", "HIGH", "VERY_HIGH", "ABNORMAL", "SUSCEPTIBLE", "RESISTANT", "INTERMEDIATE", "MODERATELY_SUSCEPTIBLE", "VERY_SUSCEPTIBLE", "CRITICALLY_ABNORMAL", "CRITICALLY_LOW", "CRITICALLY_HIGH", "NOT_SUSCEPTIBLE", "INCONCLUSIVE", "VERY_ABNORMAL", "NORMAL"]) + # validator.allowable_values.each do |value| + # expect { instance.abnormal_flag = value }.not_to raise_error + # end + end + end + + describe 'test attribute "status"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["NONE_SPECIFIED", "INCOMPLETE", "CORRECTED", "FINAL", "UNAVAILABLE", "PRELIMINARY", "CANCELED", "DELETED", "REJECTED"]) + # validator.allowable_values.each do |value| + # expect { instance.status = value }.not_to raise_error + # end + end + end + + describe 'test attribute "primary_result_interpreter"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "producer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "performer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "reference_range"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "observation_method"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "producer_order_id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/result_specimen_spec.rb b/spec/models/result_specimen_spec.rb new file mode 100644 index 0000000..311e0d7 --- /dev/null +++ b/spec/models/result_specimen_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::ResultSpecimen +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::ResultSpecimen do + let(:instance) { PrimaryConnectClient::ResultSpecimen.new } + + describe 'test an instance of ResultSpecimen' do + it 'should create an instance of ResultSpecimen' do + expect(instance).to be_instance_of(PrimaryConnectClient::ResultSpecimen) + end + end + describe 'test attribute "id"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "source"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "body_site"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/results_spec.rb b/spec/models/results_spec.rb new file mode 100644 index 0000000..fdab9d6 --- /dev/null +++ b/spec/models/results_spec.rb @@ -0,0 +1,40 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Results +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Results do + let(:instance) { PrimaryConnectClient::Results.new } + + describe 'test an instance of Results' do + it 'should create an instance of Results' do + expect(instance).to be_instance_of(PrimaryConnectClient::Results) + end + end + describe 'test attribute "meta"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "result"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_company_spec.rb b/spec/models/visit_company_spec.rb new file mode 100644 index 0000000..48b7ce4 --- /dev/null +++ b/spec/models/visit_company_spec.rb @@ -0,0 +1,52 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitCompany +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitCompany do + let(:instance) { PrimaryConnectClient::VisitCompany.new } + + describe 'test an instance of VisitCompany' do + it 'should create an instance of VisitCompany' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitCompany) + end + end + describe 'test attribute "identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_guarantor_employer_spec.rb b/spec/models/visit_guarantor_employer_spec.rb new file mode 100644 index 0000000..07cedba --- /dev/null +++ b/spec/models/visit_guarantor_employer_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitGuarantorEmployer +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitGuarantorEmployer do + let(:instance) { PrimaryConnectClient::VisitGuarantorEmployer.new } + + describe 'test an instance of VisitGuarantorEmployer' do + it 'should create an instance of VisitGuarantorEmployer' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitGuarantorEmployer) + end + end + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_guarantor_spec.rb b/spec/models/visit_guarantor_spec.rb new file mode 100644 index 0000000..516e681 --- /dev/null +++ b/spec/models/visit_guarantor_spec.rb @@ -0,0 +1,104 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitGuarantor +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitGuarantor do + let(:instance) { PrimaryConnectClient::VisitGuarantor.new } + + describe 'test an instance of VisitGuarantor' do + it 'should create an instance of VisitGuarantor' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitGuarantor) + end + end + describe 'test attribute "number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ssn"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "dob"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sex"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.sex = value }.not_to raise_error + # end + end + end + + describe 'test attribute "spouse"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "phone_numbers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "email_addresses"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "relation_to_patient"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "employer"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_insurances_spec.rb b/spec/models/visit_insurances_spec.rb new file mode 100644 index 0000000..3504dac --- /dev/null +++ b/spec/models/visit_insurances_spec.rb @@ -0,0 +1,112 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitInsurances +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitInsurances do + let(:instance) { PrimaryConnectClient::VisitInsurances.new } + + describe 'test an instance of VisitInsurances' do + it 'should create an instance of VisitInsurances' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitInsurances) + end + end + describe 'test attribute "plan"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "member_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "company"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "group_name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "effective_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "expiration_date"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "policy_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "priority"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_PRIMARY", "PRIORITY_SECONDARY", "PRIORITY_TERTIARY"]) + # validator.allowable_values.each do |value| + # expect { instance.priority = value }.not_to raise_error + # end + end + end + + describe 'test attribute "agreement_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["AGREEMENT_TYPE_UNKNOWN", "AGREEMENT_TYPE_STANDARD", "AGREEMENT_TYPE_UNIFIED", "AGREEMENT_TYPE_MATERNITY"]) + # validator.allowable_values.each do |value| + # expect { instance.agreement_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "coverage_type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["COVERAGE_TYPE_UNKNOWN", "COVERAGE_TYPE_PATIENT", "COVERAGE_TYPE_CLINIC", "COVERAGE_TYPE_INSURANCE", "COVERAGE_TYPE_OTHER"]) + # validator.allowable_values.each do |value| + # expect { instance.coverage_type = value }.not_to raise_error + # end + end + end + + describe 'test attribute "insured"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_insured_spec.rb b/spec/models/visit_insured_spec.rb new file mode 100644 index 0000000..82dc8e3 --- /dev/null +++ b/spec/models/visit_insured_spec.rb @@ -0,0 +1,78 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitInsured +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitInsured do + let(:instance) { PrimaryConnectClient::VisitInsured.new } + + describe 'test an instance of VisitInsured' do + it 'should create an instance of VisitInsured' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitInsured) + end + end + describe 'test attribute "identifiers"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "ssn"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "relationship"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["RELATIONSHIP_UNKNOWN", "RELATIONSHIP_OTHER", "RELATIONSHIP_SELF", "RELATIONSHIP_SPOUSE", "RELATIONSHIP_LIFE_PARTNER", "RELATIONSHIP_CHILD", "RELATIONSHIP_FATHER", "RELATIONSHIP_MOTHER", "RELATIONSHIP_GUARDIAN", "RELATIONSHIP_PARENT", "RELATIONSHIP_GRANDPARENT", "RELATIONSHIP_GRANDCHILD", "RELATIONSHIP_SIBLING", "RELATIONSHIP_EMPLOYER"]) + # validator.allowable_values.each do |value| + # expect { instance.relationship = value }.not_to raise_error + # end + end + end + + describe 'test attribute "dob"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "sex"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + # validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"]) + # validator.allowable_values.each do |value| + # expect { instance.sex = value }.not_to raise_error + # end + end + end + + describe 'test attribute "address"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_plan_spec.rb b/spec/models/visit_plan_spec.rb new file mode 100644 index 0000000..7c46543 --- /dev/null +++ b/spec/models/visit_plan_spec.rb @@ -0,0 +1,46 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::VisitPlan +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::VisitPlan do + let(:instance) { PrimaryConnectClient::VisitPlan.new } + + describe 'test an instance of VisitPlan' do + it 'should create an instance of VisitPlan' do + expect(instance).to be_instance_of(PrimaryConnectClient::VisitPlan) + end + end + describe 'test attribute "identifier"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "name"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "type"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/models/visit_spec.rb b/spec/models/visit_spec.rb new file mode 100644 index 0000000..bfbba4f --- /dev/null +++ b/spec/models/visit_spec.rb @@ -0,0 +1,88 @@ +=begin +#Primary Connect API V1 + +#Client Library to interface with Primary Connect + +The version of the OpenAPI document: v1 + +Generated by: https://openapi-generator.tech +OpenAPI Generator version: 5.3.0 + +=end + +require 'spec_helper' +require 'json' +require 'date' + +# Unit tests for PrimaryConnectClient::Visit +# Automatically generated by openapi-generator (https://openapi-generator.tech) +# Please update as you see appropriate +describe PrimaryConnectClient::Visit do + let(:instance) { PrimaryConnectClient::Visit.new } + + describe 'test an instance of Visit' do + it 'should create an instance of Visit' do + expect(instance).to be_instance_of(PrimaryConnectClient::Visit) + end + end + describe 'test attribute "visit_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "account_number"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "patient_class"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "visit_date_time"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "attending_provider"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "consulting_provider"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "referring_provider"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "guarantor"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "insurances"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + + describe 'test attribute "location"' do + it 'should work' do + # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers + end + end + +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 08005a9..23deff8 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,7 +6,7 @@ The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech -OpenAPI Generator version: 5.2.1-SNAPSHOT +OpenAPI Generator version: 5.3.0 =end