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 InstitutionalOtherPayerName {
    #[serde(rename = "otherInsuredAdditionalIdentifier", skip_serializing_if = "Option::is_none")]
    pub other_insured_additional_identifier: Option<String>,
    /// The other payer's address.
    #[serde(rename = "otherPayerAddress", skip_serializing_if = "Option::is_none")]
    pub other_payer_address: Option<Box<models::InstitutionalAddress>>,
    #[serde(rename = "otherPayerAdjudicationOrPaymentDate", skip_serializing_if = "Option::is_none")]
    pub other_payer_adjudication_or_payment_date: Option<String>,
    /// Required when the claim is being sent in the payer-to-payer COB model, AND the destination payer is secondary to the payer identified in this object, AND the payer identified in this object re-adjudicated the claim. Can be set to `Y` - Yes.
    #[serde(rename = "otherPayerClaimAdjustmentIndicator", skip_serializing_if = "Option::is_none")]
    pub other_payer_claim_adjustment_indicator: Option<bool>,
    /// The other payer's claim control number for this claim.
    #[serde(rename = "otherPayerClaimControlNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_claim_control_number: Option<String>,
    /// The identifier specified in `otherPayerIdentifierTypeCode`.
    #[serde(rename = "otherPayerIdentifier")]
    pub other_payer_identifier: String,
    #[serde(rename = "otherPayerIdentifierTypeCode")]
    pub other_payer_identifier_type_code: models::InstitutionalOtherPayerIdentifierTypeCode,
    /// The business name of the other payer.
    #[serde(rename = "otherPayerOrganizationName")]
    pub other_payer_organization_name: String,
    /// The other payer's prior authorization number. Required when this payer has assigned a prior authorization number to this claim.
    #[serde(rename = "otherPayerPriorAuthorizationNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_prior_authorization_number: Option<String>,
    /// The other payer's referral number. Required when this payer has assigned a referral number to this claim.
    #[serde(rename = "otherPayerPriorAuthorizationOrReferralNumber", skip_serializing_if = "Option::is_none")]
    pub other_payer_prior_authorization_or_referral_number: Option<String>,
    /// Additional identification number for the other payer. The `qualifier` property can be set to `2U` - Payer Identification Number, `EI` - Employer's Identification Number, `FY` - Claim Office Number, or `NF` - National Association of Insurance Commissioners (NAIC) Code.
    #[serde(rename = "otherPayerSecondaryIdentifier", skip_serializing_if = "Option::is_none")]
    pub other_payer_secondary_identifier: Option<Vec<models::InstitutionalReferenceIdentification>>,
}

impl InstitutionalOtherPayerName {
    pub fn new(other_payer_identifier: String, other_payer_identifier_type_code: models::InstitutionalOtherPayerIdentifierTypeCode, other_payer_organization_name: String) -> InstitutionalOtherPayerName {
        InstitutionalOtherPayerName {
            other_insured_additional_identifier: None,
            other_payer_address: None,
            other_payer_adjudication_or_payment_date: None,
            other_payer_claim_adjustment_indicator: None,
            other_payer_claim_control_number: None,
            other_payer_identifier,
            other_payer_identifier_type_code,
            other_payer_organization_name,
            other_payer_prior_authorization_number: None,
            other_payer_prior_authorization_or_referral_number: None,
            other_payer_secondary_identifier: None,
        }
    }
}