primary_connect_client 1.4.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/README.md +8 -6
- data/docs/DefaultApi.md +133 -0
- data/docs/Ids.md +18 -0
- data/docs/Measurement.md +22 -0
- data/docs/OrderOrder.md +2 -0
- data/docs/Subject.md +10 -39
- data/lib/primary_connect_client/api/default_api.rb +116 -0
- data/lib/primary_connect_client/models/{subject_one_of1.rb → ids.rb} +13 -10
- data/lib/primary_connect_client/models/{result_specimen.rb → measurement.rb} +25 -25
- data/lib/primary_connect_client/models/order.rb +0 -1
- data/lib/primary_connect_client/models/order_order.rb +13 -1
- data/lib/primary_connect_client/models/subject.rb +196 -74
- data/lib/primary_connect_client/version.rb +1 -1
- data/lib/primary_connect_client.rb +2 -2
- data/primary_connect_client.gemspec +1 -0
- data/spec/api/default_api_spec.rb +21 -0
- data/spec/models/ids_spec.rb +34 -0
- data/spec/models/measurement_spec.rb +46 -0
- data/spec/models/order_order_spec.rb +6 -0
- data/spec/models/subject_spec.rb +14 -5
- metadata +39 -16
- data/lib/primary_connect_client/models/order_order_specimen.rb +0 -239
- data/lib/primary_connect_client/models/patient_demographics.rb +0 -466
- data/lib/primary_connect_client/models/subject_one_of.rb +0 -218
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: primary_connect_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -31,25 +31,45 @@ dependencies:
|
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.1
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: primary_connect_proto
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: 0.17.0
|
37
40
|
- - ">="
|
38
41
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
42
|
+
version: 0.17.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: 0.17.0
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.17.0
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: rspec
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
40
57
|
- - "~>"
|
41
58
|
- !ruby/object:Gem::Version
|
42
59
|
version: '3.6'
|
60
|
+
- - ">="
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: 3.6.0
|
43
63
|
type: :development
|
44
64
|
prerelease: false
|
45
65
|
version_requirements: !ruby/object:Gem::Requirement
|
46
66
|
requirements:
|
47
|
-
- - ">="
|
48
|
-
- !ruby/object:Gem::Version
|
49
|
-
version: 3.6.0
|
50
67
|
- - "~>"
|
51
68
|
- !ruby/object:Gem::Version
|
52
69
|
version: '3.6'
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: 3.6.0
|
53
73
|
description: Client Library to interface with Primary Connect
|
54
74
|
email:
|
55
75
|
- ''
|
@@ -73,7 +93,9 @@ files:
|
|
73
93
|
- docs/Event.md
|
74
94
|
- docs/Events.md
|
75
95
|
- docs/Identifier.md
|
96
|
+
- docs/Ids.md
|
76
97
|
- docs/Location.md
|
98
|
+
- docs/Measurement.md
|
77
99
|
- docs/Medication.md
|
78
100
|
- docs/MedicationAdministration.md
|
79
101
|
- docs/Meta.md
|
@@ -135,7 +157,9 @@ files:
|
|
135
157
|
- lib/primary_connect_client/models/event.rb
|
136
158
|
- lib/primary_connect_client/models/events.rb
|
137
159
|
- lib/primary_connect_client/models/identifier.rb
|
160
|
+
- lib/primary_connect_client/models/ids.rb
|
138
161
|
- lib/primary_connect_client/models/location.rb
|
162
|
+
- lib/primary_connect_client/models/measurement.rb
|
139
163
|
- lib/primary_connect_client/models/medication.rb
|
140
164
|
- lib/primary_connect_client/models/medication_administration.rb
|
141
165
|
- lib/primary_connect_client/models/meta.rb
|
@@ -150,25 +174,20 @@ files:
|
|
150
174
|
- lib/primary_connect_client/models/order_order_clinical_info.rb
|
151
175
|
- lib/primary_connect_client/models/order_order_diagnoses.rb
|
152
176
|
- lib/primary_connect_client/models/order_order_ordering_facility.rb
|
153
|
-
- lib/primary_connect_client/models/order_order_specimen.rb
|
154
177
|
- lib/primary_connect_client/models/order_with_event_errors.rb
|
155
178
|
- lib/primary_connect_client/models/orders.rb
|
156
179
|
- lib/primary_connect_client/models/orders_orders.rb
|
157
180
|
- lib/primary_connect_client/models/patient.rb
|
158
181
|
- lib/primary_connect_client/models/patient_contacts.rb
|
159
|
-
- lib/primary_connect_client/models/patient_demographics.rb
|
160
182
|
- lib/primary_connect_client/models/phone_number.rb
|
161
183
|
- lib/primary_connect_client/models/provider.rb
|
162
184
|
- lib/primary_connect_client/models/result.rb
|
163
185
|
- lib/primary_connect_client/models/result_ids.rb
|
164
186
|
- lib/primary_connect_client/models/result_reference_range.rb
|
165
187
|
- lib/primary_connect_client/models/result_report.rb
|
166
|
-
- lib/primary_connect_client/models/result_specimen.rb
|
167
188
|
- lib/primary_connect_client/models/results.rb
|
168
189
|
- lib/primary_connect_client/models/specimen.rb
|
169
190
|
- lib/primary_connect_client/models/subject.rb
|
170
|
-
- lib/primary_connect_client/models/subject_one_of.rb
|
171
|
-
- lib/primary_connect_client/models/subject_one_of1.rb
|
172
191
|
- lib/primary_connect_client/models/v2_device.rb
|
173
192
|
- lib/primary_connect_client/models/v2_dosage.rb
|
174
193
|
- lib/primary_connect_client/models/v2_medication.rb
|
@@ -196,7 +215,9 @@ files:
|
|
196
215
|
- spec/models/event_spec.rb
|
197
216
|
- spec/models/events_spec.rb
|
198
217
|
- spec/models/identifier_spec.rb
|
218
|
+
- spec/models/ids_spec.rb
|
199
219
|
- spec/models/location_spec.rb
|
220
|
+
- spec/models/measurement_spec.rb
|
200
221
|
- spec/models/medication_administration_spec.rb
|
201
222
|
- spec/models/medication_spec.rb
|
202
223
|
- spec/models/meta_destinations_spec.rb
|
@@ -247,7 +268,7 @@ homepage: https://openapi-generator.tech
|
|
247
268
|
licenses:
|
248
269
|
- Unlicense
|
249
270
|
metadata: {}
|
250
|
-
post_install_message:
|
271
|
+
post_install_message:
|
251
272
|
rdoc_options: []
|
252
273
|
require_paths:
|
253
274
|
- lib
|
@@ -262,8 +283,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
262
283
|
- !ruby/object:Gem::Version
|
263
284
|
version: '0'
|
264
285
|
requirements: []
|
265
|
-
rubygems_version: 3.
|
266
|
-
signing_key:
|
286
|
+
rubygems_version: 3.2.15
|
287
|
+
signing_key:
|
267
288
|
specification_version: 4
|
268
289
|
summary: Primary Connect API V1 Ruby Gem
|
269
290
|
test_files:
|
@@ -285,6 +306,7 @@ test_files:
|
|
285
306
|
- spec/models/identifier_spec.rb
|
286
307
|
- spec/models/patient_contacts_spec.rb
|
287
308
|
- spec/models/device_spec.rb
|
309
|
+
- spec/models/ids_spec.rb
|
288
310
|
- spec/models/order_ids_spec.rb
|
289
311
|
- spec/models/visit_guarantor_spec.rb
|
290
312
|
- spec/models/v2_dosage_spec.rb
|
@@ -296,6 +318,7 @@ test_files:
|
|
296
318
|
- spec/models/visit_company_spec.rb
|
297
319
|
- spec/models/subject_spec.rb
|
298
320
|
- spec/models/v2_medication_spec.rb
|
321
|
+
- spec/models/measurement_spec.rb
|
299
322
|
- spec/models/medication_spec.rb
|
300
323
|
- spec/models/visit_plan_spec.rb
|
301
324
|
- spec/models/phone_number_spec.rb
|
@@ -1,239 +0,0 @@
|
|
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 OrderOrderSpecimen
|
18
|
-
# ID of the collected specimen
|
19
|
-
attr_accessor :id
|
20
|
-
|
21
|
-
# Source of the specimen
|
22
|
-
attr_accessor :source
|
23
|
-
|
24
|
-
# Body site from which the specimen was collected
|
25
|
-
attr_accessor :body_site
|
26
|
-
|
27
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
-
def self.attribute_map
|
29
|
-
{
|
30
|
-
:'id' => :'id',
|
31
|
-
:'source' => :'source',
|
32
|
-
:'body_site' => :'body_site'
|
33
|
-
}
|
34
|
-
end
|
35
|
-
|
36
|
-
# Returns all the JSON keys this model knows about
|
37
|
-
def self.acceptable_attributes
|
38
|
-
attribute_map.values
|
39
|
-
end
|
40
|
-
|
41
|
-
# Attribute type mapping.
|
42
|
-
def self.openapi_types
|
43
|
-
{
|
44
|
-
:'id' => :'String',
|
45
|
-
:'source' => :'String',
|
46
|
-
:'body_site' => :'String'
|
47
|
-
}
|
48
|
-
end
|
49
|
-
|
50
|
-
# List of attributes with nullable: true
|
51
|
-
def self.openapi_nullable
|
52
|
-
Set.new([
|
53
|
-
])
|
54
|
-
end
|
55
|
-
|
56
|
-
# Initializes the object
|
57
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
58
|
-
def initialize(attributes = {})
|
59
|
-
if (!attributes.is_a?(Hash))
|
60
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `PrimaryConnectClient::OrderOrderSpecimen` initialize method"
|
61
|
-
end
|
62
|
-
|
63
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
64
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
65
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
66
|
-
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
|
67
|
-
end
|
68
|
-
h[k.to_sym] = v
|
69
|
-
}
|
70
|
-
|
71
|
-
if attributes.key?(:'id')
|
72
|
-
self.id = attributes[:'id']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.key?(:'source')
|
76
|
-
self.source = attributes[:'source']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.key?(:'body_site')
|
80
|
-
self.body_site = attributes[:'body_site']
|
81
|
-
end
|
82
|
-
end
|
83
|
-
|
84
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
85
|
-
# @return Array for valid properties with the reasons
|
86
|
-
def list_invalid_properties
|
87
|
-
invalid_properties = Array.new
|
88
|
-
invalid_properties
|
89
|
-
end
|
90
|
-
|
91
|
-
# Check to see if the all the properties in the model are valid
|
92
|
-
# @return true if the model is valid
|
93
|
-
def valid?
|
94
|
-
true
|
95
|
-
end
|
96
|
-
|
97
|
-
# Checks equality by comparing each attribute.
|
98
|
-
# @param [Object] Object to be compared
|
99
|
-
def ==(o)
|
100
|
-
return true if self.equal?(o)
|
101
|
-
self.class == o.class &&
|
102
|
-
id == o.id &&
|
103
|
-
source == o.source &&
|
104
|
-
body_site == o.body_site
|
105
|
-
end
|
106
|
-
|
107
|
-
# @see the `==` method
|
108
|
-
# @param [Object] Object to be compared
|
109
|
-
def eql?(o)
|
110
|
-
self == o
|
111
|
-
end
|
112
|
-
|
113
|
-
# Calculates hash code according to all attributes.
|
114
|
-
# @return [Integer] Hash code
|
115
|
-
def hash
|
116
|
-
[id, source, body_site].hash
|
117
|
-
end
|
118
|
-
|
119
|
-
# Builds the object from hash
|
120
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
-
# @return [Object] Returns the model itself
|
122
|
-
def self.build_from_hash(attributes)
|
123
|
-
new.build_from_hash(attributes)
|
124
|
-
end
|
125
|
-
|
126
|
-
# Builds the object from hash
|
127
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
-
# @return [Object] Returns the model itself
|
129
|
-
def build_from_hash(attributes)
|
130
|
-
return nil unless attributes.is_a?(Hash)
|
131
|
-
self.class.openapi_types.each_pair do |key, type|
|
132
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
133
|
-
self.send("#{key}=", nil)
|
134
|
-
elsif type =~ /\AArray<(.*)>/i
|
135
|
-
# check to ensure the input is an array given that the attribute
|
136
|
-
# is documented as an array but the input is not
|
137
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
138
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
139
|
-
end
|
140
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
141
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
142
|
-
end
|
143
|
-
end
|
144
|
-
|
145
|
-
self
|
146
|
-
end
|
147
|
-
|
148
|
-
# Deserializes the data based on type
|
149
|
-
# @param string type Data type
|
150
|
-
# @param string value Value to be deserialized
|
151
|
-
# @return [Object] Deserialized data
|
152
|
-
def _deserialize(type, value)
|
153
|
-
case type.to_sym
|
154
|
-
when :Time
|
155
|
-
Time.parse(value)
|
156
|
-
when :Date
|
157
|
-
Date.parse(value)
|
158
|
-
when :String
|
159
|
-
value.to_s
|
160
|
-
when :Integer
|
161
|
-
value.to_i
|
162
|
-
when :Float
|
163
|
-
value.to_f
|
164
|
-
when :Boolean
|
165
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
166
|
-
true
|
167
|
-
else
|
168
|
-
false
|
169
|
-
end
|
170
|
-
when :Object
|
171
|
-
# generic object (usually a Hash), return directly
|
172
|
-
value
|
173
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
174
|
-
inner_type = Regexp.last_match[:inner_type]
|
175
|
-
value.map { |v| _deserialize(inner_type, v) }
|
176
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
177
|
-
k_type = Regexp.last_match[:k_type]
|
178
|
-
v_type = Regexp.last_match[:v_type]
|
179
|
-
{}.tap do |hash|
|
180
|
-
value.each do |k, v|
|
181
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
182
|
-
end
|
183
|
-
end
|
184
|
-
else # model
|
185
|
-
# models (e.g. Pet) or oneOf
|
186
|
-
klass = PrimaryConnectClient.const_get(type)
|
187
|
-
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
188
|
-
end
|
189
|
-
end
|
190
|
-
|
191
|
-
# Returns the string representation of the object
|
192
|
-
# @return [String] String presentation of the object
|
193
|
-
def to_s
|
194
|
-
to_hash.to_s
|
195
|
-
end
|
196
|
-
|
197
|
-
# to_body is an alias to to_hash (backward compatibility)
|
198
|
-
# @return [Hash] Returns the object in the form of hash
|
199
|
-
def to_body
|
200
|
-
to_hash
|
201
|
-
end
|
202
|
-
|
203
|
-
# Returns the object in the form of hash
|
204
|
-
# @return [Hash] Returns the object in the form of hash
|
205
|
-
def to_hash
|
206
|
-
hash = {}
|
207
|
-
self.class.attribute_map.each_pair do |attr, param|
|
208
|
-
value = self.send(attr)
|
209
|
-
if value.nil?
|
210
|
-
is_nullable = self.class.openapi_nullable.include?(attr)
|
211
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
212
|
-
end
|
213
|
-
|
214
|
-
hash[param] = _to_hash(value)
|
215
|
-
end
|
216
|
-
hash
|
217
|
-
end
|
218
|
-
|
219
|
-
# Outputs non-array value in the form of hash
|
220
|
-
# For object, use to_hash. Otherwise, just return the value
|
221
|
-
# @param [Object] value Any valid value
|
222
|
-
# @return [Hash] Returns the value in the form of hash
|
223
|
-
def _to_hash(value)
|
224
|
-
if value.is_a?(Array)
|
225
|
-
value.compact.map { |v| _to_hash(v) }
|
226
|
-
elsif value.is_a?(Hash)
|
227
|
-
{}.tap do |hash|
|
228
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
-
end
|
230
|
-
elsif value.respond_to? :to_hash
|
231
|
-
value.to_hash
|
232
|
-
else
|
233
|
-
value
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
end
|
238
|
-
|
239
|
-
end
|