candidhealth 0.17.4 → 0.17.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/candidhealth/claim_submission/v_1/types/claim_frequency_type_code.rb +0 -1
- data/lib/candidhealth/encounters/v_4/client.rb +46 -28
- data/lib/candidhealth/encounters/v_4/types/encounter.rb +33 -31
- data/lib/candidhealth/encounters/v_4/types/encounter_base.rb +7 -31
- data/lib/candidhealth/service_lines/v_2/types/service_line.rb +20 -5
- data/lib/candidhealth/service_lines/v_2/types/service_line_create.rb +19 -4
- data/lib/requests.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5f3548c53a29fefa3d69a5df618b6d1a972ea705cbce1894f84c5d21fb59196
|
4
|
+
data.tar.gz: 45da861a9a0587a1aec4bd50f2c3f86a74f7d0f79ce19d611c7112fbd815d2ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ceadc55e333bff54c8c2558019afcc99cf3df442e81486cfc5c6936afacf7d579b65844ab66660ca481554feb73c657142bbb8f97d872fa03a888671c3ce0663
|
7
|
+
data.tar.gz: 956d715ea2f5b2368d28801daf81094576f2775ef91c3b92736f5d818a60442bffb69b09ec5a3cd1f767f1f5f351820c6d8251cb02c29825905afe8abecd6822
|
@@ -70,10 +70,11 @@ module CandidApiClient
|
|
70
70
|
# @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
|
71
71
|
# @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
|
72
72
|
# @param owner_of_next_action [Encounters::V4::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as defined by ownership of open Tasks.
|
73
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
73
74
|
# @param request_options [RequestOptions]
|
74
75
|
# @return [Encounters::V4::EncounterPage]
|
75
76
|
def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
|
76
|
-
date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, request_options: nil)
|
77
|
+
date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
|
77
78
|
response = @request_client.conn.get("/api/encounters/v4") do |req|
|
78
79
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
79
80
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -94,7 +95,8 @@ module CandidApiClient
|
|
94
95
|
"work_queue_id": work_queue_id,
|
95
96
|
"billable_status": billable_status,
|
96
97
|
"responsible_party": responsible_party,
|
97
|
-
"owner_of_next_action": owner_of_next_action
|
98
|
+
"owner_of_next_action": owner_of_next_action,
|
99
|
+
"patient_external_id": patient_external_id
|
98
100
|
}.compact
|
99
101
|
end
|
100
102
|
Encounters::V4::EncounterPage.from_json(json_object: response.body)
|
@@ -115,14 +117,6 @@ module CandidApiClient
|
|
115
117
|
# @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
|
116
118
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
117
119
|
# This field should not contain PHI.
|
118
|
-
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
119
|
-
# This date must be the local date in the timezone where the service occurred.
|
120
|
-
# Box 24a on the CMS-1500 claim form.
|
121
|
-
# If service occurred over a range of dates, this should be the start date.
|
122
|
-
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
123
|
-
# This date must be the local date in the timezone where the service occurred.
|
124
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
125
|
-
# Must not be temporally before the date_of_service field.
|
126
120
|
# @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
127
121
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
128
122
|
# for billing purpose.
|
@@ -196,6 +190,17 @@ module CandidApiClient
|
|
196
190
|
# @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
197
191
|
# Code indicating the reason why a request was delayed
|
198
192
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
193
|
+
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
194
|
+
# This date must be the local date in the timezone where the service occurred.
|
195
|
+
# Box 24a on the CMS-1500 claim form.
|
196
|
+
# If service occurred over a range of dates, this should be the start date.
|
197
|
+
# date_of_service must be defined on either the encounter or the service lines but not both.
|
198
|
+
# If there are greater than zero service lines, it is recommended to specify date_of_service on the service_line instead of on the encounter to prepare for future API versions.
|
199
|
+
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
200
|
+
# This date must be the local date in the timezone where the service occurred.
|
201
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
202
|
+
# Must not be temporally before the date_of_service field.
|
203
|
+
# If there are greater than zero service lines, it is recommended to specify end_date_of_service on the service_line instead of on the encounter to prepare for future API versions.
|
199
204
|
# @param patient [Hash] Contains the identification information of the individual receiving medical services.Request of type Individual::PatientCreate, as a Hash
|
200
205
|
# * :phone_numbers (Array<Commons::PhoneNumber>)
|
201
206
|
# * :phone_consent (Boolean)
|
@@ -357,6 +362,8 @@ module CandidApiClient
|
|
357
362
|
# * :pharmacy_prescription_number (String)
|
358
363
|
# * :place_of_service_code (Commons::FacilityTypeCode)
|
359
364
|
# * :description (String)
|
365
|
+
# * :date_of_service (Date)
|
366
|
+
# * :end_date_of_service (Date)
|
360
367
|
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type Guarantor::V1::GuarantorCreate, as a Hash
|
361
368
|
# * :phone_numbers (Array<Commons::PhoneNumber>)
|
362
369
|
# * :phone_consent (Boolean)
|
@@ -381,8 +388,8 @@ module CandidApiClient
|
|
381
388
|
# * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
|
382
389
|
# @param request_options [RequestOptions]
|
383
390
|
# @return [Encounters::V4::Encounter]
|
384
|
-
def create(external_id:,
|
385
|
-
provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:,
|
391
|
+
def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
392
|
+
provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
|
386
393
|
response = @request_client.conn.post("/api/encounters/v4") do |req|
|
387
394
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
388
395
|
req.headers["Authorization"] = request_options.token unless request_options&.token.nil?
|
@@ -390,8 +397,6 @@ module CandidApiClient
|
|
390
397
|
req.body = {
|
391
398
|
**(request_options&.additional_body_parameters || {}),
|
392
399
|
external_id: external_id,
|
393
|
-
date_of_service: date_of_service,
|
394
|
-
end_date_of_service: end_date_of_service,
|
395
400
|
prior_authorization_number: prior_authorization_number,
|
396
401
|
patient_authorized_release: patient_authorized_release,
|
397
402
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
@@ -412,6 +417,8 @@ module CandidApiClient
|
|
412
417
|
last_menstrual_period_date: last_menstrual_period_date,
|
413
418
|
delay_reason_code: delay_reason_code,
|
414
419
|
additional_properties: additional_properties,
|
420
|
+
date_of_service: date_of_service,
|
421
|
+
end_date_of_service: end_date_of_service,
|
415
422
|
patient: patient,
|
416
423
|
billing_provider: billing_provider,
|
417
424
|
rendering_provider: rendering_provider,
|
@@ -441,6 +448,7 @@ module CandidApiClient
|
|
441
448
|
# This date must be the local date in the timezone where the service occurred.
|
442
449
|
# Box 24a on the CMS-1500 claim form.
|
443
450
|
# If service occurred over a range of dates, this should be the start date.
|
451
|
+
# If service lines have distinct date_of_service values, updating the encounter's date_of_service will fail. If all service line date_of_service values are the same, updating the encounter's date_of_service will update all service line date_of_service values.
|
444
452
|
# @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
|
445
453
|
# may be submitted at this time, and coders will later prioritize the 12 that will be
|
446
454
|
# submitted to the payor.
|
@@ -466,6 +474,7 @@ module CandidApiClient
|
|
466
474
|
# This date must be the local date in the timezone where the service occurred.
|
467
475
|
# If omitted, the Encounter is assumed to be for a single day.
|
468
476
|
# Must not be temporally before the date_of_service field.
|
477
|
+
# If service lines have distinct end_date_of_service values, updating the encounter's end_date_of_service will fail. If all service line end_date_of_service values are the same, updating the encounter's end_date_of_service will update all service line date_of_service values.
|
469
478
|
# @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
|
470
479
|
# * :insurance_card (Hash)
|
471
480
|
# * :member_id (String)
|
@@ -605,10 +614,11 @@ module CandidApiClient
|
|
605
614
|
# @param billable_status [Encounters::V4::BillableStatusType] Defines if the Encounter is to be billed by Candid to the responsible_party. Examples for when this should be set to NOT_BILLABLE include if the Encounter has not occurred yet or if there is no intention of ever billing the responsible_party.
|
606
615
|
# @param responsible_party [Encounters::V4::ResponsiblePartyType] Defines the party to be billed with the initial balance owed on the claim. Use SELF_PAY if you intend to bill self pay/cash pay.
|
607
616
|
# @param owner_of_next_action [Encounters::V4::EncounterOwnerOfNextActionType] The party who is responsible for taking the next action on an Encounter, as defined by ownership of open Tasks.
|
617
|
+
# @param patient_external_id [String] The patient ID from the external EMR platform for the patient
|
608
618
|
# @param request_options [RequestOptions]
|
609
619
|
# @return [Encounters::V4::EncounterPage]
|
610
620
|
def get_all(limit: nil, claim_status: nil, sort: nil, page_token: nil, date_of_service_min: nil,
|
611
|
-
date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, request_options: nil)
|
621
|
+
date_of_service_max: nil, primary_payer_names: nil, search_term: nil, external_id: nil, diagnoses_updated_since: nil, tag_ids: nil, work_queue_id: nil, billable_status: nil, responsible_party: nil, owner_of_next_action: nil, patient_external_id: nil, request_options: nil)
|
612
622
|
Async do
|
613
623
|
response = @request_client.conn.get("/api/encounters/v4") do |req|
|
614
624
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -630,7 +640,8 @@ module CandidApiClient
|
|
630
640
|
"work_queue_id": work_queue_id,
|
631
641
|
"billable_status": billable_status,
|
632
642
|
"responsible_party": responsible_party,
|
633
|
-
"owner_of_next_action": owner_of_next_action
|
643
|
+
"owner_of_next_action": owner_of_next_action,
|
644
|
+
"patient_external_id": patient_external_id
|
634
645
|
}.compact
|
635
646
|
end
|
636
647
|
Encounters::V4::EncounterPage.from_json(json_object: response.body)
|
@@ -654,14 +665,6 @@ module CandidApiClient
|
|
654
665
|
# @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
|
655
666
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
656
667
|
# This field should not contain PHI.
|
657
|
-
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
658
|
-
# This date must be the local date in the timezone where the service occurred.
|
659
|
-
# Box 24a on the CMS-1500 claim form.
|
660
|
-
# If service occurred over a range of dates, this should be the start date.
|
661
|
-
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
662
|
-
# This date must be the local date in the timezone where the service occurred.
|
663
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
664
|
-
# Must not be temporally before the date_of_service field.
|
665
668
|
# @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
666
669
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
667
670
|
# for billing purpose.
|
@@ -735,6 +738,17 @@ module CandidApiClient
|
|
735
738
|
# @param delay_reason_code [Commons::DelayReasonCode] 837i Loop2300, CLM-1300 Box 20
|
736
739
|
# Code indicating the reason why a request was delayed
|
737
740
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
741
|
+
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
742
|
+
# This date must be the local date in the timezone where the service occurred.
|
743
|
+
# Box 24a on the CMS-1500 claim form.
|
744
|
+
# If service occurred over a range of dates, this should be the start date.
|
745
|
+
# date_of_service must be defined on either the encounter or the service lines but not both.
|
746
|
+
# If there are greater than zero service lines, it is recommended to specify date_of_service on the service_line instead of on the encounter to prepare for future API versions.
|
747
|
+
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
748
|
+
# This date must be the local date in the timezone where the service occurred.
|
749
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
750
|
+
# Must not be temporally before the date_of_service field.
|
751
|
+
# If there are greater than zero service lines, it is recommended to specify end_date_of_service on the service_line instead of on the encounter to prepare for future API versions.
|
738
752
|
# @param patient [Hash] Contains the identification information of the individual receiving medical services.Request of type Individual::PatientCreate, as a Hash
|
739
753
|
# * :phone_numbers (Array<Commons::PhoneNumber>)
|
740
754
|
# * :phone_consent (Boolean)
|
@@ -896,6 +910,8 @@ module CandidApiClient
|
|
896
910
|
# * :pharmacy_prescription_number (String)
|
897
911
|
# * :place_of_service_code (Commons::FacilityTypeCode)
|
898
912
|
# * :description (String)
|
913
|
+
# * :date_of_service (Date)
|
914
|
+
# * :end_date_of_service (Date)
|
899
915
|
# @param guarantor [Hash] Personal and contact info for the guarantor of the patient responsibility.Request of type Guarantor::V1::GuarantorCreate, as a Hash
|
900
916
|
# * :phone_numbers (Array<Commons::PhoneNumber>)
|
901
917
|
# * :phone_consent (Boolean)
|
@@ -920,8 +936,8 @@ module CandidApiClient
|
|
920
936
|
# * :submission_records (Array<ClaimSubmission::V1::ClaimSubmissionRecordCreate>)
|
921
937
|
# @param request_options [RequestOptions]
|
922
938
|
# @return [Encounters::V4::Encounter]
|
923
|
-
def create(external_id:,
|
924
|
-
provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:,
|
939
|
+
def create(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
940
|
+
provider_accepts_assignment:, billable_status:, responsible_party:, patient:, billing_provider:, rendering_provider:, diagnoses:, place_of_service_code:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil, date_of_service: nil, end_date_of_service: nil, referring_provider: nil, service_facility: nil, subscriber_primary: nil, subscriber_secondary: nil, clinical_notes: nil, billing_notes: nil, patient_histories: nil, service_lines: nil, guarantor: nil, external_claim_submission: nil, request_options: nil)
|
925
941
|
Async do
|
926
942
|
response = @request_client.conn.post("/api/encounters/v4") do |req|
|
927
943
|
req.options.timeout = request_options.timeout_in_seconds unless request_options&.timeout_in_seconds.nil?
|
@@ -930,8 +946,6 @@ module CandidApiClient
|
|
930
946
|
req.body = {
|
931
947
|
**(request_options&.additional_body_parameters || {}),
|
932
948
|
external_id: external_id,
|
933
|
-
date_of_service: date_of_service,
|
934
|
-
end_date_of_service: end_date_of_service,
|
935
949
|
prior_authorization_number: prior_authorization_number,
|
936
950
|
patient_authorized_release: patient_authorized_release,
|
937
951
|
benefits_assigned_to_provider: benefits_assigned_to_provider,
|
@@ -952,6 +966,8 @@ module CandidApiClient
|
|
952
966
|
last_menstrual_period_date: last_menstrual_period_date,
|
953
967
|
delay_reason_code: delay_reason_code,
|
954
968
|
additional_properties: additional_properties,
|
969
|
+
date_of_service: date_of_service,
|
970
|
+
end_date_of_service: end_date_of_service,
|
955
971
|
patient: patient,
|
956
972
|
billing_provider: billing_provider,
|
957
973
|
rendering_provider: rendering_provider,
|
@@ -982,6 +998,7 @@ module CandidApiClient
|
|
982
998
|
# This date must be the local date in the timezone where the service occurred.
|
983
999
|
# Box 24a on the CMS-1500 claim form.
|
984
1000
|
# If service occurred over a range of dates, this should be the start date.
|
1001
|
+
# If service lines have distinct date_of_service values, updating the encounter's date_of_service will fail. If all service line date_of_service values are the same, updating the encounter's date_of_service will update all service line date_of_service values.
|
985
1002
|
# @param diagnosis_ids [Array<Diagnoses::DIAGNOSIS_ID>] Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses
|
986
1003
|
# may be submitted at this time, and coders will later prioritize the 12 that will be
|
987
1004
|
# submitted to the payor.
|
@@ -1007,6 +1024,7 @@ module CandidApiClient
|
|
1007
1024
|
# This date must be the local date in the timezone where the service occurred.
|
1008
1025
|
# If omitted, the Encounter is assumed to be for a single day.
|
1009
1026
|
# Must not be temporally before the date_of_service field.
|
1027
|
+
# If service lines have distinct end_date_of_service values, updating the encounter's end_date_of_service will fail. If all service line end_date_of_service values are the same, updating the encounter's end_date_of_service will update all service line date_of_service values.
|
1010
1028
|
# @param subscriber_primary [Hash] Contains details of the primary insurance subscriber.Request of type Individual::SubscriberCreate, as a Hash
|
1011
1029
|
# * :insurance_card (Hash)
|
1012
1030
|
# * :member_id (String)
|
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative "../../../commons/types/date"
|
3
4
|
require_relative "../../../commons/types/encounter_id"
|
4
5
|
require_relative "../../../claims/types/claim"
|
5
6
|
require_relative "../../../individual/types/patient"
|
@@ -21,7 +22,6 @@ require "date"
|
|
21
22
|
require_relative "encounter_owner_of_next_action_type"
|
22
23
|
require_relative "encounter_submission_origin_type"
|
23
24
|
require_relative "../../../commons/types/encounter_external_id"
|
24
|
-
require_relative "../../../commons/types/date"
|
25
25
|
require_relative "prior_authorization_number"
|
26
26
|
require_relative "medication"
|
27
27
|
require_relative "vitals"
|
@@ -38,9 +38,18 @@ module CandidApiClient
|
|
38
38
|
module Encounters
|
39
39
|
module V4
|
40
40
|
class Encounter
|
41
|
-
attr_reader :
|
42
|
-
:referring_provider, :service_facility, :subscriber_primary, :subscriber_secondary, :url, :diagnoses, :clinical_notes, :billing_notes, :place_of_service_code, :place_of_service_code_as_submitted, :patient_histories, :patient_payments, :tags, :coding_attribution, :work_queue_id, :work_queue_membership_activated_at, :owner_of_next_action, :submission_origin, :external_id, :
|
41
|
+
attr_reader :date_of_service, :end_date_of_service, :encounter_id, :claims, :patient, :guarantor,
|
42
|
+
:billing_provider, :rendering_provider, :referring_provider, :service_facility, :subscriber_primary, :subscriber_secondary, :url, :diagnoses, :clinical_notes, :billing_notes, :place_of_service_code, :place_of_service_code_as_submitted, :patient_histories, :patient_payments, :tags, :coding_attribution, :work_queue_id, :work_queue_membership_activated_at, :owner_of_next_action, :submission_origin, :external_id, :prior_authorization_number, :patient_authorized_release, :benefits_assigned_to_provider, :provider_accepts_assignment, :appointment_type, :existing_medications, :vitals, :interventions, :pay_to_address, :synchronicity, :billable_status, :responsible_party, :additional_information, :service_authorization_exception_code, :admission_date, :discharge_date, :onset_of_current_illness_or_symptom_date, :last_menstrual_period_date, :delay_reason_code, :additional_properties
|
43
43
|
|
44
|
+
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
45
|
+
# This date must be the local date in the timezone where the service occurred.
|
46
|
+
# Box 24a on the CMS-1500 claim form.
|
47
|
+
# If service occurred over a range of dates, this should be the start date.
|
48
|
+
# date_of_service must be defined on either the encounter or the service lines but not both.
|
49
|
+
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
50
|
+
# This date must be the local date in the timezone where the service occurred.
|
51
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
52
|
+
# Must not be temporally before the date_of_service field.
|
44
53
|
# @param encounter_id [Commons::ENCOUNTER_ID]
|
45
54
|
# @param claims [Array<Claims::Claim>]
|
46
55
|
# @param patient [Individual::Patient] Contains the identification information of the individual receiving medical services.
|
@@ -75,14 +84,6 @@ module CandidApiClient
|
|
75
84
|
# @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
|
76
85
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
77
86
|
# This field should not contain PHI.
|
78
|
-
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
79
|
-
# This date must be the local date in the timezone where the service occurred.
|
80
|
-
# Box 24a on the CMS-1500 claim form.
|
81
|
-
# If service occurred over a range of dates, this should be the start date.
|
82
|
-
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
83
|
-
# This date must be the local date in the timezone where the service occurred.
|
84
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
85
|
-
# Must not be temporally before the date_of_service field.
|
86
87
|
# @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
87
88
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
88
89
|
# for billing purpose.
|
@@ -129,8 +130,19 @@ module CandidApiClient
|
|
129
130
|
# Code indicating the reason why a request was delayed
|
130
131
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
131
132
|
# @return [Encounters::V4::Encounter]
|
132
|
-
def initialize(encounter_id:, claims:, patient:, billing_provider:, rendering_provider:,
|
133
|
-
referring_provider: nil, subscriber_primary: nil, subscriber_secondary: nil, billing_notes: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, coding_attribution: nil, work_queue_id: nil, work_queue_membership_activated_at: nil,
|
133
|
+
def initialize(date_of_service:, encounter_id:, claims:, patient:, billing_provider:, rendering_provider:,
|
134
|
+
service_facility:, url:, diagnoses:, clinical_notes:, patient_histories:, patient_payments:, tags:, owner_of_next_action:, submission_origin:, external_id:, patient_authorized_release:, benefits_assigned_to_provider:, provider_accepts_assignment:, billable_status:, responsible_party:, end_date_of_service: nil, guarantor: nil, referring_provider: nil, subscriber_primary: nil, subscriber_secondary: nil, billing_notes: nil, place_of_service_code: nil, place_of_service_code_as_submitted: nil, coding_attribution: nil, work_queue_id: nil, work_queue_membership_activated_at: nil, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil)
|
135
|
+
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
136
|
+
# This date must be the local date in the timezone where the service occurred.
|
137
|
+
# Box 24a on the CMS-1500 claim form.
|
138
|
+
# If service occurred over a range of dates, this should be the start date.
|
139
|
+
# date_of_service must be defined on either the encounter or the service lines but not both.
|
140
|
+
@date_of_service = date_of_service
|
141
|
+
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
142
|
+
# This date must be the local date in the timezone where the service occurred.
|
143
|
+
# If omitted, the Encounter is assumed to be for a single day.
|
144
|
+
# Must not be temporally before the date_of_service field.
|
145
|
+
@end_date_of_service = end_date_of_service
|
134
146
|
# @type [Commons::ENCOUNTER_ID]
|
135
147
|
@encounter_id = encounter_id
|
136
148
|
# @type [Array<Claims::Claim>]
|
@@ -190,16 +202,6 @@ module CandidApiClient
|
|
190
202
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
191
203
|
# This field should not contain PHI.
|
192
204
|
@external_id = external_id
|
193
|
-
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
194
|
-
# This date must be the local date in the timezone where the service occurred.
|
195
|
-
# Box 24a on the CMS-1500 claim form.
|
196
|
-
# If service occurred over a range of dates, this should be the start date.
|
197
|
-
@date_of_service = date_of_service
|
198
|
-
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
199
|
-
# This date must be the local date in the timezone where the service occurred.
|
200
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
201
|
-
# Must not be temporally before the date_of_service field.
|
202
|
-
@end_date_of_service = end_date_of_service
|
203
205
|
# @type [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
204
206
|
@prior_authorization_number = prior_authorization_number
|
205
207
|
# @type [Boolean] Whether this patient has authorized the release of medical information
|
@@ -274,6 +276,8 @@ module CandidApiClient
|
|
274
276
|
def self.from_json(json_object:)
|
275
277
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
276
278
|
parsed_json = JSON.parse(json_object)
|
279
|
+
date_of_service = struct.date_of_service
|
280
|
+
end_date_of_service = struct.end_date_of_service
|
277
281
|
encounter_id = struct.encounter_id
|
278
282
|
claims = parsed_json["claims"]&.map do |v|
|
279
283
|
v = v.to_json
|
@@ -362,8 +366,6 @@ module CandidApiClient
|
|
362
366
|
owner_of_next_action = struct.owner_of_next_action
|
363
367
|
submission_origin = struct.submission_origin
|
364
368
|
external_id = struct.external_id
|
365
|
-
date_of_service = struct.date_of_service
|
366
|
-
end_date_of_service = struct.end_date_of_service
|
367
369
|
prior_authorization_number = struct.prior_authorization_number
|
368
370
|
patient_authorized_release = struct.patient_authorized_release
|
369
371
|
benefits_assigned_to_provider = struct.benefits_assigned_to_provider
|
@@ -399,8 +401,8 @@ module CandidApiClient
|
|
399
401
|
onset_of_current_illness_or_symptom_date = struct.onset_of_current_illness_or_symptom_date
|
400
402
|
last_menstrual_period_date = struct.last_menstrual_period_date
|
401
403
|
delay_reason_code = struct.delay_reason_code
|
402
|
-
new(
|
403
|
-
billing_provider: billing_provider, rendering_provider: rendering_provider, referring_provider: referring_provider, service_facility: service_facility, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, url: url, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, place_of_service_code_as_submitted: place_of_service_code_as_submitted, patient_histories: patient_histories, patient_payments: patient_payments, tags: tags, coding_attribution: coding_attribution, work_queue_id: work_queue_id, work_queue_membership_activated_at: work_queue_membership_activated_at, owner_of_next_action: owner_of_next_action, submission_origin: submission_origin, external_id: external_id,
|
404
|
+
new(date_of_service: date_of_service, end_date_of_service: end_date_of_service, encounter_id: encounter_id,
|
405
|
+
claims: claims, patient: patient, guarantor: guarantor, billing_provider: billing_provider, rendering_provider: rendering_provider, referring_provider: referring_provider, service_facility: service_facility, subscriber_primary: subscriber_primary, subscriber_secondary: subscriber_secondary, url: url, diagnoses: diagnoses, clinical_notes: clinical_notes, billing_notes: billing_notes, place_of_service_code: place_of_service_code, place_of_service_code_as_submitted: place_of_service_code_as_submitted, patient_histories: patient_histories, patient_payments: patient_payments, tags: tags, coding_attribution: coding_attribution, work_queue_id: work_queue_id, work_queue_membership_activated_at: work_queue_membership_activated_at, owner_of_next_action: owner_of_next_action, submission_origin: submission_origin, external_id: external_id, prior_authorization_number: prior_authorization_number, patient_authorized_release: patient_authorized_release, benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, responsible_party: responsible_party, additional_information: additional_information, service_authorization_exception_code: service_authorization_exception_code, admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: struct)
|
404
406
|
end
|
405
407
|
|
406
408
|
# Serialize an instance of Encounter to a JSON object
|
@@ -408,6 +410,8 @@ module CandidApiClient
|
|
408
410
|
# @return [JSON]
|
409
411
|
def to_json(*_args)
|
410
412
|
{
|
413
|
+
"date_of_service": @date_of_service,
|
414
|
+
"end_date_of_service": @end_date_of_service,
|
411
415
|
"encounter_id": @encounter_id,
|
412
416
|
"claims": @claims,
|
413
417
|
"patient": @patient,
|
@@ -433,8 +437,6 @@ module CandidApiClient
|
|
433
437
|
"owner_of_next_action": @owner_of_next_action,
|
434
438
|
"submission_origin": @submission_origin,
|
435
439
|
"external_id": @external_id,
|
436
|
-
"date_of_service": @date_of_service,
|
437
|
-
"end_date_of_service": @end_date_of_service,
|
438
440
|
"prior_authorization_number": @prior_authorization_number,
|
439
441
|
"patient_authorized_release": @patient_authorized_release,
|
440
442
|
"benefits_assigned_to_provider": @benefits_assigned_to_provider,
|
@@ -462,6 +464,8 @@ module CandidApiClient
|
|
462
464
|
# @param obj [Object]
|
463
465
|
# @return [Void]
|
464
466
|
def self.validate_raw(obj:)
|
467
|
+
obj.date_of_service.is_a?(String) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
468
|
+
obj.end_date_of_service&.is_a?(String) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
465
469
|
obj.encounter_id.is_a?(UUID) != false || raise("Passed value for field obj.encounter_id is not the expected type, validation failed.")
|
466
470
|
obj.claims.is_a?(Array) != false || raise("Passed value for field obj.claims is not the expected type, validation failed.")
|
467
471
|
Individual::Patient.validate_raw(obj: obj.patient)
|
@@ -487,8 +491,6 @@ module CandidApiClient
|
|
487
491
|
obj.owner_of_next_action.is_a?(Encounters::V4::EncounterOwnerOfNextActionType) != false || raise("Passed value for field obj.owner_of_next_action is not the expected type, validation failed.")
|
488
492
|
obj.submission_origin.is_a?(Encounters::V4::EncounterSubmissionOriginType) != false || raise("Passed value for field obj.submission_origin is not the expected type, validation failed.")
|
489
493
|
obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
|
490
|
-
obj.date_of_service.is_a?(String) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
491
|
-
obj.end_date_of_service&.is_a?(String) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
492
494
|
obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
|
493
495
|
obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
|
494
496
|
obj.benefits_assigned_to_provider.is_a?(Boolean) != false || raise("Passed value for field obj.benefits_assigned_to_provider is not the expected type, validation failed.")
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require_relative "../../../commons/types/encounter_external_id"
|
4
|
-
require_relative "../../../commons/types/date"
|
5
4
|
require_relative "prior_authorization_number"
|
6
5
|
require_relative "medication"
|
7
6
|
require_relative "vitals"
|
@@ -11,6 +10,7 @@ require_relative "synchronicity_type"
|
|
11
10
|
require_relative "billable_status_type"
|
12
11
|
require_relative "responsible_party_type"
|
13
12
|
require_relative "service_authorization_exception_code"
|
13
|
+
require_relative "../../../commons/types/date"
|
14
14
|
require_relative "../../../commons/types/delay_reason_code"
|
15
15
|
require "json"
|
16
16
|
|
@@ -18,20 +18,12 @@ module CandidApiClient
|
|
18
18
|
module Encounters
|
19
19
|
module V4
|
20
20
|
class EncounterBase
|
21
|
-
attr_reader :external_id, :
|
22
|
-
:
|
21
|
+
attr_reader :external_id, :prior_authorization_number, :patient_authorized_release,
|
22
|
+
:benefits_assigned_to_provider, :provider_accepts_assignment, :appointment_type, :existing_medications, :vitals, :interventions, :pay_to_address, :synchronicity, :billable_status, :responsible_party, :additional_information, :service_authorization_exception_code, :admission_date, :discharge_date, :onset_of_current_illness_or_symptom_date, :last_menstrual_period_date, :delay_reason_code, :additional_properties
|
23
23
|
|
24
24
|
# @param external_id [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
|
25
25
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
26
26
|
# This field should not contain PHI.
|
27
|
-
# @param date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
28
|
-
# This date must be the local date in the timezone where the service occurred.
|
29
|
-
# Box 24a on the CMS-1500 claim form.
|
30
|
-
# If service occurred over a range of dates, this should be the start date.
|
31
|
-
# @param end_date_of_service [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
32
|
-
# This date must be the local date in the timezone where the service occurred.
|
33
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
34
|
-
# Must not be temporally before the date_of_service field.
|
35
27
|
# @param prior_authorization_number [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
36
28
|
# @param patient_authorized_release [Boolean] Whether this patient has authorized the release of medical information
|
37
29
|
# for billing purpose.
|
@@ -78,22 +70,12 @@ module CandidApiClient
|
|
78
70
|
# Code indicating the reason why a request was delayed
|
79
71
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
80
72
|
# @return [Encounters::V4::EncounterBase]
|
81
|
-
def initialize(external_id:,
|
82
|
-
provider_accepts_assignment:, billable_status:, responsible_party:,
|
73
|
+
def initialize(external_id:, patient_authorized_release:, benefits_assigned_to_provider:,
|
74
|
+
provider_accepts_assignment:, billable_status:, responsible_party:, prior_authorization_number: nil, appointment_type: nil, existing_medications: nil, vitals: nil, interventions: nil, pay_to_address: nil, synchronicity: 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, additional_properties: nil)
|
83
75
|
# @type [Commons::ENCOUNTER_EXTERNAL_ID] A client-specified unique ID to associate with this encounter;
|
84
76
|
# for example, your internal encounter ID or a Dr. Chrono encounter ID.
|
85
77
|
# This field should not contain PHI.
|
86
78
|
@external_id = external_id
|
87
|
-
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-24.
|
88
|
-
# This date must be the local date in the timezone where the service occurred.
|
89
|
-
# Box 24a on the CMS-1500 claim form.
|
90
|
-
# If service occurred over a range of dates, this should be the start date.
|
91
|
-
@date_of_service = date_of_service
|
92
|
-
# @type [Commons::DATE] Date formatted as YYYY-MM-DD; eg: 2019-08-25.
|
93
|
-
# This date must be the local date in the timezone where the service occurred.
|
94
|
-
# If omitted, the Encounter is assumed to be for a single day.
|
95
|
-
# Must not be temporally before the date_of_service field.
|
96
|
-
@end_date_of_service = end_date_of_service
|
97
79
|
# @type [Encounters::V4::PRIOR_AUTHORIZATION_NUMBER] Box 23 on the CMS-1500 claim form.
|
98
80
|
@prior_authorization_number = prior_authorization_number
|
99
81
|
# @type [Boolean] Whether this patient has authorized the release of medical information
|
@@ -169,8 +151,6 @@ module CandidApiClient
|
|
169
151
|
struct = JSON.parse(json_object, object_class: OpenStruct)
|
170
152
|
parsed_json = JSON.parse(json_object)
|
171
153
|
external_id = struct.external_id
|
172
|
-
date_of_service = struct.date_of_service
|
173
|
-
end_date_of_service = struct.end_date_of_service
|
174
154
|
prior_authorization_number = struct.prior_authorization_number
|
175
155
|
patient_authorized_release = struct.patient_authorized_release
|
176
156
|
benefits_assigned_to_provider = struct.benefits_assigned_to_provider
|
@@ -206,8 +186,8 @@ module CandidApiClient
|
|
206
186
|
onset_of_current_illness_or_symptom_date = struct.onset_of_current_illness_or_symptom_date
|
207
187
|
last_menstrual_period_date = struct.last_menstrual_period_date
|
208
188
|
delay_reason_code = struct.delay_reason_code
|
209
|
-
new(external_id: external_id,
|
210
|
-
|
189
|
+
new(external_id: external_id, prior_authorization_number: prior_authorization_number,
|
190
|
+
patient_authorized_release: patient_authorized_release, benefits_assigned_to_provider: benefits_assigned_to_provider, provider_accepts_assignment: provider_accepts_assignment, appointment_type: appointment_type, existing_medications: existing_medications, vitals: vitals, interventions: interventions, pay_to_address: pay_to_address, synchronicity: synchronicity, billable_status: billable_status, responsible_party: responsible_party, additional_information: additional_information, service_authorization_exception_code: service_authorization_exception_code, admission_date: admission_date, discharge_date: discharge_date, onset_of_current_illness_or_symptom_date: onset_of_current_illness_or_symptom_date, last_menstrual_period_date: last_menstrual_period_date, delay_reason_code: delay_reason_code, additional_properties: struct)
|
211
191
|
end
|
212
192
|
|
213
193
|
# Serialize an instance of EncounterBase to a JSON object
|
@@ -216,8 +196,6 @@ module CandidApiClient
|
|
216
196
|
def to_json(*_args)
|
217
197
|
{
|
218
198
|
"external_id": @external_id,
|
219
|
-
"date_of_service": @date_of_service,
|
220
|
-
"end_date_of_service": @end_date_of_service,
|
221
199
|
"prior_authorization_number": @prior_authorization_number,
|
222
200
|
"patient_authorized_release": @patient_authorized_release,
|
223
201
|
"benefits_assigned_to_provider": @benefits_assigned_to_provider,
|
@@ -246,8 +224,6 @@ module CandidApiClient
|
|
246
224
|
# @return [Void]
|
247
225
|
def self.validate_raw(obj:)
|
248
226
|
obj.external_id.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
|
249
|
-
obj.date_of_service.is_a?(String) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
250
|
-
obj.end_date_of_service&.is_a?(String) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
251
227
|
obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
|
252
228
|
obj.patient_authorized_release.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
|
253
229
|
obj.benefits_assigned_to_provider.is_a?(Boolean) != false || raise("Passed value for field obj.benefits_assigned_to_provider is not the expected type, validation failed.")
|
@@ -12,6 +12,7 @@ require_relative "../../../commons/types/decimal"
|
|
12
12
|
require_relative "../../../commons/types/service_line_units"
|
13
13
|
require_relative "../../../commons/types/claim_id"
|
14
14
|
require_relative "../../../commons/types/date_range_optional_end"
|
15
|
+
require "date"
|
15
16
|
require "json"
|
16
17
|
|
17
18
|
module CandidApiClient
|
@@ -19,7 +20,7 @@ module CandidApiClient
|
|
19
20
|
module V2
|
20
21
|
class ServiceLine
|
21
22
|
attr_reader :modifiers, :charge_amount_cents, :allowed_amount_cents, :insurance_balance_cents,
|
22
|
-
:patient_balance_cents, :paid_amount_cents, :patient_responsibility_cents, :diagnosis_id_zero, :diagnosis_id_one, :diagnosis_id_two, :diagnosis_id_three, :service_line_era_data, :service_line_manual_adjustments, :related_invoices, :denial_reason, :place_of_service_code, :service_line_id, :procedure_code, :quantity, :units, :claim_id, :date_of_service_range, :description, :additional_properties
|
23
|
+
:patient_balance_cents, :paid_amount_cents, :patient_responsibility_cents, :diagnosis_id_zero, :diagnosis_id_one, :diagnosis_id_two, :diagnosis_id_three, :service_line_era_data, :service_line_manual_adjustments, :related_invoices, :denial_reason, :place_of_service_code, :service_line_id, :procedure_code, :quantity, :units, :claim_id, :date_of_service_range, :description, :date_of_service, :end_date_of_service, :additional_properties
|
23
24
|
|
24
25
|
# @param modifiers [Array<Commons::ProcedureModifier>]
|
25
26
|
# @param charge_amount_cents [Integer]
|
@@ -47,10 +48,12 @@ module CandidApiClient
|
|
47
48
|
# @param date_of_service_range [Commons::DateRangeOptionalEnd] A range of dates of service for this service line. If the service line is for a single date, the end date
|
48
49
|
# will be empty.
|
49
50
|
# @param description [String] A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on the 837-P.
|
51
|
+
# @param date_of_service [Date]
|
52
|
+
# @param end_date_of_service [Date]
|
50
53
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
51
54
|
# @return [ServiceLines::V2::ServiceLine]
|
52
|
-
def initialize(service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, modifiers: nil, charge_amount_cents: nil, allowed_amount_cents: nil,
|
53
|
-
insurance_balance_cents: nil, patient_balance_cents: nil, paid_amount_cents: nil, patient_responsibility_cents: nil, diagnosis_id_zero: nil, diagnosis_id_one: nil, diagnosis_id_two: nil, diagnosis_id_three: nil, service_line_era_data: nil, service_line_manual_adjustments: nil, related_invoices: nil, denial_reason: nil, place_of_service_code: nil, description: nil, additional_properties: nil)
|
55
|
+
def initialize(service_line_id:, procedure_code:, quantity:, units:, claim_id:, date_of_service_range:, date_of_service:, modifiers: nil, charge_amount_cents: nil, allowed_amount_cents: nil,
|
56
|
+
insurance_balance_cents: nil, patient_balance_cents: nil, paid_amount_cents: nil, patient_responsibility_cents: nil, diagnosis_id_zero: nil, diagnosis_id_one: nil, diagnosis_id_two: nil, diagnosis_id_three: nil, service_line_era_data: nil, service_line_manual_adjustments: nil, related_invoices: nil, denial_reason: nil, place_of_service_code: nil, description: nil, end_date_of_service: nil, additional_properties: nil)
|
54
57
|
# @type [Array<Commons::ProcedureModifier>]
|
55
58
|
@modifiers = modifiers
|
56
59
|
# @type [Integer]
|
@@ -100,6 +103,10 @@ module CandidApiClient
|
|
100
103
|
@date_of_service_range = date_of_service_range
|
101
104
|
# @type [String] A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on the 837-P.
|
102
105
|
@description = description
|
106
|
+
# @type [Date]
|
107
|
+
@date_of_service = date_of_service
|
108
|
+
# @type [Date]
|
109
|
+
@end_date_of_service = end_date_of_service
|
103
110
|
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
104
111
|
@additional_properties = additional_properties
|
105
112
|
end
|
@@ -155,8 +162,12 @@ module CandidApiClient
|
|
155
162
|
date_of_service_range = Commons::DateRangeOptionalEnd.from_json(json_object: date_of_service_range)
|
156
163
|
end
|
157
164
|
description = struct.description
|
165
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
166
|
+
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
167
|
+
Date.parse(parsed_json["end_date_of_service"])
|
168
|
+
end
|
158
169
|
new(modifiers: modifiers, charge_amount_cents: charge_amount_cents,
|
159
|
-
allowed_amount_cents: allowed_amount_cents, insurance_balance_cents: insurance_balance_cents, patient_balance_cents: patient_balance_cents, paid_amount_cents: paid_amount_cents, patient_responsibility_cents: patient_responsibility_cents, diagnosis_id_zero: diagnosis_id_zero, diagnosis_id_one: diagnosis_id_one, diagnosis_id_two: diagnosis_id_two, diagnosis_id_three: diagnosis_id_three, service_line_era_data: service_line_era_data, service_line_manual_adjustments: service_line_manual_adjustments, related_invoices: related_invoices, denial_reason: denial_reason, place_of_service_code: place_of_service_code, service_line_id: service_line_id, procedure_code: procedure_code, quantity: quantity, units: units, claim_id: claim_id, date_of_service_range: date_of_service_range, description: description, additional_properties: struct)
|
170
|
+
allowed_amount_cents: allowed_amount_cents, insurance_balance_cents: insurance_balance_cents, patient_balance_cents: patient_balance_cents, paid_amount_cents: paid_amount_cents, patient_responsibility_cents: patient_responsibility_cents, diagnosis_id_zero: diagnosis_id_zero, diagnosis_id_one: diagnosis_id_one, diagnosis_id_two: diagnosis_id_two, diagnosis_id_three: diagnosis_id_three, service_line_era_data: service_line_era_data, service_line_manual_adjustments: service_line_manual_adjustments, related_invoices: related_invoices, denial_reason: denial_reason, place_of_service_code: place_of_service_code, service_line_id: service_line_id, procedure_code: procedure_code, quantity: quantity, units: units, claim_id: claim_id, date_of_service_range: date_of_service_range, description: description, date_of_service: date_of_service, end_date_of_service: end_date_of_service, additional_properties: struct)
|
160
171
|
end
|
161
172
|
|
162
173
|
# Serialize an instance of ServiceLine to a JSON object
|
@@ -186,7 +197,9 @@ module CandidApiClient
|
|
186
197
|
"units": @units,
|
187
198
|
"claim_id": @claim_id,
|
188
199
|
"date_of_service_range": @date_of_service_range,
|
189
|
-
"description": @description
|
200
|
+
"description": @description,
|
201
|
+
"date_of_service": @date_of_service,
|
202
|
+
"end_date_of_service": @end_date_of_service
|
190
203
|
}.to_json
|
191
204
|
end
|
192
205
|
|
@@ -218,6 +231,8 @@ module CandidApiClient
|
|
218
231
|
obj.claim_id.is_a?(UUID) != false || raise("Passed value for field obj.claim_id is not the expected type, validation failed.")
|
219
232
|
Commons::DateRangeOptionalEnd.validate_raw(obj: obj.date_of_service_range)
|
220
233
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
234
|
+
obj.date_of_service.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
235
|
+
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
221
236
|
end
|
222
237
|
end
|
223
238
|
end
|
@@ -5,6 +5,7 @@ require_relative "../../../commons/types/decimal"
|
|
5
5
|
require_relative "../../../commons/types/service_line_units"
|
6
6
|
require_relative "drug_identification"
|
7
7
|
require_relative "../../../commons/types/facility_type_code"
|
8
|
+
require "date"
|
8
9
|
require "json"
|
9
10
|
|
10
11
|
module CandidApiClient
|
@@ -12,7 +13,7 @@ module CandidApiClient
|
|
12
13
|
module V2
|
13
14
|
class ServiceLineCreate
|
14
15
|
attr_reader :modifiers, :procedure_code, :quantity, :units, :charge_amount_cents, :diagnosis_pointers,
|
15
|
-
:drug_identification, :place_of_service_code, :description, :additional_properties
|
16
|
+
:drug_identification, :place_of_service_code, :description, :date_of_service, :end_date_of_service, :additional_properties
|
16
17
|
|
17
18
|
# @param modifiers [Array<Commons::ProcedureModifier>]
|
18
19
|
# @param procedure_code [String]
|
@@ -27,10 +28,12 @@ module CandidApiClient
|
|
27
28
|
# @param drug_identification [ServiceLines::V2::DrugIdentification]
|
28
29
|
# @param place_of_service_code [Commons::FacilityTypeCode]
|
29
30
|
# @param description [String] A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on the 837-P.
|
31
|
+
# @param date_of_service [Date]
|
32
|
+
# @param end_date_of_service [Date]
|
30
33
|
# @param additional_properties [OpenStruct] Additional properties unmapped to the current class definition
|
31
34
|
# @return [ServiceLines::V2::ServiceLineCreate]
|
32
35
|
def initialize(procedure_code:, quantity:, units:, diagnosis_pointers:, modifiers: nil,
|
33
|
-
charge_amount_cents: nil, drug_identification: nil, place_of_service_code: nil, description: nil, additional_properties: nil)
|
36
|
+
charge_amount_cents: nil, drug_identification: nil, place_of_service_code: nil, description: nil, date_of_service: nil, end_date_of_service: nil, additional_properties: nil)
|
34
37
|
# @type [Array<Commons::ProcedureModifier>]
|
35
38
|
@modifiers = modifiers
|
36
39
|
# @type [String]
|
@@ -53,6 +56,10 @@ module CandidApiClient
|
|
53
56
|
@place_of_service_code = place_of_service_code
|
54
57
|
# @type [String] A free-form description to clarify the related data elements and their content. Maps to SV1-01, C003-07 on the 837-P.
|
55
58
|
@description = description
|
59
|
+
# @type [Date]
|
60
|
+
@date_of_service = date_of_service
|
61
|
+
# @type [Date]
|
62
|
+
@end_date_of_service = end_date_of_service
|
56
63
|
# @type [OpenStruct] Additional properties unmapped to the current class definition
|
57
64
|
@additional_properties = additional_properties
|
58
65
|
end
|
@@ -78,8 +85,12 @@ module CandidApiClient
|
|
78
85
|
end
|
79
86
|
place_of_service_code = struct.place_of_service_code
|
80
87
|
description = struct.description
|
88
|
+
date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
|
89
|
+
end_date_of_service = unless parsed_json["end_date_of_service"].nil?
|
90
|
+
Date.parse(parsed_json["end_date_of_service"])
|
91
|
+
end
|
81
92
|
new(modifiers: modifiers, procedure_code: procedure_code, quantity: quantity, units: units,
|
82
|
-
charge_amount_cents: charge_amount_cents, diagnosis_pointers: diagnosis_pointers, drug_identification: drug_identification, place_of_service_code: place_of_service_code, description: description, additional_properties: struct)
|
93
|
+
charge_amount_cents: charge_amount_cents, diagnosis_pointers: diagnosis_pointers, drug_identification: drug_identification, place_of_service_code: place_of_service_code, description: description, date_of_service: date_of_service, end_date_of_service: end_date_of_service, additional_properties: struct)
|
83
94
|
end
|
84
95
|
|
85
96
|
# Serialize an instance of ServiceLineCreate to a JSON object
|
@@ -95,7 +106,9 @@ module CandidApiClient
|
|
95
106
|
"diagnosis_pointers": @diagnosis_pointers,
|
96
107
|
"drug_identification": @drug_identification,
|
97
108
|
"place_of_service_code": @place_of_service_code,
|
98
|
-
"description": @description
|
109
|
+
"description": @description,
|
110
|
+
"date_of_service": @date_of_service,
|
111
|
+
"end_date_of_service": @end_date_of_service
|
99
112
|
}.to_json
|
100
113
|
end
|
101
114
|
|
@@ -113,6 +126,8 @@ module CandidApiClient
|
|
113
126
|
obj.drug_identification.nil? || ServiceLines::V2::DrugIdentification.validate_raw(obj: obj.drug_identification)
|
114
127
|
obj.place_of_service_code&.is_a?(Commons::FacilityTypeCode) != false || raise("Passed value for field obj.place_of_service_code is not the expected type, validation failed.")
|
115
128
|
obj.description&.is_a?(String) != false || raise("Passed value for field obj.description is not the expected type, validation failed.")
|
129
|
+
obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
|
130
|
+
obj.end_date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.end_date_of_service is not the expected type, validation failed.")
|
116
131
|
end
|
117
132
|
end
|
118
133
|
end
|
data/lib/requests.rb
CHANGED
@@ -20,7 +20,7 @@ module CandidApiClient
|
|
20
20
|
@headers = {
|
21
21
|
"X-Fern-Language": "Ruby",
|
22
22
|
"X-Fern-SDK-Name": "candidhealth",
|
23
|
-
"X-Fern-SDK-Version": "0.17.
|
23
|
+
"X-Fern-SDK-Version": "0.17.5",
|
24
24
|
"Authorization": "Bearer #{token}"
|
25
25
|
}
|
26
26
|
@conn = Faraday.new(@base_url, headers: @headers) do |faraday|
|
@@ -46,7 +46,7 @@ module CandidApiClient
|
|
46
46
|
@headers = {
|
47
47
|
"X-Fern-Language": "Ruby",
|
48
48
|
"X-Fern-SDK-Name": "candidhealth",
|
49
|
-
"X-Fern-SDK-Version": "0.17.
|
49
|
+
"X-Fern-SDK-Version": "0.17.5",
|
50
50
|
"Authorization": "Bearer #{token}"
|
51
51
|
}
|
52
52
|
@conn = Faraday.new(@base_url, headers: @headers) do |faraday|
|
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.17.
|
4
|
+
version: 0.17.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async-http-faraday
|