/*
 * Stedi Healthcare
 *
 * Healthcare code list qualifier codes used to specify the source or type of code list values
 *
 * The version of the OpenAPI document: 2024-04-01
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

/// CodeListQualifierCode : Specifies the source or type of code list used for healthcare transactions.
/// Payers may sometimes return other non-compliant values.
#[derive(
    Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize, Default,
)]
pub enum CodeListQualifierCode {
    /// Group or plan specific code list
    #[serde(rename = "GR")]
    #[default]
    GroupOrPlan,
    /// National institute or standard code list
    #[serde(rename = "NI")]
    NationalInstituteStandard,
    /// Mutually defined code list between parties
    #[serde(rename = "ZZ")]
    MutuallyDefined,
}

impl std::fmt::Display for CodeListQualifierCode {
    fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
        match self {
            Self::GroupOrPlan => write!(f, "GR"),
            Self::NationalInstituteStandard => write!(f, "NI"),
            Self::MutuallyDefined => write!(f, "ZZ"),
        }
    }
}
