/*
* 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 InstitutionalDependent {
/// The dependent's address. Every claim must include this information in either the `subscriber` (when the patient is the subscriber) or `dependent` (when the patient is a dependent) object. You must include at least the `address1` and `city` properties in this object. The `state` and `postalCode` properties are also required for all United States and Canadian addresses. - The address should be the patient's correct address at the time of service. - If you don't know the patient's address, first submit a [Real-Time Eligibility Check](https://www.stedi.com/docs/healthcare/api-reference/post-healthcare-eligibility) for the patient and then copy the address from either the `subscriber` or `dependent` object in the response. - If the patient doesn't have a current address, you can populate the `address1` property with `UNKNOWN` and populate the city, state, and zip code with appropriate values based on your discretion. However, we still recommend running an eligibility check when possible, so you can use the address the payer has on file. Some payers may have explicit rules for how to handle this situation - check the payer's specific requirements before using this approach.
#[serde(rename = "address", skip_serializing_if = "Option::is_none")]
pub address: Option<Box<models::InstitutionalAddress>>,
/// The patient's date of birth.
#[serde(rename = "dateOfBirth")]
pub date_of_birth: String,
/// The patient's first name.
#[serde(rename = "firstName")]
pub first_name: String,
/// Code identifying the gender. Can be set to `F` - Female, `M` - Male, or `U` - Unknown. Some payers may reject the claim if the patient's gender doesn't match the gender they have recorded in their member records. If the gender isn't known or the patient declines to answer, use `U` or perform an eligibility check to determine the gender according to the payer's records.
#[serde(rename = "gender")]
pub gender: models::GenderWithUnknown,
/// The patient's last name. **Don't** include the patient's name suffix, such as Jr. or III. Use the designated `suffix` property instead.
#[serde(rename = "lastName")]
pub last_name: String,
/// The patient's middle name or initial.
#[serde(rename = "middleName", skip_serializing_if = "Option::is_none")]
pub middle_name: Option<String>,
/// Identifies the relationship of the patient to the subscriber. Can be set to `01` - Spouse, `19` - Child, `20` - Employee, `21` - Unknown, `39` - Organ Donor, `40` - Cadaver Donor, `53` - Life Partner, or `G8` - Other Relationship.
#[serde(rename = "relationshipToSubscriberCode")]
pub relationship_to_subscriber_code: models::InstitutionalRelationshipToSubscriberCode,
/// The patient's Social Security Number. Only used for Property and Casualty claims.
#[serde(rename = "ssn", skip_serializing_if = "Option::is_none")]
pub ssn: Option<String>,
/// The patient's name suffix, such as Jr. or III. Only include the patient'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 InstitutionalDependent {
pub fn new(date_of_birth: String, first_name: String, gender: models::GenderWithUnknown, last_name: String, relationship_to_subscriber_code: models::InstitutionalRelationshipToSubscriberCode) -> InstitutionalDependent {
InstitutionalDependent {
address: None,
date_of_birth,
first_name,
gender,
last_name,
middle_name: None,
relationship_to_subscriber_code,
ssn: None,
suffix: None,
}
}
}