use serde::{Deserialize, Serialize};

/// PlanInformation : Additional identification for the subscriber's healthcare plan.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct PlanInformation {
    /// The agency claim number, only used when the information source is a Property and Casualty payer.
    #[serde(rename = "agencyClaimNumber", skip_serializing_if = "Option::is_none")]
    pub agency_claim_number: Option<String>,
    /// The alternative list ID - identifies a list of 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 case number
    #[serde(rename = "caseNumber", skip_serializing_if = "Option::is_none")]
    pub case_number: Option<String>,
    /// The [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier) assigned by the Centers for Medicare and Medicaid Services
    #[serde(
        rename = "centersForMedicareAndMedicaidServicesNPI",
        skip_serializing_if = "Option::is_none"
    )]
    pub centers_for_medicare_and_medicaid_services_npi: Option<String>,
    /// The class of contract code - used to identify the applicable class of contract for claims processing.
    #[serde(
        rename = "classOfContractCode",
        skip_serializing_if = "Option::is_none"
    )]
    pub class_of_contract_code: Option<String>,
    /// The contract number of a contract between the payer and the provider that requested the eligibility check.
    #[serde(rename = "contractNumber", skip_serializing_if = "Option::is_none")]
    pub contract_number: Option<String>,
    /// The coverage list ID - identifies a list of drugs that have coverage limitations for the 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 electronic device pin number
    #[serde(
        rename = "electronicDevicePin",
        skip_serializing_if = "Option::is_none"
    )]
    pub electronic_device_pin: Option<String>,
    /// The eligibility category
    #[serde(
        rename = "eligibilityCategory",
        skip_serializing_if = "Option::is_none"
    )]
    pub eligibility_category: Option<String>,
    /// The facility ID number
    #[serde(rename = "facilityIdNumber", skip_serializing_if = "Option::is_none")]
    pub facility_id_number: Option<String>,
    /// The facility network identification number
    #[serde(
        rename = "facilityNetworkIdentificationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub facility_network_identification_number: Option<String>,
    /// The family unit number
    #[serde(rename = "familyUnitNumber", skip_serializing_if = "Option::is_none")]
    pub family_unit_number: Option<String>,
    /// The federal taxpayer's identification number
    #[serde(
        rename = "federalTaxpayersIdentificationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub federal_taxpayers_identification_number: Option<String>,
    /// The group description
    #[serde(rename = "groupDescription", skip_serializing_if = "Option::is_none")]
    pub group_description: Option<String>,
    /// The group number
    #[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 identity card number, used when the Identity Card Number is different than the Member Identification Number.
    #[serde(rename = "idCardNumber", skip_serializing_if = "Option::is_none")]
    pub id_card_number: Option<String>,
    /// The identification card serial number. The Identification Card Serial Number uniquely identifies the identification card when multiple cards have been or will be issued to a member, such as a replacement card.
    #[serde(rename = "idCardSerialNumber", skip_serializing_if = "Option::is_none")]
    pub id_card_serial_number: Option<String>,
    /// The insurance policy number
    #[serde(
        rename = "insurancePolicyNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub insurance_policy_number: Option<String>,
    /// The issue number
    #[serde(rename = "issueNumber", skip_serializing_if = "Option::is_none")]
    pub issue_number: Option<String>,
    /// The Medicaid provider number
    #[serde(
        rename = "medicaidProviderNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub medicaid_provider_number: Option<String>,
    /// The Medicaid recipient identification number
    #[serde(
        rename = "medicaidRecipientIdNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub medicaid_recipient_id_number: Option<String>,
    /// The medical assistance category
    #[serde(
        rename = "medicalAssistanceCategory",
        skip_serializing_if = "Option::is_none"
    )]
    pub medical_assistance_category: Option<String>,
    /// The medical record identification number
    #[serde(
        rename = "medicalRecordIdentificationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub medical_record_identification_number: Option<String>,
    /// The Medicare provider number
    #[serde(
        rename = "medicareProviderNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub medicare_provider_number: Option<String>,
    /// The member identification number - only used when checking eligibility with a Workers' Compensation or Property and Casualty insurer.
    #[serde(rename = "memberId", skip_serializing_if = "Option::is_none")]
    pub member_id: Option<String>,
    /// The patient account number. If you included this value in the original eligibility request, the payer will return the same value here in the response.
    #[serde(
        rename = "patientAccountNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub patient_account_number: Option<String>,
    /// The personal identification number (PIN)
    #[serde(
        rename = "personalIdentificationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub personal_identification_number: Option<String>,
    /// The plan description
    #[serde(rename = "planDescription", skip_serializing_if = "Option::is_none")]
    pub plan_description: Option<String>,
    /// The plan, group, or plan network name
    #[serde(
        rename = "planNetworkIdDescription",
        skip_serializing_if = "Option::is_none"
    )]
    pub plan_network_id_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 plan number
    #[serde(rename = "planNumber", skip_serializing_if = "Option::is_none")]
    pub plan_number: Option<String>,
    /// The group or 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 prior identifier number
    #[serde(rename = "priorIdNumber", skip_serializing_if = "Option::is_none")]
    pub prior_id_number: Option<String>,
    /// The referral number
    #[serde(rename = "referralNumber", skip_serializing_if = "Option::is_none")]
    pub referral_number: Option<String>,
    /// The social security number
    #[serde(
        rename = "socialSecurityNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub social_security_number: Option<String>,
    /// The state license number
    #[serde(rename = "stateLicenseNumber", skip_serializing_if = "Option::is_none")]
    pub state_license_number: Option<String>,
    /// The submitter identification number
    #[serde(
        rename = "submitterIdentificationNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub submitter_identification_number: Option<String>,
    /// The user identification
    #[serde(rename = "userIdentification", skip_serializing_if = "Option::is_none")]
    pub user_identification: Option<String>,
}

impl PlanInformation {
    /// Additional identification for the subscriber's healthcare plan.
    pub fn new() -> PlanInformation {
        PlanInformation {
            agency_claim_number: None,
            alternative_list_id: None,
            case_number: None,
            centers_for_medicare_and_medicaid_services_npi: None,
            class_of_contract_code: None,
            contract_number: None,
            coverage_list_id: None,
            drug_formulary_number: None,
            electronic_device_pin: None,
            eligibility_category: None,
            facility_id_number: None,
            facility_network_identification_number: None,
            family_unit_number: None,
            federal_taxpayers_identification_number: None,
            group_description: None,
            group_number: None,
            hic_number: None,
            id_card_number: None,
            id_card_serial_number: None,
            insurance_policy_number: None,
            issue_number: None,
            medicaid_provider_number: None,
            medicaid_recipient_id_number: None,
            medical_assistance_category: None,
            medical_record_identification_number: None,
            medicare_provider_number: None,
            member_id: None,
            patient_account_number: None,
            personal_identification_number: None,
            plan_description: None,
            plan_network_id_description: None,
            plan_network_id_number: None,
            plan_number: None,
            policy_number: None,
            prior_authorization_number: None,
            prior_id_number: None,
            referral_number: None,
            social_security_number: None,
            state_license_number: None,
            submitter_identification_number: None,
            user_identification: None,
        }
    }
}
