primary_connect_client 0.8.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/README.md +74 -20
- data/docs/Address.md +32 -0
- data/docs/CodedValue.md +22 -0
- data/docs/DefaultApi.md +637 -0
- data/docs/Demographics.md +52 -0
- data/docs/Device.md +30 -0
- data/docs/Dosage.md +30 -0
- data/docs/Error.md +18 -0
- data/docs/Event.md +26 -0
- data/docs/Events.md +18 -0
- data/docs/Identifier.md +20 -0
- data/docs/Location.md +28 -0
- data/docs/Medication.md +22 -0
- data/docs/MedicationAdministration.md +32 -0
- data/docs/Meta.md +34 -0
- data/docs/MetaDestinations.md +22 -0
- data/docs/MetaMessage.md +20 -0
- data/docs/MetaSource.md +20 -0
- data/docs/MetaTransmission.md +18 -0
- data/docs/Name.md +22 -0
- data/docs/Order.md +26 -0
- data/docs/OrderIds.md +18 -0
- data/docs/OrderOrder.md +62 -0
- data/docs/OrderOrderClinicalInfo.md +26 -0
- data/docs/OrderOrderDiagnoses.md +22 -0
- data/docs/OrderOrderOrderingFacility.md +22 -0
- data/docs/OrderOrderSpecimen.md +22 -0
- data/docs/OrderWithEventErrors.md +20 -0
- data/docs/Orders.md +18 -0
- data/docs/OrdersOrders.md +22 -0
- data/docs/Patient.md +24 -0
- data/docs/PatientContacts.md +28 -0
- data/docs/PatientDemographics.md +52 -0
- data/docs/PhoneNumber.md +20 -0
- data/docs/Provider.md +32 -0
- data/docs/Result.md +52 -0
- data/docs/ResultIds.md +18 -0
- data/docs/ResultReferenceRange.md +22 -0
- data/docs/ResultReport.md +22 -0
- data/docs/ResultSpecimen.md +22 -0
- data/docs/Results.md +20 -0
- data/docs/Specimen.md +22 -0
- data/docs/Subject.md +49 -0
- data/docs/SubjectOneOf.md +18 -0
- data/docs/SubjectOneOf1.md +18 -0
- data/docs/V2Device.md +30 -0
- data/docs/V2Dosage.md +30 -0
- data/docs/V2Medication.md +22 -0
- data/docs/V2MedicationAdministration.md +32 -0
- data/docs/Visit.md +36 -0
- data/docs/VisitCompany.md +24 -0
- data/docs/VisitGuarantor.md +40 -0
- data/docs/VisitGuarantorEmployer.md +22 -0
- data/docs/VisitInsurances.md +40 -0
- data/docs/VisitInsured.md +30 -0
- data/docs/VisitPlan.md +22 -0
- data/git_push.sh +5 -6
- data/lib/primary_connect_client/api/default_api.rb +207 -67
- data/lib/primary_connect_client/api_client.rb +5 -6
- data/lib/primary_connect_client/api_error.rb +1 -1
- data/lib/primary_connect_client/configuration.rb +3 -2
- data/lib/primary_connect_client/models/address.rb +281 -0
- data/lib/primary_connect_client/models/coded_value.rb +238 -0
- data/lib/primary_connect_client/models/demographics.rb +466 -0
- data/lib/primary_connect_client/models/device.rb +276 -0
- data/lib/primary_connect_client/models/dosage.rb +275 -0
- data/lib/primary_connect_client/models/error.rb +218 -0
- data/lib/primary_connect_client/models/event.rb +254 -0
- data/lib/primary_connect_client/models/events.rb +221 -0
- data/lib/primary_connect_client/models/identifier.rb +228 -0
- data/lib/primary_connect_client/models/location.rb +264 -0
- data/lib/primary_connect_client/models/medication.rb +238 -0
- data/lib/primary_connect_client/models/medication_administration.rb +286 -0
- data/lib/primary_connect_client/models/meta.rb +327 -0
- data/lib/primary_connect_client/models/meta_destinations.rb +242 -0
- data/lib/primary_connect_client/models/meta_message.rb +227 -0
- data/lib/primary_connect_client/models/meta_source.rb +227 -0
- data/lib/primary_connect_client/models/meta_transmission.rb +218 -0
- data/lib/primary_connect_client/models/name.rb +237 -0
- data/lib/primary_connect_client/models/order.rb +255 -0
- data/lib/primary_connect_client/models/order_ids.rb +221 -0
- data/lib/primary_connect_client/models/order_order.rb +518 -0
- data/lib/primary_connect_client/models/order_order_clinical_info.rb +260 -0
- data/lib/primary_connect_client/models/order_order_diagnoses.rb +272 -0
- data/lib/primary_connect_client/models/order_order_ordering_facility.rb +239 -0
- data/lib/primary_connect_client/models/order_order_specimen.rb +239 -0
- data/lib/primary_connect_client/models/order_with_event_errors.rb +229 -0
- data/lib/primary_connect_client/models/orders.rb +221 -0
- data/lib/primary_connect_client/models/orders_orders.rb +236 -0
- data/lib/primary_connect_client/models/patient.rb +253 -0
- data/lib/primary_connect_client/models/patient_contacts.rb +305 -0
- data/lib/primary_connect_client/models/patient_demographics.rb +466 -0
- data/lib/primary_connect_client/models/phone_number.rb +262 -0
- data/lib/primary_connect_client/models/provider.rb +288 -0
- data/lib/primary_connect_client/models/result.rb +443 -0
- data/lib/primary_connect_client/models/result_ids.rb +221 -0
- data/lib/primary_connect_client/models/result_reference_range.rb +240 -0
- data/lib/primary_connect_client/models/result_report.rb +240 -0
- data/lib/primary_connect_client/models/result_specimen.rb +239 -0
- data/lib/primary_connect_client/models/results.rb +230 -0
- data/lib/primary_connect_client/models/specimen.rb +239 -0
- data/lib/primary_connect_client/models/subject.rb +105 -0
- data/lib/primary_connect_client/models/subject_one_of.rb +218 -0
- data/lib/primary_connect_client/models/subject_one_of1.rb +218 -0
- data/lib/primary_connect_client/models/v2_device.rb +276 -0
- data/lib/primary_connect_client/models/v2_dosage.rb +275 -0
- data/lib/primary_connect_client/models/v2_medication.rb +238 -0
- data/lib/primary_connect_client/models/v2_medication_administration.rb +286 -0
- data/lib/primary_connect_client/models/visit.rb +306 -0
- data/lib/primary_connect_client/models/visit_company.rb +248 -0
- data/lib/primary_connect_client/models/visit_guarantor.rb +358 -0
- data/lib/primary_connect_client/models/visit_guarantor_employer.rb +238 -0
- data/lib/primary_connect_client/models/visit_insurances.rb +386 -0
- data/lib/primary_connect_client/models/visit_insured.rb +322 -0
- data/lib/primary_connect_client/models/visit_plan.rb +238 -0
- data/lib/primary_connect_client/version.rb +12 -2
- data/lib/primary_connect_client.rb +56 -3
- data/primary_connect_client.gemspec +8 -5
- data/spec/api/default_api_spec.rb +56 -41
- data/spec/api_client_spec.rb +3 -3
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/address_spec.rb +76 -0
- data/spec/models/coded_value_spec.rb +46 -0
- data/spec/models/demographics_spec.rb +168 -0
- data/spec/models/device_spec.rb +70 -0
- data/spec/models/dosage_spec.rb +70 -0
- data/spec/models/error_spec.rb +34 -0
- data/spec/models/event_spec.rb +58 -0
- data/spec/models/events_spec.rb +34 -0
- data/spec/models/identifier_spec.rb +40 -0
- data/spec/models/location_spec.rb +64 -0
- data/spec/models/medication_administration_spec.rb +76 -0
- data/spec/models/medication_spec.rb +46 -0
- data/spec/models/meta_destinations_spec.rb +46 -0
- data/spec/models/meta_message_spec.rb +40 -0
- data/spec/models/meta_source_spec.rb +40 -0
- data/spec/models/meta_spec.rb +86 -0
- data/spec/models/meta_transmission_spec.rb +34 -0
- data/spec/models/name_spec.rb +46 -0
- data/spec/models/order_ids_spec.rb +34 -0
- data/spec/models/order_order_clinical_info_spec.rb +58 -0
- data/spec/models/order_order_diagnoses_spec.rb +50 -0
- data/spec/models/order_order_ordering_facility_spec.rb +46 -0
- data/spec/models/order_order_spec.rb +182 -0
- data/spec/models/order_order_specimen_spec.rb +46 -0
- data/spec/models/order_spec.rb +58 -0
- data/spec/models/order_with_event_errors_spec.rb +40 -0
- data/spec/models/orders_orders_spec.rb +46 -0
- data/spec/models/orders_spec.rb +34 -0
- data/spec/models/patient_contacts_spec.rb +68 -0
- data/spec/models/patient_demographics_spec.rb +168 -0
- data/spec/models/patient_spec.rb +52 -0
- data/spec/models/phone_number_spec.rb +44 -0
- data/spec/models/provider_spec.rb +76 -0
- data/spec/models/result_ids_spec.rb +34 -0
- data/spec/models/result_reference_range_spec.rb +46 -0
- data/spec/models/result_report_spec.rb +46 -0
- data/spec/models/result_spec.rb +148 -0
- data/spec/models/result_specimen_spec.rb +46 -0
- data/spec/models/results_spec.rb +40 -0
- data/spec/models/specimen_spec.rb +46 -0
- data/spec/models/subject_one_of1_spec.rb +34 -0
- data/spec/models/subject_one_of_spec.rb +34 -0
- data/spec/models/subject_spec.rb +31 -0
- data/spec/models/v2_device_spec.rb +70 -0
- data/spec/models/v2_dosage_spec.rb +70 -0
- data/spec/models/v2_medication_administration_spec.rb +76 -0
- data/spec/models/v2_medication_spec.rb +46 -0
- data/spec/models/visit_company_spec.rb +52 -0
- data/spec/models/visit_guarantor_employer_spec.rb +46 -0
- data/spec/models/visit_guarantor_spec.rb +104 -0
- data/spec/models/visit_insurances_spec.rb +112 -0
- data/spec/models/visit_insured_spec.rb +78 -0
- data/spec/models/visit_plan_spec.rb +46 -0
- data/spec/models/visit_spec.rb +88 -0
- data/spec/spec_helper.rb +1 -1
- metadata +228 -7
- data/Gemfile.lock +0 -74
@@ -0,0 +1,30 @@
|
|
1
|
+
# PrimaryConnectClient::VisitInsured
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **identifiers** | [**Array<Identifier>**](Identifier.md) | | [optional] |
|
8
|
+
| **name** | [**Name**](Name.md) | | [optional] |
|
9
|
+
| **ssn** | **String** | | [optional] |
|
10
|
+
| **relationship** | **String** | | [optional] |
|
11
|
+
| **dob** | **String** | Date of Birth | [optional] |
|
12
|
+
| **sex** | **String** | | [optional] |
|
13
|
+
| **address** | [**Address**](Address.md) | | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'primary_connect_client'
|
19
|
+
|
20
|
+
instance = PrimaryConnectClient::VisitInsured.new(
|
21
|
+
identifiers: null,
|
22
|
+
name: null,
|
23
|
+
ssn: null,
|
24
|
+
relationship: null,
|
25
|
+
dob: 1949-12-26,
|
26
|
+
sex: null,
|
27
|
+
address: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
data/docs/VisitPlan.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# PrimaryConnectClient::VisitPlan
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **identifier** | [**Identifier**](Identifier.md) | | [optional] |
|
8
|
+
| **name** | **String** | Name of insurance plan | [optional] |
|
9
|
+
| **type** | **String** | Type of insurance plan | [optional] |
|
10
|
+
|
11
|
+
## Example
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'primary_connect_client'
|
15
|
+
|
16
|
+
instance = PrimaryConnectClient::VisitPlan.new(
|
17
|
+
identifier: null,
|
18
|
+
name: Insurance Plan name,
|
19
|
+
type: Insurance Plan Type
|
20
|
+
)
|
21
|
+
```
|
22
|
+
|
data/git_push.sh
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/bin/sh
|
2
2
|
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
3
3
|
#
|
4
|
-
# Usage example: /bin/sh ./git_push.sh wing328 openapi-
|
4
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
|
5
5
|
|
6
6
|
git_user_id=$1
|
7
7
|
git_repo_id=$2
|
@@ -14,12 +14,12 @@ if [ "$git_host" = "" ]; then
|
|
14
14
|
fi
|
15
15
|
|
16
16
|
if [ "$git_user_id" = "" ]; then
|
17
|
-
git_user_id="
|
17
|
+
git_user_id="PrimaryDotHealth"
|
18
18
|
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
19
19
|
fi
|
20
20
|
|
21
21
|
if [ "$git_repo_id" = "" ]; then
|
22
|
-
git_repo_id="
|
22
|
+
git_repo_id="connect-ruby-client"
|
23
23
|
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
24
24
|
fi
|
25
25
|
|
@@ -38,14 +38,14 @@ git add .
|
|
38
38
|
git commit -m "$release_note"
|
39
39
|
|
40
40
|
# Sets the new remote
|
41
|
-
git_remote
|
41
|
+
git_remote=$(git remote)
|
42
42
|
if [ "$git_remote" = "" ]; then # git remote not defined
|
43
43
|
|
44
44
|
if [ "$GIT_TOKEN" = "" ]; then
|
45
45
|
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
46
46
|
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
|
47
47
|
else
|
48
|
-
git remote add origin https://${git_user_id}
|
48
|
+
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
|
49
49
|
fi
|
50
50
|
|
51
51
|
fi
|
@@ -55,4 +55,3 @@ git pull origin master
|
|
55
55
|
# Pushes (Forces) the changes in the local repository up to the remote repository
|
56
56
|
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
|
57
57
|
git push origin master 2>&1 | grep -v 'To https'
|
58
|
-
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.3.0
|
9
|
+
OpenAPI Generator version: 5.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -19,10 +19,71 @@ module PrimaryConnectClient
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
20
20
|
@api_client = api_client
|
21
21
|
end
|
22
|
+
# cancel order
|
23
|
+
# @param id [String] Order ID
|
24
|
+
# @param [Hash] opts the optional parameters
|
25
|
+
# @return [nil]
|
26
|
+
def cancel_order(id, opts = {})
|
27
|
+
cancel_order_with_http_info(id, opts)
|
28
|
+
nil
|
29
|
+
end
|
30
|
+
|
31
|
+
# cancel order
|
32
|
+
# @param id [String] Order ID
|
33
|
+
# @param [Hash] opts the optional parameters
|
34
|
+
# @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
|
35
|
+
def cancel_order_with_http_info(id, opts = {})
|
36
|
+
if @api_client.config.debugging
|
37
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.cancel_order ...'
|
38
|
+
end
|
39
|
+
# verify the required parameter 'id' is set
|
40
|
+
if @api_client.config.client_side_validation && id.nil?
|
41
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.cancel_order"
|
42
|
+
end
|
43
|
+
# resource path
|
44
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
45
|
+
|
46
|
+
# query parameters
|
47
|
+
query_params = opts[:query_params] || {}
|
48
|
+
|
49
|
+
# header parameters
|
50
|
+
header_params = opts[:header_params] || {}
|
51
|
+
# HTTP header 'Accept' (if needed)
|
52
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
53
|
+
|
54
|
+
# form parameters
|
55
|
+
form_params = opts[:form_params] || {}
|
56
|
+
|
57
|
+
# http body (model)
|
58
|
+
post_body = opts[:debug_body]
|
59
|
+
|
60
|
+
# return_type
|
61
|
+
return_type = opts[:debug_return_type]
|
62
|
+
|
63
|
+
# auth_names
|
64
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
65
|
+
|
66
|
+
new_options = opts.merge(
|
67
|
+
:operation => :"DefaultApi.cancel_order",
|
68
|
+
:header_params => header_params,
|
69
|
+
:query_params => query_params,
|
70
|
+
:form_params => form_params,
|
71
|
+
:body => post_body,
|
72
|
+
:auth_names => auth_names,
|
73
|
+
:return_type => return_type
|
74
|
+
)
|
75
|
+
|
76
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
77
|
+
if @api_client.config.debugging
|
78
|
+
@api_client.config.logger.debug "API called: DefaultApi#cancel_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
79
|
+
end
|
80
|
+
return data, status_code, headers
|
81
|
+
end
|
82
|
+
|
22
83
|
# create order
|
23
84
|
# @param [Hash] opts the optional parameters
|
24
85
|
# @option opts [Order] :order
|
25
|
-
# @return [
|
86
|
+
# @return [OrderIds]
|
26
87
|
def create_order(opts = {})
|
27
88
|
data, _status_code, _headers = create_order_with_http_info(opts)
|
28
89
|
data
|
@@ -31,7 +92,7 @@ module PrimaryConnectClient
|
|
31
92
|
# create order
|
32
93
|
# @param [Hash] opts the optional parameters
|
33
94
|
# @option opts [Order] :order
|
34
|
-
# @return [Array<(
|
95
|
+
# @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
|
35
96
|
def create_order_with_http_info(opts = {})
|
36
97
|
if @api_client.config.debugging
|
37
98
|
@api_client.config.logger.debug 'Calling API: DefaultApi.create_order ...'
|
@@ -47,7 +108,10 @@ module PrimaryConnectClient
|
|
47
108
|
# HTTP header 'Accept' (if needed)
|
48
109
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
49
110
|
# HTTP header 'Content-Type'
|
50
|
-
|
111
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
112
|
+
if !content_type.nil?
|
113
|
+
header_params['Content-Type'] = content_type
|
114
|
+
end
|
51
115
|
|
52
116
|
# form parameters
|
53
117
|
form_params = opts[:form_params] || {}
|
@@ -56,7 +120,7 @@ module PrimaryConnectClient
|
|
56
120
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
|
57
121
|
|
58
122
|
# return_type
|
59
|
-
return_type = opts[:debug_return_type] || '
|
123
|
+
return_type = opts[:debug_return_type] || 'OrderIds'
|
60
124
|
|
61
125
|
# auth_names
|
62
126
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -78,29 +142,31 @@ module PrimaryConnectClient
|
|
78
142
|
return data, status_code, headers
|
79
143
|
end
|
80
144
|
|
81
|
-
#
|
82
|
-
# @param
|
145
|
+
# create result
|
146
|
+
# @param order_id [String] Order id
|
83
147
|
# @param [Hash] opts the optional parameters
|
84
|
-
# @
|
85
|
-
|
86
|
-
|
148
|
+
# @option opts [Results] :results
|
149
|
+
# @return [ResultIds]
|
150
|
+
def create_result(order_id, opts = {})
|
151
|
+
data, _status_code, _headers = create_result_with_http_info(order_id, opts)
|
87
152
|
data
|
88
153
|
end
|
89
154
|
|
90
|
-
#
|
91
|
-
# @param
|
155
|
+
# create result
|
156
|
+
# @param order_id [String] Order id
|
92
157
|
# @param [Hash] opts the optional parameters
|
93
|
-
# @
|
94
|
-
|
158
|
+
# @option opts [Results] :results
|
159
|
+
# @return [Array<(ResultIds, Integer, Hash)>] ResultIds data, response status code and response headers
|
160
|
+
def create_result_with_http_info(order_id, opts = {})
|
95
161
|
if @api_client.config.debugging
|
96
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
162
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.create_result ...'
|
97
163
|
end
|
98
|
-
# verify the required parameter '
|
99
|
-
if @api_client.config.client_side_validation &&
|
100
|
-
fail ArgumentError, "Missing the required parameter '
|
164
|
+
# verify the required parameter 'order_id' is set
|
165
|
+
if @api_client.config.client_side_validation && order_id.nil?
|
166
|
+
fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.create_result"
|
101
167
|
end
|
102
168
|
# resource path
|
103
|
-
local_var_path = '/api/v1/orders/{
|
169
|
+
local_var_path = '/api/v1/orders/{order_id}/results'.sub('{' + 'order_id' + '}', CGI.escape(order_id.to_s))
|
104
170
|
|
105
171
|
# query parameters
|
106
172
|
query_params = opts[:query_params] || {}
|
@@ -109,21 +175,26 @@ module PrimaryConnectClient
|
|
109
175
|
header_params = opts[:header_params] || {}
|
110
176
|
# HTTP header 'Accept' (if needed)
|
111
177
|
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
178
|
+
# HTTP header 'Content-Type'
|
179
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
180
|
+
if !content_type.nil?
|
181
|
+
header_params['Content-Type'] = content_type
|
182
|
+
end
|
112
183
|
|
113
184
|
# form parameters
|
114
185
|
form_params = opts[:form_params] || {}
|
115
186
|
|
116
187
|
# http body (model)
|
117
|
-
post_body = opts[:debug_body]
|
188
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'results'])
|
118
189
|
|
119
190
|
# return_type
|
120
|
-
return_type = opts[:debug_return_type] || '
|
191
|
+
return_type = opts[:debug_return_type] || 'ResultIds'
|
121
192
|
|
122
193
|
# auth_names
|
123
194
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
124
195
|
|
125
196
|
new_options = opts.merge(
|
126
|
-
:operation => :"DefaultApi.
|
197
|
+
:operation => :"DefaultApi.create_result",
|
127
198
|
:header_params => header_params,
|
128
199
|
:query_params => query_params,
|
129
200
|
:form_params => form_params,
|
@@ -132,9 +203,9 @@ module PrimaryConnectClient
|
|
132
203
|
:return_type => return_type
|
133
204
|
)
|
134
205
|
|
135
|
-
data, status_code, headers = @api_client.call_api(:
|
206
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
136
207
|
if @api_client.config.debugging
|
137
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
208
|
+
@api_client.config.logger.debug "API called: DefaultApi#create_result\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
138
209
|
end
|
139
210
|
return data, status_code, headers
|
140
211
|
end
|
@@ -142,9 +213,10 @@ module PrimaryConnectClient
|
|
142
213
|
# show lab report
|
143
214
|
# @param result_id [String] Result id
|
144
215
|
# @param [Hash] opts the optional parameters
|
145
|
-
# @return
|
216
|
+
# @return [nil]
|
146
217
|
def get_lab_report(result_id, opts = {})
|
147
218
|
get_lab_report_with_http_info(result_id, opts)
|
219
|
+
nil
|
148
220
|
end
|
149
221
|
|
150
222
|
# show lab report
|
@@ -167,6 +239,8 @@ module PrimaryConnectClient
|
|
167
239
|
|
168
240
|
# header parameters
|
169
241
|
header_params = opts[:header_params] || {}
|
242
|
+
# HTTP header 'Accept' (if needed)
|
243
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
170
244
|
|
171
245
|
# form parameters
|
172
246
|
form_params = opts[:form_params] || {}
|
@@ -175,7 +249,7 @@ module PrimaryConnectClient
|
|
175
249
|
post_body = opts[:debug_body]
|
176
250
|
|
177
251
|
# return_type
|
178
|
-
return_type = opts[:debug_return_type]
|
252
|
+
return_type = opts[:debug_return_type]
|
179
253
|
|
180
254
|
# auth_names
|
181
255
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -190,49 +264,44 @@ module PrimaryConnectClient
|
|
190
264
|
:return_type => return_type
|
191
265
|
)
|
192
266
|
|
193
|
-
# SS: Previously generated as nil so nothing was returned. Added below to get the lab report
|
194
267
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
195
268
|
if @api_client.config.debugging
|
196
269
|
@api_client.config.logger.debug "API called: DefaultApi#get_lab_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
197
270
|
end
|
198
|
-
return data
|
271
|
+
return data, status_code, headers
|
199
272
|
end
|
200
273
|
|
201
|
-
# show
|
202
|
-
# @param
|
203
|
-
# @param id [String] Result id
|
274
|
+
# show order
|
275
|
+
# @param id [String] Order ID
|
204
276
|
# @param [Hash] opts the optional parameters
|
205
|
-
# @return [
|
206
|
-
def
|
207
|
-
|
208
|
-
|
277
|
+
# @return [OrderWithEventErrors]
|
278
|
+
def get_order(id, opts = {})
|
279
|
+
data, _status_code, _headers = get_order_with_http_info(id, opts)
|
280
|
+
data
|
209
281
|
end
|
210
282
|
|
211
|
-
# show
|
212
|
-
# @param
|
213
|
-
# @param id [String] Result id
|
283
|
+
# show order
|
284
|
+
# @param id [String] Order ID
|
214
285
|
# @param [Hash] opts the optional parameters
|
215
|
-
# @return [Array<(
|
216
|
-
def
|
286
|
+
# @return [Array<(OrderWithEventErrors, Integer, Hash)>] OrderWithEventErrors data, response status code and response headers
|
287
|
+
def get_order_with_http_info(id, opts = {})
|
217
288
|
if @api_client.config.debugging
|
218
|
-
@api_client.config.logger.debug 'Calling API: DefaultApi.
|
219
|
-
end
|
220
|
-
# verify the required parameter 'order_id' is set
|
221
|
-
if @api_client.config.client_side_validation && order_id.nil?
|
222
|
-
fail ArgumentError, "Missing the required parameter 'order_id' when calling DefaultApi.get_result"
|
289
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.get_order ...'
|
223
290
|
end
|
224
291
|
# verify the required parameter 'id' is set
|
225
292
|
if @api_client.config.client_side_validation && id.nil?
|
226
|
-
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.
|
293
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.get_order"
|
227
294
|
end
|
228
295
|
# resource path
|
229
|
-
local_var_path = '/api/v1/orders/{
|
296
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
230
297
|
|
231
298
|
# query parameters
|
232
299
|
query_params = opts[:query_params] || {}
|
233
300
|
|
234
301
|
# header parameters
|
235
302
|
header_params = opts[:header_params] || {}
|
303
|
+
# HTTP header 'Accept' (if needed)
|
304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
236
305
|
|
237
306
|
# form parameters
|
238
307
|
form_params = opts[:form_params] || {}
|
@@ -241,13 +310,13 @@ module PrimaryConnectClient
|
|
241
310
|
post_body = opts[:debug_body]
|
242
311
|
|
243
312
|
# return_type
|
244
|
-
return_type = opts[:debug_return_type]
|
313
|
+
return_type = opts[:debug_return_type] || 'OrderWithEventErrors'
|
245
314
|
|
246
315
|
# auth_names
|
247
316
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
248
317
|
|
249
318
|
new_options = opts.merge(
|
250
|
-
:operation => :"DefaultApi.
|
319
|
+
:operation => :"DefaultApi.get_order",
|
251
320
|
:header_params => header_params,
|
252
321
|
:query_params => query_params,
|
253
322
|
:form_params => form_params,
|
@@ -258,16 +327,16 @@ module PrimaryConnectClient
|
|
258
327
|
|
259
328
|
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
260
329
|
if @api_client.config.debugging
|
261
|
-
@api_client.config.logger.debug "API called: DefaultApi#
|
330
|
+
@api_client.config.logger.debug "API called: DefaultApi#get_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
262
331
|
end
|
263
332
|
return data, status_code, headers
|
264
333
|
end
|
265
334
|
|
266
335
|
# list events
|
267
336
|
# @param [Hash] opts the optional parameters
|
268
|
-
# @option opts [String] :last_event_id Paginate events with event id
|
269
|
-
# @option opts [String] :event_types Filter event_types, comma delimited
|
270
|
-
# @return [
|
337
|
+
# @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
|
338
|
+
# @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
|
339
|
+
# @return [Events]
|
271
340
|
def list_events(opts = {})
|
272
341
|
data, _status_code, _headers = list_events_with_http_info(opts)
|
273
342
|
data
|
@@ -275,9 +344,9 @@ module PrimaryConnectClient
|
|
275
344
|
|
276
345
|
# list events
|
277
346
|
# @param [Hash] opts the optional parameters
|
278
|
-
# @option opts [String] :last_event_id Paginate events with event id
|
279
|
-
# @option opts [String] :event_types Filter event_types, comma delimited
|
280
|
-
# @return [Array<(
|
347
|
+
# @option opts [String] :last_event_id Paginate events with event id. 26 character, sortable id.
|
348
|
+
# @option opts [String] :event_types Filter event_types, comma delimited. [OrderComplete, OrderCreated, OrderError, OrderResulted, OrderUpdated, ResultError, SpecimenReceived]
|
349
|
+
# @return [Array<(Events, Integer, Hash)>] Events data, response status code and response headers
|
281
350
|
def list_events_with_http_info(opts = {})
|
282
351
|
if @api_client.config.debugging
|
283
352
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_events ...'
|
@@ -302,7 +371,7 @@ module PrimaryConnectClient
|
|
302
371
|
post_body = opts[:debug_body]
|
303
372
|
|
304
373
|
# return_type
|
305
|
-
return_type = opts[:debug_return_type] || '
|
374
|
+
return_type = opts[:debug_return_type] || 'Events'
|
306
375
|
|
307
376
|
# auth_names
|
308
377
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -326,9 +395,10 @@ module PrimaryConnectClient
|
|
326
395
|
|
327
396
|
# list orders
|
328
397
|
# @param [Hash] opts the optional parameters
|
329
|
-
# @option opts [String] :last_order_id Paginate orders with order id
|
330
|
-
# @option opts [String] :state Filter orders by state, comma delimited
|
331
|
-
# @
|
398
|
+
# @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
|
399
|
+
# @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
|
400
|
+
# @option opts [String] :specimen_id Find an order by specimen/accession id. If found, will redirect to show order endpoint.
|
401
|
+
# @return [Orders]
|
332
402
|
def list_orders(opts = {})
|
333
403
|
data, _status_code, _headers = list_orders_with_http_info(opts)
|
334
404
|
data
|
@@ -336,9 +406,10 @@ module PrimaryConnectClient
|
|
336
406
|
|
337
407
|
# list orders
|
338
408
|
# @param [Hash] opts the optional parameters
|
339
|
-
# @option opts [String] :last_order_id Paginate orders with order id
|
340
|
-
# @option opts [String] :state Filter orders by state, comma delimited
|
341
|
-
# @
|
409
|
+
# @option opts [String] :last_order_id Paginate orders with order id. 26 character, sortable id.
|
410
|
+
# @option opts [String] :state Filter orders by state, comma delimited.[new, updated, delivered, processing, resulted, errored, canceled, unprocessable]
|
411
|
+
# @option opts [String] :specimen_id Find an order by specimen/accession id. If found, will redirect to show order endpoint.
|
412
|
+
# @return [Array<(Orders, Integer, Hash)>] Orders data, response status code and response headers
|
342
413
|
def list_orders_with_http_info(opts = {})
|
343
414
|
if @api_client.config.debugging
|
344
415
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_orders ...'
|
@@ -350,6 +421,7 @@ module PrimaryConnectClient
|
|
350
421
|
query_params = opts[:query_params] || {}
|
351
422
|
query_params[:'last_order_id'] = opts[:'last_order_id'] if !opts[:'last_order_id'].nil?
|
352
423
|
query_params[:'state'] = opts[:'state'] if !opts[:'state'].nil?
|
424
|
+
query_params[:'specimen_id'] = opts[:'specimen_id'] if !opts[:'specimen_id'].nil?
|
353
425
|
|
354
426
|
# header parameters
|
355
427
|
header_params = opts[:header_params] || {}
|
@@ -363,7 +435,7 @@ module PrimaryConnectClient
|
|
363
435
|
post_body = opts[:debug_body]
|
364
436
|
|
365
437
|
# return_type
|
366
|
-
return_type = opts[:debug_return_type] || '
|
438
|
+
return_type = opts[:debug_return_type] || 'Orders'
|
367
439
|
|
368
440
|
# auth_names
|
369
441
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -388,7 +460,7 @@ module PrimaryConnectClient
|
|
388
460
|
# list results
|
389
461
|
# @param order_id [String] Order id
|
390
462
|
# @param [Hash] opts the optional parameters
|
391
|
-
# @return [
|
463
|
+
# @return [Results]
|
392
464
|
def list_results(order_id, opts = {})
|
393
465
|
data, _status_code, _headers = list_results_with_http_info(order_id, opts)
|
394
466
|
data
|
@@ -397,7 +469,7 @@ module PrimaryConnectClient
|
|
397
469
|
# list results
|
398
470
|
# @param order_id [String] Order id
|
399
471
|
# @param [Hash] opts the optional parameters
|
400
|
-
# @return [Array<(
|
472
|
+
# @return [Array<(Results, Integer, Hash)>] Results data, response status code and response headers
|
401
473
|
def list_results_with_http_info(order_id, opts = {})
|
402
474
|
if @api_client.config.debugging
|
403
475
|
@api_client.config.logger.debug 'Calling API: DefaultApi.list_results ...'
|
@@ -424,7 +496,7 @@ module PrimaryConnectClient
|
|
424
496
|
post_body = opts[:debug_body]
|
425
497
|
|
426
498
|
# return_type
|
427
|
-
return_type = opts[:debug_return_type] || '
|
499
|
+
return_type = opts[:debug_return_type] || 'Results'
|
428
500
|
|
429
501
|
# auth_names
|
430
502
|
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
@@ -445,5 +517,73 @@ module PrimaryConnectClient
|
|
445
517
|
end
|
446
518
|
return data, status_code, headers
|
447
519
|
end
|
520
|
+
|
521
|
+
# update order
|
522
|
+
# @param id [String] Order ID
|
523
|
+
# @param [Hash] opts the optional parameters
|
524
|
+
# @option opts [Order] :order
|
525
|
+
# @return [OrderIds]
|
526
|
+
def update_order(id, opts = {})
|
527
|
+
data, _status_code, _headers = update_order_with_http_info(id, opts)
|
528
|
+
data
|
529
|
+
end
|
530
|
+
|
531
|
+
# update order
|
532
|
+
# @param id [String] Order ID
|
533
|
+
# @param [Hash] opts the optional parameters
|
534
|
+
# @option opts [Order] :order
|
535
|
+
# @return [Array<(OrderIds, Integer, Hash)>] OrderIds data, response status code and response headers
|
536
|
+
def update_order_with_http_info(id, opts = {})
|
537
|
+
if @api_client.config.debugging
|
538
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.update_order ...'
|
539
|
+
end
|
540
|
+
# verify the required parameter 'id' is set
|
541
|
+
if @api_client.config.client_side_validation && id.nil?
|
542
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling DefaultApi.update_order"
|
543
|
+
end
|
544
|
+
# resource path
|
545
|
+
local_var_path = '/api/v1/orders/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
546
|
+
|
547
|
+
# query parameters
|
548
|
+
query_params = opts[:query_params] || {}
|
549
|
+
|
550
|
+
# header parameters
|
551
|
+
header_params = opts[:header_params] || {}
|
552
|
+
# HTTP header 'Accept' (if needed)
|
553
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
554
|
+
# HTTP header 'Content-Type'
|
555
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
556
|
+
if !content_type.nil?
|
557
|
+
header_params['Content-Type'] = content_type
|
558
|
+
end
|
559
|
+
|
560
|
+
# form parameters
|
561
|
+
form_params = opts[:form_params] || {}
|
562
|
+
|
563
|
+
# http body (model)
|
564
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'order'])
|
565
|
+
|
566
|
+
# return_type
|
567
|
+
return_type = opts[:debug_return_type] || 'OrderIds'
|
568
|
+
|
569
|
+
# auth_names
|
570
|
+
auth_names = opts[:debug_auth_names] || ['bearer_auth']
|
571
|
+
|
572
|
+
new_options = opts.merge(
|
573
|
+
:operation => :"DefaultApi.update_order",
|
574
|
+
:header_params => header_params,
|
575
|
+
:query_params => query_params,
|
576
|
+
:form_params => form_params,
|
577
|
+
:body => post_body,
|
578
|
+
:auth_names => auth_names,
|
579
|
+
:return_type => return_type
|
580
|
+
)
|
581
|
+
|
582
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
583
|
+
if @api_client.config.debugging
|
584
|
+
@api_client.config.logger.debug "API called: DefaultApi#update_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
585
|
+
end
|
586
|
+
return data, status_code, headers
|
587
|
+
end
|
448
588
|
end
|
449
589
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -109,8 +109,7 @@ module PrimaryConnectClient
|
|
109
109
|
:ssl_verifyhost => _verify_ssl_host,
|
110
110
|
:sslcert => @config.cert_file,
|
111
111
|
:sslkey => @config.key_file,
|
112
|
-
:verbose => @config.debugging
|
113
|
-
:followlocation => true # SS: Added to follow redirects
|
112
|
+
:verbose => @config.debugging
|
114
113
|
}
|
115
114
|
|
116
115
|
# set custom cert, if provided
|
@@ -297,7 +296,7 @@ module PrimaryConnectClient
|
|
297
296
|
@config.base_url(opts[:operation]) + path
|
298
297
|
end
|
299
298
|
|
300
|
-
# Update
|
299
|
+
# Update header and query params based on authentication settings.
|
301
300
|
#
|
302
301
|
# @param [Hash] header_params Header parameters
|
303
302
|
# @param [Hash] query_params Query parameters
|
@@ -336,8 +335,8 @@ module PrimaryConnectClient
|
|
336
335
|
# @param [Array] content_types array for Content-Type
|
337
336
|
# @return [String] the Content-Type header (e.g. application/json)
|
338
337
|
def select_header_content_type(content_types)
|
339
|
-
#
|
340
|
-
return
|
338
|
+
# return nil by default
|
339
|
+
return if content_types.nil? || content_types.empty?
|
341
340
|
# use JSON when present, otherwise use the first one
|
342
341
|
json_content_type = content_types.find { |s| json_mime?(s) }
|
343
342
|
json_content_type || content_types.first
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v1
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 5.
|
9
|
+
OpenAPI Generator version: 5.3.0
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -147,13 +147,13 @@ module PrimaryConnectClient
|
|
147
147
|
@server_operation_variables = {}
|
148
148
|
@api_key = {}
|
149
149
|
@api_key_prefix = {}
|
150
|
-
@timeout = 0
|
151
150
|
@client_side_validation = true
|
152
151
|
@verify_ssl = true
|
153
152
|
@verify_ssl_host = true
|
154
153
|
@params_encoding = nil
|
155
154
|
@cert_file = nil
|
156
155
|
@key_file = nil
|
156
|
+
@timeout = 0
|
157
157
|
@debugging = false
|
158
158
|
@inject_format = false
|
159
159
|
@force_ending_format = false
|
@@ -289,5 +289,6 @@ module PrimaryConnectClient
|
|
289
289
|
|
290
290
|
url
|
291
291
|
end
|
292
|
+
|
292
293
|
end
|
293
294
|
end
|