primary_connect_client 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +7 -1
  3. data/README.md +15 -4
  4. data/docs/DefaultApi.md +5 -3
  5. data/docs/Device.md +30 -0
  6. data/docs/Dosage.md +30 -0
  7. data/docs/Location.md +3 -1
  8. data/docs/Medication.md +22 -0
  9. data/docs/MedicationAdministration.md +32 -0
  10. data/docs/Order.md +2 -0
  11. data/docs/OrderOrder.md +4 -0
  12. data/docs/Subject.md +49 -0
  13. data/docs/SubjectOneOf.md +18 -0
  14. data/docs/SubjectOneOf1.md +18 -0
  15. data/docs/V2Device.md +30 -0
  16. data/docs/V2Dosage.md +30 -0
  17. data/docs/V2Medication.md +22 -0
  18. data/docs/V2MedicationAdministration.md +32 -0
  19. data/lib/primary_connect_client/api/default_api.rb +6 -3
  20. data/lib/primary_connect_client/models/device.rb +276 -0
  21. data/lib/primary_connect_client/models/dosage.rb +275 -0
  22. data/lib/primary_connect_client/models/location.rb +13 -4
  23. data/lib/primary_connect_client/models/medication.rb +238 -0
  24. data/lib/primary_connect_client/models/medication_administration.rb +286 -0
  25. data/lib/primary_connect_client/models/order.rb +11 -1
  26. data/lib/primary_connect_client/models/order_order.rb +25 -3
  27. data/lib/primary_connect_client/models/subject.rb +105 -0
  28. data/lib/primary_connect_client/models/subject_one_of.rb +218 -0
  29. data/lib/primary_connect_client/models/subject_one_of1.rb +218 -0
  30. data/lib/primary_connect_client/models/v2_device.rb +276 -0
  31. data/lib/primary_connect_client/models/v2_dosage.rb +275 -0
  32. data/lib/primary_connect_client/models/v2_medication.rb +238 -0
  33. data/lib/primary_connect_client/models/v2_medication_administration.rb +286 -0
  34. data/lib/primary_connect_client/version.rb +1 -1
  35. data/lib/primary_connect_client.rb +11 -0
  36. data/primary_connect_client.gemspec +1 -0
  37. data/spec/api/default_api_spec.rb +2 -1
  38. data/spec/models/device_spec.rb +70 -0
  39. data/spec/models/dosage_spec.rb +70 -0
  40. data/spec/models/location_spec.rb +6 -0
  41. data/spec/models/medication_administration_spec.rb +76 -0
  42. data/spec/models/medication_spec.rb +46 -0
  43. data/spec/models/order_order_spec.rb +13 -1
  44. data/spec/models/order_spec.rb +6 -0
  45. data/spec/models/subject_one_of1_spec.rb +34 -0
  46. data/spec/models/subject_one_of_spec.rb +34 -0
  47. data/spec/models/subject_spec.rb +31 -0
  48. data/spec/models/v2_device_spec.rb +70 -0
  49. data/spec/models/v2_dosage_spec.rb +70 -0
  50. data/spec/models/v2_medication_administration_spec.rb +76 -0
  51. data/spec/models/v2_medication_spec.rb +46 -0
  52. metadata +67 -3
@@ -0,0 +1,238 @@
1
+ =begin
2
+ #Primary Connect API V1
3
+
4
+ #Client Library to interface with Primary Connect
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PrimaryConnectClient
17
+ class Medication
18
+ # Lot number product component
19
+ attr_accessor :lot_number
20
+
21
+ # Product expiration date
22
+ attr_accessor :expiration_date
23
+
24
+ attr_accessor :manufacturer
25
+
26
+ # Attribute mapping from ruby-style variable name to JSON key.
27
+ def self.attribute_map
28
+ {
29
+ :'lot_number' => :'lotNumber',
30
+ :'expiration_date' => :'expirationDate',
31
+ :'manufacturer' => :'manufacturer'
32
+ }
33
+ end
34
+
35
+ # Returns all the JSON keys this model knows about
36
+ def self.acceptable_attributes
37
+ attribute_map.values
38
+ end
39
+
40
+ # Attribute type mapping.
41
+ def self.openapi_types
42
+ {
43
+ :'lot_number' => :'String',
44
+ :'expiration_date' => :'Time',
45
+ :'manufacturer' => :'CodedValue'
46
+ }
47
+ end
48
+
49
+ # List of attributes with nullable: true
50
+ def self.openapi_nullable
51
+ Set.new([
52
+ ])
53
+ end
54
+
55
+ # Initializes the object
56
+ # @param [Hash] attributes Model attributes in the form of hash
57
+ def initialize(attributes = {})
58
+ if (!attributes.is_a?(Hash))
59
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Medication` initialize method"
60
+ end
61
+
62
+ # check to see if the attribute exists and convert string to symbol for hash key
63
+ attributes = attributes.each_with_object({}) { |(k, v), h|
64
+ if (!self.class.attribute_map.key?(k.to_sym))
65
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Medication`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
66
+ end
67
+ h[k.to_sym] = v
68
+ }
69
+
70
+ if attributes.key?(:'lot_number')
71
+ self.lot_number = attributes[:'lot_number']
72
+ end
73
+
74
+ if attributes.key?(:'expiration_date')
75
+ self.expiration_date = attributes[:'expiration_date']
76
+ end
77
+
78
+ if attributes.key?(:'manufacturer')
79
+ self.manufacturer = attributes[:'manufacturer']
80
+ end
81
+ end
82
+
83
+ # Show invalid properties with the reasons. Usually used together with valid?
84
+ # @return Array for valid properties with the reasons
85
+ def list_invalid_properties
86
+ invalid_properties = Array.new
87
+ invalid_properties
88
+ end
89
+
90
+ # Check to see if the all the properties in the model are valid
91
+ # @return true if the model is valid
92
+ def valid?
93
+ true
94
+ end
95
+
96
+ # Checks equality by comparing each attribute.
97
+ # @param [Object] Object to be compared
98
+ def ==(o)
99
+ return true if self.equal?(o)
100
+ self.class == o.class &&
101
+ lot_number == o.lot_number &&
102
+ expiration_date == o.expiration_date &&
103
+ manufacturer == o.manufacturer
104
+ end
105
+
106
+ # @see the `==` method
107
+ # @param [Object] Object to be compared
108
+ def eql?(o)
109
+ self == o
110
+ end
111
+
112
+ # Calculates hash code according to all attributes.
113
+ # @return [Integer] Hash code
114
+ def hash
115
+ [lot_number, expiration_date, manufacturer].hash
116
+ end
117
+
118
+ # Builds the object from hash
119
+ # @param [Hash] attributes Model attributes in the form of hash
120
+ # @return [Object] Returns the model itself
121
+ def self.build_from_hash(attributes)
122
+ new.build_from_hash(attributes)
123
+ end
124
+
125
+ # Builds the object from hash
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ # @return [Object] Returns the model itself
128
+ def build_from_hash(attributes)
129
+ return nil unless attributes.is_a?(Hash)
130
+ self.class.openapi_types.each_pair do |key, type|
131
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
132
+ self.send("#{key}=", nil)
133
+ elsif type =~ /\AArray<(.*)>/i
134
+ # check to ensure the input is an array given that the attribute
135
+ # is documented as an array but the input is not
136
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
137
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
138
+ end
139
+ elsif !attributes[self.class.attribute_map[key]].nil?
140
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
141
+ end
142
+ end
143
+
144
+ self
145
+ end
146
+
147
+ # Deserializes the data based on type
148
+ # @param string type Data type
149
+ # @param string value Value to be deserialized
150
+ # @return [Object] Deserialized data
151
+ def _deserialize(type, value)
152
+ case type.to_sym
153
+ when :Time
154
+ Time.parse(value)
155
+ when :Date
156
+ Date.parse(value)
157
+ when :String
158
+ value.to_s
159
+ when :Integer
160
+ value.to_i
161
+ when :Float
162
+ value.to_f
163
+ when :Boolean
164
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
165
+ true
166
+ else
167
+ false
168
+ end
169
+ when :Object
170
+ # generic object (usually a Hash), return directly
171
+ value
172
+ when /\AArray<(?<inner_type>.+)>\z/
173
+ inner_type = Regexp.last_match[:inner_type]
174
+ value.map { |v| _deserialize(inner_type, v) }
175
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
176
+ k_type = Regexp.last_match[:k_type]
177
+ v_type = Regexp.last_match[:v_type]
178
+ {}.tap do |hash|
179
+ value.each do |k, v|
180
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
181
+ end
182
+ end
183
+ else # model
184
+ # models (e.g. Pet) or oneOf
185
+ klass = PrimaryConnectClient.const_get(type)
186
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
187
+ end
188
+ end
189
+
190
+ # Returns the string representation of the object
191
+ # @return [String] String presentation of the object
192
+ def to_s
193
+ to_hash.to_s
194
+ end
195
+
196
+ # to_body is an alias to to_hash (backward compatibility)
197
+ # @return [Hash] Returns the object in the form of hash
198
+ def to_body
199
+ to_hash
200
+ end
201
+
202
+ # Returns the object in the form of hash
203
+ # @return [Hash] Returns the object in the form of hash
204
+ def to_hash
205
+ hash = {}
206
+ self.class.attribute_map.each_pair do |attr, param|
207
+ value = self.send(attr)
208
+ if value.nil?
209
+ is_nullable = self.class.openapi_nullable.include?(attr)
210
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
211
+ end
212
+
213
+ hash[param] = _to_hash(value)
214
+ end
215
+ hash
216
+ end
217
+
218
+ # Outputs non-array value in the form of hash
219
+ # For object, use to_hash. Otherwise, just return the value
220
+ # @param [Object] value Any valid value
221
+ # @return [Hash] Returns the value in the form of hash
222
+ def _to_hash(value)
223
+ if value.is_a?(Array)
224
+ value.compact.map { |v| _to_hash(v) }
225
+ elsif value.is_a?(Hash)
226
+ {}.tap do |hash|
227
+ value.each { |k, v| hash[k] = _to_hash(v) }
228
+ end
229
+ elsif value.respond_to? :to_hash
230
+ value.to_hash
231
+ else
232
+ value
233
+ end
234
+ end
235
+
236
+ end
237
+
238
+ end
@@ -0,0 +1,286 @@
1
+ =begin
2
+ #Primary Connect API V1
3
+
4
+ #Client Library to interface with Primary Connect
5
+
6
+ The version of the OpenAPI document: v1
7
+
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.3.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module PrimaryConnectClient
17
+ class MedicationAdministration
18
+ attr_accessor :identifier
19
+
20
+ # Codes for the medication administration
21
+ attr_accessor :administration_codes
22
+
23
+ # Administration start date of medication
24
+ attr_accessor :administration_start_time
25
+
26
+ # Administration end date of medication
27
+ attr_accessor :administration_end_time
28
+
29
+ attr_accessor :medication
30
+
31
+ attr_accessor :dosage
32
+
33
+ attr_accessor :refusal_reason
34
+
35
+ attr_accessor :administering_provider
36
+
37
+ # Attribute mapping from ruby-style variable name to JSON key.
38
+ def self.attribute_map
39
+ {
40
+ :'identifier' => :'identifier',
41
+ :'administration_codes' => :'administrationCodes',
42
+ :'administration_start_time' => :'administrationStartTime',
43
+ :'administration_end_time' => :'administrationEndTime',
44
+ :'medication' => :'medication',
45
+ :'dosage' => :'dosage',
46
+ :'refusal_reason' => :'refusalReason',
47
+ :'administering_provider' => :'administeringProvider'
48
+ }
49
+ end
50
+
51
+ # Returns all the JSON keys this model knows about
52
+ def self.acceptable_attributes
53
+ attribute_map.values
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.openapi_types
58
+ {
59
+ :'identifier' => :'Identifier',
60
+ :'administration_codes' => :'Array<CodedValue>',
61
+ :'administration_start_time' => :'Time',
62
+ :'administration_end_time' => :'Time',
63
+ :'medication' => :'Medication',
64
+ :'dosage' => :'Dosage',
65
+ :'refusal_reason' => :'CodedValue',
66
+ :'administering_provider' => :'Provider'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.openapi_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::MedicationAdministration` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::MedicationAdministration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'identifier')
92
+ self.identifier = attributes[:'identifier']
93
+ end
94
+
95
+ if attributes.key?(:'administration_codes')
96
+ if (value = attributes[:'administration_codes']).is_a?(Array)
97
+ self.administration_codes = value
98
+ end
99
+ end
100
+
101
+ if attributes.key?(:'administration_start_time')
102
+ self.administration_start_time = attributes[:'administration_start_time']
103
+ end
104
+
105
+ if attributes.key?(:'administration_end_time')
106
+ self.administration_end_time = attributes[:'administration_end_time']
107
+ end
108
+
109
+ if attributes.key?(:'medication')
110
+ self.medication = attributes[:'medication']
111
+ end
112
+
113
+ if attributes.key?(:'dosage')
114
+ self.dosage = attributes[:'dosage']
115
+ end
116
+
117
+ if attributes.key?(:'refusal_reason')
118
+ self.refusal_reason = attributes[:'refusal_reason']
119
+ end
120
+
121
+ if attributes.key?(:'administering_provider')
122
+ self.administering_provider = attributes[:'administering_provider']
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ invalid_properties = Array.new
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ identifier == o.identifier &&
145
+ administration_codes == o.administration_codes &&
146
+ administration_start_time == o.administration_start_time &&
147
+ administration_end_time == o.administration_end_time &&
148
+ medication == o.medication &&
149
+ dosage == o.dosage &&
150
+ refusal_reason == o.refusal_reason &&
151
+ administering_provider == o.administering_provider
152
+ end
153
+
154
+ # @see the `==` method
155
+ # @param [Object] Object to be compared
156
+ def eql?(o)
157
+ self == o
158
+ end
159
+
160
+ # Calculates hash code according to all attributes.
161
+ # @return [Integer] Hash code
162
+ def hash
163
+ [identifier, administration_codes, administration_start_time, administration_end_time, medication, dosage, refusal_reason, administering_provider].hash
164
+ end
165
+
166
+ # Builds the object from hash
167
+ # @param [Hash] attributes Model attributes in the form of hash
168
+ # @return [Object] Returns the model itself
169
+ def self.build_from_hash(attributes)
170
+ new.build_from_hash(attributes)
171
+ end
172
+
173
+ # Builds the object from hash
174
+ # @param [Hash] attributes Model attributes in the form of hash
175
+ # @return [Object] Returns the model itself
176
+ def build_from_hash(attributes)
177
+ return nil unless attributes.is_a?(Hash)
178
+ self.class.openapi_types.each_pair do |key, type|
179
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
180
+ self.send("#{key}=", nil)
181
+ elsif type =~ /\AArray<(.*)>/i
182
+ # check to ensure the input is an array given that the attribute
183
+ # is documented as an array but the input is not
184
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
185
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
186
+ end
187
+ elsif !attributes[self.class.attribute_map[key]].nil?
188
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
189
+ end
190
+ end
191
+
192
+ self
193
+ end
194
+
195
+ # Deserializes the data based on type
196
+ # @param string type Data type
197
+ # @param string value Value to be deserialized
198
+ # @return [Object] Deserialized data
199
+ def _deserialize(type, value)
200
+ case type.to_sym
201
+ when :Time
202
+ Time.parse(value)
203
+ when :Date
204
+ Date.parse(value)
205
+ when :String
206
+ value.to_s
207
+ when :Integer
208
+ value.to_i
209
+ when :Float
210
+ value.to_f
211
+ when :Boolean
212
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
213
+ true
214
+ else
215
+ false
216
+ end
217
+ when :Object
218
+ # generic object (usually a Hash), return directly
219
+ value
220
+ when /\AArray<(?<inner_type>.+)>\z/
221
+ inner_type = Regexp.last_match[:inner_type]
222
+ value.map { |v| _deserialize(inner_type, v) }
223
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
224
+ k_type = Regexp.last_match[:k_type]
225
+ v_type = Regexp.last_match[:v_type]
226
+ {}.tap do |hash|
227
+ value.each do |k, v|
228
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
229
+ end
230
+ end
231
+ else # model
232
+ # models (e.g. Pet) or oneOf
233
+ klass = PrimaryConnectClient.const_get(type)
234
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
235
+ end
236
+ end
237
+
238
+ # Returns the string representation of the object
239
+ # @return [String] String presentation of the object
240
+ def to_s
241
+ to_hash.to_s
242
+ end
243
+
244
+ # to_body is an alias to to_hash (backward compatibility)
245
+ # @return [Hash] Returns the object in the form of hash
246
+ def to_body
247
+ to_hash
248
+ end
249
+
250
+ # Returns the object in the form of hash
251
+ # @return [Hash] Returns the object in the form of hash
252
+ def to_hash
253
+ hash = {}
254
+ self.class.attribute_map.each_pair do |attr, param|
255
+ value = self.send(attr)
256
+ if value.nil?
257
+ is_nullable = self.class.openapi_nullable.include?(attr)
258
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
259
+ end
260
+
261
+ hash[param] = _to_hash(value)
262
+ end
263
+ hash
264
+ end
265
+
266
+ # Outputs non-array value in the form of hash
267
+ # For object, use to_hash. Otherwise, just return the value
268
+ # @param [Object] value Any valid value
269
+ # @return [Hash] Returns the value in the form of hash
270
+ def _to_hash(value)
271
+ if value.is_a?(Array)
272
+ value.compact.map { |v| _to_hash(v) }
273
+ elsif value.is_a?(Hash)
274
+ {}.tap do |hash|
275
+ value.each { |k, v| hash[k] = _to_hash(v) }
276
+ end
277
+ elsif value.respond_to? :to_hash
278
+ value.to_hash
279
+ else
280
+ value
281
+ end
282
+ end
283
+
284
+ end
285
+
286
+ end
@@ -17,6 +17,8 @@ module PrimaryConnectClient
17
17
  class Order
18
18
  attr_accessor :patient
19
19
 
20
+ attr_accessor :subject
21
+
20
22
  attr_accessor :visit
21
23
 
22
24
  attr_accessor :meta
@@ -27,6 +29,7 @@ module PrimaryConnectClient
27
29
  def self.attribute_map
28
30
  {
29
31
  :'patient' => :'patient',
32
+ :'subject' => :'subject',
30
33
  :'visit' => :'visit',
31
34
  :'meta' => :'meta',
32
35
  :'order' => :'order'
@@ -42,6 +45,7 @@ module PrimaryConnectClient
42
45
  def self.openapi_types
43
46
  {
44
47
  :'patient' => :'Patient',
48
+ :'subject' => :'Subject',
45
49
  :'visit' => :'Visit',
46
50
  :'meta' => :'Meta',
47
51
  :'order' => :'OrderOrder'
@@ -51,6 +55,7 @@ module PrimaryConnectClient
51
55
  # List of attributes with nullable: true
52
56
  def self.openapi_nullable
53
57
  Set.new([
58
+ :'subject',
54
59
  ])
55
60
  end
56
61
 
@@ -73,6 +78,10 @@ module PrimaryConnectClient
73
78
  self.patient = attributes[:'patient']
74
79
  end
75
80
 
81
+ if attributes.key?(:'subject')
82
+ self.subject = attributes[:'subject']
83
+ end
84
+
76
85
  if attributes.key?(:'visit')
77
86
  self.visit = attributes[:'visit']
78
87
  end
@@ -105,6 +114,7 @@ module PrimaryConnectClient
105
114
  return true if self.equal?(o)
106
115
  self.class == o.class &&
107
116
  patient == o.patient &&
117
+ subject == o.subject &&
108
118
  visit == o.visit &&
109
119
  meta == o.meta &&
110
120
  order == o.order
@@ -119,7 +129,7 @@ module PrimaryConnectClient
119
129
  # Calculates hash code according to all attributes.
120
130
  # @return [Integer] Hash code
121
131
  def hash
122
- [patient, visit, meta, order].hash
132
+ [patient, subject, visit, meta, order].hash
123
133
  end
124
134
 
125
135
  # Builds the object from hash
@@ -30,6 +30,9 @@ module PrimaryConnectClient
30
30
  # Timestamp when the specimen was collected
31
31
  attr_accessor :collection_date_time
32
32
 
33
+ # Timestamp when the specimen was collected
34
+ attr_accessor :collection_start_date_time
35
+
33
36
  # Timestamp when the results were composed into a report and released.
34
37
  attr_accessor :completion_date_time
35
38
 
@@ -38,6 +41,9 @@ module PrimaryConnectClient
38
41
 
39
42
  attr_accessor :specimen
40
43
 
44
+ # Array of medications administered to the subject
45
+ attr_accessor :medication_administrations
46
+
41
47
  attr_accessor :procedure
42
48
 
43
49
  attr_accessor :ordering_provider
@@ -103,9 +109,11 @@ module PrimaryConnectClient
103
109
  :'status' => :'status',
104
110
  :'transaction_date_time' => :'transactionDateTime',
105
111
  :'collection_date_time' => :'collectionDateTime',
112
+ :'collection_start_date_time' => :'collectionStartDateTime',
106
113
  :'completion_date_time' => :'completionDateTime',
107
114
  :'expiration_date' => :'expirationDate',
108
115
  :'specimen' => :'specimen',
116
+ :'medication_administrations' => :'medicationAdministrations',
109
117
  :'procedure' => :'procedure',
110
118
  :'ordering_provider' => :'orderingProvider',
111
119
  :'result_copy_providers' => :'resultCopyProviders',
@@ -135,9 +143,11 @@ module PrimaryConnectClient
135
143
  :'status' => :'String',
136
144
  :'transaction_date_time' => :'Time',
137
145
  :'collection_date_time' => :'Time',
146
+ :'collection_start_date_time' => :'Time',
138
147
  :'completion_date_time' => :'Time',
139
148
  :'expiration_date' => :'String',
140
149
  :'specimen' => :'Specimen',
150
+ :'medication_administrations' => :'Array<MedicationAdministration>',
141
151
  :'procedure' => :'CodedValue',
142
152
  :'ordering_provider' => :'Provider',
143
153
  :'result_copy_providers' => :'Array<Provider>',
@@ -195,6 +205,10 @@ module PrimaryConnectClient
195
205
  self.collection_date_time = attributes[:'collection_date_time']
196
206
  end
197
207
 
208
+ if attributes.key?(:'collection_start_date_time')
209
+ self.collection_start_date_time = attributes[:'collection_start_date_time']
210
+ end
211
+
198
212
  if attributes.key?(:'completion_date_time')
199
213
  self.completion_date_time = attributes[:'completion_date_time']
200
214
  end
@@ -207,6 +221,12 @@ module PrimaryConnectClient
207
221
  self.specimen = attributes[:'specimen']
208
222
  end
209
223
 
224
+ if attributes.key?(:'medication_administrations')
225
+ if (value = attributes[:'medication_administrations']).is_a?(Array)
226
+ self.medication_administrations = value
227
+ end
228
+ end
229
+
210
230
  if attributes.key?(:'procedure')
211
231
  self.procedure = attributes[:'procedure']
212
232
  end
@@ -282,7 +302,7 @@ module PrimaryConnectClient
282
302
  # Check to see if the all the properties in the model are valid
283
303
  # @return true if the model is valid
284
304
  def valid?
285
- status_validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW"])
305
+ status_validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW", "STATUS_REPORTED"])
286
306
  return false unless status_validator.valid?(@status)
287
307
  priority_validator = EnumAttributeValidator.new('String', ["PRIORITY_UNKNOWN", "PRIORITY_ASAP", "PRIORITY_ROUTINE", "PRIORITY_PREOPERATIVE", "PRIORITY_TIMING_CRITICAL", "PRIORITY_STAT"])
288
308
  return false unless priority_validator.valid?(@priority)
@@ -296,7 +316,7 @@ module PrimaryConnectClient
296
316
  # Custom attribute writer method checking allowed values (enum).
297
317
  # @param [Object] status Object to be assigned
298
318
  def status=(status)
299
- validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW"])
319
+ validator = EnumAttributeValidator.new('String', ["STATUS_UNKNOWN", "STATUS_UPDATE", "STATUS_CANCEL", "STATUS_RESULTED", "STATUS_NEW", "STATUS_REPORTED"])
300
320
  unless validator.valid?(status)
301
321
  fail ArgumentError, "invalid value for \"status\", must be one of #{validator.allowable_values}."
302
322
  end
@@ -343,9 +363,11 @@ module PrimaryConnectClient
343
363
  status == o.status &&
344
364
  transaction_date_time == o.transaction_date_time &&
345
365
  collection_date_time == o.collection_date_time &&
366
+ collection_start_date_time == o.collection_start_date_time &&
346
367
  completion_date_time == o.completion_date_time &&
347
368
  expiration_date == o.expiration_date &&
348
369
  specimen == o.specimen &&
370
+ medication_administrations == o.medication_administrations &&
349
371
  procedure == o.procedure &&
350
372
  ordering_provider == o.ordering_provider &&
351
373
  result_copy_providers == o.result_copy_providers &&
@@ -370,7 +392,7 @@ module PrimaryConnectClient
370
392
  # Calculates hash code according to all attributes.
371
393
  # @return [Integer] Hash code
372
394
  def hash
373
- [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, external_ids, results].hash
395
+ [id, application_order_id, status, transaction_date_time, collection_date_time, collection_start_date_time, completion_date_time, expiration_date, specimen, medication_administrations, procedure, ordering_provider, result_copy_providers, ordering_facility, priority, diagnoses, clinical_comments, notes, clinical_info, results_status, response_flag, external_ids, results].hash
374
396
  end
375
397
 
376
398
  # Builds the object from hash