casemanager_client 0.0.5
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 +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +79 -0
- data/README.md +111 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/casemanager_client.gemspec +45 -0
- data/docs/CaseItem.md +10 -0
- data/docs/CaseWithPatient.md +12 -0
- data/docs/DefaultApi.md +238 -0
- data/docs/Error.md +9 -0
- data/docs/ModelCase.md +11 -0
- data/docs/Patient.md +14 -0
- data/docs/PatientWithCases.md +15 -0
- data/docs/Patients.md +8 -0
- data/docs/Workflow.md +9 -0
- data/docs/WorkflowTask.md +14 -0
- data/gen.sh +3 -0
- data/git_push.sh +55 -0
- data/lib/casemanager_client.rb +48 -0
- data/lib/casemanager_client/api/default_api.rb +301 -0
- data/lib/casemanager_client/api_client.rb +390 -0
- data/lib/casemanager_client/api_error.rb +38 -0
- data/lib/casemanager_client/configuration.rb +259 -0
- data/lib/casemanager_client/models/case_item.rb +250 -0
- data/lib/casemanager_client/models/case_with_patient.rb +236 -0
- data/lib/casemanager_client/models/error.rb +202 -0
- data/lib/casemanager_client/models/model_case.rb +222 -0
- data/lib/casemanager_client/models/patient.rb +242 -0
- data/lib/casemanager_client/models/patient_with_cases.rb +258 -0
- data/lib/casemanager_client/models/patients.rb +190 -0
- data/lib/casemanager_client/models/workflow.rb +204 -0
- data/lib/casemanager_client/models/workflow_task.rb +272 -0
- data/lib/casemanager_client/version.rb +15 -0
- data/pkg/casemanager_client-0.0.5.gem +0 -0
- data/spec/api/default_api_spec.rb +60 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/case_item_spec.rb +53 -0
- data/spec/models/case_with_patient_spec.rb +59 -0
- data/spec/models/error_spec.rb +47 -0
- data/spec/models/model_case_spec.rb +53 -0
- data/spec/models/patient_spec.rb +53 -0
- data/spec/models/patient_with_cases_spec.rb +59 -0
- data/spec/models/workflow_spec.rb +47 -0
- data/spec/models/workflow_task_spec.rb +77 -0
- data/spec/spec_helper.rb +111 -0
- metadata +283 -0
data/docs/Error.md
ADDED
data/docs/ModelCase.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# CasemanagerClient::ModelCase
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**key** | **String** | |
|
|
7
|
+
**items** | [**Array<CaseItem>**](CaseItem.md) | |
|
|
8
|
+
**created_at** | **String** | | [optional]
|
|
9
|
+
**workflow** | [**Workflow**](Workflow.md) | | [optional]
|
|
10
|
+
|
|
11
|
+
|
data/docs/Patient.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CasemanagerClient::Patient
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **Integer** | |
|
|
7
|
+
**first_name** | **String** | | [optional]
|
|
8
|
+
**middle_name** | **String** | | [optional]
|
|
9
|
+
**last_name** | **String** | | [optional]
|
|
10
|
+
**gender** | **String** | | [optional]
|
|
11
|
+
**date_of_birth** | **String** | | [optional]
|
|
12
|
+
**zipcode** | **String** | | [optional]
|
|
13
|
+
|
|
14
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# CasemanagerClient::PatientWithCases
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **Integer** | |
|
|
7
|
+
**first_name** | **String** | | [optional]
|
|
8
|
+
**middle_name** | **String** | | [optional]
|
|
9
|
+
**last_name** | **String** | | [optional]
|
|
10
|
+
**gender** | **String** | | [optional]
|
|
11
|
+
**date_of_birth** | **String** | | [optional]
|
|
12
|
+
**zipcode** | **String** | | [optional]
|
|
13
|
+
**cases** | [**Array<ModelCase>**](ModelCase.md) | |
|
|
14
|
+
|
|
15
|
+
|
data/docs/Patients.md
ADDED
data/docs/Workflow.md
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# CasemanagerClient::WorkflowTask
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
Name | Type | Description | Notes
|
|
5
|
+
------------ | ------------- | ------------- | -------------
|
|
6
|
+
**id** | **Integer** | |
|
|
7
|
+
**name** | **String** | The name of the task. The logical operator tasks \"OR\" is also indicated by the name field. When a task is named \"OR\", the task represents the \"OR\" logical operation for all parent tasks. This means that only one parent task is required to be completed before children tasks may be started. |
|
|
8
|
+
**case_items** | [**Array<CaseItem>**](CaseItem.md) | Attributes of Case Items that are directly related to this workflow task. |
|
|
9
|
+
**parent_ids** | **Array<Integer>** | Other workflow tasks that come immediately before this task in the workflow. No parents IDs indicates this is the first task in a workflow. Workflows can branch and those branches can later rejoin. Multiple parent IDs indicate the rejoining of a branch. When multiple parent IDs are present, it defaults to AND logic. That means all parent task are required to be completed before this task may be started. When a task has a name of \"OR\" and has multiple parent IDs, it is specifying that only one of the parent tasks needs to be completed before children tasks may be started. |
|
|
10
|
+
**key_task** | **BOOLEAN** | Is this task an important task in the workflow? Could be used when generating a visual timeline of the workflow. |
|
|
11
|
+
**started_at** | **DateTime** | When this task was started. If null, the task has not been started. If `started_at` has a value, and `completed_at` does not, the task is currently in progress | [optional]
|
|
12
|
+
**completed_at** | **DateTime** | When this task was completed | [optional]
|
|
13
|
+
|
|
14
|
+
|
data/gen.sh
ADDED
data/git_push.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/sh
|
|
2
|
+
#
|
|
3
|
+
# Generated by: https://openapi-generator.tech
|
|
4
|
+
#
|
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
|
6
|
+
#
|
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
|
8
|
+
|
|
9
|
+
git_user_id=$1
|
|
10
|
+
git_repo_id=$2
|
|
11
|
+
release_note=$3
|
|
12
|
+
|
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
|
14
|
+
git_user_id="GIT_USER_ID"
|
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
|
16
|
+
fi
|
|
17
|
+
|
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
|
21
|
+
fi
|
|
22
|
+
|
|
23
|
+
if [ "$release_note" = "" ]; then
|
|
24
|
+
release_note="Minor update"
|
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
|
26
|
+
fi
|
|
27
|
+
|
|
28
|
+
# Initialize the local directory as a Git repository
|
|
29
|
+
git init
|
|
30
|
+
|
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
|
32
|
+
git add .
|
|
33
|
+
|
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
|
35
|
+
git commit -m "$release_note"
|
|
36
|
+
|
|
37
|
+
# Sets the new remote
|
|
38
|
+
git_remote=`git remote`
|
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
|
40
|
+
|
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
|
44
|
+
else
|
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
git pull origin master
|
|
51
|
+
|
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
|
55
|
+
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SPX: CaseManager
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 3.3.4
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
# Common files
|
|
14
|
+
require 'casemanager_client/api_client'
|
|
15
|
+
require 'casemanager_client/api_error'
|
|
16
|
+
require 'casemanager_client/version'
|
|
17
|
+
require 'casemanager_client/configuration'
|
|
18
|
+
|
|
19
|
+
# Models
|
|
20
|
+
require 'casemanager_client/models/case_item'
|
|
21
|
+
require 'casemanager_client/models/case_with_patient'
|
|
22
|
+
require 'casemanager_client/models/error'
|
|
23
|
+
require 'casemanager_client/models/model_case'
|
|
24
|
+
require 'casemanager_client/models/patient'
|
|
25
|
+
require 'casemanager_client/models/patient_with_cases'
|
|
26
|
+
require 'casemanager_client/models/workflow'
|
|
27
|
+
require 'casemanager_client/models/workflow_task'
|
|
28
|
+
|
|
29
|
+
# APIs
|
|
30
|
+
require 'casemanager_client/api/default_api'
|
|
31
|
+
|
|
32
|
+
module CasemanagerClient
|
|
33
|
+
class << self
|
|
34
|
+
# Customize default settings for the SDK using block.
|
|
35
|
+
# CasemanagerClient.configure do |config|
|
|
36
|
+
# config.username = "xxx"
|
|
37
|
+
# config.password = "xxx"
|
|
38
|
+
# end
|
|
39
|
+
# If no block given, return the default Configuration object.
|
|
40
|
+
def configure
|
|
41
|
+
if block_given?
|
|
42
|
+
yield(Configuration.default)
|
|
43
|
+
else
|
|
44
|
+
Configuration.default
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#SPX: CaseManager
|
|
3
|
+
|
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
5
|
+
|
|
6
|
+
OpenAPI spec version: 1.1.1
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
OpenAPI Generator version: 3.3.4
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'uri'
|
|
14
|
+
|
|
15
|
+
module CasemanagerClient
|
|
16
|
+
class DefaultApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Creates or updates case items
|
|
23
|
+
# @param v Version of the CaseManager API. Required to be `v=root_v1`
|
|
24
|
+
# @param source_type The type of item being updated or created
|
|
25
|
+
# @param source_identifier The ID or key of the item
|
|
26
|
+
# @param [Hash] opts the optional parameters
|
|
27
|
+
# @option opts [String] :case_key If this item is known to belong to a case, the case key can be provided
|
|
28
|
+
# @return [nil]
|
|
29
|
+
def case_items_post(v, source_type, source_identifier, opts = {})
|
|
30
|
+
case_items_post_with_http_info(v, source_type, source_identifier, opts)
|
|
31
|
+
nil
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# Creates or updates case items
|
|
35
|
+
# @param v Version of the CaseManager API. Required to be `v=root_v1`
|
|
36
|
+
# @param source_type The type of item being updated or created
|
|
37
|
+
# @param source_identifier The ID or key of the item
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @option opts [String] :case_key If this item is known to belong to a case, the case key can be provided
|
|
40
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
41
|
+
def case_items_post_with_http_info(v, source_type, source_identifier, opts = {})
|
|
42
|
+
if @api_client.config.debugging
|
|
43
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.case_items_post ...'
|
|
44
|
+
end
|
|
45
|
+
# verify the required parameter 'v' is set
|
|
46
|
+
if @api_client.config.client_side_validation && v.nil?
|
|
47
|
+
fail ArgumentError, "Missing the required parameter 'v' when calling DefaultApi.case_items_post"
|
|
48
|
+
end
|
|
49
|
+
# verify the required parameter 'source_type' is set
|
|
50
|
+
if @api_client.config.client_side_validation && source_type.nil?
|
|
51
|
+
fail ArgumentError, "Missing the required parameter 'source_type' when calling DefaultApi.case_items_post"
|
|
52
|
+
end
|
|
53
|
+
# verify the required parameter 'source_identifier' is set
|
|
54
|
+
if @api_client.config.client_side_validation && source_identifier.nil?
|
|
55
|
+
fail ArgumentError, "Missing the required parameter 'source_identifier' when calling DefaultApi.case_items_post"
|
|
56
|
+
end
|
|
57
|
+
# resource path
|
|
58
|
+
local_var_path = '/case_items'
|
|
59
|
+
|
|
60
|
+
# query parameters
|
|
61
|
+
query_params = {}
|
|
62
|
+
query_params[:'v'] = v
|
|
63
|
+
query_params[:'source_type'] = source_type
|
|
64
|
+
query_params[:'source_identifier'] = source_identifier
|
|
65
|
+
query_params[:'case_key'] = opts[:'case_key'] if !opts[:'case_key'].nil?
|
|
66
|
+
|
|
67
|
+
# header parameters
|
|
68
|
+
header_params = {}
|
|
69
|
+
|
|
70
|
+
# form parameters
|
|
71
|
+
form_params = {}
|
|
72
|
+
|
|
73
|
+
# http body (model)
|
|
74
|
+
post_body = nil
|
|
75
|
+
auth_names = ['basicAuth']
|
|
76
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
77
|
+
:header_params => header_params,
|
|
78
|
+
:query_params => query_params,
|
|
79
|
+
:form_params => form_params,
|
|
80
|
+
:body => post_body,
|
|
81
|
+
:auth_names => auth_names)
|
|
82
|
+
if @api_client.config.debugging
|
|
83
|
+
@api_client.config.logger.debug "API called: DefaultApi#case_items_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
84
|
+
end
|
|
85
|
+
return data, status_code, headers
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
# Apply an event to a case.
|
|
89
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
90
|
+
# @param user_id the CMM2 T_Users ID
|
|
91
|
+
# @param event_type The type of event to be applied to the case
|
|
92
|
+
# @param key The key of the case that the event applies to
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [nil]
|
|
95
|
+
def cases_key_events_post(v, user_id, event_type, key, opts = {})
|
|
96
|
+
cases_key_events_post_with_http_info(v, user_id, event_type, key, opts)
|
|
97
|
+
nil
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Apply an event to a case.
|
|
101
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
102
|
+
# @param user_id the CMM2 T_Users ID
|
|
103
|
+
# @param event_type The type of event to be applied to the case
|
|
104
|
+
# @param key The key of the case that the event applies to
|
|
105
|
+
# @param [Hash] opts the optional parameters
|
|
106
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
|
107
|
+
def cases_key_events_post_with_http_info(v, user_id, event_type, key, opts = {})
|
|
108
|
+
if @api_client.config.debugging
|
|
109
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.cases_key_events_post ...'
|
|
110
|
+
end
|
|
111
|
+
# verify the required parameter 'v' is set
|
|
112
|
+
if @api_client.config.client_side_validation && v.nil?
|
|
113
|
+
fail ArgumentError, "Missing the required parameter 'v' when calling DefaultApi.cases_key_events_post"
|
|
114
|
+
end
|
|
115
|
+
# verify the required parameter 'user_id' is set
|
|
116
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
117
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.cases_key_events_post"
|
|
118
|
+
end
|
|
119
|
+
# verify the required parameter 'event_type' is set
|
|
120
|
+
if @api_client.config.client_side_validation && event_type.nil?
|
|
121
|
+
fail ArgumentError, "Missing the required parameter 'event_type' when calling DefaultApi.cases_key_events_post"
|
|
122
|
+
end
|
|
123
|
+
# verify enum value
|
|
124
|
+
if @api_client.config.client_side_validation && !['cleared_for_therapy'].include?(event_type)
|
|
125
|
+
fail ArgumentError, "invalid value for 'event_type', must be one of cleared_for_therapy"
|
|
126
|
+
end
|
|
127
|
+
# verify the required parameter 'key' is set
|
|
128
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
129
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling DefaultApi.cases_key_events_post"
|
|
130
|
+
end
|
|
131
|
+
# resource path
|
|
132
|
+
local_var_path = '/cases/{key}/events'.sub('{' + 'key' + '}', key.to_s)
|
|
133
|
+
|
|
134
|
+
# query parameters
|
|
135
|
+
query_params = {}
|
|
136
|
+
query_params[:'v'] = v
|
|
137
|
+
query_params[:'user_id'] = user_id
|
|
138
|
+
query_params[:'event_type'] = event_type
|
|
139
|
+
|
|
140
|
+
# header parameters
|
|
141
|
+
header_params = {}
|
|
142
|
+
|
|
143
|
+
# form parameters
|
|
144
|
+
form_params = {}
|
|
145
|
+
|
|
146
|
+
# http body (model)
|
|
147
|
+
post_body = nil
|
|
148
|
+
auth_names = ['basicAuth']
|
|
149
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
|
150
|
+
:header_params => header_params,
|
|
151
|
+
:query_params => query_params,
|
|
152
|
+
:form_params => form_params,
|
|
153
|
+
:body => post_body,
|
|
154
|
+
:auth_names => auth_names)
|
|
155
|
+
if @api_client.config.debugging
|
|
156
|
+
@api_client.config.logger.debug "API called: DefaultApi#cases_key_events_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
157
|
+
end
|
|
158
|
+
return data, status_code, headers
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
# List all Patients with Cases. Allows optional search parameters; search parameters are ANDed together.
|
|
162
|
+
# @param user_id the CMM2 T_Users ID
|
|
163
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
164
|
+
# @param [Hash] opts the optional parameters
|
|
165
|
+
# @option opts [String] :first_name Search by patient's first name (substring search)
|
|
166
|
+
# @option opts [String] :middle_name Search by patient's middle name (substring search)
|
|
167
|
+
# @option opts [String] :last_name Search by patient's last name (substring search)
|
|
168
|
+
# @option opts [String] :date_of_birth Search by patient's date of birth (exact match)
|
|
169
|
+
# @option opts [String] :zipcode Search by patient's zipcode (exact match)
|
|
170
|
+
# @return [Array<PatientWithCases>]
|
|
171
|
+
def list_patients(user_id, v, opts = {})
|
|
172
|
+
data, _status_code, _headers = list_patients_with_http_info(user_id, v, opts)
|
|
173
|
+
data
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
# List all Patients with Cases. Allows optional search parameters; search parameters are ANDed together.
|
|
177
|
+
# @param user_id the CMM2 T_Users ID
|
|
178
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
179
|
+
# @param [Hash] opts the optional parameters
|
|
180
|
+
# @option opts [String] :first_name Search by patient's first name (substring search)
|
|
181
|
+
# @option opts [String] :middle_name Search by patient's middle name (substring search)
|
|
182
|
+
# @option opts [String] :last_name Search by patient's last name (substring search)
|
|
183
|
+
# @option opts [String] :date_of_birth Search by patient's date of birth (exact match)
|
|
184
|
+
# @option opts [String] :zipcode Search by patient's zipcode (exact match)
|
|
185
|
+
# @return [Array<(Array<PatientWithCases>, Fixnum, Hash)>] Array<PatientWithCases> data, response status code and response headers
|
|
186
|
+
def list_patients_with_http_info(user_id, v, opts = {})
|
|
187
|
+
if @api_client.config.debugging
|
|
188
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.list_patients ...'
|
|
189
|
+
end
|
|
190
|
+
# verify the required parameter 'user_id' is set
|
|
191
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
192
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.list_patients"
|
|
193
|
+
end
|
|
194
|
+
# verify the required parameter 'v' is set
|
|
195
|
+
if @api_client.config.client_side_validation && v.nil?
|
|
196
|
+
fail ArgumentError, "Missing the required parameter 'v' when calling DefaultApi.list_patients"
|
|
197
|
+
end
|
|
198
|
+
# resource path
|
|
199
|
+
local_var_path = '/patients'
|
|
200
|
+
|
|
201
|
+
# query parameters
|
|
202
|
+
query_params = {}
|
|
203
|
+
query_params[:'user_id'] = user_id
|
|
204
|
+
query_params[:'v'] = v
|
|
205
|
+
query_params[:'first_name'] = opts[:'first_name'] if !opts[:'first_name'].nil?
|
|
206
|
+
query_params[:'middle_name'] = opts[:'middle_name'] if !opts[:'middle_name'].nil?
|
|
207
|
+
query_params[:'last_name'] = opts[:'last_name'] if !opts[:'last_name'].nil?
|
|
208
|
+
query_params[:'date_of_birth'] = opts[:'date_of_birth'] if !opts[:'date_of_birth'].nil?
|
|
209
|
+
query_params[:'zipcode'] = opts[:'zipcode'] if !opts[:'zipcode'].nil?
|
|
210
|
+
|
|
211
|
+
# header parameters
|
|
212
|
+
header_params = {}
|
|
213
|
+
# HTTP header 'Accept' (if needed)
|
|
214
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
215
|
+
|
|
216
|
+
# form parameters
|
|
217
|
+
form_params = {}
|
|
218
|
+
|
|
219
|
+
# http body (model)
|
|
220
|
+
post_body = nil
|
|
221
|
+
auth_names = ['basicAuth']
|
|
222
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
223
|
+
:header_params => header_params,
|
|
224
|
+
:query_params => query_params,
|
|
225
|
+
:form_params => form_params,
|
|
226
|
+
:body => post_body,
|
|
227
|
+
:auth_names => auth_names,
|
|
228
|
+
:return_type => 'Array<PatientWithCases>')
|
|
229
|
+
if @api_client.config.debugging
|
|
230
|
+
@api_client.config.logger.debug "API called: DefaultApi#list_patients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
231
|
+
end
|
|
232
|
+
return data, status_code, headers
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Get the details of a specific case
|
|
236
|
+
# @param key
|
|
237
|
+
# @param user_id the CMM2 T_Users ID
|
|
238
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
239
|
+
# @param [Hash] opts the optional parameters
|
|
240
|
+
# @return [CaseWithPatient]
|
|
241
|
+
def show_case(key, user_id, v, opts = {})
|
|
242
|
+
data, _status_code, _headers = show_case_with_http_info(key, user_id, v, opts)
|
|
243
|
+
data
|
|
244
|
+
end
|
|
245
|
+
|
|
246
|
+
# Get the details of a specific case
|
|
247
|
+
# @param key
|
|
248
|
+
# @param user_id the CMM2 T_Users ID
|
|
249
|
+
# @param v Version of the CaseManager API. Required to be `v=sudo_v1`
|
|
250
|
+
# @param [Hash] opts the optional parameters
|
|
251
|
+
# @return [Array<(CaseWithPatient, Fixnum, Hash)>] CaseWithPatient data, response status code and response headers
|
|
252
|
+
def show_case_with_http_info(key, user_id, v, opts = {})
|
|
253
|
+
if @api_client.config.debugging
|
|
254
|
+
@api_client.config.logger.debug 'Calling API: DefaultApi.show_case ...'
|
|
255
|
+
end
|
|
256
|
+
# verify the required parameter 'key' is set
|
|
257
|
+
if @api_client.config.client_side_validation && key.nil?
|
|
258
|
+
fail ArgumentError, "Missing the required parameter 'key' when calling DefaultApi.show_case"
|
|
259
|
+
end
|
|
260
|
+
# verify the required parameter 'user_id' is set
|
|
261
|
+
if @api_client.config.client_side_validation && user_id.nil?
|
|
262
|
+
fail ArgumentError, "Missing the required parameter 'user_id' when calling DefaultApi.show_case"
|
|
263
|
+
end
|
|
264
|
+
# verify the required parameter 'v' is set
|
|
265
|
+
if @api_client.config.client_side_validation && v.nil?
|
|
266
|
+
fail ArgumentError, "Missing the required parameter 'v' when calling DefaultApi.show_case"
|
|
267
|
+
end
|
|
268
|
+
# resource path
|
|
269
|
+
local_var_path = '/cases/{key}'.sub('{' + 'key' + '}', key.to_s)
|
|
270
|
+
|
|
271
|
+
# query parameters
|
|
272
|
+
query_params = {}
|
|
273
|
+
query_params[:'user_id'] = user_id
|
|
274
|
+
query_params[:'v'] = v
|
|
275
|
+
|
|
276
|
+
# header parameters
|
|
277
|
+
header_params = {}
|
|
278
|
+
# HTTP header 'Accept' (if needed)
|
|
279
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
280
|
+
|
|
281
|
+
# form parameters
|
|
282
|
+
form_params = {}
|
|
283
|
+
|
|
284
|
+
# http body (model)
|
|
285
|
+
post_body = nil
|
|
286
|
+
auth_names = ['basicAuth']
|
|
287
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
|
288
|
+
:header_params => header_params,
|
|
289
|
+
:query_params => query_params,
|
|
290
|
+
:form_params => form_params,
|
|
291
|
+
:body => post_body,
|
|
292
|
+
:auth_names => auth_names,
|
|
293
|
+
:return_type => 'CaseWithPatient')
|
|
294
|
+
if @api_client.config.debugging
|
|
295
|
+
@api_client.config.logger.debug "API called: DefaultApi#show_case\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
296
|
+
end
|
|
297
|
+
return data, status_code, headers
|
|
298
|
+
end
|
|
299
|
+
|
|
300
|
+
end
|
|
301
|
+
end
|