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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b23ffb52309d9ea984d58c79f4395ec31c2da8f
4
- data.tar.gz: eebeb6cefe1d8405f58c8d9d0dc879aca52d5691
3
+ metadata.gz: ccd068e932aeea1ad8a85010ba3d3c71ad0d6953
4
+ data.tar.gz: a603b15bfc82a0f0f732ed79dcebb715bf9007f1
5
5
  SHA512:
6
- metadata.gz: 001e96d778c6fae73d8ac958d5be9fb2c5734a0212420ee6d9932ba20d125ee36ab865062d79a04d5aa9dd6ce465bb4649cf67acc58137f8f30a5ab99c18ac9c
7
- data.tar.gz: 35b052c6a01bd26cb9520e6aea5d9334dae1908d36b28250d7323f13e486640e93528a516c7a01700418a6f249b28efbcacc600d464ef43fce085af1a02d9ea5
6
+ metadata.gz: 9f7b5c458d08e82845ac1668c060ee62e203552eff823fec997d36aef08fbd3100d4e40180575b1df3fa4cce2dfccdad9a9f31c01a7997ccdab254c98b2481b8
7
+ data.tar.gz: 659af7f89b328429041628b07af8d84b94166090f0f8f136a8530f288c84db245c0076f71fe997fbb75ecb3d5c840e0b343d1d56ac05587205b5781ffef1f45b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- allscripts_api (0.1.0)
4
+ allscripts_api (0.2.0)
5
5
  faraday (>= 0.12.2)
6
6
 
7
7
  GEM
@@ -67,7 +67,7 @@ module AllscriptsApi
67
67
  response["Table"][0]
68
68
  end
69
69
 
70
- # Main method for interacting with the Allscripts UNityAPI
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
@@ -2,5 +2,5 @@
2
2
 
3
3
  module AllscriptsApi
4
4
  # gem version declaration
5
- VERSION = "0.1.0".freeze
5
+ VERSION = "0.2.0".freeze
6
6
  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.1.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-03-07 00:00:00.000000000 Z
11
+ date: 2018-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday