autogen-stedi 0.3.2

Auto-generated, strongly-typed Rust client for the Stedi APIs
Documentation
/*
 * Stedi Healthcare
 *
 * 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::healthcare::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RawEligibilityResponseValidationErrors {
    /// Information about the patient's healthcare benefits, such as coverage level (individual vs. family), coverage type (deductibles, co-pays, etc.), out of pocket maximums, and more.     Payers typically return at least the following properties: `code`, `coverageLevelCode`, `serviceTypeCodes`, and either `benefitAmount` or `benefitPercent`. However, the exact properties returned in this object are up to the payer's discretion.  The payer may send benefits information for service type codes (STCs) you didn't request - this is expected. The STC you send in the request tells the payer the types of benefits information you want, but they aren't required to respond with exactly the same STC(s) in the response. Receiving different STCs than you requested can also mean that the payer is ignoring the STC you sent, which is why we recommend [testing payers](https://www.stedi.com/docs/healthcare/eligibility-stc-procedure-codes#test-payer-stc-support) to determine their support for specific STCs.  Visit [Determine patient benefits](https://www.stedi.com/docs/healthcare/eligibility-active-coverage-benefits) for more information about benefit types, details about how to interpret the `benefitsInformation` array, and additional examples.
    #[serde(rename = "benefitsInformation", skip_serializing_if = "Option::is_none")]
    pub benefits_information: Option<Vec<models::BenefitsInformation>>,
    /// An identifier for the payer's response.
    #[serde(rename = "controlNumber", skip_serializing_if = "Option::is_none")]
    pub control_number: Option<String>,
    /// Information about the patient when they are a dependent. When the patient is a dependent, this array will contain a single object with the patient's information. When the patient is a subscriber, or considered to be a subscriber because they have a unique member ID, their information is returned in the `subscriber` object, and this array will be empty.   When present, this object will always include the dependent's name for identification, but many payers will also return the date of birth and other identifying information.
    #[serde(rename = "dependents", skip_serializing_if = "Option::is_none")]
    pub dependents: Option<Vec<models::ResponseDependent>>,
    /// An identifier that allows Stedi to group eligibility checks for the same patient into a unified record in the Stedi portal called an [eligibility search](https://www.stedi.com/docs/healthcare/eligibility-searches-view).  This property is for use by Stedi tools only, such as Stedi's MCP server.
    #[serde(rename = "eligibilitySearchId", skip_serializing_if = "Option::is_none")]
    pub eligibility_search_id: Option<String>,
    /// When a payer rejects your eligibility check, the response contains one or more [`AAA` errors](https://www.stedi.com/docs/healthcare/eligibility-troubleshooting#payer-aaa-errors) that specify the reasons for the rejection and any recommended follow-up actions.  Any errors that occur at the `payer`, `provider`, `subscriber`, or `dependents` levels are also included in this array, allowing you to review all errors in a central location. If there are no `AAA` errors, this array will be empty.
    #[serde(rename = "errors", skip_serializing_if = "Option::is_none")]
    pub errors: Option<Vec<models::EligibilityCheckError>>,
    /// A globally unique identifier for this eligibility check across all Stedi accounts. It's formatted as `ec_<uuid>`. For example: `ec_550e8400-e29b-41d4-a716-446655440000`. You can use this ID to track this eligibility check and to construct deep links to eligibility checks in the Stedi portal.
    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
    pub id: Option<String>,
    /// The implementation transaction set error code provided in `IK502` of the 999 transaction.
    #[serde(rename = "implementationTransactionSetSyntaxError", skip_serializing_if = "Option::is_none")]
    pub implementation_transaction_set_syntax_error: Option<String>,
    #[serde(rename = "meta", skip_serializing_if = "Option::is_none")]
    pub meta: Option<Box<models::EligibilityMetaDataRawX12>>,
    #[serde(rename = "payer", skip_serializing_if = "Option::is_none")]
    pub payer: Option<Box<models::Payer>>,
    #[serde(rename = "planDateInformation", skip_serializing_if = "Option::is_none")]
    pub plan_date_information: Option<Box<models::PlanDateInformation>>,
    #[serde(rename = "planInformation", skip_serializing_if = "Option::is_none")]
    pub plan_information: Option<Box<models::PlanInformation>>,
    /// Please use `benefitsInformation` instead.
    #[serde(rename = "planStatus", skip_serializing_if = "Option::is_none")]
    pub plan_status: Option<Vec<models::PlanStatus>>,
    #[serde(rename = "provider", skip_serializing_if = "Option::is_none")]
    pub provider: Option<Box<models::ResponseProvider>>,
    #[serde(rename = "reassociationKey", skip_serializing_if = "Option::is_none")]
    pub reassociation_key: Option<String>,
    /// Errors Stedi encountered when generating or sending the final X12 EDI transaction to the payer. These can include validation errors and payer unavailable errors that prevent delivery.
    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
    pub status: Option<String>,
    #[serde(rename = "subscriber", skip_serializing_if = "Option::is_none")]
    pub subscriber: Option<Box<models::ResponseSubscriber>>,
    /// A unique identifier for the eligibility request. It's used to trace the transaction. Stedi always generates a trace number for internal tracking, and the payer may generate one as well. You can also optionally [supply your own trace number](https://www.stedi.com/docs/healthcare/send-eligibility-checks#trn) in a `TRN` segment.  Stedi returns its internal trace number in this array as well as the trace numbers from you and the payer (if provided).
    #[serde(rename = "subscriberTraceNumbers", skip_serializing_if = "Option::is_none")]
    pub subscriber_trace_numbers: Option<Vec<models::SubscriberTraceNumber>>,
    /// An ID for the payer you identified in the original eligibility check request. This value may differ from the `tradingPartnerServiceId` you submitted in the original request because it reflects the payer's internal concept of their ID, not necessarily the ID Stedi uses to route requests to this payer.
    #[serde(rename = "tradingPartnerServiceId", skip_serializing_if = "Option::is_none")]
    pub trading_partner_service_id: Option<String>,
    /// The transaction set acknowledgment code provided in in the [X12 EDI 999 response](https://portal.stedi.com/app/guides/view/hipaa/implementation-acknowledgment-x231/01HRF41ES1DVGCA6X1EHSRPFXZ#properties.heading.properties.transaction_set_response_header_AK2_loop.items.properties.transaction_set_response_trailer_IK5).
    #[serde(rename = "transactionSetAcknowledgement", skip_serializing_if = "Option::is_none")]
    pub transaction_set_acknowledgement: Option<String>,
    /// Issues with your eligibility request that could affect the results, or information about the response. For example, warnings can help explain why the request was rejected.
    #[serde(rename = "warnings", skip_serializing_if = "Option::is_none")]
    pub warnings: Option<Vec<models::Warning>>,
    /// Typically this property contains the raw X12 EDI [271 Eligibility Benefit Response](https://portal.stedi.com/app/guides/view/hipaa/health-care-eligibility-benefit-response-x279a1/01GS66YHZPB37ABF34DBPSR213) from the payer.  In some circumstances, this property may contain a [999 Implementation Acknowledgment](https://portal.stedi.com/app/guides/view/hipaa/implementation-acknowledgment-x231a1/01HMRQV0N8SPHG58M4ZG1CRHH0) instead of a 271. A 999 indicates validation errors in the X12 EDI transaction, such as improper formatting or missing or invalid values.  If the 999 is returned in this property, many of the other response properties will be empty, as they are mapped to information in the 271.
    #[serde(rename = "x12", skip_serializing_if = "Option::is_none")]
    pub x12: Option<String>,
}

impl RawEligibilityResponseValidationErrors {
    pub fn new() -> RawEligibilityResponseValidationErrors {
        RawEligibilityResponseValidationErrors {
            benefits_information: None,
            control_number: None,
            dependents: None,
            eligibility_search_id: None,
            errors: None,
            id: None,
            implementation_transaction_set_syntax_error: None,
            meta: None,
            payer: None,
            plan_date_information: None,
            plan_information: None,
            plan_status: None,
            provider: None,
            reassociation_key: None,
            status: None,
            subscriber: None,
            subscriber_trace_numbers: None,
            trading_partner_service_id: None,
            transaction_set_acknowledgement: None,
            warnings: None,
            x12: None,
        }
    }
}