autogen-stedi 0.3.2

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

/// RequestSubscriber : The primary policyholder for the insurance plan _or_ a dependent with a unique member ID. If a dependent has a unique member ID, include their information here and leave `dependents` empty. - At a minimum, our API requires that you supply at least one of these fields in the request: `memberId`, `dateOfBirth`, or `lastName`. However, each payer has different requirements, so you should supply the fields necessary for each payer to identify the subscriber in their system. - When you provide all four of `memberId`, `dateOfBirth`, `firstName`, and `lastName`, payers are required to return a response if the member is in their database. Some payers may be able to search with less information, but this varies by payer. - We recommend always including the patient's member ID when possible. - Enter the patient's name exactly as written on their insurance card, if available, including any special or punctuation characters such as apostrophes, hyphens (dashes), or spaces. Visit [patient names](https://www.stedi.com/docs/healthcare/send-eligibility-checks#patient-names) for all best practices to avoid unnecessary failures.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct RequestSubscriber {
    #[serde(rename = "additionalIdentification", skip_serializing_if = "Option::is_none")]
    pub additional_identification: Option<Box<models::AdditionalIdentificationSubscriber>>,
    #[serde(rename = "address", skip_serializing_if = "Option::is_none")]
    pub address: Option<Box<models::RequestSubscriberAddress>>,
    /// The date the subscriber's insurance card was issued. Use when you need to specify a date range. Provide the end of the range in the `endCardIssueDate` property.
    #[serde(rename = "beginningCardIssueDate", skip_serializing_if = "Option::is_none")]
    pub beginning_card_issue_date: Option<String>,
    /// The date the subscriber's insurance plan begins. Use when you need to specify a date range. Provide the end of the range in the `endPlanIssueDate` property.
    #[serde(rename = "beginningPlanIssueDate", skip_serializing_if = "Option::is_none")]
    pub beginning_plan_issue_date: Option<String>,
    /// The number assigned to each family member born with the same birth date, such as twins or triplets. Use to indicate the birth order when there are multiple births associated with the provided birth date.
    #[serde(rename = "birthSequenceNumber", skip_serializing_if = "Option::is_none")]
    pub birth_sequence_number: Option<String>,
    /// The case number associated with the subscriber.
    #[serde(rename = "caseNumber", skip_serializing_if = "Option::is_none")]
    pub case_number: Option<String>,
    /// This property is no longer used.
    #[serde(rename = "coverageLevelCode", skip_serializing_if = "Option::is_none")]
    pub coverage_level_code: Option<String>,
    /// The subscriber's date of birth.
    #[serde(rename = "dateOfBirth", skip_serializing_if = "Option::is_none")]
    pub date_of_birth: Option<String>,
    /// The date the subscriber's insurance card expires. Use when you need to specify a date range. Provide the start of the range in the `beginningCardIssueDate` property.
    #[serde(rename = "endCardIssueDate", skip_serializing_if = "Option::is_none")]
    pub end_card_issue_date: Option<String>,
    /// The date the subscriber's insurance plan ends. Use when you need to specify a date range. Provide the start of the range in the `beginningPlanIssueDate` property.
    #[serde(rename = "endPlanIssueDate", skip_serializing_if = "Option::is_none")]
    pub end_plan_issue_date: Option<String>,
    /// The patient's first name.
    #[serde(rename = "firstName", skip_serializing_if = "Option::is_none")]
    pub first_name: Option<String>,
    /// Code indicating the subscriber's gender.
    #[serde(rename = "gender", skip_serializing_if = "Option::is_none")]
    pub gender: Option<models::Gender>,
    /// The group number associated with the subscriber's insurance policy.
    #[serde(rename = "groupNumber", skip_serializing_if = "Option::is_none")]
    pub group_number: Option<String>,
    /// Information about the subscriber's health care diagnosis. You can include up to eight entries in this array.   The first array entry must have `diagnosisTypeCode` set to `ABK`. All subsequent entries must have `diagnosisTypeCode` set to `ABF`.
    #[serde(rename = "healthCareCodeInformation", skip_serializing_if = "Option::is_none")]
    pub health_care_code_information: Option<Vec<models::HealthCareInformation>>,
    /// The subscriber's identification card number. Include this property when this number is different than the subscriber's member ID. This is common in Medicaid.
    #[serde(rename = "idCard", skip_serializing_if = "Option::is_none")]
    pub id_card: Option<String>,
    /// The date the subscriber's insurance card was issued. Use to specify a single date.
    #[serde(rename = "idCardIssueDate", skip_serializing_if = "Option::is_none")]
    pub id_card_issue_date: Option<String>,
    /// The subscriber's last name. **Don't** include the subscriber's name suffix, such as Jr. or III. Use the designated `suffix` property instead.
    #[serde(rename = "lastName", skip_serializing_if = "Option::is_none")]
    pub last_name: Option<String>,
    /// The Medicaid Recipient Identification Number. You can provide this number to identify the subscriber when it is the primary number the payer knows a member by (such as for Medicare or Medicaid). Do not supply this value unless it is different from the `memberId`.
    #[serde(rename = "medicaidRecipientIdentificationNumber", skip_serializing_if = "Option::is_none")]
    pub medicaid_recipient_identification_number: Option<String>,
    /// The member ID for the subscriber's insurance policy.
    #[serde(rename = "memberId", skip_serializing_if = "Option::is_none")]
    pub member_id: Option<String>,
    /// The patient's middle name or middle initial.
    #[serde(rename = "middleName", skip_serializing_if = "Option::is_none")]
    pub middle_name: Option<String>,
    /// The date the subscriber's insurance plan begins. Use to specify a single date.
    #[serde(rename = "planIssueDate", skip_serializing_if = "Option::is_none")]
    pub plan_issue_date: Option<String>,
    #[serde(rename = "providerCode", skip_serializing_if = "Option::is_none")]
    pub provider_code: Option<models::RequestSubscriberProviderCode>,
    /// The provider identifier you specified in the `referenceIdentificationQualifier` property. It is **required** if you set the `referenceIdentificationQualifier`. For example, this property could contain the provider's National Provider ID or Federal Taxpayer Identification number.   If you set the `referenceIdentificationQualifier` to `PXC`, then this property should contain the provider's taxonomy code.
    #[serde(rename = "providerIdentifier", skip_serializing_if = "Option::is_none")]
    pub provider_identifier: Option<String>,
    #[serde(rename = "referenceIdentificationQualifier", skip_serializing_if = "Option::is_none")]
    pub reference_identification_qualifier: Option<models::RequestSubscriberReferenceIdentificationQualifier>,
    /// Identify the dollar amount the subscriber will apply toward their spend down amount, if required. For some Medicaid programs, individuals must pay a certain amount towards their healthcare cost (spend down) before coverage starts.
    #[serde(rename = "spendDownAmount", skip_serializing_if = "Option::is_none")]
    pub spend_down_amount: Option<String>,
    /// The subscriber's spend down total billed amount.
    #[serde(rename = "spendDownTotalBilledAmount", skip_serializing_if = "Option::is_none")]
    pub spend_down_total_billed_amount: Option<String>,
    /// The subscriber's Social Security Number (SSN). Many commercial and government payers ignore this property due to concerns about member privacy. However, some Medicaid programs support alternative searches using the patient's Social Security Number, instead of the member ID.
    #[serde(rename = "ssn", skip_serializing_if = "Option::is_none")]
    pub ssn: Option<String>,
    /// The name suffix, such as Jr., Sr., or III. Only include the subscriber's personal name suffix - **don't** include professional or academic titles, such as M.D. or MBA.
    #[serde(rename = "suffix", skip_serializing_if = "Option::is_none")]
    pub suffix: Option<String>,
}

impl RequestSubscriber {
    /// The primary policyholder for the insurance plan _or_ a dependent with a unique member ID. If a dependent has a unique member ID, include their information here and leave `dependents` empty. - At a minimum, our API requires that you supply at least one of these fields in the request: `memberId`, `dateOfBirth`, or `lastName`. However, each payer has different requirements, so you should supply the fields necessary for each payer to identify the subscriber in their system. - When you provide all four of `memberId`, `dateOfBirth`, `firstName`, and `lastName`, payers are required to return a response if the member is in their database. Some payers may be able to search with less information, but this varies by payer. - We recommend always including the patient's member ID when possible. - Enter the patient's name exactly as written on their insurance card, if available, including any special or punctuation characters such as apostrophes, hyphens (dashes), or spaces. Visit [patient names](https://www.stedi.com/docs/healthcare/send-eligibility-checks#patient-names) for all best practices to avoid unnecessary failures.
    pub fn new() -> RequestSubscriber {
        RequestSubscriber {
            additional_identification: None,
            address: None,
            beginning_card_issue_date: None,
            beginning_plan_issue_date: None,
            birth_sequence_number: None,
            case_number: None,
            coverage_level_code: None,
            date_of_birth: None,
            end_card_issue_date: None,
            end_plan_issue_date: None,
            first_name: None,
            gender: None,
            group_number: None,
            health_care_code_information: None,
            id_card: None,
            id_card_issue_date: None,
            last_name: None,
            medicaid_recipient_identification_number: None,
            member_id: None,
            middle_name: None,
            plan_issue_date: None,
            provider_code: None,
            provider_identifier: None,
            reference_identification_qualifier: None,
            spend_down_amount: None,
            spend_down_total_billed_amount: None,
            ssn: None,
            suffix: None,
        }
    }
}