/*
* 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};
/// InstitutionalBilling : Information about the billing provider. The following information is required: - An `address` that is a physical location such as the office where care is delivered or an administrative facility. - The provider's Employer Identification Number (EIN) in `employerId`. - The provider's business name in `organizationName`. - The provider's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier) in `npi`, if one is assigned. When the billing provider is not assigned an NPI, supply `secondaryIdentifier` with `secondaryIdentificationQualifierCode` set to `G2` (commercial number).
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct InstitutionalBilling {
/// The billing provider's address. This is **required** and must be a physical location such as the office where care is delivered or an administrative facility. If the billing provider expects to receive paper checks at a PO Box, lockbox, or other non-physical address, provide that in `billingPayToAddressName`.
#[serde(rename = "address")]
pub address: Box<models::InstitutionalAddress>,
#[serde(rename = "commercialNumber", skip_serializing_if = "Option::is_none")]
pub commercial_number: Option<String>,
/// The provider's contact information.You must include at least one communication method (phone, fax, or email) in this object.
#[serde(rename = "contactInformation", skip_serializing_if = "Option::is_none")]
pub contact_information: Option<Box<models::InstitutionalContactInformation>>,
/// The provider's employer ID, also known as an EIN or TIN. Must be a string of exactly nine numbers with no separators.
#[serde(rename = "employerId")]
pub employer_id: String,
/// The provider's first name.
#[serde(rename = "firstName", skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
/// The provider's last name.
#[serde(rename = "lastName", skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
#[serde(rename = "locationNumber", skip_serializing_if = "Option::is_none")]
pub location_number: Option<String>,
/// The provider's middle name or initial.
#[serde(rename = "middleName", skip_serializing_if = "Option::is_none")]
pub middle_name: Option<String>,
/// The organization [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier). Optional. When the billing provider is not assigned an NPI, supply `secondaryIdentifier` with `secondaryIdentificationQualifierCode` set to `G2` instead.
#[serde(rename = "npi", skip_serializing_if = "Option::is_none")]
pub npi: Option<String>,
/// The provider's business name.
#[serde(rename = "organizationName", skip_serializing_if = "Option::is_none")]
pub organization_name: Option<String>,
/// This field is now automatically populated and it only remains for backwards compatibility.
#[serde(rename = "providerType", skip_serializing_if = "Option::is_none")]
pub provider_type: Option<models::BillingProviderType>,
#[serde(rename = "providerUpinNumber", skip_serializing_if = "Option::is_none")]
pub provider_upin_number: Option<String>,
#[serde(rename = "secondaryIdentificationQualifierCode", skip_serializing_if = "Option::is_none")]
pub secondary_identification_qualifier_code: Option<models::OperatingPhysicianIdentificationQualifierCode>,
/// The identifier specified in `secondaryIdentifierQualifierCode`. You can only include one secondary identifier for the provider.
#[serde(rename = "secondaryIdentifier", skip_serializing_if = "Option::is_none")]
pub secondary_identifier: Option<String>,
#[serde(rename = "stateLicenseNumber", skip_serializing_if = "Option::is_none")]
pub state_license_number: Option<String>,
/// The provider's suffix, such as Jr. or Sr.
#[serde(rename = "suffix", skip_serializing_if = "Option::is_none")]
pub suffix: Option<String>,
/// The provider's [taxnonomy code](https://www.cms.gov/medicare/enrollment-renewal/providers-suppliers/health-care-taxonomy), a unique 10-character code that designates their classification and specialization.
#[serde(rename = "taxonomyCode", skip_serializing_if = "Option::is_none")]
pub taxonomy_code: Option<String>,
}
impl InstitutionalBilling {
/// Information about the billing provider. The following information is required: - An `address` that is a physical location such as the office where care is delivered or an administrative facility. - The provider's Employer Identification Number (EIN) in `employerId`. - The provider's business name in `organizationName`. - The provider's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier) in `npi`, if one is assigned. When the billing provider is not assigned an NPI, supply `secondaryIdentifier` with `secondaryIdentificationQualifierCode` set to `G2` (commercial number).
pub fn new(address: models::InstitutionalAddress, employer_id: String) -> InstitutionalBilling {
InstitutionalBilling {
address: Box::new(address),
commercial_number: None,
contact_information: None,
employer_id,
first_name: None,
last_name: None,
location_number: None,
middle_name: None,
npi: None,
organization_name: None,
provider_type: None,
provider_upin_number: None,
secondary_identification_qualifier_code: None,
secondary_identifier: None,
state_license_number: None,
suffix: None,
taxonomy_code: None,
}
}
}