Class: CandidApiClient::Encounters::V4::Types::EncounterOptional
- Inherits:
-
Object
- Object
- CandidApiClient::Encounters::V4::Types::EncounterOptional
- Defined in:
- lib/candidhealth/encounters/v_4/types/encounter_optional.rb
Constant Summary collapse
- OMIT =
Object.new
Instance Attribute Summary collapse
-
#additional_information ⇒ String
readonly
Defines additional information on the claim needed by the payer.
-
#additional_properties ⇒ OpenStruct
readonly
Additional properties unmapped to the current class definition.
-
#admission_date ⇒ Date
readonly
837p Loop2300 DTP*435, CMS-1500 Box 18 Required on all ambulance claims when the patient was known to be admitted to the hospital.
-
#appointment_type ⇒ String
readonly
Human-readable description of the appointment type (ex: “Acupuncture - Headaches”).
-
#benefits_assigned_to_provider ⇒ Boolean
readonly
Whether this patient has authorized insurance payments to be made to you, not them.
-
#billable_status ⇒ CandidApiClient::Encounters::V4::Types::BillableStatusType
readonly
Defines if the Encounter is to be billed by Candid to the responsible_party.
-
#claim_supplemental_information ⇒ Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation>
readonly
Refers to Loop 2300 - Segment PWK on the 837P form.
-
#clinical_notes ⇒ Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate>
readonly
Holds a collection of clinical observations made by healthcare providers during patient encounters.
-
#date_of_service ⇒ Date
readonly
Date formatted as YYYY-MM-DD; eg: 2019-08-24.
-
#delay_reason_code ⇒ CandidApiClient::Commons::Types::DelayReasonCode
readonly
837i Loop2300, CLM-1300 Box 20 Code indicating the reason why a request was delayed.
-
#discharge_date ⇒ Date
readonly
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.
-
#end_date_of_service ⇒ Date
readonly
Date formatted as YYYY-MM-DD; eg: 2019-08-25.
-
#epsdt_referral ⇒ CandidApiClient::Encounters::V4::Types::EpsdtReferral
readonly
Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the 837P form.
-
#existing_medications ⇒ Array<CandidApiClient::Encounters::V4::Types::Medication>
readonly
Existing medications that should be on the encounter.
-
#external_id ⇒ String
readonly
A client-specified unique ID to associate with this encounter; for example, your internal encounter ID or a Dr.
-
#guarantor ⇒ CandidApiClient::Guarantor::V1::Types::GuarantorUpdate
readonly
Personal and contact info for the guarantor of the patient responsibility.
-
#last_menstrual_period_date ⇒ Date
readonly
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.
-
#onset_of_current_illness_or_symptom_date ⇒ Date
readonly
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.
-
#patient_authorized_release ⇒ Boolean
readonly
Whether this patient has authorized the release of medical information for billing purpose.
-
#place_of_service_code ⇒ CandidApiClient::Commons::Types::FacilityTypeCode
readonly
Box 24B on the CMS-1500 claim form.
-
#prior_authorization_number ⇒ String
readonly
Box 23 on the CMS-1500 claim form.
-
#provider_accepts_assignment ⇒ Boolean
readonly
Whether you have accepted the patient’s authorization for insurance payments to be made to you, not them.
-
#referral_number ⇒ String
readonly
Refers to REF*9F on the 837p.
-
#responsible_party ⇒ CandidApiClient::Encounters::V4::Types::ResponsiblePartyType
readonly
Defines the party to be billed with the initial balance owed on the claim.
-
#schema_instances ⇒ Array<CandidApiClient::CustomSchemas::V1::Types::SchemaInstance>
readonly
Key-value pairs that must adhere to a schema created via the Custom Schema API.
-
#secondary_payer_carrier_code ⇒ String
readonly
When Medicaid is billed as the secondary payer the Carrier Code is used to identify the primary payer.
-
#service_authorization_exception_code ⇒ CandidApiClient::Encounters::V4::Types::ServiceAuthorizationExceptionCode
readonly
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.
-
#subscriber_primary ⇒ CandidApiClient::Individual::Types::SubscriberCreate
readonly
Contains details of the primary insurance subscriber.
-
#subscriber_secondary ⇒ CandidApiClient::Individual::Types::SubscriberCreate
readonly
Contains details of the secondary insurance subscriber.
-
#subscriber_tertiary ⇒ CandidApiClient::Individual::Types::SubscriberCreate
readonly
Contains details of the tertiary insurance subscriber.
-
#synchronicity ⇒ CandidApiClient::Encounters::V4::Types::SynchronicityType
readonly
Whether or not this was a synchronous or asynchronous encounter.
-
#tag_ids ⇒ Array<String>
readonly
Names of tags that should be on the encounter.
-
#vitals ⇒ CandidApiClient::Encounters::V4::Types::VitalsUpdate
readonly
If a vitals entity already exists for the encounter, then all values will be updated to the provided values.
Class Method Summary collapse
-
.from_json(json_object:) ⇒ CandidApiClient::Encounters::V4::Types::EncounterOptional
Deserialize a JSON object to an instance of EncounterOptional.
-
.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.
Instance Method Summary collapse
- #initialize(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::Encounters::V4::Types::EncounterOptional constructor
-
#to_json(*_args) ⇒ String
Serialize an instance of EncounterOptional to a JSON object.
Constructor Details
#initialize(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::Encounters::V4::Types::EncounterOptional
266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 266 def initialize(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) @benefits_assigned_to_provider = benefits_assigned_to_provider if benefits_assigned_to_provider != OMIT @prior_authorization_number = if != 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 != OMIT @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 = if != 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 = { "benefits_assigned_to_provider": benefits_assigned_to_provider, "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": , "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": , "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_information ⇒ String (readonly)
Returns Defines additional information on the claim needed by the payer. Box 19 on the CMS-1500 claim form.
92 93 94 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 92 def additional_information @additional_information end |
#additional_properties ⇒ OpenStruct (readonly)
Returns Additional properties unmapped to the current class definition.
158 159 160 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 158 def additional_properties @additional_properties end |
#admission_date ⇒ Date (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.
105 106 107 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 105 def admission_date @admission_date end |
#appointment_type ⇒ String (readonly)
Returns Human-readable description of the appointment type (ex: “Acupuncture - Headaches”).
74 75 76 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 74 def appointment_type @appointment_type end |
#benefits_assigned_to_provider ⇒ Boolean (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.
29 30 31 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 29 def benefits_assigned_to_provider @benefits_assigned_to_provider end |
#billable_status ⇒ CandidApiClient::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.
55 56 57 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 55 def billable_status @billable_status end |
#claim_supplemental_information ⇒ Array<CandidApiClient::Encounters::V4::Types::ClaimSupplementalInformation> (readonly)
Returns Refers to Loop 2300 - Segment PWK on the 837P form. No more than 10 entries are permitted.
153 154 155 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 153 def claim_supplemental_information @claim_supplemental_information end |
#clinical_notes ⇒ Array<CandidApiClient::Encounters::V4::Types::ClinicalNoteCategoryCreate> (readonly)
Returns Holds a collection of clinical observations made by healthcare providers during patient encounters.
50 51 52 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 50 def clinical_notes @clinical_notes end |
#date_of_service ⇒ Date (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.
44 45 46 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 44 def date_of_service @date_of_service end |
#delay_reason_code ⇒ CandidApiClient::Commons::Types::DelayReasonCode (readonly)
Returns 837i Loop2300, CLM-1300 Box 20 Code indicating the reason why a request was delayed.
123 124 125 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 123 def delay_reason_code @delay_reason_code end |
#discharge_date ⇒ Date (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.
109 110 111 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 109 def discharge_date @discharge_date end |
#end_date_of_service ⇒ Date (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.
83 84 85 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 83 def end_date_of_service @end_date_of_service end |
#epsdt_referral ⇒ CandidApiClient::Encounters::V4::Types::EpsdtReferral (readonly)
Returns Refers Box 24H on the CMS1500 form and Loop 2300 CRC - EPSDT Referral on the 837P form.
150 151 152 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 150 def epsdt_referral @epsdt_referral end |
#existing_medications ⇒ Array<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.
143 144 145 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 143 def existing_medications @existing_medications end |
#external_id ⇒ String (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.
35 36 37 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 35 def external_id @external_id end |
#guarantor ⇒ CandidApiClient::Guarantor::V1::Types::GuarantorUpdate (readonly)
Returns Personal and contact info for the guarantor of the patient responsibility.
145 146 147 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 145 def guarantor @guarantor end |
#last_menstrual_period_date ⇒ Date (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.
120 121 122 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 120 def last_menstrual_period_date @last_menstrual_period_date end |
#onset_of_current_illness_or_symptom_date ⇒ Date (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.
116 117 118 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 116 def onset_of_current_illness_or_symptom_date @onset_of_current_illness_or_symptom_date end |
#patient_authorized_release ⇒ Boolean (readonly)
Returns Whether this patient has authorized the release of medical information for billing purpose. Box 12 on the CMS-1500 claim form.
127 128 129 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 127 def @patient_authorized_release end |
#place_of_service_code ⇒ CandidApiClient::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).
71 72 73 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 71 def place_of_service_code @place_of_service_code end |
#prior_authorization_number ⇒ String (readonly)
Returns Box 23 on the CMS-1500 claim form.
31 32 33 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 31 def @prior_authorization_number end |
#provider_accepts_assignment ⇒ Boolean (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.
61 62 63 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 61 def provider_accepts_assignment @provider_accepts_assignment end |
#referral_number ⇒ String (readonly)
Returns Refers to REF*9F on the 837p. Value cannot be greater than 50 characters.
147 148 149 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 147 def referral_number @referral_number end |
#responsible_party ⇒ CandidApiClient::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.
58 59 60 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 58 def responsible_party @responsible_party end |
#schema_instances ⇒ Array<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.
135 136 137 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 135 def schema_instances @schema_instances end |
#secondary_payer_carrier_code ⇒ String (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.
156 157 158 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 156 def secondary_payer_carrier_code @secondary_payer_carrier_code end |
#service_authorization_exception_code ⇒ CandidApiClient::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.
99 100 101 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 99 def @service_authorization_exception_code end |
#subscriber_primary ⇒ CandidApiClient::Individual::Types::SubscriberCreate (readonly)
Returns Contains details of the primary insurance subscriber.
85 86 87 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 85 def subscriber_primary @subscriber_primary end |
#subscriber_secondary ⇒ CandidApiClient::Individual::Types::SubscriberCreate (readonly)
Returns Contains details of the secondary insurance subscriber.
87 88 89 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 87 def subscriber_secondary @subscriber_secondary end |
#subscriber_tertiary ⇒ CandidApiClient::Individual::Types::SubscriberCreate (readonly)
Returns Contains details of the tertiary insurance subscriber.
89 90 91 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 89 def subscriber_tertiary @subscriber_tertiary end |
#synchronicity ⇒ CandidApiClient::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.
67 68 69 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 67 def synchronicity @synchronicity end |
#tag_ids ⇒ Array<String> (readonly)
Returns Names of tags that should be on the encounter. Note all tags on encounter will be overridden with this list.
47 48 49 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 47 def tag_ids @tag_ids end |
#vitals ⇒ CandidApiClient::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.
139 140 141 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 139 def vitals @vitals end |
Class Method Details
.from_json(json_object:) ⇒ CandidApiClient::Encounters::V4::Types::EncounterOptional
Deserialize a JSON object to an instance of EncounterOptional
347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 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 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 347 def self.from_json(json_object:) struct = JSON.parse(json_object, object_class: OpenStruct) parsed_json = JSON.parse(json_object) benefits_assigned_to_provider = struct["benefits_assigned_to_provider"] = 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"] = 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"] = 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( benefits_assigned_to_provider: benefits_assigned_to_provider, 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: , 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: , 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.
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 480 def self.validate_raw(obj:) 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.&.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.&.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.&.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 EncounterOptional to a JSON object
470 471 472 |
# File 'lib/candidhealth/encounters/v_4/types/encounter_optional.rb', line 470 def to_json(*_args) @_field_set&.to_json end |