primary_connect_client 0.8.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +15 -0
  3. data/README.md +61 -16
  4. data/docs/Address.md +32 -0
  5. data/docs/CodedValue.md +22 -0
  6. data/docs/DefaultApi.md +568 -0
  7. data/docs/Demographics.md +52 -0
  8. data/docs/Error.md +18 -0
  9. data/docs/Event.md +26 -0
  10. data/docs/Events.md +18 -0
  11. data/docs/Identifier.md +20 -0
  12. data/docs/Location.md +26 -0
  13. data/docs/Meta.md +34 -0
  14. data/docs/MetaDestinations.md +22 -0
  15. data/docs/MetaMessage.md +20 -0
  16. data/docs/MetaSource.md +20 -0
  17. data/docs/MetaTransmission.md +18 -0
  18. data/docs/Name.md +22 -0
  19. data/docs/Order.md +24 -0
  20. data/docs/OrderIds.md +18 -0
  21. data/docs/OrderOrder.md +58 -0
  22. data/docs/OrderOrderClinicalInfo.md +26 -0
  23. data/docs/OrderOrderDiagnoses.md +22 -0
  24. data/docs/OrderOrderOrderingFacility.md +22 -0
  25. data/docs/OrderOrderSpecimen.md +22 -0
  26. data/docs/OrderWithEventErrors.md +20 -0
  27. data/docs/Orders.md +18 -0
  28. data/docs/OrdersOrders.md +22 -0
  29. data/docs/Patient.md +24 -0
  30. data/docs/PatientContacts.md +28 -0
  31. data/docs/PatientDemographics.md +52 -0
  32. data/docs/PhoneNumber.md +20 -0
  33. data/docs/Provider.md +32 -0
  34. data/docs/Result.md +52 -0
  35. data/docs/ResultIds.md +18 -0
  36. data/docs/ResultReferenceRange.md +22 -0
  37. data/docs/ResultReport.md +22 -0
  38. data/docs/ResultSpecimen.md +22 -0
  39. data/docs/Results.md +20 -0
  40. data/docs/Specimen.md +22 -0
  41. data/docs/Visit.md +36 -0
  42. data/docs/VisitCompany.md +24 -0
  43. data/docs/VisitGuarantor.md +40 -0
  44. data/docs/VisitGuarantorEmployer.md +22 -0
  45. data/docs/VisitInsurances.md +40 -0
  46. data/docs/VisitInsured.md +30 -0
  47. data/docs/VisitPlan.md +22 -0
  48. data/git_push.sh +5 -6
  49. data/lib/primary_connect_client/api/default_api.rb +143 -67
  50. data/lib/primary_connect_client/api_client.rb +5 -6
  51. data/lib/primary_connect_client/api_error.rb +1 -1
  52. data/lib/primary_connect_client/configuration.rb +3 -2
  53. data/lib/primary_connect_client/models/address.rb +281 -0
  54. data/lib/primary_connect_client/models/coded_value.rb +238 -0
  55. data/lib/primary_connect_client/models/demographics.rb +466 -0
  56. data/lib/primary_connect_client/models/error.rb +218 -0
  57. data/lib/primary_connect_client/models/event.rb +254 -0
  58. data/lib/primary_connect_client/models/events.rb +221 -0
  59. data/lib/primary_connect_client/models/identifier.rb +228 -0
  60. data/lib/primary_connect_client/models/location.rb +255 -0
  61. data/lib/primary_connect_client/models/meta.rb +327 -0
  62. data/lib/primary_connect_client/models/meta_destinations.rb +242 -0
  63. data/lib/primary_connect_client/models/meta_message.rb +227 -0
  64. data/lib/primary_connect_client/models/meta_source.rb +227 -0
  65. data/lib/primary_connect_client/models/meta_transmission.rb +218 -0
  66. data/lib/primary_connect_client/models/name.rb +237 -0
  67. data/lib/primary_connect_client/models/order.rb +245 -0
  68. data/lib/primary_connect_client/models/order_ids.rb +221 -0
  69. data/lib/primary_connect_client/models/order_order.rb +496 -0
  70. data/lib/primary_connect_client/models/order_order_clinical_info.rb +260 -0
  71. data/lib/primary_connect_client/models/order_order_diagnoses.rb +272 -0
  72. data/lib/primary_connect_client/models/order_order_ordering_facility.rb +239 -0
  73. data/lib/primary_connect_client/models/order_order_specimen.rb +239 -0
  74. data/lib/primary_connect_client/models/order_with_event_errors.rb +229 -0
  75. data/lib/primary_connect_client/models/orders.rb +221 -0
  76. data/lib/primary_connect_client/models/orders_orders.rb +236 -0
  77. data/lib/primary_connect_client/models/patient.rb +253 -0
  78. data/lib/primary_connect_client/models/patient_contacts.rb +305 -0
  79. data/lib/primary_connect_client/models/patient_demographics.rb +466 -0
  80. data/lib/primary_connect_client/models/phone_number.rb +262 -0
  81. data/lib/primary_connect_client/models/provider.rb +288 -0
  82. data/lib/primary_connect_client/models/result.rb +443 -0
  83. data/lib/primary_connect_client/models/result_ids.rb +221 -0
  84. data/lib/primary_connect_client/models/result_reference_range.rb +240 -0
  85. data/lib/primary_connect_client/models/result_report.rb +240 -0
  86. data/lib/primary_connect_client/models/result_specimen.rb +239 -0
  87. data/lib/primary_connect_client/models/results.rb +230 -0
  88. data/lib/primary_connect_client/models/specimen.rb +239 -0
  89. data/lib/primary_connect_client/models/visit.rb +306 -0
  90. data/lib/primary_connect_client/models/visit_company.rb +248 -0
  91. data/lib/primary_connect_client/models/visit_guarantor.rb +358 -0
  92. data/lib/primary_connect_client/models/visit_guarantor_employer.rb +238 -0
  93. data/lib/primary_connect_client/models/visit_insurances.rb +386 -0
  94. data/lib/primary_connect_client/models/visit_insured.rb +322 -0
  95. data/lib/primary_connect_client/models/visit_plan.rb +238 -0
  96. data/lib/primary_connect_client/version.rb +12 -2
  97. data/lib/primary_connect_client.rb +45 -3
  98. data/primary_connect_client.gemspec +7 -5
  99. data/spec/api/default_api_spec.rb +44 -41
  100. data/spec/api_client_spec.rb +3 -3
  101. data/spec/configuration_spec.rb +1 -1
  102. data/spec/models/address_spec.rb +76 -0
  103. data/spec/models/coded_value_spec.rb +46 -0
  104. data/spec/models/demographics_spec.rb +168 -0
  105. data/spec/models/error_spec.rb +34 -0
  106. data/spec/models/event_spec.rb +58 -0
  107. data/spec/models/events_spec.rb +34 -0
  108. data/spec/models/identifier_spec.rb +40 -0
  109. data/spec/models/location_spec.rb +58 -0
  110. data/spec/models/meta_destinations_spec.rb +46 -0
  111. data/spec/models/meta_message_spec.rb +40 -0
  112. data/spec/models/meta_source_spec.rb +40 -0
  113. data/spec/models/meta_spec.rb +86 -0
  114. data/spec/models/meta_transmission_spec.rb +34 -0
  115. data/spec/models/name_spec.rb +46 -0
  116. data/spec/models/order_ids_spec.rb +34 -0
  117. data/spec/models/order_order_clinical_info_spec.rb +58 -0
  118. data/spec/models/order_order_diagnoses_spec.rb +50 -0
  119. data/spec/models/order_order_ordering_facility_spec.rb +46 -0
  120. data/spec/models/order_order_spec.rb +170 -0
  121. data/spec/models/order_order_specimen_spec.rb +46 -0
  122. data/spec/models/order_spec.rb +52 -0
  123. data/spec/models/order_with_event_errors_spec.rb +40 -0
  124. data/spec/models/orders_orders_spec.rb +46 -0
  125. data/spec/models/orders_spec.rb +34 -0
  126. data/spec/models/patient_contacts_spec.rb +68 -0
  127. data/spec/models/patient_demographics_spec.rb +168 -0
  128. data/spec/models/patient_spec.rb +52 -0
  129. data/spec/models/phone_number_spec.rb +44 -0
  130. data/spec/models/provider_spec.rb +76 -0
  131. data/spec/models/result_ids_spec.rb +34 -0
  132. data/spec/models/result_reference_range_spec.rb +46 -0
  133. data/spec/models/result_report_spec.rb +46 -0
  134. data/spec/models/result_spec.rb +148 -0
  135. data/spec/models/result_specimen_spec.rb +46 -0
  136. data/spec/models/results_spec.rb +40 -0
  137. data/spec/models/specimen_spec.rb +46 -0
  138. data/spec/models/visit_company_spec.rb +52 -0
  139. data/spec/models/visit_guarantor_employer_spec.rb +46 -0
  140. data/spec/models/visit_guarantor_spec.rb +104 -0
  141. data/spec/models/visit_insurances_spec.rb +112 -0
  142. data/spec/models/visit_insured_spec.rb +78 -0
  143. data/spec/models/visit_plan_spec.rb +46 -0
  144. data/spec/models/visit_spec.rb +88 -0
  145. data/spec/spec_helper.rb +1 -1
  146. metadata +177 -20
  147. data/Gemfile.lock +0 -74
@@ -0,0 +1,221 @@
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 OrderIds
18
+ # List of Order IDs
19
+ attr_accessor :orders
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'orders' => :'orders'
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
+ :'orders' => :'Array<String>'
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::OrderIds` 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::OrderIds`. 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?(:'orders')
62
+ if (value = attributes[:'orders']).is_a?(Array)
63
+ self.orders = value
64
+ end
65
+ end
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properties with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ orders == o.orders
87
+ end
88
+
89
+ # @see the `==` method
90
+ # @param [Object] Object to be compared
91
+ def eql?(o)
92
+ self == o
93
+ end
94
+
95
+ # Calculates hash code according to all attributes.
96
+ # @return [Integer] Hash code
97
+ def hash
98
+ [orders].hash
99
+ end
100
+
101
+ # Builds the object from hash
102
+ # @param [Hash] attributes Model attributes in the form of hash
103
+ # @return [Object] Returns the model itself
104
+ def self.build_from_hash(attributes)
105
+ new.build_from_hash(attributes)
106
+ end
107
+
108
+ # Builds the object from hash
109
+ # @param [Hash] attributes Model attributes in the form of hash
110
+ # @return [Object] Returns the model itself
111
+ def build_from_hash(attributes)
112
+ return nil unless attributes.is_a?(Hash)
113
+ self.class.openapi_types.each_pair do |key, type|
114
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
115
+ self.send("#{key}=", nil)
116
+ elsif type =~ /\AArray<(.*)>/i
117
+ # check to ensure the input is an array given that the attribute
118
+ # is documented as an array but the input is not
119
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
120
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
121
+ end
122
+ elsif !attributes[self.class.attribute_map[key]].nil?
123
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
124
+ end
125
+ end
126
+
127
+ self
128
+ end
129
+
130
+ # Deserializes the data based on type
131
+ # @param string type Data type
132
+ # @param string value Value to be deserialized
133
+ # @return [Object] Deserialized data
134
+ def _deserialize(type, value)
135
+ case type.to_sym
136
+ when :Time
137
+ Time.parse(value)
138
+ when :Date
139
+ Date.parse(value)
140
+ when :String
141
+ value.to_s
142
+ when :Integer
143
+ value.to_i
144
+ when :Float
145
+ value.to_f
146
+ when :Boolean
147
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
148
+ true
149
+ else
150
+ false
151
+ end
152
+ when :Object
153
+ # generic object (usually a Hash), return directly
154
+ value
155
+ when /\AArray<(?<inner_type>.+)>\z/
156
+ inner_type = Regexp.last_match[:inner_type]
157
+ value.map { |v| _deserialize(inner_type, v) }
158
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
159
+ k_type = Regexp.last_match[:k_type]
160
+ v_type = Regexp.last_match[:v_type]
161
+ {}.tap do |hash|
162
+ value.each do |k, v|
163
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
164
+ end
165
+ end
166
+ else # model
167
+ # models (e.g. Pet) or oneOf
168
+ klass = PrimaryConnectClient.const_get(type)
169
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
170
+ end
171
+ end
172
+
173
+ # Returns the string representation of the object
174
+ # @return [String] String presentation of the object
175
+ def to_s
176
+ to_hash.to_s
177
+ end
178
+
179
+ # to_body is an alias to to_hash (backward compatibility)
180
+ # @return [Hash] Returns the object in the form of hash
181
+ def to_body
182
+ to_hash
183
+ end
184
+
185
+ # Returns the object in the form of hash
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_hash
188
+ hash = {}
189
+ self.class.attribute_map.each_pair do |attr, param|
190
+ value = self.send(attr)
191
+ if value.nil?
192
+ is_nullable = self.class.openapi_nullable.include?(attr)
193
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
194
+ end
195
+
196
+ hash[param] = _to_hash(value)
197
+ end
198
+ hash
199
+ end
200
+
201
+ # Outputs non-array value in the form of hash
202
+ # For object, use to_hash. Otherwise, just return the value
203
+ # @param [Object] value Any valid value
204
+ # @return [Hash] Returns the value in the form of hash
205
+ def _to_hash(value)
206
+ if value.is_a?(Array)
207
+ value.compact.map { |v| _to_hash(v) }
208
+ elsif value.is_a?(Hash)
209
+ {}.tap do |hash|
210
+ value.each { |k, v| hash[k] = _to_hash(v) }
211
+ end
212
+ elsif value.respond_to? :to_hash
213
+ value.to_hash
214
+ else
215
+ value
216
+ end
217
+ end
218
+
219
+ end
220
+
221
+ end