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};

/// CobSubscriber : 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 `dependent` empty.    The demographic information you provide **must** match the payer's data exactly. For example, if the payer has the subscriber's name as `Jonathan Doe`, a COB request for `Jon Doe` will fail because the name doesn't match the payer's records. Also note that:   - Any prefix on the member's card is considered part of the `memberID` used for the search.   - Mismatches in the `memberId` are one of the most common causes of `Member Not Found` errors. We strongly recommend first performing an [Eligibility Check](https://www.stedi.com/docs/healthcare/api-reference/post-healthcare-eligibility) and using the `memberId` in the response to populate your COB check.   - We recommend including the `ssn` property in addition to the `memberId` if possible. This allows Stedi to do an additional search for the patient when the `memberId` doesn't return a match.   - Stedi can identify coverage overlap for the same payer if the member ID differs between the two coverages.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CobSubscriber {
    /// The subscriber's date of birth.
    #[serde(rename = "dateOfBirth")]
    pub date_of_birth: String,
    /// The patient's first name.
    #[serde(rename = "firstName")]
    pub first_name: String,
    /// The patient's last name.
    #[serde(rename = "lastName")]
    pub last_name: String,
    /// The member ID for the subscriber's insurance policy.   You must provide at least one of the `memberId` or `ssn` properties in the request. However, we recommend including both if possible. This allows Stedi to do an additional search for patient information when the `memberId` doesn't return a match.
    #[serde(rename = "memberId", skip_serializing_if = "Option::is_none")]
    pub member_id: Option<String>,
    /// The subscriber's Social Security Number (SSN).   You must provide at least one of the `memberId` or `ssn` properties in the request. However, we recommend including both if possible. This allows Stedi to do an additional search for patient information when the `memberId` doesn't return a match.
    #[serde(rename = "ssn", skip_serializing_if = "Option::is_none")]
    pub ssn: Option<String>,
}

impl CobSubscriber {
    /// 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 `dependent` empty.    The demographic information you provide **must** match the payer's data exactly. For example, if the payer has the subscriber's name as `Jonathan Doe`, a COB request for `Jon Doe` will fail because the name doesn't match the payer's records. Also note that:   - Any prefix on the member's card is considered part of the `memberID` used for the search.   - Mismatches in the `memberId` are one of the most common causes of `Member Not Found` errors. We strongly recommend first performing an [Eligibility Check](https://www.stedi.com/docs/healthcare/api-reference/post-healthcare-eligibility) and using the `memberId` in the response to populate your COB check.   - We recommend including the `ssn` property in addition to the `memberId` if possible. This allows Stedi to do an additional search for the patient when the `memberId` doesn't return a match.   - Stedi can identify coverage overlap for the same payer if the member ID differs between the two coverages.
    pub fn new(date_of_birth: String, first_name: String, last_name: String) -> CobSubscriber {
        CobSubscriber {
            date_of_birth,
            first_name,
            last_name,
            member_id: None,
            ssn: None,
        }
    }
}