Class: CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData

Inherits:
Object
  • Object
show all
Defined in:
lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb

Constant Summary collapse

OMIT =
Object.new

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(diagnoses: OMIT, interventions: OMIT, external_claim_submission: OMIT, service_lines: OMIT, patient_histories: OMIT, billing_notes: OMIT, patient: OMIT, service_facility: OMIT, rendering_provider: OMIT, initial_referring_provider: OMIT, referring_provider: OMIT, supervising_provider: OMIT, billing_provider: OMIT, pay_to_address: OMIT, benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT, date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, guarantor: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: OMIT, additional_properties: nil) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData

Parameters:

  • diagnoses (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>) (defaults to: OMIT)

    Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses may be submitted at this time, and coders will later prioritize the 12 that will be submitted to the payor.

  • interventions (Array<CandidApiClient::Encounters::V4::Types::Intervention>) (defaults to: OMIT)
  • external_claim_submission (CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate) (defaults to: OMIT)

    ***This field is in beta.*** To be included for claims that have been submitted outside of Candid. Candid supports posting remits and payments to these claims and working them in-platform (e.g. editing, resubmitting).

  • service_lines (Array<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate>) (defaults to: OMIT)

    Each service line must be linked to a diagnosis. Concretely, ‘service_line.diagnosis_pointers`must contain at least one entry which should be in bounds of the diagnoses list field.

  • patient_histories (Array<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory>) (defaults to: OMIT)
  • billing_notes (Array<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase>) (defaults to: OMIT)

    Spot to store misc, human-readable, notes about this encounter to be used in the billing process.

  • patient (CandidApiClient::Individual::Types::PatientUpdateWithOptionalAddress) (defaults to: OMIT)

    Contains the identification information of the individual receiving medical services.

  • service_facility (CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress) (defaults to: OMIT)

    Encounter Service facility is typically the location a medical service was rendered, such as a provider office or hospital. For telehealth, service facility can represent the provider’s location when the service was delivered (e.g., home), or the location where an in-person visit would have taken place, whichever is easier to identify. If the provider is in-network, service facility may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that for an in-network claim to be successfully adjudicated, the service facility address listed on claims must match what was provided to the payer during the credentialing process.

  • rendering_provider (CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdateWithOptionalAddress) (defaults to: OMIT)

    The rendering provider is the practitioner – physician, nurse practitioner, etc. – performing the service. For telehealth services, the rendering provider performs the visit, asynchronous communication, or other service. The rendering provider address should generally be the same as the service facility address.

  • initial_referring_provider (CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdateWithOptionalAddress) (defaults to: OMIT)

    The second iteration of Loop ID-2310. Use code “P3 - Primary Care Provider” in this loop to indicate the initial referral from the primary care provider or whatever provider wrote the initial referral for this patient’s episode of care being billed/reported in this transaction.

  • referring_provider (CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdateWithOptionalAddress) (defaults to: OMIT)

    The final provider who referred the services that were rendered. All physicians who order services or refer Medicare beneficiaries must report this data.

  • supervising_provider (CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdateWithOptionalAddress) (defaults to: OMIT)

    Required when the rendering provider is supervised by a physician. If not required by this implementation guide, do not send.

  • billing_provider (CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress) (defaults to: OMIT)

    The billing provider is the provider or business entity submitting the claim. Billing provider may be, but is not necessarily, the same person/NPI as the rendering provider. From a payer’s perspective, this represents the person or entity being reimbursed. When a contract exists with the target payer, the billing provider should be the entity contracted with the payer. In some circumstances, this will be an individual provider. In that case, submit that provider’s NPI and the tax ID (TIN) that the provider gave to the payer during contracting. In other cases, the billing entity will be a medical group. If so, submit the group NPI and the group’s tax ID. Box 33 on the CMS-1500 claim form.

  • pay_to_address (CandidApiClient::Commons::Types::StreetAddressShortZipOptional) (defaults to: OMIT)

    Specifies the address to which payments for the claim should be sent.

  • benefits_assigned_to_provider (Boolean) (defaults to: OMIT)

    Whether this patient has authorized insurance payments to be made to you, not them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim form.

  • prior_authorization_number (String) (defaults to: OMIT)

    Box 23 on the CMS-1500 claim form.

  • external_id (String) (defaults to: OMIT)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

  • date_of_service (Date) (defaults to: OMIT)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred. Box 24a on the CMS-1500 claim form. If service occurred over a range of dates, this should be the start date. 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.

  • tag_ids (Array<String>) (defaults to: OMIT)

    Names of tags that should be on the encounter. Note all tags on encounter will be overridden with this list.

  • clinical_notes (Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>) (defaults to: OMIT)

    Holds a collection of clinical observations made by healthcare providers during patient encounters.

  • billable_status (CandidApiClient::Encounters::V4::Types::BillableStatusType) (defaults to: OMIT)

    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.

  • responsible_party (CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) (defaults to: OMIT)

    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.

  • provider_accepts_assignment (Boolean) (defaults to: OMIT)

    Whether you have accepted the patient’s authorization for insurance payments to be made to you, not them. Box 27 on the CMS-1500 claim form.

  • synchronicity (CandidApiClient::Encounters::V4::Types::SynchronicityType) (defaults to: OMIT)

    Whether or not this was a synchronous or asynchronous encounter. Asynchronous encounters occur when providers and patients communicate online using forms, instant messaging, or other pre-recorded digital mediums. Synchronous encounters occur in live, real-time settings where the patient interacts directly with the provider, such as over video or a phone call.

  • place_of_service_code (CandidApiClient::Commons::Types::FacilityTypeCode) (defaults to: OMIT)

    Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for telemedicine, 11 for in-person. Full list //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).

  • appointment_type (String) (defaults to: OMIT)

    Human-readable description of the appointment type (ex: “Acupuncture - Headaches”).

  • end_date_of_service (Date) (defaults to: OMIT)

    Date formatted as YYYY-MM-DD; eg: 2019-08-25. This date must be the local date in the timezone where the service occurred. If omitted, the Encounter is assumed to be for a single day. Must not be temporally before the date_of_service field. 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.

  • subscriber_primary (CandidApiClient::Individual::Types::SubscriberCreate) (defaults to: OMIT)

    Contains details of the primary insurance subscriber.

  • subscriber_secondary (CandidApiClient::Individual::Types::SubscriberCreate) (defaults to: OMIT)

    Contains details of the secondary insurance subscriber.

  • subscriber_tertiary (CandidApiClient::Individual::Types::SubscriberCreate) (defaults to: OMIT)

    Contains details of the tertiary insurance subscriber.

  • additional_information (String) (defaults to: OMIT)

    Defines additional information on the claim needed by the payer. Box 19 on the CMS-1500 claim form.

  • service_authorization_exception_code (CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode) (defaults to: OMIT)

    837p Loop2300 REF*4N Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without obtaining the authorization.

  • admission_date (Date) (defaults to: OMIT)

    837p Loop2300 DTP*435, CMS-1500 Box 18 Required on all ambulance claims when the patient was known to be admitted to the hospital. OR Required on all claims involving inpatient medical visits.

  • discharge_date (Date) (defaults to: OMIT)

    837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.

  • onset_of_current_illness_or_symptom_date (Date) (defaults to: OMIT)

    837p Loop2300 DTP*431, CMS-1500 Box 14 Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service. OR This date is the onset of acute symptoms for the current illness or condition.

  • last_menstrual_period_date (Date) (defaults to: OMIT)

    837p Loop2300 DTP*484, CMS-1500 Box 14 Required when, in the judgment of the provider, the services on this claim are related to the patient’s pregnancy.de

  • delay_reason_code (CandidApiClient::Commons::Types::DelayReasonCode) (defaults to: OMIT)

    837i Loop2300, CLM-1300 Box 20 Code indicating the reason why a request was delayed

  • patient_authorized_release (Boolean) (defaults to: OMIT)

    Whether this patient has authorized the release of medical information for billing purpose. Box 12 on the CMS-1500 claim form.

  • schema_instances (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>) (defaults to: OMIT)

    Key-value pairs that must adhere to a schema created via the Custom Schema API. Multiple schema instances cannot be created for the same schema on an encounter. Updating schema instances utilizes PUT semantics, so the schema instances on the encounter will be set to whatever inputs are provided. If null is provided as an input, then the encounter’s schema instances will be cleared.

  • vitals (CandidApiClient::Encounters::V4::Types::VitalsUpdate) (defaults to: OMIT)

    If a vitals entity already exists for the encounter, then all values will be updated to the provided values. Otherwise, a new vitals object will be created for the encounter.

  • existing_medications (Array<CandidApiClient::Encounters::V4::Types::Medication>) (defaults to: OMIT)

    Existing medications that should be on the encounter. Note all current existing medications on encounter will be overridden with this list.

  • guarantor (CandidApiClient::Guarantor::V1::Types::GuarantorUpdate) (defaults to: OMIT)

    Personal and contact info for the guarantor of the patient responsibility.

  • referral_number (String) (defaults to: OMIT)

    Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.

  • epsdt_referral (CandidApiClient::Encounters::V4::Types::EpsdtReferral) (defaults to: OMIT)

    Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the 837P form

  • claim_supplemental_information (Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>) (defaults to: OMIT)

    Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are permitted.

  • secondary_payer_carrier_code (String) (defaults to: OMIT)

    When Medicaid is billed as the secondary payer the Carrier Code is used to identify the primary payer. This is required for certain states.

  • additional_properties (OpenStruct) (defaults to: nil)

    Additional properties unmapped to the current class definition



398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 398

def initialize(diagnoses: OMIT, interventions: OMIT, external_claim_submission: OMIT, service_lines: OMIT,
               patient_histories: OMIT, billing_notes: OMIT, patient: OMIT, service_facility: OMIT, rendering_provider: OMIT, initial_referring_provider: OMIT, referring_provider: OMIT, supervising_provider: OMIT, billing_provider: OMIT, pay_to_address: OMIT, benefits_assigned_to_provider: OMIT, prior_authorization_number: OMIT, external_id: OMIT, date_of_service: OMIT, tag_ids: OMIT, clinical_notes: OMIT, billable_status: OMIT, responsible_party: OMIT, provider_accepts_assignment: OMIT, synchronicity: OMIT, place_of_service_code: OMIT, appointment_type: OMIT, end_date_of_service: OMIT, subscriber_primary: OMIT, subscriber_secondary: OMIT, subscriber_tertiary: OMIT, additional_information: OMIT, service_authorization_exception_code: OMIT, admission_date: OMIT, discharge_date: OMIT, onset_of_current_illness_or_symptom_date: OMIT, last_menstrual_period_date: OMIT, delay_reason_code: OMIT, patient_authorized_release: OMIT, schema_instances: OMIT, vitals: OMIT, existing_medications: OMIT, guarantor: OMIT, referral_number: OMIT, epsdt_referral: OMIT, claim_supplemental_information: OMIT, secondary_payer_carrier_code: OMIT, additional_properties: nil)
  @diagnoses = diagnoses if diagnoses != OMIT
  @interventions = interventions if interventions != OMIT
  @external_claim_submission = external_claim_submission if external_claim_submission != OMIT
  @service_lines = service_lines if service_lines != OMIT
  @patient_histories = patient_histories if patient_histories != OMIT
  @billing_notes = billing_notes if billing_notes != OMIT
  @patient = patient if patient != OMIT
  @service_facility = service_facility if service_facility != OMIT
  @rendering_provider = rendering_provider if rendering_provider != OMIT
  @initial_referring_provider = initial_referring_provider if initial_referring_provider != OMIT
  @referring_provider = referring_provider if referring_provider != OMIT
  @supervising_provider = supervising_provider if supervising_provider != OMIT
  @billing_provider = billing_provider if billing_provider != OMIT
  @pay_to_address = pay_to_address if pay_to_address != OMIT
  @benefits_assigned_to_provider = benefits_assigned_to_provider if benefits_assigned_to_provider != OMIT
  @prior_authorization_number = prior_authorization_number if prior_authorization_number != OMIT
  @external_id = external_id if external_id != OMIT
  @date_of_service = date_of_service if date_of_service != OMIT
  @tag_ids = tag_ids if tag_ids != OMIT
  @clinical_notes = clinical_notes if clinical_notes != OMIT
  @billable_status = billable_status if billable_status != OMIT
  @responsible_party = responsible_party if responsible_party != OMIT
  @provider_accepts_assignment = provider_accepts_assignment if provider_accepts_assignment != OMIT
  @synchronicity = synchronicity if synchronicity != OMIT
  @place_of_service_code = place_of_service_code if place_of_service_code != OMIT
  @appointment_type = appointment_type if appointment_type != OMIT
  @end_date_of_service = end_date_of_service if end_date_of_service != OMIT
  @subscriber_primary = subscriber_primary if subscriber_primary != OMIT
  @subscriber_secondary = subscriber_secondary if subscriber_secondary != OMIT
  @subscriber_tertiary = subscriber_tertiary if subscriber_tertiary != OMIT
  @additional_information = additional_information if additional_information != OMIT
  if service_authorization_exception_code != OMIT
    @service_authorization_exception_code = service_authorization_exception_code
  end
  @admission_date = admission_date if admission_date != OMIT
  @discharge_date = discharge_date if discharge_date != OMIT
  if onset_of_current_illness_or_symptom_date != OMIT
    @onset_of_current_illness_or_symptom_date = onset_of_current_illness_or_symptom_date
  end
  @last_menstrual_period_date = last_menstrual_period_date if last_menstrual_period_date != OMIT
  @delay_reason_code = delay_reason_code if delay_reason_code != OMIT
  @patient_authorized_release = patient_authorized_release if patient_authorized_release != OMIT
  @schema_instances = schema_instances if schema_instances != OMIT
  @vitals = vitals if vitals != OMIT
  @existing_medications = existing_medications if existing_medications != OMIT
  @guarantor = guarantor if guarantor != OMIT
  @referral_number = referral_number if referral_number != OMIT
  @epsdt_referral = epsdt_referral if epsdt_referral != OMIT
  @claim_supplemental_information = claim_supplemental_information if claim_supplemental_information != OMIT
  @secondary_payer_carrier_code = secondary_payer_carrier_code if secondary_payer_carrier_code != OMIT
  @additional_properties = additional_properties
  @_field_set = {
    "diagnoses": diagnoses,
    "interventions": interventions,
    "external_claim_submission": external_claim_submission,
    "service_lines": service_lines,
    "patient_histories": patient_histories,
    "billing_notes": billing_notes,
    "patient": patient,
    "service_facility": service_facility,
    "rendering_provider": rendering_provider,
    "initial_referring_provider": initial_referring_provider,
    "referring_provider": referring_provider,
    "supervising_provider": supervising_provider,
    "billing_provider": billing_provider,
    "pay_to_address": pay_to_address,
    "benefits_assigned_to_provider": benefits_assigned_to_provider,
    "prior_authorization_number": prior_authorization_number,
    "external_id": external_id,
    "date_of_service": date_of_service,
    "tag_ids": tag_ids,
    "clinical_notes": clinical_notes,
    "billable_status": billable_status,
    "responsible_party": responsible_party,
    "provider_accepts_assignment": provider_accepts_assignment,
    "synchronicity": synchronicity,
    "place_of_service_code": place_of_service_code,
    "appointment_type": appointment_type,
    "end_date_of_service": end_date_of_service,
    "subscriber_primary": subscriber_primary,
    "subscriber_secondary": subscriber_secondary,
    "subscriber_tertiary": subscriber_tertiary,
    "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,
    "patient_authorized_release": patient_authorized_release,
    "schema_instances": schema_instances,
    "vitals": vitals,
    "existing_medications": existing_medications,
    "guarantor": guarantor,
    "referral_number": referral_number,
    "epsdt_referral": epsdt_referral,
    "claim_supplemental_information": claim_supplemental_information,
    "secondary_payer_carrier_code": secondary_payer_carrier_code
  }.reject do |_k, v|
    v == OMIT
  end
end

Instance Attribute Details

#additional_informationString (readonly)

Returns Defines additional information on the claim needed by the payer. Box 19 on the CMS-1500 claim form.

Returns:

  • (String)

    Defines additional information on the claim needed by the payer. Box 19 on the CMS-1500 claim form.



172
173
174
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 172

def additional_information
  @additional_information
end

#additional_propertiesOpenStruct (readonly)

Returns Additional properties unmapped to the current class definition.

Returns:

  • (OpenStruct)

    Additional properties unmapped to the current class definition



238
239
240
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 238

def additional_properties
  @additional_properties
end

#admission_dateDate (readonly)

Returns 837p Loop2300 DTP*435, CMS-1500 Box 18 Required on all ambulance claims when the patient was known to be admitted to the hospital. OR Required on all claims involving inpatient medical visits.

Returns:

  • (Date)

    837p Loop2300 DTP*435, CMS-1500 Box 18 Required on all ambulance claims when the patient was known to be admitted to the hospital. OR Required on all claims involving inpatient medical visits.



185
186
187
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 185

def admission_date
  @admission_date
end

#appointment_typeString (readonly)

Returns Human-readable description of the appointment type (ex: “Acupuncture - Headaches”).

Returns:

  • (String)

    Human-readable description of the appointment type (ex: “Acupuncture - Headaches”).



154
155
156
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 154

def appointment_type
  @appointment_type
end

#benefits_assigned_to_providerBoolean (readonly)

Returns Whether this patient has authorized insurance payments to be made to you, not them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim form.

Returns:

  • (Boolean)

    Whether this patient has authorized insurance payments to be made to you, not them. If false, patient may receive reimbursement. Box 13 on the CMS-1500 claim form.



109
110
111
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 109

def benefits_assigned_to_provider
  @benefits_assigned_to_provider
end

#billable_statusCandidApiClient::Encounters::V4::Types::BillableStatusType (readonly)

Returns 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.

Returns:

  • (CandidApiClient::Encounters::V4::Types::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.



135
136
137
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 135

def billable_status
  @billable_status
end

#billing_notesArray<CandidApiClient::BillingNotes::V2::Types::BillingNoteBase> (readonly)

Returns Spot to store misc, human-readable, notes about this encounter to be used in the billing process.

Returns:



61
62
63
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 61

def billing_notes
  @billing_notes
end

#billing_providerCandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress (readonly)

Returns The billing provider is the provider or business entity submitting the claim. Billing provider may be, but is not necessarily, the same person/NPI as the rendering provider. From a payer’s perspective, this represents the person or entity being reimbursed. When a contract exists with the target payer, the billing provider should be the entity contracted with the payer. In some circumstances, this will be an individual provider. In that case, submit that provider’s NPI and the tax ID (TIN) that the provider gave to the payer during contracting. In other cases, the billing entity will be a medical group. If so, submit the group NPI and the group’s tax ID. Box 33 on the CMS-1500 claim form.

Returns:

  • (CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress)

    The billing provider is the provider or business entity submitting the claim. Billing provider may be, but is not necessarily, the same person/NPI as the rendering provider. From a payer’s perspective, this represents the person or entity being reimbursed. When a contract exists with the target payer, the billing provider should be the entity contracted with the payer. In some circumstances, this will be an individual provider. In that case, submit that provider’s NPI and the tax ID (TIN) that the provider gave to the payer during contracting. In other cases, the billing entity will be a medical group. If so, submit the group NPI and the group’s tax ID. Box 33 on the CMS-1500 claim form.



103
104
105
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 103

def billing_provider
  @billing_provider
end

#claim_supplemental_informationArray<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation> (readonly)

Returns Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are permitted.

Returns:



233
234
235
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 233

def claim_supplemental_information
  @claim_supplemental_information
end

#clinical_notesArray<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate> (readonly)

Returns Holds a collection of clinical observations made by healthcare providers during patient encounters.

Returns:



130
131
132
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 130

def clinical_notes
  @clinical_notes
end

#date_of_serviceDate (readonly)

Returns Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred. Box 24a on the CMS-1500 claim form. If service occurred over a range of dates, this should be the start date. 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.

Returns:

  • (Date)

    Date formatted as YYYY-MM-DD; eg: 2019-08-24. This date must be the local date in the timezone where the service occurred. Box 24a on the CMS-1500 claim form. If service occurred over a range of dates, this should be the start date. 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.



124
125
126
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 124

def date_of_service
  @date_of_service
end

#delay_reason_codeCandidApiClient::Commons::Types::DelayReasonCode (readonly)

Returns 837i Loop2300, CLM-1300 Box 20 Code indicating the reason why a request was delayed.

Returns:



203
204
205
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 203

def delay_reason_code
  @delay_reason_code
end

#diagnosesArray<CandidApiClient::Diagnoses::Types::DiagnosisCreate> (readonly)

Returns Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses may be submitted at this time, and coders will later prioritize the 12 that will be submitted to the payor.

Returns:

  • (Array<CandidApiClient::Diagnoses::Types::DiagnosisCreate>)

    Ideally, this field should contain no more than 12 diagnoses. However, more diagnoses may be submitted at this time, and coders will later prioritize the 12 that will be submitted to the payor.



45
46
47
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 45

def diagnoses
  @diagnoses
end

#discharge_dateDate (readonly)

Returns 837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.

Returns:

  • (Date)

    837p Loop2300 DTP*096, CMS-1500 Box 18 Required for inpatient claims when the patient was discharged from the facility and the discharge date is known.



189
190
191
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 189

def discharge_date
  @discharge_date
end

#end_date_of_serviceDate (readonly)

Returns Date formatted as YYYY-MM-DD; eg: 2019-08-25. This date must be the local date in the timezone where the service occurred. If omitted, the Encounter is assumed to be for a single day. Must not be temporally before the date_of_service field. 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.

Returns:

  • (Date)

    Date formatted as YYYY-MM-DD; eg: 2019-08-25. This date must be the local date in the timezone where the service occurred. If omitted, the Encounter is assumed to be for a single day. Must not be temporally before the date_of_service field. 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.



163
164
165
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 163

def end_date_of_service
  @end_date_of_service
end

#epsdt_referralCandidApiClient::Encounters::V4::Types::EpsdtReferral (readonly)

Returns Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the 837P form.

Returns:



230
231
232
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 230

def epsdt_referral
  @epsdt_referral
end

#existing_medicationsArray<CandidApiClient::Encounters::V4::Types::Medication> (readonly)

Returns Existing medications that should be on the encounter. Note all current existing medications on encounter will be overridden with this list.

Returns:



223
224
225
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 223

def existing_medications
  @existing_medications
end

#external_claim_submissionCandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate (readonly)

Returns ***This field is in beta.*** To be included for claims that have been submitted outside of Candid. Candid supports posting remits and payments to these claims and working them in-platform (e.g. editing, resubmitting).

Returns:



52
53
54
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 52

def external_claim_submission
  @external_claim_submission
end

#external_idString (readonly)

Returns A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.

Returns:

  • (String)

    A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr. Chrono encounter ID. This field should not contain PHI.



115
116
117
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 115

def external_id
  @external_id
end

#guarantorCandidApiClient::Guarantor::V1::Types::GuarantorUpdate (readonly)

Returns Personal and contact info for the guarantor of the patient responsibility.

Returns:



225
226
227
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 225

def guarantor
  @guarantor
end

#initial_referring_providerCandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdateWithOptionalAddress (readonly)

Returns The second iteration of Loop ID-2310. Use code “P3 - Primary Care Provider” in this loop to indicate the initial referral from the primary care provider or whatever provider wrote the initial referral for this patient’s episode of care being billed/reported in this transaction.

Returns:



86
87
88
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 86

def initial_referring_provider
  @initial_referring_provider
end

#interventionsArray<CandidApiClient::Encounters::V4::Types::Intervention> (readonly)



47
48
49
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 47

def interventions
  @interventions
end

#last_menstrual_period_dateDate (readonly)

Returns 837p Loop2300 DTP*484, CMS-1500 Box 14 Required when, in the judgment of the provider, the services on this claim are related to the patient’s pregnancy.de.

Returns:

  • (Date)

    837p Loop2300 DTP*484, CMS-1500 Box 14 Required when, in the judgment of the provider, the services on this claim are related to the patient’s pregnancy.de



200
201
202
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 200

def last_menstrual_period_date
  @last_menstrual_period_date
end

#onset_of_current_illness_or_symptom_dateDate (readonly)

Returns 837p Loop2300 DTP*431, CMS-1500 Box 14 Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service. OR This date is the onset of acute symptoms for the current illness or condition.

Returns:

  • (Date)

    837p Loop2300 DTP*431, CMS-1500 Box 14 Required for the initial medical service or visit performed in response to a medical emergency when the date is available and is different than the date of service. OR This date is the onset of acute symptoms for the current illness or condition.



196
197
198
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 196

def onset_of_current_illness_or_symptom_date
  @onset_of_current_illness_or_symptom_date
end

#patientCandidApiClient::Individual::Types::PatientUpdateWithOptionalAddress (readonly)

Returns Contains the identification information of the individual receiving medical services.

Returns:



64
65
66
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 64

def patient
  @patient
end

#patient_authorized_releaseBoolean (readonly)

Returns Whether this patient has authorized the release of medical information for billing purpose. Box 12 on the CMS-1500 claim form.

Returns:

  • (Boolean)

    Whether this patient has authorized the release of medical information for billing purpose. Box 12 on the CMS-1500 claim form.



207
208
209
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 207

def patient_authorized_release
  @patient_authorized_release
end

#patient_historiesArray<CandidApiClient::Encounters::V4::Types::PatientHistoryCategory> (readonly)



58
59
60
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 58

def patient_histories
  @patient_histories
end

#pay_to_addressCandidApiClient::Commons::Types::StreetAddressShortZipOptional (readonly)

Returns Specifies the address to which payments for the claim should be sent.

Returns:



105
106
107
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 105

def pay_to_address
  @pay_to_address
end

#place_of_service_codeCandidApiClient::Commons::Types::FacilityTypeCode (readonly)

Returns Box 24B on the CMS-1500 claim form. 837p Loop2300, CLM-05-1. 02 for telemedicine, 11 for in-person. Full list //www.cms.gov/Medicare/Coding/place-of-service-codes/Place_of_Service_Code_Set).

Returns:



151
152
153
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 151

def place_of_service_code
  @place_of_service_code
end

#prior_authorization_numberString (readonly)

Returns Box 23 on the CMS-1500 claim form.

Returns:

  • (String)

    Box 23 on the CMS-1500 claim form.



111
112
113
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 111

def prior_authorization_number
  @prior_authorization_number
end

#provider_accepts_assignmentBoolean (readonly)

Returns Whether you have accepted the patient’s authorization for insurance payments to be made to you, not them. Box 27 on the CMS-1500 claim form.

Returns:

  • (Boolean)

    Whether you have accepted the patient’s authorization for insurance payments to be made to you, not them. Box 27 on the CMS-1500 claim form.



141
142
143
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 141

def provider_accepts_assignment
  @provider_accepts_assignment
end

#referral_numberString (readonly)

Returns Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.

Returns:

  • (String)

    Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.



227
228
229
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 227

def referral_number
  @referral_number
end

#referring_providerCandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdateWithOptionalAddress (readonly)

Returns The final provider who referred the services that were rendered. All physicians who order services or refer Medicare beneficiaries must report this data.

Returns:



90
91
92
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 90

def referring_provider
  @referring_provider
end

#rendering_providerCandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdateWithOptionalAddress (readonly)

Returns The rendering provider is the practitioner – physician, nurse practitioner, etc. – performing the service. For telehealth services, the rendering provider performs the visit, asynchronous communication, or other service. The rendering provider address should generally be the same as the service facility address.

Returns:



80
81
82
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 80

def rendering_provider
  @rendering_provider
end

#responsible_partyCandidApiClient::Encounters::V4::Types::ResponsiblePartyType (readonly)

Returns 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.

Returns:



138
139
140
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 138

def responsible_party
  @responsible_party
end

#schema_instancesArray<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance> (readonly)

Returns Key-value pairs that must adhere to a schema created via the Custom Schema API. Multiple schema instances cannot be created for the same schema on an encounter. Updating schema instances utilizes PUT semantics, so the schema instances on the encounter will be set to whatever inputs are provided. If null is provided as an input, then the encounter’s schema instances will be cleared.

Returns:

  • (Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>)

    Key-value pairs that must adhere to a schema created via the Custom Schema API. Multiple schema instances cannot be created for the same schema on an encounter. Updating schema instances utilizes PUT semantics, so the schema instances on the encounter will be set to whatever inputs are provided. If null is provided as an input, then the encounter’s schema instances will be cleared.



215
216
217
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 215

def schema_instances
  @schema_instances
end

#secondary_payer_carrier_codeString (readonly)

Returns When Medicaid is billed as the secondary payer the Carrier Code is used to identify the primary payer. This is required for certain states.

Returns:

  • (String)

    When Medicaid is billed as the secondary payer the Carrier Code is used to identify the primary payer. This is required for certain states.



236
237
238
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 236

def secondary_payer_carrier_code
  @secondary_payer_carrier_code
end

#service_authorization_exception_codeCandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode (readonly)

Returns 837p Loop2300 REF*4N Required when mandated by government law or regulation to obtain authorization for specific service(s) but, for the reasons listed in one of the enum values of ServiceAuthorizationExceptionCode, the service was performed without obtaining the authorization.

Returns:



179
180
181
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 179

def service_authorization_exception_code
  @service_authorization_exception_code
end

#service_facilityCandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress (readonly)

Returns Encounter Service facility is typically the location a medical service was rendered, such as a provider office or hospital. For telehealth, service facility can represent the provider’s location when the service was delivered (e.g., home), or the location where an in-person visit would have taken place, whichever is easier to identify. If the provider is in-network, service facility may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that for an in-network claim to be successfully adjudicated, the service facility address listed on claims must match what was provided to the payer during the credentialing process.

Returns:

  • (CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress)

    Encounter Service facility is typically the location a medical service was rendered, such as a provider office or hospital. For telehealth, service facility can represent the provider’s location when the service was delivered (e.g., home), or the location where an in-person visit would have taken place, whichever is easier to identify. If the provider is in-network, service facility may be defined in payer contracts. Box 32 on the CMS-1500 claim form. Note that for an in-network claim to be successfully adjudicated, the service facility address listed on claims must match what was provided to the payer during the credentialing process.



74
75
76
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 74

def service_facility
  @service_facility
end

#service_linesArray<CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate> (readonly)

Returns Each service line must be linked to a diagnosis. Concretely, ‘service_line.diagnosis_pointers`must contain at least one entry which should be in bounds of the diagnoses list field.

Returns:



56
57
58
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 56

def service_lines
  @service_lines
end

#subscriber_primaryCandidApiClient::Individual::Types::SubscriberCreate (readonly)

Returns Contains details of the primary insurance subscriber.

Returns:



165
166
167
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 165

def subscriber_primary
  @subscriber_primary
end

#subscriber_secondaryCandidApiClient::Individual::Types::SubscriberCreate (readonly)

Returns Contains details of the secondary insurance subscriber.

Returns:



167
168
169
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 167

def subscriber_secondary
  @subscriber_secondary
end

#subscriber_tertiaryCandidApiClient::Individual::Types::SubscriberCreate (readonly)

Returns Contains details of the tertiary insurance subscriber.

Returns:



169
170
171
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 169

def subscriber_tertiary
  @subscriber_tertiary
end

#supervising_providerCandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdateWithOptionalAddress (readonly)

Returns Required when the rendering provider is supervised by a physician. If not required by this implementation guide, do not send.

Returns:



93
94
95
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 93

def supervising_provider
  @supervising_provider
end

#synchronicityCandidApiClient::Encounters::V4::Types::SynchronicityType (readonly)

Returns Whether or not this was a synchronous or asynchronous encounter. Asynchronous encounters occur when providers and patients communicate online using forms, instant messaging, or other pre-recorded digital mediums. Synchronous encounters occur in live, real-time settings where the patient interacts directly with the provider, such as over video or a phone call.

Returns:

  • (CandidApiClient::Encounters::V4::Types::SynchronicityType)

    Whether or not this was a synchronous or asynchronous encounter. Asynchronous encounters occur when providers and patients communicate online using forms, instant messaging, or other pre-recorded digital mediums. Synchronous encounters occur in live, real-time settings where the patient interacts directly with the provider, such as over video or a phone call.



147
148
149
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 147

def synchronicity
  @synchronicity
end

#tag_idsArray<String> (readonly)

Returns Names of tags that should be on the encounter. Note all tags on encounter will be overridden with this list.

Returns:

  • (Array<String>)

    Names of tags that should be on the encounter. Note all tags on encounter will be overridden with this list.



127
128
129
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 127

def tag_ids
  @tag_ids
end

#vitalsCandidApiClient::Encounters::V4::Types::VitalsUpdate (readonly)

Returns If a vitals entity already exists for the encounter, then all values will be updated to the provided values. Otherwise, a new vitals object will be created for the encounter.

Returns:



219
220
221
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 219

def vitals
  @vitals
end

Class Method Details

.from_json(json_object:) ⇒ CandidApiClient::ChargeCapture::V1::Types::ChargeCaptureData

Deserialize a JSON object to an instance of ChargeCaptureData

Parameters:

  • json_object (String)

Returns:



507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 507

def self.from_json(json_object:)
  struct = JSON.parse(json_object, object_class: OpenStruct)
  parsed_json = JSON.parse(json_object)
  diagnoses = parsed_json["diagnoses"]&.map do |item|
    item = item.to_json
    CandidApiClient::Diagnoses::Types::DiagnosisCreate.from_json(json_object: item)
  end
  interventions = parsed_json["interventions"]&.map do |item|
    item = item.to_json
    CandidApiClient::Encounters::V4::Types::Intervention.from_json(json_object: item)
  end
  if parsed_json["external_claim_submission"].nil?
    external_claim_submission = nil
  else
    external_claim_submission = parsed_json["external_claim_submission"].to_json
    external_claim_submission = CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.from_json(json_object: external_claim_submission)
  end
  service_lines = parsed_json["service_lines"]&.map do |item|
    item = item.to_json
    CandidApiClient::ServiceLines::V2::Types::ServiceLineCreate.from_json(json_object: item)
  end
  patient_histories = parsed_json["patient_histories"]&.map do |item|
    item = item.to_json
    CandidApiClient::Encounters::V4::Types::PatientHistoryCategory.from_json(json_object: item)
  end
  billing_notes = parsed_json["billing_notes"]&.map do |item|
    item = item.to_json
    CandidApiClient::BillingNotes::V2::Types::BillingNoteBase.from_json(json_object: item)
  end
  if parsed_json["patient"].nil?
    patient = nil
  else
    patient = parsed_json["patient"].to_json
    patient = CandidApiClient::Individual::Types::PatientUpdateWithOptionalAddress.from_json(json_object: patient)
  end
  if parsed_json["service_facility"].nil?
    service_facility = nil
  else
    service_facility = parsed_json["service_facility"].to_json
    service_facility = CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress.from_json(json_object: service_facility)
  end
  if parsed_json["rendering_provider"].nil?
    rendering_provider = nil
  else
    rendering_provider = parsed_json["rendering_provider"].to_json
    rendering_provider = CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdateWithOptionalAddress.from_json(json_object: rendering_provider)
  end
  if parsed_json["initial_referring_provider"].nil?
    initial_referring_provider = nil
  else
    initial_referring_provider = parsed_json["initial_referring_provider"].to_json
    initial_referring_provider = CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdateWithOptionalAddress.from_json(json_object: initial_referring_provider)
  end
  if parsed_json["referring_provider"].nil?
    referring_provider = nil
  else
    referring_provider = parsed_json["referring_provider"].to_json
    referring_provider = CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdateWithOptionalAddress.from_json(json_object: referring_provider)
  end
  if parsed_json["supervising_provider"].nil?
    supervising_provider = nil
  else
    supervising_provider = parsed_json["supervising_provider"].to_json
    supervising_provider = CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdateWithOptionalAddress.from_json(json_object: supervising_provider)
  end
  if parsed_json["billing_provider"].nil?
    billing_provider = nil
  else
    billing_provider = parsed_json["billing_provider"].to_json
    billing_provider = CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress.from_json(json_object: billing_provider)
  end
  if parsed_json["pay_to_address"].nil?
    pay_to_address = nil
  else
    pay_to_address = parsed_json["pay_to_address"].to_json
    pay_to_address = CandidApiClient::Commons::Types::StreetAddressShortZipOptional.from_json(json_object: pay_to_address)
  end
  benefits_assigned_to_provider = struct["benefits_assigned_to_provider"]
  prior_authorization_number = struct["prior_authorization_number"]
  external_id = struct["external_id"]
  date_of_service = (Date.parse(parsed_json["date_of_service"]) unless parsed_json["date_of_service"].nil?)
  tag_ids = struct["tag_ids"]
  clinical_notes = parsed_json["clinical_notes"]&.map do |item|
    item = item.to_json
    CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate.from_json(json_object: item)
  end
  billable_status = struct["billable_status"]
  responsible_party = struct["responsible_party"]
  provider_accepts_assignment = struct["provider_accepts_assignment"]
  synchronicity = struct["synchronicity"]
  place_of_service_code = struct["place_of_service_code"]
  appointment_type = struct["appointment_type"]
  end_date_of_service = unless parsed_json["end_date_of_service"].nil?
                          Date.parse(parsed_json["end_date_of_service"])
                        end
  if parsed_json["subscriber_primary"].nil?
    subscriber_primary = nil
  else
    subscriber_primary = parsed_json["subscriber_primary"].to_json
    subscriber_primary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_primary)
  end
  if parsed_json["subscriber_secondary"].nil?
    subscriber_secondary = nil
  else
    subscriber_secondary = parsed_json["subscriber_secondary"].to_json
    subscriber_secondary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_secondary)
  end
  if parsed_json["subscriber_tertiary"].nil?
    subscriber_tertiary = nil
  else
    subscriber_tertiary = parsed_json["subscriber_tertiary"].to_json
    subscriber_tertiary = CandidApiClient::Individual::Types::SubscriberCreate.from_json(json_object: subscriber_tertiary)
  end
  additional_information = struct["additional_information"]
  service_authorization_exception_code = struct["service_authorization_exception_code"]
  admission_date = (Date.parse(parsed_json["admission_date"]) unless parsed_json["admission_date"].nil?)
  discharge_date = (Date.parse(parsed_json["discharge_date"]) unless parsed_json["discharge_date"].nil?)
  onset_of_current_illness_or_symptom_date = unless parsed_json["onset_of_current_illness_or_symptom_date"].nil?
                                               Date.parse(parsed_json["onset_of_current_illness_or_symptom_date"])
                                             end
  last_menstrual_period_date = unless parsed_json["last_menstrual_period_date"].nil?
                                 Date.parse(parsed_json["last_menstrual_period_date"])
                               end
  delay_reason_code = struct["delay_reason_code"]
  patient_authorized_release = struct["patient_authorized_release"]
  schema_instances = parsed_json["schema_instances"]&.map do |item|
    item = item.to_json
    CandidApiClient::CustomSchemas::V1::Types::SchemaInstance.from_json(json_object: item)
  end
  if parsed_json["vitals"].nil?
    vitals = nil
  else
    vitals = parsed_json["vitals"].to_json
    vitals = CandidApiClient::Encounters::V4::Types::VitalsUpdate.from_json(json_object: vitals)
  end
  existing_medications = parsed_json["existing_medications"]&.map do |item|
    item = item.to_json
    CandidApiClient::Encounters::V4::Types::Medication.from_json(json_object: item)
  end
  if parsed_json["guarantor"].nil?
    guarantor = nil
  else
    guarantor = parsed_json["guarantor"].to_json
    guarantor = CandidApiClient::Guarantor::V1::Types::GuarantorUpdate.from_json(json_object: guarantor)
  end
  referral_number = struct["referral_number"]
  if parsed_json["epsdt_referral"].nil?
    epsdt_referral = nil
  else
    epsdt_referral = parsed_json["epsdt_referral"].to_json
    epsdt_referral = CandidApiClient::Encounters::V4::Types::EpsdtReferral.from_json(json_object: epsdt_referral)
  end
  claim_supplemental_information = parsed_json["claim_supplemental_information"]&.map do |item|
    item = item.to_json
    CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation.from_json(json_object: item)
  end
  secondary_payer_carrier_code = struct["secondary_payer_carrier_code"]
  new(
    diagnoses: diagnoses,
    interventions: interventions,
    external_claim_submission: external_claim_submission,
    service_lines: service_lines,
    patient_histories: patient_histories,
    billing_notes: billing_notes,
    patient: patient,
    service_facility: service_facility,
    rendering_provider: rendering_provider,
    initial_referring_provider: initial_referring_provider,
    referring_provider: referring_provider,
    supervising_provider: supervising_provider,
    billing_provider: billing_provider,
    pay_to_address: pay_to_address,
    benefits_assigned_to_provider: benefits_assigned_to_provider,
    prior_authorization_number: prior_authorization_number,
    external_id: external_id,
    date_of_service: date_of_service,
    tag_ids: tag_ids,
    clinical_notes: clinical_notes,
    billable_status: billable_status,
    responsible_party: responsible_party,
    provider_accepts_assignment: provider_accepts_assignment,
    synchronicity: synchronicity,
    place_of_service_code: place_of_service_code,
    appointment_type: appointment_type,
    end_date_of_service: end_date_of_service,
    subscriber_primary: subscriber_primary,
    subscriber_secondary: subscriber_secondary,
    subscriber_tertiary: subscriber_tertiary,
    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,
    patient_authorized_release: patient_authorized_release,
    schema_instances: schema_instances,
    vitals: vitals,
    existing_medications: existing_medications,
    guarantor: guarantor,
    referral_number: referral_number,
    epsdt_referral: epsdt_referral,
    claim_supplemental_information: claim_supplemental_information,
    secondary_payer_carrier_code: secondary_payer_carrier_code,
    additional_properties: struct
  )
end

.validate_raw(obj:) ⇒ Void

Leveraged for Union-type generation, validate_raw attempts to parse the given

hash and check each fields type against the current object's property
definitions.

Parameters:

  • obj (Object)

Returns:

  • (Void)


728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 728

def self.validate_raw(obj:)
  obj.diagnoses&.is_a?(Array) != false || raise("Passed value for field obj.diagnoses is not the expected type, validation failed.")
  obj.interventions&.is_a?(Array) != false || raise("Passed value for field obj.interventions is not the expected type, validation failed.")
  obj.external_claim_submission.nil? || CandidApiClient::ClaimSubmission::V1::Types::ExternalClaimSubmissionCreate.validate_raw(obj: obj.external_claim_submission)
  obj.service_lines&.is_a?(Array) != false || raise("Passed value for field obj.service_lines is not the expected type, validation failed.")
  obj.patient_histories&.is_a?(Array) != false || raise("Passed value for field obj.patient_histories is not the expected type, validation failed.")
  obj.billing_notes&.is_a?(Array) != false || raise("Passed value for field obj.billing_notes is not the expected type, validation failed.")
  obj.patient.nil? || CandidApiClient::Individual::Types::PatientUpdateWithOptionalAddress.validate_raw(obj: obj.patient)
  obj.service_facility.nil? || CandidApiClient::ServiceFacility::Types::EncounterServiceFacilityUpdateWithOptionalAddress.validate_raw(obj: obj.service_facility)
  obj.rendering_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::RenderingProviderUpdateWithOptionalAddress.validate_raw(obj: obj.rendering_provider)
  obj.initial_referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::InitialReferringProviderUpdateWithOptionalAddress.validate_raw(obj: obj.initial_referring_provider)
  obj.referring_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::ReferringProviderUpdateWithOptionalAddress.validate_raw(obj: obj.referring_provider)
  obj.supervising_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::SupervisingProviderUpdateWithOptionalAddress.validate_raw(obj: obj.supervising_provider)
  obj.billing_provider.nil? || CandidApiClient::EncounterProviders::V2::Types::BillingProviderUpdateWithOptionalAddress.validate_raw(obj: obj.billing_provider)
  obj.pay_to_address.nil? || CandidApiClient::Commons::Types::StreetAddressShortZipOptional.validate_raw(obj: obj.pay_to_address)
  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.")
  obj.prior_authorization_number&.is_a?(String) != false || raise("Passed value for field obj.prior_authorization_number is not the expected type, validation failed.")
  obj.external_id&.is_a?(String) != false || raise("Passed value for field obj.external_id is not the expected type, validation failed.")
  obj.date_of_service&.is_a?(Date) != false || raise("Passed value for field obj.date_of_service is not the expected type, validation failed.")
  obj.tag_ids&.is_a?(Array) != false || raise("Passed value for field obj.tag_ids is not the expected type, validation failed.")
  obj.clinical_notes&.is_a?(Array) != false || raise("Passed value for field obj.clinical_notes is not the expected type, validation failed.")
  obj.billable_status&.is_a?(CandidApiClient::Encounters::V4::Types::BillableStatusType) != false || raise("Passed value for field obj.billable_status is not the expected type, validation failed.")
  obj.responsible_party&.is_a?(CandidApiClient::Encounters::V4::Types::ResponsiblePartyType) != false || raise("Passed value for field obj.responsible_party is not the expected type, validation failed.")
  obj.provider_accepts_assignment&.is_a?(Boolean) != false || raise("Passed value for field obj.provider_accepts_assignment is not the expected type, validation failed.")
  obj.synchronicity&.is_a?(CandidApiClient::Encounters::V4::Types::SynchronicityType) != false || raise("Passed value for field obj.synchronicity is not the expected type, validation failed.")
  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.")
  obj.appointment_type&.is_a?(String) != false || raise("Passed value for field obj.appointment_type is not the expected type, validation failed.")
  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.")
  obj.subscriber_primary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_primary)
  obj.subscriber_secondary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_secondary)
  obj.subscriber_tertiary.nil? || CandidApiClient::Individual::Types::SubscriberCreate.validate_raw(obj: obj.subscriber_tertiary)
  obj.additional_information&.is_a?(String) != false || raise("Passed value for field obj.additional_information is not the expected type, validation failed.")
  obj.service_authorization_exception_code&.is_a?(CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode) != false || raise("Passed value for field obj.service_authorization_exception_code is not the expected type, validation failed.")
  obj.admission_date&.is_a?(Date) != false || raise("Passed value for field obj.admission_date is not the expected type, validation failed.")
  obj.discharge_date&.is_a?(Date) != false || raise("Passed value for field obj.discharge_date is not the expected type, validation failed.")
  obj.onset_of_current_illness_or_symptom_date&.is_a?(Date) != false || raise("Passed value for field obj.onset_of_current_illness_or_symptom_date is not the expected type, validation failed.")
  obj.last_menstrual_period_date&.is_a?(Date) != false || raise("Passed value for field obj.last_menstrual_period_date is not the expected type, validation failed.")
  obj.delay_reason_code&.is_a?(CandidApiClient::Commons::Types::DelayReasonCode) != false || raise("Passed value for field obj.delay_reason_code is not the expected type, validation failed.")
  obj.patient_authorized_release&.is_a?(Boolean) != false || raise("Passed value for field obj.patient_authorized_release is not the expected type, validation failed.")
  obj.schema_instances&.is_a?(Array) != false || raise("Passed value for field obj.schema_instances is not the expected type, validation failed.")
  obj.vitals.nil? || CandidApiClient::Encounters::V4::Types::VitalsUpdate.validate_raw(obj: obj.vitals)
  obj.existing_medications&.is_a?(Array) != false || raise("Passed value for field obj.existing_medications is not the expected type, validation failed.")
  obj.guarantor.nil? || CandidApiClient::Guarantor::V1::Types::GuarantorUpdate.validate_raw(obj: obj.guarantor)
  obj.referral_number&.is_a?(String) != false || raise("Passed value for field obj.referral_number is not the expected type, validation failed.")
  obj.epsdt_referral.nil? || CandidApiClient::Encounters::V4::Types::EpsdtReferral.validate_raw(obj: obj.epsdt_referral)
  obj.claim_supplemental_information&.is_a?(Array) != false || raise("Passed value for field obj.claim_supplemental_information is not the expected type, validation failed.")
  obj.secondary_payer_carrier_code&.is_a?(String) != false || raise("Passed value for field obj.secondary_payer_carrier_code is not the expected type, validation failed.")
end

Instance Method Details

#to_json(*_args) ⇒ String

Serialize an instance of ChargeCaptureData to a JSON object

Returns:

  • (String)


718
719
720
# File 'lib/candidhealth/charge_capture/v_1/types/charge_capture_data.rb', line 718

def to_json(*_args)
  @_field_set&.to_json
end