primary_connect_client 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +14 -7
- data/docs/Accession.md +18 -0
- data/docs/AccessionOrder.md +18 -0
- data/docs/DefaultApi.md +142 -0
- data/docs/Device.md +5 -3
- data/docs/Medication.md +1 -1
- data/docs/MedicationAdministration.md +2 -2
- data/docs/Meta.md +1 -1
- data/docs/OrderOrder.md +6 -4
- data/docs/OrderOrderDiagnoses.md +1 -1
- data/docs/Result.md +4 -2
- data/docs/V2Device.md +5 -3
- data/docs/V2Medication.md +1 -1
- data/docs/V2MedicationAdministration.md +2 -2
- data/docs/Visit.md +1 -1
- data/lib/primary_connect_client/api/default_api.rb +133 -0
- data/lib/primary_connect_client/models/accession.rb +218 -0
- data/lib/primary_connect_client/models/accession_order.rb +219 -0
- data/lib/primary_connect_client/models/demographics.rb +2 -2
- data/lib/primary_connect_client/models/device.rb +21 -12
- data/lib/primary_connect_client/models/medication.rb +1 -1
- data/lib/primary_connect_client/models/medication_administration.rb +2 -2
- data/lib/primary_connect_client/models/meta.rb +1 -0
- data/lib/primary_connect_client/models/order_order.rb +15 -5
- data/lib/primary_connect_client/models/order_order_diagnoses.rb +1 -1
- data/lib/primary_connect_client/models/result.rb +14 -5
- data/lib/primary_connect_client/models/v2_device.rb +21 -12
- data/lib/primary_connect_client/models/v2_medication.rb +1 -1
- data/lib/primary_connect_client/models/v2_medication_administration.rb +2 -2
- data/lib/primary_connect_client/models/visit.rb +1 -1
- data/lib/primary_connect_client/version.rb +1 -1
- data/lib/primary_connect_client.rb +2 -0
- data/primary_connect_client.gemspec +0 -1
- data/spec/api/default_api_spec.rb +24 -0
- data/spec/models/accession_order_spec.rb +34 -0
- data/spec/models/accession_spec.rb +34 -0
- data/spec/models/demographics_spec.rb +1 -1
- data/spec/models/device_spec.rb +7 -1
- data/spec/models/order_order_spec.rb +6 -0
- data/spec/models/result_spec.rb +6 -0
- data/spec/models/v2_device_spec.rb +7 -1
- metadata +19 -31
@@ -0,0 +1,218 @@
|
|
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 Accession
|
18
|
+
attr_accessor :order
|
19
|
+
|
20
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
21
|
+
def self.attribute_map
|
22
|
+
{
|
23
|
+
:'order' => :'order'
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
# Returns all the JSON keys this model knows about
|
28
|
+
def self.acceptable_attributes
|
29
|
+
attribute_map.values
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'order' => :'AccessionOrder'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# List of attributes with nullable: true
|
40
|
+
def self.openapi_nullable
|
41
|
+
Set.new([
|
42
|
+
])
|
43
|
+
end
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
def initialize(attributes = {})
|
48
|
+
if (!attributes.is_a?(Hash))
|
49
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::Accession` initialize method"
|
50
|
+
end
|
51
|
+
|
52
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
54
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
55
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::Accession`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
56
|
+
end
|
57
|
+
h[k.to_sym] = v
|
58
|
+
}
|
59
|
+
|
60
|
+
if attributes.key?(:'order')
|
61
|
+
self.order = attributes[:'order']
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
66
|
+
# @return Array for valid properties with the reasons
|
67
|
+
def list_invalid_properties
|
68
|
+
invalid_properties = Array.new
|
69
|
+
invalid_properties
|
70
|
+
end
|
71
|
+
|
72
|
+
# Check to see if the all the properties in the model are valid
|
73
|
+
# @return true if the model is valid
|
74
|
+
def valid?
|
75
|
+
true
|
76
|
+
end
|
77
|
+
|
78
|
+
# Checks equality by comparing each attribute.
|
79
|
+
# @param [Object] Object to be compared
|
80
|
+
def ==(o)
|
81
|
+
return true if self.equal?(o)
|
82
|
+
self.class == o.class &&
|
83
|
+
order == o.order
|
84
|
+
end
|
85
|
+
|
86
|
+
# @see the `==` method
|
87
|
+
# @param [Object] Object to be compared
|
88
|
+
def eql?(o)
|
89
|
+
self == o
|
90
|
+
end
|
91
|
+
|
92
|
+
# Calculates hash code according to all attributes.
|
93
|
+
# @return [Integer] Hash code
|
94
|
+
def hash
|
95
|
+
[order].hash
|
96
|
+
end
|
97
|
+
|
98
|
+
# Builds the object from hash
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
# @return [Object] Returns the model itself
|
101
|
+
def self.build_from_hash(attributes)
|
102
|
+
new.build_from_hash(attributes)
|
103
|
+
end
|
104
|
+
|
105
|
+
# Builds the object from hash
|
106
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
107
|
+
# @return [Object] Returns the model itself
|
108
|
+
def build_from_hash(attributes)
|
109
|
+
return nil unless attributes.is_a?(Hash)
|
110
|
+
self.class.openapi_types.each_pair do |key, type|
|
111
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
112
|
+
self.send("#{key}=", nil)
|
113
|
+
elsif type =~ /\AArray<(.*)>/i
|
114
|
+
# check to ensure the input is an array given that the attribute
|
115
|
+
# is documented as an array but the input is not
|
116
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
117
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
118
|
+
end
|
119
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
120
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
self
|
125
|
+
end
|
126
|
+
|
127
|
+
# Deserializes the data based on type
|
128
|
+
# @param string type Data type
|
129
|
+
# @param string value Value to be deserialized
|
130
|
+
# @return [Object] Deserialized data
|
131
|
+
def _deserialize(type, value)
|
132
|
+
case type.to_sym
|
133
|
+
when :Time
|
134
|
+
Time.parse(value)
|
135
|
+
when :Date
|
136
|
+
Date.parse(value)
|
137
|
+
when :String
|
138
|
+
value.to_s
|
139
|
+
when :Integer
|
140
|
+
value.to_i
|
141
|
+
when :Float
|
142
|
+
value.to_f
|
143
|
+
when :Boolean
|
144
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
145
|
+
true
|
146
|
+
else
|
147
|
+
false
|
148
|
+
end
|
149
|
+
when :Object
|
150
|
+
# generic object (usually a Hash), return directly
|
151
|
+
value
|
152
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
153
|
+
inner_type = Regexp.last_match[:inner_type]
|
154
|
+
value.map { |v| _deserialize(inner_type, v) }
|
155
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
156
|
+
k_type = Regexp.last_match[:k_type]
|
157
|
+
v_type = Regexp.last_match[:v_type]
|
158
|
+
{}.tap do |hash|
|
159
|
+
value.each do |k, v|
|
160
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
161
|
+
end
|
162
|
+
end
|
163
|
+
else # model
|
164
|
+
# models (e.g. Pet) or oneOf
|
165
|
+
klass = PrimaryConnectClient.const_get(type)
|
166
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
# Returns the string representation of the object
|
171
|
+
# @return [String] String presentation of the object
|
172
|
+
def to_s
|
173
|
+
to_hash.to_s
|
174
|
+
end
|
175
|
+
|
176
|
+
# to_body is an alias to to_hash (backward compatibility)
|
177
|
+
# @return [Hash] Returns the object in the form of hash
|
178
|
+
def to_body
|
179
|
+
to_hash
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the object in the form of hash
|
183
|
+
# @return [Hash] Returns the object in the form of hash
|
184
|
+
def to_hash
|
185
|
+
hash = {}
|
186
|
+
self.class.attribute_map.each_pair do |attr, param|
|
187
|
+
value = self.send(attr)
|
188
|
+
if value.nil?
|
189
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
190
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
191
|
+
end
|
192
|
+
|
193
|
+
hash[param] = _to_hash(value)
|
194
|
+
end
|
195
|
+
hash
|
196
|
+
end
|
197
|
+
|
198
|
+
# Outputs non-array value in the form of hash
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
200
|
+
# @param [Object] value Any valid value
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
202
|
+
def _to_hash(value)
|
203
|
+
if value.is_a?(Array)
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
205
|
+
elsif value.is_a?(Hash)
|
206
|
+
{}.tap do |hash|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
208
|
+
end
|
209
|
+
elsif value.respond_to? :to_hash
|
210
|
+
value.to_hash
|
211
|
+
else
|
212
|
+
value
|
213
|
+
end
|
214
|
+
end
|
215
|
+
|
216
|
+
end
|
217
|
+
|
218
|
+
end
|
@@ -0,0 +1,219 @@
|
|
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 AccessionOrder
|
18
|
+
# Timestamp when the specimen was received by the destination. (ISO-8601)
|
19
|
+
attr_accessor :accession_date_time
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
:'accession_date_time' => :'accessionDateTime'
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
# Returns all the JSON keys this model knows about
|
29
|
+
def self.acceptable_attributes
|
30
|
+
attribute_map.values
|
31
|
+
end
|
32
|
+
|
33
|
+
# Attribute type mapping.
|
34
|
+
def self.openapi_types
|
35
|
+
{
|
36
|
+
:'accession_date_time' => :'Time'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::AccessionOrder` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PrimaryConnectClient::AccessionOrder`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'accession_date_time')
|
62
|
+
self.accession_date_time = attributes[:'accession_date_time']
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
67
|
+
# @return Array for valid properties with the reasons
|
68
|
+
def list_invalid_properties
|
69
|
+
invalid_properties = Array.new
|
70
|
+
invalid_properties
|
71
|
+
end
|
72
|
+
|
73
|
+
# Check to see if the all the properties in the model are valid
|
74
|
+
# @return true if the model is valid
|
75
|
+
def valid?
|
76
|
+
true
|
77
|
+
end
|
78
|
+
|
79
|
+
# Checks equality by comparing each attribute.
|
80
|
+
# @param [Object] Object to be compared
|
81
|
+
def ==(o)
|
82
|
+
return true if self.equal?(o)
|
83
|
+
self.class == o.class &&
|
84
|
+
accession_date_time == o.accession_date_time
|
85
|
+
end
|
86
|
+
|
87
|
+
# @see the `==` method
|
88
|
+
# @param [Object] Object to be compared
|
89
|
+
def eql?(o)
|
90
|
+
self == o
|
91
|
+
end
|
92
|
+
|
93
|
+
# Calculates hash code according to all attributes.
|
94
|
+
# @return [Integer] Hash code
|
95
|
+
def hash
|
96
|
+
[accession_date_time].hash
|
97
|
+
end
|
98
|
+
|
99
|
+
# Builds the object from hash
|
100
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
101
|
+
# @return [Object] Returns the model itself
|
102
|
+
def self.build_from_hash(attributes)
|
103
|
+
new.build_from_hash(attributes)
|
104
|
+
end
|
105
|
+
|
106
|
+
# Builds the object from hash
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
108
|
+
# @return [Object] Returns the model itself
|
109
|
+
def build_from_hash(attributes)
|
110
|
+
return nil unless attributes.is_a?(Hash)
|
111
|
+
self.class.openapi_types.each_pair do |key, type|
|
112
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
113
|
+
self.send("#{key}=", nil)
|
114
|
+
elsif type =~ /\AArray<(.*)>/i
|
115
|
+
# check to ensure the input is an array given that the attribute
|
116
|
+
# is documented as an array but the input is not
|
117
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
118
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
119
|
+
end
|
120
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
121
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
self
|
126
|
+
end
|
127
|
+
|
128
|
+
# Deserializes the data based on type
|
129
|
+
# @param string type Data type
|
130
|
+
# @param string value Value to be deserialized
|
131
|
+
# @return [Object] Deserialized data
|
132
|
+
def _deserialize(type, value)
|
133
|
+
case type.to_sym
|
134
|
+
when :Time
|
135
|
+
Time.parse(value)
|
136
|
+
when :Date
|
137
|
+
Date.parse(value)
|
138
|
+
when :String
|
139
|
+
value.to_s
|
140
|
+
when :Integer
|
141
|
+
value.to_i
|
142
|
+
when :Float
|
143
|
+
value.to_f
|
144
|
+
when :Boolean
|
145
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
146
|
+
true
|
147
|
+
else
|
148
|
+
false
|
149
|
+
end
|
150
|
+
when :Object
|
151
|
+
# generic object (usually a Hash), return directly
|
152
|
+
value
|
153
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
154
|
+
inner_type = Regexp.last_match[:inner_type]
|
155
|
+
value.map { |v| _deserialize(inner_type, v) }
|
156
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
157
|
+
k_type = Regexp.last_match[:k_type]
|
158
|
+
v_type = Regexp.last_match[:v_type]
|
159
|
+
{}.tap do |hash|
|
160
|
+
value.each do |k, v|
|
161
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
162
|
+
end
|
163
|
+
end
|
164
|
+
else # model
|
165
|
+
# models (e.g. Pet) or oneOf
|
166
|
+
klass = PrimaryConnectClient.const_get(type)
|
167
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
168
|
+
end
|
169
|
+
end
|
170
|
+
|
171
|
+
# Returns the string representation of the object
|
172
|
+
# @return [String] String presentation of the object
|
173
|
+
def to_s
|
174
|
+
to_hash.to_s
|
175
|
+
end
|
176
|
+
|
177
|
+
# to_body is an alias to to_hash (backward compatibility)
|
178
|
+
# @return [Hash] Returns the object in the form of hash
|
179
|
+
def to_body
|
180
|
+
to_hash
|
181
|
+
end
|
182
|
+
|
183
|
+
# Returns the object in the form of hash
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
185
|
+
def to_hash
|
186
|
+
hash = {}
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
188
|
+
value = self.send(attr)
|
189
|
+
if value.nil?
|
190
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
191
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
192
|
+
end
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Outputs non-array value in the form of hash
|
200
|
+
# For object, use to_hash. Otherwise, just return the value
|
201
|
+
# @param [Object] value Any valid value
|
202
|
+
# @return [Hash] Returns the value in the form of hash
|
203
|
+
def _to_hash(value)
|
204
|
+
if value.is_a?(Array)
|
205
|
+
value.compact.map { |v| _to_hash(v) }
|
206
|
+
elsif value.is_a?(Hash)
|
207
|
+
{}.tap do |hash|
|
208
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
209
|
+
end
|
210
|
+
elsif value.respond_to? :to_hash
|
211
|
+
value.to_hash
|
212
|
+
else
|
213
|
+
value
|
214
|
+
end
|
215
|
+
end
|
216
|
+
|
217
|
+
end
|
218
|
+
|
219
|
+
end
|
@@ -245,7 +245,7 @@ module PrimaryConnectClient
|
|
245
245
|
def valid?
|
246
246
|
sex_validator = EnumAttributeValidator.new('String', ["SEX_UNKNOWN", "SEX_FEMALE", "SEX_MALE", "SEX_OTHER", "SEX_NON_BINARY", "SEX_PREFER_NOT_TO_DISCLOSE"])
|
247
247
|
return false unless sex_validator.valid?(@sex)
|
248
|
-
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"])
|
248
|
+
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", "GENDER_INTERSEX"])
|
249
249
|
return false unless gender_validator.valid?(@gender)
|
250
250
|
sexual_orientation_validator = EnumAttributeValidator.new('String', ["ORIENTATION_UNKNOWN", "ORIENTATION_HOMOSEXUAL", "ORIENTATION_HETEROSEXUAL", "ORIENTATION_BISEXUAL", "ORIENTATION_QUESTIONING", "ORIENTATION_OTHER", "ORIENTATION_PREFER_NOT_TO_DISCLOSE"])
|
251
251
|
return false unless sexual_orientation_validator.valid?(@sexual_orientation)
|
@@ -269,7 +269,7 @@ module PrimaryConnectClient
|
|
269
269
|
# Custom attribute writer method checking allowed values (enum).
|
270
270
|
# @param [Object] gender Object to be assigned
|
271
271
|
def gender=(gender)
|
272
|
-
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"])
|
272
|
+
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", "GENDER_INTERSEX"])
|
273
273
|
unless validator.valid?(gender)
|
274
274
|
fail ArgumentError, "invalid value for \"gender\", must be one of #{validator.allowable_values}."
|
275
275
|
end
|
@@ -15,8 +15,8 @@ require 'time'
|
|
15
15
|
|
16
16
|
module PrimaryConnectClient
|
17
17
|
class Device
|
18
|
-
#
|
19
|
-
attr_accessor :
|
18
|
+
# List of IDs and types that identify the device
|
19
|
+
attr_accessor :identifiers
|
20
20
|
|
21
21
|
attr_accessor :manufacturer
|
22
22
|
|
@@ -31,16 +31,19 @@ module PrimaryConnectClient
|
|
31
31
|
# Arbitrary key/value pairs for Device specific use
|
32
32
|
attr_accessor :config
|
33
33
|
|
34
|
+
attr_accessor :model_name
|
35
|
+
|
34
36
|
# Attribute mapping from ruby-style variable name to JSON key.
|
35
37
|
def self.attribute_map
|
36
38
|
{
|
37
|
-
:'
|
39
|
+
:'identifiers' => :'identifiers',
|
38
40
|
:'manufacturer' => :'manufacturer',
|
39
41
|
:'model_number' => :'modelNumber',
|
40
42
|
:'serial_number' => :'serialNumber',
|
41
43
|
:'address' => :'address',
|
42
44
|
:'location' => :'location',
|
43
|
-
:'config' => :'config'
|
45
|
+
:'config' => :'config',
|
46
|
+
:'model_name' => :'modelName'
|
44
47
|
}
|
45
48
|
end
|
46
49
|
|
@@ -52,13 +55,14 @@ module PrimaryConnectClient
|
|
52
55
|
# Attribute type mapping.
|
53
56
|
def self.openapi_types
|
54
57
|
{
|
55
|
-
:'
|
58
|
+
:'identifiers' => :'Array<Identifier>',
|
56
59
|
:'manufacturer' => :'String',
|
57
60
|
:'model_number' => :'String',
|
58
61
|
:'serial_number' => :'String',
|
59
62
|
:'address' => :'Address',
|
60
63
|
:'location' => :'Location',
|
61
|
-
:'config' => :'Object'
|
64
|
+
:'config' => :'Object',
|
65
|
+
:'model_name' => :'String'
|
62
66
|
}
|
63
67
|
end
|
64
68
|
|
@@ -83,9 +87,9 @@ module PrimaryConnectClient
|
|
83
87
|
h[k.to_sym] = v
|
84
88
|
}
|
85
89
|
|
86
|
-
if attributes.key?(:'
|
87
|
-
if (value = attributes[:'
|
88
|
-
self.
|
90
|
+
if attributes.key?(:'identifiers')
|
91
|
+
if (value = attributes[:'identifiers']).is_a?(Array)
|
92
|
+
self.identifiers = value
|
89
93
|
end
|
90
94
|
end
|
91
95
|
|
@@ -112,6 +116,10 @@ module PrimaryConnectClient
|
|
112
116
|
if attributes.key?(:'config')
|
113
117
|
self.config = attributes[:'config']
|
114
118
|
end
|
119
|
+
|
120
|
+
if attributes.key?(:'model_name')
|
121
|
+
self.model_name = attributes[:'model_name']
|
122
|
+
end
|
115
123
|
end
|
116
124
|
|
117
125
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -132,13 +140,14 @@ module PrimaryConnectClient
|
|
132
140
|
def ==(o)
|
133
141
|
return true if self.equal?(o)
|
134
142
|
self.class == o.class &&
|
135
|
-
|
143
|
+
identifiers == o.identifiers &&
|
136
144
|
manufacturer == o.manufacturer &&
|
137
145
|
model_number == o.model_number &&
|
138
146
|
serial_number == o.serial_number &&
|
139
147
|
address == o.address &&
|
140
148
|
location == o.location &&
|
141
|
-
config == o.config
|
149
|
+
config == o.config &&
|
150
|
+
model_name == o.model_name
|
142
151
|
end
|
143
152
|
|
144
153
|
# @see the `==` method
|
@@ -150,7 +159,7 @@ module PrimaryConnectClient
|
|
150
159
|
# Calculates hash code according to all attributes.
|
151
160
|
# @return [Integer] Hash code
|
152
161
|
def hash
|
153
|
-
[
|
162
|
+
[identifiers, manufacturer, model_number, serial_number, address, location, config, model_name].hash
|
154
163
|
end
|
155
164
|
|
156
165
|
# Builds the object from hash
|
@@ -20,10 +20,10 @@ module PrimaryConnectClient
|
|
20
20
|
# Codes for the medication administration
|
21
21
|
attr_accessor :administration_codes
|
22
22
|
|
23
|
-
# Administration start date of medication
|
23
|
+
# Administration start date of medication (ISO-8601)
|
24
24
|
attr_accessor :administration_start_time
|
25
25
|
|
26
|
-
# Administration end date of medication
|
26
|
+
# Administration end date of medication (ISO-8601)
|
27
27
|
attr_accessor :administration_end_time
|
28
28
|
|
29
29
|
attr_accessor :medication
|
@@ -24,18 +24,21 @@ module PrimaryConnectClient
|
|
24
24
|
# The status of an order.
|
25
25
|
attr_accessor :status
|
26
26
|
|
27
|
-
# Timestamp when the order was placed
|
27
|
+
# Timestamp when the order was placed (ISO-8601)
|
28
28
|
attr_accessor :transaction_date_time
|
29
29
|
|
30
|
-
# Timestamp when the specimen was collected
|
30
|
+
# Timestamp when the specimen was collected (ISO-8601)
|
31
31
|
attr_accessor :collection_date_time
|
32
32
|
|
33
|
-
# Timestamp when the specimen was collected
|
33
|
+
# Timestamp when the specimen was collected (ISO-8601)
|
34
34
|
attr_accessor :collection_start_date_time
|
35
35
|
|
36
|
-
# Timestamp when the results were composed into a report and released.
|
36
|
+
# Timestamp when the results were composed into a report and released. (ISO-8601)
|
37
37
|
attr_accessor :completion_date_time
|
38
38
|
|
39
|
+
# Timestamp when the specimen was received by the destination. (ISO-8601)
|
40
|
+
attr_accessor :accession_date_time
|
41
|
+
|
39
42
|
# YYYY-MM-DD, Date when the order becomes invalid
|
40
43
|
attr_accessor :expiration_date
|
41
44
|
|
@@ -111,6 +114,7 @@ module PrimaryConnectClient
|
|
111
114
|
:'collection_date_time' => :'collectionDateTime',
|
112
115
|
:'collection_start_date_time' => :'collectionStartDateTime',
|
113
116
|
:'completion_date_time' => :'completionDateTime',
|
117
|
+
:'accession_date_time' => :'accessionDateTime',
|
114
118
|
:'expiration_date' => :'expirationDate',
|
115
119
|
:'specimen' => :'specimen',
|
116
120
|
:'medication_administrations' => :'medicationAdministrations',
|
@@ -145,6 +149,7 @@ module PrimaryConnectClient
|
|
145
149
|
:'collection_date_time' => :'Time',
|
146
150
|
:'collection_start_date_time' => :'Time',
|
147
151
|
:'completion_date_time' => :'Time',
|
152
|
+
:'accession_date_time' => :'Time',
|
148
153
|
:'expiration_date' => :'String',
|
149
154
|
:'specimen' => :'Specimen',
|
150
155
|
:'medication_administrations' => :'Array<MedicationAdministration>',
|
@@ -213,6 +218,10 @@ module PrimaryConnectClient
|
|
213
218
|
self.completion_date_time = attributes[:'completion_date_time']
|
214
219
|
end
|
215
220
|
|
221
|
+
if attributes.key?(:'accession_date_time')
|
222
|
+
self.accession_date_time = attributes[:'accession_date_time']
|
223
|
+
end
|
224
|
+
|
216
225
|
if attributes.key?(:'expiration_date')
|
217
226
|
self.expiration_date = attributes[:'expiration_date']
|
218
227
|
end
|
@@ -365,6 +374,7 @@ module PrimaryConnectClient
|
|
365
374
|
collection_date_time == o.collection_date_time &&
|
366
375
|
collection_start_date_time == o.collection_start_date_time &&
|
367
376
|
completion_date_time == o.completion_date_time &&
|
377
|
+
accession_date_time == o.accession_date_time &&
|
368
378
|
expiration_date == o.expiration_date &&
|
369
379
|
specimen == o.specimen &&
|
370
380
|
medication_administrations == o.medication_administrations &&
|
@@ -392,7 +402,7 @@ module PrimaryConnectClient
|
|
392
402
|
# Calculates hash code according to all attributes.
|
393
403
|
# @return [Integer] Hash code
|
394
404
|
def 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
|
405
|
+
[id, application_order_id, status, transaction_date_time, collection_date_time, collection_start_date_time, completion_date_time, accession_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
|
396
406
|
end
|
397
407
|
|
398
408
|
# Builds the object from hash
|
@@ -20,7 +20,7 @@ module PrimaryConnectClient
|
|
20
20
|
# Type of the diagnosis
|
21
21
|
attr_accessor :type
|
22
22
|
|
23
|
-
# Timestamp of the the diagnosis was documented
|
23
|
+
# Timestamp of the the diagnosis was documented (ISO-8601)
|
24
24
|
attr_accessor :documented_date_time
|
25
25
|
|
26
26
|
class EnumAttributeValidator
|