autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Manager
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: 2024-04-01
 * Contact: healthcare@stedi.com
 * Generated by: https://openapi-generator.tech
 */

use crate::manager::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BenefitsInformation {
    /// A free-form message containing additional information about the benefits in the response.
    #[serde(rename = "additionalInformation", skip_serializing_if = "Option::is_none")]
    pub additional_information: Option<Vec<models::AdditionalInformation>>,
    /// Code indicating whether the benefit is subject to prior authorization or certification. Can be `Y` - Yes, `N` - No, or `U` - Unknown.   - When this property is set to `U`, it means the payer can't determine in real time whether prior authorization is required for the service. They may require additional details, like diagnosis or place of service to make a determination. Check the `additionalInformation[].description` property for any additional clarification. You can also contact the payer directly or use their provider portal to get more information.   - Some payers may send additional notes about prior authorization rules in the `additionalInformation[].description` property. Payers may also send prior authorization notes in a separate `benefitsInformation` object with a code of `1` (Active coverage), `CB` (Coverage Benefit), or `D` (Benefit Description).  Visit our [patient benefits docs](https://www.stedi.com/docs/healthcare/eligibility-network-status-authorization-referrals#is-prior-authorization-required) to learn more about prior authorization.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "authOrCertIndicator", skip_serializing_if = "Option::is_none")]
    pub auth_or_cert_indicator: Option<models::AuthOrCertIndicator>,
    /// The monetary benefit amount, such as a patient's co-pay or deductible. This value is expressed as a decimal, such as 100.00.     The payer will always send a value in this property when the `benefitsInformation[].code` = `B` - Co-Payment, `C` - Deductible, `G` - Out of Pocket (Stop Loss), `J` - Cost Containment, or `Y` - Spend Down. For those codes, this value represents the patient's portion of responsibility.     The payer will **never** send this value when `benefitsInformation[].code` = `A` - Co-Insurance. This property can contain zero when the patient has no responsibility.     Learn more about [patient costs](https://www.stedi.com/docs/healthcare/eligibility-patient-responsibility-benefits).
    #[serde(rename = "benefitAmount", skip_serializing_if = "Option::is_none")]
    pub benefit_amount: Option<String>,
    /// The percentage of the benefit, such as co-insurance. This property can contain zero when the patient has no responsibility.     The payer will always send a value in this property when `benefitsInformation[].code` = `A` - Co-Insurance. For this code, this value represents the patient's portion of the responsibility. The percentage is expressed as a decimal, such as `0.80` represents 80%.     The payer will **never** send a value in this property when `benefitsInformation[].code` = `B` - Co-Payment, `C` - Deductible, `G` - Out of Pocket (Stop Loss), `J` - Cost Containment, or `Y` - Spend Down.     Learn more about [patient costs](https://www.stedi.com/docs/healthcare/eligibility-patient-responsibility-benefits).
    #[serde(rename = "benefitPercent", skip_serializing_if = "Option::is_none")]
    pub benefit_percent: Option<String>,
    /// The quantity of the benefit, qualified by the type specified in `quantityQualifier`. For example, `10` when the `quantityQualifier` is `Visits`.
    #[serde(rename = "benefitQuantity", skip_serializing_if = "Option::is_none")]
    pub benefit_quantity: Option<String>,
    #[serde(rename = "benefitsAdditionalInformation", skip_serializing_if = "Option::is_none")]
    pub benefits_additional_information: Option<Box<models::BenefitsAdditionalInformation>>,
    #[serde(rename = "benefitsDateInformation", skip_serializing_if = "Option::is_none")]
    pub benefits_date_information: Option<Box<models::BenefitsDateInformation>>,
    /// Other entities associated with the eligibility or benefits. This could be a provider, an individual, an organization, or another payer. When present, this array typically contains information about the patient's primary care provider (PCP), another organization that handles a specific benefit type (such as telehealth mental health services), or another health plan for the patient (coordination of benefits scenarios). - This is where information for a crossover carrier such as Medicaid or Medicare is provided, if it's applicable to the patient and the payer supports it. - For Blue Cross Blue Shield (BCBS) payers, Stedi returns an entry containing information about the patient's home plan - the plan that actually verified the coverage. In this object, the `entityIdentifier` property is set to `Party Performing Verification`. [Learn more](https://www.stedi.com/docs/healthcare/eligibility-active-coverage-benefits#bcbs-home-plan)
    #[serde(rename = "benefitsRelatedEntities", skip_serializing_if = "Option::is_none")]
    pub benefits_related_entities: Option<Vec<models::BenefitsRelatedEntity>>,
    /// Please use `benefitsInformation[].benefitsRelatedEntities` instead.
    #[serde(rename = "benefitsRelatedEntity", skip_serializing_if = "Option::is_none")]
    pub benefits_related_entity: Option<Box<models::BenefitsRelatedEntity>>,
    #[serde(rename = "benefitsServiceDelivery", skip_serializing_if = "Option::is_none")]
    pub benefits_service_delivery: Option<Vec<models::BenefitsServiceDelivery>>,
    #[serde(rename = "code", skip_serializing_if = "Option::is_none")]
    pub code: Option<models::BenefitsInformationCode>,
    #[serde(rename = "compositeMedicalProcedureIdentifier", skip_serializing_if = "Option::is_none")]
    pub composite_medical_procedure_identifier: Option<Box<models::CompositeMedicalProcedureIdentifier>>,
    #[serde(rename = "coverageLevel", skip_serializing_if = "Option::is_none")]
    pub coverage_level: Option<models::BenefitsInformationCoverageLevelName>,
    #[serde(rename = "coverageLevelCode", skip_serializing_if = "Option::is_none")]
    pub coverage_level_code: Option<models::BenefitsInformationCoverageLevelCode>,
    /// Please use `benefitsInformation[].eligibilityAdditionalInformationList` instead.
    #[serde(rename = "eligibilityAdditionalInformation", skip_serializing_if = "Option::is_none")]
    pub eligibility_additional_information: Option<Box<models::EligibilityAdditionalInformation>>,
    /// Used when there are multiple Nature of Injury Codes or a Facility Type Codes included in the response.
    #[serde(rename = "eligibilityAdditionalInformationList", skip_serializing_if = "Option::is_none")]
    pub eligibility_additional_information_list: Option<Vec<models::EligibilityAdditionalInformation>>,
    /// The loop header identifier number in the `LS` segment of the original X12 EDI transaction.
    #[serde(rename = "headerLoopIdentifierCode", skip_serializing_if = "Option::is_none")]
    pub header_loop_identifier_code: Option<String>,
    #[serde(rename = "inPlanNetworkIndicator", skip_serializing_if = "Option::is_none")]
    pub in_plan_network_indicator: Option<models::InPlanNetworkIndicatorName>,
    #[serde(rename = "inPlanNetworkIndicatorCode", skip_serializing_if = "Option::is_none")]
    pub in_plan_network_indicator_code: Option<models::InPlanNetworkIndicatorCode>,
    #[serde(rename = "insuranceType", skip_serializing_if = "Option::is_none")]
    pub insurance_type: Option<models::InsuranceTypeName>,
    /// Code identifying the type of insurance policy. Visit [Eligibility code lists](https://www.stedi.com/docs/healthcare/eligibility-code-lists#insurance-type-codes) for a complete list.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "insuranceTypeCode", skip_serializing_if = "Option::is_none")]
    pub insurance_type_code: Option<models::InsuranceTypeCode>,
    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
    pub name: Option<models::BenefitsInformationName>,
    /// The specific product name or special program name for an insurance plan. For example `Gold 1-2-3`.  Payers are normally required to send the plan name when `benefitsInformation[].code` is set to values `1` - `8` and the `benefitsInformation[].serviceTypeCodes` contains `30` (Health Benefit Plan Coverage). However, behavior may vary by payer, so don't rely on this information being present in the response. Note that the plan name returned in this property may not exactly match the name the payer uses in official plan documents or marketing literature.  Visit [What's the plan name?](https://www.stedi.com/docs/healthcare/eligibility-active-coverage-benefits#what’s-the-plan-name%3F) in the benefits response documentation for more details.
    #[serde(rename = "planCoverage", skip_serializing_if = "Option::is_none")]
    pub plan_coverage: Option<String>,
    /// The name of the `quantityQualifierCode`.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "quantityQualifier", skip_serializing_if = "Option::is_none")]
    pub quantity_qualifier: Option<models::QuantityQualifierName>,
    /// Code indicating the type of quantity for the benefit. Visit [Eligibility code lists](https://www.stedi.com/docs/healthcare/eligibility-code-lists#quantity-qualifier-codes) for a complete list.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "quantityQualifierCode", skip_serializing_if = "Option::is_none")]
    pub quantity_qualifier_code: Option<models::QuantityQualifierCode>,
    /// Service Type Codes (STCs) related to the benefit type. For example, `7` - Anesthesia. Visit [Service Type Codes](https://www.stedi.com/docs/healthcare/send-eligibility-checks#service-type-codes) for a complete list.  This list is specific to X12 version 005010, which is the mandated version for eligibility checks. It differs from the current [X12 Service Type Codes](https://x12.org/codes/service-type-codes) list, which applies to X12 versions later than 005010.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "serviceTypeCodes", skip_serializing_if = "Option::is_none")]
    pub service_type_codes: Option<Vec<models::ResponseEligibilityServiceTypeCode>>,
    /// The names of the Service Type Codes listed in the `serviceTypeCodes` array. Visit [Service Type Codes](https://www.stedi.com/docs/healthcare/send-eligibility-checks#service-type-codes) for a complete list of codes and their names.  The word physician in service type codes refers to any healthcare provider, including physician assistants, nurse practitioners, and other types of healthcare professionals.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "serviceTypes", skip_serializing_if = "Option::is_none")]
    pub service_types: Option<Vec<models::ResponseEligibilityServiceType>>,
    /// The name of the `timeQualifierCode`.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "timeQualifier", skip_serializing_if = "Option::is_none")]
    pub time_qualifier: Option<models::TimeQualifierName>,
    /// Code indicating the time period for the benefit information. Visit [Eligibility code lists](https://www.stedi.com/docs/healthcare/eligibility-code-lists#time-qualifier-codes) for a complete list.  Payers may sometimes return other non-compliant values.
    #[serde(rename = "timeQualifierCode", skip_serializing_if = "Option::is_none")]
    pub time_qualifier_code: Option<models::TimeQualifierCode>,
    /// The loop trailer identifier number in the `LE` segment of the original X12 EDI transaction.
    #[serde(rename = "trailerLoopIdentifierCode", skip_serializing_if = "Option::is_none")]
    pub trailer_loop_identifier_code: Option<String>,
}

impl BenefitsInformation {
    pub fn new() -> BenefitsInformation {
        BenefitsInformation {
            additional_information: None,
            auth_or_cert_indicator: None,
            benefit_amount: None,
            benefit_percent: None,
            benefit_quantity: None,
            benefits_additional_information: None,
            benefits_date_information: None,
            benefits_related_entities: None,
            benefits_related_entity: None,
            benefits_service_delivery: None,
            code: None,
            composite_medical_procedure_identifier: None,
            coverage_level: None,
            coverage_level_code: None,
            eligibility_additional_information: None,
            eligibility_additional_information_list: None,
            header_loop_identifier_code: None,
            in_plan_network_indicator: None,
            in_plan_network_indicator_code: None,
            insurance_type: None,
            insurance_type_code: None,
            name: None,
            plan_coverage: None,
            quantity_qualifier: None,
            quantity_qualifier_code: None,
            service_type_codes: None,
            service_types: None,
            time_qualifier: None,
            time_qualifier_code: None,
            trailer_loop_identifier_code: None,
        }
    }
}