change_healthcare 1.0.3 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +18 -16
- data/change_healthcare.gemspec +1 -1
- data/lib/change_healthcare/error.rb +3 -2
- data/lib/change_healthcare/pharmacy.rb +30 -0
- data/lib/change_healthcare/rx.rb +72 -0
- data/lib/change_healthcare/version.rb +1 -1
- data/lib/change_healthcare.rb +1 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a16382e77ec7aece2c8c8b66d8de7d5c15da2b39c2ef344206c7c0ee928ac95
|
4
|
+
data.tar.gz: '08f184f15217f9ce8c55a30258e0c9db88e8cb01115d4c9c5df64895ceb39864'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 890491c89aabbb2d2c2d03a587a00ac4a43730f2b050dd4b8e780e41ac5d63d2f49d62bba5382e0294254b86e3a06f21db3b374b3a48c9cce2abce8599a9b9ec
|
7
|
+
data.tar.gz: 04a78b96fe338f1778389244e0bda246a2c61d913176468f1e0a4aa7b902617f91a597670c842991903f331dbc4422fcfa5218d98c658949435d0e5401d6771a
|
data/Gemfile.lock
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
change_healthcare (1.0.
|
4
|
+
change_healthcare (1.0.5)
|
5
5
|
activesupport (>= 6)
|
6
|
-
nokogiri (>= 1)
|
6
|
+
nokogiri (>= 1.13.6)
|
7
7
|
rest-client (~> 2)
|
8
8
|
rexml
|
9
9
|
|
10
10
|
GEM
|
11
11
|
remote: https://rubygems.org/
|
12
12
|
specs:
|
13
|
-
activesupport (7.0.
|
13
|
+
activesupport (7.0.4)
|
14
14
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
15
15
|
i18n (>= 1.6, < 2)
|
16
16
|
minitest (>= 5.1)
|
17
17
|
tzinfo (~> 2.0)
|
18
|
-
addressable (2.8.
|
19
|
-
public_suffix (>= 2.0.2, <
|
18
|
+
addressable (2.8.1)
|
19
|
+
public_suffix (>= 2.0.2, < 6.0)
|
20
20
|
coderay (1.1.3)
|
21
21
|
concurrent-ruby (1.1.10)
|
22
22
|
crack (0.4.5)
|
@@ -26,23 +26,25 @@ GEM
|
|
26
26
|
unf (>= 0.0.5, < 1.0.0)
|
27
27
|
hashdiff (1.0.1)
|
28
28
|
http-accept (1.7.0)
|
29
|
-
http-cookie (1.0.
|
29
|
+
http-cookie (1.0.5)
|
30
30
|
domain_name (~> 0.5)
|
31
|
-
i18n (1.
|
31
|
+
i18n (1.12.0)
|
32
32
|
concurrent-ruby (~> 1.0)
|
33
33
|
method_source (1.0.0)
|
34
34
|
mime-types (3.4.1)
|
35
35
|
mime-types-data (~> 3.2015)
|
36
36
|
mime-types-data (3.2022.0105)
|
37
|
-
|
37
|
+
mini_portile2 (2.8.0)
|
38
|
+
minitest (5.16.3)
|
38
39
|
netrc (0.11.0)
|
39
|
-
nokogiri (1.13.
|
40
|
+
nokogiri (1.13.10)
|
41
|
+
mini_portile2 (~> 2.8.0)
|
40
42
|
racc (~> 1.4)
|
41
43
|
pry (0.14.1)
|
42
44
|
coderay (~> 1.1)
|
43
45
|
method_source (~> 1.0)
|
44
|
-
public_suffix (
|
45
|
-
racc (1.6.
|
46
|
+
public_suffix (5.0.0)
|
47
|
+
racc (1.6.1)
|
46
48
|
rake (13.0.6)
|
47
49
|
rest-client (2.1.0)
|
48
50
|
http-accept (>= 1.7.0, < 2.0)
|
@@ -56,20 +58,20 @@ GEM
|
|
56
58
|
rspec-mocks (~> 3.11.0)
|
57
59
|
rspec-core (3.11.0)
|
58
60
|
rspec-support (~> 3.11.0)
|
59
|
-
rspec-expectations (3.11.
|
61
|
+
rspec-expectations (3.11.1)
|
60
62
|
diff-lcs (>= 1.2.0, < 2.0)
|
61
63
|
rspec-support (~> 3.11.0)
|
62
64
|
rspec-mocks (3.11.1)
|
63
65
|
diff-lcs (>= 1.2.0, < 2.0)
|
64
66
|
rspec-support (~> 3.11.0)
|
65
|
-
rspec-support (3.11.
|
66
|
-
tzinfo (2.0.
|
67
|
+
rspec-support (3.11.1)
|
68
|
+
tzinfo (2.0.5)
|
67
69
|
concurrent-ruby (~> 1.0)
|
68
70
|
unf (0.1.4)
|
69
71
|
unf_ext
|
70
|
-
unf_ext (0.0.8.
|
72
|
+
unf_ext (0.0.8.2)
|
71
73
|
vcr (6.1.0)
|
72
|
-
webmock (3.
|
74
|
+
webmock (3.18.1)
|
73
75
|
addressable (>= 2.8.0)
|
74
76
|
crack (>= 0.3.2)
|
75
77
|
hashdiff (>= 0.4.0, < 2.0.0)
|
data/change_healthcare.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "rest-client", "~> 2"
|
23
|
-
spec.add_runtime_dependency "nokogiri", '>= 1'
|
23
|
+
spec.add_runtime_dependency "nokogiri", '>= 1.13.6'
|
24
24
|
spec.add_runtime_dependency "activesupport", '>= 6'
|
25
25
|
spec.add_runtime_dependency "rexml"
|
26
26
|
|
@@ -3,7 +3,8 @@ class ChangeHealthcare::Error < StandardError
|
|
3
3
|
|
4
4
|
def initialize(xml_root_node)
|
5
5
|
@root = xml_root_node
|
6
|
-
|
7
|
-
@
|
6
|
+
root_children = xml_root_node.children
|
7
|
+
@code = root_children[0].present? ? root_children[0].children[0].to_s : ""
|
8
|
+
@description = root_children[1].present? ? root_children[1].children[1].to_s : ""
|
8
9
|
end
|
9
10
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# https://cli-cert.emdeon.com/api/cert/pharmacy.html
|
2
|
+
class ChangeHealthcare::Pharmacy < ChangeHealthcare::BaseApiObject
|
3
|
+
def self.attributes
|
4
|
+
[
|
5
|
+
:address_1, :address_2, :city, :email, :fax, :is_active, :is_electronic,
|
6
|
+
:is_epcs_capable, :name, :npi, :pharmacy_id, :pharmacy_type, :phone,
|
7
|
+
:ppi_level3_id, :script_version, :service_levels, :state,
|
8
|
+
:supports_newrx, :supports_refreq, :supports_rxcancel, :supports_rxchange,
|
9
|
+
:supports_rxfill, :zip
|
10
|
+
]
|
11
|
+
end
|
12
|
+
|
13
|
+
attr_accessor(*self.attributes)
|
14
|
+
|
15
|
+
def self.chc_object_name
|
16
|
+
"pharmacy"
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.get(params={})
|
20
|
+
resp = call_api(__method__.to_s, params, false)
|
21
|
+
response_to_list(resp)
|
22
|
+
end
|
23
|
+
|
24
|
+
# https://cli-cert.emdeon.com/api/cert/pharmacy.html#search
|
25
|
+
# params = { address_1: "811 Pendleton St, Suite 10" }
|
26
|
+
def self.search(params={})
|
27
|
+
resp = call_api(__method__.to_s, params, false)
|
28
|
+
response_to_list(resp)
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
class ChangeHealthcare::Rx < ChangeHealthcare::BaseApiObject
|
2
|
+
def self.attributes
|
3
|
+
[
|
4
|
+
:appuser, :auth_denied_by, :auth_denied_by_name, :auth_denied_date, :cg_dea_number,
|
5
|
+
:cg_fname, :cg_is_epcs_enabled, :cg_lname, :cg_mname, :cg_npi, :cg_suffix, :cg_title,
|
6
|
+
:change_type, :clearance, :comments, :created_by, :created_by_name, :created_by_username,
|
7
|
+
:creation_date, :curr_date, :daw, :days_supply, :dea_code, :denial_reason, :denied,
|
8
|
+
:digital_sig, :drug_id, :drug_label_name, :drug_name, :earliest_fill_date, :epa_refid,
|
9
|
+
:epa_status, :formulary_status, :generic_code, :history, :icd_10_cm_code, :icd_9_cm_code,
|
10
|
+
:included_in_log, :is_compound, :is_compound_cs, :last_fill_date, :last_modified_by,
|
11
|
+
:modified_by_dur, :modified_by_formulary, :modified_date, :ndc, :organization,
|
12
|
+
:original_date_written, :original_refills, :original_txn_detail, :originalrx, :ownerid,
|
13
|
+
:patient_address_1, :patient_address_2, :patient_city, :patient_dob, :patient_fname,
|
14
|
+
:patient_height, :patient_height_date, :patient_height_uom, :patient_hsi_value, :patient_lname,
|
15
|
+
:patient_mname, :patient_pbm_senderid, :patient_pbm_unique_id, :patient_phone, :patient_sex,
|
16
|
+
:patient_state, :patient_suffix, :patient_weight, :patient_weight_date, :patient_weight_uom,
|
17
|
+
:patient_zip, :person, :ph_address_1, :ph_address_2, :ph_city, :ph_is_active, :ph_is_epcs_capable,
|
18
|
+
:ph_name, :ph_phone, :ph_state, :ph_zip, :pharmacist_comments, :pharmacist_name, :pharmacy_discount,
|
19
|
+
:pharmacy_id, :pharmacy_patient_id, :prescriber, :prescriber_name, :print_pending, :prior_auth_number,
|
20
|
+
:quantity, :refill_request_priority, :refill_rx_num, :refill_send_dntf, :refill_trace_num,
|
21
|
+
:refill_txn_init_date, :refills, :rx, :rx_cancel_type, :rx_issue_type, :rx_status, :rx_type, :rxchange,
|
22
|
+
:rxcui, :sig, :supervising_prescriber, :thru_date, :transmission_date, :transmission_error_msg,
|
23
|
+
:transmittal_status, :units_of_measure
|
24
|
+
]
|
25
|
+
end
|
26
|
+
|
27
|
+
attr_accessor(*attributes)
|
28
|
+
|
29
|
+
def self.chc_object_name
|
30
|
+
"rx"
|
31
|
+
end
|
32
|
+
|
33
|
+
# https://cli-cert.emdeon.com/api/cert/rx.html#search_prescriber
|
34
|
+
# params = { organization: #{facility}, creation_date_from: "01/01/2021", rx_status: "AUTHORIZED" }
|
35
|
+
def self.search_prescriber(params)
|
36
|
+
resp = call_api(__method__.to_s, params, false)
|
37
|
+
response_to_list(resp)
|
38
|
+
end
|
39
|
+
|
40
|
+
# https://cli-cert.emdeon.com/api/cert/rx.html#search_patient
|
41
|
+
# params = { organization: #{facility}, person: "123345" }
|
42
|
+
def self.search_patient(params)
|
43
|
+
resp = call_api(__method__.to_s, params, false)
|
44
|
+
response_to_list(resp)
|
45
|
+
end
|
46
|
+
|
47
|
+
# https://cli-cert.emdeon.com/api/cert/rx.html#search_org
|
48
|
+
# params = { organization: #{facility}, rx_status: "AUTHORIZED" }
|
49
|
+
# OPTIONAL {creation_date_from: "01/01/2021" }
|
50
|
+
def self.search_org(params)
|
51
|
+
resp = call_api(__method__.to_s, params, false)
|
52
|
+
response_to_list(resp)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.rx_with_patient_search(params)
|
56
|
+
base = {
|
57
|
+
"userid" => configuration.user_id,
|
58
|
+
"PW" => configuration.password,
|
59
|
+
"hdnBusiness" => configuration.facility,
|
60
|
+
"target" => "jsp/lab/person/PatientLookup.jsp",
|
61
|
+
"actionCommand" => "Search",
|
62
|
+
"apiLogin" => "true",
|
63
|
+
"FromOrder" => "false",
|
64
|
+
"FromRx" => "true",
|
65
|
+
"loadPatient" => "false",
|
66
|
+
"link" => "false"
|
67
|
+
}
|
68
|
+
params.merge!(base)
|
69
|
+
|
70
|
+
"#{configuration.portal_url}?#{params.to_query}"
|
71
|
+
end
|
72
|
+
end
|
data/lib/change_healthcare.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: change_healthcare
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saul Moncada
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.13.6
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.13.6
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: activesupport
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -183,9 +183,11 @@ files:
|
|
183
183
|
- lib/change_healthcare/orderable_doc.rb
|
184
184
|
- lib/change_healthcare/organization_lab.rb
|
185
185
|
- lib/change_healthcare/person.rb
|
186
|
+
- lib/change_healthcare/pharmacy.rb
|
186
187
|
- lib/change_healthcare/provider_caregiver.rb
|
187
188
|
- lib/change_healthcare/report.rb
|
188
189
|
- lib/change_healthcare/report_doc.rb
|
190
|
+
- lib/change_healthcare/rx.rb
|
189
191
|
- lib/change_healthcare/servlet.rb
|
190
192
|
- lib/change_healthcare/version.rb
|
191
193
|
- lib/change_healthcare/xml_response.rb
|