allscripts_api 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/allscripts_api/client.rb +1 -1
- data/lib/allscripts_api/named_magic_methods.rb +50 -0
- data/lib/allscripts_api/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccd068e932aeea1ad8a85010ba3d3c71ad0d6953
|
4
|
+
data.tar.gz: a603b15bfc82a0f0f732ed79dcebb715bf9007f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f7b5c458d08e82845ac1668c060ee62e203552eff823fec997d36aef08fbd3100d4e40180575b1df3fa4cce2dfccdad9a9f31c01a7997ccdab254c98b2481b8
|
7
|
+
data.tar.gz: 659af7f89b328429041628b07af8d84b94166090f0f8f136a8530f288c84db245c0076f71fe997fbb75ecb3d5c840e0b343d1d56ac05587205b5781ffef1f45b
|
data/Gemfile.lock
CHANGED
@@ -67,7 +67,7 @@ module AllscriptsApi
|
|
67
67
|
response["Table"][0]
|
68
68
|
end
|
69
69
|
|
70
|
-
# Main method for interacting with the Allscripts
|
70
|
+
# Main method for interacting with the Allscripts UnityAPI
|
71
71
|
#
|
72
72
|
# @param action [String] the API action to be performed
|
73
73
|
# @param magic_params [MagicParams] a params object
|
@@ -132,5 +132,55 @@ module AllscriptsApi
|
|
132
132
|
results = magic("GetPatientProblems", magic_params: params)
|
133
133
|
results["getpatientproblemsinfo"]
|
134
134
|
end
|
135
|
+
|
136
|
+
# a wrapper around GetSchedule, returns appointments scheduled under the
|
137
|
+
# the user for a given date range
|
138
|
+
#
|
139
|
+
# @param start_date [Date] start date inclusive
|
140
|
+
# @param end_date [Date] end date inclusive
|
141
|
+
# @return [Array<Hash>, Array, MagicError] a list of scheduled appointments,
|
142
|
+
# an empty array, or an error
|
143
|
+
def get_schedule(start_date, end_date)
|
144
|
+
params =
|
145
|
+
MagicParams.format(
|
146
|
+
user_id: @allscripts_username,
|
147
|
+
parameter1: format_date_range(start_date, end_date)
|
148
|
+
)
|
149
|
+
results = magic("GetSchedule", magic_params: params)
|
150
|
+
results["getscheduleinfo"]
|
151
|
+
end
|
152
|
+
|
153
|
+
# a wrapper around GetListOfDictionaries, which returns
|
154
|
+
# list of all dictionaries
|
155
|
+
#
|
156
|
+
# @return [Array<Hash>, Array, MagicError] a list of found dictionaries,
|
157
|
+
# an empty array, or an error
|
158
|
+
def get_list_of_dictionaries
|
159
|
+
params = MagicParams.format(user_id: @allscripts_username)
|
160
|
+
results = magic("GetListOfDictionaries", magic_params: params)
|
161
|
+
results["getlistofdictionariesinfo"]
|
162
|
+
end
|
163
|
+
|
164
|
+
# a wrapper around GetDictionary, which returnsentries
|
165
|
+
# from a specific dictionary.
|
166
|
+
#
|
167
|
+
# @param dictionary_name [String] the name of the desired dictionary,
|
168
|
+
# a "TableName" value from `get_list_of_dictionaries`
|
169
|
+
# @return [Array<Hash>, Array, MagicError] a list dictionary entries,
|
170
|
+
# an empty array, or an error
|
171
|
+
def get_dictionary(dictionary_name)
|
172
|
+
params = MagicParams.format(
|
173
|
+
user_id: @allscripts_username,
|
174
|
+
parameter1: dictionary_name
|
175
|
+
)
|
176
|
+
results = magic("GetDictionary", magic_params: params)
|
177
|
+
results["getdictionaryinfo"]
|
178
|
+
end
|
179
|
+
|
180
|
+
private
|
181
|
+
|
182
|
+
def format_date_range(start_date, end_date)
|
183
|
+
"#{start_date.strftime('%m/%d/%Y')}|#{end_date.strftime('%m/%d/%Y')}"
|
184
|
+
end
|
135
185
|
end
|
136
186
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: allscripts_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chase
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|