primary_connect_client 1.4.0 → 1.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3e08de0928a34d0409f7dd65334cb637d77eb9e4001cb459b235ee0d5be9a5e
4
- data.tar.gz: ac8fe08f4b83126981effb4f5653f98ed321d55a68181ba67d65fcfe761920cd
3
+ metadata.gz: c21b6c5d8e7df842065531543644b17933fc1e96ddd6a90649be582f1331ad98
4
+ data.tar.gz: 711d0a09341d53c78db0b9c4762cfbc92bbec5b12faf103f857581a82d32056c
5
5
  SHA512:
6
- metadata.gz: ef2fad30534aaef48ede26a3b6560e076450013fcee2de08d0aff70ba97ab386c66b12c834bc88272e816921c2078e03d32508ee9db98395469e99495b4d96a8
7
- data.tar.gz: 258a04180cc8dfc4bf465436fc226044636b27ce7148c2ca1e127822293d47bf235ceed27f3dce82d91eb7f010d321cc23cca9223b19d5e8a89d4bd600e0f0e1
6
+ metadata.gz: aec6d001df9b89210d9a24ddd345e707fd3ac0dbfbf3ac0c3c5ed908c2628c68c65181adf6fc3887d170d3aebb7c5029ce93b46cf11f90d40efbc974b212a6c0
7
+ data.tar.gz: 071b97faec6f8a08dfe35899b9c080d0e485b6809092ba955ffe53aab6065f66cb712f36ee57aad39fda8c86cc821eaf986eef461146925e0df5a589615905f4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.5.0
4
+
5
+ - Updated dependency on `primary_connect_proto` 0.17.0
6
+ - Added Measurement API
7
+ - Added Order.Procedures
8
+
3
9
  ## 1.4.0
4
10
 
5
11
  - Updated dependency on `primary_connect_proto` 0.15.0
data/README.md CHANGED
@@ -7,7 +7,7 @@ Client Library to interface with Primary Connect
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: v1
10
- - Package version: 1.4.0
10
+ - Package version: 1.5.1
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
 
13
13
  ## Installation
@@ -23,16 +23,16 @@ gem build primary_connect_client.gemspec
23
23
  Then either install the gem locally:
24
24
 
25
25
  ```shell
26
- gem install ./primary_connect_client-1.4.0.gem
26
+ gem install ./primary_connect_client-1.5.1.gem
27
27
  ```
28
28
 
29
- (for development, run `gem install --dev ./primary_connect_client-1.4.0.gem` to install the development dependencies)
29
+ (for development, run `gem install --dev ./primary_connect_client-1.5.1.gem` to install the development dependencies)
30
30
 
31
31
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
32
32
 
33
33
  Finally add this to the Gemfile:
34
34
 
35
- gem 'primary_connect_client', '~> 1.4.0'
35
+ gem 'primary_connect_client', '~> 1.5.1'
36
36
 
37
37
  ### Install from Git
38
38
 
@@ -86,9 +86,11 @@ Class | Method | HTTP request | Description
86
86
  *PrimaryConnectClient::DefaultApi* | [**accession_order**](docs/DefaultApi.md#accession_order) | **PUT** /api/v1/orders/{id}/accession | accession order by ULID
87
87
  *PrimaryConnectClient::DefaultApi* | [**accession_order_by_specimen_id**](docs/DefaultApi.md#accession_order_by_specimen_id) | **PUT** /api/v1/orders/accession | accession order by Specimen ID
88
88
  *PrimaryConnectClient::DefaultApi* | [**cancel_order**](docs/DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order
89
+ *PrimaryConnectClient::DefaultApi* | [**create_measurement**](docs/DefaultApi.md#create_measurement) | **POST** /api/v1/measurements | create Measurement
89
90
  *PrimaryConnectClient::DefaultApi* | [**create_order**](docs/DefaultApi.md#create_order) | **POST** /api/v1/orders | create order
90
91
  *PrimaryConnectClient::DefaultApi* | [**create_result**](docs/DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result
91
92
  *PrimaryConnectClient::DefaultApi* | [**get_lab_report**](docs/DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report
93
+ *PrimaryConnectClient::DefaultApi* | [**get_measurement**](docs/DefaultApi.md#get_measurement) | **GET** /api/v1/measurements/{id} | show measurement
92
94
  *PrimaryConnectClient::DefaultApi* | [**get_order**](docs/DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order
93
95
  *PrimaryConnectClient::DefaultApi* | [**list_events**](docs/DefaultApi.md#list_events) | **GET** /api/v1/events | list events
94
96
  *PrimaryConnectClient::DefaultApi* | [**list_orders**](docs/DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders
@@ -109,7 +111,9 @@ Class | Method | HTTP request | Description
109
111
  - [PrimaryConnectClient::Event](docs/Event.md)
110
112
  - [PrimaryConnectClient::Events](docs/Events.md)
111
113
  - [PrimaryConnectClient::Identifier](docs/Identifier.md)
114
+ - [PrimaryConnectClient::Ids](docs/Ids.md)
112
115
  - [PrimaryConnectClient::Location](docs/Location.md)
116
+ - [PrimaryConnectClient::Measurement](docs/Measurement.md)
113
117
  - [PrimaryConnectClient::Medication](docs/Medication.md)
114
118
  - [PrimaryConnectClient::MedicationAdministration](docs/MedicationAdministration.md)
115
119
  - [PrimaryConnectClient::Meta](docs/Meta.md)
@@ -138,8 +142,6 @@ Class | Method | HTTP request | Description
138
142
  - [PrimaryConnectClient::Results](docs/Results.md)
139
143
  - [PrimaryConnectClient::Specimen](docs/Specimen.md)
140
144
  - [PrimaryConnectClient::Subject](docs/Subject.md)
141
- - [PrimaryConnectClient::SubjectOneOf](docs/SubjectOneOf.md)
142
- - [PrimaryConnectClient::SubjectOneOf1](docs/SubjectOneOf1.md)
143
145
  - [PrimaryConnectClient::V2Device](docs/V2Device.md)
144
146
  - [PrimaryConnectClient::V2Dosage](docs/V2Dosage.md)
145
147
  - [PrimaryConnectClient::V2Medication](docs/V2Medication.md)
data/docs/DefaultApi.md CHANGED
@@ -7,9 +7,11 @@ All URIs are relative to *https://connect.primary.health*
7
7
  | [**accession_order**](DefaultApi.md#accession_order) | **PUT** /api/v1/orders/{id}/accession | accession order by ULID |
8
8
  | [**accession_order_by_specimen_id**](DefaultApi.md#accession_order_by_specimen_id) | **PUT** /api/v1/orders/accession | accession order by Specimen ID |
9
9
  | [**cancel_order**](DefaultApi.md#cancel_order) | **DELETE** /api/v1/orders/{id} | cancel order |
10
+ | [**create_measurement**](DefaultApi.md#create_measurement) | **POST** /api/v1/measurements | create Measurement |
10
11
  | [**create_order**](DefaultApi.md#create_order) | **POST** /api/v1/orders | create order |
11
12
  | [**create_result**](DefaultApi.md#create_result) | **POST** /api/v1/orders/{order_id}/results | create result |
12
13
  | [**get_lab_report**](DefaultApi.md#get_lab_report) | **GET** /api/v1/results/{result_id}/lab_report | show lab report |
14
+ | [**get_measurement**](DefaultApi.md#get_measurement) | **GET** /api/v1/measurements/{id} | show measurement |
13
15
  | [**get_order**](DefaultApi.md#get_order) | **GET** /api/v1/orders/{id} | show order |
14
16
  | [**list_events**](DefaultApi.md#list_events) | **GET** /api/v1/events | list events |
15
17
  | [**list_orders**](DefaultApi.md#list_orders) | **GET** /api/v1/orders | list orders |
@@ -223,6 +225,70 @@ nil (empty response body)
223
225
  - **Accept**: application/json
224
226
 
225
227
 
228
+ ## create_measurement
229
+
230
+ > <Ids> create_measurement
231
+
232
+ create Measurement
233
+
234
+ ### Examples
235
+
236
+ ```ruby
237
+ require 'time'
238
+ require 'primary_connect_client'
239
+ # setup authorization
240
+ PrimaryConnectClient.configure do |config|
241
+ # Configure Bearer authorization: bearer_auth
242
+ config.access_token = 'YOUR_BEARER_TOKEN'
243
+ end
244
+
245
+ api_instance = PrimaryConnectClient::DefaultApi.new
246
+
247
+ begin
248
+ # create Measurement
249
+ result = api_instance.create_measurement
250
+ p result
251
+ rescue PrimaryConnectClient::ApiError => e
252
+ puts "Error when calling DefaultApi->create_measurement: #{e}"
253
+ end
254
+ ```
255
+
256
+ #### Using the create_measurement_with_http_info variant
257
+
258
+ This returns an Array which contains the response data, status code and headers.
259
+
260
+ > <Array(<Ids>, Integer, Hash)> create_measurement_with_http_info
261
+
262
+ ```ruby
263
+ begin
264
+ # create Measurement
265
+ data, status_code, headers = api_instance.create_measurement_with_http_info
266
+ p status_code # => 2xx
267
+ p headers # => { ... }
268
+ p data # => <Ids>
269
+ rescue PrimaryConnectClient::ApiError => e
270
+ puts "Error when calling DefaultApi->create_measurement_with_http_info: #{e}"
271
+ end
272
+ ```
273
+
274
+ ### Parameters
275
+
276
+ This endpoint does not need any parameter.
277
+
278
+ ### Return type
279
+
280
+ [**Ids**](Ids.md)
281
+
282
+ ### Authorization
283
+
284
+ [bearer_auth](../README.md#bearer_auth)
285
+
286
+ ### HTTP request headers
287
+
288
+ - **Content-Type**: Not defined
289
+ - **Accept**: application/json
290
+
291
+
226
292
  ## create_order
227
293
 
228
294
  > <OrderIds> create_order(opts)
@@ -429,6 +495,73 @@ nil (empty response body)
429
495
  - **Accept**: application/json
430
496
 
431
497
 
498
+ ## get_measurement
499
+
500
+ > <Measurement> get_measurement(id)
501
+
502
+ show measurement
503
+
504
+ ### Examples
505
+
506
+ ```ruby
507
+ require 'time'
508
+ require 'primary_connect_client'
509
+ # setup authorization
510
+ PrimaryConnectClient.configure do |config|
511
+ # Configure Bearer authorization: bearer_auth
512
+ config.access_token = 'YOUR_BEARER_TOKEN'
513
+ end
514
+
515
+ api_instance = PrimaryConnectClient::DefaultApi.new
516
+ id = '01FGD44Q6MVCG2VNSMC4ZMOTQM' # String | Measurement ID
517
+
518
+ begin
519
+ # show measurement
520
+ result = api_instance.get_measurement(id)
521
+ p result
522
+ rescue PrimaryConnectClient::ApiError => e
523
+ puts "Error when calling DefaultApi->get_measurement: #{e}"
524
+ end
525
+ ```
526
+
527
+ #### Using the get_measurement_with_http_info variant
528
+
529
+ This returns an Array which contains the response data, status code and headers.
530
+
531
+ > <Array(<Measurement>, Integer, Hash)> get_measurement_with_http_info(id)
532
+
533
+ ```ruby
534
+ begin
535
+ # show measurement
536
+ data, status_code, headers = api_instance.get_measurement_with_http_info(id)
537
+ p status_code # => 2xx
538
+ p headers # => { ... }
539
+ p data # => <Measurement>
540
+ rescue PrimaryConnectClient::ApiError => e
541
+ puts "Error when calling DefaultApi->get_measurement_with_http_info: #{e}"
542
+ end
543
+ ```
544
+
545
+ ### Parameters
546
+
547
+ | Name | Type | Description | Notes |
548
+ | ---- | ---- | ----------- | ----- |
549
+ | **id** | **String** | Measurement ID | |
550
+
551
+ ### Return type
552
+
553
+ [**Measurement**](Measurement.md)
554
+
555
+ ### Authorization
556
+
557
+ [bearer_auth](../README.md#bearer_auth)
558
+
559
+ ### HTTP request headers
560
+
561
+ - **Content-Type**: Not defined
562
+ - **Accept**: application/json
563
+
564
+
432
565
  ## get_order
433
566
 
434
567
  > <OrderWithEventErrors> get_order(id)
data/docs/Ids.md ADDED
@@ -0,0 +1,18 @@
1
+ # PrimaryConnectClient::Ids
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **ids** | **Array&lt;String&gt;** | List of IDs | [optional] |
8
+
9
+ ## Example
10
+
11
+ ```ruby
12
+ require 'primary_connect_client'
13
+
14
+ instance = PrimaryConnectClient::Ids.new(
15
+ ids: null
16
+ )
17
+ ```
18
+
@@ -0,0 +1,22 @@
1
+ # PrimaryConnectClient::Measurement
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **meta** | [**Meta**](Meta.md) | | [optional] |
8
+ | **subject** | [**Subject**](Subject.md) | | [optional] |
9
+ | **metrics** | [**Array&lt;Result&gt;**](Result.md) | List of result components | [optional] |
10
+
11
+ ## Example
12
+
13
+ ```ruby
14
+ require 'primary_connect_client'
15
+
16
+ instance = PrimaryConnectClient::Measurement.new(
17
+ meta: null,
18
+ subject: null,
19
+ metrics: null
20
+ )
21
+ ```
22
+
data/docs/OrderOrder.md CHANGED
@@ -16,6 +16,7 @@
16
16
  | **specimen** | [**Specimen**](Specimen.md) | | [optional] |
17
17
  | **medication_administrations** | [**Array&lt;MedicationAdministration&gt;**](MedicationAdministration.md) | Array of medications administered to the subject | [optional] |
18
18
  | **procedure** | [**CodedValue**](CodedValue.md) | | [optional] |
19
+ | **procedures** | [**Array&lt;CodedValue&gt;**](CodedValue.md) | Array of Procedures ordered | [optional] |
19
20
  | **ordering_provider** | [**Provider**](Provider.md) | | [optional] |
20
21
  | **result_copy_providers** | [**Array&lt;Provider&gt;**](Provider.md) | Array of providers to be copied on the results | [optional] |
21
22
  | **ordering_facility** | [**OrderOrderOrderingFacility**](OrderOrderOrderingFacility.md) | | [optional] |
@@ -47,6 +48,7 @@ instance = PrimaryConnectClient::OrderOrder.new(
47
48
  specimen: null,
48
49
  medication_administrations: null,
49
50
  procedure: null,
51
+ procedures: null,
50
52
  ordering_provider: null,
51
53
  result_copy_providers: null,
52
54
  ordering_facility: null,
data/docs/Subject.md CHANGED
@@ -1,49 +1,20 @@
1
1
  # PrimaryConnectClient::Subject
2
2
 
3
- ## Class instance methods
3
+ ## Properties
4
4
 
5
- ### `openapi_one_of`
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **patient** | [**Patient**](Patient.md) | | [optional] |
8
+ | **device** | [**Device**](Device.md) | | [optional] |
6
9
 
7
- Returns the list of classes defined in oneOf.
8
-
9
- #### Example
10
-
11
- ```ruby
12
- require 'primary_connect_client'
13
-
14
- PrimaryConnectClient::Subject.openapi_one_of
15
- # =>
16
- # [
17
- # :'SubjectOneOf',
18
- # :'SubjectOneOf1'
19
- # ]
20
- ```
21
-
22
- ### build
23
-
24
- Find the appropriate object from the `openapi_one_of` list and casts the data into it.
25
-
26
- #### Example
10
+ ## Example
27
11
 
28
12
  ```ruby
29
13
  require 'primary_connect_client'
30
14
 
31
- PrimaryConnectClient::Subject.build(data)
32
- # => #<SubjectOneOf:0x00007fdd4aab02a0>
33
-
34
- PrimaryConnectClient::Subject.build(data_that_doesnt_match)
35
- # => nil
15
+ instance = PrimaryConnectClient::Subject.new(
16
+ patient: null,
17
+ device: null
18
+ )
36
19
  ```
37
20
 
38
- #### Parameters
39
-
40
- | Name | Type | Description |
41
- | ---- | ---- | ----------- |
42
- | **data** | **Mixed** | data to be matched against the list of oneOf items |
43
-
44
- #### Return type
45
-
46
- - `SubjectOneOf`
47
- - `SubjectOneOf1`
48
- - `nil` (if no type matches)
49
-
@@ -213,6 +213,61 @@ module PrimaryConnectClient
213
213
  return data, status_code, headers
214
214
  end
215
215
 
216
+ # create Measurement
217
+ # @param [Hash] opts the optional parameters
218
+ # @return [Ids]
219
+ def create_measurement(opts = {})
220
+ data, _status_code, _headers = create_measurement_with_http_info(opts)
221
+ data
222
+ end
223
+
224
+ # create Measurement
225
+ # @param [Hash] opts the optional parameters
226
+ # @return [Array<(Ids, Integer, Hash)>] Ids data, response status code and response headers
227
+ def create_measurement_with_http_info(opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: DefaultApi.create_measurement ...'
230
+ end
231
+ # resource path
232
+ local_var_path = '/api/v1/measurements'
233
+
234
+ # query parameters
235
+ query_params = opts[:query_params] || {}
236
+
237
+ # header parameters
238
+ header_params = opts[:header_params] || {}
239
+ # HTTP header 'Accept' (if needed)
240
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
241
+
242
+ # form parameters
243
+ form_params = opts[:form_params] || {}
244
+
245
+ # http body (model)
246
+ post_body = opts[:debug_body]
247
+
248
+ # return_type
249
+ return_type = opts[:debug_return_type] || 'Ids'
250
+
251
+ # auth_names
252
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
253
+
254
+ new_options = opts.merge(
255
+ :operation => :"DefaultApi.create_measurement",
256
+ :header_params => header_params,
257
+ :query_params => query_params,
258
+ :form_params => form_params,
259
+ :body => post_body,
260
+ :auth_names => auth_names,
261
+ :return_type => return_type
262
+ )
263
+
264
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
265
+ if @api_client.config.debugging
266
+ @api_client.config.logger.debug "API called: DefaultApi#create_measurement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
267
+ end
268
+ return data, status_code, headers
269
+ end
270
+
216
271
  # create order
217
272
  # @param [Hash] opts the optional parameters
218
273
  # @option opts [Order] :order
@@ -404,6 +459,67 @@ module PrimaryConnectClient
404
459
  return data, status_code, headers
405
460
  end
406
461
 
462
+ # show measurement
463
+ # @param id [String] Measurement ID
464
+ # @param [Hash] opts the optional parameters
465
+ # @return [Measurement]
466
+ def get_measurement(id, opts = {})
467
+ data, _status_code, _headers = get_measurement_with_http_info(id, opts)
468
+ data
469
+ end
470
+
471
+ # show measurement
472
+ # @param id [String] Measurement ID
473
+ # @param [Hash] opts the optional parameters
474
+ # @return [Array<(Measurement, Integer, Hash)>] Measurement data, response status code and response headers
475
+ def get_measurement_with_http_info(id, opts = {})
476
+ if @api_client.config.debugging
477
+ @api_client.config.logger.debug 'Calling API: DefaultApi.get_measurement ...'
478
+ end
479
+ # verify the required parameter 'id' is set
480
+ if @api_client.config.client_side_validation && id.nil?
481
+ fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_measurement"
482
+ end
483
+ # resource path
484
+ local_var_path = '/api/v1/measurements/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
485
+
486
+ # query parameters
487
+ query_params = opts[:query_params] || {}
488
+
489
+ # header parameters
490
+ header_params = opts[:header_params] || {}
491
+ # HTTP header 'Accept' (if needed)
492
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
493
+
494
+ # form parameters
495
+ form_params = opts[:form_params] || {}
496
+
497
+ # http body (model)
498
+ post_body = opts[:debug_body]
499
+
500
+ # return_type
501
+ return_type = opts[:debug_return_type] || 'Measurement'
502
+
503
+ # auth_names
504
+ auth_names = opts[:debug_auth_names] || ['bearer_auth']
505
+
506
+ new_options = opts.merge(
507
+ :operation => :"DefaultApi.get_measurement",
508
+ :header_params => header_params,
509
+ :query_params => query_params,
510
+ :form_params => form_params,
511
+ :body => post_body,
512
+ :auth_names => auth_names,
513
+ :return_type => return_type
514
+ )
515
+
516
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
517
+ if @api_client.config.debugging
518
+ @api_client.config.logger.debug "API called: DefaultApi#get_measurement\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
519
+ end
520
+ return data, status_code, headers
521
+ end
522
+
407
523
  # show order
408
524
  # @param id [String] Order ID
409
525
  # @param [Hash] opts the optional parameters
@@ -14,13 +14,14 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PrimaryConnectClient
17
- class SubjectOneOf1
18
- attr_accessor :device
17
+ class Ids
18
+ # List of IDs
19
+ attr_accessor :ids
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
21
22
  def self.attribute_map
22
23
  {
23
- :'device' => :'device'
24
+ :'ids' => :'ids'
24
25
  }
25
26
  end
26
27
 
@@ -32,7 +33,7 @@ module PrimaryConnectClient
32
33
  # Attribute type mapping.
33
34
  def self.openapi_types
34
35
  {
35
- :'device' => :'Device'
36
+ :'ids' => :'Array<String>'
36
37
  }
37
38
  end
38
39
 
@@ -46,19 +47,21 @@ module PrimaryConnectClient
46
47
  # @param [Hash] attributes Model attributes in the form of hash
47
48
  def initialize(attributes = {})
48
49
  if (!attributes.is_a?(Hash))
49
- fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::SubjectOneOf1` initialize method"
50
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Ids` initialize method"
50
51
  end
51
52
 
52
53
  # check to see if the attribute exists and convert string to symbol for hash key
53
54
  attributes = attributes.each_with_object({}) { |(k, v), h|
54
55
  if (!self.class.attribute_map.key?(k.to_sym))
55
- fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::SubjectOneOf1`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Ids`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
57
  end
57
58
  h[k.to_sym] = v
58
59
  }
59
60
 
60
- if attributes.key?(:'device')
61
- self.device = attributes[:'device']
61
+ if attributes.key?(:'ids')
62
+ if (value = attributes[:'ids']).is_a?(Array)
63
+ self.ids = value
64
+ end
62
65
  end
63
66
  end
64
67
 
@@ -80,7 +83,7 @@ module PrimaryConnectClient
80
83
  def ==(o)
81
84
  return true if self.equal?(o)
82
85
  self.class == o.class &&
83
- device == o.device
86
+ ids == o.ids
84
87
  end
85
88
 
86
89
  # @see the `==` method
@@ -92,7 +95,7 @@ module PrimaryConnectClient
92
95
  # Calculates hash code according to all attributes.
93
96
  # @return [Integer] Hash code
94
97
  def hash
95
- [device].hash
98
+ [ids].hash
96
99
  end
97
100
 
98
101
  # Builds the object from hash
@@ -14,22 +14,20 @@ require 'date'
14
14
  require 'time'
15
15
 
16
16
  module PrimaryConnectClient
17
- class ResultSpecimen
18
- # ID of the collected specimen
19
- attr_accessor :id
17
+ class Measurement
18
+ attr_accessor :meta
20
19
 
21
- # Source of the specimen
22
- attr_accessor :source
20
+ attr_accessor :subject
23
21
 
24
- # Body site from which the specimen was collected
25
- attr_accessor :body_site
22
+ # List of result components
23
+ attr_accessor :metrics
26
24
 
27
25
  # Attribute mapping from ruby-style variable name to JSON key.
28
26
  def self.attribute_map
29
27
  {
30
- :'id' => :'id',
31
- :'source' => :'source',
32
- :'body_site' => :'body_site'
28
+ :'meta' => :'meta',
29
+ :'subject' => :'subject',
30
+ :'metrics' => :'metrics'
33
31
  }
34
32
  end
35
33
 
@@ -41,9 +39,9 @@ module PrimaryConnectClient
41
39
  # Attribute type mapping.
42
40
  def self.openapi_types
43
41
  {
44
- :'id' => :'String',
45
- :'source' => :'String',
46
- :'body_site' => :'String'
42
+ :'meta' => :'Meta',
43
+ :'subject' => :'Subject',
44
+ :'metrics' => :'Array<Result>'
47
45
  }
48
46
  end
49
47
 
@@ -57,27 +55,29 @@ module PrimaryConnectClient
57
55
  # @param [Hash] attributes Model attributes in the form of hash
58
56
  def initialize(attributes = {})
59
57
  if (!attributes.is_a?(Hash))
60
- fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::ResultSpecimen` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Measurement` initialize method"
61
59
  end
62
60
 
63
61
  # check to see if the attribute exists and convert string to symbol for hash key
64
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
65
63
  if (!self.class.attribute_map.key?(k.to_sym))
66
- 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
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Measurement`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
67
65
  end
68
66
  h[k.to_sym] = v
69
67
  }
70
68
 
71
- if attributes.key?(:'id')
72
- self.id = attributes[:'id']
69
+ if attributes.key?(:'meta')
70
+ self.meta = attributes[:'meta']
73
71
  end
74
72
 
75
- if attributes.key?(:'source')
76
- self.source = attributes[:'source']
73
+ if attributes.key?(:'subject')
74
+ self.subject = attributes[:'subject']
77
75
  end
78
76
 
79
- if attributes.key?(:'body_site')
80
- self.body_site = attributes[:'body_site']
77
+ if attributes.key?(:'metrics')
78
+ if (value = attributes[:'metrics']).is_a?(Array)
79
+ self.metrics = value
80
+ end
81
81
  end
82
82
  end
83
83
 
@@ -99,9 +99,9 @@ module PrimaryConnectClient
99
99
  def ==(o)
100
100
  return true if self.equal?(o)
101
101
  self.class == o.class &&
102
- id == o.id &&
103
- source == o.source &&
104
- body_site == o.body_site
102
+ meta == o.meta &&
103
+ subject == o.subject &&
104
+ metrics == o.metrics
105
105
  end
106
106
 
107
107
  # @see the `==` method
@@ -113,7 +113,7 @@ module PrimaryConnectClient
113
113
  # Calculates hash code according to all attributes.
114
114
  # @return [Integer] Hash code
115
115
  def hash
116
- [id, source, body_site].hash
116
+ [meta, subject, metrics].hash
117
117
  end
118
118
 
119
119
  # Builds the object from hash
@@ -55,7 +55,6 @@ module PrimaryConnectClient
55
55
  # List of attributes with nullable: true
56
56
  def self.openapi_nullable
57
57
  Set.new([
58
- :'subject',
59
58
  ])
60
59
  end
61
60