change_healthcare 1.1 → 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 +2 -2
- data/lib/change_healthcare/error.rb +3 -4
- data/lib/change_healthcare/pharmacy.rb +2 -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 +3 -2
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
@@ -37,14 +37,14 @@ GEM
|
|
37
37
|
mini_portile2 (2.8.0)
|
38
38
|
minitest (5.16.3)
|
39
39
|
netrc (0.11.0)
|
40
|
-
nokogiri (1.13.
|
40
|
+
nokogiri (1.13.10)
|
41
41
|
mini_portile2 (~> 2.8.0)
|
42
42
|
racc (~> 1.4)
|
43
43
|
pry (0.14.1)
|
44
44
|
coderay (~> 1.1)
|
45
45
|
method_source (~> 1.0)
|
46
46
|
public_suffix (5.0.0)
|
47
|
-
racc (1.6.
|
47
|
+
racc (1.6.1)
|
48
48
|
rake (13.0.6)
|
49
49
|
rest-client (2.1.0)
|
50
50
|
http-accept (>= 1.7.0, < 2.0)
|
@@ -3,9 +3,8 @@ class ChangeHealthcare::Error < StandardError
|
|
3
3
|
|
4
4
|
def initialize(xml_root_node)
|
5
5
|
@root = xml_root_node
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
@description = first_children.present? ? first_children.children[0].to_s : ""
|
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 : ""
|
10
9
|
end
|
11
10
|
end
|
@@ -21,6 +21,8 @@ class ChangeHealthcare::Pharmacy < ChangeHealthcare::BaseApiObject
|
|
21
21
|
response_to_list(resp)
|
22
22
|
end
|
23
23
|
|
24
|
+
# https://cli-cert.emdeon.com/api/cert/pharmacy.html#search
|
25
|
+
# params = { address_1: "811 Pendleton St, Suite 10" }
|
24
26
|
def self.search(params={})
|
25
27
|
resp = call_api(__method__.to_s, params, false)
|
26
28
|
response_to_list(resp)
|
@@ -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
|
@@ -187,6 +187,7 @@ files:
|
|
187
187
|
- lib/change_healthcare/provider_caregiver.rb
|
188
188
|
- lib/change_healthcare/report.rb
|
189
189
|
- lib/change_healthcare/report_doc.rb
|
190
|
+
- lib/change_healthcare/rx.rb
|
190
191
|
- lib/change_healthcare/servlet.rb
|
191
192
|
- lib/change_healthcare/version.rb
|
192
193
|
- lib/change_healthcare/xml_response.rb
|