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 EligibilityCheckOutputValidationErrors {
    /// An identifier for the payer's response.
    #[serde(rename = "controlNumber", skip_serializing_if = "Option::is_none")]
    pub control_number: Option<String>,
    /// 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::EligibilityMetaDataJson>>,
    #[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>>,
    #[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. Stedi returns both its internal trace number and the payer's trace number (if present) in this array.  You can't set your own trace number when submitting eligibility checks through this endpoint.
    #[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 EligibilityCheckOutputValidationErrors {
    pub fn new() -> EligibilityCheckOutputValidationErrors {
        EligibilityCheckOutputValidationErrors {
            control_number: 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,
            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,
        }
    }
}