/*
* 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};
/// Provider : Information about the entity requesting the eligibility check. This may be an individual practitioner, a medical group, a hospital, or another type of healthcare provider. - You must provide the `organizationName` (if the entity is an organization), or `firstName` and `lastName` (if the provider is an individual). - You must also provide an identifier - this is typically the provider's [National Provider Identifier](https://www.stedi.com/docs/healthcare/national-provider-identifier) (`npi`). If the provider doesn't have an NPI, you can supply an alternative, such as their `taxId` or `ssn`. - Don't include additional properties, such as `taxId` or `address`, unless they are specifically required or suggested by the payer.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Provider {
#[serde(rename = "address", skip_serializing_if = "Option::is_none")]
pub address: Option<Box<models::RequestProviderAddress>>,
/// The provider's contract number. Only include when required by a payer. This shape is deprecated: Use `contractNumber` instead.
#[serde(rename = "contactNumber", skip_serializing_if = "Option::is_none")]
pub contact_number: Option<String>,
/// The provider's contract number. Only include when required by a payer.
#[serde(rename = "contractNumber", skip_serializing_if = "Option::is_none")]
pub contract_number: Option<String>,
/// The provider's electronic device pin number. Only include when required by a payer.
#[serde(rename = "devicePinNumber", skip_serializing_if = "Option::is_none")]
pub device_pin_number: Option<String>,
/// Deprecated; The submitter's Employer's Identification Number (EIN). Only use when an employer is checking the eligibility and benefits of their employees. This shape is deprecated: This property is no longer used.
#[serde(rename = "employersId", skip_serializing_if = "Option::is_none")]
pub employers_id: Option<String>,
/// The ID number for the provider's facility. Only include when required by a payer.
#[serde(rename = "facilityIdNumber", skip_serializing_if = "Option::is_none")]
pub facility_id_number: Option<String>,
/// The provider's facility network identification number. Only include when required by a payer.
#[serde(rename = "facilityNetworkIdNumber", skip_serializing_if = "Option::is_none")]
pub facility_network_id_number: Option<String>,
/// The provider's first name. This property is required if the provider is an individual.
#[serde(rename = "firstName", skip_serializing_if = "Option::is_none")]
pub first_name: Option<String>,
/// The two-character state ID of the state that assigned the `stateLicenseNumber`. Only include when required by a payer.
#[serde(rename = "informationReceiverAdditionalIdentifierState", skip_serializing_if = "Option::is_none")]
pub information_receiver_additional_identifier_state: Option<String>,
/// The provider's last name. This property is required if the provider is an individual.
#[serde(rename = "lastName", skip_serializing_if = "Option::is_none")]
pub last_name: Option<String>,
/// The provider's Medicaid provider number. Only include when required by a payer.
#[serde(rename = "medicaidProviderNumber", skip_serializing_if = "Option::is_none")]
pub medicaid_provider_number: Option<String>,
/// The provider's Medicare provider number. Only include when required by a payer.
#[serde(rename = "medicareProviderNumber", skip_serializing_if = "Option::is_none")]
pub medicare_provider_number: Option<String>,
/// The provider's [National Provider Identifier (NPI)](https://www.stedi.com/docs/healthcare/national-provider-identifier). This identifier is required for all healthcare providers who are eligible to receive an NPI. Some non-traditional providers such as transportation services, durable medical equipment (DME) suppliers, or alternative medicine practitioners are not eligible to receive an NPI. If the provider doesn't have an NPI, requests with alternate IDs are virtually never supported. In the rare circumstance that a payer has instructed you to use an alternate ID, the payer will typically require you to supply either their `taxId` or `ssn` instead.
#[serde(rename = "npi", skip_serializing_if = "Option::is_none")]
pub npi: Option<String>,
/// The provider's business name. This property is required if the provider is not an individual.
#[serde(rename = "organizationName", skip_serializing_if = "Option::is_none")]
pub organization_name: Option<String>,
/// Only used for payer-to-payer transactions, which are not currently supported. Do not use.
#[serde(rename = "payorId", skip_serializing_if = "Option::is_none")]
pub payor_id: Option<String>,
/// The provider's pharmacy processor number. Only include when specifically instructed by a payer - for example, when the provider doesn't have an [NPI](https://www.stedi.com/docs/healthcare/national-provider-identifier). This use case is very rarely supported, and is typically when the provider is a non-medical provider, such as a social worker, home health aide, or transportation service.
#[serde(rename = "pharmacyProcessorNumber", skip_serializing_if = "Option::is_none")]
pub pharmacy_processor_number: Option<String>,
/// The provider's prior identifier number. Only include when required by a payer.
#[serde(rename = "priorIdentifierNumber", skip_serializing_if = "Option::is_none")]
pub prior_identifier_number: Option<String>,
/// Communicate the provider's role in the type of benefits specified in the request. Visit [Eligibility code lists](https://www.stedi.com/docs/healthcare/eligibility-code-lists#provider-codes) for a complete list. Only include when required by a payer.
#[serde(rename = "providerCode", skip_serializing_if = "Option::is_none")]
pub provider_code: Option<models::RequestProviderCode>,
/// The provider's plan network identification number. Only include when required by a payer.
#[serde(rename = "providerPlanNetworkIdNumber", skip_serializing_if = "Option::is_none")]
pub provider_plan_network_id_number: Option<String>,
#[serde(rename = "providerType", skip_serializing_if = "Option::is_none")]
pub provider_type: Option<models::ProviderType>,
/// The provider's [Taxonomy Code](https://x12.org/codes/provider-taxonomy-codes). Only used when the provider's taxonomy code is relevant to the eligibility/benefit inquiry. For example, an institutional provider such as a hospital may need to use a taxonomy code to specify a specific unit or department.
#[serde(rename = "referenceIdentification", skip_serializing_if = "Option::is_none")]
pub reference_identification: Option<String>,
/// The provider's service provider number. Only include when specifically instructed by a payer - for example, when the provider doesn't have an [NPI](https://www.stedi.com/docs/healthcare/national-provider-identifier). This use case is very rarely supported, and is typically when the provider is a non-medical provider, such as a social worker, home health aide, or transportation service.
#[serde(rename = "serviceProviderNumber", skip_serializing_if = "Option::is_none")]
pub service_provider_number: Option<String>,
#[serde(rename = "servicesPlanID", skip_serializing_if = "Option::is_none")]
pub services_plan_id: Option<String>,
/// The provider's Social Security Number (SSN). - Only include when specifically instructed by a payer - for example, if the provider doesn't have an [NPI](https://www.stedi.com/docs/healthcare/national-provider-identifier). This use case is very rarely supported, and is typically when the provider is a non-medical provider, such as a social worker, home health aide, or transportation service. - If the payer has instructed you to send an EIN but the provider operates using their SSN, use provider.taxId instead of this field. - Don't use this for Federally-administered programs, such as Medicare.
#[serde(rename = "ssn", skip_serializing_if = "Option::is_none")]
pub ssn: Option<String>,
/// The provider's state license number. If you include this information, you must also include the `informationReceiverAdditionalIdentifierState`. Only include when required by a payer.
#[serde(rename = "stateLicenceNumber", skip_serializing_if = "Option::is_none")]
pub state_licence_number: Option<String>,
/// The provider's submitter identification number. Only include when required by a payer.
#[serde(rename = "submitterIdNumber", skip_serializing_if = "Option::is_none")]
pub submitter_id_number: Option<String>,
/// The provider's Federal Taxpayer Identification Number. This is typically the provider's EIN (Employer Identification Number), but the provider's SSN may be used if the provider does not have an EIN. Only include if required by the payer.
#[serde(rename = "taxId", skip_serializing_if = "Option::is_none")]
pub tax_id: Option<String>,
}
impl Provider {
/// Information about the entity requesting the eligibility check. This may be an individual practitioner, a medical group, a hospital, or another type of healthcare provider. - You must provide the `organizationName` (if the entity is an organization), or `firstName` and `lastName` (if the provider is an individual). - You must also provide an identifier - this is typically the provider's [National Provider Identifier](https://www.stedi.com/docs/healthcare/national-provider-identifier) (`npi`). If the provider doesn't have an NPI, you can supply an alternative, such as their `taxId` or `ssn`. - Don't include additional properties, such as `taxId` or `address`, unless they are specifically required or suggested by the payer.
pub fn new() -> Provider {
Provider {
address: None,
contact_number: None,
contract_number: None,
device_pin_number: None,
employers_id: None,
facility_id_number: None,
facility_network_id_number: None,
first_name: None,
information_receiver_additional_identifier_state: None,
last_name: None,
medicaid_provider_number: None,
medicare_provider_number: None,
npi: None,
organization_name: None,
payor_id: None,
pharmacy_processor_number: None,
prior_identifier_number: None,
provider_code: None,
provider_plan_network_id_number: None,
provider_type: None,
reference_identification: None,
service_provider_number: None,
services_plan_id: None,
ssn: None,
state_licence_number: None,
submitter_id_number: None,
tax_id: None,
}
}
}