candidhealth 0.30.0 → 0.31.0
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 +4 -4
- data/lib/candidhealth/encounters/v_4/client.rb +31 -6
- data/lib/candidhealth/encounters/v_4/types/vitals_update.rb +116 -0
- data/lib/candidhealth/medication_dispense/client.rb +30 -0
- data/lib/candidhealth/medication_dispense/v_1/client.rb +112 -0
- data/lib/candidhealth/medication_dispense/v_1/types/medication_dispense_create.rb +142 -0
- data/lib/candidhealth/service_lines/v_2/client.rb +18 -2
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +15 -1
- data/lib/candidhealth/service_lines/v_2/types/service_line_update.rb +15 -1
- data/lib/candidhealth.rb +7 -0
- data/lib/requests.rb +2 -2
- data/lib/types_export.rb +2 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1c6e56c5d0482646728cd5dad2ad2715d4d824a87ccdc9994e9a4f4bffbc4fa
|
4
|
+
data.tar.gz: 764a249c8ea0ea9aea3a3c8e3af28cf2000da21c1733055c71954e88b52cb107
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9fb13b34c2792b335cffed497c18d13493a3dfffc0a30887744b2e0c0741a1025c627b600fd00bfff7e6c26b0fc43ab5285c27442df504c17e6df9c73a740ff9
|
7
|
+
data.tar.gz: 1933fbc4b1b43a606dec62bc2b79bd943c46d5ed371253ecd84d0aa997148fccb6fa40a558dbf8a915cac3fa32c495fb67ef1bbd9ad7caed2057669b51f118cb
|
@@ -34,6 +34,7 @@ require_relative "../../service_lines/v_2/types/service_line_create"
|
|
34
34
|
require_relative "../../guarantor/v_1/types/guarantor_create"
|
35
35
|
require_relative "../../claim_submission/v_1/types/external_claim_submission_create"
|
36
36
|
require_relative "../../custom_schemas/v_1/types/schema_instance"
|
37
|
+
require_relative "types/vitals_update"
|
37
38
|
require "async"
|
38
39
|
|
39
40
|
module CandidApiClient
|
@@ -804,6 +805,16 @@ module CandidApiClient
|
|
804
805
|
# is provided as an input, then the encounter's schema instances will be cleared.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
805
806
|
# * :schema_id (String)
|
806
807
|
# * :content (Hash{String => Object})
|
808
|
+
# @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
|
809
|
+
# updated to the provided values.
|
810
|
+
# Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
|
811
|
+
# * :height_in (Integer)
|
812
|
+
# * :weight_lbs (Integer)
|
813
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
814
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
815
|
+
# * :body_temperature_f (Float)
|
816
|
+
# * :hemoglobin_gdl (Float)
|
817
|
+
# * :hematocrit_pct (Float)
|
807
818
|
# @param request_options [CandidApiClient::RequestOptions]
|
808
819
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
809
820
|
# @example
|
@@ -836,10 +847,11 @@ module CandidApiClient
|
|
836
847
|
# last_menstrual_period_date: DateTime.parse(2023-01-15),
|
837
848
|
# delay_reason_code: C_1,
|
838
849
|
# patient_authorized_release: true,
|
839
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
850
|
+
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
851
|
+
# vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }
|
840
852
|
# )
|
841
853
|
def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
|
842
|
-
diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, schema_instances: nil, request_options: nil)
|
854
|
+
diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, request_options: nil)
|
843
855
|
response = @request_client.conn.patch do |req|
|
844
856
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
845
857
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -876,7 +888,8 @@ module CandidApiClient
|
|
876
888
|
last_menstrual_period_date: last_menstrual_period_date,
|
877
889
|
delay_reason_code: delay_reason_code,
|
878
890
|
patient_authorized_release: patient_authorized_release,
|
879
|
-
schema_instances: schema_instances
|
891
|
+
schema_instances: schema_instances,
|
892
|
+
vitals: vitals
|
880
893
|
}.compact
|
881
894
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
882
895
|
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
@@ -1656,6 +1669,16 @@ module CandidApiClient
|
|
1656
1669
|
# is provided as an input, then the encounter's schema instances will be cleared.Request of type Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>, as a Hash
|
1657
1670
|
# * :schema_id (String)
|
1658
1671
|
# * :content (Hash{String => Object})
|
1672
|
+
# @param vitals [Hash] If a vitals entity already exists for the encounter, then all values will be
|
1673
|
+
# updated to the provided values.
|
1674
|
+
# Otherwise, a new vitals object will be created for the encounter.Request of type CandidApiClient::Encounters::V4::Types::VitalsUpdate, as a Hash
|
1675
|
+
# * :height_in (Integer)
|
1676
|
+
# * :weight_lbs (Integer)
|
1677
|
+
# * :blood_pressure_systolic_mmhg (Integer)
|
1678
|
+
# * :blood_pressure_diastolic_mmhg (Integer)
|
1679
|
+
# * :body_temperature_f (Float)
|
1680
|
+
# * :hemoglobin_gdl (Float)
|
1681
|
+
# * :hematocrit_pct (Float)
|
1659
1682
|
# @param request_options [CandidApiClient::RequestOptions]
|
1660
1683
|
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
1661
1684
|
# @example
|
@@ -1688,10 +1711,11 @@ module CandidApiClient
|
|
1688
1711
|
# last_menstrual_period_date: DateTime.parse(2023-01-15),
|
1689
1712
|
# delay_reason_code: C_1,
|
1690
1713
|
# patient_authorized_release: true,
|
1691
|
-
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }]
|
1714
|
+
# schema_instances: [{ schema_id: "ec096b13-f80a-471d-aaeb-54b021c9d582", content: { "provider_category": "internist", "is_urgent_care": true, "bmi": 24.2, "age": 38 } }],
|
1715
|
+
# vitals: { height_in: 70, weight_lbs: 165, blood_pressure_systolic_mmhg: 115, blood_pressure_diastolic_mmhg: 85, body_temperature_f: 98, hemoglobin_gdl: 15.1, hematocrit_pct: 51.2 }
|
1692
1716
|
# )
|
1693
1717
|
def update(encounter_id:, prior_authorization_number: nil, external_id: nil, date_of_service: nil,
|
1694
|
-
diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, schema_instances: nil, request_options: nil)
|
1718
|
+
diagnosis_ids: nil, tag_ids: nil, clinical_notes: nil, pay_to_address: nil, billable_status: nil, responsible_party: nil, provider_accepts_assignment: nil, benefits_assigned_to_provider: nil, synchronicity: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, appointment_type: nil, end_date_of_service: nil, subscriber_primary: nil, subscriber_secondary: nil, additional_information: nil, service_authorization_exception_code: nil, admission_date: nil, discharge_date: nil, onset_of_current_illness_or_symptom_date: nil, last_menstrual_period_date: nil, delay_reason_code: nil, patient_authorized_release: nil, schema_instances: nil, vitals: nil, request_options: nil)
|
1695
1719
|
Async do
|
1696
1720
|
response = @request_client.conn.patch do |req|
|
1697
1721
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -1729,7 +1753,8 @@ module CandidApiClient
|
|
1729
1753
|
last_menstrual_period_date: last_menstrual_period_date,
|
1730
1754
|
delay_reason_code: delay_reason_code,
|
1731
1755
|
patient_authorized_release: patient_authorized_release,
|
1732
|
-
schema_instances: schema_instances
|
1756
|
+
schema_instances: schema_instances,
|
1757
|
+
vitals: vitals
|
1733
1758
|
}.compact
|
1734
1759
|
req.url "#{@request_client.get_url(environment: CandidApi,
|
1735
1760
|
request_options: request_options)}/api/encounters/v4/#{encounter_id}"
|
@@ -0,0 +1,116 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "ostruct"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module Encounters
|
8
|
+
module V4
|
9
|
+
module Types
|
10
|
+
class VitalsUpdate
|
11
|
+
# @return [Integer]
|
12
|
+
attr_reader :height_in
|
13
|
+
# @return [Integer]
|
14
|
+
attr_reader :weight_lbs
|
15
|
+
# @return [Integer]
|
16
|
+
attr_reader :blood_pressure_systolic_mmhg
|
17
|
+
# @return [Integer]
|
18
|
+
attr_reader :blood_pressure_diastolic_mmhg
|
19
|
+
# @return [Float]
|
20
|
+
attr_reader :body_temperature_f
|
21
|
+
# @return [Float]
|
22
|
+
attr_reader :hemoglobin_gdl
|
23
|
+
# @return [Float]
|
24
|
+
attr_reader :hematocrit_pct
|
25
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
26
|
+
attr_reader :additional_properties
|
27
|
+
# @return [Object]
|
28
|
+
attr_reader :_field_set
|
29
|
+
protected :_field_set
|
30
|
+
|
31
|
+
OMIT = Object.new
|
32
|
+
|
33
|
+
# @param height_in [Integer]
|
34
|
+
# @param weight_lbs [Integer]
|
35
|
+
# @param blood_pressure_systolic_mmhg [Integer]
|
36
|
+
# @param blood_pressure_diastolic_mmhg [Integer]
|
37
|
+
# @param body_temperature_f [Float]
|
38
|
+
# @param hemoglobin_gdl [Float]
|
39
|
+
# @param hematocrit_pct [Float]
|
40
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
41
|
+
# @return [CandidApiClient::Encounters::V4::Types::VitalsUpdate]
|
42
|
+
def initialize(height_in: OMIT, weight_lbs: OMIT, blood_pressure_systolic_mmhg: OMIT,
|
43
|
+
blood_pressure_diastolic_mmhg: OMIT, body_temperature_f: OMIT, hemoglobin_gdl: OMIT, hematocrit_pct: OMIT, additional_properties: nil)
|
44
|
+
@height_in = height_in if height_in != OMIT
|
45
|
+
@weight_lbs = weight_lbs if weight_lbs != OMIT
|
46
|
+
@blood_pressure_systolic_mmhg = blood_pressure_systolic_mmhg if blood_pressure_systolic_mmhg != OMIT
|
47
|
+
@blood_pressure_diastolic_mmhg = blood_pressure_diastolic_mmhg if blood_pressure_diastolic_mmhg != OMIT
|
48
|
+
@body_temperature_f = body_temperature_f if body_temperature_f != OMIT
|
49
|
+
@hemoglobin_gdl = hemoglobin_gdl if hemoglobin_gdl != OMIT
|
50
|
+
@hematocrit_pct = hematocrit_pct if hematocrit_pct != OMIT
|
51
|
+
@additional_properties = additional_properties
|
52
|
+
@_field_set = {
|
53
|
+
"height_in": height_in,
|
54
|
+
"weight_lbs": weight_lbs,
|
55
|
+
"blood_pressure_systolic_mmhg": blood_pressure_systolic_mmhg,
|
56
|
+
"blood_pressure_diastolic_mmhg": blood_pressure_diastolic_mmhg,
|
57
|
+
"body_temperature_f": body_temperature_f,
|
58
|
+
"hemoglobin_gdl": hemoglobin_gdl,
|
59
|
+
"hematocrit_pct": hematocrit_pct
|
60
|
+
}.reject do |_k, v|
|
61
|
+
v == OMIT
|
62
|
+
end
|
63
|
+
end
|
64
|
+
|
65
|
+
# Deserialize a JSON object to an instance of VitalsUpdate
|
66
|
+
#
|
67
|
+
# @param json_object [String]
|
68
|
+
# @return [CandidApiClient::Encounters::V4::Types::VitalsUpdate]
|
69
|
+
def self.from_json(json_object:)
|
70
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
71
|
+
height_in = struct["height_in"]
|
72
|
+
weight_lbs = struct["weight_lbs"]
|
73
|
+
blood_pressure_systolic_mmhg = struct["blood_pressure_systolic_mmhg"]
|
74
|
+
blood_pressure_diastolic_mmhg = struct["blood_pressure_diastolic_mmhg"]
|
75
|
+
body_temperature_f = struct["body_temperature_f"]
|
76
|
+
hemoglobin_gdl = struct["hemoglobin_gdl"]
|
77
|
+
hematocrit_pct = struct["hematocrit_pct"]
|
78
|
+
new(
|
79
|
+
height_in: height_in,
|
80
|
+
weight_lbs: weight_lbs,
|
81
|
+
blood_pressure_systolic_mmhg: blood_pressure_systolic_mmhg,
|
82
|
+
blood_pressure_diastolic_mmhg: blood_pressure_diastolic_mmhg,
|
83
|
+
body_temperature_f: body_temperature_f,
|
84
|
+
hemoglobin_gdl: hemoglobin_gdl,
|
85
|
+
hematocrit_pct: hematocrit_pct,
|
86
|
+
additional_properties: struct
|
87
|
+
)
|
88
|
+
end
|
89
|
+
|
90
|
+
# Serialize an instance of VitalsUpdate to a JSON object
|
91
|
+
#
|
92
|
+
# @return [String]
|
93
|
+
def to_json(*_args)
|
94
|
+
@_field_set&.to_json
|
95
|
+
end
|
96
|
+
|
97
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
98
|
+
# hash and check each fields type against the current object's property
|
99
|
+
# definitions.
|
100
|
+
#
|
101
|
+
# @param obj [Object]
|
102
|
+
# @return [Void]
|
103
|
+
def self.validate_raw(obj:)
|
104
|
+
obj.height_in&.is_a?(Integer) != false || raise("Passed value for field obj.height_in is not the expected type, validation failed.")
|
105
|
+
obj.weight_lbs&.is_a?(Integer) != false || raise("Passed value for field obj.weight_lbs is not the expected type, validation failed.")
|
106
|
+
obj.blood_pressure_systolic_mmhg&.is_a?(Integer) != false || raise("Passed value for field obj.blood_pressure_systolic_mmhg is not the expected type, validation failed.")
|
107
|
+
obj.blood_pressure_diastolic_mmhg&.is_a?(Integer) != false || raise("Passed value for field obj.blood_pressure_diastolic_mmhg is not the expected type, validation failed.")
|
108
|
+
obj.body_temperature_f&.is_a?(Float) != false || raise("Passed value for field obj.body_temperature_f is not the expected type, validation failed.")
|
109
|
+
obj.hemoglobin_gdl&.is_a?(Float) != false || raise("Passed value for field obj.hemoglobin_gdl is not the expected type, validation failed.")
|
110
|
+
obj.hematocrit_pct&.is_a?(Float) != false || raise("Passed value for field obj.hematocrit_pct is not the expected type, validation failed.")
|
111
|
+
end
|
112
|
+
end
|
113
|
+
end
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../requests"
|
4
|
+
require_relative "v_1/client"
|
5
|
+
|
6
|
+
module CandidApiClient
|
7
|
+
module MedicationDispense
|
8
|
+
class Client
|
9
|
+
# @return [CandidApiClient::MedicationDispense::V1::V1Client]
|
10
|
+
attr_reader :v_1
|
11
|
+
|
12
|
+
# @param request_client [CandidApiClient::RequestClient]
|
13
|
+
# @return [CandidApiClient::MedicationDispense::Client]
|
14
|
+
def initialize(request_client:)
|
15
|
+
@v_1 = CandidApiClient::MedicationDispense::V1::V1Client.new(request_client: request_client)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
class AsyncClient
|
20
|
+
# @return [CandidApiClient::MedicationDispense::V1::AsyncV1Client]
|
21
|
+
attr_reader :v_1
|
22
|
+
|
23
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
24
|
+
# @return [CandidApiClient::MedicationDispense::AsyncClient]
|
25
|
+
def initialize(request_client:)
|
26
|
+
@v_1 = CandidApiClient::MedicationDispense::V1::AsyncV1Client.new(request_client: request_client)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,112 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../requests"
|
4
|
+
require_relative "types/medication_dispense_create"
|
5
|
+
require_relative "../../encounters/v_4/types/encounter"
|
6
|
+
require "async"
|
7
|
+
|
8
|
+
module CandidApiClient
|
9
|
+
module MedicationDispense
|
10
|
+
module V1
|
11
|
+
class V1Client
|
12
|
+
# @return [CandidApiClient::RequestClient]
|
13
|
+
attr_reader :request_client
|
14
|
+
|
15
|
+
# @param request_client [CandidApiClient::RequestClient]
|
16
|
+
# @return [CandidApiClient::MedicationDispense::V1::V1Client]
|
17
|
+
def initialize(request_client:)
|
18
|
+
@request_client = request_client
|
19
|
+
end
|
20
|
+
|
21
|
+
# @param request [Hash] Request of type CandidApiClient::MedicationDispense::V1::Types::MedicationDispenseCreate, as a Hash
|
22
|
+
# * :medication_dispense_external_id (String)
|
23
|
+
# * :patient_external_id (String)
|
24
|
+
# * :procedure_code (String)
|
25
|
+
# * :quantity (String)
|
26
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
27
|
+
# * :date_of_service (Date)
|
28
|
+
# * :drug_identification (Hash)
|
29
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
30
|
+
# * :national_drug_code (String)
|
31
|
+
# * :national_drug_unit_count (String)
|
32
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
33
|
+
# * :link_sequence_number (String)
|
34
|
+
# * :pharmacy_prescription_number (String)
|
35
|
+
# * :conversion_formula (String)
|
36
|
+
# * :description (String)
|
37
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
38
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
39
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
40
|
+
# @example
|
41
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
42
|
+
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { }, description: "string", modifiers: [TWENTY_TWO] })
|
43
|
+
def create(request:, request_options: nil)
|
44
|
+
response = @request_client.conn.post do |req|
|
45
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
46
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
47
|
+
req.headers = {
|
48
|
+
**(req.headers || {}),
|
49
|
+
**@request_client.get_headers,
|
50
|
+
**(request_options&.additional_headers || {})
|
51
|
+
}.compact
|
52
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
53
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
54
|
+
request_options: request_options)}/api/medication-dispense/v1"
|
55
|
+
end
|
56
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
class AsyncV1Client
|
61
|
+
# @return [CandidApiClient::AsyncRequestClient]
|
62
|
+
attr_reader :request_client
|
63
|
+
|
64
|
+
# @param request_client [CandidApiClient::AsyncRequestClient]
|
65
|
+
# @return [CandidApiClient::MedicationDispense::V1::AsyncV1Client]
|
66
|
+
def initialize(request_client:)
|
67
|
+
@request_client = request_client
|
68
|
+
end
|
69
|
+
|
70
|
+
# @param request [Hash] Request of type CandidApiClient::MedicationDispense::V1::Types::MedicationDispenseCreate, as a Hash
|
71
|
+
# * :medication_dispense_external_id (String)
|
72
|
+
# * :patient_external_id (String)
|
73
|
+
# * :procedure_code (String)
|
74
|
+
# * :quantity (String)
|
75
|
+
# * :units (CandidApiClient::Commons::Types::ServiceLineUnits)
|
76
|
+
# * :date_of_service (Date)
|
77
|
+
# * :drug_identification (Hash)
|
78
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
79
|
+
# * :national_drug_code (String)
|
80
|
+
# * :national_drug_unit_count (String)
|
81
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
82
|
+
# * :link_sequence_number (String)
|
83
|
+
# * :pharmacy_prescription_number (String)
|
84
|
+
# * :conversion_formula (String)
|
85
|
+
# * :description (String)
|
86
|
+
# * :modifiers (Array<CandidApiClient::Commons::Types::ProcedureModifier>)
|
87
|
+
# @param request_options [CandidApiClient::RequestOptions]
|
88
|
+
# @return [CandidApiClient::Encounters::V4::Types::Encounter]
|
89
|
+
# @example
|
90
|
+
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
91
|
+
# api.medication_dispense.v_1.create(request: { medication_dispense_external_id: "string", patient_external_id: "string", procedure_code: "string", quantity: "string", units: MJ, date_of_service: DateTime.parse(2023-01-15), drug_identification: { }, description: "string", modifiers: [TWENTY_TWO] })
|
92
|
+
def create(request:, request_options: nil)
|
93
|
+
Async do
|
94
|
+
response = @request_client.conn.post do |req|
|
95
|
+
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
96
|
+
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
97
|
+
req.headers = {
|
98
|
+
**(req.headers || {}),
|
99
|
+
**@request_client.get_headers,
|
100
|
+
**(request_options&.additional_headers || {})
|
101
|
+
}.compact
|
102
|
+
req.body = { **(request || {}), **(request_options&.additional_body_parameters || {}) }.compact
|
103
|
+
req.url "#{@request_client.get_url(environment: CandidApi,
|
104
|
+
request_options: request_options)}/api/medication-dispense/v1"
|
105
|
+
end
|
106
|
+
CandidApiClient::Encounters::V4::Types::Encounter.from_json(json_object: response.body)
|
107
|
+
end
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
@@ -0,0 +1,142 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "../../../commons/types/service_line_units"
|
4
|
+
require "date"
|
5
|
+
require_relative "../../../service_lines/v_2/types/drug_identification"
|
6
|
+
require_relative "../../../commons/types/procedure_modifier"
|
7
|
+
require "ostruct"
|
8
|
+
require "json"
|
9
|
+
|
10
|
+
module CandidApiClient
|
11
|
+
module MedicationDispense
|
12
|
+
module V1
|
13
|
+
module Types
|
14
|
+
class MedicationDispenseCreate
|
15
|
+
# @return [String]
|
16
|
+
attr_reader :medication_dispense_external_id
|
17
|
+
# @return [String]
|
18
|
+
attr_reader :patient_external_id
|
19
|
+
# @return [String]
|
20
|
+
attr_reader :procedure_code
|
21
|
+
# @return [String]
|
22
|
+
attr_reader :quantity
|
23
|
+
# @return [CandidApiClient::Commons::Types::ServiceLineUnits]
|
24
|
+
attr_reader :units
|
25
|
+
# @return [Date]
|
26
|
+
attr_reader :date_of_service
|
27
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
28
|
+
attr_reader :drug_identification
|
29
|
+
# @return [String]
|
30
|
+
attr_reader :description
|
31
|
+
# @return [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
32
|
+
attr_reader :modifiers
|
33
|
+
# @return [OpenStruct] Additional properties unmapped to the current class definition
|
34
|
+
attr_reader :additional_properties
|
35
|
+
# @return [Object]
|
36
|
+
attr_reader :_field_set
|
37
|
+
protected :_field_set
|
38
|
+
|
39
|
+
OMIT = Object.new
|
40
|
+
|
41
|
+
# @param medication_dispense_external_id [String]
|
42
|
+
# @param patient_external_id [String]
|
43
|
+
# @param procedure_code [String]
|
44
|
+
# @param quantity [String]
|
45
|
+
# @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
|
46
|
+
# @param date_of_service [Date]
|
47
|
+
# @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
48
|
+
# @param description [String]
|
49
|
+
# @param modifiers [Array<CandidApiClient::Commons::Types::ProcedureModifier>]
|
50
|
+
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
51
|
+
# @return [CandidApiClient::MedicationDispense::V1::Types::MedicationDispenseCreate]
|
52
|
+
def initialize(medication_dispense_external_id:, patient_external_id:, procedure_code:, quantity:, units:,
|
53
|
+
date_of_service:, drug_identification: OMIT, description: OMIT, modifiers: OMIT, additional_properties: nil)
|
54
|
+
@medication_dispense_external_id = medication_dispense_external_id
|
55
|
+
@patient_external_id = patient_external_id
|
56
|
+
@procedure_code = procedure_code
|
57
|
+
@quantity = quantity
|
58
|
+
@units = units
|
59
|
+
@date_of_service = date_of_service
|
60
|
+
@drug_identification = drug_identification if drug_identification != OMIT
|
61
|
+
@description = description if description != OMIT
|
62
|
+
@modifiers = modifiers if modifiers != OMIT
|
63
|
+
@additional_properties = additional_properties
|
64
|
+
@_field_set = {
|
65
|
+
"medication_dispense_external_id": medication_dispense_external_id,
|
66
|
+
"patient_external_id": patient_external_id,
|
67
|
+
"procedure_code": procedure_code,
|
68
|
+
"quantity": quantity,
|
69
|
+
"units": units,
|
70
|
+
"date_of_service": date_of_service,
|
71
|
+
"drug_identification": drug_identification,
|
72
|
+
"description": description,
|
73
|
+
"modifiers": modifiers
|
74
|
+
}.reject do |_k, v|
|
75
|
+
v == OMIT
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Deserialize a JSON object to an instance of MedicationDispenseCreate
|
80
|
+
#
|
81
|
+
# @param json_object [String]
|
82
|
+
# @return [CandidApiClient::MedicationDispense::V1::Types::MedicationDispenseCreate]
|
83
|
+
def self.from_json(json_object:)
|
84
|
+
struct = JSON.parse(json_object, object_class: OpenStruct)
|
85
|
+
parsed_json = JSON.parse(json_object)
|
86
|
+
medication_dispense_external_id = struct["medication_dispense_external_id"]
|
87
|
+
patient_external_id = struct["patient_external_id"]
|
88
|
+
procedure_code = struct["procedure_code"]
|
89
|
+
quantity = struct["quantity"]
|
90
|
+
units = struct["units"]
|
91
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
92
|
+
if parsed_json["drug_identification"].nil?
|
93
|
+
drug_identification = nil
|
94
|
+
else
|
95
|
+
drug_identification = parsed_json["drug_identification"].to_json
|
96
|
+
drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentification.from_json(json_object: drug_identification)
|
97
|
+
end
|
98
|
+
description = struct["description"]
|
99
|
+
modifiers = struct["modifiers"]
|
100
|
+
new(
|
101
|
+
medication_dispense_external_id: medication_dispense_external_id,
|
102
|
+
patient_external_id: patient_external_id,
|
103
|
+
procedure_code: procedure_code,
|
104
|
+
quantity: quantity,
|
105
|
+
units: units,
|
106
|
+
date_of_service: date_of_service,
|
107
|
+
drug_identification: drug_identification,
|
108
|
+
description: description,
|
109
|
+
modifiers: modifiers,
|
110
|
+
additional_properties: struct
|
111
|
+
)
|
112
|
+
end
|
113
|
+
|
114
|
+
# Serialize an instance of MedicationDispenseCreate to a JSON object
|
115
|
+
#
|
116
|
+
# @return [String]
|
117
|
+
def to_json(*_args)
|
118
|
+
@_field_set&.to_json
|
119
|
+
end
|
120
|
+
|
121
|
+
# Leveraged for Union-type generation, validate_raw attempts to parse the given
|
122
|
+
# hash and check each fields type against the current object's property
|
123
|
+
# definitions.
|
124
|
+
#
|
125
|
+
# @param obj [Object]
|
126
|
+
# @return [Void]
|
127
|
+
def self.validate_raw(obj:)
|
128
|
+
obj.medication_dispense_external_id.is_a?(String) != false || raise("Passed value for field obj.medication_dispense_external_id is not the expected type, validation failed.")
|
129
|
+
obj.patient_external_id.is_a?(String) != false || raise("Passed value for field obj.patient_external_id is not the expected type, validation failed.")
|
130
|
+
obj.procedure_code.is_a?(String) != false || raise("Passed value for field obj.procedure_code is not the expected type, validation failed.")
|
131
|
+
obj.quantity.is_a?(String) != false || raise("Passed value for field obj.quantity is not the expected type, validation failed.")
|
132
|
+
obj.units.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
133
|
+
obj.date_of_service.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
134
|
+
obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentification.validate_raw(obj: obj.drug_identification)
|
135
|
+
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
136
|
+
obj.modifiers&.is_a?(Array) != false || raise("Passed value for field obj.modifiers is not the expected type, validation failed.")
|
137
|
+
end
|
138
|
+
end
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
@@ -66,6 +66,14 @@ module CandidApiClient
|
|
66
66
|
# * :diagnosis_id_one (String)
|
67
67
|
# * :diagnosis_id_two (String)
|
68
68
|
# * :diagnosis_id_three (String)
|
69
|
+
# * :drug_identification (Hash)
|
70
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
71
|
+
# * :national_drug_code (String)
|
72
|
+
# * :national_drug_unit_count (String)
|
73
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
74
|
+
# * :link_sequence_number (String)
|
75
|
+
# * :pharmacy_prescription_number (String)
|
76
|
+
# * :conversion_formula (String)
|
69
77
|
# * :denial_reason (Hash)
|
70
78
|
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
71
79
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
@@ -79,7 +87,7 @@ module CandidApiClient
|
|
79
87
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
80
88
|
# @example
|
81
89
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
82
|
-
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
90
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { }, denial_reason: { }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
83
91
|
def update(service_line_id:, request:, request_options: nil)
|
84
92
|
response = @request_client.conn.patch do |req|
|
85
93
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -176,6 +184,14 @@ module CandidApiClient
|
|
176
184
|
# * :diagnosis_id_one (String)
|
177
185
|
# * :diagnosis_id_two (String)
|
178
186
|
# * :diagnosis_id_three (String)
|
187
|
+
# * :drug_identification (Hash)
|
188
|
+
# * :service_id_qualifier (CandidApiClient::ServiceLines::V2::Types::ServiceIdQualifier)
|
189
|
+
# * :national_drug_code (String)
|
190
|
+
# * :national_drug_unit_count (String)
|
191
|
+
# * :measurement_unit_code (CandidApiClient::ServiceLines::V2::Types::MeasurementUnitCode)
|
192
|
+
# * :link_sequence_number (String)
|
193
|
+
# * :pharmacy_prescription_number (String)
|
194
|
+
# * :conversion_formula (String)
|
179
195
|
# * :denial_reason (Hash)
|
180
196
|
# * :reason (CandidApiClient::ServiceLines::V2::Types::DenialReasonContent)
|
181
197
|
# * :place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode)
|
@@ -189,7 +205,7 @@ module CandidApiClient
|
|
189
205
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
190
206
|
# @example
|
191
207
|
# api = CandidApiClient::Client.new(base_url: "https://api.example.com", environment: CandidApiClient::Environment::PRODUCTION)
|
192
|
-
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", denial_reason: { }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
208
|
+
# api.service_lines.v_2.update(service_line_id: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", request: { edit_reason: "string", modifiers: [TWENTY_TWO], charge_amount_cents: 1, diagnosis_id_zero: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_one: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_two: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", diagnosis_id_three: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", drug_identification: { }, denial_reason: { }, place_of_service_code: PHARMACY, units: MJ, procedure_code: "string", quantity: "string", description: "string", date_of_service: DateTime.parse(2023-01-15), end_date_of_service: DateTime.parse(2023-01-15) })
|
193
209
|
def update(service_line_id:, request:, request_options: nil)
|
194
210
|
Async do
|
195
211
|
response = @request_client.conn.patch do |req|
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../commons/types/procedure_modifier"
|
4
|
+
require_relative "drug_identification"
|
4
5
|
require_relative "service_line_era_data"
|
5
6
|
require_relative "service_line_adjustment"
|
6
7
|
require_relative "../../../invoices/types/invoice"
|
@@ -47,6 +48,8 @@ module CandidApiClient
|
|
47
48
|
attr_reader :diagnosis_id_two
|
48
49
|
# @return [String]
|
49
50
|
attr_reader :diagnosis_id_three
|
51
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
52
|
+
attr_reader :drug_identification
|
50
53
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData]
|
51
54
|
attr_reader :service_line_era_data
|
52
55
|
# @return [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
@@ -114,6 +117,7 @@ module CandidApiClient
|
|
114
117
|
# @param diagnosis_id_one [String]
|
115
118
|
# @param diagnosis_id_two [String]
|
116
119
|
# @param diagnosis_id_three [String]
|
120
|
+
# @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
117
121
|
# @param service_line_era_data [CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData]
|
118
122
|
# @param service_line_manual_adjustments [Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineAdjustment>]
|
119
123
|
# @param related_invoices [Array<CandidApiClient::Invoices::Types::Invoice>]
|
@@ -142,7 +146,7 @@ module CandidApiClient
|
|
142
146
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
143
147
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLine]
|
144
148
|
def initialize(service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, date_of_service:, modifiers: OMIT, charge_amount_cents: OMIT, allowed_amount_cents: OMIT,
|
145
|
-
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
149
|
+
insurance_balance_cents: OMIT, patient_balance_cents: OMIT, paid_amount_cents: OMIT, primary_paid_amount_cents: OMIT, secondary_paid_amount_cents: OMIT, tertiary_paid_amount_cents: OMIT, patient_responsibility_cents: OMIT, diagnosis_id_zero: OMIT, diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, service_line_era_data: OMIT, service_line_manual_adjustments: OMIT, related_invoices: OMIT, related_invoice_info: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, place_of_service_code_as_submitted: OMIT, referring_provider: OMIT, initial_referring_provider: OMIT, supervising_provider: OMIT, ordering_provider: OMIT, description: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
146
150
|
@modifiers = modifiers if modifiers != OMIT
|
147
151
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
148
152
|
@allowed_amount_cents = allowed_amount_cents if allowed_amount_cents != OMIT
|
@@ -157,6 +161,7 @@ module CandidApiClient
|
|
157
161
|
@diagnosis_id_one = diagnosis_id_one if diagnosis_id_one != OMIT
|
158
162
|
@diagnosis_id_two = diagnosis_id_two if diagnosis_id_two != OMIT
|
159
163
|
@diagnosis_id_three = diagnosis_id_three if diagnosis_id_three != OMIT
|
164
|
+
@drug_identification = drug_identification if drug_identification != OMIT
|
160
165
|
@service_line_era_data = service_line_era_data if service_line_era_data != OMIT
|
161
166
|
if service_line_manual_adjustments != OMIT
|
162
167
|
@service_line_manual_adjustments = service_line_manual_adjustments
|
@@ -197,6 +202,7 @@ module CandidApiClient
|
|
197
202
|
"diagnosis_id_one": diagnosis_id_one,
|
198
203
|
"diagnosis_id_two": diagnosis_id_two,
|
199
204
|
"diagnosis_id_three": diagnosis_id_three,
|
205
|
+
"drug_identification": drug_identification,
|
200
206
|
"service_line_era_data": service_line_era_data,
|
201
207
|
"service_line_manual_adjustments": service_line_manual_adjustments,
|
202
208
|
"related_invoices": related_invoices,
|
@@ -243,6 +249,12 @@ module CandidApiClient
|
|
243
249
|
diagnosis_id_one = struct["diagnosis_id_one"]
|
244
250
|
diagnosis_id_two = struct["diagnosis_id_two"]
|
245
251
|
diagnosis_id_three = struct["diagnosis_id_three"]
|
252
|
+
if parsed_json["drug_identification"].nil?
|
253
|
+
drug_identification = nil
|
254
|
+
else
|
255
|
+
drug_identification = parsed_json["drug_identification"].to_json
|
256
|
+
drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentification.from_json(json_object: drug_identification)
|
257
|
+
end
|
246
258
|
if parsed_json["service_line_era_data"].nil?
|
247
259
|
service_line_era_data = nil
|
248
260
|
else
|
@@ -324,6 +336,7 @@ module CandidApiClient
|
|
324
336
|
diagnosis_id_one: diagnosis_id_one,
|
325
337
|
diagnosis_id_two: diagnosis_id_two,
|
326
338
|
diagnosis_id_three: diagnosis_id_three,
|
339
|
+
drug_identification: drug_identification,
|
327
340
|
service_line_era_data: service_line_era_data,
|
328
341
|
service_line_manual_adjustments: service_line_manual_adjustments,
|
329
342
|
related_invoices: related_invoices,
|
@@ -376,6 +389,7 @@ module CandidApiClient
|
|
376
389
|
obj.diagnosis_id_one&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_one is not the expected type, validation failed.")
|
377
390
|
obj.diagnosis_id_two&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_two is not the expected type, validation failed.")
|
378
391
|
obj.diagnosis_id_three&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_three is not the expected type, validation failed.")
|
392
|
+
obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentification.validate_raw(obj: obj.drug_identification)
|
379
393
|
obj.service_line_era_data.nil? || CandidApiClient::ServiceLines::V2::Types::ServiceLineEraData.validate_raw(obj: obj.service_line_era_data)
|
380
394
|
obj.service_line_manual_adjustments&.is_a?(Array) != false || raise("Passed value for field obj.service_line_manual_adjustments is not the expected type, validation failed.")
|
381
395
|
obj.related_invoices&.is_a?(Array) != false || raise("Passed value for field obj.related_invoices is not the expected type, validation failed.")
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../commons/types/procedure_modifier"
|
4
|
+
require_relative "drug_identification"
|
4
5
|
require_relative "service_line_denial_reason"
|
5
6
|
require_relative "../../../commons/types/facility_type_code"
|
6
7
|
require_relative "../../../commons/types/service_line_units"
|
@@ -27,6 +28,8 @@ module CandidApiClient
|
|
27
28
|
attr_reader :diagnosis_id_two
|
28
29
|
# @return [String]
|
29
30
|
attr_reader :diagnosis_id_three
|
31
|
+
# @return [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
32
|
+
attr_reader :drug_identification
|
30
33
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
31
34
|
attr_reader :denial_reason
|
32
35
|
# @return [CandidApiClient::Commons::Types::FacilityTypeCode]
|
@@ -62,6 +65,7 @@ module CandidApiClient
|
|
62
65
|
# @param diagnosis_id_one [String]
|
63
66
|
# @param diagnosis_id_two [String]
|
64
67
|
# @param diagnosis_id_three [String]
|
68
|
+
# @param drug_identification [CandidApiClient::ServiceLines::V2::Types::DrugIdentification]
|
65
69
|
# @param denial_reason [CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason]
|
66
70
|
# @param place_of_service_code [CandidApiClient::Commons::Types::FacilityTypeCode]
|
67
71
|
# @param units [CandidApiClient::Commons::Types::ServiceLineUnits]
|
@@ -77,7 +81,7 @@ module CandidApiClient
|
|
77
81
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
78
82
|
# @return [CandidApiClient::ServiceLines::V2::Types::ServiceLineUpdate]
|
79
83
|
def initialize(edit_reason: OMIT, modifiers: OMIT, charge_amount_cents: OMIT, diagnosis_id_zero: OMIT,
|
80
|
-
diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
84
|
+
diagnosis_id_one: OMIT, diagnosis_id_two: OMIT, diagnosis_id_three: OMIT, drug_identification: OMIT, denial_reason: OMIT, place_of_service_code: OMIT, units: OMIT, procedure_code: OMIT, quantity: OMIT, description: OMIT, date_of_service: OMIT, end_date_of_service: OMIT, additional_properties: nil)
|
81
85
|
@edit_reason = edit_reason if edit_reason != OMIT
|
82
86
|
@modifiers = modifiers if modifiers != OMIT
|
83
87
|
@charge_amount_cents = charge_amount_cents if charge_amount_cents != OMIT
|
@@ -85,6 +89,7 @@ module CandidApiClient
|
|
85
89
|
@diagnosis_id_one = diagnosis_id_one if diagnosis_id_one != OMIT
|
86
90
|
@diagnosis_id_two = diagnosis_id_two if diagnosis_id_two != OMIT
|
87
91
|
@diagnosis_id_three = diagnosis_id_three if diagnosis_id_three != OMIT
|
92
|
+
@drug_identification = drug_identification if drug_identification != OMIT
|
88
93
|
@denial_reason = denial_reason if denial_reason != OMIT
|
89
94
|
@place_of_service_code = place_of_service_code if place_of_service_code != OMIT
|
90
95
|
@units = units if units != OMIT
|
@@ -102,6 +107,7 @@ module CandidApiClient
|
|
102
107
|
"diagnosis_id_one": diagnosis_id_one,
|
103
108
|
"diagnosis_id_two": diagnosis_id_two,
|
104
109
|
"diagnosis_id_three": diagnosis_id_three,
|
110
|
+
"drug_identification": drug_identification,
|
105
111
|
"denial_reason": denial_reason,
|
106
112
|
"place_of_service_code": place_of_service_code,
|
107
113
|
"units": units,
|
@@ -129,6 +135,12 @@ module CandidApiClient
|
|
129
135
|
diagnosis_id_one = struct["diagnosis_id_one"]
|
130
136
|
diagnosis_id_two = struct["diagnosis_id_two"]
|
131
137
|
diagnosis_id_three = struct["diagnosis_id_three"]
|
138
|
+
if parsed_json["drug_identification"].nil?
|
139
|
+
drug_identification = nil
|
140
|
+
else
|
141
|
+
drug_identification = parsed_json["drug_identification"].to_json
|
142
|
+
drug_identification = CandidApiClient::ServiceLines::V2::Types::DrugIdentification.from_json(json_object: drug_identification)
|
143
|
+
end
|
132
144
|
if parsed_json["denial_reason"].nil?
|
133
145
|
denial_reason = nil
|
134
146
|
else
|
@@ -152,6 +164,7 @@ module CandidApiClient
|
|
152
164
|
diagnosis_id_one: diagnosis_id_one,
|
153
165
|
diagnosis_id_two: diagnosis_id_two,
|
154
166
|
diagnosis_id_three: diagnosis_id_three,
|
167
|
+
drug_identification: drug_identification,
|
155
168
|
denial_reason: denial_reason,
|
156
169
|
place_of_service_code: place_of_service_code,
|
157
170
|
units: units,
|
@@ -185,6 +198,7 @@ module CandidApiClient
|
|
185
198
|
obj.diagnosis_id_one&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_one is not the expected type, validation failed.")
|
186
199
|
obj.diagnosis_id_two&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_two is not the expected type, validation failed.")
|
187
200
|
obj.diagnosis_id_three&.is_a?(String) != false || raise("Passed value for field obj.diagnosis_id_three is not the expected type, validation failed.")
|
201
|
+
obj.drug_identification.nil? || CandidApiClient::ServiceLines::V2::Types::DrugIdentification.validate_raw(obj: obj.drug_identification)
|
188
202
|
obj.denial_reason.nil? || CandidApiClient::ServiceLines::V2::Types::ServiceLineDenialReason.validate_raw(obj: obj.denial_reason)
|
189
203
|
obj.place_of_service_code&.is_a?(CandidApiClient::Commons::Types::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
|
190
204
|
obj.units&.is_a?(CandidApiClient::Commons::Types::ServiceLineUnits) != false || raise("Passed value for field obj.units is not the expected type, validation failed.")
|
data/lib/candidhealth.rb
CHANGED
@@ -19,6 +19,7 @@ require_relative "candidhealth/import_invoice/client"
|
|
19
19
|
require_relative "candidhealth/insurance_adjudications/client"
|
20
20
|
require_relative "candidhealth/insurance_payments/client"
|
21
21
|
require_relative "candidhealth/insurance_refunds/client"
|
22
|
+
require_relative "candidhealth/medication_dispense/client"
|
22
23
|
require_relative "candidhealth/non_insurance_payer_payments/client"
|
23
24
|
require_relative "candidhealth/non_insurance_payer_refunds/client"
|
24
25
|
require_relative "candidhealth/non_insurance_payers/client"
|
@@ -68,6 +69,8 @@ module CandidApiClient
|
|
68
69
|
attr_reader :insurance_payments
|
69
70
|
# @return [CandidApiClient::InsuranceRefunds::Client]
|
70
71
|
attr_reader :insurance_refunds
|
72
|
+
# @return [CandidApiClient::MedicationDispense::Client]
|
73
|
+
attr_reader :medication_dispense
|
71
74
|
# @return [CandidApiClient::NonInsurancePayerPayments::Client]
|
72
75
|
attr_reader :non_insurance_payer_payments
|
73
76
|
# @return [CandidApiClient::NonInsurancePayerRefunds::Client]
|
@@ -142,6 +145,7 @@ module CandidApiClient
|
|
142
145
|
@insurance_adjudications = CandidApiClient::InsuranceAdjudications::Client.new(request_client: @request_client)
|
143
146
|
@insurance_payments = CandidApiClient::InsurancePayments::Client.new(request_client: @request_client)
|
144
147
|
@insurance_refunds = CandidApiClient::InsuranceRefunds::Client.new(request_client: @request_client)
|
148
|
+
@medication_dispense = CandidApiClient::MedicationDispense::Client.new(request_client: @request_client)
|
145
149
|
@non_insurance_payer_payments = CandidApiClient::NonInsurancePayerPayments::Client.new(request_client: @request_client)
|
146
150
|
@non_insurance_payer_refunds = CandidApiClient::NonInsurancePayerRefunds::Client.new(request_client: @request_client)
|
147
151
|
@non_insurance_payers = CandidApiClient::NonInsurancePayers::Client.new(request_client: @request_client)
|
@@ -192,6 +196,8 @@ module CandidApiClient
|
|
192
196
|
attr_reader :insurance_payments
|
193
197
|
# @return [CandidApiClient::InsuranceRefunds::AsyncClient]
|
194
198
|
attr_reader :insurance_refunds
|
199
|
+
# @return [CandidApiClient::MedicationDispense::AsyncClient]
|
200
|
+
attr_reader :medication_dispense
|
195
201
|
# @return [CandidApiClient::NonInsurancePayerPayments::AsyncClient]
|
196
202
|
attr_reader :non_insurance_payer_payments
|
197
203
|
# @return [CandidApiClient::NonInsurancePayerRefunds::AsyncClient]
|
@@ -266,6 +272,7 @@ module CandidApiClient
|
|
266
272
|
@insurance_adjudications = CandidApiClient::InsuranceAdjudications::AsyncClient.new(request_client: @async_request_client)
|
267
273
|
@insurance_payments = CandidApiClient::InsurancePayments::AsyncClient.new(request_client: @async_request_client)
|
268
274
|
@insurance_refunds = CandidApiClient::InsuranceRefunds::AsyncClient.new(request_client: @async_request_client)
|
275
|
+
@medication_dispense = CandidApiClient::MedicationDispense::AsyncClient.new(request_client: @async_request_client)
|
269
276
|
@non_insurance_payer_payments = CandidApiClient::NonInsurancePayerPayments::AsyncClient.new(request_client: @async_request_client)
|
270
277
|
@non_insurance_payer_refunds = CandidApiClient::NonInsurancePayerRefunds::AsyncClient.new(request_client: @async_request_client)
|
271
278
|
@non_insurance_payers = CandidApiClient::NonInsurancePayers::AsyncClient.new(request_client: @async_request_client)
|
data/lib/requests.rb
CHANGED
@@ -43,7 +43,7 @@ module CandidApiClient
|
|
43
43
|
|
44
44
|
# @return [Hash{String => String}]
|
45
45
|
def get_headers
|
46
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
46
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.31.0" }
|
47
47
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
48
48
|
headers
|
49
49
|
end
|
@@ -87,7 +87,7 @@ module CandidApiClient
|
|
87
87
|
|
88
88
|
# @return [Hash{String => String}]
|
89
89
|
def get_headers
|
90
|
-
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.
|
90
|
+
headers = { "X-Fern-Language": "Ruby", "X-Fern-SDK-Name": "candidhealth", "X-Fern-SDK-Version": "0.31.0" }
|
91
91
|
headers["Authorization"] = ((@token.is_a? Method) ? @token.call : @token) unless token.nil?
|
92
92
|
headers
|
93
93
|
end
|
data/lib/types_export.rb
CHANGED
@@ -39,6 +39,7 @@ require_relative "candidhealth/encounters/v_4/types/encounter"
|
|
39
39
|
require_relative "candidhealth/encounters/v_4/types/encounter_sort_options"
|
40
40
|
require_relative "candidhealth/encounters/v_4/types/medication"
|
41
41
|
require_relative "candidhealth/encounters/v_4/types/vitals"
|
42
|
+
require_relative "candidhealth/encounters/v_4/types/vitals_update"
|
42
43
|
require_relative "candidhealth/encounters/v_4/types/intervention"
|
43
44
|
require_relative "candidhealth/encounters/v_4/types/intervention_category"
|
44
45
|
require_relative "candidhealth/encounters/v_4/types/lab"
|
@@ -161,6 +162,7 @@ require_relative "candidhealth/invoices/v_2/types/claim_invoice_item"
|
|
161
162
|
require_relative "candidhealth/invoices/v_2/types/claim_invoice_item_info"
|
162
163
|
require_relative "candidhealth/invoices/v_2/types/unattributed_invoice_item"
|
163
164
|
require_relative "candidhealth/invoices/v_2/types/invoice_item_info"
|
165
|
+
require_relative "candidhealth/medication_dispense/v_1/types/medication_dispense_create"
|
164
166
|
require_relative "candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment"
|
165
167
|
require_relative "candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment_create"
|
166
168
|
require_relative "candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payments_page"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: candidhealth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.31.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- lib/candidhealth/encounters/v_4/types/synchronicity_type.rb
|
222
222
|
- lib/candidhealth/encounters/v_4/types/value_does_not_match_key_type_error.rb
|
223
223
|
- lib/candidhealth/encounters/v_4/types/vitals.rb
|
224
|
+
- lib/candidhealth/encounters/v_4/types/vitals_update.rb
|
224
225
|
- lib/candidhealth/era/types/era.rb
|
225
226
|
- lib/candidhealth/era/types/era_base.rb
|
226
227
|
- lib/candidhealth/era/types/era_not_fully_processed_error_message.rb
|
@@ -368,6 +369,9 @@ files:
|
|
368
369
|
- lib/candidhealth/invoices/v_2/types/invoice_status.rb
|
369
370
|
- lib/candidhealth/invoices/v_2/types/service_line_invoice_item.rb
|
370
371
|
- lib/candidhealth/invoices/v_2/types/unattributed_invoice_item.rb
|
372
|
+
- lib/candidhealth/medication_dispense/client.rb
|
373
|
+
- lib/candidhealth/medication_dispense/v_1/client.rb
|
374
|
+
- lib/candidhealth/medication_dispense/v_1/types/medication_dispense_create.rb
|
371
375
|
- lib/candidhealth/non_insurance_payer_payments/client.rb
|
372
376
|
- lib/candidhealth/non_insurance_payer_payments/v_1/client.rb
|
373
377
|
- lib/candidhealth/non_insurance_payer_payments/v_1/types/non_insurance_payer_payment.rb
|