use serde::{Deserialize, Serialize};

/// BenefitsAdditionalInformation : Identifying information specific to this type of benefit.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct BenefitsAdditionalInformation {
    /// The alternative list ID. This identifier allows the payer to specify a list of drugs and its alternative drugs with the associated formulary status for the patient.
    #[serde(rename = "alternativeListId", skip_serializing_if = "Option::is_none")]
    pub alternative_list_id: Option<String>,
    /// The coverage list ID. This identifier allows the payer to specify the identifier of a list of drugs that have coverage limitations for the associated patient.
    #[serde(rename = "coverageListId", skip_serializing_if = "Option::is_none")]
    pub coverage_list_id: Option<String>,
    /// The drug formulary number.
    #[serde(
        rename = "drugFormularyNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub drug_formulary_number: Option<String>,
    /// The family unit number. This is returned when the payer is a pharmacy benefits manager (PBM) and the patient has a suffix to their member ID number that is used in the NCPDP Telecom Standard Insurance Segment, in field `303-C3` (Person Code). For all other uses, the family unit number (suffix) is considered part of the patient's member ID number.
    #[serde(rename = "familyUnitNumber", skip_serializing_if = "Option::is_none")]
    pub family_unit_number: Option<String>,
    /// Group name
    #[serde(rename = "groupDescription", skip_serializing_if = "Option::is_none")]
    pub group_description: Option<String>,
    /// The group number for the patient's health insurance plan.
    #[serde(rename = "groupNumber", skip_serializing_if = "Option::is_none")]
    pub group_number: Option<String>,
    /// The health insurance claim number (HICN). Note that CMS previously used the HICN to uniquely identify Medicare beneficiaries. However, they have since transitioned to a new, randomized Medicare Beneficiary Identifier (MBI) format. The HICN is no longer used for Medicare transactions but this property is now used by some payers to return MBI. If you receive a value in this property that matches the format specified in the [Medicare Beneficiary Identifier documentation](https://www.cms.gov/training-education/partner-outreach-resources/new-medicare-card/medical-beneficiary-identifiers-mbis), the number is likely an MBI and we recommend sending a follow-up eligibility check to CMS for additional benefits data. This most commonly occurs with patients who are covered by both Medicare and Medicaid.
    #[serde(rename = "hicNumber", skip_serializing_if = "Option::is_none")]
    pub hic_number: Option<String>,
    /// The insurance policy number.
    #[serde(
        rename = "insurancePolicyNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub insurance_policy_number: Option<String>,
    /// The Medicaid Recipient Identification number.
    #[serde(
        rename = "medicaidRecepientIdNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub medicaid_recepient_id_number: Option<String>,
    /// The medical assistance category.
    #[serde(
        rename = "medicalAssistanceCategory",
        skip_serializing_if = "Option::is_none"
    )]
    pub medical_assistance_category: Option<String>,
    /// The patient's member ID.
    #[serde(rename = "memberId", skip_serializing_if = "Option::is_none")]
    pub member_id: Option<String>,
    /// Plan name
    #[serde(rename = "planDescription", skip_serializing_if = "Option::is_none")]
    pub plan_description: Option<String>,
    /// Plan network name
    #[serde(
        rename = "planNetworkDescription",
        skip_serializing_if = "Option::is_none"
    )]
    pub plan_network_description: Option<String>,
    /// The plan network identification number.
    #[serde(
        rename = "planNetworkIdNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub plan_network_id_number: Option<String>,
    /// The insurance plan number.
    #[serde(rename = "planNumber", skip_serializing_if = "Option::is_none")]
    pub plan_number: Option<String>,
    /// The patient's policy number.
    #[serde(rename = "policyNumber", skip_serializing_if = "Option::is_none")]
    pub policy_number: Option<String>,
    /// The prior authorization number.
    #[serde(
        rename = "priorAuthorizationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub prior_authorization_number: Option<String>,
    /// The referral number.
    #[serde(rename = "referralNumber", skip_serializing_if = "Option::is_none")]
    pub referral_number: Option<String>,
}

impl BenefitsAdditionalInformation {
    /// Identifying information specific to this type of benefit.
    pub fn new() -> BenefitsAdditionalInformation {
        BenefitsAdditionalInformation {
            alternative_list_id: None,
            coverage_list_id: None,
            drug_formulary_number: None,
            family_unit_number: None,
            group_description: None,
            group_number: None,
            hic_number: None,
            insurance_policy_number: None,
            medicaid_recepient_id_number: None,
            medical_assistance_category: None,
            member_id: None,
            plan_description: None,
            plan_network_description: None,
            plan_network_id_number: None,
            plan_number: None,
            policy_number: None,
            prior_authorization_number: None,
            referral_number: None,
        }
    }
}
