//! Generated code! Take a look at the generator-crate for changing this file!
#![allow(clippy::too_many_lines, reason = "Generated code")]
use serde::{Serialize, Deserialize};
use super::super::types::{Coding, CodingInner, CodeableConcept, CodeableConceptInner};
#[doc = "**[ACMECholCodesBlood](http://hl7.org/fhir/CodeSystem/example)**. This is an example code system that includes all the ACME codes for serum/plasma cholesterol from v2.36.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ACMECholCodesBlood {
    /** **chol**

SChol. Serum Cholesterol */
    Chol,
    /** **chol-mass**

SChol (mg/L). Serum Cholesterol, in mg/L */
    CholMass,
    /** **chol-mmol**

SChol (mmol/L). Serum Cholesterol, in mmol/L */
    CholMmol,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ACMECholCodesBlood {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "chol" => Ok(Self::Chol),
            "chol-mass" => Ok(Self::CholMass),
            "chol-mmol" => Ok(Self::CholMmol),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ACMECholCodesBlood {
    fn as_ref(&self) -> &str {
        match self {
            Self::Chol => "chol",
            Self::CholMass => "chol-mass",
            Self::CholMmol => "chol-mmol",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ACMECholCodesBlood {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ACMECholCodesBlood {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ACMECholCodesBlood {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ACMECholCodesBlood {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ACMECholCodesBlood> for Coding {
    fn from(code: ACMECholCodesBlood) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/CodeSystem/example".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ACMECholCodesBlood> for CodeableConcept {
    fn from(code: ACMECholCodesBlood) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ASTMSignatureTypeCodes](urn:iso-astm:E1762-95:2013)**. The Digital Signature Purposes, an indication of the reason an entity signs a document. This is included in the signed information and can be used when determining accountability for various actions concerning the document. Examples include: author, transcriptionist/recorder, and witness.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ASTMSignatureTypeCodes {
    /** **1.2.840.10065.1.12.1.1**

Author's Signature. the signature of the primary or sole author of a health information document. There can be only one primary author of a health information document. */
    N128401006511211,
    /** **1.2.840.10065.1.12.1.10**

Identity Witness Signature. the signature of an individual who has witnessed another individual who is known to them signing a document. (Example the identity witness is a notary public.) */
    N1284010065112110,
    /** **1.2.840.10065.1.12.1.11**

Consent Witness Signature. the signature of an individual who has witnessed the health care provider counselling a patient. */
    N1284010065112111,
    /** **1.2.840.10065.1.12.1.12**

Interpreter Signature. the signature of an individual who has translated health care information during an event or the obtaining of consent to a treatment. */
    N1284010065112112,
    /** **1.2.840.10065.1.12.1.13**

Review Signature. the signature of a person, device, or algorithm that has reviewed or filtered data for inclusion into the patient record. ( Examples: (1) a medical records clerk who scans a document for inclusion in the medical record, enters header information, or catalogues and classifies the data, or a combination thereof; (2) a gateway that receives data from another computer system and interprets that data or changes its format, or both, before entering it into the patient record.) */
    N1284010065112113,
    /** **1.2.840.10065.1.12.1.14**

Source Signature. the signature of an automated data source. (Examples: (1) the signature for an image that is generated by a device for inclusion in the patient record; (2) the signature for an ECG derived by an ECG system for inclusion in the patient record; (3) the data from a biomedical monitoring device or system that is for inclusion in the patient record.) */
    N1284010065112114,
    /** **1.2.840.10065.1.12.1.15**

Addendum Signature. the signature on a new amended document of an individual who has corrected, edited, or amended an original health information document. An addendum signature can either be a signature type or a signature sub-type (see 8.1). Any document with an addendum signature shall have a companion document that is the original document with its original, unaltered content, and original signatures. The original document shall be referenced via an attribute in the new document, which contains, for example, the digest of the old document. Whether the original, unaltered, document is always displayed with the addended document is a local matter, but the original, unaltered, document must remain as part of the patient record and be retrievable on demand. */
    N1284010065112115,
    /** **1.2.840.10065.1.12.1.16**

Modification Signature. the signature on an original document of an individual who has generated a new amended document. This (original) document shall reference the new document via an additional signature purpose. This is the inverse of an addendum signature and provides a pointer from the original to the amended document. */
    N1284010065112116,
    /** **1.2.840.10065.1.12.1.17**

Administrative (Error/Edit) Signature. the signature of an individual who is certifying that the document is invalidated by an error(s), or is placed in the wrong chart. An administrative (error/edit) signature must include an addendum to the document and therefore shall have an addendum signature sub-type (see 8.1). This signature is reserved for the highest health information system administrative classification, since it is a statement that the entire document is invalidated by the error and that the document should no longer be used for patient care, although for legal reasons the document must remain part of the permanent patient record. */
    N1284010065112117,
    /** **1.2.840.10065.1.12.1.18**

Timestamp Signature. the signature by an entity or device trusted to provide accurate timestamps. This timestamp might be provided, for example, in the signature time attribute. */
    N1284010065112118,
    /** **1.2.840.10065.1.12.1.2**

Coauthor's Signature. the signature of a health information document coauthor. There can be multiple coauthors of a health information document. */
    N128401006511212,
    /** **1.2.840.10065.1.12.1.3**

Co-participant's Signature. the signature of an individual who is a participant in the health information document but is not an author or coauthor. (Example a surgeon who is required by institutional, regulatory, or legal rules to sign an operative report, but who was not involved in the authorship of that report.) */
    N128401006511213,
    /** **1.2.840.10065.1.12.1.4**

Transcriptionist/Recorder Signature. the signature of an individual who has transcribed a dictated document or recorded written text into a digital machine readable format. */
    N128401006511214,
    /** **1.2.840.10065.1.12.1.5**

Verification Signature. a signature verifying the information contained in a document. (Example a physician is required to countersign a verbal order that has previously been recorded in the medical record by a registered nurse who has carried out the verbal order.) */
    N128401006511215,
    /** **1.2.840.10065.1.12.1.6**

Validation Signature. a signature validating a health information document for inclusion in the patient record. (Example a medical student or resident is credentialed to perform history or physical examinations and to write progress notes. The attending physician signs the history and physical examination to validate the entry for inclusion in the patient's medical record.) */
    N128401006511216,
    /** **1.2.840.10065.1.12.1.7**

Consent Signature. the signature of an individual consenting to what is described in a health information document. */
    N128401006511217,
    /** **1.2.840.10065.1.12.1.8**

Signature Witness Signature. the signature of a witness to any other signature. */
    N128401006511218,
    /** **1.2.840.10065.1.12.1.9**

Event Witness Signature. the signature of a witness to an event. (Example the witness has observed a procedure and is attesting to this fact.) */
    N128401006511219,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ASTMSignatureTypeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "1.2.840.10065.1.12.1.1" => Ok(Self::N128401006511211),
            "1.2.840.10065.1.12.1.10" => Ok(Self::N1284010065112110),
            "1.2.840.10065.1.12.1.11" => Ok(Self::N1284010065112111),
            "1.2.840.10065.1.12.1.12" => Ok(Self::N1284010065112112),
            "1.2.840.10065.1.12.1.13" => Ok(Self::N1284010065112113),
            "1.2.840.10065.1.12.1.14" => Ok(Self::N1284010065112114),
            "1.2.840.10065.1.12.1.15" => Ok(Self::N1284010065112115),
            "1.2.840.10065.1.12.1.16" => Ok(Self::N1284010065112116),
            "1.2.840.10065.1.12.1.17" => Ok(Self::N1284010065112117),
            "1.2.840.10065.1.12.1.18" => Ok(Self::N1284010065112118),
            "1.2.840.10065.1.12.1.2" => Ok(Self::N128401006511212),
            "1.2.840.10065.1.12.1.3" => Ok(Self::N128401006511213),
            "1.2.840.10065.1.12.1.4" => Ok(Self::N128401006511214),
            "1.2.840.10065.1.12.1.5" => Ok(Self::N128401006511215),
            "1.2.840.10065.1.12.1.6" => Ok(Self::N128401006511216),
            "1.2.840.10065.1.12.1.7" => Ok(Self::N128401006511217),
            "1.2.840.10065.1.12.1.8" => Ok(Self::N128401006511218),
            "1.2.840.10065.1.12.1.9" => Ok(Self::N128401006511219),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ASTMSignatureTypeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::N128401006511211 => "1.2.840.10065.1.12.1.1",
            Self::N1284010065112110 => "1.2.840.10065.1.12.1.10",
            Self::N1284010065112111 => "1.2.840.10065.1.12.1.11",
            Self::N1284010065112112 => "1.2.840.10065.1.12.1.12",
            Self::N1284010065112113 => "1.2.840.10065.1.12.1.13",
            Self::N1284010065112114 => "1.2.840.10065.1.12.1.14",
            Self::N1284010065112115 => "1.2.840.10065.1.12.1.15",
            Self::N1284010065112116 => "1.2.840.10065.1.12.1.16",
            Self::N1284010065112117 => "1.2.840.10065.1.12.1.17",
            Self::N1284010065112118 => "1.2.840.10065.1.12.1.18",
            Self::N128401006511212 => "1.2.840.10065.1.12.1.2",
            Self::N128401006511213 => "1.2.840.10065.1.12.1.3",
            Self::N128401006511214 => "1.2.840.10065.1.12.1.4",
            Self::N128401006511215 => "1.2.840.10065.1.12.1.5",
            Self::N128401006511216 => "1.2.840.10065.1.12.1.6",
            Self::N128401006511217 => "1.2.840.10065.1.12.1.7",
            Self::N128401006511218 => "1.2.840.10065.1.12.1.8",
            Self::N128401006511219 => "1.2.840.10065.1.12.1.9",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ASTMSignatureTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ASTMSignatureTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ASTMSignatureTypeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ASTMSignatureTypeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ASTMSignatureTypeCodes> for Coding {
    fn from(code: ASTMSignatureTypeCodes) -> Self {
        CodingInner {
            system: Some("urn:iso-astm:E1762-95:2013".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ASTMSignatureTypeCodes> for CodeableConcept {
    fn from(code: ASTMSignatureTypeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AccountAggregate](http://hl7.org/fhir/ValueSet/account-aggregate)**. Indicates who is expected to pay a part of the account balance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AccountAggregate {
    /** **insurance**

Insurance. This (aggregated) balance is expected to be paid by Insurance coverage(s) */
    Insurance,
    /** **patient**

Patient. This (aggregated) balance is expected to be paid by the Patient */
    Patient,
    /** **total**

Total. There is no aggregation on this balance */
    Total,
}
impl ::core::str::FromStr for AccountAggregate {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "insurance" => Ok(Self::Insurance),
            "patient" => Ok(Self::Patient),
            "total" => Ok(Self::Total),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AccountAggregate {
    fn as_ref(&self) -> &str {
        match self {
            Self::Insurance => "insurance",
            Self::Patient => "patient",
            Self::Total => "total",
        }
    }
}
impl ::std::fmt::Debug for AccountAggregate {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AccountAggregate {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AccountAggregate {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AccountAggregate {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AccountAggregate> for Coding {
    fn from(code: AccountAggregate) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/account-aggregate".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AccountAggregate> for CodeableConcept {
    fn from(code: AccountAggregate) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AccountBalanceTerm](http://hl7.org/fhir/ValueSet/account-payment-terms)**. Indicates the account balance's age\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AccountBalanceTerm {
    /** **120**

120 day. This balance is outstanding over 120 days */
    N120,
    /** **30**

30 day. This balance is outstanding over 30 days */
    N30,
    /** **60**

60 day. This balance is outstanding over 60 days */
    N60,
    /** **90**

90 day. This balance is outstanding over 90 days */
    N90,
    /** **current**

Current. This balance is the current balance */
    Current,
}
impl ::core::str::FromStr for AccountBalanceTerm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "120" => Ok(Self::N120),
            "30" => Ok(Self::N30),
            "60" => Ok(Self::N60),
            "90" => Ok(Self::N90),
            "current" => Ok(Self::Current),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AccountBalanceTerm {
    fn as_ref(&self) -> &str {
        match self {
            Self::N120 => "120",
            Self::N30 => "30",
            Self::N60 => "60",
            Self::N90 => "90",
            Self::Current => "current",
        }
    }
}
impl ::std::fmt::Debug for AccountBalanceTerm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AccountBalanceTerm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AccountBalanceTerm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AccountBalanceTerm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AccountBalanceTerm> for Coding {
    fn from(code: AccountBalanceTerm) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/account-payment-terms".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AccountBalanceTerm> for CodeableConcept {
    fn from(code: AccountBalanceTerm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AccountBillingStatus](http://hl7.org/fhir/ValueSet/account-billing-status)**. Indicates whether the account is available to be used for billing purposes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AccountBillingStatus {
    /** **billing**

Billing. Indicates that all transactions are recorded and the finance system can perform the billing process, including preparing insurance claims, scrubbing charges, invoicing etc. During this time any new charges will not be included in the current billing run/cycle. (account.status is active) */
    Billing,
    /** **carecomplete-notbilled**

CareComplete/Not Billed. The account.status is still active and may have charges recorded against it (only for events in the servicePeriod), however the encounters associated are completed. (Also known as Discharged not billed) This BillingStatus is often not used in ongoing accounts. (account.status is active) */
    CarecompleteNotbilled,
    /** **closed-baddebt**

Closed-Bad Debt. The balance of this debt has not been able to be recovered, and the organization has decided not to persue debt recovery. (account.status is in-active) */
    ClosedBaddebt,
    /** **closed-combined**

Closed-Combined. This account has been merged into another account, all charged have been migrated. This account should no longer be used, and will not be billed. (account.status is i n-active) */
    ClosedCombined,
    /** **closed-completed**

Closed-Completed. The account is closed and all charges are processed and accounted for. (account.status is i n-active) */
    ClosedCompleted,
    /** **closed-voided**

Closed-Voided. The account was not created in error, however the organization has decided that it will not be charging any transactions associated. (account.status is i n-active) */
    ClosedVoided,
    /** **open**

Open. The account is open for charging transactions (account.status is active) */
    Open,
}
impl ::core::str::FromStr for AccountBillingStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "billing" => Ok(Self::Billing),
            "carecomplete-notbilled" => Ok(Self::CarecompleteNotbilled),
            "closed-baddebt" => Ok(Self::ClosedBaddebt),
            "closed-combined" => Ok(Self::ClosedCombined),
            "closed-completed" => Ok(Self::ClosedCompleted),
            "closed-voided" => Ok(Self::ClosedVoided),
            "open" => Ok(Self::Open),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AccountBillingStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Billing => "billing",
            Self::CarecompleteNotbilled => "carecomplete-notbilled",
            Self::ClosedBaddebt => "closed-baddebt",
            Self::ClosedCombined => "closed-combined",
            Self::ClosedCompleted => "closed-completed",
            Self::ClosedVoided => "closed-voided",
            Self::Open => "open",
        }
    }
}
impl ::std::fmt::Debug for AccountBillingStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AccountBillingStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AccountBillingStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AccountBillingStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AccountBillingStatus> for Coding {
    fn from(code: AccountBillingStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/account-billing-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AccountBillingStatus> for CodeableConcept {
    fn from(code: AccountBillingStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AccountRelationship](http://hl7.org/fhir/ValueSet/account-relationship)**. Relationship between accounts\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AccountRelationship {
    /** **guarantor**

Guarantor. */
    Guarantor,
    /** **parent**

Parent. */
    Parent,
}
impl ::core::str::FromStr for AccountRelationship {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "guarantor" => Ok(Self::Guarantor),
            "parent" => Ok(Self::Parent),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AccountRelationship {
    fn as_ref(&self) -> &str {
        match self {
            Self::Guarantor => "guarantor",
            Self::Parent => "parent",
        }
    }
}
impl ::std::fmt::Debug for AccountRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AccountRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AccountRelationship {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AccountRelationship {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AccountRelationship> for Coding {
    fn from(code: AccountRelationship) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/account-relationship".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AccountRelationship> for CodeableConcept {
    fn from(code: AccountRelationship) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AccountStatus](http://hl7.org/fhir/ValueSet/account-status)**. Indicates whether the account is available to be used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AccountStatus {
    /** **active**

Active. This account is active and may be used. */
    Active,
    /** **entered-in-error**

Entered in error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **inactive**

Inactive. This account is inactive and should not be used to track financial information. */
    Inactive,
    /** **on-hold**

On Hold. This account is on hold. */
    OnHold,
    /** **unknown**

Unknown. The account status is unknown. */
    Unknown,
}
impl ::core::str::FromStr for AccountStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            "on-hold" => Ok(Self::OnHold),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AccountStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
            Self::OnHold => "on-hold",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for AccountStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AccountStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AccountStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AccountStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AccountStatus> for Coding {
    fn from(code: AccountStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/account-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AccountStatus> for CodeableConcept {
    fn from(code: AccountStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionCardinalityBehavior](http://hl7.org/fhir/ValueSet/action-cardinality-behavior)**. Defines behavior for an action or a group for how many times that item may be repeated.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionCardinalityBehavior {
    /** **multiple**

Multiple. The action may be selected multiple times. */
    Multiple,
    /** **single**

Single. The action may only be selected one time. */
    Single,
}
impl ::core::str::FromStr for ActionCardinalityBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "multiple" => Ok(Self::Multiple),
            "single" => Ok(Self::Single),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionCardinalityBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::Multiple => "multiple",
            Self::Single => "single",
        }
    }
}
impl ::std::fmt::Debug for ActionCardinalityBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionCardinalityBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionCardinalityBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionCardinalityBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionCardinalityBehavior> for Coding {
    fn from(code: ActionCardinalityBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-cardinality-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionCardinalityBehavior> for CodeableConcept {
    fn from(code: ActionCardinalityBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionCode](http://hl7.org/fhir/ValueSet/action-code)**. Provides examples of actions to be performed.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionCode {
    /** **collect-information**

Collect information. The action indicates that information should be collected from a participant in the process. */
    CollectInformation,
    /** **order-service**

Order a service. The action indicates that a particular service should be provided. */
    OrderService,
    /** **prescribe-medication**

Prescribe a medication. The action indicates that a particular medication should be prescribed to the patient. */
    PrescribeMedication,
    /** **propose-diagnosis**

Propose a diagnosis. The action indicates that a particular diagnosis should be proposed. */
    ProposeDiagnosis,
    /** **recommend-immunization**

Recommend an immunization. The action indicates that a particular immunization should be performed. */
    RecommendImmunization,
    /** **record-detected-issue**

Record a detected issue. The action indicates that a particular detected issue should be recorded. */
    RecordDetectedIssue,
    /** **record-inference**

Record an inference. The action indicates that a particular inference should be recorded. */
    RecordInference,
    /** **report-flag**

Report a flag. The action indicates that a particular flag should be reported. */
    ReportFlag,
    /** **send-message**

Send a message. The action indicates that a particular message should be sent to a participant in the process. */
    SendMessage,
}
impl ::core::str::FromStr for ActionCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "collect-information" => Ok(Self::CollectInformation),
            "order-service" => Ok(Self::OrderService),
            "prescribe-medication" => Ok(Self::PrescribeMedication),
            "propose-diagnosis" => Ok(Self::ProposeDiagnosis),
            "recommend-immunization" => Ok(Self::RecommendImmunization),
            "record-detected-issue" => Ok(Self::RecordDetectedIssue),
            "record-inference" => Ok(Self::RecordInference),
            "report-flag" => Ok(Self::ReportFlag),
            "send-message" => Ok(Self::SendMessage),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::CollectInformation => "collect-information",
            Self::OrderService => "order-service",
            Self::PrescribeMedication => "prescribe-medication",
            Self::ProposeDiagnosis => "propose-diagnosis",
            Self::RecommendImmunization => "recommend-immunization",
            Self::RecordDetectedIssue => "record-detected-issue",
            Self::RecordInference => "record-inference",
            Self::ReportFlag => "report-flag",
            Self::SendMessage => "send-message",
        }
    }
}
impl ::std::fmt::Debug for ActionCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionCode> for Coding {
    fn from(code: ActionCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/action-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionCode> for CodeableConcept {
    fn from(code: ActionCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionConditionKind](http://hl7.org/fhir/ValueSet/action-condition-kind)**. Defines the kinds of conditions that can appear on actions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionConditionKind {
    /** **applicability**

Applicability. The condition describes whether or not a given action is applicable. */
    Applicability,
    /** **start**

Start. The condition is a starting condition for the action. */
    Start,
    /** **stop**

Stop. The condition is a stop, or exit condition for the action. */
    Stop,
}
impl ::core::str::FromStr for ActionConditionKind {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "applicability" => Ok(Self::Applicability),
            "start" => Ok(Self::Start),
            "stop" => Ok(Self::Stop),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionConditionKind {
    fn as_ref(&self) -> &str {
        match self {
            Self::Applicability => "applicability",
            Self::Start => "start",
            Self::Stop => "stop",
        }
    }
}
impl ::std::fmt::Debug for ActionConditionKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionConditionKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionConditionKind {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionConditionKind {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionConditionKind> for Coding {
    fn from(code: ActionConditionKind) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-condition-kind".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionConditionKind> for CodeableConcept {
    fn from(code: ActionConditionKind) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionGroupingBehavior](http://hl7.org/fhir/ValueSet/action-grouping-behavior)**. Defines organization behavior of a group.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionGroupingBehavior {
    /** **logical-group**

Logical Group. A group with this behavior logically groups its sub-elements, and may be shown as a visual group to the end user, but it is not required to do so. */
    LogicalGroup,
    /** **sentence-group**

Sentence Group. A group of related alternative actions is a sentence group if the target referenced by the action is the same in all the actions and each action simply constitutes a different variation on how to specify the details for the target. For example, two actions that could be in a SentenceGroup are "aspirin, 500 mg, 2 times per day" and "aspirin, 300 mg, 3 times per day". In both cases, aspirin is the target referenced by the action, and the two actions represent different options for how aspirin might be ordered for the patient. Note that a SentenceGroup would almost always have an associated selection behavior of "AtMostOne", unless it's a required action, in which case, it would be "ExactlyOne". */
    SentenceGroup,
    /** **visual-group**

Visual Group. Any group marked with this behavior should be displayed as a visual group to the end user. */
    VisualGroup,
}
impl ::core::str::FromStr for ActionGroupingBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "logical-group" => Ok(Self::LogicalGroup),
            "sentence-group" => Ok(Self::SentenceGroup),
            "visual-group" => Ok(Self::VisualGroup),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionGroupingBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::LogicalGroup => "logical-group",
            Self::SentenceGroup => "sentence-group",
            Self::VisualGroup => "visual-group",
        }
    }
}
impl ::std::fmt::Debug for ActionGroupingBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionGroupingBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionGroupingBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionGroupingBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionGroupingBehavior> for Coding {
    fn from(code: ActionGroupingBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-grouping-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionGroupingBehavior> for CodeableConcept {
    fn from(code: ActionGroupingBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionParticipantFunction](http://hl7.org/fhir/ValueSet/action-participant-function)**. The function performed by the participant for the action.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionParticipantFunction {
    /** **author**

Author. The participant is the author of the result of the action. */
    Author,
    /** **performer**

Performer. The participant is the performer of the action. */
    Performer,
    /** **reviewer**

Reviewer. The participant is reviewing the result of the action. */
    Reviewer,
    /** **witness**

Witness. The participant is a witness to the action being performed. */
    Witness,
}
impl ::core::str::FromStr for ActionParticipantFunction {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "author" => Ok(Self::Author),
            "performer" => Ok(Self::Performer),
            "reviewer" => Ok(Self::Reviewer),
            "witness" => Ok(Self::Witness),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionParticipantFunction {
    fn as_ref(&self) -> &str {
        match self {
            Self::Author => "author",
            Self::Performer => "performer",
            Self::Reviewer => "reviewer",
            Self::Witness => "witness",
        }
    }
}
impl ::std::fmt::Debug for ActionParticipantFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionParticipantFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionParticipantFunction {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionParticipantFunction {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionParticipantFunction> for Coding {
    fn from(code: ActionParticipantFunction) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-participant-function".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionParticipantFunction> for CodeableConcept {
    fn from(code: ActionParticipantFunction) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionParticipantType](http://hl7.org/fhir/ValueSet/action-participant-type)**. The type of participant for the action.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionParticipantType {
    /** **careteam**

CareTeam. The participant is a care team caring for the patient under evaluation. */
    Careteam,
    /** **device**

Device. The participant is a system or device used in the care of the patient. */
    Device,
    /** **group**

Group. The participant is a group of participants involved in the care of the patient. */
    Group,
    /** **healthcareservice**

HealthcareService. The participant is an institution that can provide the given healthcare service used in the care of the patient. */
    Healthcareservice,
    /** **location**

Location. The participant is a location involved in the care of the patient. */
    Location,
    /** **organization**

Organization. The participant is an organization involved in the care of the patient. */
    Organization,
    /** **patient**

Patient. The participant is the patient under evaluation. */
    Patient,
    /** **practitioner**

Practitioner. The participant is a practitioner involved in the patient's care. */
    Practitioner,
    /** **practitionerrole**

PractitionerRole. The participant is a particular practitioner role involved in the patient's care. */
    Practitionerrole,
    /** **relatedperson**

RelatedPerson. The participant is a person related to the patient. */
    Relatedperson,
}
impl ::core::str::FromStr for ActionParticipantType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "careteam" => Ok(Self::Careteam),
            "device" => Ok(Self::Device),
            "group" => Ok(Self::Group),
            "healthcareservice" => Ok(Self::Healthcareservice),
            "location" => Ok(Self::Location),
            "organization" => Ok(Self::Organization),
            "patient" => Ok(Self::Patient),
            "practitioner" => Ok(Self::Practitioner),
            "practitionerrole" => Ok(Self::Practitionerrole),
            "relatedperson" => Ok(Self::Relatedperson),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionParticipantType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Careteam => "careteam",
            Self::Device => "device",
            Self::Group => "group",
            Self::Healthcareservice => "healthcareservice",
            Self::Location => "location",
            Self::Organization => "organization",
            Self::Patient => "patient",
            Self::Practitioner => "practitioner",
            Self::Practitionerrole => "practitionerrole",
            Self::Relatedperson => "relatedperson",
        }
    }
}
impl ::std::fmt::Debug for ActionParticipantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionParticipantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionParticipantType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionParticipantType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionParticipantType> for Coding {
    fn from(code: ActionParticipantType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-participant-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionParticipantType> for CodeableConcept {
    fn from(code: ActionParticipantType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionPrecheckBehavior](http://hl7.org/fhir/ValueSet/action-precheck-behavior)**. Defines selection frequency behavior for an action or group.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionPrecheckBehavior {
    /** **no**

No. An action with this behavior is one of the less frequent actions included by the end user, for the particular context in which the action occurs. The system displaying the actions to the end user would typically not "pre-check" such an action. */
    No,
    /** **yes**

Yes. An action with this behavior is one of the most frequent action that is, or should be, included by an end user, for the particular context in which the action occurs. The system displaying the action to the end user should consider "pre-checking" such an action as a convenience for the user. */
    Yes,
}
impl ::core::str::FromStr for ActionPrecheckBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "no" => Ok(Self::No),
            "yes" => Ok(Self::Yes),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionPrecheckBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::No => "no",
            Self::Yes => "yes",
        }
    }
}
impl ::std::fmt::Debug for ActionPrecheckBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionPrecheckBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionPrecheckBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionPrecheckBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionPrecheckBehavior> for Coding {
    fn from(code: ActionPrecheckBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-precheck-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionPrecheckBehavior> for CodeableConcept {
    fn from(code: ActionPrecheckBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionReasonCode](http://hl7.org/fhir/ValueSet/action-reason-code)**. Provides examples of reasons for actions to be performed.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionReasonCode {
    /** **care-gap**

Care gap detected. The action should be performed to address a detected care gap. */
    CareGap,
    /** **drug-drug-interaction**

Drug-drug interaction. The action should be performed to address a detected potential drug-drug interaction. */
    DrugDrugInteraction,
    /** **off-pathway**

Off pathway. The action should be performed because the patient was determined to be off pathway. */
    OffPathway,
    /** **quality-measure**

Quality measure. The action should be performed to bring the patient's care in line with a quality measure. */
    QualityMeasure,
    /** **risk-assessment**

Risk assessment. The action should be performed based on a particular risk assessment. */
    RiskAssessment,
}
impl ::core::str::FromStr for ActionReasonCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "care-gap" => Ok(Self::CareGap),
            "drug-drug-interaction" => Ok(Self::DrugDrugInteraction),
            "off-pathway" => Ok(Self::OffPathway),
            "quality-measure" => Ok(Self::QualityMeasure),
            "risk-assessment" => Ok(Self::RiskAssessment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionReasonCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::CareGap => "care-gap",
            Self::DrugDrugInteraction => "drug-drug-interaction",
            Self::OffPathway => "off-pathway",
            Self::QualityMeasure => "quality-measure",
            Self::RiskAssessment => "risk-assessment",
        }
    }
}
impl ::std::fmt::Debug for ActionReasonCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionReasonCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionReasonCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionReasonCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionReasonCode> for Coding {
    fn from(code: ActionReasonCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/action-reason-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionReasonCode> for CodeableConcept {
    fn from(code: ActionReasonCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionRelationshipType](http://hl7.org/fhir/ValueSet/action-relationship-type)**. Defines the types of relationships between actions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionRelationshipType {
    /** **after**

After. The action must be performed after the related action. */
    After,
    /** **after-end**

After End. The action must be performed after the end of the related action. */
    AfterEnd,
    /** **after-start**

After Start. The action must be performed after the start of the related action. */
    AfterStart,
    /** **before**

Before. The action must be performed before the related action. */
    Before,
    /** **before-end**

Before End. The action must be performed before the end of the related action. */
    BeforeEnd,
    /** **before-start**

Before Start. The action must be performed before the start of the related action. */
    BeforeStart,
    /** **concurrent**

Concurrent. The action must be performed concurrent with the related action. */
    Concurrent,
    /** **concurrent-with-end**

Concurrent With End. The action must be performed concurrent with the end of the related action. */
    ConcurrentWithEnd,
    /** **concurrent-with-start**

Concurrent With Start. The action must be performed concurrent with the start of the related action. */
    ConcurrentWithStart,
}
impl ::core::str::FromStr for ActionRelationshipType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "after" => Ok(Self::After),
            "after-end" => Ok(Self::AfterEnd),
            "after-start" => Ok(Self::AfterStart),
            "before" => Ok(Self::Before),
            "before-end" => Ok(Self::BeforeEnd),
            "before-start" => Ok(Self::BeforeStart),
            "concurrent" => Ok(Self::Concurrent),
            "concurrent-with-end" => Ok(Self::ConcurrentWithEnd),
            "concurrent-with-start" => Ok(Self::ConcurrentWithStart),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionRelationshipType {
    fn as_ref(&self) -> &str {
        match self {
            Self::After => "after",
            Self::AfterEnd => "after-end",
            Self::AfterStart => "after-start",
            Self::Before => "before",
            Self::BeforeEnd => "before-end",
            Self::BeforeStart => "before-start",
            Self::Concurrent => "concurrent",
            Self::ConcurrentWithEnd => "concurrent-with-end",
            Self::ConcurrentWithStart => "concurrent-with-start",
        }
    }
}
impl ::std::fmt::Debug for ActionRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionRelationshipType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionRelationshipType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionRelationshipType> for Coding {
    fn from(code: ActionRelationshipType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-relationship-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionRelationshipType> for CodeableConcept {
    fn from(code: ActionRelationshipType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionRequiredBehavior](http://hl7.org/fhir/ValueSet/action-required-behavior)**. Defines expectations around whether an action or action group is required.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionRequiredBehavior {
    /** **could**

Could. An action with this behavior may be included in the set of actions processed by the end user. */
    Could,
    /** **must**

Must. An action with this behavior must be included in the actions processed by the end user; the end user SHALL NOT choose not to include this action. */
    Must,
    /** **must-unless-documented**

Must Unless Documented. An action with this behavior must be included in the set of actions processed by the end user, unless the end user provides documentation as to why the action was not included. */
    MustUnlessDocumented,
}
impl ::core::str::FromStr for ActionRequiredBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "could" => Ok(Self::Could),
            "must" => Ok(Self::Must),
            "must-unless-documented" => Ok(Self::MustUnlessDocumented),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionRequiredBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::Could => "could",
            Self::Must => "must",
            Self::MustUnlessDocumented => "must-unless-documented",
        }
    }
}
impl ::std::fmt::Debug for ActionRequiredBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionRequiredBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionRequiredBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionRequiredBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionRequiredBehavior> for Coding {
    fn from(code: ActionRequiredBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-required-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionRequiredBehavior> for CodeableConcept {
    fn from(code: ActionRequiredBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ActionSelectionBehavior](http://hl7.org/fhir/ValueSet/action-selection-behavior)**. Defines selection behavior of a group.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ActionSelectionBehavior {
    /** **all**

All. All the actions in the group must be selected as a single unit. */
    All,
    /** **all-or-none**

All Or None. All the actions in the group are meant to be chosen as a single unit: either all must be selected by the end user, or none may be selected. */
    AllOrNone,
    /** **any**

Any. Any number of the actions in the group may be chosen, from zero to all. */
    Any,
    /** **at-most-one**

At Most One. The end user may choose zero or at most one of the actions in the group. */
    AtMostOne,
    /** **exactly-one**

Exactly One. The end user must choose one and only one of the selectable actions in the group. The user SHALL NOT choose none of the actions in the group. */
    ExactlyOne,
    /** **one-or-more**

One Or More. The end user must choose a minimum of one, and as many additional as desired. */
    OneOrMore,
}
impl ::core::str::FromStr for ActionSelectionBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "all" => Ok(Self::All),
            "all-or-none" => Ok(Self::AllOrNone),
            "any" => Ok(Self::Any),
            "at-most-one" => Ok(Self::AtMostOne),
            "exactly-one" => Ok(Self::ExactlyOne),
            "one-or-more" => Ok(Self::OneOrMore),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ActionSelectionBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::All => "all",
            Self::AllOrNone => "all-or-none",
            Self::Any => "any",
            Self::AtMostOne => "at-most-one",
            Self::ExactlyOne => "exactly-one",
            Self::OneOrMore => "one-or-more",
        }
    }
}
impl ::std::fmt::Debug for ActionSelectionBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ActionSelectionBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ActionSelectionBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ActionSelectionBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ActionSelectionBehavior> for Coding {
    fn from(code: ActionSelectionBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/action-selection-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ActionSelectionBehavior> for CodeableConcept {
    fn from(code: ActionSelectionBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdditionalBindingPurposeCodes](http://hl7.org/fhir/ValueSet/additional-binding-purpose)**. Additional Binding Purpose\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AdditionalBindingPurposeCodes {
    /** **candidate**

Candidate Binding. This value set is a candidate to substitute for the overall conformance value set in some situations; usually these are defined in the documentation */
    Candidate,
    /** **component**

Component Binding. This value set is a component of the base value set. Usually this is called out so that documentation can be written about a portion of the value set */
    Component,
    /** **current**

Current Binding. New records are required to use this value set, but legacy records may use other codes. The definition of 'new record' is difficult, since systems often create new records based on pre-existing data. Usually 'current' bindings are mandated by an external authority that makes clear rules around this */
    Current,
    /** **extensible**

Conformance Binding. This value set is used as an extensible binding (in addition to the base binding (not a replacement), usually in a particular usage context) */
    Extensible,
    /** **maximum**

Maximum Binding. A required binding, for use when the binding strength is 'extensible' or 'preferred' */
    Maximum,
    /** **minimum**

Minimum Binding. The minimum allowable value set - any conformant system SHALL support all these codes */
    Minimum,
    /** **preferred**

Preferred Binding. This is the value set that is preferred in a given context (documentation should explain why) */
    Preferred,
    /** **required**

Required Binding. This value set is used as a required binding (in addition to the base binding (not a replacement), usually in a particular usage context) */
    Required,
    /** **starter**

Starter Binding. This value set is a good set of codes to start with when designing your system */
    Starter,
    /** **ui**

UI Suggested Binding. This value set is provided for user look up in a given context. Typically, these valuesets only include a subset of codes relevant for input in a context */
    Ui,
}
impl ::core::str::FromStr for AdditionalBindingPurposeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "candidate" => Ok(Self::Candidate),
            "component" => Ok(Self::Component),
            "current" => Ok(Self::Current),
            "extensible" => Ok(Self::Extensible),
            "maximum" => Ok(Self::Maximum),
            "minimum" => Ok(Self::Minimum),
            "preferred" => Ok(Self::Preferred),
            "required" => Ok(Self::Required),
            "starter" => Ok(Self::Starter),
            "ui" => Ok(Self::Ui),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AdditionalBindingPurposeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Candidate => "candidate",
            Self::Component => "component",
            Self::Current => "current",
            Self::Extensible => "extensible",
            Self::Maximum => "maximum",
            Self::Minimum => "minimum",
            Self::Preferred => "preferred",
            Self::Required => "required",
            Self::Starter => "starter",
            Self::Ui => "ui",
        }
    }
}
impl ::std::fmt::Debug for AdditionalBindingPurposeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdditionalBindingPurposeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdditionalBindingPurposeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdditionalBindingPurposeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdditionalBindingPurposeCodes> for Coding {
    fn from(code: AdditionalBindingPurposeCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/additional-binding-purpose".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdditionalBindingPurposeCodes> for CodeableConcept {
    fn from(code: AdditionalBindingPurposeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdditionalMonitoring](http://hl7.org/fhir/ValueSet/medicinal-product-additional-monitoring)**. Extra monitoring defined for a Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AdditionalMonitoring {
    /** **BlackTriangleMonitoring**

Requirement for Black Triangle Monitoring. Requirement for Black Triangle Monitoring */
    BlackTriangleMonitoring,
}
impl ::core::str::FromStr for AdditionalMonitoring {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "BlackTriangleMonitoring" => Ok(Self::BlackTriangleMonitoring),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AdditionalMonitoring {
    fn as_ref(&self) -> &str {
        match self {
            Self::BlackTriangleMonitoring => "BlackTriangleMonitoring",
        }
    }
}
impl ::std::fmt::Debug for AdditionalMonitoring {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdditionalMonitoring {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdditionalMonitoring {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdditionalMonitoring {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdditionalMonitoring> for Coding {
    fn from(code: AdditionalMonitoring) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-additional-monitoring"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdditionalMonitoring> for CodeableConcept {
    fn from(code: AdditionalMonitoring) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AddressType](http://hl7.org/fhir/ValueSet/address-type)**. The type of an address (physical / postal).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AddressType {
    /** **both**

Postal & Physical. An address that is both physical and postal. */
    Both,
    /** **physical**

Physical. A physical address that can be visited. */
    Physical,
    /** **postal**

Postal. Mailing addresses - PO Boxes and care-of addresses. */
    Postal,
}
impl ::core::str::FromStr for AddressType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "both" => Ok(Self::Both),
            "physical" => Ok(Self::Physical),
            "postal" => Ok(Self::Postal),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AddressType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Both => "both",
            Self::Physical => "physical",
            Self::Postal => "postal",
        }
    }
}
impl ::std::fmt::Debug for AddressType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AddressType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AddressType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AddressType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AddressType> for Coding {
    fn from(code: AddressType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/address-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AddressType> for CodeableConcept {
    fn from(code: AddressType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AddressUse](http://hl7.org/fhir/ValueSet/address-use)**. The use of an address.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AddressUse {
    /** **billing**

Billing. An address to be used to send bills, invoices, receipts etc. */
    Billing,
    /** **home**

Home. A communication address at a home. */
    Home,
    /** **old**

Old / Incorrect. This address is no longer in use (or was never correct but retained for records). */
    Old,
    /** **temp**

Temporary. A temporary address. The period can provide more detailed information. */
    Temp,
    /** **work**

Work. An office address. First choice for business related contacts during business hours. */
    Work,
}
impl ::core::str::FromStr for AddressUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "billing" => Ok(Self::Billing),
            "home" => Ok(Self::Home),
            "old" => Ok(Self::Old),
            "temp" => Ok(Self::Temp),
            "work" => Ok(Self::Work),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AddressUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Billing => "billing",
            Self::Home => "home",
            Self::Old => "old",
            Self::Temp => "temp",
            Self::Work => "work",
        }
    }
}
impl ::std::fmt::Debug for AddressUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AddressUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AddressUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AddressUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AddressUse> for Coding {
    fn from(code: AddressUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/address-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AddressUse> for CodeableConcept {
    fn from(code: AddressUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdministrableDoseForm](http://hl7.org/fhir/ValueSet/administrable-dose-form)**. Dose form for a medication, in the form suitable for administering to the patient, after mixing, where necessary.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AdministrableDoseForm {
    /** **100000073362**

Oral suspension. */
    N100000073362,
    /** **100000073363**

Oral gel. */
    N100000073363,
    /** **100000073364**

Powder for oral solution. */
    N100000073364,
    /** **100000073365**

Granules for oral solution. */
    N100000073365,
    /** **100000073367**

Lyophilisate for suspension. */
    N100000073367,
    /** **100000073368**

Powder for syrup. */
    N100000073368,
    /** **100000073369**

Soluble tablet. */
    N100000073369,
    /** **100000073370**

Herbal tea. */
    N100000073370,
    /** **100000073371**

Instant herbal tea. */
    N100000073371,
    /** **100000073372**

Granules. */
    N100000073372,
    /** **100000073373**

Gastro-resistant granules. */
    N100000073373,
    /** **100000073374**

Modified-release granules. */
    N100000073374,
    /** **100000073375**

Capsule, hard. */
    N100000073375,
    /** **100000073376**

Gastro-resistant capsule, hard. */
    N100000073376,
    /** **100000073377**

Chewable capsule, soft. */
    N100000073377,
    /** **100000073378**

Prolonged-release capsule, soft. */
    N100000073378,
    /** **100000073379**

Modified-release capsule, soft. */
    N100000073379,
    /** **100000073380**

Coated tablet. */
    N100000073380,
    /** **100000073642**

Oral drops, solution. */
    N100000073642,
    /** **100000073643**

Oral drops, suspension. */
    N100000073643,
    /** **100000073644**

Oral drops, emulsion. */
    N100000073644,
    /** **100000073645**

Oral liquid. */
    N100000073645,
    /** **100000073646**

Oral solution. */
    N100000073646,
    /** **100000073647**

Oral emulsion. */
    N100000073647,
    /** **100000073648**

Oral paste. */
    N100000073648,
    /** **100000073649**

Powder for oral suspension. */
    N100000073649,
    /** **100000073650**

Granules for oral suspension. */
    N100000073650,
    /** **100000073652**

Syrup. */
    N100000073652,
    /** **100000073653**

Granules for syrup. */
    N100000073653,
    /** **100000073654**

Dispersible tablet. */
    N100000073654,
    /** **100000073655**

Oral powder. */
    N100000073655,
    /** **100000073656**

Effervescent powder. */
    N100000073656,
    /** **100000073657**

Effervescent granules. */
    N100000073657,
    /** **100000073658**

Prolonged-release granules. */
    N100000073658,
    /** **100000073659**

Cachet. */
    N100000073659,
    /** **100000073660**

Capsule, soft. */
    N100000073660,
    /** **100000073661**

Gastro-resistant capsule, soft. */
    N100000073661,
    /** **100000073662**

Prolonged-release capsule, hard. */
    N100000073662,
    /** **100000073663**

Modified-release capsule, hard. */
    N100000073663,
    /** **100000073664**

Tablet. */
    N100000073664,
    /** **100000073665**

Film-coated tablet. */
    N100000073665,
    /** **100000073666**

Orodispersible tablet. */
    N100000073666,
    /** **100000073667**

Gastro-resistant tablet. */
    N100000073667,
    /** **100000073668**

Modified-release tablet. */
    N100000073668,
    /** **100000073669**

Medicated chewing-gum. */
    N100000073669,
    /** **100000073670**

Pillules. */
    N100000073670,
    /** **100000073671**

Pulsatile-release intraruminal device. */
    N100000073671,
    /** **100000073672**

Premix for medicated feeding stuff. */
    N100000073672,
    /** **100000073673**

Gargle. */
    N100000073673,
    /** **100000073674**

Gargle, powder for solution. */
    N100000073674,
    /** **100000073675**

Oromucosal suspension. */
    N100000073675,
    /** **100000073676**

Oromucosal spray. */
    N100000073676,
    /** **100000073677**

Mouthwash. */
    N100000073677,
    /** **100000073678**

Gingival solution. */
    N100000073678,
    /** **100000073679**

Oromucosal paste. */
    N100000073679,
    /** **100000073680**

Gingival gel. */
    N100000073680,
    /** **100000073681**

Effervescent tablet. */
    N100000073681,
    /** **100000073682**

Oral lyophilisate. */
    N100000073682,
    /** **100000073683**

Prolonged-release tablet. */
    N100000073683,
    /** **100000073684**

Chewable tablet. */
    N100000073684,
    /** **100000073685**

Oral gum. */
    N100000073685,
    /** **100000073686**

Continuous-release intraruminal device. */
    N100000073686,
    /** **100000073687**

Lick block. */
    N100000073687,
    /** **100000073688**

Medicated pellets. */
    N100000073688,
    /** **100000073689**

Concentrate for gargle. */
    N100000073689,
    /** **100000073690**

Gargle, tablet for solution. */
    N100000073690,
    /** **100000073691**

Oromucosal solution. */
    N100000073691,
    /** **100000073692**

Oromucosal drops. */
    N100000073692,
    /** **100000073693**

Sublingual spray. */
    N100000073693,
    /** **100000073694**

Mouthwash, tablet for solution. */
    N100000073694,
    /** **100000073695**

Oromucosal gel. */
    N100000073695,
    /** **100000073696**

Oromucosal cream. */
    N100000073696,
    /** **100000073697**

Gingival paste. */
    N100000073697,
    /** **100000073698**

Sublingual tablet. */
    N100000073698,
    /** **100000073699**

Buccal tablet. */
    N100000073699,
    /** **100000073700**

Compressed lozenge. */
    N100000073700,
    /** **100000073701**

Oromucosal capsule. */
    N100000073701,
    /** **100000073702**

Muco-adhesive buccal tablet. */
    N100000073702,
    /** **100000073703**

Lozenge. */
    N100000073703,
    /** **100000073704**

Pastille. */
    N100000073704,
    /** **100000073705**

Dental gel. */
    N100000073705,
    /** **100000073706**

Dental insert. */
    N100000073706,
    /** **100000073707**

Dental powder. */
    N100000073707,
    /** **100000073708**

Dental suspension. */
    N100000073708,
    /** **100000073709**

Toothpaste. */
    N100000073709,
    /** **100000073710**

Periodontal gel. */
    N100000073710,
    /** **100000073711**

Bath additive. */
    N100000073711,
    /** **100000073712**

Cream. */
    N100000073712,
    /** **100000073713**

Ointment. */
    N100000073713,
    /** **100000073714**

Medicated plaster. */
    N100000073714,
    /** **100000073715**

Shampoo. */
    N100000073715,
    /** **100000073716**

Cutaneous spray, suspension. */
    N100000073716,
    /** **100000073717**

Cutaneous liquid. */
    N100000073717,
    /** **100000073718**

Concentrate for cutaneous solution. */
    N100000073718,
    /** **100000073719**

Cutaneous emulsion. */
    N100000073719,
    /** **100000073720**

Cutaneous patch. */
    N100000073720,
    /** **100000073721**

Periodontal powder. */
    N100000073721,
    /** **100000073722**

Dental stick. */
    N100000073722,
    /** **100000073723**

Dental solution. */
    N100000073723,
    /** **100000073724**

Dental emulsion. */
    N100000073724,
    /** **100000073725**

Periodontal insert. */
    N100000073725,
    /** **100000073726**

Gel. */
    N100000073726,
    /** **100000073727**

Cutaneous paste. */
    N100000073727,
    /** **100000073728**

Cutaneous foam. */
    N100000073728,
    /** **100000073729**

Cutaneous spray, solution. */
    N100000073729,
    /** **100000073730**

Cutaneous spray, powder. */
    N100000073730,
    /** **100000073731**

Cutaneous solution. */
    N100000073731,
    /** **100000073732**

Cutaneous suspension. */
    N100000073732,
    /** **100000073733**

Cutaneous powder. */
    N100000073733,
    /** **100000073734**

Solution for iontophoresis. */
    N100000073734,
    /** **100000073735**

Collodion. */
    N100000073735,
    /** **100000073736**

Poultice. */
    N100000073736,
    /** **100000073737**

Cutaneous sponge. */
    N100000073737,
    /** **100000073738**

Collar. */
    N100000073738,
    /** **100000073739**

Ear tag. */
    N100000073739,
    /** **100000073740**

Dip suspension. */
    N100000073740,
    /** **100000073741**

Transdermal patch. */
    N100000073741,
    /** **100000073742**

Medicated nail lacquer. */
    N100000073742,
    /** **100000073743**

Cutaneous stick. */
    N100000073743,
    /** **100000073744**

Impregnated dressing. */
    N100000073744,
    /** **100000073745**

Medicated pendant. */
    N100000073745,
    /** **100000073746**

Dip solution. */
    N100000073746,
    /** **100000073747**

Dip emulsion. */
    N100000073747,
    /** **100000073748**

Concentrate for dip suspension. */
    N100000073748,
    /** **100000073749**

Powder for dip solution. */
    N100000073749,
    /** **100000073750**

Powder for suspension for fish treatment. */
    N100000073750,
    /** **100000073751**

Pour-on suspension. */
    N100000073751,
    /** **100000073752**

Spot-on solution. */
    N100000073752,
    /** **100000073753**

Spot-on emulsion. */
    N100000073753,
    /** **100000073754**

Teat dip suspension. */
    N100000073754,
    /** **100000073755**

Teat spray solution. */
    N100000073755,
    /** **100000073756**

Solution for skin-prick test. */
    N100000073756,
    /** **100000073757**

Plaster for provocation test. */
    N100000073757,
    /** **100000073758**

Eye gel. */
    N100000073758,
    /** **100000073759**

Eye drops, solution. */
    N100000073759,
    /** **100000073760**

Eye drops, suspension. */
    N100000073760,
    /** **100000073761**

Concentrate for dip solution. */
    N100000073761,
    /** **100000073762**

Concentrate for dip emulsion. */
    N100000073762,
    /** **100000073763**

Concentrate for solution for fish treatment. */
    N100000073763,
    /** **100000073764**

Pour-on solution. */
    N100000073764,
    /** **100000073765**

Pour-on emulsion. */
    N100000073765,
    /** **100000073766**

Spot-on suspension. */
    N100000073766,
    /** **100000073767**

Teat dip solution. */
    N100000073767,
    /** **100000073768**

Teat dip emulsion. */
    N100000073768,
    /** **100000073769**

Transdermal system. */
    N100000073769,
    /** **100000073770**

Solution for skin-scratch test. */
    N100000073770,
    /** **100000073771**

Eye cream. */
    N100000073771,
    /** **100000073772**

Eye ointment. */
    N100000073772,
    /** **100000073773**

Eye drops, emulsion. */
    N100000073773,
    /** **100000073775**

Eye drops, solvent for reconstitution. */
    N100000073775,
    /** **100000073776**

Eye lotion. */
    N100000073776,
    /** **100000073777**

Ophthalmic insert. */
    N100000073777,
    /** **100000073778**

Ear cream. */
    N100000073778,
    /** **100000073779**

Ear ointment. */
    N100000073779,
    /** **100000073780**

Ear drops, suspension. */
    N100000073780,
    /** **100000073782**

Eye drops, prolonged-release. */
    N100000073782,
    /** **100000073783**

Eye lotion, solvent for reconstitution. */
    N100000073783,
    /** **100000073784**

Ophthalmic strip. */
    N100000073784,
    /** **100000073785**

Ear gel. */
    N100000073785,
    /** **100000073786**

Ear drops, solution. */
    N100000073786,
    /** **100000073787**

Ear drops, emulsion. */
    N100000073787,
    /** **100000073788**

Ear powder. */
    N100000073788,
    /** **100000073789**

Ear spray, suspension. */
    N100000073789,
    /** **100000073790**

Ear wash, solution. */
    N100000073790,
    /** **100000073791**

Ear tampon. */
    N100000073791,
    /** **100000073792**

Nasal cream. */
    N100000073792,
    /** **100000073793**

Nasal gel. */
    N100000073793,
    /** **100000073794**

Nasal drops, solution. */
    N100000073794,
    /** **100000073795**

Nasal drops, emulsion. */
    N100000073795,
    /** **100000073796**

Nasal spray, solution. */
    N100000073796,
    /** **100000073797**

Nasal spray, emulsion. */
    N100000073797,
    /** **100000073798**

Nasal stick. */
    N100000073798,
    /** **100000073799**

Vaginal gel. */
    N100000073799,
    /** **100000073800**

Vaginal foam. */
    N100000073800,
    /** **100000073802**

Ear spray, solution. */
    N100000073802,
    /** **100000073803**

Ear spray, emulsion. */
    N100000073803,
    /** **100000073804**

Ear wash, emulsion. */
    N100000073804,
    /** **100000073805**

Ear stick. */
    N100000073805,
    /** **100000073806**

Nasal ointment. */
    N100000073806,
    /** **100000073807**

Nasal drops, suspension. */
    N100000073807,
    /** **100000073808**

Nasal powder. */
    N100000073808,
    /** **100000073809**

Nasal spray, suspension. */
    N100000073809,
    /** **100000073810**

Nasal wash. */
    N100000073810,
    /** **100000073811**

Vaginal cream. */
    N100000073811,
    /** **100000073812**

Vaginal ointment. */
    N100000073812,
    /** **100000073813**

Vaginal solution. */
    N100000073813,
    /** **100000073814**

Vaginal emulsion. */
    N100000073814,
    /** **100000073815**

Pessary. */
    N100000073815,
    /** **100000073816**

Vaginal capsule, soft. */
    N100000073816,
    /** **100000073817**

Effervescent vaginal tablet. */
    N100000073817,
    /** **100000073818**

Vaginal delivery system. */
    N100000073818,
    /** **100000073819**

Rectal cream. */
    N100000073819,
    /** **100000073820**

Rectal foam. */
    N100000073820,
    /** **100000073821**

Vaginal suspension. */
    N100000073821,
    /** **100000073822**

Tablet for vaginal solution. */
    N100000073822,
    /** **100000073823**

Vaginal capsule, hard. */
    N100000073823,
    /** **100000073824**

Vaginal tablet. */
    N100000073824,
    /** **100000073825**

Medicated vaginal tampon. */
    N100000073825,
    /** **100000073826**

Vaginal sponge. */
    N100000073826,
    /** **100000073827**

Rectal gel. */
    N100000073827,
    /** **100000073863**

Solution for injection. */
    N100000073863,
}
impl ::core::str::FromStr for AdministrableDoseForm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000073362" => Ok(Self::N100000073362),
            "100000073363" => Ok(Self::N100000073363),
            "100000073364" => Ok(Self::N100000073364),
            "100000073365" => Ok(Self::N100000073365),
            "100000073367" => Ok(Self::N100000073367),
            "100000073368" => Ok(Self::N100000073368),
            "100000073369" => Ok(Self::N100000073369),
            "100000073370" => Ok(Self::N100000073370),
            "100000073371" => Ok(Self::N100000073371),
            "100000073372" => Ok(Self::N100000073372),
            "100000073373" => Ok(Self::N100000073373),
            "100000073374" => Ok(Self::N100000073374),
            "100000073375" => Ok(Self::N100000073375),
            "100000073376" => Ok(Self::N100000073376),
            "100000073377" => Ok(Self::N100000073377),
            "100000073378" => Ok(Self::N100000073378),
            "100000073379" => Ok(Self::N100000073379),
            "100000073380" => Ok(Self::N100000073380),
            "100000073642" => Ok(Self::N100000073642),
            "100000073643" => Ok(Self::N100000073643),
            "100000073644" => Ok(Self::N100000073644),
            "100000073645" => Ok(Self::N100000073645),
            "100000073646" => Ok(Self::N100000073646),
            "100000073647" => Ok(Self::N100000073647),
            "100000073648" => Ok(Self::N100000073648),
            "100000073649" => Ok(Self::N100000073649),
            "100000073650" => Ok(Self::N100000073650),
            "100000073652" => Ok(Self::N100000073652),
            "100000073653" => Ok(Self::N100000073653),
            "100000073654" => Ok(Self::N100000073654),
            "100000073655" => Ok(Self::N100000073655),
            "100000073656" => Ok(Self::N100000073656),
            "100000073657" => Ok(Self::N100000073657),
            "100000073658" => Ok(Self::N100000073658),
            "100000073659" => Ok(Self::N100000073659),
            "100000073660" => Ok(Self::N100000073660),
            "100000073661" => Ok(Self::N100000073661),
            "100000073662" => Ok(Self::N100000073662),
            "100000073663" => Ok(Self::N100000073663),
            "100000073664" => Ok(Self::N100000073664),
            "100000073665" => Ok(Self::N100000073665),
            "100000073666" => Ok(Self::N100000073666),
            "100000073667" => Ok(Self::N100000073667),
            "100000073668" => Ok(Self::N100000073668),
            "100000073669" => Ok(Self::N100000073669),
            "100000073670" => Ok(Self::N100000073670),
            "100000073671" => Ok(Self::N100000073671),
            "100000073672" => Ok(Self::N100000073672),
            "100000073673" => Ok(Self::N100000073673),
            "100000073674" => Ok(Self::N100000073674),
            "100000073675" => Ok(Self::N100000073675),
            "100000073676" => Ok(Self::N100000073676),
            "100000073677" => Ok(Self::N100000073677),
            "100000073678" => Ok(Self::N100000073678),
            "100000073679" => Ok(Self::N100000073679),
            "100000073680" => Ok(Self::N100000073680),
            "100000073681" => Ok(Self::N100000073681),
            "100000073682" => Ok(Self::N100000073682),
            "100000073683" => Ok(Self::N100000073683),
            "100000073684" => Ok(Self::N100000073684),
            "100000073685" => Ok(Self::N100000073685),
            "100000073686" => Ok(Self::N100000073686),
            "100000073687" => Ok(Self::N100000073687),
            "100000073688" => Ok(Self::N100000073688),
            "100000073689" => Ok(Self::N100000073689),
            "100000073690" => Ok(Self::N100000073690),
            "100000073691" => Ok(Self::N100000073691),
            "100000073692" => Ok(Self::N100000073692),
            "100000073693" => Ok(Self::N100000073693),
            "100000073694" => Ok(Self::N100000073694),
            "100000073695" => Ok(Self::N100000073695),
            "100000073696" => Ok(Self::N100000073696),
            "100000073697" => Ok(Self::N100000073697),
            "100000073698" => Ok(Self::N100000073698),
            "100000073699" => Ok(Self::N100000073699),
            "100000073700" => Ok(Self::N100000073700),
            "100000073701" => Ok(Self::N100000073701),
            "100000073702" => Ok(Self::N100000073702),
            "100000073703" => Ok(Self::N100000073703),
            "100000073704" => Ok(Self::N100000073704),
            "100000073705" => Ok(Self::N100000073705),
            "100000073706" => Ok(Self::N100000073706),
            "100000073707" => Ok(Self::N100000073707),
            "100000073708" => Ok(Self::N100000073708),
            "100000073709" => Ok(Self::N100000073709),
            "100000073710" => Ok(Self::N100000073710),
            "100000073711" => Ok(Self::N100000073711),
            "100000073712" => Ok(Self::N100000073712),
            "100000073713" => Ok(Self::N100000073713),
            "100000073714" => Ok(Self::N100000073714),
            "100000073715" => Ok(Self::N100000073715),
            "100000073716" => Ok(Self::N100000073716),
            "100000073717" => Ok(Self::N100000073717),
            "100000073718" => Ok(Self::N100000073718),
            "100000073719" => Ok(Self::N100000073719),
            "100000073720" => Ok(Self::N100000073720),
            "100000073721" => Ok(Self::N100000073721),
            "100000073722" => Ok(Self::N100000073722),
            "100000073723" => Ok(Self::N100000073723),
            "100000073724" => Ok(Self::N100000073724),
            "100000073725" => Ok(Self::N100000073725),
            "100000073726" => Ok(Self::N100000073726),
            "100000073727" => Ok(Self::N100000073727),
            "100000073728" => Ok(Self::N100000073728),
            "100000073729" => Ok(Self::N100000073729),
            "100000073730" => Ok(Self::N100000073730),
            "100000073731" => Ok(Self::N100000073731),
            "100000073732" => Ok(Self::N100000073732),
            "100000073733" => Ok(Self::N100000073733),
            "100000073734" => Ok(Self::N100000073734),
            "100000073735" => Ok(Self::N100000073735),
            "100000073736" => Ok(Self::N100000073736),
            "100000073737" => Ok(Self::N100000073737),
            "100000073738" => Ok(Self::N100000073738),
            "100000073739" => Ok(Self::N100000073739),
            "100000073740" => Ok(Self::N100000073740),
            "100000073741" => Ok(Self::N100000073741),
            "100000073742" => Ok(Self::N100000073742),
            "100000073743" => Ok(Self::N100000073743),
            "100000073744" => Ok(Self::N100000073744),
            "100000073745" => Ok(Self::N100000073745),
            "100000073746" => Ok(Self::N100000073746),
            "100000073747" => Ok(Self::N100000073747),
            "100000073748" => Ok(Self::N100000073748),
            "100000073749" => Ok(Self::N100000073749),
            "100000073750" => Ok(Self::N100000073750),
            "100000073751" => Ok(Self::N100000073751),
            "100000073752" => Ok(Self::N100000073752),
            "100000073753" => Ok(Self::N100000073753),
            "100000073754" => Ok(Self::N100000073754),
            "100000073755" => Ok(Self::N100000073755),
            "100000073756" => Ok(Self::N100000073756),
            "100000073757" => Ok(Self::N100000073757),
            "100000073758" => Ok(Self::N100000073758),
            "100000073759" => Ok(Self::N100000073759),
            "100000073760" => Ok(Self::N100000073760),
            "100000073761" => Ok(Self::N100000073761),
            "100000073762" => Ok(Self::N100000073762),
            "100000073763" => Ok(Self::N100000073763),
            "100000073764" => Ok(Self::N100000073764),
            "100000073765" => Ok(Self::N100000073765),
            "100000073766" => Ok(Self::N100000073766),
            "100000073767" => Ok(Self::N100000073767),
            "100000073768" => Ok(Self::N100000073768),
            "100000073769" => Ok(Self::N100000073769),
            "100000073770" => Ok(Self::N100000073770),
            "100000073771" => Ok(Self::N100000073771),
            "100000073772" => Ok(Self::N100000073772),
            "100000073773" => Ok(Self::N100000073773),
            "100000073775" => Ok(Self::N100000073775),
            "100000073776" => Ok(Self::N100000073776),
            "100000073777" => Ok(Self::N100000073777),
            "100000073778" => Ok(Self::N100000073778),
            "100000073779" => Ok(Self::N100000073779),
            "100000073780" => Ok(Self::N100000073780),
            "100000073782" => Ok(Self::N100000073782),
            "100000073783" => Ok(Self::N100000073783),
            "100000073784" => Ok(Self::N100000073784),
            "100000073785" => Ok(Self::N100000073785),
            "100000073786" => Ok(Self::N100000073786),
            "100000073787" => Ok(Self::N100000073787),
            "100000073788" => Ok(Self::N100000073788),
            "100000073789" => Ok(Self::N100000073789),
            "100000073790" => Ok(Self::N100000073790),
            "100000073791" => Ok(Self::N100000073791),
            "100000073792" => Ok(Self::N100000073792),
            "100000073793" => Ok(Self::N100000073793),
            "100000073794" => Ok(Self::N100000073794),
            "100000073795" => Ok(Self::N100000073795),
            "100000073796" => Ok(Self::N100000073796),
            "100000073797" => Ok(Self::N100000073797),
            "100000073798" => Ok(Self::N100000073798),
            "100000073799" => Ok(Self::N100000073799),
            "100000073800" => Ok(Self::N100000073800),
            "100000073802" => Ok(Self::N100000073802),
            "100000073803" => Ok(Self::N100000073803),
            "100000073804" => Ok(Self::N100000073804),
            "100000073805" => Ok(Self::N100000073805),
            "100000073806" => Ok(Self::N100000073806),
            "100000073807" => Ok(Self::N100000073807),
            "100000073808" => Ok(Self::N100000073808),
            "100000073809" => Ok(Self::N100000073809),
            "100000073810" => Ok(Self::N100000073810),
            "100000073811" => Ok(Self::N100000073811),
            "100000073812" => Ok(Self::N100000073812),
            "100000073813" => Ok(Self::N100000073813),
            "100000073814" => Ok(Self::N100000073814),
            "100000073815" => Ok(Self::N100000073815),
            "100000073816" => Ok(Self::N100000073816),
            "100000073817" => Ok(Self::N100000073817),
            "100000073818" => Ok(Self::N100000073818),
            "100000073819" => Ok(Self::N100000073819),
            "100000073820" => Ok(Self::N100000073820),
            "100000073821" => Ok(Self::N100000073821),
            "100000073822" => Ok(Self::N100000073822),
            "100000073823" => Ok(Self::N100000073823),
            "100000073824" => Ok(Self::N100000073824),
            "100000073825" => Ok(Self::N100000073825),
            "100000073826" => Ok(Self::N100000073826),
            "100000073827" => Ok(Self::N100000073827),
            "100000073863" => Ok(Self::N100000073863),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AdministrableDoseForm {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000073362 => "100000073362",
            Self::N100000073363 => "100000073363",
            Self::N100000073364 => "100000073364",
            Self::N100000073365 => "100000073365",
            Self::N100000073367 => "100000073367",
            Self::N100000073368 => "100000073368",
            Self::N100000073369 => "100000073369",
            Self::N100000073370 => "100000073370",
            Self::N100000073371 => "100000073371",
            Self::N100000073372 => "100000073372",
            Self::N100000073373 => "100000073373",
            Self::N100000073374 => "100000073374",
            Self::N100000073375 => "100000073375",
            Self::N100000073376 => "100000073376",
            Self::N100000073377 => "100000073377",
            Self::N100000073378 => "100000073378",
            Self::N100000073379 => "100000073379",
            Self::N100000073380 => "100000073380",
            Self::N100000073642 => "100000073642",
            Self::N100000073643 => "100000073643",
            Self::N100000073644 => "100000073644",
            Self::N100000073645 => "100000073645",
            Self::N100000073646 => "100000073646",
            Self::N100000073647 => "100000073647",
            Self::N100000073648 => "100000073648",
            Self::N100000073649 => "100000073649",
            Self::N100000073650 => "100000073650",
            Self::N100000073652 => "100000073652",
            Self::N100000073653 => "100000073653",
            Self::N100000073654 => "100000073654",
            Self::N100000073655 => "100000073655",
            Self::N100000073656 => "100000073656",
            Self::N100000073657 => "100000073657",
            Self::N100000073658 => "100000073658",
            Self::N100000073659 => "100000073659",
            Self::N100000073660 => "100000073660",
            Self::N100000073661 => "100000073661",
            Self::N100000073662 => "100000073662",
            Self::N100000073663 => "100000073663",
            Self::N100000073664 => "100000073664",
            Self::N100000073665 => "100000073665",
            Self::N100000073666 => "100000073666",
            Self::N100000073667 => "100000073667",
            Self::N100000073668 => "100000073668",
            Self::N100000073669 => "100000073669",
            Self::N100000073670 => "100000073670",
            Self::N100000073671 => "100000073671",
            Self::N100000073672 => "100000073672",
            Self::N100000073673 => "100000073673",
            Self::N100000073674 => "100000073674",
            Self::N100000073675 => "100000073675",
            Self::N100000073676 => "100000073676",
            Self::N100000073677 => "100000073677",
            Self::N100000073678 => "100000073678",
            Self::N100000073679 => "100000073679",
            Self::N100000073680 => "100000073680",
            Self::N100000073681 => "100000073681",
            Self::N100000073682 => "100000073682",
            Self::N100000073683 => "100000073683",
            Self::N100000073684 => "100000073684",
            Self::N100000073685 => "100000073685",
            Self::N100000073686 => "100000073686",
            Self::N100000073687 => "100000073687",
            Self::N100000073688 => "100000073688",
            Self::N100000073689 => "100000073689",
            Self::N100000073690 => "100000073690",
            Self::N100000073691 => "100000073691",
            Self::N100000073692 => "100000073692",
            Self::N100000073693 => "100000073693",
            Self::N100000073694 => "100000073694",
            Self::N100000073695 => "100000073695",
            Self::N100000073696 => "100000073696",
            Self::N100000073697 => "100000073697",
            Self::N100000073698 => "100000073698",
            Self::N100000073699 => "100000073699",
            Self::N100000073700 => "100000073700",
            Self::N100000073701 => "100000073701",
            Self::N100000073702 => "100000073702",
            Self::N100000073703 => "100000073703",
            Self::N100000073704 => "100000073704",
            Self::N100000073705 => "100000073705",
            Self::N100000073706 => "100000073706",
            Self::N100000073707 => "100000073707",
            Self::N100000073708 => "100000073708",
            Self::N100000073709 => "100000073709",
            Self::N100000073710 => "100000073710",
            Self::N100000073711 => "100000073711",
            Self::N100000073712 => "100000073712",
            Self::N100000073713 => "100000073713",
            Self::N100000073714 => "100000073714",
            Self::N100000073715 => "100000073715",
            Self::N100000073716 => "100000073716",
            Self::N100000073717 => "100000073717",
            Self::N100000073718 => "100000073718",
            Self::N100000073719 => "100000073719",
            Self::N100000073720 => "100000073720",
            Self::N100000073721 => "100000073721",
            Self::N100000073722 => "100000073722",
            Self::N100000073723 => "100000073723",
            Self::N100000073724 => "100000073724",
            Self::N100000073725 => "100000073725",
            Self::N100000073726 => "100000073726",
            Self::N100000073727 => "100000073727",
            Self::N100000073728 => "100000073728",
            Self::N100000073729 => "100000073729",
            Self::N100000073730 => "100000073730",
            Self::N100000073731 => "100000073731",
            Self::N100000073732 => "100000073732",
            Self::N100000073733 => "100000073733",
            Self::N100000073734 => "100000073734",
            Self::N100000073735 => "100000073735",
            Self::N100000073736 => "100000073736",
            Self::N100000073737 => "100000073737",
            Self::N100000073738 => "100000073738",
            Self::N100000073739 => "100000073739",
            Self::N100000073740 => "100000073740",
            Self::N100000073741 => "100000073741",
            Self::N100000073742 => "100000073742",
            Self::N100000073743 => "100000073743",
            Self::N100000073744 => "100000073744",
            Self::N100000073745 => "100000073745",
            Self::N100000073746 => "100000073746",
            Self::N100000073747 => "100000073747",
            Self::N100000073748 => "100000073748",
            Self::N100000073749 => "100000073749",
            Self::N100000073750 => "100000073750",
            Self::N100000073751 => "100000073751",
            Self::N100000073752 => "100000073752",
            Self::N100000073753 => "100000073753",
            Self::N100000073754 => "100000073754",
            Self::N100000073755 => "100000073755",
            Self::N100000073756 => "100000073756",
            Self::N100000073757 => "100000073757",
            Self::N100000073758 => "100000073758",
            Self::N100000073759 => "100000073759",
            Self::N100000073760 => "100000073760",
            Self::N100000073761 => "100000073761",
            Self::N100000073762 => "100000073762",
            Self::N100000073763 => "100000073763",
            Self::N100000073764 => "100000073764",
            Self::N100000073765 => "100000073765",
            Self::N100000073766 => "100000073766",
            Self::N100000073767 => "100000073767",
            Self::N100000073768 => "100000073768",
            Self::N100000073769 => "100000073769",
            Self::N100000073770 => "100000073770",
            Self::N100000073771 => "100000073771",
            Self::N100000073772 => "100000073772",
            Self::N100000073773 => "100000073773",
            Self::N100000073775 => "100000073775",
            Self::N100000073776 => "100000073776",
            Self::N100000073777 => "100000073777",
            Self::N100000073778 => "100000073778",
            Self::N100000073779 => "100000073779",
            Self::N100000073780 => "100000073780",
            Self::N100000073782 => "100000073782",
            Self::N100000073783 => "100000073783",
            Self::N100000073784 => "100000073784",
            Self::N100000073785 => "100000073785",
            Self::N100000073786 => "100000073786",
            Self::N100000073787 => "100000073787",
            Self::N100000073788 => "100000073788",
            Self::N100000073789 => "100000073789",
            Self::N100000073790 => "100000073790",
            Self::N100000073791 => "100000073791",
            Self::N100000073792 => "100000073792",
            Self::N100000073793 => "100000073793",
            Self::N100000073794 => "100000073794",
            Self::N100000073795 => "100000073795",
            Self::N100000073796 => "100000073796",
            Self::N100000073797 => "100000073797",
            Self::N100000073798 => "100000073798",
            Self::N100000073799 => "100000073799",
            Self::N100000073800 => "100000073800",
            Self::N100000073802 => "100000073802",
            Self::N100000073803 => "100000073803",
            Self::N100000073804 => "100000073804",
            Self::N100000073805 => "100000073805",
            Self::N100000073806 => "100000073806",
            Self::N100000073807 => "100000073807",
            Self::N100000073808 => "100000073808",
            Self::N100000073809 => "100000073809",
            Self::N100000073810 => "100000073810",
            Self::N100000073811 => "100000073811",
            Self::N100000073812 => "100000073812",
            Self::N100000073813 => "100000073813",
            Self::N100000073814 => "100000073814",
            Self::N100000073815 => "100000073815",
            Self::N100000073816 => "100000073816",
            Self::N100000073817 => "100000073817",
            Self::N100000073818 => "100000073818",
            Self::N100000073819 => "100000073819",
            Self::N100000073820 => "100000073820",
            Self::N100000073821 => "100000073821",
            Self::N100000073822 => "100000073822",
            Self::N100000073823 => "100000073823",
            Self::N100000073824 => "100000073824",
            Self::N100000073825 => "100000073825",
            Self::N100000073826 => "100000073826",
            Self::N100000073827 => "100000073827",
            Self::N100000073863 => "100000073863",
        }
    }
}
impl ::std::fmt::Debug for AdministrableDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdministrableDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdministrableDoseForm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdministrableDoseForm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdministrableDoseForm> for Coding {
    fn from(code: AdministrableDoseForm) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/administrable-dose-form".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdministrableDoseForm> for CodeableConcept {
    fn from(code: AdministrableDoseForm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdministrationSubPotentReason](http://hl7.org/fhir/CodeSystem/administration-subpotent-reason)**. This value set is provided as an example. The value set to instantiate this attribute should be drawn from a robust terminology code system that consists of or contains concepts to support the medication administration process.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum AdministrationSubPotentReason {
    /** **adversestorage**

Adverse Storage. The medication experienced adverse storage conditions. */
    Adversestorage,
    /** **coldchainbreak**

Cold Chain Break. The medication experienced a cold chain break. */
    Coldchainbreak,
    /** **expired**

Expired Product. The medication was expired at the time of administration. */
    Expired,
    /** **partialdose**

Partial Dose. The full amount of the dose was not administered to the patient. */
    Partialdose,
    /** **recall**

Manufacturer Recall. The medication was recalled by the manufacturer. */
    Recall,
    /** **vomited**

Vomited. The patient vomited part of the dose. */
    Vomited,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for AdministrationSubPotentReason {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "adversestorage" => Ok(Self::Adversestorage),
            "coldchainbreak" => Ok(Self::Coldchainbreak),
            "expired" => Ok(Self::Expired),
            "partialdose" => Ok(Self::Partialdose),
            "recall" => Ok(Self::Recall),
            "vomited" => Ok(Self::Vomited),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for AdministrationSubPotentReason {
    fn as_ref(&self) -> &str {
        match self {
            Self::Adversestorage => "adversestorage",
            Self::Coldchainbreak => "coldchainbreak",
            Self::Expired => "expired",
            Self::Partialdose => "partialdose",
            Self::Recall => "recall",
            Self::Vomited => "vomited",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for AdministrationSubPotentReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdministrationSubPotentReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdministrationSubPotentReason {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdministrationSubPotentReason {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdministrationSubPotentReason> for Coding {
    fn from(code: AdministrationSubPotentReason) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/CodeSystem/administration-subpotent-reason"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdministrationSubPotentReason> for CodeableConcept {
    fn from(code: AdministrationSubPotentReason) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdministrativeGender](http://hl7.org/fhir/ValueSet/administrative-gender)**. The gender of a person used for administrative purposes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AdministrativeGender {
    /** **female**

Female. Female. */
    Female,
    /** **male**

Male. Male. */
    Male,
    /** **other**

Other. Other. */
    Other,
    /** **unknown**

Unknown. Unknown. */
    Unknown,
}
impl ::core::str::FromStr for AdministrativeGender {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "female" => Ok(Self::Female),
            "male" => Ok(Self::Male),
            "other" => Ok(Self::Other),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AdministrativeGender {
    fn as_ref(&self) -> &str {
        match self {
            Self::Female => "female",
            Self::Male => "male",
            Self::Other => "other",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for AdministrativeGender {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdministrativeGender {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdministrativeGender {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdministrativeGender {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdministrativeGender> for Coding {
    fn from(code: AdministrativeGender) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/administrative-gender".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdministrativeGender> for CodeableConcept {
    fn from(code: AdministrativeGender) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AdverseEventActuality](http://hl7.org/fhir/ValueSet/adverse-event-actuality)**. Overall nature of the adverse event, e.g. real or potential.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AdverseEventActuality {
    /** **actual**

Adverse Event. The adverse event actually happened regardless of whether anyone was affected or harmed. */
    Actual,
    /** **potential**

Potential Adverse Event. A potential adverse event. */
    Potential,
}
impl ::core::str::FromStr for AdverseEventActuality {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "actual" => Ok(Self::Actual),
            "potential" => Ok(Self::Potential),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AdverseEventActuality {
    fn as_ref(&self) -> &str {
        match self {
            Self::Actual => "actual",
            Self::Potential => "potential",
        }
    }
}
impl ::std::fmt::Debug for AdverseEventActuality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AdverseEventActuality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AdverseEventActuality {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AdverseEventActuality {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AdverseEventActuality> for Coding {
    fn from(code: AdverseEventActuality) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/adverse-event-actuality".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AdverseEventActuality> for CodeableConcept {
    fn from(code: AdverseEventActuality) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AggregationMode](http://hl7.org/fhir/ValueSet/resource-aggregation-mode)**. How resource references can be aggregated.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AggregationMode {
    /** **bundled**

Bundled. When the resource is in a Bundle, the resource the reference points to will be found in the same bundle as the resource that includes the reference. */
    Bundled,
    /** **contained**

Contained. The reference is a local reference to a contained resource. */
    Contained,
    /** **referenced**

Referenced. The reference to a resource that has to be resolved externally to the resource that includes the reference. */
    Referenced,
}
impl ::core::str::FromStr for AggregationMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "bundled" => Ok(Self::Bundled),
            "contained" => Ok(Self::Contained),
            "referenced" => Ok(Self::Referenced),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AggregationMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Bundled => "bundled",
            Self::Contained => "contained",
            Self::Referenced => "referenced",
        }
    }
}
impl ::std::fmt::Debug for AggregationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AggregationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AggregationMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AggregationMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AggregationMode> for Coding {
    fn from(code: AggregationMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/resource-aggregation-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AggregationMode> for CodeableConcept {
    fn from(code: AggregationMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AllergyIntoleranceCategory](http://hl7.org/fhir/ValueSet/allergy-intolerance-category)**. Category of an identified substance associated with allergies or intolerances.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AllergyIntoleranceCategory {
    /** **biologic**

Biologic. A preparation that is synthesized from living organisms or their products, especially a human or animal protein, such as a hormone or antitoxin, that is used as a diagnostic, preventive, or therapeutic agent. Examples of biologic medications include: vaccines; allergenic extracts, which are used for both diagnosis and treatment (for example, allergy shots); gene therapies; cellular therapies.  There are other biologic products, such as tissues, which are not typically associated with allergies. */
    Biologic,
    /** **environment**

Environment. Any substances that are encountered in the environment, including any substance not already classified as food, medication, or biologic. */
    Environment,
    /** **food**

Food. Any substance consumed to provide nutritional support for the body. */
    Food,
    /** **medication**

Medication. Substances administered to achieve a physiological effect. */
    Medication,
}
impl ::core::str::FromStr for AllergyIntoleranceCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "biologic" => Ok(Self::Biologic),
            "environment" => Ok(Self::Environment),
            "food" => Ok(Self::Food),
            "medication" => Ok(Self::Medication),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AllergyIntoleranceCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Biologic => "biologic",
            Self::Environment => "environment",
            Self::Food => "food",
            Self::Medication => "medication",
        }
    }
}
impl ::std::fmt::Debug for AllergyIntoleranceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AllergyIntoleranceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AllergyIntoleranceCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AllergyIntoleranceCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AllergyIntoleranceCategory> for Coding {
    fn from(code: AllergyIntoleranceCategory) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/allergy-intolerance-category".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AllergyIntoleranceCategory> for CodeableConcept {
    fn from(code: AllergyIntoleranceCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AllergyIntoleranceCriticality](http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality)**. Estimate of the potential clinical harm, or seriousness, of a reaction to an identified substance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AllergyIntoleranceCriticality {
    /** **high**

High Risk. Worst case result of a future exposure is assessed to be life-threatening or having high potential for organ system failure. */
    High,
    /** **low**

Low Risk. Worst case result of a future exposure is not assessed to be life-threatening or having high potential for organ system failure. */
    Low,
    /** **unable-to-assess**

Unable to Assess Risk. Unable to assess the worst case result of a future exposure. */
    UnableToAssess,
}
impl ::core::str::FromStr for AllergyIntoleranceCriticality {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "high" => Ok(Self::High),
            "low" => Ok(Self::Low),
            "unable-to-assess" => Ok(Self::UnableToAssess),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AllergyIntoleranceCriticality {
    fn as_ref(&self) -> &str {
        match self {
            Self::High => "high",
            Self::Low => "low",
            Self::UnableToAssess => "unable-to-assess",
        }
    }
}
impl ::std::fmt::Debug for AllergyIntoleranceCriticality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AllergyIntoleranceCriticality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AllergyIntoleranceCriticality {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AllergyIntoleranceCriticality {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AllergyIntoleranceCriticality> for Coding {
    fn from(code: AllergyIntoleranceCriticality) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AllergyIntoleranceCriticality> for CodeableConcept {
    fn from(code: AllergyIntoleranceCriticality) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AllergyIntoleranceSeverity](http://hl7.org/fhir/ValueSet/reaction-event-severity)**. Clinical assessment of the severity of a reaction event as a whole, potentially considering multiple different manifestations.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AllergyIntoleranceSeverity {
    /** **mild**

Mild. Causes mild physiological effects. */
    Mild,
    /** **moderate**

Moderate. Causes moderate physiological effects. */
    Moderate,
    /** **severe**

Severe. Causes severe physiological effects. */
    Severe,
}
impl ::core::str::FromStr for AllergyIntoleranceSeverity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "mild" => Ok(Self::Mild),
            "moderate" => Ok(Self::Moderate),
            "severe" => Ok(Self::Severe),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AllergyIntoleranceSeverity {
    fn as_ref(&self) -> &str {
        match self {
            Self::Mild => "mild",
            Self::Moderate => "moderate",
            Self::Severe => "severe",
        }
    }
}
impl ::std::fmt::Debug for AllergyIntoleranceSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AllergyIntoleranceSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AllergyIntoleranceSeverity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AllergyIntoleranceSeverity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AllergyIntoleranceSeverity> for Coding {
    fn from(code: AllergyIntoleranceSeverity) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/reaction-event-severity".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AllergyIntoleranceSeverity> for CodeableConcept {
    fn from(code: AllergyIntoleranceSeverity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AllergyIntoleranceType](http://hl7.org/fhir/ValueSet/allergy-intolerance-type)**. Identification of the underlying physiological mechanism for a Reaction Risk.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AllergyIntoleranceType {
    /** **allergy**

Allergy. A propensity for hypersensitive reaction(s) to a substance.  These reactions are most typically type I hypersensitivity, plus other "allergy-like" reactions, including pseudoallergy. */
    Allergy,
    /** **intolerance**

Intolerance. A propensity for adverse reactions to a substance that is judged to be not allergic or "allergy-like".  These reactions are typically (but not necessarily) non-immune.  They are to some degree idiosyncratic and/or patient-specific (i.e. are not a reaction that is expected to occur with most or all patients given similar circumstances). */
    Intolerance,
}
impl ::core::str::FromStr for AllergyIntoleranceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "allergy" => Ok(Self::Allergy),
            "intolerance" => Ok(Self::Intolerance),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AllergyIntoleranceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Allergy => "allergy",
            Self::Intolerance => "intolerance",
        }
    }
}
impl ::std::fmt::Debug for AllergyIntoleranceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AllergyIntoleranceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AllergyIntoleranceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AllergyIntoleranceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AllergyIntoleranceType> for Coding {
    fn from(code: AllergyIntoleranceType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/allergy-intolerance-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AllergyIntoleranceType> for CodeableConcept {
    fn from(code: AllergyIntoleranceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AnimalTissueType](http://hl7.org/fhir/ValueSet/animal-tissue-type)**. A tissue type of an animal.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AnimalTissueType {
    /** **100000072091**

All relevant tissues. */
    N100000072091,
    /** **100000072092**

Fat. */
    N100000072092,
    /** **100000072093**

Honey. */
    N100000072093,
    /** **100000072094**

Liver. */
    N100000072094,
    /** **100000072095**

Fresh Milk. */
    N100000072095,
    /** **100000072096**

Muscle and skin in natural proportions. */
    N100000072096,
    /** **100000072104**

Eggs. */
    N100000072104,
    /** **100000072105**

Skin and fat. */
    N100000072105,
    /** **100000072106**

Kidney. */
    N100000072106,
    /** **100000072107**

Meat and offal. */
    N100000072107,
    /** **100000072108**

Muscle. */
    N100000072108,
    /** **100000072109**

Unspecified. */
    N100000072109,
    /** **100000111053**

Adipose tissue. */
    N100000111053,
    /** **100000111054**

Adrenal. */
    N100000111054,
    /** **100000111055**

Blood vessels. */
    N100000111055,
    /** **100000111056**

Bone. */
    N100000111056,
    /** **100000111057**

Bone marrow. */
    N100000111057,
    /** **100000111058**

Brain. */
    N100000111058,
    /** **100000111059**

Connective tissue. */
    N100000111059,
    /** **100000111060**

Cornea. */
    N100000111060,
    /** **100000111061**

Dental pulp. */
    N100000111061,
    /** **100000111062**

Duodenum. */
    N100000111062,
    /** **100000111063**

Dura mater. */
    N100000111063,
    /** **100000111064**

Egg, embryonated. */
    N100000111064,
    /** **100000111065**

Egg. */
    N100000111065,
    /** **100000111066**

Egg white. */
    N100000111066,
    /** **100000111067**

Egg yolk. */
    N100000111067,
    /** **100000111068**

Embryos. */
    N100000111068,
    /** **100000111069**

Enteric plexuses. */
    N100000111069,
    /** **100000111070**

Esophagus. */
    N100000111070,
    /** **100000111071**

Feathers. */
    N100000111071,
    /** **100000111072**

Foetus. */
    N100000111072,
    /** **100000111073**

Fore-stomach (ruminants only). */
    N100000111073,
    /** **100000111074**

Gingival tissue. */
    N100000111074,
    /** **100000111075**

Hair. */
    N100000111075,
    /** **100000111076**

Heart/pericardium. */
    N100000111076,
    /** **100000111077**

Hide. */
    N100000111077,
    /** **100000111078**

Hooves. */
    N100000111078,
    /** **100000111079**

Ileum. */
    N100000111079,
    /** **100000111080**

Jejunum. */
    N100000111080,
    /** **100000111081**

Kidney. */
    N100000111081,
    /** **100000111082**

Lard/lard oil. */
    N100000111082,
    /** **100000111083**

Large intestine. */
    N100000111083,
    /** **100000111084**

Liver. */
    N100000111084,
    /** **100000111085**

Lung. */
    N100000111085,
    /** **100000111086**

Lymph nodes. */
    N100000111086,
    /** **100000111087**

Mammary gland. */
    N100000111087,
    /** **100000111088**

Udder. */
    N100000111088,
    /** **100000111089**

Mammary tumour. */
    N100000111089,
    /** **100000111090**

Meat extract. */
    N100000111090,
    /** **100000111091**

Nasopharyngeal. */
    N100000111091,
    /** **100000111092**

Nictitating membrane. */
    N100000111092,
    /** **100000111093**

Nasal mucosa. */
    N100000111093,
    /** **100000111094**

Ovary. */
    N100000111094,
    /** **100000111095**

Pancreas. */
    N100000111095,
    /** **100000111096**

Peripheral nerves. */
    N100000111096,
    /** **100000111097**

Pituitary gland. */
    N100000111097,
    /** **100000111098**

Placenta. */
    N100000111098,
    /** **100000111099**

Prostate. */
    N100000111099,
    /** **100000111100**

Epididymis. */
    N100000111100,
    /** **100000111101**

Seminal vesicle. */
    N100000111101,
    /** **100000111102**

Rennet, calf. */
    N100000111102,
    /** **100000111103**

Retina. */
    N100000111103,
    /** **100000111104**

Optic nerve. */
    N100000111104,
    /** **100000111105**

Salivary gland. */
    N100000111105,
    /** **100000111106**

Shank. */
    N100000111106,
    /** **100000111107**

Skeletal muscle. */
    N100000111107,
    /** **100000111108**

Skin. */
    N100000111108,
    /** **100000111109**

Spinal ganglia. */
    N100000111109,
    /** **100000111110**

Spinal cord. */
    N100000111110,
    /** **100000111111**

Spleen. */
    N100000111111,
    /** **100000111112**

Stomach. */
    N100000111112,
    /** **100000111113**

Abomasum. */
    N100000111113,
    /** **100000111114**

Submaxillary glands. */
    N100000111114,
    /** **100000111115**

Tallow. */
    N100000111115,
    /** **100000111116**

Tendon. */
    N100000111116,
    /** **100000111117**

Testis. */
    N100000111117,
    /** **100000111118**

Thymus. */
    N100000111118,
    /** **100000111119**

Thyroid gland. */
    N100000111119,
    /** **100000111120**

Tongue. */
    N100000111120,
    /** **100000111121**

Tonsil. */
    N100000111121,
    /** **100000111122**

Trachea. */
    N100000111122,
    /** **100000111123**

Trigeminal ganglia. */
    N100000111123,
    /** **100000111124**

Tripe. */
    N100000111124,
    /** **100000111125**

Uterus (Non-gravid). */
    N100000111125,
    /** **100000111126**

Wool. */
    N100000111126,
    /** **100000111127**

Ascites fluid. */
    N100000111127,
    /** **100000111128**

Bile. */
    N100000111128,
    /** **100000111129**

Blood1. */
    N100000111129,
    /** **100000111130**

Blood, foetal. */
    N100000111130,
    /** **100000111131**

Colostrum. */
    N100000111131,
    /** **100000111132**

Cord blood. */
    N100000111132,
    /** **100000111133**

CSF. */
    N100000111133,
    /** **100000111134**

Faeces. */
    N100000111134,
    /** **100000111135**

Milk. */
    N100000111135,
    /** **100000111136**

Nasal mucus. */
    N100000111136,
    /** **100000111137**

Placenta fluids. */
    N100000111137,
    /** **100000111138**

Plasma. */
    N100000111138,
    /** **100000111139**

Saliva. */
    N100000111139,
    /** **100000111140**

Secretion from bees. */
    N100000111140,
    /** **100000111141**

Semen. */
    N100000111141,
    /** **100000111142**

Serum, calf. */
    N100000111142,
    /** **100000111143**

Serum, donor adult bovine. */
    N100000111143,
    /** **100000111144**

Serum, donor calf. */
    N100000111144,
    /** **100000111145**

Serum, foetal bovine. */
    N100000111145,
    /** **100000111146**

Serum, newborn calf. */
    N100000111146,
    /** **100000111147**

Serum/plasma derivate, adult bovine. */
    N100000111147,
    /** **100000111148**

Serum/plasma, adult bovine. */
    N100000111148,
    /** **100000111149**

Sweat. */
    N100000111149,
    /** **100000111150**

Tears. */
    N100000111150,
    /** **100000111151**

Urine. */
    N100000111151,
    /** **100000111152**

Venom. */
    N100000111152,
    /** **100000111153**

Whey. */
    N100000111153,
    /** **100000111154**

Casein. */
    N100000111154,
    /** **100000111155**

Fermentation products. */
    N100000111155,
    /** **100000111156**

Gelatin. */
    N100000111156,
    /** **100000111157**

Lactose. */
    N100000111157,
    /** **100000111158**

Protein. */
    N100000111158,
    /** **100000111159**

Insulin. */
    N100000111159,
    /** **100000111160**

Collagen. */
    N100000111160,
    /** **100000111161**

Animal Charcoal. */
    N100000111161,
    /** **100000111162**

Peptones. */
    N100000111162,
    /** **100000111163**

Fatty acids. */
    N100000111163,
    /** **100000111164**

Glycerol. */
    N100000111164,
    /** **100000125717**

Not applicable. */
    N100000125717,
    /** **100000136180**

Meat and offal, milk. */
    N100000136180,
    /** **100000136181**

Agar blood. */
    N100000136181,
    /** **100000136182**

Casamino acid. */
    N100000136182,
    /** **100000136183**

Casein, hydrolysate. */
    N100000136183,
    /** **100000136184**

Casein, pancreatic digest. */
    N100000136184,
    /** **100000136185**

Casein, peptides N3. */
    N100000136185,
    /** **100000136186**

Cells. */
    N100000136186,
    /** **100000136187**

Cells, BHK21. */
    N100000136187,
    /** **100000136188**

Cells, CHO. */
    N100000136188,
    /** **100000136189**

Cells, CRFK. */
    N100000136189,
    /** **100000136190**

Cells, embryo SPF. */
    N100000136190,
    /** **100000136191**

Cells, IRC5. */
    N100000136191,
    /** **100000136192**

Cells, kidney. */
    N100000136192,
    /** **100000136193**

Cells, MDCK. */
    N100000136193,
    /** **100000136194**

Cells, red blood. */
    N100000136194,
    /** **100000136195**

Collagen, hydrolysate. */
    N100000136195,
    /** **100000136196**

Cholesterol. */
    N100000136196,
    /** **100000136197**

Egg, SPF embryonated. */
    N100000136197,
    /** **100000136198**

Enzyme. */
    N100000136198,
    /** **100000136199**

Enzyme, pancreatic enzymes. */
    N100000136199,
    /** **100000136200**

Enzyme, pancreatin 6NF. */
    N100000136200,
    /** **100000136201**

Enzyme, pepsin. */
    N100000136201,
    /** **100000136202**

Enzyme, pronase. */
    N100000136202,
    /** **100000136203**

Enzyme, trypsin. */
    N100000136203,
    /** **100000136204**

Heart, digest. */
    N100000136204,
    /** **100000136205**

Heart, extract. */
    N100000136205,
    /** **100000136206**

Intestinal mucosae. */
    N100000136206,
    /** **100000136207**

Lactalbumin hydrolysate. */
    N100000136207,
    /** **100000136208**

Liver, digest. */
    N100000136208,
    /** **100000136209**

Lymphocytes. */
    N100000136209,
    /** **100000136210**

Meat. */
    N100000136210,
    /** **100000136211**

Meat, enzymic hydrolysate. */
    N100000136211,
    /** **100000136212**

Medium, cooked meat. */
    N100000136212,
    /** **100000136213**

Medium, F10-199 medium. */
    N100000136213,
    /** **100000136214**

Medium, FMD culture medium. */
    N100000136214,
    /** **100000136215**

Medium, Glasgow MEM culture. */
    N100000136215,
    /** **100000136216**

Medium, LB Agar Lennox. */
    N100000136216,
    /** **100000136217**

Medium, LB Broth Lennox. */
    N100000136217,
    /** **100000136218**

Medium, modified thioglycolate medium. */
    N100000136218,
    /** **100000136219**

Medium, trypticase soy broth. */
    N100000136219,
    /** **100000136220**

Medium, tryptose phosphate broth. */
    N100000136220,
    /** **100000136221**

Milk, skimmed. */
    N100000136221,
    /** **100000136222**

Pancreas, extract. */
    N100000136222,
    /** **100000136223**

Peptones, casein hydrochloric peptone. */
    N100000136223,
    /** **100000136224**

Peptones, casein tryptic peptone. */
    N100000136224,
    /** **100000136225**

Pituitary extract. */
    N100000136225,
    /** **100000136226**

Rennet. */
    N100000136226,
    /** **100000136227**

Medium, nutrient broth. */
    N100000136227,
    /** **100000136228**

Medium, NZ-Amine. */
    N100000136228,
    /** **100000136229**

Medium, thioglycolate medium. */
    N100000136229,
    /** **100000136230**

Peptones, proteose peptone. */
    N100000136230,
    /** **100000136231**

Serum. */
    N100000136231,
    /** **100000136232**

Serum, albumin. */
    N100000136232,
    /** **100000136233**

Serum, Iron fortified calf. */
    N100000136233,
    /** **100000136234**

Skin, connective tissue and bone. */
    N100000136234,
    /** **100000136235**

Sperm. */
    N100000136235,
    /** **100000136236**

Tryptone. */
    N100000136236,
    /** **100000136237**

Meat, extract desiccated. */
    N100000136237,
    /** **100000136247**

Stomach mucosa. */
    N100000136247,
    /** **100000136248**

Transferin. */
    N100000136248,
    /** **100000136554**

Non-neural. */
    N100000136554,
    /** **100000136555**

Not specified. */
    N100000136555,
    /** **100000136556**

Organ tissue. */
    N100000136556,
    /** **100000142485**

Skin and fat in natural proportions. */
    N100000142485,
}
impl ::core::str::FromStr for AnimalTissueType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000072091" => Ok(Self::N100000072091),
            "100000072092" => Ok(Self::N100000072092),
            "100000072093" => Ok(Self::N100000072093),
            "100000072094" => Ok(Self::N100000072094),
            "100000072095" => Ok(Self::N100000072095),
            "100000072096" => Ok(Self::N100000072096),
            "100000072104" => Ok(Self::N100000072104),
            "100000072105" => Ok(Self::N100000072105),
            "100000072106" => Ok(Self::N100000072106),
            "100000072107" => Ok(Self::N100000072107),
            "100000072108" => Ok(Self::N100000072108),
            "100000072109" => Ok(Self::N100000072109),
            "100000111053" => Ok(Self::N100000111053),
            "100000111054" => Ok(Self::N100000111054),
            "100000111055" => Ok(Self::N100000111055),
            "100000111056" => Ok(Self::N100000111056),
            "100000111057" => Ok(Self::N100000111057),
            "100000111058" => Ok(Self::N100000111058),
            "100000111059" => Ok(Self::N100000111059),
            "100000111060" => Ok(Self::N100000111060),
            "100000111061" => Ok(Self::N100000111061),
            "100000111062" => Ok(Self::N100000111062),
            "100000111063" => Ok(Self::N100000111063),
            "100000111064" => Ok(Self::N100000111064),
            "100000111065" => Ok(Self::N100000111065),
            "100000111066" => Ok(Self::N100000111066),
            "100000111067" => Ok(Self::N100000111067),
            "100000111068" => Ok(Self::N100000111068),
            "100000111069" => Ok(Self::N100000111069),
            "100000111070" => Ok(Self::N100000111070),
            "100000111071" => Ok(Self::N100000111071),
            "100000111072" => Ok(Self::N100000111072),
            "100000111073" => Ok(Self::N100000111073),
            "100000111074" => Ok(Self::N100000111074),
            "100000111075" => Ok(Self::N100000111075),
            "100000111076" => Ok(Self::N100000111076),
            "100000111077" => Ok(Self::N100000111077),
            "100000111078" => Ok(Self::N100000111078),
            "100000111079" => Ok(Self::N100000111079),
            "100000111080" => Ok(Self::N100000111080),
            "100000111081" => Ok(Self::N100000111081),
            "100000111082" => Ok(Self::N100000111082),
            "100000111083" => Ok(Self::N100000111083),
            "100000111084" => Ok(Self::N100000111084),
            "100000111085" => Ok(Self::N100000111085),
            "100000111086" => Ok(Self::N100000111086),
            "100000111087" => Ok(Self::N100000111087),
            "100000111088" => Ok(Self::N100000111088),
            "100000111089" => Ok(Self::N100000111089),
            "100000111090" => Ok(Self::N100000111090),
            "100000111091" => Ok(Self::N100000111091),
            "100000111092" => Ok(Self::N100000111092),
            "100000111093" => Ok(Self::N100000111093),
            "100000111094" => Ok(Self::N100000111094),
            "100000111095" => Ok(Self::N100000111095),
            "100000111096" => Ok(Self::N100000111096),
            "100000111097" => Ok(Self::N100000111097),
            "100000111098" => Ok(Self::N100000111098),
            "100000111099" => Ok(Self::N100000111099),
            "100000111100" => Ok(Self::N100000111100),
            "100000111101" => Ok(Self::N100000111101),
            "100000111102" => Ok(Self::N100000111102),
            "100000111103" => Ok(Self::N100000111103),
            "100000111104" => Ok(Self::N100000111104),
            "100000111105" => Ok(Self::N100000111105),
            "100000111106" => Ok(Self::N100000111106),
            "100000111107" => Ok(Self::N100000111107),
            "100000111108" => Ok(Self::N100000111108),
            "100000111109" => Ok(Self::N100000111109),
            "100000111110" => Ok(Self::N100000111110),
            "100000111111" => Ok(Self::N100000111111),
            "100000111112" => Ok(Self::N100000111112),
            "100000111113" => Ok(Self::N100000111113),
            "100000111114" => Ok(Self::N100000111114),
            "100000111115" => Ok(Self::N100000111115),
            "100000111116" => Ok(Self::N100000111116),
            "100000111117" => Ok(Self::N100000111117),
            "100000111118" => Ok(Self::N100000111118),
            "100000111119" => Ok(Self::N100000111119),
            "100000111120" => Ok(Self::N100000111120),
            "100000111121" => Ok(Self::N100000111121),
            "100000111122" => Ok(Self::N100000111122),
            "100000111123" => Ok(Self::N100000111123),
            "100000111124" => Ok(Self::N100000111124),
            "100000111125" => Ok(Self::N100000111125),
            "100000111126" => Ok(Self::N100000111126),
            "100000111127" => Ok(Self::N100000111127),
            "100000111128" => Ok(Self::N100000111128),
            "100000111129" => Ok(Self::N100000111129),
            "100000111130" => Ok(Self::N100000111130),
            "100000111131" => Ok(Self::N100000111131),
            "100000111132" => Ok(Self::N100000111132),
            "100000111133" => Ok(Self::N100000111133),
            "100000111134" => Ok(Self::N100000111134),
            "100000111135" => Ok(Self::N100000111135),
            "100000111136" => Ok(Self::N100000111136),
            "100000111137" => Ok(Self::N100000111137),
            "100000111138" => Ok(Self::N100000111138),
            "100000111139" => Ok(Self::N100000111139),
            "100000111140" => Ok(Self::N100000111140),
            "100000111141" => Ok(Self::N100000111141),
            "100000111142" => Ok(Self::N100000111142),
            "100000111143" => Ok(Self::N100000111143),
            "100000111144" => Ok(Self::N100000111144),
            "100000111145" => Ok(Self::N100000111145),
            "100000111146" => Ok(Self::N100000111146),
            "100000111147" => Ok(Self::N100000111147),
            "100000111148" => Ok(Self::N100000111148),
            "100000111149" => Ok(Self::N100000111149),
            "100000111150" => Ok(Self::N100000111150),
            "100000111151" => Ok(Self::N100000111151),
            "100000111152" => Ok(Self::N100000111152),
            "100000111153" => Ok(Self::N100000111153),
            "100000111154" => Ok(Self::N100000111154),
            "100000111155" => Ok(Self::N100000111155),
            "100000111156" => Ok(Self::N100000111156),
            "100000111157" => Ok(Self::N100000111157),
            "100000111158" => Ok(Self::N100000111158),
            "100000111159" => Ok(Self::N100000111159),
            "100000111160" => Ok(Self::N100000111160),
            "100000111161" => Ok(Self::N100000111161),
            "100000111162" => Ok(Self::N100000111162),
            "100000111163" => Ok(Self::N100000111163),
            "100000111164" => Ok(Self::N100000111164),
            "100000125717" => Ok(Self::N100000125717),
            "100000136180" => Ok(Self::N100000136180),
            "100000136181" => Ok(Self::N100000136181),
            "100000136182" => Ok(Self::N100000136182),
            "100000136183" => Ok(Self::N100000136183),
            "100000136184" => Ok(Self::N100000136184),
            "100000136185" => Ok(Self::N100000136185),
            "100000136186" => Ok(Self::N100000136186),
            "100000136187" => Ok(Self::N100000136187),
            "100000136188" => Ok(Self::N100000136188),
            "100000136189" => Ok(Self::N100000136189),
            "100000136190" => Ok(Self::N100000136190),
            "100000136191" => Ok(Self::N100000136191),
            "100000136192" => Ok(Self::N100000136192),
            "100000136193" => Ok(Self::N100000136193),
            "100000136194" => Ok(Self::N100000136194),
            "100000136195" => Ok(Self::N100000136195),
            "100000136196" => Ok(Self::N100000136196),
            "100000136197" => Ok(Self::N100000136197),
            "100000136198" => Ok(Self::N100000136198),
            "100000136199" => Ok(Self::N100000136199),
            "100000136200" => Ok(Self::N100000136200),
            "100000136201" => Ok(Self::N100000136201),
            "100000136202" => Ok(Self::N100000136202),
            "100000136203" => Ok(Self::N100000136203),
            "100000136204" => Ok(Self::N100000136204),
            "100000136205" => Ok(Self::N100000136205),
            "100000136206" => Ok(Self::N100000136206),
            "100000136207" => Ok(Self::N100000136207),
            "100000136208" => Ok(Self::N100000136208),
            "100000136209" => Ok(Self::N100000136209),
            "100000136210" => Ok(Self::N100000136210),
            "100000136211" => Ok(Self::N100000136211),
            "100000136212" => Ok(Self::N100000136212),
            "100000136213" => Ok(Self::N100000136213),
            "100000136214" => Ok(Self::N100000136214),
            "100000136215" => Ok(Self::N100000136215),
            "100000136216" => Ok(Self::N100000136216),
            "100000136217" => Ok(Self::N100000136217),
            "100000136218" => Ok(Self::N100000136218),
            "100000136219" => Ok(Self::N100000136219),
            "100000136220" => Ok(Self::N100000136220),
            "100000136221" => Ok(Self::N100000136221),
            "100000136222" => Ok(Self::N100000136222),
            "100000136223" => Ok(Self::N100000136223),
            "100000136224" => Ok(Self::N100000136224),
            "100000136225" => Ok(Self::N100000136225),
            "100000136226" => Ok(Self::N100000136226),
            "100000136227" => Ok(Self::N100000136227),
            "100000136228" => Ok(Self::N100000136228),
            "100000136229" => Ok(Self::N100000136229),
            "100000136230" => Ok(Self::N100000136230),
            "100000136231" => Ok(Self::N100000136231),
            "100000136232" => Ok(Self::N100000136232),
            "100000136233" => Ok(Self::N100000136233),
            "100000136234" => Ok(Self::N100000136234),
            "100000136235" => Ok(Self::N100000136235),
            "100000136236" => Ok(Self::N100000136236),
            "100000136237" => Ok(Self::N100000136237),
            "100000136247" => Ok(Self::N100000136247),
            "100000136248" => Ok(Self::N100000136248),
            "100000136554" => Ok(Self::N100000136554),
            "100000136555" => Ok(Self::N100000136555),
            "100000136556" => Ok(Self::N100000136556),
            "100000142485" => Ok(Self::N100000142485),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AnimalTissueType {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000072091 => "100000072091",
            Self::N100000072092 => "100000072092",
            Self::N100000072093 => "100000072093",
            Self::N100000072094 => "100000072094",
            Self::N100000072095 => "100000072095",
            Self::N100000072096 => "100000072096",
            Self::N100000072104 => "100000072104",
            Self::N100000072105 => "100000072105",
            Self::N100000072106 => "100000072106",
            Self::N100000072107 => "100000072107",
            Self::N100000072108 => "100000072108",
            Self::N100000072109 => "100000072109",
            Self::N100000111053 => "100000111053",
            Self::N100000111054 => "100000111054",
            Self::N100000111055 => "100000111055",
            Self::N100000111056 => "100000111056",
            Self::N100000111057 => "100000111057",
            Self::N100000111058 => "100000111058",
            Self::N100000111059 => "100000111059",
            Self::N100000111060 => "100000111060",
            Self::N100000111061 => "100000111061",
            Self::N100000111062 => "100000111062",
            Self::N100000111063 => "100000111063",
            Self::N100000111064 => "100000111064",
            Self::N100000111065 => "100000111065",
            Self::N100000111066 => "100000111066",
            Self::N100000111067 => "100000111067",
            Self::N100000111068 => "100000111068",
            Self::N100000111069 => "100000111069",
            Self::N100000111070 => "100000111070",
            Self::N100000111071 => "100000111071",
            Self::N100000111072 => "100000111072",
            Self::N100000111073 => "100000111073",
            Self::N100000111074 => "100000111074",
            Self::N100000111075 => "100000111075",
            Self::N100000111076 => "100000111076",
            Self::N100000111077 => "100000111077",
            Self::N100000111078 => "100000111078",
            Self::N100000111079 => "100000111079",
            Self::N100000111080 => "100000111080",
            Self::N100000111081 => "100000111081",
            Self::N100000111082 => "100000111082",
            Self::N100000111083 => "100000111083",
            Self::N100000111084 => "100000111084",
            Self::N100000111085 => "100000111085",
            Self::N100000111086 => "100000111086",
            Self::N100000111087 => "100000111087",
            Self::N100000111088 => "100000111088",
            Self::N100000111089 => "100000111089",
            Self::N100000111090 => "100000111090",
            Self::N100000111091 => "100000111091",
            Self::N100000111092 => "100000111092",
            Self::N100000111093 => "100000111093",
            Self::N100000111094 => "100000111094",
            Self::N100000111095 => "100000111095",
            Self::N100000111096 => "100000111096",
            Self::N100000111097 => "100000111097",
            Self::N100000111098 => "100000111098",
            Self::N100000111099 => "100000111099",
            Self::N100000111100 => "100000111100",
            Self::N100000111101 => "100000111101",
            Self::N100000111102 => "100000111102",
            Self::N100000111103 => "100000111103",
            Self::N100000111104 => "100000111104",
            Self::N100000111105 => "100000111105",
            Self::N100000111106 => "100000111106",
            Self::N100000111107 => "100000111107",
            Self::N100000111108 => "100000111108",
            Self::N100000111109 => "100000111109",
            Self::N100000111110 => "100000111110",
            Self::N100000111111 => "100000111111",
            Self::N100000111112 => "100000111112",
            Self::N100000111113 => "100000111113",
            Self::N100000111114 => "100000111114",
            Self::N100000111115 => "100000111115",
            Self::N100000111116 => "100000111116",
            Self::N100000111117 => "100000111117",
            Self::N100000111118 => "100000111118",
            Self::N100000111119 => "100000111119",
            Self::N100000111120 => "100000111120",
            Self::N100000111121 => "100000111121",
            Self::N100000111122 => "100000111122",
            Self::N100000111123 => "100000111123",
            Self::N100000111124 => "100000111124",
            Self::N100000111125 => "100000111125",
            Self::N100000111126 => "100000111126",
            Self::N100000111127 => "100000111127",
            Self::N100000111128 => "100000111128",
            Self::N100000111129 => "100000111129",
            Self::N100000111130 => "100000111130",
            Self::N100000111131 => "100000111131",
            Self::N100000111132 => "100000111132",
            Self::N100000111133 => "100000111133",
            Self::N100000111134 => "100000111134",
            Self::N100000111135 => "100000111135",
            Self::N100000111136 => "100000111136",
            Self::N100000111137 => "100000111137",
            Self::N100000111138 => "100000111138",
            Self::N100000111139 => "100000111139",
            Self::N100000111140 => "100000111140",
            Self::N100000111141 => "100000111141",
            Self::N100000111142 => "100000111142",
            Self::N100000111143 => "100000111143",
            Self::N100000111144 => "100000111144",
            Self::N100000111145 => "100000111145",
            Self::N100000111146 => "100000111146",
            Self::N100000111147 => "100000111147",
            Self::N100000111148 => "100000111148",
            Self::N100000111149 => "100000111149",
            Self::N100000111150 => "100000111150",
            Self::N100000111151 => "100000111151",
            Self::N100000111152 => "100000111152",
            Self::N100000111153 => "100000111153",
            Self::N100000111154 => "100000111154",
            Self::N100000111155 => "100000111155",
            Self::N100000111156 => "100000111156",
            Self::N100000111157 => "100000111157",
            Self::N100000111158 => "100000111158",
            Self::N100000111159 => "100000111159",
            Self::N100000111160 => "100000111160",
            Self::N100000111161 => "100000111161",
            Self::N100000111162 => "100000111162",
            Self::N100000111163 => "100000111163",
            Self::N100000111164 => "100000111164",
            Self::N100000125717 => "100000125717",
            Self::N100000136180 => "100000136180",
            Self::N100000136181 => "100000136181",
            Self::N100000136182 => "100000136182",
            Self::N100000136183 => "100000136183",
            Self::N100000136184 => "100000136184",
            Self::N100000136185 => "100000136185",
            Self::N100000136186 => "100000136186",
            Self::N100000136187 => "100000136187",
            Self::N100000136188 => "100000136188",
            Self::N100000136189 => "100000136189",
            Self::N100000136190 => "100000136190",
            Self::N100000136191 => "100000136191",
            Self::N100000136192 => "100000136192",
            Self::N100000136193 => "100000136193",
            Self::N100000136194 => "100000136194",
            Self::N100000136195 => "100000136195",
            Self::N100000136196 => "100000136196",
            Self::N100000136197 => "100000136197",
            Self::N100000136198 => "100000136198",
            Self::N100000136199 => "100000136199",
            Self::N100000136200 => "100000136200",
            Self::N100000136201 => "100000136201",
            Self::N100000136202 => "100000136202",
            Self::N100000136203 => "100000136203",
            Self::N100000136204 => "100000136204",
            Self::N100000136205 => "100000136205",
            Self::N100000136206 => "100000136206",
            Self::N100000136207 => "100000136207",
            Self::N100000136208 => "100000136208",
            Self::N100000136209 => "100000136209",
            Self::N100000136210 => "100000136210",
            Self::N100000136211 => "100000136211",
            Self::N100000136212 => "100000136212",
            Self::N100000136213 => "100000136213",
            Self::N100000136214 => "100000136214",
            Self::N100000136215 => "100000136215",
            Self::N100000136216 => "100000136216",
            Self::N100000136217 => "100000136217",
            Self::N100000136218 => "100000136218",
            Self::N100000136219 => "100000136219",
            Self::N100000136220 => "100000136220",
            Self::N100000136221 => "100000136221",
            Self::N100000136222 => "100000136222",
            Self::N100000136223 => "100000136223",
            Self::N100000136224 => "100000136224",
            Self::N100000136225 => "100000136225",
            Self::N100000136226 => "100000136226",
            Self::N100000136227 => "100000136227",
            Self::N100000136228 => "100000136228",
            Self::N100000136229 => "100000136229",
            Self::N100000136230 => "100000136230",
            Self::N100000136231 => "100000136231",
            Self::N100000136232 => "100000136232",
            Self::N100000136233 => "100000136233",
            Self::N100000136234 => "100000136234",
            Self::N100000136235 => "100000136235",
            Self::N100000136236 => "100000136236",
            Self::N100000136237 => "100000136237",
            Self::N100000136247 => "100000136247",
            Self::N100000136248 => "100000136248",
            Self::N100000136554 => "100000136554",
            Self::N100000136555 => "100000136555",
            Self::N100000136556 => "100000136556",
            Self::N100000142485 => "100000142485",
        }
    }
}
impl ::std::fmt::Debug for AnimalTissueType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AnimalTissueType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AnimalTissueType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AnimalTissueType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AnimalTissueType> for Coding {
    fn from(code: AnimalTissueType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/animal-tissue-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AnimalTissueType> for CodeableConcept {
    fn from(code: AnimalTissueType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AppointmentStatus](http://hl7.org/fhir/ValueSet/appointmentstatus)**. The free/busy status of an appointment.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AppointmentStatus {
    /** **arrived**

Arrived. The patient/patients has/have arrived and is/are waiting to be seen. */
    Arrived,
    /** **booked**

Booked. All participant(s) have been considered and the appointment is confirmed to go ahead at the date/times specified. */
    Booked,
    /** **cancelled**

Cancelled. The appointment has been cancelled. */
    Cancelled,
    /** **checked-in**

Checked In. When checked in, all pre-encounter administrative work is complete, and the encounter may begin. (where multiple patients are involved, they are all present). */
    CheckedIn,
    /** **entered-in-error**

Entered in error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **fulfilled**

Fulfilled. The planning stages of the appointment are now complete, the encounter resource will exist and will track further status changes. Note that an encounter may exist before the appointment status is fulfilled for many reasons. */
    Fulfilled,
    /** **noshow**

No Show. Some or all of the participant(s) have not/did not appear for the appointment (usually the patient). */
    Noshow,
    /** **pending**

Pending. Some or all of the participant(s) have not finalized their acceptance of the appointment request. */
    Pending,
    /** **proposed**

Proposed. None of the participant(s) have finalized their acceptance of the appointment request, and the start/end time might not be set yet. */
    Proposed,
    /** **waitlist**

Waitlisted. The appointment has been placed on a waitlist, to be scheduled/confirmed in the future when a slot/service is available.
A specific time might or might not be pre-allocated. */
    Waitlist,
}
impl ::core::str::FromStr for AppointmentStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "arrived" => Ok(Self::Arrived),
            "booked" => Ok(Self::Booked),
            "cancelled" => Ok(Self::Cancelled),
            "checked-in" => Ok(Self::CheckedIn),
            "entered-in-error" => Ok(Self::EnteredInError),
            "fulfilled" => Ok(Self::Fulfilled),
            "noshow" => Ok(Self::Noshow),
            "pending" => Ok(Self::Pending),
            "proposed" => Ok(Self::Proposed),
            "waitlist" => Ok(Self::Waitlist),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AppointmentStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Arrived => "arrived",
            Self::Booked => "booked",
            Self::Cancelled => "cancelled",
            Self::CheckedIn => "checked-in",
            Self::EnteredInError => "entered-in-error",
            Self::Fulfilled => "fulfilled",
            Self::Noshow => "noshow",
            Self::Pending => "pending",
            Self::Proposed => "proposed",
            Self::Waitlist => "waitlist",
        }
    }
}
impl ::std::fmt::Debug for AppointmentStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AppointmentStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AppointmentStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AppointmentStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AppointmentStatus> for Coding {
    fn from(code: AppointmentStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/appointmentstatus".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AppointmentStatus> for CodeableConcept {
    fn from(code: AppointmentStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactAssessmentDisposition](http://hl7.org/fhir/ValueSet/artifactassessment-disposition)**. Possible values for the disposition of a comment or change request, typically used for comments and change requests, to indicate the disposition of the responsible party towards the changes suggested by the comment or change request.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactAssessmentDisposition {
    /** **not-persuasive**

Not Persuasive. The comment is not persuasive (rejected in full) */
    NotPersuasive,
    /** **not-persuasive-with-modification**

Not Persuasive with Modification. The comment is not persuasive with modification (partially rejected) */
    NotPersuasiveWithModification,
    /** **persuasive**

Persuasive. The comment is persuasive (accepted in full) */
    Persuasive,
    /** **persuasive-with-modification**

Persuasive with Modification. The comment is persuasive with modification (partially accepted) */
    PersuasiveWithModification,
    /** **unresolved**

Unresolved. The comment is unresolved */
    Unresolved,
}
impl ::core::str::FromStr for ArtifactAssessmentDisposition {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "not-persuasive" => Ok(Self::NotPersuasive),
            "not-persuasive-with-modification" => Ok(Self::NotPersuasiveWithModification),
            "persuasive" => Ok(Self::Persuasive),
            "persuasive-with-modification" => Ok(Self::PersuasiveWithModification),
            "unresolved" => Ok(Self::Unresolved),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactAssessmentDisposition {
    fn as_ref(&self) -> &str {
        match self {
            Self::NotPersuasive => "not-persuasive",
            Self::NotPersuasiveWithModification => "not-persuasive-with-modification",
            Self::Persuasive => "persuasive",
            Self::PersuasiveWithModification => "persuasive-with-modification",
            Self::Unresolved => "unresolved",
        }
    }
}
impl ::std::fmt::Debug for ArtifactAssessmentDisposition {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactAssessmentDisposition {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactAssessmentDisposition {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactAssessmentDisposition {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactAssessmentDisposition> for Coding {
    fn from(code: ArtifactAssessmentDisposition) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifactassessment-disposition".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactAssessmentDisposition> for CodeableConcept {
    fn from(code: ArtifactAssessmentDisposition) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactAssessmentInformationType](http://hl7.org/fhir/ValueSet/artifactassessment-information-type)**. The type of information contained in a component of an artifact assessment.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactAssessmentInformationType {
    /** **change-request**

Change Request. A change request for the artifact */
    ChangeRequest,
    /** **classifier**

Classifier. A classifier of the artifact */
    Classifier,
    /** **comment**

Comment. A comment on the artifact */
    Comment,
    /** **container**

Container. A container for multiple components */
    Container,
    /** **rating**

Rating. A rating of the artifact */
    Rating,
    /** **response**

Response. A response to a comment */
    Response,
}
impl ::core::str::FromStr for ArtifactAssessmentInformationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "change-request" => Ok(Self::ChangeRequest),
            "classifier" => Ok(Self::Classifier),
            "comment" => Ok(Self::Comment),
            "container" => Ok(Self::Container),
            "rating" => Ok(Self::Rating),
            "response" => Ok(Self::Response),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactAssessmentInformationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ChangeRequest => "change-request",
            Self::Classifier => "classifier",
            Self::Comment => "comment",
            Self::Container => "container",
            Self::Rating => "rating",
            Self::Response => "response",
        }
    }
}
impl ::std::fmt::Debug for ArtifactAssessmentInformationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactAssessmentInformationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactAssessmentInformationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactAssessmentInformationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactAssessmentInformationType> for Coding {
    fn from(code: ArtifactAssessmentInformationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifactassessment-information-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactAssessmentInformationType> for CodeableConcept {
    fn from(code: ArtifactAssessmentInformationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactAssessmentWorkflowStatus](http://hl7.org/fhir/ValueSet/artifactassessment-workflow-status)**. Possible values for the workflow status of the comment or assessment, typically used to coordinate workflow around the process of accepting and rejecting changes and comments on the artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactAssessmentWorkflowStatus {
    /** **applied**

Applied. The comment is resolved and any necessary changes have been applied */
    Applied,
    /** **deferred**

Deferred. The comment is acceptable, but resolution of the comment and application of any associated changes have been deferred */
    Deferred,
    /** **duplicate**

Duplicate. The comment is a duplicate of another comment already received */
    Duplicate,
    /** **entered-in-error**

Entered in Error. The assessment was entered in error */
    EnteredInError,
    /** **published**

Published. The necessary changes to the artifact have been published in a new version of the artifact */
    Published,
    /** **resolved-change-required**

Resolved - Change Required. The comment has been resolved and changes are required to address the comment */
    ResolvedChangeRequired,
    /** **resolved-no-change**

Resolved - No Change. The comment has been resolved and no changes resulted from the resolution */
    ResolvedNoChange,
    /** **submitted**

Submitted. The comment has been submitted, but the responsible party has not yet been determined, or the responsible party has not yet determined the next steps to be taken. */
    Submitted,
    /** **triaged**

Triaged. The comment has been triaged, meaning the responsible party has been determined and next steps have been identified to address the comment. */
    Triaged,
    /** **waiting-for-input**

Waiting for Input. The comment is waiting for input from a specific party before next steps can be taken. */
    WaitingForInput,
}
impl ::core::str::FromStr for ArtifactAssessmentWorkflowStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "applied" => Ok(Self::Applied),
            "deferred" => Ok(Self::Deferred),
            "duplicate" => Ok(Self::Duplicate),
            "entered-in-error" => Ok(Self::EnteredInError),
            "published" => Ok(Self::Published),
            "resolved-change-required" => Ok(Self::ResolvedChangeRequired),
            "resolved-no-change" => Ok(Self::ResolvedNoChange),
            "submitted" => Ok(Self::Submitted),
            "triaged" => Ok(Self::Triaged),
            "waiting-for-input" => Ok(Self::WaitingForInput),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactAssessmentWorkflowStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Applied => "applied",
            Self::Deferred => "deferred",
            Self::Duplicate => "duplicate",
            Self::EnteredInError => "entered-in-error",
            Self::Published => "published",
            Self::ResolvedChangeRequired => "resolved-change-required",
            Self::ResolvedNoChange => "resolved-no-change",
            Self::Submitted => "submitted",
            Self::Triaged => "triaged",
            Self::WaitingForInput => "waiting-for-input",
        }
    }
}
impl ::std::fmt::Debug for ArtifactAssessmentWorkflowStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactAssessmentWorkflowStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactAssessmentWorkflowStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactAssessmentWorkflowStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactAssessmentWorkflowStatus> for Coding {
    fn from(code: ArtifactAssessmentWorkflowStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifactassessment-workflow-status"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactAssessmentWorkflowStatus> for CodeableConcept {
    fn from(code: ArtifactAssessmentWorkflowStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactContributionInstanceType](http://hl7.org/fhir/ValueSet/artifact-contribution-instance-type)**. Artifact Contribution Instance Type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactContributionInstanceType {
    /** **approved**

Approved. Approved */
    Approved,
    /** **edited**

Edited. Edited */
    Edited,
    /** **reviewed**

Reviewed. Reviewed */
    Reviewed,
}
impl ::core::str::FromStr for ArtifactContributionInstanceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "approved" => Ok(Self::Approved),
            "edited" => Ok(Self::Edited),
            "reviewed" => Ok(Self::Reviewed),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactContributionInstanceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Approved => "approved",
            Self::Edited => "edited",
            Self::Reviewed => "reviewed",
        }
    }
}
impl ::std::fmt::Debug for ArtifactContributionInstanceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactContributionInstanceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactContributionInstanceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactContributionInstanceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactContributionInstanceType> for Coding {
    fn from(code: ArtifactContributionInstanceType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifact-contribution-instance-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactContributionInstanceType> for CodeableConcept {
    fn from(code: ArtifactContributionInstanceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactContributionType](http://hl7.org/fhir/ValueSet/artifact-contribution-type)**. Citation contribution.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactContributionType {
    /** **conceptualization**

Conceptualization. Conceptualization (see https://jats4r.org/credit-taxonomy). */
    Conceptualization,
    /** **data-curation**

Data curation. Data curation (see https://jats4r.org/credit-taxonomy). */
    DataCuration,
    /** **formal-analysis**

Formal analysis. Formal analysis (see https://jats4r.org/credit-taxonomy). */
    FormalAnalysis,
    /** **funding-acquisition**

Funding acquisition. Funding acquisition (see https://jats4r.org/credit-taxonomy). */
    FundingAcquisition,
    /** **investigation**

Investigation. Investigation (see https://jats4r.org/credit-taxonomy). */
    Investigation,
    /** **methodology**

Methodology. Methodology (see https://jats4r.org/credit-taxonomy). */
    Methodology,
    /** **project-administration**

Project administration. Project administration (see https://jats4r.org/credit-taxonomy). */
    ProjectAdministration,
    /** **resources**

Resources. Resources (see https://jats4r.org/credit-taxonomy). */
    Resources,
    /** **software**

Software. Software (see https://jats4r.org/credit-taxonomy). */
    Software,
    /** **supervision**

Supervision. Supervision (see https://jats4r.org/credit-taxonomy). */
    Supervision,
    /** **validation**

Validation. Validation (see https://jats4r.org/credit-taxonomy). */
    Validation,
    /** **visualization**

Visualization. Visualization (see https://jats4r.org/credit-taxonomy). */
    Visualization,
    /** **writing-original-draft**

Writing - original draft. Writing - original draft (see https://jats4r.org/credit-taxonomy). */
    WritingOriginalDraft,
    /** **writing-review-editing**

Writing - review & editing. Writing - review & editing (see https://jats4r.org/credit-taxonomy). */
    WritingReviewEditing,
}
impl ::core::str::FromStr for ArtifactContributionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "conceptualization" => Ok(Self::Conceptualization),
            "data-curation" => Ok(Self::DataCuration),
            "formal-analysis" => Ok(Self::FormalAnalysis),
            "funding-acquisition" => Ok(Self::FundingAcquisition),
            "investigation" => Ok(Self::Investigation),
            "methodology" => Ok(Self::Methodology),
            "project-administration" => Ok(Self::ProjectAdministration),
            "resources" => Ok(Self::Resources),
            "software" => Ok(Self::Software),
            "supervision" => Ok(Self::Supervision),
            "validation" => Ok(Self::Validation),
            "visualization" => Ok(Self::Visualization),
            "writing-original-draft" => Ok(Self::WritingOriginalDraft),
            "writing-review-editing" => Ok(Self::WritingReviewEditing),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactContributionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Conceptualization => "conceptualization",
            Self::DataCuration => "data-curation",
            Self::FormalAnalysis => "formal-analysis",
            Self::FundingAcquisition => "funding-acquisition",
            Self::Investigation => "investigation",
            Self::Methodology => "methodology",
            Self::ProjectAdministration => "project-administration",
            Self::Resources => "resources",
            Self::Software => "software",
            Self::Supervision => "supervision",
            Self::Validation => "validation",
            Self::Visualization => "visualization",
            Self::WritingOriginalDraft => "writing-original-draft",
            Self::WritingReviewEditing => "writing-review-editing",
        }
    }
}
impl ::std::fmt::Debug for ArtifactContributionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactContributionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactContributionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactContributionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactContributionType> for Coding {
    fn from(code: ArtifactContributionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifact-contribution-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactContributionType> for CodeableConcept {
    fn from(code: ArtifactContributionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ArtifactUrlClassifier](http://hl7.org/fhir/ValueSet/artifact-url-classifier)**. Code the reason for different URLs, eg abstract and full-text.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ArtifactUrlClassifier {
    /** **abstract**

Abstract. The URL will reach a brief summary for the article. */
    Abstract,
    /** **code-repository**

Code repository. File archive and web hosting facility for source code of software, documentation, web pages, and other works. */
    CodeRepository,
    /** **compressed-file**

Compressed file. Compressed archive file (e.g. a zip file) that contains multiple files */
    CompressedFile,
    /** **computable-resource**

Computable resource. The URL will reach content that is machine-interpretable. */
    ComputableResource,
    /** **doi-based**

DOI Based. The URL is derived from the Digital Object Identifier (DOI). */
    DoiBased,
    /** **file-directory**

File directory. The URL will reach a file directory. */
    FileDirectory,
    /** **full-text**

Full-Text. The URL will reach the full-text of the article. */
    FullText,
    /** **json**

JSON. The URL will reach content in JSON format. */
    Json,
    /** **not-specified**

Not Specified. Used when URL classifier is not specified but expected in a system. */
    NotSpecified,
    /** **pdf**

PDF. The URL will reach content in PDF form. */
    Pdf,
    /** **restricted**

Restricted. The URL content has restricted access (e.g. subcription required). */
    Restricted,
    /** **supplement**

Supplement. The URL will reach a supplement, appendix, or additional supporting information for the article. */
    Supplement,
    /** **version-specific**

Version Specific. The URL will reach content that is a specific version of the article. */
    VersionSpecific,
    /** **webpage**

Webpage. The URL will reach a webpage related to the article, where the content is not easily classified as abstract, full-text or supplement. */
    Webpage,
    /** **xml**

XML. The URL will reach content in XML format. */
    Xml,
}
impl ::core::str::FromStr for ArtifactUrlClassifier {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abstract" => Ok(Self::Abstract),
            "code-repository" => Ok(Self::CodeRepository),
            "compressed-file" => Ok(Self::CompressedFile),
            "computable-resource" => Ok(Self::ComputableResource),
            "doi-based" => Ok(Self::DoiBased),
            "file-directory" => Ok(Self::FileDirectory),
            "full-text" => Ok(Self::FullText),
            "json" => Ok(Self::Json),
            "not-specified" => Ok(Self::NotSpecified),
            "pdf" => Ok(Self::Pdf),
            "restricted" => Ok(Self::Restricted),
            "supplement" => Ok(Self::Supplement),
            "version-specific" => Ok(Self::VersionSpecific),
            "webpage" => Ok(Self::Webpage),
            "xml" => Ok(Self::Xml),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ArtifactUrlClassifier {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abstract => "abstract",
            Self::CodeRepository => "code-repository",
            Self::CompressedFile => "compressed-file",
            Self::ComputableResource => "computable-resource",
            Self::DoiBased => "doi-based",
            Self::FileDirectory => "file-directory",
            Self::FullText => "full-text",
            Self::Json => "json",
            Self::NotSpecified => "not-specified",
            Self::Pdf => "pdf",
            Self::Restricted => "restricted",
            Self::Supplement => "supplement",
            Self::VersionSpecific => "version-specific",
            Self::Webpage => "webpage",
            Self::Xml => "xml",
        }
    }
}
impl ::std::fmt::Debug for ArtifactUrlClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ArtifactUrlClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ArtifactUrlClassifier {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ArtifactUrlClassifier {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ArtifactUrlClassifier> for Coding {
    fn from(code: ArtifactUrlClassifier) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/artifact-url-classifier".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ArtifactUrlClassifier> for CodeableConcept {
    fn from(code: ArtifactUrlClassifier) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AssertionDirectionType](http://hl7.org/fhir/ValueSet/assert-direction-codes)**. The type of direction to use for assertion.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AssertionDirectionType {
    /** **request**

request. The assertion is evaluated on the request. */
    Request,
    /** **response**

response. The assertion is evaluated on the response. This is the default value. */
    Response,
}
impl ::core::str::FromStr for AssertionDirectionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "request" => Ok(Self::Request),
            "response" => Ok(Self::Response),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AssertionDirectionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Request => "request",
            Self::Response => "response",
        }
    }
}
impl ::std::fmt::Debug for AssertionDirectionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AssertionDirectionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AssertionDirectionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AssertionDirectionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AssertionDirectionType> for Coding {
    fn from(code: AssertionDirectionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/assert-direction-codes".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AssertionDirectionType> for CodeableConcept {
    fn from(code: AssertionDirectionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AssertionManualCompletionType](http://hl7.org/fhir/ValueSet/assert-manual-completion-codes)**. The type of manual completion to use for assertion.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AssertionManualCompletionType {
    /** **fail**

Fail. Mark the currently waiting test failed and proceed with the next assert if the stopTestOnFail is false or the next test in the TestScript if the stopTestOnFail is true. */
    Fail,
    /** **pass**

Pass. Mark the currently waiting test passed (if the test is not failed already) and proceed with the next action in the TestScript. */
    Pass,
    /** **skip**

Skip. Mark this assert as skipped and proceed with the next action in the TestScript. */
    Skip,
    /** **stop**

Stop. Stop execution of this TestScript. The overall status of this TestScript is evaluated based on the status of the completed tests. */
    Stop,
}
impl ::core::str::FromStr for AssertionManualCompletionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fail" => Ok(Self::Fail),
            "pass" => Ok(Self::Pass),
            "skip" => Ok(Self::Skip),
            "stop" => Ok(Self::Stop),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AssertionManualCompletionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Fail => "fail",
            Self::Pass => "pass",
            Self::Skip => "skip",
            Self::Stop => "stop",
        }
    }
}
impl ::std::fmt::Debug for AssertionManualCompletionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AssertionManualCompletionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AssertionManualCompletionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AssertionManualCompletionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AssertionManualCompletionType> for Coding {
    fn from(code: AssertionManualCompletionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/assert-manual-completion-codes".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AssertionManualCompletionType> for CodeableConcept {
    fn from(code: AssertionManualCompletionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AssertionOperatorType](http://hl7.org/fhir/ValueSet/assert-operator-codes)**. The type of operator to use for assertion.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AssertionOperatorType {
    /** **contains**

contains. Compare value string contains a known value. */
    Contains,
    /** **empty**

empty. Compare value is empty. */
    Empty,
    /** **equals**

equals. Default value. Equals comparison. */
    Equals,
    /** **eval**

evaluate. Evaluate the FHIRPath expression as a boolean condition. */
    Eval,
    /** **greaterThan**

greaterThan. Compare value to be greater than a known value. */
    GreaterThan,
    /** **in**

in. Compare value within a known set of values. */
    In,
    /** **lessThan**

lessThan. Compare value to be less than a known value. */
    LessThan,
    /** **manualEval**

manualEvaluate. Manually evaluate the condition described by this assert. The test engine SHALL pause and provide an input mechanism to set the outcome of this assert to 'pass', 'fail', 'skip' or 'stop'. */
    ManualEval,
    /** **notContains**

notContains. Compare value string does not contain a known value. */
    NotContains,
    /** **notEmpty**

notEmpty. Compare value is not empty. */
    NotEmpty,
    /** **notEquals**

notEquals. Not equals comparison. */
    NotEquals,
    /** **notIn**

notIn. Compare value not within a known set of values. */
    NotIn,
}
impl ::core::str::FromStr for AssertionOperatorType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "contains" => Ok(Self::Contains),
            "empty" => Ok(Self::Empty),
            "equals" => Ok(Self::Equals),
            "eval" => Ok(Self::Eval),
            "greaterThan" => Ok(Self::GreaterThan),
            "in" => Ok(Self::In),
            "lessThan" => Ok(Self::LessThan),
            "manualEval" => Ok(Self::ManualEval),
            "notContains" => Ok(Self::NotContains),
            "notEmpty" => Ok(Self::NotEmpty),
            "notEquals" => Ok(Self::NotEquals),
            "notIn" => Ok(Self::NotIn),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AssertionOperatorType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Contains => "contains",
            Self::Empty => "empty",
            Self::Equals => "equals",
            Self::Eval => "eval",
            Self::GreaterThan => "greaterThan",
            Self::In => "in",
            Self::LessThan => "lessThan",
            Self::ManualEval => "manualEval",
            Self::NotContains => "notContains",
            Self::NotEmpty => "notEmpty",
            Self::NotEquals => "notEquals",
            Self::NotIn => "notIn",
        }
    }
}
impl ::std::fmt::Debug for AssertionOperatorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AssertionOperatorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AssertionOperatorType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AssertionOperatorType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AssertionOperatorType> for Coding {
    fn from(code: AssertionOperatorType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/assert-operator-codes".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AssertionOperatorType> for CodeableConcept {
    fn from(code: AssertionOperatorType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AssertionResponseTypes](http://hl7.org/fhir/ValueSet/assert-response-code-types)**. The type of response code to use for assertion.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AssertionResponseTypes {
    /** **accepted**

Accepted. Response code is 202. */
    Accepted,
    /** **badGateway**

Bad Gateway. Response code is 502. */
    BadGateway,
    /** **badRequest**

Bad Request. Response code is 400. */
    BadRequest,
    /** **conflict**

Conflict. Response code is 409. */
    Conflict,
    /** **contentTooLarge**

Content Too Large. Response code is 413. */
    ContentTooLarge,
    /** **continue**

Continue. Response code is 100. */
    Continue,
    /** **created**

Created. Response code is 201. */
    Created,
    /** **expectationFailed**

Expectation Failed. Response code is 417. */
    ExpectationFailed,
    /** **forbidden**

Forbidden. Response code is 403. */
    Forbidden,
    /** **found**

Found. Response code is 302. */
    Found,
    /** **gatewayTimeout**

Gateway Timeout. Response code is 504. */
    GatewayTimeout,
    /** **gone**

Gone. Response code is 410. */
    Gone,
    /** **httpVersionNotSupported**

HTTP Version Not Supported. Response code is 505. */
    HttpVersionNotSupported,
    /** **internalServerError**

Internal Server Error. Response code is 500. */
    InternalServerError,
    /** **lengthRequired**

Length Required. Response code is 411. */
    LengthRequired,
    /** **methodNotAllowed**

Method Not Allowed. Response code is 405. */
    MethodNotAllowed,
    /** **misdirectedRequest**

Misdirected Request. Response code is 421. */
    MisdirectedRequest,
    /** **movedPermanently**

Moved Permanently. Response code is 301. */
    MovedPermanently,
    /** **multipleChoices**

Multiple Choices. Response code is 300. */
    MultipleChoices,
    /** **noContent**

No Content. Response code is 204. */
    NoContent,
    /** **nonAuthoritativeInformation**

Non-Authoritative Information. Response code is 203. */
    NonAuthoritativeInformation,
    /** **notAcceptable**

Not Acceptable. Response code is 406. */
    NotAcceptable,
    /** **notFound**

Not Found. Response code is 404. */
    NotFound,
    /** **notImplemented**

Not Implemented. Response code is 501. */
    NotImplemented,
    /** **notModified**

Not Modified. Response code is 304. */
    NotModified,
    /** **okay**

OK. Response code is 200. */
    Okay,
    /** **partialContent**

Partial Content. Response code is 206. */
    PartialContent,
    /** **paymentRequired**

Payment Required. Response code is 402. */
    PaymentRequired,
    /** **permanentRedirect**

Permanent Redirect. Response code is 308. */
    PermanentRedirect,
    /** **preconditionFailed**

Precondition Failed. Response code is 412. */
    PreconditionFailed,
    /** **proxyAuthenticationRequired**

Proxy Authentication Required. Response code is 407. */
    ProxyAuthenticationRequired,
    /** **rangeNotSatisfiable**

Range Not Satisfiable. Response code is 416. */
    RangeNotSatisfiable,
    /** **requestTimeout**

Request Timeout. Response code is 408. */
    RequestTimeout,
    /** **resetContent**

Reset Content. Response code is 205. */
    ResetContent,
    /** **seeOther**

See Other. Response code is 303. */
    SeeOther,
    /** **serviceUnavailable**

Service Unavailable. Response code is 503. */
    ServiceUnavailable,
    /** **switchingProtocols**

Switching Protocols. Response code is 101. */
    SwitchingProtocols,
    /** **temporaryRedirect**

Temporary Redirect. Response code is 307. */
    TemporaryRedirect,
    /** **unauthorized**

Unauthorized. Response code is 401. */
    Unauthorized,
    /** **unprocessableContent**

Unprocessable Content. Response code is 422. */
    UnprocessableContent,
    /** **unsupportedMediaType**

Unsupported Media Type. Response code is 415. */
    UnsupportedMediaType,
    /** **upgradeRequired**

Upgrade Required. Response code is 426. */
    UpgradeRequired,
    /** **uriTooLong**

URI Too Long. Response code is 414. */
    UriTooLong,
    /** **useProxy**

Use Proxy. Response code is 305. */
    UseProxy,
}
impl ::core::str::FromStr for AssertionResponseTypes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accepted" => Ok(Self::Accepted),
            "badGateway" => Ok(Self::BadGateway),
            "badRequest" => Ok(Self::BadRequest),
            "conflict" => Ok(Self::Conflict),
            "contentTooLarge" => Ok(Self::ContentTooLarge),
            "continue" => Ok(Self::Continue),
            "created" => Ok(Self::Created),
            "expectationFailed" => Ok(Self::ExpectationFailed),
            "forbidden" => Ok(Self::Forbidden),
            "found" => Ok(Self::Found),
            "gatewayTimeout" => Ok(Self::GatewayTimeout),
            "gone" => Ok(Self::Gone),
            "httpVersionNotSupported" => Ok(Self::HttpVersionNotSupported),
            "internalServerError" => Ok(Self::InternalServerError),
            "lengthRequired" => Ok(Self::LengthRequired),
            "methodNotAllowed" => Ok(Self::MethodNotAllowed),
            "misdirectedRequest" => Ok(Self::MisdirectedRequest),
            "movedPermanently" => Ok(Self::MovedPermanently),
            "multipleChoices" => Ok(Self::MultipleChoices),
            "noContent" => Ok(Self::NoContent),
            "nonAuthoritativeInformation" => Ok(Self::NonAuthoritativeInformation),
            "notAcceptable" => Ok(Self::NotAcceptable),
            "notFound" => Ok(Self::NotFound),
            "notImplemented" => Ok(Self::NotImplemented),
            "notModified" => Ok(Self::NotModified),
            "okay" => Ok(Self::Okay),
            "partialContent" => Ok(Self::PartialContent),
            "paymentRequired" => Ok(Self::PaymentRequired),
            "permanentRedirect" => Ok(Self::PermanentRedirect),
            "preconditionFailed" => Ok(Self::PreconditionFailed),
            "proxyAuthenticationRequired" => Ok(Self::ProxyAuthenticationRequired),
            "rangeNotSatisfiable" => Ok(Self::RangeNotSatisfiable),
            "requestTimeout" => Ok(Self::RequestTimeout),
            "resetContent" => Ok(Self::ResetContent),
            "seeOther" => Ok(Self::SeeOther),
            "serviceUnavailable" => Ok(Self::ServiceUnavailable),
            "switchingProtocols" => Ok(Self::SwitchingProtocols),
            "temporaryRedirect" => Ok(Self::TemporaryRedirect),
            "unauthorized" => Ok(Self::Unauthorized),
            "unprocessableContent" => Ok(Self::UnprocessableContent),
            "unsupportedMediaType" => Ok(Self::UnsupportedMediaType),
            "upgradeRequired" => Ok(Self::UpgradeRequired),
            "uriTooLong" => Ok(Self::UriTooLong),
            "useProxy" => Ok(Self::UseProxy),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AssertionResponseTypes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Accepted => "accepted",
            Self::BadGateway => "badGateway",
            Self::BadRequest => "badRequest",
            Self::Conflict => "conflict",
            Self::ContentTooLarge => "contentTooLarge",
            Self::Continue => "continue",
            Self::Created => "created",
            Self::ExpectationFailed => "expectationFailed",
            Self::Forbidden => "forbidden",
            Self::Found => "found",
            Self::GatewayTimeout => "gatewayTimeout",
            Self::Gone => "gone",
            Self::HttpVersionNotSupported => "httpVersionNotSupported",
            Self::InternalServerError => "internalServerError",
            Self::LengthRequired => "lengthRequired",
            Self::MethodNotAllowed => "methodNotAllowed",
            Self::MisdirectedRequest => "misdirectedRequest",
            Self::MovedPermanently => "movedPermanently",
            Self::MultipleChoices => "multipleChoices",
            Self::NoContent => "noContent",
            Self::NonAuthoritativeInformation => "nonAuthoritativeInformation",
            Self::NotAcceptable => "notAcceptable",
            Self::NotFound => "notFound",
            Self::NotImplemented => "notImplemented",
            Self::NotModified => "notModified",
            Self::Okay => "okay",
            Self::PartialContent => "partialContent",
            Self::PaymentRequired => "paymentRequired",
            Self::PermanentRedirect => "permanentRedirect",
            Self::PreconditionFailed => "preconditionFailed",
            Self::ProxyAuthenticationRequired => "proxyAuthenticationRequired",
            Self::RangeNotSatisfiable => "rangeNotSatisfiable",
            Self::RequestTimeout => "requestTimeout",
            Self::ResetContent => "resetContent",
            Self::SeeOther => "seeOther",
            Self::ServiceUnavailable => "serviceUnavailable",
            Self::SwitchingProtocols => "switchingProtocols",
            Self::TemporaryRedirect => "temporaryRedirect",
            Self::Unauthorized => "unauthorized",
            Self::UnprocessableContent => "unprocessableContent",
            Self::UnsupportedMediaType => "unsupportedMediaType",
            Self::UpgradeRequired => "upgradeRequired",
            Self::UriTooLong => "uriTooLong",
            Self::UseProxy => "useProxy",
        }
    }
}
impl ::std::fmt::Debug for AssertionResponseTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AssertionResponseTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AssertionResponseTypes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AssertionResponseTypes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AssertionResponseTypes> for Coding {
    fn from(code: AssertionResponseTypes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/assert-response-code-types".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AssertionResponseTypes> for CodeableConcept {
    fn from(code: AssertionResponseTypes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AuditEventAction](http://hl7.org/fhir/ValueSet/audit-event-action)**. Indicator for type of action performed during the event that generated the event.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AuditEventAction {
    /** **C**

Create. Create a new database object, such as placing an order. */
    C,
    /** **D**

Delete. Delete items, such as a doctor master file record. */
    D,
    /** **E**

Execute. Perform a system or application function such as log-on, program execution or use of an object's method, or perform a query/search operation. */
    E,
    /** **R**

Read. Read data, such as to print or display to a doctor. */
    R,
    /** **U**

Update. Update data, such as revise patient information. */
    U,
}
impl ::core::str::FromStr for AuditEventAction {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "C" => Ok(Self::C),
            "D" => Ok(Self::D),
            "E" => Ok(Self::E),
            "R" => Ok(Self::R),
            "U" => Ok(Self::U),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AuditEventAction {
    fn as_ref(&self) -> &str {
        match self {
            Self::C => "C",
            Self::D => "D",
            Self::E => "E",
            Self::R => "R",
            Self::U => "U",
        }
    }
}
impl ::std::fmt::Debug for AuditEventAction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AuditEventAction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AuditEventAction {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AuditEventAction {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AuditEventAction> for Coding {
    fn from(code: AuditEventAction) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/audit-event-action".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AuditEventAction> for CodeableConcept {
    fn from(code: AuditEventAction) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[AuditEventSeverity](http://hl7.org/fhir/ValueSet/audit-event-severity)**. The severity of the audit entry.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum AuditEventSeverity {
    /** **alert**

Alert. Notification should be sent to trigger action be taken. e.g., Loss of the primary network connection needing attention. */
    Alert,
    /** **critical**

Critical. Critical conditions. e.g., A failure in the system's primary application that will reset automatically. */
    Critical,
    /** **debug**

Debug. Debug-level messages. Information useful to developers for debugging the application. */
    Debug,
    /** **emergency**

Emergency. System is unusable. e.g., This level should only be reported by infrastructure and should not be used by applications. */
    Emergency,
    /** **error**

Error. Error conditions. e.g., An application has exceeded its file storage limit and attempts to write are failing.  */
    Error,
    /** **informational**

Informational. Normal operational messages that require no action. e.g., An application has started, paused, or ended successfully. */
    Informational,
    /** **notice**

Notice. Notice messages. Normal but significant condition. Events that are unusual, but not error conditions. */
    Notice,
    /** **warning**

Warning. Warning conditions. May indicate that an error will occur if action is not taken. e.g., A non-root file system has only 2GB remaining. */
    Warning,
}
impl ::core::str::FromStr for AuditEventSeverity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alert" => Ok(Self::Alert),
            "critical" => Ok(Self::Critical),
            "debug" => Ok(Self::Debug),
            "emergency" => Ok(Self::Emergency),
            "error" => Ok(Self::Error),
            "informational" => Ok(Self::Informational),
            "notice" => Ok(Self::Notice),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for AuditEventSeverity {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alert => "alert",
            Self::Critical => "critical",
            Self::Debug => "debug",
            Self::Emergency => "emergency",
            Self::Error => "error",
            Self::Informational => "informational",
            Self::Notice => "notice",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for AuditEventSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for AuditEventSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for AuditEventSeverity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for AuditEventSeverity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<AuditEventSeverity> for Coding {
    fn from(code: AuditEventSeverity) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/audit-event-severity".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<AuditEventSeverity> for CodeableConcept {
    fn from(code: AuditEventSeverity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BeneficiaryRelationshipCodes](http://hl7.org/fhir/ValueSet/relationship)**. This value set includes the Patient to subscriber relationship codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BeneficiaryRelationshipCodes {
    /** **1**

Self. The patient is the subscriber (policy holder) */
    N1,
    /** **2**

Spouse. The patient is the spouse or equivalent of the subscriber (policy holder) */
    N2,
    /** **3**

Child. The patient is the child of the subscriber (policy holder) */
    N3,
    /** **4**

Common Law Spouse. The patient is the common law spouse of the subscriber (policy holder) */
    N4,
    /** **5**

Other. The patient has some other relationship, such as parent, to the subscriber (policy holder) */
    N5,
}
impl ::core::str::FromStr for BeneficiaryRelationshipCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "1" => Ok(Self::N1),
            "2" => Ok(Self::N2),
            "3" => Ok(Self::N3),
            "4" => Ok(Self::N4),
            "5" => Ok(Self::N5),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BeneficiaryRelationshipCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::N1 => "1",
            Self::N2 => "2",
            Self::N3 => "3",
            Self::N4 => "4",
            Self::N5 => "5",
        }
    }
}
impl ::std::fmt::Debug for BeneficiaryRelationshipCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BeneficiaryRelationshipCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BeneficiaryRelationshipCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BeneficiaryRelationshipCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BeneficiaryRelationshipCodes> for Coding {
    fn from(code: BeneficiaryRelationshipCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/relationship".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BeneficiaryRelationshipCodes> for CodeableConcept {
    fn from(code: BeneficiaryRelationshipCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BindingStrength](http://hl7.org/fhir/ValueSet/binding-strength)**. Indication of the degree of conformance expectations associated with a binding.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BindingStrength {
    /** **example**

Example. Instances are not expected or even encouraged to draw from the specified value set.  The value set merely provides examples of the types of concepts intended to be included. */
    Example,
    /** **extensible**

Extensible. To be conformant, the concept in this element SHALL be from the specified value set if any of the codes within the value set can apply to the concept being communicated.  If the value set does not cover the concept (based on human review), alternate codings (or, data type allowing, text) may be included instead. */
    Extensible,
    /** **preferred**

Preferred. Instances are encouraged to draw from the specified codes for interoperability purposes but are not required to do so to be considered conformant. */
    Preferred,
    /** **required**

Required. To be conformant, the concept in this element SHALL be from the specified value set. */
    Required,
}
impl ::core::str::FromStr for BindingStrength {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "example" => Ok(Self::Example),
            "extensible" => Ok(Self::Extensible),
            "preferred" => Ok(Self::Preferred),
            "required" => Ok(Self::Required),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BindingStrength {
    fn as_ref(&self) -> &str {
        match self {
            Self::Example => "example",
            Self::Extensible => "extensible",
            Self::Preferred => "preferred",
            Self::Required => "required",
        }
    }
}
impl ::std::fmt::Debug for BindingStrength {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BindingStrength {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BindingStrength {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BindingStrength {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BindingStrength> for Coding {
    fn from(code: BindingStrength) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/binding-strength".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BindingStrength> for CodeableConcept {
    fn from(code: BindingStrength) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductCategory](http://hl7.org/fhir/ValueSet/product-category)**. Biologically Derived Product Category.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductCategory {
    /** **biologicalAgent**

BiologicalAgent. Biological agent of unspecified type. */
    BiologicalAgent,
    /** **cells**

Cells. Collection of cells. */
    Cells,
    /** **fluid**

Fluid. Body fluid. */
    Fluid,
    /** **organ**

Organ. A collection of tissues joined in a structural unit to serve a common function. */
    Organ,
    /** **tissue**

Tissue. An ensemble of similar cells and their extracellular matrix from the same origin that together carry out a specific function. */
    Tissue,
}
impl ::core::str::FromStr for BiologicallyDerivedProductCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "biologicalAgent" => Ok(Self::BiologicalAgent),
            "cells" => Ok(Self::Cells),
            "fluid" => Ok(Self::Fluid),
            "organ" => Ok(Self::Organ),
            "tissue" => Ok(Self::Tissue),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::BiologicalAgent => "biologicalAgent",
            Self::Cells => "cells",
            Self::Fluid => "fluid",
            Self::Organ => "organ",
            Self::Tissue => "tissue",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductCategory> for Coding {
    fn from(code: BiologicallyDerivedProductCategory) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/product-category".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductCategory> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductCodes](http://hl7.org/fhir/ValueSet/biologicallyderived-productcodes)**. This code system is a subset of ISBT 128 Product Description Codes© published by ICCBBA as a part of the ISBT 128 standard. These codes support characterization and classification of medical products of human origin inclusive of processing conditions such as additives, volumes and handling conditions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductCodes {
    /** **e0398**

RED BLOOD CELLS|CPD>AS5/450mL/refg|Irr|ResLeu. RED BLOOD CELLS|CPD>AS5/450mL/refg|Irr|ResLeu */
    E0398,
    /** **e4377**

Apheresis RED BLOOD CELLS|ACD-A/XX/refg|Irradiated|1st container. RED BLOOD CELLS Apheresis product, ACD-A, Irradiated,1st container, stored at refrigeration temperatures */
    E4377,
    /** **s1128**

HPC, APHERESIS/Citrate/XX/refg/Mobilized. HPC, APHERESIS/Citrate/XX/refg/Mobilized */
    S1128,
    /** **s1194**

HPC, APHERESIS|NS/XX/<=-120C|10% DMSO|Cryopreserved|Mobilized. HPC, Apheresis product, 10% DMSO, mobilized, cryopreserved at <=-120C */
    S1194,
    /** **s1195**

HPC, APHERESIS|NS/XX/<=-120C|5% DMSO|Cryopreserved|Mobilized. HPC, Apheresis product, 5% DMSO, mobilized, cryopreserved at <=-120C */
    S1195,
    /** **s1310**

HPC, APHERESIS|None/XX/refg|3rd Party Comp:Yes|Other Additives:Yes|Mobilized|CD34 enriched. HPC, Apheresis product, third party components added, other additives added, mobilized, CD34 enriched, stored at refrigeration temperatures */
    S1310,
    /** **s1398**

HPC, MARROW|NS/XX/rt|Plasma reduced. HPC, Marrow, plasma reduced, stored at room temperature */
    S1398,
    /** **s2598**

HPC, MARROW|NS/XX/<=-150C|10% DMSO|3rd Party Comp:Yes|Cryopreserved|RBC reduced. HPC, MARROW|NS/XX/<=-150C|10% DMSO|3rd Party Comp:Yes|Cryopreserved|RBC reduced */
    S2598,
    /** **t1396**

BONE, FEMUR|Frozen|Right|Radiation sterilization. BONE, FEMUR, Right, sterilized by radiation, stored at frozen temperatures */
    T1396,
}
impl ::core::str::FromStr for BiologicallyDerivedProductCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "e0398" => Ok(Self::E0398),
            "e4377" => Ok(Self::E4377),
            "s1128" => Ok(Self::S1128),
            "s1194" => Ok(Self::S1194),
            "s1195" => Ok(Self::S1195),
            "s1310" => Ok(Self::S1310),
            "s1398" => Ok(Self::S1398),
            "s2598" => Ok(Self::S2598),
            "t1396" => Ok(Self::T1396),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::E0398 => "e0398",
            Self::E4377 => "e4377",
            Self::S1128 => "s1128",
            Self::S1194 => "s1194",
            Self::S1195 => "s1195",
            Self::S1310 => "s1310",
            Self::S1398 => "s1398",
            Self::S2598 => "s2598",
            Self::T1396 => "t1396",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductCodes> for Coding {
    fn from(code: BiologicallyDerivedProductCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderived-productcodes"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductCodes> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductDispense](http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-status)**. BiologicallyDerivedProductDispense Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductDispense {
    /** **allocated**

Allocated. The requested product has been allocated and is ready for transport. */
    Allocated,
    /** **entered-in-error**

Entered in Error. The dispense was entered in error and therefore nullified. */
    EnteredInError,
    /** **in-progress**

In Progress. The dispense process is in progress. */
    InProgress,
    /** **issued**

Issued. The dispensed product has been picked up. */
    Issued,
    /** **preparation**

Preparation. The dispense process has started but not yet completed. */
    Preparation,
    /** **returned**

Returned. The dispensed product was returned. */
    Returned,
    /** **unfulfilled**

Unfulfilled. The dispense could not be completed. */
    Unfulfilled,
    /** **unknown**

Unknown. The authoring system does not know which of the status values applies for this dispense. Note: this concept is not to be used for other - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for BiologicallyDerivedProductDispense {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "allocated" => Ok(Self::Allocated),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "issued" => Ok(Self::Issued),
            "preparation" => Ok(Self::Preparation),
            "returned" => Ok(Self::Returned),
            "unfulfilled" => Ok(Self::Unfulfilled),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductDispense {
    fn as_ref(&self) -> &str {
        match self {
            Self::Allocated => "allocated",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::Issued => "issued",
            Self::Preparation => "preparation",
            Self::Returned => "returned",
            Self::Unfulfilled => "unfulfilled",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductDispense {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductDispense {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductDispense {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductDispense {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductDispense> for Coding {
    fn from(code: BiologicallyDerivedProductDispense) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-status"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductDispense> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductDispense) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductDispenseMatchStatus](http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-match-status)**. Biologically derived product dispense - match status\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductDispenseMatchStatus {
    /** **crossmatched**

Crossmatched. The product has been serologically or electronically crossmatched for the recipient */
    Crossmatched,
    /** **least-incompatible**

Least incompatible. The product has been selected through crossmatching as least incompatible */
    LeastIncompatible,
    /** **selected**

Selected. The product has been selected for the specific use of the recipient */
    Selected,
    /** **unmatched**

Unmatched. No specific matching has been carried out */
    Unmatched,
}
impl ::core::str::FromStr for BiologicallyDerivedProductDispenseMatchStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "crossmatched" => Ok(Self::Crossmatched),
            "least-incompatible" => Ok(Self::LeastIncompatible),
            "selected" => Ok(Self::Selected),
            "unmatched" => Ok(Self::Unmatched),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductDispenseMatchStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Crossmatched => "crossmatched",
            Self::LeastIncompatible => "least-incompatible",
            Self::Selected => "selected",
            Self::Unmatched => "unmatched",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductDispenseMatchStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductDispenseMatchStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductDispenseMatchStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductDispenseMatchStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductDispenseMatchStatus> for Coding {
    fn from(code: BiologicallyDerivedProductDispenseMatchStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-match-status"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductDispenseMatchStatus> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductDispenseMatchStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductDispenseOriginRelationship](http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-origin-relationship)**. Biologically derived product dispense - origin relationship\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductDispenseOriginRelationship {
    /** **allogeneic**

Allogeneic. The donor and the recipient are unrelated */
    Allogeneic,
    /** **autologous**

Autologous. The product was pre-donated by the recipient */
    Autologous,
    /** **directed**

Directed. The donor has been specifically selected to provide product for the recipient */
    Directed,
    /** **related**

Related. The product is from a blood relation of the recipient */
    Related,
    /** **xenogenic**

Xenogenic. The product is from a different species to the recipient */
    Xenogenic,
}
impl ::core::str::FromStr for BiologicallyDerivedProductDispenseOriginRelationship {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "allogeneic" => Ok(Self::Allogeneic),
            "autologous" => Ok(Self::Autologous),
            "directed" => Ok(Self::Directed),
            "related" => Ok(Self::Related),
            "xenogenic" => Ok(Self::Xenogenic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductDispenseOriginRelationship {
    fn as_ref(&self) -> &str {
        match self {
            Self::Allogeneic => "allogeneic",
            Self::Autologous => "autologous",
            Self::Directed => "directed",
            Self::Related => "related",
            Self::Xenogenic => "xenogenic",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductDispenseOriginRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductDispenseOriginRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductDispenseOriginRelationship {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductDispenseOriginRelationship {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductDispenseOriginRelationship> for Coding {
    fn from(code: BiologicallyDerivedProductDispenseOriginRelationship) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-origin-relationship"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductDispenseOriginRelationship> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductDispenseOriginRelationship) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductDispensePerformerFunction](http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-performer-function)**. Biologically derived product dispense - performer function\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductDispensePerformerFunction {
    /** **antibody-identification**

Antibody Identification. Antibody identification procedure */
    AntibodyIdentification,
    /** **antibody-screen**

Antibody Screen. Antibody screening procedure */
    AntibodyScreen,
    /** **crossmatch**

Crossmatch. Serological or electronic crossmatch procedure */
    Crossmatch,
    /** **group-and-type**

Group and Type. ABO and RhD blood grouping procedure */
    GroupAndType,
    /** **receipt**

Receipt. Receipt of product for clinical application */
    Receipt,
    /** **release**

Release. Approval for release for clinical application */
    Release,
    /** **transport**

Transport. Transfer of product from the supply department to the site of clinical use */
    Transport,
}
impl ::core::str::FromStr for BiologicallyDerivedProductDispensePerformerFunction {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "antibody-identification" => Ok(Self::AntibodyIdentification),
            "antibody-screen" => Ok(Self::AntibodyScreen),
            "crossmatch" => Ok(Self::Crossmatch),
            "group-and-type" => Ok(Self::GroupAndType),
            "receipt" => Ok(Self::Receipt),
            "release" => Ok(Self::Release),
            "transport" => Ok(Self::Transport),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductDispensePerformerFunction {
    fn as_ref(&self) -> &str {
        match self {
            Self::AntibodyIdentification => "antibody-identification",
            Self::AntibodyScreen => "antibody-screen",
            Self::Crossmatch => "crossmatch",
            Self::GroupAndType => "group-and-type",
            Self::Receipt => "receipt",
            Self::Release => "release",
            Self::Transport => "transport",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductDispensePerformerFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductDispensePerformerFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductDispensePerformerFunction {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductDispensePerformerFunction {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductDispensePerformerFunction> for Coding {
    fn from(code: BiologicallyDerivedProductDispensePerformerFunction) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderivedproductdispense-performer-function"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductDispensePerformerFunction> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductDispensePerformerFunction) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BiologicallyDerivedProductStatus](http://hl7.org/fhir/ValueSet/biologicallyderived-product-status)**. Biologically Derived Product Status.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BiologicallyDerivedProductStatus {
    /** **available**

Available. Product is currently available for use. */
    Available,
    /** **unavailable**

Unavailable. Product is not currently available for use. */
    Unavailable,
}
impl ::core::str::FromStr for BiologicallyDerivedProductStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "unavailable" => Ok(Self::Unavailable),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BiologicallyDerivedProductStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::Unavailable => "unavailable",
        }
    }
}
impl ::std::fmt::Debug for BiologicallyDerivedProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BiologicallyDerivedProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BiologicallyDerivedProductStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BiologicallyDerivedProductStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BiologicallyDerivedProductStatus> for Coding {
    fn from(code: BiologicallyDerivedProductStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/biologicallyderived-product-status"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BiologicallyDerivedProductStatus> for CodeableConcept {
    fn from(code: BiologicallyDerivedProductStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[BundleType](http://hl7.org/fhir/ValueSet/bundle-type)**. Indicates the purpose of a bundle - how it is intended to be used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum BundleType {
    /** **batch**

Batch. The bundle is a set of actions - intended to be processed by a server as a group of independent actions. */
    Batch,
    /** **batch-response**

Batch Response. The bundle is a batch response. Note that as a batch, some responses may indicate failure and others success. */
    BatchResponse,
    /** **collection**

Collection. The bundle is a set of resources collected into a single package for ease of distribution that imposes no processing obligations or behavioral rules beyond persistence. */
    Collection,
    /** **document**

Document. The bundle is a document. The first resource is a Composition. */
    Document,
    /** **history**

History List. The bundle is a list of resources from a history interaction on a server. */
    History,
    /** **message**

Message. The bundle is a message. The first resource is a MessageHeader. */
    Message,
    /** **searchset**

Search Results. The bundle is a list of resources returned as a result of a search/query interaction, operation, or message. */
    Searchset,
    /** **subscription-notification**

Subscription Notification. The bundle has been generated by a Subscription to communicate information to a client. */
    SubscriptionNotification,
    /** **transaction**

Transaction. The bundle is a transaction - intended to be processed by a server as an atomic commit. */
    Transaction,
    /** **transaction-response**

Transaction Response. The bundle is a transaction response. Because the response is a transaction response, the transaction has succeeded, and all responses are error free. */
    TransactionResponse,
}
impl ::core::str::FromStr for BundleType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "batch" => Ok(Self::Batch),
            "batch-response" => Ok(Self::BatchResponse),
            "collection" => Ok(Self::Collection),
            "document" => Ok(Self::Document),
            "history" => Ok(Self::History),
            "message" => Ok(Self::Message),
            "searchset" => Ok(Self::Searchset),
            "subscription-notification" => Ok(Self::SubscriptionNotification),
            "transaction" => Ok(Self::Transaction),
            "transaction-response" => Ok(Self::TransactionResponse),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for BundleType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Batch => "batch",
            Self::BatchResponse => "batch-response",
            Self::Collection => "collection",
            Self::Document => "document",
            Self::History => "history",
            Self::Message => "message",
            Self::Searchset => "searchset",
            Self::SubscriptionNotification => "subscription-notification",
            Self::Transaction => "transaction",
            Self::TransactionResponse => "transaction-response",
        }
    }
}
impl ::std::fmt::Debug for BundleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for BundleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for BundleType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for BundleType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<BundleType> for Coding {
    fn from(code: BundleType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/bundle-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<BundleType> for CodeableConcept {
    fn from(code: BundleType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CapabilityStatementKind](http://hl7.org/fhir/ValueSet/capability-statement-kind)**. How a capability statement is intended to be used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CapabilityStatementKind {
    /** **capability**

Capability. The CapabilityStatement instance represents the capabilities of a system or piece of software, independent of a particular installation. */
    Capability,
    /** **instance**

Instance. The CapabilityStatement instance represents the present capabilities of a specific system instance.  This is the kind returned by /metadata for a FHIR server end-point. */
    Instance,
    /** **requirements**

Requirements. The CapabilityStatement instance represents a set of requirements for other systems to meet; e.g. as part of an implementation guide or 'request for proposal'. */
    Requirements,
}
impl ::core::str::FromStr for CapabilityStatementKind {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "capability" => Ok(Self::Capability),
            "instance" => Ok(Self::Instance),
            "requirements" => Ok(Self::Requirements),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CapabilityStatementKind {
    fn as_ref(&self) -> &str {
        match self {
            Self::Capability => "capability",
            Self::Instance => "instance",
            Self::Requirements => "requirements",
        }
    }
}
impl ::std::fmt::Debug for CapabilityStatementKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CapabilityStatementKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CapabilityStatementKind {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CapabilityStatementKind {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CapabilityStatementKind> for Coding {
    fn from(code: CapabilityStatementKind) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/capability-statement-kind".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CapabilityStatementKind> for CodeableConcept {
    fn from(code: CapabilityStatementKind) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CareTeamStatus](http://hl7.org/fhir/ValueSet/care-team-status)**. Indicates the status of the care team.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CareTeamStatus {
    /** **active**

Active. The care team is currently participating in the coordination and delivery of care. */
    Active,
    /** **entered-in-error**

Entered in Error. The care team should have never existed. */
    EnteredInError,
    /** **inactive**

Inactive. The care team was, but is no longer, participating in the coordination and delivery of care. */
    Inactive,
    /** **proposed**

Proposed. The care team has been drafted and proposed, but not yet participating in the coordination and delivery of patient care. */
    Proposed,
    /** **suspended**

Suspended. The care team is temporarily on hold or suspended and not participating in the coordination and delivery of care. */
    Suspended,
}
impl ::core::str::FromStr for CareTeamStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            "proposed" => Ok(Self::Proposed),
            "suspended" => Ok(Self::Suspended),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CareTeamStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
            Self::Proposed => "proposed",
            Self::Suspended => "suspended",
        }
    }
}
impl ::std::fmt::Debug for CareTeamStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CareTeamStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CareTeamStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CareTeamStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CareTeamStatus> for Coding {
    fn from(code: CareTeamStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/care-team-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CareTeamStatus> for CodeableConcept {
    fn from(code: CareTeamStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CatalogType](http://hl7.org/fhir/catalogType)**. CatalogType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum CatalogType {
    /** **device**

Device Catalog. Device Catalog. */
    Device,
    /** **medication**

Medication Catalog. Medication Catalog. */
    Medication,
    /** **protocol**

Protocol List. Protocol List. */
    Protocol,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for CatalogType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "device" => Ok(Self::Device),
            "medication" => Ok(Self::Medication),
            "protocol" => Ok(Self::Protocol),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for CatalogType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Device => "device",
            Self::Medication => "medication",
            Self::Protocol => "protocol",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for CatalogType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CatalogType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CatalogType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CatalogType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CatalogType> for Coding {
    fn from(code: CatalogType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/catalogType".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CatalogType> for CodeableConcept {
    fn from(code: CatalogType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CharacteristicCombination](http://hl7.org/fhir/ValueSet/characteristic-combination)**. Logical grouping of characteristics.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CharacteristicCombination {
    /** **all-of**

All of. Combine characteristics with AND. */
    AllOf,
    /** **any-of**

Any of. Combine characteristics with OR. */
    AnyOf,
    /** **at-least**

At least. Meet at least the threshold number of characteristics for definition. */
    AtLeast,
    /** **at-most**

At most. Meet at most the threshold number of characteristics for definition. */
    AtMost,
    /** **dataset**

Dataset. Combine characteristics as a collection used as the dataset. */
    Dataset,
    /** **net-effect**

Net effect. Combine characteristics by addition of benefits and subtraction of harms. */
    NetEffect,
    /** **statistical**

Statistical. Combine characteristics statistically. Use method to specify the statistical method. */
    Statistical,
}
impl ::core::str::FromStr for CharacteristicCombination {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "all-of" => Ok(Self::AllOf),
            "any-of" => Ok(Self::AnyOf),
            "at-least" => Ok(Self::AtLeast),
            "at-most" => Ok(Self::AtMost),
            "dataset" => Ok(Self::Dataset),
            "net-effect" => Ok(Self::NetEffect),
            "statistical" => Ok(Self::Statistical),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CharacteristicCombination {
    fn as_ref(&self) -> &str {
        match self {
            Self::AllOf => "all-of",
            Self::AnyOf => "any-of",
            Self::AtLeast => "at-least",
            Self::AtMost => "at-most",
            Self::Dataset => "dataset",
            Self::NetEffect => "net-effect",
            Self::Statistical => "statistical",
        }
    }
}
impl ::std::fmt::Debug for CharacteristicCombination {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CharacteristicCombination {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CharacteristicCombination {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CharacteristicCombination {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CharacteristicCombination> for Coding {
    fn from(code: CharacteristicCombination) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/characteristic-combination".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CharacteristicCombination> for CodeableConcept {
    fn from(code: CharacteristicCombination) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CharacteristicOffset](http://hl7.org/fhir/ValueSet/characteristic-offset)**. Reference point for characteristic.valueQuantity.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CharacteristicOffset {
    /** **LNL**

Lower Normal Limit. The lower bound of the reference range. */
    Lnl,
    /** **UNL**

Upper Normal Limit. The upper bound of the reference range. */
    Unl,
}
impl ::core::str::FromStr for CharacteristicOffset {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "LNL" => Ok(Self::Lnl),
            "UNL" => Ok(Self::Unl),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CharacteristicOffset {
    fn as_ref(&self) -> &str {
        match self {
            Self::Lnl => "LNL",
            Self::Unl => "UNL",
        }
    }
}
impl ::std::fmt::Debug for CharacteristicOffset {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CharacteristicOffset {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CharacteristicOffset {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CharacteristicOffset {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CharacteristicOffset> for Coding {
    fn from(code: CharacteristicOffset) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/characteristic-offset".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CharacteristicOffset> for CodeableConcept {
    fn from(code: CharacteristicOffset) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ChargeItemStatus](http://hl7.org/fhir/ValueSet/chargeitem-status)**. Codes identifying the lifecycle stage of a ChargeItem.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ChargeItemStatus {
    /** **aborted**

Aborted. The processing of the charge was aborted. */
    Aborted,
    /** **billable**

Billable. The charge item is ready for billing. */
    Billable,
    /** **billed**

Billed. The charge item has been billed (e.g. a billing engine has generated financial transactions by applying the associated ruled for the charge item to the context of the Encounter, and placed them into Claims/Invoices. */
    Billed,
    /** **entered-in-error**

Entered in Error. The charge item has been entered in error and should not be processed for billing. */
    EnteredInError,
    /** **not-billable**

Not billable. The charge item has been determined to be not billable (e.g. due to rules associated with the billing code). */
    NotBillable,
    /** **planned**

Planned. The charge item has been entered, but the charged service is not  yet complete, so it shall not be billed yet but might be used in the context of pre-authorization. */
    Planned,
    /** **unknown**

Unknown. The authoring system does not know which of the status values currently applies for this charge item  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for ChargeItemStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "aborted" => Ok(Self::Aborted),
            "billable" => Ok(Self::Billable),
            "billed" => Ok(Self::Billed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "not-billable" => Ok(Self::NotBillable),
            "planned" => Ok(Self::Planned),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ChargeItemStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aborted => "aborted",
            Self::Billable => "billable",
            Self::Billed => "billed",
            Self::EnteredInError => "entered-in-error",
            Self::NotBillable => "not-billable",
            Self::Planned => "planned",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for ChargeItemStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ChargeItemStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ChargeItemStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ChargeItemStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ChargeItemStatus> for Coding {
    fn from(code: ChargeItemStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/chargeitem-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ChargeItemStatus> for CodeableConcept {
    fn from(code: ChargeItemStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitationArtifactClassifier](http://hl7.org/fhir/ValueSet/citation-artifact-classifier)**. Citation artifact classifier\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitationArtifactClassifier {
    /** **D000076942**

Preprint. Scientific manuscript made available prior to PEER REVIEW. */
    D000076942,
    /** **D001877**

Book. Non-periodical written or printed works consisting of sheets of pages fastened or bound together within covers. */
    D001877,
    /** **D016420**

Comment. Comment */
    D016420,
    /** **D016422**

Letter. Letter */
    D016422,
    /** **D016425**

Published Erratum. Published Erratum */
    D016425,
    /** **D016428**

Journal Article. Journal Article */
    D016428,
    /** **D019991**

Database. A structured file of information or a set of logically related data stored and retrieved using computer-based means. */
    D019991,
    /** **D059040**

Video-Audio Media. Used with articles which include video files or clips, or for articles which are entirely video. */
    D059040,
    /** **D064886**

Dataset. Works consisting of organized collections of data, which have been stored permanently in a formalized manner suitable for communication, interpretation, or processing. */
    D064886,
    /** **Electronic**

Electronic. the journal is published in electronic format only */
    Electronic,
    /** **Electronic-Print**

Electronic-Print. the journal is published first in electronic format followed by print (this value is currently used for just one journal, Nucleic Acids Research) */
    ElectronicPrint,
    /** **Electronic-eCollection**

Electronic-eCollection. used for electronic-only journals that publish individual articles first and then later collect them into an "issue" date that is typically called an eCollection. */
    ElectronicECollection,
    /** **Print**

Print. the journal is published in print format only */
    Print,
    /** **Print-Electronic**

Print Electronic. the journal is published in both print and electronic format */
    PrintElectronic,
    /** **audio**

Audio file. The article cited is an audio file. */
    Audio,
    /** **cds-artifact**

Clinical Decision Support Artifact. The artifact is used for decision support for healthcare decisions. */
    CdsArtifact,
    /** **common-share**

Common Share. Citation Resource containing value added data that is openly shared */
    CommonShare,
    /** **dataset-unpublished**

Dataset Unpublished. An organized collection of data that is not stored permanently for communication. */
    DatasetUnpublished,
    /** **executable-app**

Executable app. Executable app */
    ExecutableApp,
    /** **fhir-resource**

FHIR Resource. The article cited is a FHIR resource. */
    FhirResource,
    /** **image**

Image file. The article cited is an image file. */
    Image,
    /** **interactive-form**

Interactive Form. A user interface that supports data entry and data display. */
    InteractiveForm,
    /** **machine-code**

Machine code. The article cited is machine code. */
    MachineCode,
    /** **medline-base**

Medline Base. Citation Resource containing only data from Medline */
    MedlineBase,
    /** **prediction-model**

Prediction Model. A formula or expression used to calculate an outcome representing a predicted result. */
    PredictionModel,
    /** **project-specific**

Project Specific. Citation Resource containing value added data specific to a project */
    ProjectSpecific,
    /** **protocol**

Protocol. The article cited is the protocol of an activity and not the results or findings. */
    Protocol,
    /** **pseudocode**

PseudoCode. A non-executable, human-readable representation of software code. */
    Pseudocode,
    /** **standard-specification**

Standard Specification. An explicit set of requirements for an item, material, component, system or service, often used to define a technical standard which is an established norm or requirement for a repeatable technical task. */
    StandardSpecification,
    /** **terminology**

Terminology. A structured set of codes and display values, which may be subtyped as a code system, value set, taxonomy, or ontology. */
    Terminology,
    /** **webpage**

Webpage. Webpage */
    Webpage,
}
impl ::core::str::FromStr for CitationArtifactClassifier {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "D000076942" => Ok(Self::D000076942),
            "D001877" => Ok(Self::D001877),
            "D016420" => Ok(Self::D016420),
            "D016422" => Ok(Self::D016422),
            "D016425" => Ok(Self::D016425),
            "D016428" => Ok(Self::D016428),
            "D019991" => Ok(Self::D019991),
            "D059040" => Ok(Self::D059040),
            "D064886" => Ok(Self::D064886),
            "Electronic" => Ok(Self::Electronic),
            "Electronic-Print" => Ok(Self::ElectronicPrint),
            "Electronic-eCollection" => Ok(Self::ElectronicECollection),
            "Print" => Ok(Self::Print),
            "Print-Electronic" => Ok(Self::PrintElectronic),
            "audio" => Ok(Self::Audio),
            "cds-artifact" => Ok(Self::CdsArtifact),
            "common-share" => Ok(Self::CommonShare),
            "dataset-unpublished" => Ok(Self::DatasetUnpublished),
            "executable-app" => Ok(Self::ExecutableApp),
            "fhir-resource" => Ok(Self::FhirResource),
            "image" => Ok(Self::Image),
            "interactive-form" => Ok(Self::InteractiveForm),
            "machine-code" => Ok(Self::MachineCode),
            "medline-base" => Ok(Self::MedlineBase),
            "prediction-model" => Ok(Self::PredictionModel),
            "project-specific" => Ok(Self::ProjectSpecific),
            "protocol" => Ok(Self::Protocol),
            "pseudocode" => Ok(Self::Pseudocode),
            "standard-specification" => Ok(Self::StandardSpecification),
            "terminology" => Ok(Self::Terminology),
            "webpage" => Ok(Self::Webpage),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitationArtifactClassifier {
    fn as_ref(&self) -> &str {
        match self {
            Self::D000076942 => "D000076942",
            Self::D001877 => "D001877",
            Self::D016420 => "D016420",
            Self::D016422 => "D016422",
            Self::D016425 => "D016425",
            Self::D016428 => "D016428",
            Self::D019991 => "D019991",
            Self::D059040 => "D059040",
            Self::D064886 => "D064886",
            Self::Electronic => "Electronic",
            Self::ElectronicPrint => "Electronic-Print",
            Self::ElectronicECollection => "Electronic-eCollection",
            Self::Print => "Print",
            Self::PrintElectronic => "Print-Electronic",
            Self::Audio => "audio",
            Self::CdsArtifact => "cds-artifact",
            Self::CommonShare => "common-share",
            Self::DatasetUnpublished => "dataset-unpublished",
            Self::ExecutableApp => "executable-app",
            Self::FhirResource => "fhir-resource",
            Self::Image => "image",
            Self::InteractiveForm => "interactive-form",
            Self::MachineCode => "machine-code",
            Self::MedlineBase => "medline-base",
            Self::PredictionModel => "prediction-model",
            Self::ProjectSpecific => "project-specific",
            Self::Protocol => "protocol",
            Self::Pseudocode => "pseudocode",
            Self::StandardSpecification => "standard-specification",
            Self::Terminology => "terminology",
            Self::Webpage => "webpage",
        }
    }
}
impl ::std::fmt::Debug for CitationArtifactClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitationArtifactClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitationArtifactClassifier {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitationArtifactClassifier {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitationArtifactClassifier> for Coding {
    fn from(code: CitationArtifactClassifier) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/citation-artifact-classifier".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitationArtifactClassifier> for CodeableConcept {
    fn from(code: CitationArtifactClassifier) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitationClassificationType](http://hl7.org/fhir/ValueSet/citation-classification-type)**. Citation classification type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitationClassificationType {
    /** **citation-source**

Citation Source. Citation repository where this citation was created or copied from */
    CitationSource,
    /** **fevir-platform-use**

FEvIR Platform Use. Used for Citation sharing on the Fast Evidence Interoperability Resources (FEvIR) Platform */
    FevirPlatformUse,
    /** **medline-owner**

MEDLINE Citation Owner. The party responsible for creating and validating the MEDLINE citation */
    MedlineOwner,
}
impl ::core::str::FromStr for CitationClassificationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "citation-source" => Ok(Self::CitationSource),
            "fevir-platform-use" => Ok(Self::FevirPlatformUse),
            "medline-owner" => Ok(Self::MedlineOwner),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitationClassificationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::CitationSource => "citation-source",
            Self::FevirPlatformUse => "fevir-platform-use",
            Self::MedlineOwner => "medline-owner",
        }
    }
}
impl ::std::fmt::Debug for CitationClassificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitationClassificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitationClassificationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitationClassificationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitationClassificationType> for Coding {
    fn from(code: CitationClassificationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/citation-classification-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitationClassificationType> for CodeableConcept {
    fn from(code: CitationClassificationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitationStatusType](http://hl7.org/fhir/ValueSet/citation-status-type)**. Citation status type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitationStatusType {
    /** **medline-completed**

Medline Citation Status of Completed. Medline Citation Status of Completed */
    MedlineCompleted,
    /** **medline-in-data-review**

Medline Citation Status of In-Data-Review. Medline Citation Status of In-Data-Review */
    MedlineInDataReview,
    /** **medline-in-process**

Medline Citation Status of In-Process. Medline Citation Status of In-Process */
    MedlineInProcess,
    /** **medline-medline**

Medline Citation Status of MEDLINE. Medline Citation Status of MEDLINE */
    MedlineMedline,
    /** **medline-oldmedline**

Medline Citation Status of OLDMEDLINE. Medline Citation Status of OLDMEDLINE */
    MedlineOldmedline,
    /** **medline-publisher**

Medline Citation Status of Publisher. Medline Citation Status of Publisher */
    MedlinePublisher,
    /** **medline-pubmed-not-medline**

Medline Citation Status of PubMed-not-MEDLINE. Medline Citation Status of PubMed-not-MEDLINE */
    MedlinePubmedNotMedline,
    /** **pubmed-publication-status-aheadofprint**

PubMed PublicationStatus of aheadofprint. electronically published, but followed by print */
    PubmedPublicationStatusAheadofprint,
    /** **pubmed-publication-status-epublish**

PubMed PublicationStatus of epublish. electronically published only, never published in print */
    PubmedPublicationStatusEpublish,
    /** **pubmed-publication-status-ppublish**

PubMed PublicationStatus of ppublish. published in print */
    PubmedPublicationStatusPpublish,
    /** **pubmed-pubstatus-accepted**

PubMed Pubstatus of Accepted. PubMed Pubstatus of Accepted */
    PubmedPubstatusAccepted,
    /** **pubmed-pubstatus-aheadofprint**

PubMed Pubstatus of aheadofprint. PubMed Pubstatus of aheadofprint */
    PubmedPubstatusAheadofprint,
    /** **pubmed-pubstatus-ecollection**

PubMed Pubstatus of Ecollection. PubMed Pubstatus of Ecollection */
    PubmedPubstatusEcollection,
    /** **pubmed-pubstatus-entrez**

PubMed Pubstatus of Entrez. PubMed Pubstatus of Entrez */
    PubmedPubstatusEntrez,
    /** **pubmed-pubstatus-epublish**

PubMed Pubstatus of Epublish. PubMed Pubstatus of Epublish */
    PubmedPubstatusEpublish,
    /** **pubmed-pubstatus-medline**

PubMed Pubstatus of Medline. PubMed Pubstatus of Medline */
    PubmedPubstatusMedline,
    /** **pubmed-pubstatus-medliner**

PubMed Pubstatus of Medliner. PubMed Pubstatus of Medliner */
    PubmedPubstatusMedliner,
    /** **pubmed-pubstatus-pmc**

PubMed Pubstatus of PMC. PubMed Pubstatus of PMC */
    PubmedPubstatusPmc,
    /** **pubmed-pubstatus-pmc-release**

PubMed Pubstatus of PMC release. PubMed Pubstatus of PMC release */
    PubmedPubstatusPmcRelease,
    /** **pubmed-pubstatus-pmcr**

PubMed Pubstatus of PMCr. PubMed Pubstatus of PMCr */
    PubmedPubstatusPmcr,
    /** **pubmed-pubstatus-ppublish**

PubMed Pubstatus of Ppublish. PubMed Pubstatus of Ppublish */
    PubmedPubstatusPpublish,
    /** **pubmed-pubstatus-premedline**

PubMed Pubstatus of Premedline. PubMed Pubstatus of Premedline */
    PubmedPubstatusPremedline,
    /** **pubmed-pubstatus-pubmed**

PubMed Pubstatus of PubMed. PubMed Pubstatus of PubMed */
    PubmedPubstatusPubmed,
    /** **pubmed-pubstatus-pubmedr**

PubMed Pubstatus of PubMedr. PubMed Pubstatus of PubMedr */
    PubmedPubstatusPubmedr,
    /** **pubmed-pubstatus-received**

PubMed Pubstatus of Received. PubMed Pubstatus of Received */
    PubmedPubstatusReceived,
    /** **pubmed-pubstatus-retracted**

PubMed Pubstatus of Retracted. PubMed Pubstatus of Retracted */
    PubmedPubstatusRetracted,
    /** **pubmed-pubstatus-revised**

PubMed Pubstatus of Revised. PubMed Pubstatus of Revised */
    PubmedPubstatusRevised,
}
impl ::core::str::FromStr for CitationStatusType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "medline-completed" => Ok(Self::MedlineCompleted),
            "medline-in-data-review" => Ok(Self::MedlineInDataReview),
            "medline-in-process" => Ok(Self::MedlineInProcess),
            "medline-medline" => Ok(Self::MedlineMedline),
            "medline-oldmedline" => Ok(Self::MedlineOldmedline),
            "medline-publisher" => Ok(Self::MedlinePublisher),
            "medline-pubmed-not-medline" => Ok(Self::MedlinePubmedNotMedline),
            "pubmed-publication-status-aheadofprint" => {
                Ok(Self::PubmedPublicationStatusAheadofprint)
            }
            "pubmed-publication-status-epublish" => {
                Ok(Self::PubmedPublicationStatusEpublish)
            }
            "pubmed-publication-status-ppublish" => {
                Ok(Self::PubmedPublicationStatusPpublish)
            }
            "pubmed-pubstatus-accepted" => Ok(Self::PubmedPubstatusAccepted),
            "pubmed-pubstatus-aheadofprint" => Ok(Self::PubmedPubstatusAheadofprint),
            "pubmed-pubstatus-ecollection" => Ok(Self::PubmedPubstatusEcollection),
            "pubmed-pubstatus-entrez" => Ok(Self::PubmedPubstatusEntrez),
            "pubmed-pubstatus-epublish" => Ok(Self::PubmedPubstatusEpublish),
            "pubmed-pubstatus-medline" => Ok(Self::PubmedPubstatusMedline),
            "pubmed-pubstatus-medliner" => Ok(Self::PubmedPubstatusMedliner),
            "pubmed-pubstatus-pmc" => Ok(Self::PubmedPubstatusPmc),
            "pubmed-pubstatus-pmc-release" => Ok(Self::PubmedPubstatusPmcRelease),
            "pubmed-pubstatus-pmcr" => Ok(Self::PubmedPubstatusPmcr),
            "pubmed-pubstatus-ppublish" => Ok(Self::PubmedPubstatusPpublish),
            "pubmed-pubstatus-premedline" => Ok(Self::PubmedPubstatusPremedline),
            "pubmed-pubstatus-pubmed" => Ok(Self::PubmedPubstatusPubmed),
            "pubmed-pubstatus-pubmedr" => Ok(Self::PubmedPubstatusPubmedr),
            "pubmed-pubstatus-received" => Ok(Self::PubmedPubstatusReceived),
            "pubmed-pubstatus-retracted" => Ok(Self::PubmedPubstatusRetracted),
            "pubmed-pubstatus-revised" => Ok(Self::PubmedPubstatusRevised),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitationStatusType {
    fn as_ref(&self) -> &str {
        match self {
            Self::MedlineCompleted => "medline-completed",
            Self::MedlineInDataReview => "medline-in-data-review",
            Self::MedlineInProcess => "medline-in-process",
            Self::MedlineMedline => "medline-medline",
            Self::MedlineOldmedline => "medline-oldmedline",
            Self::MedlinePublisher => "medline-publisher",
            Self::MedlinePubmedNotMedline => "medline-pubmed-not-medline",
            Self::PubmedPublicationStatusAheadofprint => {
                "pubmed-publication-status-aheadofprint"
            }
            Self::PubmedPublicationStatusEpublish => "pubmed-publication-status-epublish",
            Self::PubmedPublicationStatusPpublish => "pubmed-publication-status-ppublish",
            Self::PubmedPubstatusAccepted => "pubmed-pubstatus-accepted",
            Self::PubmedPubstatusAheadofprint => "pubmed-pubstatus-aheadofprint",
            Self::PubmedPubstatusEcollection => "pubmed-pubstatus-ecollection",
            Self::PubmedPubstatusEntrez => "pubmed-pubstatus-entrez",
            Self::PubmedPubstatusEpublish => "pubmed-pubstatus-epublish",
            Self::PubmedPubstatusMedline => "pubmed-pubstatus-medline",
            Self::PubmedPubstatusMedliner => "pubmed-pubstatus-medliner",
            Self::PubmedPubstatusPmc => "pubmed-pubstatus-pmc",
            Self::PubmedPubstatusPmcRelease => "pubmed-pubstatus-pmc-release",
            Self::PubmedPubstatusPmcr => "pubmed-pubstatus-pmcr",
            Self::PubmedPubstatusPpublish => "pubmed-pubstatus-ppublish",
            Self::PubmedPubstatusPremedline => "pubmed-pubstatus-premedline",
            Self::PubmedPubstatusPubmed => "pubmed-pubstatus-pubmed",
            Self::PubmedPubstatusPubmedr => "pubmed-pubstatus-pubmedr",
            Self::PubmedPubstatusReceived => "pubmed-pubstatus-received",
            Self::PubmedPubstatusRetracted => "pubmed-pubstatus-retracted",
            Self::PubmedPubstatusRevised => "pubmed-pubstatus-revised",
        }
    }
}
impl ::std::fmt::Debug for CitationStatusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitationStatusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitationStatusType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitationStatusType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitationStatusType> for Coding {
    fn from(code: CitationStatusType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/citation-status-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitationStatusType> for CodeableConcept {
    fn from(code: CitationStatusType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitationSummaryStyle](http://hl7.org/fhir/ValueSet/citation-summary-style)**. The format for display of the citation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitationSummaryStyle {
    /** **acs**

American Chemical Society. Chemistry. */
    Acs,
    /** **ama11**

American Medical Association 11th edition. Medicine. */
    Ama11,
    /** **apa6**

American Psychological Association 6th edition. APA 6th edition used by Education, Psychology and Sciences. */
    Apa6,
    /** **apa7**

American Psychological Association 7th edition. APA 7th edition (October 2019) used by Education, Psychology and Sciences. */
    Apa7,
    /** **asa6**

American Sociological Association 6th edition. Sociology. */
    Asa6,
    /** **chicago-a-17**

Chicago Style Version 17 Author Date. Used by Business, History and the Fine Arts. */
    ChicagoA17,
    /** **chicago-b-17**

Chicago Style Version 17 Full note. Used by Business, History and the Fine Arts. */
    ChicagoB17,
    /** **cochrane**

Cochrane Style. Used by Cochrane reviews, example: Huang, M, Tang T, Pang, P, Li, M, Ma R, Lu, J, et al. Treating COVID-19 with Chloroquine. J Mol Cell Biol 2020; 12(4):322–5. */
    Cochrane,
    /** **comppub**

Computable Publishing. Citation style to report human-readable and/or machine-readable access paths, example: Alper BS, Dehnbostel J, Shahin K. 14-day mortality remdesivir vs placebo meta-analysis (ACTT-1, Wang et al, WHO SOLIDARITY).  Fast Evidence Interoperability Resources (FEvIR) Platform, entry 55, version 4. Created 2020 Dec 17. Revised 2020 Dec 21. Accessed 2021 Mar 13. Computable resource at: https://fevir.net/resources/Evidence/55. */
    Comppub,
    /** **elsevier-harvard**

Elsevier-Harvard Style. Biology ecology. */
    ElsevierHarvard,
    /** **ieee**

Institute of Electrical and Electronics Engineers. IT, Engineering. */
    Ieee,
    /** **mla8**

Modern Language Association 8th edition. MLA 8th edition used by the Humanities. */
    Mla8,
    /** **nature**

Nature Referencing style. Biology. */
    Nature,
    /** **vancouver**

Vancouver style. Citation style used by International Committee of Medical Journal Editors and maintained by US National Library of Medicine. */
    Vancouver,
}
impl ::core::str::FromStr for CitationSummaryStyle {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "acs" => Ok(Self::Acs),
            "ama11" => Ok(Self::Ama11),
            "apa6" => Ok(Self::Apa6),
            "apa7" => Ok(Self::Apa7),
            "asa6" => Ok(Self::Asa6),
            "chicago-a-17" => Ok(Self::ChicagoA17),
            "chicago-b-17" => Ok(Self::ChicagoB17),
            "cochrane" => Ok(Self::Cochrane),
            "comppub" => Ok(Self::Comppub),
            "elsevier-harvard" => Ok(Self::ElsevierHarvard),
            "ieee" => Ok(Self::Ieee),
            "mla8" => Ok(Self::Mla8),
            "nature" => Ok(Self::Nature),
            "vancouver" => Ok(Self::Vancouver),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitationSummaryStyle {
    fn as_ref(&self) -> &str {
        match self {
            Self::Acs => "acs",
            Self::Ama11 => "ama11",
            Self::Apa6 => "apa6",
            Self::Apa7 => "apa7",
            Self::Asa6 => "asa6",
            Self::ChicagoA17 => "chicago-a-17",
            Self::ChicagoB17 => "chicago-b-17",
            Self::Cochrane => "cochrane",
            Self::Comppub => "comppub",
            Self::ElsevierHarvard => "elsevier-harvard",
            Self::Ieee => "ieee",
            Self::Mla8 => "mla8",
            Self::Nature => "nature",
            Self::Vancouver => "vancouver",
        }
    }
}
impl ::std::fmt::Debug for CitationSummaryStyle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitationSummaryStyle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitationSummaryStyle {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitationSummaryStyle {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitationSummaryStyle> for Coding {
    fn from(code: CitationSummaryStyle) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/citation-summary-style".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitationSummaryStyle> for CodeableConcept {
    fn from(code: CitationSummaryStyle) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitedArtifactAbstractType](http://hl7.org/fhir/ValueSet/cited-artifact-abstract-type)**. Used to express the reason and specific aspect for the variant abstract, such as language and specific language\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitedArtifactAbstractType {
    /** **autotranslated**

Different language derived from autotranslation. Machine translated form of abstract in a different language, language element codes the language into which it was translated by machine */
    Autotranslated,
    /** **different-publisher**

Different publisher for abstract. Abstract produced by a different publisher than the cited artifact */
    DifferentPublisher,
    /** **duplicate-pmid**

Different text in additional Medline entry. Alternative form of abstract in two or more Medline entries */
    DuplicatePmid,
    /** **earlier-abstract**

Different text in an earlier version. Alternative form of abstract in an earlier version such as epub ahead of print */
    EarlierAbstract,
    /** **language**

Different language. Additional form of abstract in a different language */
    Language,
    /** **long-abstract**

Long abstract. Long version of the abstract, for use when abstracts are provided in different sizes or lengths */
    LongAbstract,
    /** **plain-language**

Plain language. Additional form of abstract written for the general public */
    PlainLanguage,
    /** **primary-human-use**

Primary human use. Human-friendly main or official abstract */
    PrimaryHumanUse,
    /** **primary-machine-use**

Primary machine use. Machine-friendly main or official abstract */
    PrimaryMachineUse,
    /** **short-abstract**

Short abstract. Brief abstract, for use when abstracts are provided in different sizes or lengths */
    ShortAbstract,
    /** **truncated**

Truncated. Truncated abstract */
    Truncated,
}
impl ::core::str::FromStr for CitedArtifactAbstractType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "autotranslated" => Ok(Self::Autotranslated),
            "different-publisher" => Ok(Self::DifferentPublisher),
            "duplicate-pmid" => Ok(Self::DuplicatePmid),
            "earlier-abstract" => Ok(Self::EarlierAbstract),
            "language" => Ok(Self::Language),
            "long-abstract" => Ok(Self::LongAbstract),
            "plain-language" => Ok(Self::PlainLanguage),
            "primary-human-use" => Ok(Self::PrimaryHumanUse),
            "primary-machine-use" => Ok(Self::PrimaryMachineUse),
            "short-abstract" => Ok(Self::ShortAbstract),
            "truncated" => Ok(Self::Truncated),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitedArtifactAbstractType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Autotranslated => "autotranslated",
            Self::DifferentPublisher => "different-publisher",
            Self::DuplicatePmid => "duplicate-pmid",
            Self::EarlierAbstract => "earlier-abstract",
            Self::Language => "language",
            Self::LongAbstract => "long-abstract",
            Self::PlainLanguage => "plain-language",
            Self::PrimaryHumanUse => "primary-human-use",
            Self::PrimaryMachineUse => "primary-machine-use",
            Self::ShortAbstract => "short-abstract",
            Self::Truncated => "truncated",
        }
    }
}
impl ::std::fmt::Debug for CitedArtifactAbstractType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitedArtifactAbstractType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitedArtifactAbstractType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitedArtifactAbstractType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitedArtifactAbstractType> for Coding {
    fn from(code: CitedArtifactAbstractType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/cited-artifact-abstract-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitedArtifactAbstractType> for CodeableConcept {
    fn from(code: CitedArtifactAbstractType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitedArtifactClassificationType](http://hl7.org/fhir/ValueSet/cited-artifact-classification-type)**. Cited Artifact Classification Type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitedArtifactClassificationType {
    /** **chemical**

Chemical. Chemical */
    Chemical,
    /** **citation-subset**

Citation subset. Citation subset */
    CitationSubset,
    /** **coverage**

Coverage. The spatial or temporal topic of the resource, spatial applicability of the resource, or jurisdiction under which the resource is relevant */
    Coverage,
    /** **keyword**

Keyword. Keyword */
    Keyword,
    /** **knowledge-artifact-type**

Knowledge Artifact Type. Knowledge Artifact Type */
    KnowledgeArtifactType,
    /** **mesh-heading**

MeSH heading. MeSH heading */
    MeshHeading,
    /** **publication-type**

Publication type. Publication type */
    PublicationType,
    /** **publishing-model**

Publishing Model. Used for PubModel attribute in Medline */
    PublishingModel,
    /** **supplemental-mesh-disease**

Supplemental MeSH for Disease. Supplemental MeSH for Disease */
    SupplementalMeshDisease,
    /** **supplemental-mesh-organism**

Supplemental MeSH for Organism. Supplemental MeSH for Organism */
    SupplementalMeshOrganism,
    /** **supplemental-mesh-protocol**

Supplemental MeSH for Protocol. Supplemental MeSH for Protocol */
    SupplementalMeshProtocol,
}
impl ::core::str::FromStr for CitedArtifactClassificationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "chemical" => Ok(Self::Chemical),
            "citation-subset" => Ok(Self::CitationSubset),
            "coverage" => Ok(Self::Coverage),
            "keyword" => Ok(Self::Keyword),
            "knowledge-artifact-type" => Ok(Self::KnowledgeArtifactType),
            "mesh-heading" => Ok(Self::MeshHeading),
            "publication-type" => Ok(Self::PublicationType),
            "publishing-model" => Ok(Self::PublishingModel),
            "supplemental-mesh-disease" => Ok(Self::SupplementalMeshDisease),
            "supplemental-mesh-organism" => Ok(Self::SupplementalMeshOrganism),
            "supplemental-mesh-protocol" => Ok(Self::SupplementalMeshProtocol),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitedArtifactClassificationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Chemical => "chemical",
            Self::CitationSubset => "citation-subset",
            Self::Coverage => "coverage",
            Self::Keyword => "keyword",
            Self::KnowledgeArtifactType => "knowledge-artifact-type",
            Self::MeshHeading => "mesh-heading",
            Self::PublicationType => "publication-type",
            Self::PublishingModel => "publishing-model",
            Self::SupplementalMeshDisease => "supplemental-mesh-disease",
            Self::SupplementalMeshOrganism => "supplemental-mesh-organism",
            Self::SupplementalMeshProtocol => "supplemental-mesh-protocol",
        }
    }
}
impl ::std::fmt::Debug for CitedArtifactClassificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitedArtifactClassificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitedArtifactClassificationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitedArtifactClassificationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitedArtifactClassificationType> for Coding {
    fn from(code: CitedArtifactClassificationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/cited-artifact-classification-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitedArtifactClassificationType> for CodeableConcept {
    fn from(code: CitedArtifactClassificationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitedArtifactPartType](http://hl7.org/fhir/ValueSet/cited-artifact-part-type)**. To describe the reason for the variant citation, such as version number or subpart specification.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitedArtifactPartType {
    /** **article-set**

Part of an article set. Used to distinguish an individual article within an article set where the article set is a base citation. */
    ArticleSet,
    /** **figures**

figures. Denotes specific figure or figures of an article or artifact. */
    Figures,
    /** **lines**

lines. Denotes specific line or lines of an article or artifact. */
    Lines,
    /** **pages**

pages. Denotes specific page or pages of an article or artifact. */
    Pages,
    /** **paragraphs**

paragraphs. Denotes specific paragraph or paragraphs of an article or artifact. */
    Paragraphs,
    /** **sections**

sections. Denotes specific section or sections of an article or artifact. */
    Sections,
    /** **supplement**

Supplement or Appendix. Used to denote a supplementary file, appendix, or additional part that is not a subpart of the primary article. */
    Supplement,
    /** **supplement-subpart**

Supplement or Appendix Subpart. Used to denote a subpart within a supplementary file or appendix. */
    SupplementSubpart,
    /** **tables**

tables. Denotes specific table or tables of an article or artifact. */
    Tables,
}
impl ::core::str::FromStr for CitedArtifactPartType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "article-set" => Ok(Self::ArticleSet),
            "figures" => Ok(Self::Figures),
            "lines" => Ok(Self::Lines),
            "pages" => Ok(Self::Pages),
            "paragraphs" => Ok(Self::Paragraphs),
            "sections" => Ok(Self::Sections),
            "supplement" => Ok(Self::Supplement),
            "supplement-subpart" => Ok(Self::SupplementSubpart),
            "tables" => Ok(Self::Tables),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitedArtifactPartType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ArticleSet => "article-set",
            Self::Figures => "figures",
            Self::Lines => "lines",
            Self::Pages => "pages",
            Self::Paragraphs => "paragraphs",
            Self::Sections => "sections",
            Self::Supplement => "supplement",
            Self::SupplementSubpart => "supplement-subpart",
            Self::Tables => "tables",
        }
    }
}
impl ::std::fmt::Debug for CitedArtifactPartType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitedArtifactPartType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitedArtifactPartType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitedArtifactPartType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitedArtifactPartType> for Coding {
    fn from(code: CitedArtifactPartType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/cited-artifact-part-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitedArtifactPartType> for CodeableConcept {
    fn from(code: CitedArtifactPartType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitedArtifactStatusType](http://hl7.org/fhir/ValueSet/cited-artifact-status-type)**. Cited Artifact Status Type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitedArtifactStatusType {
    /** **accepted**

Accepted. The content that was not published yet has been approved for publication by the publisher and/or editor. */
    Accepted,
    /** **active**

Active. The content is considered complete for its current state by the content creator. */
    Active,
    /** **approved**

Approved. The content has been approved for a state transition, with the focus of approval described in the text associated with this coding. */
    Approved,
    /** **archived**

Archived. The content is retired or considered no longer current but still available as part of the public record. */
    Archived,
    /** **created**

Created. The content was originally constructed or composed. */
    Created,
    /** **draft**

Draft. The content is considered unfinished or incomplete and not representative of the current state desired by the content creator. */
    Draft,
    /** **post-review-pre-published**

Post review pre published. The content is in a state between the review(s) being completed and being published. */
    PostReviewPrePublished,
    /** **pre-review**

Pre review. The content is awaiting assignment and delivery to reviewer(s). */
    PreReview,
    /** **published-early-form**

Published early form. The content is published but future changes to the published version are expected. */
    PublishedEarlyForm,
    /** **published-final-form**

Published final form. The content is published and further changes to the content are not expected. */
    PublishedFinalForm,
    /** **rejected**

Rejected. The content that was not published has been removed from consideration for publishing by a publisher or editor. */
    Rejected,
    /** **retracted**

Retracted. The content that was published is removed from publication and should no longer be considered part of the public record. */
    Retracted,
    /** **submitted**

Submitted. The content was sent to the publisher for consideration of publication. */
    Submitted,
    /** **under-review**

Under review. The content is in a state of being reviewed. */
    UnderReview,
    /** **unknown**

Unknown. The status of the content is not recorded in the metadata. */
    Unknown,
    /** **withdrawn**

Withdrawn. The content that was not published has been removed from consideration for publishing by the submitter. */
    Withdrawn,
}
impl ::core::str::FromStr for CitedArtifactStatusType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accepted" => Ok(Self::Accepted),
            "active" => Ok(Self::Active),
            "approved" => Ok(Self::Approved),
            "archived" => Ok(Self::Archived),
            "created" => Ok(Self::Created),
            "draft" => Ok(Self::Draft),
            "post-review-pre-published" => Ok(Self::PostReviewPrePublished),
            "pre-review" => Ok(Self::PreReview),
            "published-early-form" => Ok(Self::PublishedEarlyForm),
            "published-final-form" => Ok(Self::PublishedFinalForm),
            "rejected" => Ok(Self::Rejected),
            "retracted" => Ok(Self::Retracted),
            "submitted" => Ok(Self::Submitted),
            "under-review" => Ok(Self::UnderReview),
            "unknown" => Ok(Self::Unknown),
            "withdrawn" => Ok(Self::Withdrawn),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitedArtifactStatusType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Accepted => "accepted",
            Self::Active => "active",
            Self::Approved => "approved",
            Self::Archived => "archived",
            Self::Created => "created",
            Self::Draft => "draft",
            Self::PostReviewPrePublished => "post-review-pre-published",
            Self::PreReview => "pre-review",
            Self::PublishedEarlyForm => "published-early-form",
            Self::PublishedFinalForm => "published-final-form",
            Self::Rejected => "rejected",
            Self::Retracted => "retracted",
            Self::Submitted => "submitted",
            Self::UnderReview => "under-review",
            Self::Unknown => "unknown",
            Self::Withdrawn => "withdrawn",
        }
    }
}
impl ::std::fmt::Debug for CitedArtifactStatusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitedArtifactStatusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitedArtifactStatusType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitedArtifactStatusType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitedArtifactStatusType> for Coding {
    fn from(code: CitedArtifactStatusType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/cited-artifact-status-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitedArtifactStatusType> for CodeableConcept {
    fn from(code: CitedArtifactStatusType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CitedMedium](http://hl7.org/fhir/ValueSet/cited-medium)**. NLM codes Internet or Print.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CitedMedium {
    /** **internet**

Internet. Online publication in a periodic release. Used to match NLM JournalIssue CitedMedium code for online version. */
    Internet,
    /** **internet-without-issue**

Internet without issue. Online publication without any periodic release. Used for article specific publication date which could be the same as or different from journal issue publication date. */
    InternetWithoutIssue,
    /** **offline-digital-storage**

Offline Digital Storage. Publication in a physical device for electronic data storage, organized in issues for periodic release. */
    OfflineDigitalStorage,
    /** **offline-digital-storage-without-issue**

Offline Digital Storage without issue. Publication in a physical device for electronic data storage, without any periodic release. */
    OfflineDigitalStorageWithoutIssue,
    /** **print**

Print. Print publication in a periodic release. Used to match NLM JournalIssue CitedMedium code for print version. */
    Print,
    /** **print-without-issue**

Print without issue. Print publication without any periodic release. */
    PrintWithoutIssue,
}
impl ::core::str::FromStr for CitedMedium {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "internet" => Ok(Self::Internet),
            "internet-without-issue" => Ok(Self::InternetWithoutIssue),
            "offline-digital-storage" => Ok(Self::OfflineDigitalStorage),
            "offline-digital-storage-without-issue" => {
                Ok(Self::OfflineDigitalStorageWithoutIssue)
            }
            "print" => Ok(Self::Print),
            "print-without-issue" => Ok(Self::PrintWithoutIssue),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CitedMedium {
    fn as_ref(&self) -> &str {
        match self {
            Self::Internet => "internet",
            Self::InternetWithoutIssue => "internet-without-issue",
            Self::OfflineDigitalStorage => "offline-digital-storage",
            Self::OfflineDigitalStorageWithoutIssue => {
                "offline-digital-storage-without-issue"
            }
            Self::Print => "print",
            Self::PrintWithoutIssue => "print-without-issue",
        }
    }
}
impl ::std::fmt::Debug for CitedMedium {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CitedMedium {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CitedMedium {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CitedMedium {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CitedMedium> for Coding {
    fn from(code: CitedMedium) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/cited-medium".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CitedMedium> for CodeableConcept {
    fn from(code: CitedMedium) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClaimAdjudicationDecisionCodes](http://hl7.org/fhir/claim-decision)**. This value set provides Claim Adjudication Decision codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ClaimAdjudicationDecisionCodes {
    /** **approved**

Approved. The claim, or individual services, are approved as submitted. */
    Approved,
    /** **denied**

Denied. The claim, or individual services, are not approved for any payment. This may also be known as 'rejected'. */
    Denied,
    /** **partial**

Partial. The claim, or individual services, are approved at an amount less than as submitted. */
    Partial,
    /** **pending**

Pending. The adjudication processing is not complete. This may be due to requiring manual review or receipt of additional information. */
    Pending,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ClaimAdjudicationDecisionCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "approved" => Ok(Self::Approved),
            "denied" => Ok(Self::Denied),
            "partial" => Ok(Self::Partial),
            "pending" => Ok(Self::Pending),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ClaimAdjudicationDecisionCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Approved => "approved",
            Self::Denied => "denied",
            Self::Partial => "partial",
            Self::Pending => "pending",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ClaimAdjudicationDecisionCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClaimAdjudicationDecisionCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClaimAdjudicationDecisionCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClaimAdjudicationDecisionCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClaimAdjudicationDecisionCodes> for Coding {
    fn from(code: ClaimAdjudicationDecisionCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/claim-decision".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClaimAdjudicationDecisionCodes> for CodeableConcept {
    fn from(code: ClaimAdjudicationDecisionCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClaimAdjudicationDecisionReasonCodes](http://hl7.org/fhir/claim-decision-reason)**. This value set provides example Claim Adjudication Decision Reason codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ClaimAdjudicationDecisionReasonCodes {
    /** **0001**

Not medically necessary. The payer has determined this product, service, or procedure as not medically necessary. */
    N0001,
    /** **0002**

Prior authorization not obtained. Prior authorization was not obtained prior to providing the product, service, or procedure. */
    N0002,
    /** **0003**

Provider out-of-network. This provider is considered out-of-network by the payer for this plan. */
    N0003,
    /** **0004**

Service inconsistent with patient age. The payer has determined this product, service, or procedure is not consistent with the patient's age. */
    N0004,
    /** **0005**

Benefit limits exceeded. The patient or subscriber benefit's have been exceeded. */
    N0005,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ClaimAdjudicationDecisionReasonCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "0001" => Ok(Self::N0001),
            "0002" => Ok(Self::N0002),
            "0003" => Ok(Self::N0003),
            "0004" => Ok(Self::N0004),
            "0005" => Ok(Self::N0005),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ClaimAdjudicationDecisionReasonCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::N0001 => "0001",
            Self::N0002 => "0002",
            Self::N0003 => "0003",
            Self::N0004 => "0004",
            Self::N0005 => "0005",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ClaimAdjudicationDecisionReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClaimAdjudicationDecisionReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClaimAdjudicationDecisionReasonCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClaimAdjudicationDecisionReasonCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClaimAdjudicationDecisionReasonCodes> for Coding {
    fn from(code: ClaimAdjudicationDecisionReasonCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/claim-decision-reason".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClaimAdjudicationDecisionReasonCodes> for CodeableConcept {
    fn from(code: ClaimAdjudicationDecisionReasonCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClaimProcessingCodes](http://hl7.org/fhir/ValueSet/eligibility-outcome)**. This value set includes Claim Processing Outcome codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ClaimProcessingCodes {
    /** **complete**

Processing Complete. The processing has completed without errors */
    Complete,
    /** **error**

Error. One or more errors have been detected in the Claim */
    Error,
    /** **partial**

Partial Processing. No errors have been detected in the Claim and some of the adjudication has been performed. */
    Partial,
    /** **queued**

Queued. The Claim/Pre-authorization/Pre-determination has been received but processing has not begun. */
    Queued,
}
impl ::core::str::FromStr for ClaimProcessingCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            "error" => Ok(Self::Error),
            "partial" => Ok(Self::Partial),
            "queued" => Ok(Self::Queued),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ClaimProcessingCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::Error => "error",
            Self::Partial => "partial",
            Self::Queued => "queued",
        }
    }
}
impl ::std::fmt::Debug for ClaimProcessingCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClaimProcessingCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClaimProcessingCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClaimProcessingCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClaimProcessingCodes> for Coding {
    fn from(code: ClaimProcessingCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/eligibility-outcome".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClaimProcessingCodes> for CodeableConcept {
    fn from(code: ClaimProcessingCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClaimProcessingOutcomeCodes](http://hl7.org/fhir/claim-outcome)**. This value set includes Claim Processing Outcome codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ClaimProcessingOutcomeCodes {
    /** **complete**

Processing Complete. The processing has completed without errors */
    Complete,
    /** **error**

Error. One or more errors have been detected in the Claim */
    Error,
    /** **partial**

Partial Processing. No errors have been detected in the Claim and some of the adjudication has been performed. */
    Partial,
    /** **queued**

Queued. The Claim/Pre-authorization/Pre-determination has been received but processing has not begun. */
    Queued,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ClaimProcessingOutcomeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            "error" => Ok(Self::Error),
            "partial" => Ok(Self::Partial),
            "queued" => Ok(Self::Queued),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ClaimProcessingOutcomeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::Error => "error",
            Self::Partial => "partial",
            Self::Queued => "queued",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ClaimProcessingOutcomeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClaimProcessingOutcomeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClaimProcessingOutcomeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClaimProcessingOutcomeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClaimProcessingOutcomeCodes> for Coding {
    fn from(code: ClaimProcessingOutcomeCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/claim-outcome".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClaimProcessingOutcomeCodes> for CodeableConcept {
    fn from(code: ClaimProcessingOutcomeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClinicalUseDefinitionCategory](http://hl7.org/fhir/ValueSet/clinical-use-definition-category)**. ClinicalUseDefinitionCategory\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ClinicalUseDefinitionCategory {
    /** **DriveAndMachines**

Effects on Ability to Drive and Use Machines. */
    DriveAndMachines,
    /** **Overdose**

Overdose. */
    Overdose,
    /** **Pregnancy**

Pregnancy and Lactation. */
    Pregnancy,
}
impl ::core::str::FromStr for ClinicalUseDefinitionCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "DriveAndMachines" => Ok(Self::DriveAndMachines),
            "Overdose" => Ok(Self::Overdose),
            "Pregnancy" => Ok(Self::Pregnancy),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ClinicalUseDefinitionCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::DriveAndMachines => "DriveAndMachines",
            Self::Overdose => "Overdose",
            Self::Pregnancy => "Pregnancy",
        }
    }
}
impl ::std::fmt::Debug for ClinicalUseDefinitionCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClinicalUseDefinitionCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClinicalUseDefinitionCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClinicalUseDefinitionCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClinicalUseDefinitionCategory> for Coding {
    fn from(code: ClinicalUseDefinitionCategory) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/clinical-use-definition-category"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClinicalUseDefinitionCategory> for CodeableConcept {
    fn from(code: ClinicalUseDefinitionCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ClinicalUseDefinitionType](http://hl7.org/fhir/ValueSet/clinical-use-definition-type)**. Overall defining type of this clinical use definition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ClinicalUseDefinitionType {
    /** **contraindication**

Contraindication. A reason for not giving the medication. */
    Contraindication,
    /** **indication**

Indication. A reason for giving the medication. */
    Indication,
    /** **interaction**

Interaction. Interactions between the medication and other substances. */
    Interaction,
    /** **undesirable-effect**

Undesirable Effect. Side effects or adverse effects associated with the medication. */
    UndesirableEffect,
    /** **warning**

Warning. A general warning or issue that is not specifically one of the other types. */
    Warning,
}
impl ::core::str::FromStr for ClinicalUseDefinitionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "contraindication" => Ok(Self::Contraindication),
            "indication" => Ok(Self::Indication),
            "interaction" => Ok(Self::Interaction),
            "undesirable-effect" => Ok(Self::UndesirableEffect),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ClinicalUseDefinitionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Contraindication => "contraindication",
            Self::Indication => "indication",
            Self::Interaction => "interaction",
            Self::UndesirableEffect => "undesirable-effect",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for ClinicalUseDefinitionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ClinicalUseDefinitionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ClinicalUseDefinitionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ClinicalUseDefinitionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ClinicalUseDefinitionType> for Coding {
    fn from(code: ClinicalUseDefinitionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/clinical-use-definition-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ClinicalUseDefinitionType> for CodeableConcept {
    fn from(code: ClinicalUseDefinitionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CodeSearchSupport](http://hl7.org/fhir/ValueSet/code-search-support)**. The degree to which the server supports the code search parameter on ValueSet, if it is supported.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CodeSearchSupport {
    /** **in-compose**

In Compose. The search for code on ValueSet returns ValueSet resources where the code is included in the extensional definition of the ValueSet. */
    InCompose,
    /** **in-compose-or-expansion**

In Compose Or Expansion. The search for code on ValueSet returns ValueSet resources where the code is included in the extensional definition or contained in the ValueSet expansion. */
    InComposeOrExpansion,
    /** **in-expansion**

In Expansion. The search for code on ValueSet returns ValueSet resources where the code is contained in the  ValueSet expansion. */
    InExpansion,
}
impl ::core::str::FromStr for CodeSearchSupport {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "in-compose" => Ok(Self::InCompose),
            "in-compose-or-expansion" => Ok(Self::InComposeOrExpansion),
            "in-expansion" => Ok(Self::InExpansion),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CodeSearchSupport {
    fn as_ref(&self) -> &str {
        match self {
            Self::InCompose => "in-compose",
            Self::InComposeOrExpansion => "in-compose-or-expansion",
            Self::InExpansion => "in-expansion",
        }
    }
}
impl ::std::fmt::Debug for CodeSearchSupport {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CodeSearchSupport {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CodeSearchSupport {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CodeSearchSupport {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CodeSearchSupport> for Coding {
    fn from(code: CodeSearchSupport) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/code-search-support".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CodeSearchSupport> for CodeableConcept {
    fn from(code: CodeSearchSupport) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CodeSystemContentMode](http://hl7.org/fhir/ValueSet/codesystem-content-mode)**. The extent of the content of the code system (the concepts and codes it defines) are represented in a code system resource.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CodeSystemContentMode {
    /** **complete**

Complete. All the concepts defined by the code system are included in the code system resource. */
    Complete,
    /** **example**

Example. A subset of the valid externally defined concepts are included in the code system resource. There is no specific purpose or documented intent other than for illustrative purposes. */
    Example,
    /** **fragment**

Fragment. A subset of the code system concepts are included in the code system resource. This is a curated subset released for a specific purpose under the governance of the code system steward, and that the intent, bounds and consequences of the fragmentation are clearly defined in the fragment or the code system documentation. Fragments are also known as partitions. */
    Fragment,
    /** **not-present**

Not Present. None of the concepts defined by the code system are included in the code system resource. */
    NotPresent,
    /** **supplement**

Supplement. The resource doesn't define any new concepts; it just provides additional designations and properties to another code system. */
    Supplement,
}
impl ::core::str::FromStr for CodeSystemContentMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            "example" => Ok(Self::Example),
            "fragment" => Ok(Self::Fragment),
            "not-present" => Ok(Self::NotPresent),
            "supplement" => Ok(Self::Supplement),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CodeSystemContentMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::Example => "example",
            Self::Fragment => "fragment",
            Self::NotPresent => "not-present",
            Self::Supplement => "supplement",
        }
    }
}
impl ::std::fmt::Debug for CodeSystemContentMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CodeSystemContentMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CodeSystemContentMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CodeSystemContentMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CodeSystemContentMode> for Coding {
    fn from(code: CodeSystemContentMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/codesystem-content-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CodeSystemContentMode> for CodeableConcept {
    fn from(code: CodeSystemContentMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CodeSystemHierarchyMeaning](http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning)**. The meaning of the hierarchy of concepts in a code system.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CodeSystemHierarchyMeaning {
    /** **classified-with**

Classified With. Child concepts in the hierarchy may have only one parent, and there is a presumption that the code system is a "closed world" meaning all things must be in the hierarchy. This results in concepts such as "not otherwise classified.". */
    ClassifiedWith,
    /** **grouped-by**

Grouped By. No particular relationship between the concepts can be assumed, except what can be determined by inspection of the definitions of the elements (possible reasons to use this: importing from a source where this is not defined, or where various parts of the hierarchy have different meanings). */
    GroupedBy,
    /** **is-a**

Is-A. A hierarchy where the child concepts have an IS-A relationship with the parents - that is, all the properties of the parent are also true for its child concepts. Not that is-a is a property of the concepts, so additional subsumption relationships may be defined using properties. */
    IsA,
    /** **part-of**

Part Of. Child elements list the individual parts of a composite whole (e.g. body site). */
    PartOf,
}
impl ::core::str::FromStr for CodeSystemHierarchyMeaning {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "classified-with" => Ok(Self::ClassifiedWith),
            "grouped-by" => Ok(Self::GroupedBy),
            "is-a" => Ok(Self::IsA),
            "part-of" => Ok(Self::PartOf),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CodeSystemHierarchyMeaning {
    fn as_ref(&self) -> &str {
        match self {
            Self::ClassifiedWith => "classified-with",
            Self::GroupedBy => "grouped-by",
            Self::IsA => "is-a",
            Self::PartOf => "part-of",
        }
    }
}
impl ::std::fmt::Debug for CodeSystemHierarchyMeaning {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CodeSystemHierarchyMeaning {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CodeSystemHierarchyMeaning {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CodeSystemHierarchyMeaning {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CodeSystemHierarchyMeaning> for Coding {
    fn from(code: CodeSystemHierarchyMeaning) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/codesystem-hierarchy-meaning".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CodeSystemHierarchyMeaning> for CodeableConcept {
    fn from(code: CodeSystemHierarchyMeaning) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ColorCodes](http://hl7.org/fhir/color-names)**. This code system represents that named RGB colors found in the [CSS4 specification](https://www.w3.org/TR/css-color-4/). The names are not case sensitive and different cases are encountered in common use (e.g. AliceBlue vs aliceblue.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ColorCodes {
    /** **aliceblue**

aliceblue. */
    Aliceblue,
    /** **antiquewhite**

antiquewhite. */
    Antiquewhite,
    /** **aqua**

aqua. */
    Aqua,
    /** **aquamarine**

aquamarine. */
    Aquamarine,
    /** **azure**

azure. */
    Azure,
    /** **beige**

beige. */
    Beige,
    /** **bisque**

bisque. */
    Bisque,
    /** **black**

black. */
    Black,
    /** **blanchedalmond**

blanchedalmond. */
    Blanchedalmond,
    /** **blue**

blue. */
    Blue,
    /** **blueviolet**

blueviolet. */
    Blueviolet,
    /** **brown**

brown. */
    Brown,
    /** **burlywood**

burlywood. */
    Burlywood,
    /** **cadetblue**

cadetblue. */
    Cadetblue,
    /** **chartreuse**

chartreuse. */
    Chartreuse,
    /** **chocolate**

chocolate. */
    Chocolate,
    /** **coral**

coral. */
    Coral,
    /** **cornflowerblue**

cornflowerblue. */
    Cornflowerblue,
    /** **cornsilk**

cornsilk. */
    Cornsilk,
    /** **crimson**

crimson. */
    Crimson,
    /** **cyan**

cyan. */
    Cyan,
    /** **darkblue**

darkblue. */
    Darkblue,
    /** **darkcyan**

darkcyan. */
    Darkcyan,
    /** **darkgoldenrod**

darkgoldenrod. */
    Darkgoldenrod,
    /** **darkgray**

darkgray. */
    Darkgray,
    /** **darkgreen**

darkgreen. */
    Darkgreen,
    /** **darkgrey**

darkgrey. */
    Darkgrey,
    /** **darkkhaki**

darkkhaki. */
    Darkkhaki,
    /** **darkmagenta**

darkmagenta. */
    Darkmagenta,
    /** **darkolivegreen**

darkolivegreen. */
    Darkolivegreen,
    /** **darkorange**

darkorange. */
    Darkorange,
    /** **darkorchid**

darkorchid. */
    Darkorchid,
    /** **darkred**

darkred. */
    Darkred,
    /** **darksalmon**

darksalmon. */
    Darksalmon,
    /** **darkseagreen**

darkseagreen. */
    Darkseagreen,
    /** **darkslateblue**

darkslateblue. */
    Darkslateblue,
    /** **darkslategray**

darkslategray. */
    Darkslategray,
    /** **darkslategrey**

darkslategrey. */
    Darkslategrey,
    /** **darkturquoise**

darkturquoise. */
    Darkturquoise,
    /** **darkviolet**

darkviolet. */
    Darkviolet,
    /** **deeppink**

deeppink. */
    Deeppink,
    /** **deepskyblue**

deepskyblue. */
    Deepskyblue,
    /** **dimgray**

dimgray. */
    Dimgray,
    /** **dimgrey**

dimgrey. */
    Dimgrey,
    /** **dodgerblue**

dodgerblue. */
    Dodgerblue,
    /** **firebrick**

firebrick. */
    Firebrick,
    /** **floralwhite**

floralwhite. */
    Floralwhite,
    /** **forestgreen**

forestgreen. */
    Forestgreen,
    /** **fuchsia**

fuchsia. */
    Fuchsia,
    /** **gainsboro**

gainsboro. */
    Gainsboro,
    /** **ghostwhite**

ghostwhite. */
    Ghostwhite,
    /** **gold**

gold. */
    Gold,
    /** **goldenrod**

goldenrod. */
    Goldenrod,
    /** **gray**

gray. */
    Gray,
    /** **green**

green. */
    Green,
    /** **greenyellow**

greenyellow. */
    Greenyellow,
    /** **grey**

grey. */
    Grey,
    /** **honeydew**

honeydew. */
    Honeydew,
    /** **hotpink**

hotpink. */
    Hotpink,
    /** **indianred**

indianred. */
    Indianred,
    /** **indigo**

indigo. */
    Indigo,
    /** **ivory**

ivory. */
    Ivory,
    /** **khaki**

khaki. */
    Khaki,
    /** **lavender**

lavender. */
    Lavender,
    /** **lavenderblush**

lavenderblush. */
    Lavenderblush,
    /** **lawngreen**

lawngreen. */
    Lawngreen,
    /** **lemonchiffon**

lemonchiffon. */
    Lemonchiffon,
    /** **lightblue**

lightblue. */
    Lightblue,
    /** **lightcoral**

lightcoral. */
    Lightcoral,
    /** **lightcyan**

lightcyan. */
    Lightcyan,
    /** **lightgoldenrodyellow**

lightgoldenrodyellow. */
    Lightgoldenrodyellow,
    /** **lightgray**

lightgray. */
    Lightgray,
    /** **lightgreen**

lightgreen. */
    Lightgreen,
    /** **lightgrey**

lightgrey. */
    Lightgrey,
    /** **lightpink**

lightpink. */
    Lightpink,
    /** **lightsalmon**

lightsalmon. */
    Lightsalmon,
    /** **lightseagreen**

lightseagreen. */
    Lightseagreen,
    /** **lightskyblue**

lightskyblue. */
    Lightskyblue,
    /** **lightslategray**

lightslategray. */
    Lightslategray,
    /** **lightslategrey**

lightslategrey. */
    Lightslategrey,
    /** **lightsteelblue**

lightsteelblue. */
    Lightsteelblue,
    /** **lightyellow**

lightyellow. */
    Lightyellow,
    /** **lime**

lime. */
    Lime,
    /** **limegreen**

limegreen. */
    Limegreen,
    /** **linen**

linen. */
    Linen,
    /** **magenta**

magenta. */
    Magenta,
    /** **maroon**

maroon. */
    Maroon,
    /** **mediumaquamarine**

mediumaquamarine. */
    Mediumaquamarine,
    /** **mediumblue**

mediumblue. */
    Mediumblue,
    /** **mediumorchid**

mediumorchid. */
    Mediumorchid,
    /** **mediumpurple**

mediumpurple. */
    Mediumpurple,
    /** **mediumseagreen**

mediumseagreen. */
    Mediumseagreen,
    /** **mediumslateblue**

mediumslateblue. */
    Mediumslateblue,
    /** **mediumspringgreen**

mediumspringgreen. */
    Mediumspringgreen,
    /** **mediumturquoise**

mediumturquoise. */
    Mediumturquoise,
    /** **mediumvioletred**

mediumvioletred. */
    Mediumvioletred,
    /** **midnightblue**

midnightblue. */
    Midnightblue,
    /** **mintcream**

mintcream. */
    Mintcream,
    /** **mistyrose**

mistyrose. */
    Mistyrose,
    /** **moccasin**

moccasin. */
    Moccasin,
    /** **navajowhite**

navajowhite. */
    Navajowhite,
    /** **navy**

navy. */
    Navy,
    /** **oldlace**

oldlace. */
    Oldlace,
    /** **olive**

olive. */
    Olive,
    /** **olivedrab**

olivedrab. */
    Olivedrab,
    /** **orange**

orange. */
    Orange,
    /** **orangered**

orangered. */
    Orangered,
    /** **orchid**

orchid. */
    Orchid,
    /** **palegoldenrod**

palegoldenrod. */
    Palegoldenrod,
    /** **palegreen**

palegreen. */
    Palegreen,
    /** **paleturquoise**

paleturquoise. */
    Paleturquoise,
    /** **palevioletred**

palevioletred. */
    Palevioletred,
    /** **papayawhip**

papayawhip. */
    Papayawhip,
    /** **peachpuff**

peachpuff. */
    Peachpuff,
    /** **peru**

peru. */
    Peru,
    /** **pink**

pink. */
    Pink,
    /** **plum**

plum. */
    Plum,
    /** **powderblue**

powderblue. */
    Powderblue,
    /** **purple**

purple. */
    Purple,
    /** **rebeccapurple**

rebeccapurple. */
    Rebeccapurple,
    /** **red**

red. */
    Red,
    /** **rosybrown**

rosybrown. */
    Rosybrown,
    /** **royalblue**

royalblue. */
    Royalblue,
    /** **saddlebrown**

saddlebrown. */
    Saddlebrown,
    /** **salmon**

salmon. */
    Salmon,
    /** **sandybrown**

sandybrown. */
    Sandybrown,
    /** **seagreen**

seagreen. */
    Seagreen,
    /** **seashell**

seashell. */
    Seashell,
    /** **sienna**

sienna. */
    Sienna,
    /** **silver**

silver. */
    Silver,
    /** **skyblue**

skyblue. */
    Skyblue,
    /** **slateblue**

slateblue. */
    Slateblue,
    /** **slategray**

slategray. */
    Slategray,
    /** **slategrey**

slategrey. */
    Slategrey,
    /** **snow**

snow. */
    Snow,
    /** **springgreen**

springgreen. */
    Springgreen,
    /** **steelblue**

steelblue. */
    Steelblue,
    /** **tan**

tan. */
    Tan,
    /** **teal**

teal. */
    Teal,
    /** **thistle**

thistle. */
    Thistle,
    /** **tomato**

tomato. */
    Tomato,
    /** **turquoise**

turquoise. */
    Turquoise,
    /** **violet**

violet. */
    Violet,
    /** **wheat**

wheat. */
    Wheat,
    /** **white**

white. */
    White,
    /** **whitesmoke**

whitesmoke. */
    Whitesmoke,
    /** **yellow**

yellow. */
    Yellow,
    /** **yellowgreen**

yellowgreen. */
    Yellowgreen,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ColorCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s.to_lowercase().as_str() {
            "aliceblue" => Ok(Self::Aliceblue),
            "antiquewhite" => Ok(Self::Antiquewhite),
            "aqua" => Ok(Self::Aqua),
            "aquamarine" => Ok(Self::Aquamarine),
            "azure" => Ok(Self::Azure),
            "beige" => Ok(Self::Beige),
            "bisque" => Ok(Self::Bisque),
            "black" => Ok(Self::Black),
            "blanchedalmond" => Ok(Self::Blanchedalmond),
            "blue" => Ok(Self::Blue),
            "blueviolet" => Ok(Self::Blueviolet),
            "brown" => Ok(Self::Brown),
            "burlywood" => Ok(Self::Burlywood),
            "cadetblue" => Ok(Self::Cadetblue),
            "chartreuse" => Ok(Self::Chartreuse),
            "chocolate" => Ok(Self::Chocolate),
            "coral" => Ok(Self::Coral),
            "cornflowerblue" => Ok(Self::Cornflowerblue),
            "cornsilk" => Ok(Self::Cornsilk),
            "crimson" => Ok(Self::Crimson),
            "cyan" => Ok(Self::Cyan),
            "darkblue" => Ok(Self::Darkblue),
            "darkcyan" => Ok(Self::Darkcyan),
            "darkgoldenrod" => Ok(Self::Darkgoldenrod),
            "darkgray" => Ok(Self::Darkgray),
            "darkgreen" => Ok(Self::Darkgreen),
            "darkgrey" => Ok(Self::Darkgrey),
            "darkkhaki" => Ok(Self::Darkkhaki),
            "darkmagenta" => Ok(Self::Darkmagenta),
            "darkolivegreen" => Ok(Self::Darkolivegreen),
            "darkorange" => Ok(Self::Darkorange),
            "darkorchid" => Ok(Self::Darkorchid),
            "darkred" => Ok(Self::Darkred),
            "darksalmon" => Ok(Self::Darksalmon),
            "darkseagreen" => Ok(Self::Darkseagreen),
            "darkslateblue" => Ok(Self::Darkslateblue),
            "darkslategray" => Ok(Self::Darkslategray),
            "darkslategrey" => Ok(Self::Darkslategrey),
            "darkturquoise" => Ok(Self::Darkturquoise),
            "darkviolet" => Ok(Self::Darkviolet),
            "deeppink" => Ok(Self::Deeppink),
            "deepskyblue" => Ok(Self::Deepskyblue),
            "dimgray" => Ok(Self::Dimgray),
            "dimgrey" => Ok(Self::Dimgrey),
            "dodgerblue" => Ok(Self::Dodgerblue),
            "firebrick" => Ok(Self::Firebrick),
            "floralwhite" => Ok(Self::Floralwhite),
            "forestgreen" => Ok(Self::Forestgreen),
            "fuchsia" => Ok(Self::Fuchsia),
            "gainsboro" => Ok(Self::Gainsboro),
            "ghostwhite" => Ok(Self::Ghostwhite),
            "gold" => Ok(Self::Gold),
            "goldenrod" => Ok(Self::Goldenrod),
            "gray" => Ok(Self::Gray),
            "green" => Ok(Self::Green),
            "greenyellow" => Ok(Self::Greenyellow),
            "grey" => Ok(Self::Grey),
            "honeydew" => Ok(Self::Honeydew),
            "hotpink" => Ok(Self::Hotpink),
            "indianred" => Ok(Self::Indianred),
            "indigo" => Ok(Self::Indigo),
            "ivory" => Ok(Self::Ivory),
            "khaki" => Ok(Self::Khaki),
            "lavender" => Ok(Self::Lavender),
            "lavenderblush" => Ok(Self::Lavenderblush),
            "lawngreen" => Ok(Self::Lawngreen),
            "lemonchiffon" => Ok(Self::Lemonchiffon),
            "lightblue" => Ok(Self::Lightblue),
            "lightcoral" => Ok(Self::Lightcoral),
            "lightcyan" => Ok(Self::Lightcyan),
            "lightgoldenrodyellow" => Ok(Self::Lightgoldenrodyellow),
            "lightgray" => Ok(Self::Lightgray),
            "lightgreen" => Ok(Self::Lightgreen),
            "lightgrey" => Ok(Self::Lightgrey),
            "lightpink" => Ok(Self::Lightpink),
            "lightsalmon" => Ok(Self::Lightsalmon),
            "lightseagreen" => Ok(Self::Lightseagreen),
            "lightskyblue" => Ok(Self::Lightskyblue),
            "lightslategray" => Ok(Self::Lightslategray),
            "lightslategrey" => Ok(Self::Lightslategrey),
            "lightsteelblue" => Ok(Self::Lightsteelblue),
            "lightyellow" => Ok(Self::Lightyellow),
            "lime" => Ok(Self::Lime),
            "limegreen" => Ok(Self::Limegreen),
            "linen" => Ok(Self::Linen),
            "magenta" => Ok(Self::Magenta),
            "maroon" => Ok(Self::Maroon),
            "mediumaquamarine" => Ok(Self::Mediumaquamarine),
            "mediumblue" => Ok(Self::Mediumblue),
            "mediumorchid" => Ok(Self::Mediumorchid),
            "mediumpurple" => Ok(Self::Mediumpurple),
            "mediumseagreen" => Ok(Self::Mediumseagreen),
            "mediumslateblue" => Ok(Self::Mediumslateblue),
            "mediumspringgreen" => Ok(Self::Mediumspringgreen),
            "mediumturquoise" => Ok(Self::Mediumturquoise),
            "mediumvioletred" => Ok(Self::Mediumvioletred),
            "midnightblue" => Ok(Self::Midnightblue),
            "mintcream" => Ok(Self::Mintcream),
            "mistyrose" => Ok(Self::Mistyrose),
            "moccasin" => Ok(Self::Moccasin),
            "navajowhite" => Ok(Self::Navajowhite),
            "navy" => Ok(Self::Navy),
            "oldlace" => Ok(Self::Oldlace),
            "olive" => Ok(Self::Olive),
            "olivedrab" => Ok(Self::Olivedrab),
            "orange" => Ok(Self::Orange),
            "orangered" => Ok(Self::Orangered),
            "orchid" => Ok(Self::Orchid),
            "palegoldenrod" => Ok(Self::Palegoldenrod),
            "palegreen" => Ok(Self::Palegreen),
            "paleturquoise" => Ok(Self::Paleturquoise),
            "palevioletred" => Ok(Self::Palevioletred),
            "papayawhip" => Ok(Self::Papayawhip),
            "peachpuff" => Ok(Self::Peachpuff),
            "peru" => Ok(Self::Peru),
            "pink" => Ok(Self::Pink),
            "plum" => Ok(Self::Plum),
            "powderblue" => Ok(Self::Powderblue),
            "purple" => Ok(Self::Purple),
            "rebeccapurple" => Ok(Self::Rebeccapurple),
            "red" => Ok(Self::Red),
            "rosybrown" => Ok(Self::Rosybrown),
            "royalblue" => Ok(Self::Royalblue),
            "saddlebrown" => Ok(Self::Saddlebrown),
            "salmon" => Ok(Self::Salmon),
            "sandybrown" => Ok(Self::Sandybrown),
            "seagreen" => Ok(Self::Seagreen),
            "seashell" => Ok(Self::Seashell),
            "sienna" => Ok(Self::Sienna),
            "silver" => Ok(Self::Silver),
            "skyblue" => Ok(Self::Skyblue),
            "slateblue" => Ok(Self::Slateblue),
            "slategray" => Ok(Self::Slategray),
            "slategrey" => Ok(Self::Slategrey),
            "snow" => Ok(Self::Snow),
            "springgreen" => Ok(Self::Springgreen),
            "steelblue" => Ok(Self::Steelblue),
            "tan" => Ok(Self::Tan),
            "teal" => Ok(Self::Teal),
            "thistle" => Ok(Self::Thistle),
            "tomato" => Ok(Self::Tomato),
            "turquoise" => Ok(Self::Turquoise),
            "violet" => Ok(Self::Violet),
            "wheat" => Ok(Self::Wheat),
            "white" => Ok(Self::White),
            "whitesmoke" => Ok(Self::Whitesmoke),
            "yellow" => Ok(Self::Yellow),
            "yellowgreen" => Ok(Self::Yellowgreen),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ColorCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aliceblue => "aliceblue",
            Self::Antiquewhite => "antiquewhite",
            Self::Aqua => "aqua",
            Self::Aquamarine => "aquamarine",
            Self::Azure => "azure",
            Self::Beige => "beige",
            Self::Bisque => "bisque",
            Self::Black => "black",
            Self::Blanchedalmond => "blanchedalmond",
            Self::Blue => "blue",
            Self::Blueviolet => "blueviolet",
            Self::Brown => "brown",
            Self::Burlywood => "burlywood",
            Self::Cadetblue => "cadetblue",
            Self::Chartreuse => "chartreuse",
            Self::Chocolate => "chocolate",
            Self::Coral => "coral",
            Self::Cornflowerblue => "cornflowerblue",
            Self::Cornsilk => "cornsilk",
            Self::Crimson => "crimson",
            Self::Cyan => "cyan",
            Self::Darkblue => "darkblue",
            Self::Darkcyan => "darkcyan",
            Self::Darkgoldenrod => "darkgoldenrod",
            Self::Darkgray => "darkgray",
            Self::Darkgreen => "darkgreen",
            Self::Darkgrey => "darkgrey",
            Self::Darkkhaki => "darkkhaki",
            Self::Darkmagenta => "darkmagenta",
            Self::Darkolivegreen => "darkolivegreen",
            Self::Darkorange => "darkorange",
            Self::Darkorchid => "darkorchid",
            Self::Darkred => "darkred",
            Self::Darksalmon => "darksalmon",
            Self::Darkseagreen => "darkseagreen",
            Self::Darkslateblue => "darkslateblue",
            Self::Darkslategray => "darkslategray",
            Self::Darkslategrey => "darkslategrey",
            Self::Darkturquoise => "darkturquoise",
            Self::Darkviolet => "darkviolet",
            Self::Deeppink => "deeppink",
            Self::Deepskyblue => "deepskyblue",
            Self::Dimgray => "dimgray",
            Self::Dimgrey => "dimgrey",
            Self::Dodgerblue => "dodgerblue",
            Self::Firebrick => "firebrick",
            Self::Floralwhite => "floralwhite",
            Self::Forestgreen => "forestgreen",
            Self::Fuchsia => "fuchsia",
            Self::Gainsboro => "gainsboro",
            Self::Ghostwhite => "ghostwhite",
            Self::Gold => "gold",
            Self::Goldenrod => "goldenrod",
            Self::Gray => "gray",
            Self::Green => "green",
            Self::Greenyellow => "greenyellow",
            Self::Grey => "grey",
            Self::Honeydew => "honeydew",
            Self::Hotpink => "hotpink",
            Self::Indianred => "indianred",
            Self::Indigo => "indigo",
            Self::Ivory => "ivory",
            Self::Khaki => "khaki",
            Self::Lavender => "lavender",
            Self::Lavenderblush => "lavenderblush",
            Self::Lawngreen => "lawngreen",
            Self::Lemonchiffon => "lemonchiffon",
            Self::Lightblue => "lightblue",
            Self::Lightcoral => "lightcoral",
            Self::Lightcyan => "lightcyan",
            Self::Lightgoldenrodyellow => "lightgoldenrodyellow",
            Self::Lightgray => "lightgray",
            Self::Lightgreen => "lightgreen",
            Self::Lightgrey => "lightgrey",
            Self::Lightpink => "lightpink",
            Self::Lightsalmon => "lightsalmon",
            Self::Lightseagreen => "lightseagreen",
            Self::Lightskyblue => "lightskyblue",
            Self::Lightslategray => "lightslategray",
            Self::Lightslategrey => "lightslategrey",
            Self::Lightsteelblue => "lightsteelblue",
            Self::Lightyellow => "lightyellow",
            Self::Lime => "lime",
            Self::Limegreen => "limegreen",
            Self::Linen => "linen",
            Self::Magenta => "magenta",
            Self::Maroon => "maroon",
            Self::Mediumaquamarine => "mediumaquamarine",
            Self::Mediumblue => "mediumblue",
            Self::Mediumorchid => "mediumorchid",
            Self::Mediumpurple => "mediumpurple",
            Self::Mediumseagreen => "mediumseagreen",
            Self::Mediumslateblue => "mediumslateblue",
            Self::Mediumspringgreen => "mediumspringgreen",
            Self::Mediumturquoise => "mediumturquoise",
            Self::Mediumvioletred => "mediumvioletred",
            Self::Midnightblue => "midnightblue",
            Self::Mintcream => "mintcream",
            Self::Mistyrose => "mistyrose",
            Self::Moccasin => "moccasin",
            Self::Navajowhite => "navajowhite",
            Self::Navy => "navy",
            Self::Oldlace => "oldlace",
            Self::Olive => "olive",
            Self::Olivedrab => "olivedrab",
            Self::Orange => "orange",
            Self::Orangered => "orangered",
            Self::Orchid => "orchid",
            Self::Palegoldenrod => "palegoldenrod",
            Self::Palegreen => "palegreen",
            Self::Paleturquoise => "paleturquoise",
            Self::Palevioletred => "palevioletred",
            Self::Papayawhip => "papayawhip",
            Self::Peachpuff => "peachpuff",
            Self::Peru => "peru",
            Self::Pink => "pink",
            Self::Plum => "plum",
            Self::Powderblue => "powderblue",
            Self::Purple => "purple",
            Self::Rebeccapurple => "rebeccapurple",
            Self::Red => "red",
            Self::Rosybrown => "rosybrown",
            Self::Royalblue => "royalblue",
            Self::Saddlebrown => "saddlebrown",
            Self::Salmon => "salmon",
            Self::Sandybrown => "sandybrown",
            Self::Seagreen => "seagreen",
            Self::Seashell => "seashell",
            Self::Sienna => "sienna",
            Self::Silver => "silver",
            Self::Skyblue => "skyblue",
            Self::Slateblue => "slateblue",
            Self::Slategray => "slategray",
            Self::Slategrey => "slategrey",
            Self::Snow => "snow",
            Self::Springgreen => "springgreen",
            Self::Steelblue => "steelblue",
            Self::Tan => "tan",
            Self::Teal => "teal",
            Self::Thistle => "thistle",
            Self::Tomato => "tomato",
            Self::Turquoise => "turquoise",
            Self::Violet => "violet",
            Self::Wheat => "wheat",
            Self::White => "white",
            Self::Whitesmoke => "whitesmoke",
            Self::Yellow => "yellow",
            Self::Yellowgreen => "yellowgreen",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ColorCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ColorCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ColorCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ColorCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ColorCodes> for Coding {
    fn from(code: ColorCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/color-names".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ColorCodes> for CodeableConcept {
    fn from(code: ColorCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CombinedDoseForm](http://hl7.org/fhir/ValueSet/combined-dose-form)**. Dose forms for a product as a whole, considering all individual parts, but before any mixing\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CombinedDoseForm {
    /** **100000073366**

Powder and solvent for oral solution. */
    N100000073366,
    /** **100000073651**

Powder and solvent for oral suspension. */
    N100000073651,
    /** **100000073774**

Eye drops, powder and solvent for solution. */
    N100000073774,
    /** **100000073781**

Eye drops, powder and solvent for suspension. */
    N100000073781,
    /** **100000073801**

Ear drops, powder and solvent for suspension. */
    N100000073801,
    /** **100000073860**

Powder and solvent for solution for infusion. */
    N100000073860,
    /** **100000073868**

Powder and solvent for solution for injection. */
    N100000073868,
    /** **100000073869**

Powder and solvent for suspension for injection. */
    N100000073869,
    /** **100000073884**

Powder and solvent for implantation paste. */
    N100000073884,
    /** **100000073891**

Endotracheopulmonary instillation, powder and solvent for solution. */
    N100000073891,
    /** **100000073892**

Powder and solvent for endocervical gel. */
    N100000073892,
    /** **100000073941**

Powder and solvent for sealant. */
    N100000073941,
    /** **100000073972**

Concentrate and solvent for concentrate for solution for infusion. */
    N100000073972,
    /** **100000073973**

Concentrate and solvent for cutaneous use. */
    N100000073973,
    /** **100000073974**

Concentrate and solvent for injection. */
    N100000073974,
    /** **100000073975**

Concentrate and solvent for solution for infusion. */
    N100000073975,
    /** **100000073987**

Concentrate and diluent for solution for infusion. */
    N100000073987,
    /** **100000073988**

Concentrate and solvent for cutaneous solution. */
    N100000073988,
    /** **100000073989**

Concentrate and solvent for solution for injection. */
    N100000073989,
    /** **100000073990**

Concentrate and solvent for suspension for injection. */
    N100000073990,
    /** **100000073999**

Granules and solvent for suspension for injection. */
    N100000073999,
    /** **100000074015**

Powder and solvent for concentrate for solution for infusion. */
    N100000074015,
    /** **100000074016**

Powder and solvent for cutaneous solution. */
    N100000074016,
    /** **100000074017**

Powder and solvent for gingival gel. */
    N100000074017,
    /** **100000074018**

Powder and solvent for prolonged-release suspension for injection. */
    N100000074018,
    /** **100000074030**

Powder and solvent for endosinusial solution. */
    N100000074030,
    /** **100000074031**

Powder and solvent for intraocular instillation solution. */
    N100000074031,
    /** **100000074032**

Powder and suspension for suspension for injection. */
    N100000074032,
    /** **100000074048**

Suspension and effervescent granules for oral suspension. */
    N100000074048,
    /** **100000074051**

Tablet and solvent for rectal suspension. */
    N100000074051,
    /** **100000074053**

Powder and solvent for dental gel. */
    N100000074053,
    /** **100000074056**

Gas and solvent for dispersion for injection/infusion. */
    N100000074056,
    /** **100000074057**

Powder and solvent for solution for injection/infusion. */
    N100000074057,
    /** **100000074061**

Suspension and solution for spray. */
    N100000074061,
    /** **100000074064**

Tablet and powder for oral solution. */
    N100000074064,
    /** **100000075580**

Emulsion and suspension for emulsion for injection. */
    N100000075580,
    /** **100000075584**

Powder and solvent for dispersion for injection. */
    N100000075584,
    /** **100000075587**

Powder for mouth wash. */
    N100000075587,
    /** **100000116137**

Lyophilisate and solvent for solution for injection. */
    N100000116137,
    /** **100000116141**

Fibrin sealant-powder and solvent for fibrin sealant. */
    N100000116141,
    /** **100000116155**

Granules and solvent for oral suspension. */
    N100000116155,
    /** **100000116160**

Lyophilisate and solvent for suspension for injection. */
    N100000116160,
    /** **100000116172**

Powder and gel for gel. */
    N100000116172,
    /** **100000116173**

Powder and solution for solution for injection. */
    N100000116173,
    /** **100000116174**

Powder and solvent for epilesional solution. */
    N100000116174,
    /** **100000116175**

Powder and solvent for intravesical solution. */
    N100000116175,
    /** **100000116176**

Powder and solvent for intravesical suspension. */
    N100000116176,
    /** **100000116177**

Powder and solvent for nebuliser solution. */
    N100000116177,
    /** **100000116179**

Powder, dispersion and solvent for concentrate for dispersion for infusion. */
    N100000116179,
    /** **100000125746**

Powder and solvent for emulsion for injection. */
    N100000125746,
    /** **100000125747**

Nasal drops, powder and solvent for solution. */
    N100000125747,
    /** **100000125777**

Suspension and solvent for suspension for injection. */
    N100000125777,
    /** **100000136318**

Concentrate and solvent for solution for injection/infusion. */
    N100000136318,
    /** **100000136325**

Powder and solvent for solution for injection/skin-prick test. */
    N100000136325,
    /** **100000136558**

Lyophilisate and solvent for suspension for nasal administration. */
    N100000136558,
    /** **100000136560**

Powder and solvent for solution for sealant. */
    N100000136560,
    /** **100000136907**

Solution for dispersion for injection/infusion. */
    N100000136907,
    /** **100000143502**

Powder and solution for dental cement. */
    N100000143502,
    /** **100000143546**

Endotracheopulmonary instillation, powder and solvent for suspension. */
    N100000143546,
    /** **100000143552**

Powder, solvent and matrix for implantation matrix. */
    N100000143552,
    /** **100000156068**

Nasal drops, lyophilisate and solvent for suspension. */
    N100000156068,
    /** **100000157796**

Lyophilisate and suspension for suspension for injection. */
    N100000157796,
    /** **100000164467**

Powder for concentrate and solution for solution for infusion. */
    N100000164467,
    /** **100000169997**

Powder and solution for bee-hive solution. */
    N100000169997,
    /** **100000170588**

Suspension and solvent for oral spray. */
    N100000170588,
    /** **100000171127**

Lyophilisate and solvent for oral suspension. */
    N100000171127,
    /** **100000171193**

Concentrate and solvent for concentrate for oral spray, suspension. */
    N100000171193,
    /** **100000171238**

Lyophilisate and solvent for oculonasal suspension. */
    N100000171238,
    /** **100000171935**

Emulsion and lyophilisate for suspension for injection. */
    N100000171935,
    /** **100000174065**

Powder and solvent for syrup. */
    N100000174065,
    /** **200000002161**

Nasal spray, lyophilisate and solvent for suspension. */
    N200000002161,
    /** **200000002287**

Powder and solution for bee-hive dispersion. */
    N200000002287,
    /** **200000004201**

Solution and dispersion for nebuliser dispersion. */
    N200000004201,
    /** **200000004819**

Effervescent powder and powder for oral suspension. */
    N200000004819,
    /** **200000004820**

Lyophilisate and solvent for emulsion for injection. */
    N200000004820,
    /** **200000005547**

Powder and solution for suspension for injection. */
    N200000005547,
    /** **200000010382**

Lyophilisate and solvent for suspension for nasal spray or injection. */
    N200000010382,
}
impl ::core::str::FromStr for CombinedDoseForm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000073366" => Ok(Self::N100000073366),
            "100000073651" => Ok(Self::N100000073651),
            "100000073774" => Ok(Self::N100000073774),
            "100000073781" => Ok(Self::N100000073781),
            "100000073801" => Ok(Self::N100000073801),
            "100000073860" => Ok(Self::N100000073860),
            "100000073868" => Ok(Self::N100000073868),
            "100000073869" => Ok(Self::N100000073869),
            "100000073884" => Ok(Self::N100000073884),
            "100000073891" => Ok(Self::N100000073891),
            "100000073892" => Ok(Self::N100000073892),
            "100000073941" => Ok(Self::N100000073941),
            "100000073972" => Ok(Self::N100000073972),
            "100000073973" => Ok(Self::N100000073973),
            "100000073974" => Ok(Self::N100000073974),
            "100000073975" => Ok(Self::N100000073975),
            "100000073987" => Ok(Self::N100000073987),
            "100000073988" => Ok(Self::N100000073988),
            "100000073989" => Ok(Self::N100000073989),
            "100000073990" => Ok(Self::N100000073990),
            "100000073999" => Ok(Self::N100000073999),
            "100000074015" => Ok(Self::N100000074015),
            "100000074016" => Ok(Self::N100000074016),
            "100000074017" => Ok(Self::N100000074017),
            "100000074018" => Ok(Self::N100000074018),
            "100000074030" => Ok(Self::N100000074030),
            "100000074031" => Ok(Self::N100000074031),
            "100000074032" => Ok(Self::N100000074032),
            "100000074048" => Ok(Self::N100000074048),
            "100000074051" => Ok(Self::N100000074051),
            "100000074053" => Ok(Self::N100000074053),
            "100000074056" => Ok(Self::N100000074056),
            "100000074057" => Ok(Self::N100000074057),
            "100000074061" => Ok(Self::N100000074061),
            "100000074064" => Ok(Self::N100000074064),
            "100000075580" => Ok(Self::N100000075580),
            "100000075584" => Ok(Self::N100000075584),
            "100000075587" => Ok(Self::N100000075587),
            "100000116137" => Ok(Self::N100000116137),
            "100000116141" => Ok(Self::N100000116141),
            "100000116155" => Ok(Self::N100000116155),
            "100000116160" => Ok(Self::N100000116160),
            "100000116172" => Ok(Self::N100000116172),
            "100000116173" => Ok(Self::N100000116173),
            "100000116174" => Ok(Self::N100000116174),
            "100000116175" => Ok(Self::N100000116175),
            "100000116176" => Ok(Self::N100000116176),
            "100000116177" => Ok(Self::N100000116177),
            "100000116179" => Ok(Self::N100000116179),
            "100000125746" => Ok(Self::N100000125746),
            "100000125747" => Ok(Self::N100000125747),
            "100000125777" => Ok(Self::N100000125777),
            "100000136318" => Ok(Self::N100000136318),
            "100000136325" => Ok(Self::N100000136325),
            "100000136558" => Ok(Self::N100000136558),
            "100000136560" => Ok(Self::N100000136560),
            "100000136907" => Ok(Self::N100000136907),
            "100000143502" => Ok(Self::N100000143502),
            "100000143546" => Ok(Self::N100000143546),
            "100000143552" => Ok(Self::N100000143552),
            "100000156068" => Ok(Self::N100000156068),
            "100000157796" => Ok(Self::N100000157796),
            "100000164467" => Ok(Self::N100000164467),
            "100000169997" => Ok(Self::N100000169997),
            "100000170588" => Ok(Self::N100000170588),
            "100000171127" => Ok(Self::N100000171127),
            "100000171193" => Ok(Self::N100000171193),
            "100000171238" => Ok(Self::N100000171238),
            "100000171935" => Ok(Self::N100000171935),
            "100000174065" => Ok(Self::N100000174065),
            "200000002161" => Ok(Self::N200000002161),
            "200000002287" => Ok(Self::N200000002287),
            "200000004201" => Ok(Self::N200000004201),
            "200000004819" => Ok(Self::N200000004819),
            "200000004820" => Ok(Self::N200000004820),
            "200000005547" => Ok(Self::N200000005547),
            "200000010382" => Ok(Self::N200000010382),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CombinedDoseForm {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000073366 => "100000073366",
            Self::N100000073651 => "100000073651",
            Self::N100000073774 => "100000073774",
            Self::N100000073781 => "100000073781",
            Self::N100000073801 => "100000073801",
            Self::N100000073860 => "100000073860",
            Self::N100000073868 => "100000073868",
            Self::N100000073869 => "100000073869",
            Self::N100000073884 => "100000073884",
            Self::N100000073891 => "100000073891",
            Self::N100000073892 => "100000073892",
            Self::N100000073941 => "100000073941",
            Self::N100000073972 => "100000073972",
            Self::N100000073973 => "100000073973",
            Self::N100000073974 => "100000073974",
            Self::N100000073975 => "100000073975",
            Self::N100000073987 => "100000073987",
            Self::N100000073988 => "100000073988",
            Self::N100000073989 => "100000073989",
            Self::N100000073990 => "100000073990",
            Self::N100000073999 => "100000073999",
            Self::N100000074015 => "100000074015",
            Self::N100000074016 => "100000074016",
            Self::N100000074017 => "100000074017",
            Self::N100000074018 => "100000074018",
            Self::N100000074030 => "100000074030",
            Self::N100000074031 => "100000074031",
            Self::N100000074032 => "100000074032",
            Self::N100000074048 => "100000074048",
            Self::N100000074051 => "100000074051",
            Self::N100000074053 => "100000074053",
            Self::N100000074056 => "100000074056",
            Self::N100000074057 => "100000074057",
            Self::N100000074061 => "100000074061",
            Self::N100000074064 => "100000074064",
            Self::N100000075580 => "100000075580",
            Self::N100000075584 => "100000075584",
            Self::N100000075587 => "100000075587",
            Self::N100000116137 => "100000116137",
            Self::N100000116141 => "100000116141",
            Self::N100000116155 => "100000116155",
            Self::N100000116160 => "100000116160",
            Self::N100000116172 => "100000116172",
            Self::N100000116173 => "100000116173",
            Self::N100000116174 => "100000116174",
            Self::N100000116175 => "100000116175",
            Self::N100000116176 => "100000116176",
            Self::N100000116177 => "100000116177",
            Self::N100000116179 => "100000116179",
            Self::N100000125746 => "100000125746",
            Self::N100000125747 => "100000125747",
            Self::N100000125777 => "100000125777",
            Self::N100000136318 => "100000136318",
            Self::N100000136325 => "100000136325",
            Self::N100000136558 => "100000136558",
            Self::N100000136560 => "100000136560",
            Self::N100000136907 => "100000136907",
            Self::N100000143502 => "100000143502",
            Self::N100000143546 => "100000143546",
            Self::N100000143552 => "100000143552",
            Self::N100000156068 => "100000156068",
            Self::N100000157796 => "100000157796",
            Self::N100000164467 => "100000164467",
            Self::N100000169997 => "100000169997",
            Self::N100000170588 => "100000170588",
            Self::N100000171127 => "100000171127",
            Self::N100000171193 => "100000171193",
            Self::N100000171238 => "100000171238",
            Self::N100000171935 => "100000171935",
            Self::N100000174065 => "100000174065",
            Self::N200000002161 => "200000002161",
            Self::N200000002287 => "200000002287",
            Self::N200000004201 => "200000004201",
            Self::N200000004819 => "200000004819",
            Self::N200000004820 => "200000004820",
            Self::N200000005547 => "200000005547",
            Self::N200000010382 => "200000010382",
        }
    }
}
impl ::std::fmt::Debug for CombinedDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CombinedDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CombinedDoseForm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CombinedDoseForm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CombinedDoseForm> for Coding {
    fn from(code: CombinedDoseForm) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/combined-dose-form".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CombinedDoseForm> for CodeableConcept {
    fn from(code: CombinedDoseForm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CompartmentType](http://hl7.org/fhir/ValueSet/compartment-type)**. Which type a compartment definition describes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CompartmentType {
    /** **Device**

Device. The compartment definition is for the device compartment. */
    Device,
    /** **Encounter**

Encounter. The compartment definition is for the encounter compartment. */
    Encounter,
    /** **EpisodeOfCare**

EpisodeOfCare. The compartment definition is for the episodeofcare compartment. */
    EpisodeOfCare,
    /** **Patient**

Patient. The compartment definition is for the patient compartment. */
    Patient,
    /** **Practitioner**

Practitioner. The compartment definition is for the practitioner compartment. */
    Practitioner,
    /** **RelatedPerson**

RelatedPerson. The compartment definition is for the related-person compartment. */
    RelatedPerson,
}
impl ::core::str::FromStr for CompartmentType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Device" => Ok(Self::Device),
            "Encounter" => Ok(Self::Encounter),
            "EpisodeOfCare" => Ok(Self::EpisodeOfCare),
            "Patient" => Ok(Self::Patient),
            "Practitioner" => Ok(Self::Practitioner),
            "RelatedPerson" => Ok(Self::RelatedPerson),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CompartmentType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Device => "Device",
            Self::Encounter => "Encounter",
            Self::EpisodeOfCare => "EpisodeOfCare",
            Self::Patient => "Patient",
            Self::Practitioner => "Practitioner",
            Self::RelatedPerson => "RelatedPerson",
        }
    }
}
impl ::std::fmt::Debug for CompartmentType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CompartmentType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CompartmentType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CompartmentType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CompartmentType> for Coding {
    fn from(code: CompartmentType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/compartment-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CompartmentType> for CodeableConcept {
    fn from(code: CompartmentType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CompositionAttestationMode](http://hl7.org/fhir/ValueSet/composition-attestation-mode)**. The way in which a person authenticated a composition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CompositionAttestationMode {
    /** **legal**

Legal. The person authenticated the content and accepted legal responsibility for its content. */
    Legal,
    /** **official**

Official. The organization authenticated the content as consistent with their policies and procedures. */
    Official,
    /** **personal**

Personal. The person authenticated the content in their personal capacity. */
    Personal,
    /** **professional**

Professional. The person authenticated the content in their professional capacity. */
    Professional,
}
impl ::core::str::FromStr for CompositionAttestationMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "legal" => Ok(Self::Legal),
            "official" => Ok(Self::Official),
            "personal" => Ok(Self::Personal),
            "professional" => Ok(Self::Professional),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CompositionAttestationMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Legal => "legal",
            Self::Official => "official",
            Self::Personal => "personal",
            Self::Professional => "professional",
        }
    }
}
impl ::std::fmt::Debug for CompositionAttestationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CompositionAttestationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CompositionAttestationMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CompositionAttestationMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CompositionAttestationMode> for Coding {
    fn from(code: CompositionAttestationMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/composition-attestation-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CompositionAttestationMode> for CodeableConcept {
    fn from(code: CompositionAttestationMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CompositionStatus](http://hl7.org/fhir/ValueSet/composition-status)**. The workflow/clinical status of the composition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CompositionStatus {
    /** **amended**

Amended. The composition content or the referenced resources have been modified (edited or added to) subsequent to being released as "final" and the composition is complete and verified by an authorized person. */
    Amended,
    /** **appended**

Appended. Subsequent to being final, the composition content has been modified by adding new content. The existing content is unchanged. */
    Appended,
    /** **cancelled**

Cancelled. The composition is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). */
    Cancelled,
    /** **corrected**

Corrected. Subsequent to being final, the composition content has been modified to correct an error in the composition or referenced results. */
    Corrected,
    /** **deprecated**

Deprecated. This composition has been withdrawn or superseded and should no longer be used. */
    Deprecated,
    /** **entered-in-error**

Entered in Error. The composition or document was originally created/issued in error, and this is an amendment that marks that the entire series should not be considered as valid. */
    EnteredInError,
    /** **final**

Final. This version of the composition is complete and verified by an appropriate person and no further work is planned. Any subsequent updates would be on a new version of the composition. */
    Final,
    /** **partial**

Partial. This is a partial (e.g. initial, interim or preliminary) composition: data in the composition may be incomplete or unverified. */
    Partial,
    /** **preliminary**

Preliminary. Verified early results are available, but not all results are final. */
    Preliminary,
    /** **registered**

Registered. The existence of the composition is registered, but there is nothing yet available. */
    Registered,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for CompositionStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "appended" => Ok(Self::Appended),
            "cancelled" => Ok(Self::Cancelled),
            "corrected" => Ok(Self::Corrected),
            "deprecated" => Ok(Self::Deprecated),
            "entered-in-error" => Ok(Self::EnteredInError),
            "final" => Ok(Self::Final),
            "partial" => Ok(Self::Partial),
            "preliminary" => Ok(Self::Preliminary),
            "registered" => Ok(Self::Registered),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CompositionStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Appended => "appended",
            Self::Cancelled => "cancelled",
            Self::Corrected => "corrected",
            Self::Deprecated => "deprecated",
            Self::EnteredInError => "entered-in-error",
            Self::Final => "final",
            Self::Partial => "partial",
            Self::Preliminary => "preliminary",
            Self::Registered => "registered",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for CompositionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CompositionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CompositionStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CompositionStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CompositionStatus> for Coding {
    fn from(code: CompositionStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/composition-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CompositionStatus> for CodeableConcept {
    fn from(code: CompositionStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptMapAttributeType](http://hl7.org/fhir/ValueSet/conceptmap-attribute-type)**. The type of a ConceptMap map attribute value.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConceptMapAttributeType {
    /** **Coding**

Coding. The attribute value is a code defined in a code system. */
    Coding,
    /** **Quantity**

Quantity. The attribute is a Quantity (may represent an integer or a decimal with no units). */
    Quantity,
    /** **boolean**

boolean. The attribute value is a boolean true | false. */
    Boolean,
    /** **code**

code. The attribute value is a code defined in the code system in context. */
    Code,
    /** **string**

string. The attribute value is a string. */
    String,
}
impl ::core::str::FromStr for ConceptMapAttributeType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Coding" => Ok(Self::Coding),
            "Quantity" => Ok(Self::Quantity),
            "boolean" => Ok(Self::Boolean),
            "code" => Ok(Self::Code),
            "string" => Ok(Self::String),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConceptMapAttributeType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Coding => "Coding",
            Self::Quantity => "Quantity",
            Self::Boolean => "boolean",
            Self::Code => "code",
            Self::String => "string",
        }
    }
}
impl ::std::fmt::Debug for ConceptMapAttributeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptMapAttributeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptMapAttributeType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptMapAttributeType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptMapAttributeType> for Coding {
    fn from(code: ConceptMapAttributeType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conceptmap-attribute-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptMapAttributeType> for CodeableConcept {
    fn from(code: ConceptMapAttributeType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptMapGroupUnmappedMode](http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode)**. Defines which action to take if there is no match in the group.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConceptMapGroupUnmappedMode {
    /** **fixed**

Fixed Code. Use the code(s) explicitly provided in the group.unmapped 'code' or 'valueSet' element. */
    Fixed,
    /** **other-map**

Other Map. Use the map identified by the canonical URL in the url element. */
    OtherMap,
    /** **use-source-code**

Use Provided Source Code. Use the code as provided in the $translate request in one of the following input parameters: sourceCode, sourceCoding, sourceCodeableConcept. */
    UseSourceCode,
}
impl ::core::str::FromStr for ConceptMapGroupUnmappedMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fixed" => Ok(Self::Fixed),
            "other-map" => Ok(Self::OtherMap),
            "use-source-code" => Ok(Self::UseSourceCode),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConceptMapGroupUnmappedMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Fixed => "fixed",
            Self::OtherMap => "other-map",
            Self::UseSourceCode => "use-source-code",
        }
    }
}
impl ::std::fmt::Debug for ConceptMapGroupUnmappedMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptMapGroupUnmappedMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptMapGroupUnmappedMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptMapGroupUnmappedMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptMapGroupUnmappedMode> for Coding {
    fn from(code: ConceptMapGroupUnmappedMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conceptmap-unmapped-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptMapGroupUnmappedMode> for CodeableConcept {
    fn from(code: ConceptMapGroupUnmappedMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptMapProperties](http://hl7.org/fhir/conceptmap-properties)**. A set of common concept properties for use on ConceptMap\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ConceptMapProperties {
    /** **relationshipRefinement**

Relationship Refinement. Property of type coding that indicates a specific refined relationship such as categorized by or grouped */
    RelationshipRefinement,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ConceptMapProperties {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "relationshipRefinement" => Ok(Self::RelationshipRefinement),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ConceptMapProperties {
    fn as_ref(&self) -> &str {
        match self {
            Self::RelationshipRefinement => "relationshipRefinement",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ConceptMapProperties {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptMapProperties {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptMapProperties {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptMapProperties {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptMapProperties> for Coding {
    fn from(code: ConceptMapProperties) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/conceptmap-properties".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptMapProperties> for CodeableConcept {
    fn from(code: ConceptMapProperties) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptMapPropertyType](http://hl7.org/fhir/ValueSet/conceptmap-property-type)**. The type of a ConceptMap mapping property value.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConceptMapPropertyType {
    /** **Coding**

Coding (external reference). The property  value is a code defined in an external code system. This may be used for translations, but is not the intent. */
    Coding,
    /** **boolean**

boolean. The property value is a boolean true | false. */
    Boolean,
    /** **code**

code. The property value is a code as defined in the CodeSystem in ConceptMap.property.system. */
    Code,
    /** **dateTime**

dateTime. The property is a date or a date + time. */
    DateTime,
    /** **decimal**

decimal. The property value is a decimal number. */
    Decimal,
    /** **integer**

integer. The property value is an integer (often used to assign ranking values to concepts for supporting score assessments). */
    Integer,
    /** **string**

string. The property value is a string. */
    String,
}
impl ::core::str::FromStr for ConceptMapPropertyType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Coding" => Ok(Self::Coding),
            "boolean" => Ok(Self::Boolean),
            "code" => Ok(Self::Code),
            "dateTime" => Ok(Self::DateTime),
            "decimal" => Ok(Self::Decimal),
            "integer" => Ok(Self::Integer),
            "string" => Ok(Self::String),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConceptMapPropertyType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Coding => "Coding",
            Self::Boolean => "boolean",
            Self::Code => "code",
            Self::DateTime => "dateTime",
            Self::Decimal => "decimal",
            Self::Integer => "integer",
            Self::String => "string",
        }
    }
}
impl ::std::fmt::Debug for ConceptMapPropertyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptMapPropertyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptMapPropertyType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptMapPropertyType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptMapPropertyType> for Coding {
    fn from(code: ConceptMapPropertyType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conceptmap-property-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptMapPropertyType> for CodeableConcept {
    fn from(code: ConceptMapPropertyType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptMapRelationship](http://hl7.org/fhir/ValueSet/concept-map-relationship)**. The relationship between concepts.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConceptMapRelationship {
    /** **equivalent**

Equivalent. The definitions of the concepts mean the same thing. */
    Equivalent,
    /** **not-related-to**

Not Related To. This is an explicit assertion that the target concept is not related to the source concept. */
    NotRelatedTo,
    /** **related-to**

Related To. The concepts are related to each other, but the exact relationship is not known. */
    RelatedTo,
    /** **source-is-broader-than-target**

Source Is Broader Than Target. The source concept is broader in meaning than the target concept. */
    SourceIsBroaderThanTarget,
    /** **source-is-narrower-than-target**

Source Is Narrower Than Target. The source concept is narrower in meaning than the target concept. */
    SourceIsNarrowerThanTarget,
}
impl ::core::str::FromStr for ConceptMapRelationship {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "equivalent" => Ok(Self::Equivalent),
            "not-related-to" => Ok(Self::NotRelatedTo),
            "related-to" => Ok(Self::RelatedTo),
            "source-is-broader-than-target" => Ok(Self::SourceIsBroaderThanTarget),
            "source-is-narrower-than-target" => Ok(Self::SourceIsNarrowerThanTarget),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConceptMapRelationship {
    fn as_ref(&self) -> &str {
        match self {
            Self::Equivalent => "equivalent",
            Self::NotRelatedTo => "not-related-to",
            Self::RelatedTo => "related-to",
            Self::SourceIsBroaderThanTarget => "source-is-broader-than-target",
            Self::SourceIsNarrowerThanTarget => "source-is-narrower-than-target",
        }
    }
}
impl ::std::fmt::Debug for ConceptMapRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptMapRelationship {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptMapRelationship {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptMapRelationship {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptMapRelationship> for Coding {
    fn from(code: ConceptMapRelationship) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/concept-map-relationship".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptMapRelationship> for CodeableConcept {
    fn from(code: ConceptMapRelationship) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptProperties](http://hl7.org/fhir/ValueSet/concept-properties)**. A set of common concept properties for use on coded systems throughout the FHIR eco-system.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConceptProperties {
    /** **child**

Child. The concept identified in this property is a child of the concept on which it is a property. The property type will be 'code'. The meaning of 'child' is defined by the hierarchyMeaning attribute */
    Child,
    /** **comment**

Comment. A string that provides additional detail pertinent to the use or understanding of the concept */
    Comment,
    /** **deprecated**

Deprecated. The date at which a concept was deprecated. Concepts that are deprecated but not inactive can still be used, but their use is discouraged, and they should be expected to be made inactive in a future release. Property type is dateTime. Note that the status property may also be used to indicate that a concept is deprecated */
    Deprecated,
    /** **deprecationDate**

Deprecation Date. The date at which a concept was deprecated. Concepts that are deprecated but not inactive can still be used, but their use is discouraged, and they should be expected to be made inactive in a future release. Property type is dateTime. Note that the status property may also be used to indicate that a concept is deprecated */
    DeprecationDate,
    /** **effectiveDate**

effectiveDate. The date at which the concept status was last changed */
    EffectiveDate,
    /** **inactive**

Inactive. True if the concept is not considered active - e.g. not a valid concept any more. Property type is boolean, default value is false. Note that the status property may also be used to indicate that a concept is inactive */
    Inactive,
    /** **itemWeight**

itemWeight. A numeric value that allows the comparison (less than, greater than) or other numerical manipulation of a concept (e.g. Adding up components of a score). Scores are usually a whole number, but occasionally decimals are encountered in scores. In questionnaires, the item weight may be represented using the [[[http://hl7.org/fhir/StructureDefinition/itemWeight]]] extension */
    ItemWeight,
    /** **notSelectable**

Not Selectable. The concept is not intended to be chosen by the user - only intended to be used as a selector for other concepts. Note, though, that the interpretation of this is highly contextual; all concepts are selectable in some context. Property type is boolean */
    NotSelectable,
    /** **parent**

Parent. The concept identified in this property is a parent of the concept on which it is a property. The property type will be 'code'. The meaning of 'parent' is defined by the hierarchyMeaning attribute */
    Parent,
    /** **partOf**

Part Of. The concept identified in this property (by its code) contains this concept as a component (i.e. a part-of relationship rather than a subsumption relationship such as elbow is part-of arm */
    PartOf,
    /** **retirementDate**

Retirement Date. The date at which a concept was retired */
    RetirementDate,
    /** **status**

Status. A code that indicates the status of the concept. Typical values are active, experimental, deprecated, and retired */
    Status,
    /** **synonym**

Synonym. This property contains an alternative code that may be used to identify this concept instead of the primary code */
    Synonym,
}
impl ::core::str::FromStr for ConceptProperties {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "child" => Ok(Self::Child),
            "comment" => Ok(Self::Comment),
            "deprecated" => Ok(Self::Deprecated),
            "deprecationDate" => Ok(Self::DeprecationDate),
            "effectiveDate" => Ok(Self::EffectiveDate),
            "inactive" => Ok(Self::Inactive),
            "itemWeight" => Ok(Self::ItemWeight),
            "notSelectable" => Ok(Self::NotSelectable),
            "parent" => Ok(Self::Parent),
            "partOf" => Ok(Self::PartOf),
            "retirementDate" => Ok(Self::RetirementDate),
            "status" => Ok(Self::Status),
            "synonym" => Ok(Self::Synonym),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConceptProperties {
    fn as_ref(&self) -> &str {
        match self {
            Self::Child => "child",
            Self::Comment => "comment",
            Self::Deprecated => "deprecated",
            Self::DeprecationDate => "deprecationDate",
            Self::EffectiveDate => "effectiveDate",
            Self::Inactive => "inactive",
            Self::ItemWeight => "itemWeight",
            Self::NotSelectable => "notSelectable",
            Self::Parent => "parent",
            Self::PartOf => "partOf",
            Self::RetirementDate => "retirementDate",
            Self::Status => "status",
            Self::Synonym => "synonym",
        }
    }
}
impl ::std::fmt::Debug for ConceptProperties {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptProperties {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptProperties {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptProperties {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptProperties> for Coding {
    fn from(code: ConceptProperties) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/concept-properties".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptProperties> for CodeableConcept {
    fn from(code: ConceptProperties) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConceptSubsumptionOutcome](http://hl7.org/fhir/concept-subsumption-outcome)**. Codes indicating the results of a subsumption check between codes. In the context of this CodeSystem, subsumption is defined in the FHIR specification under Resource Types - CodeSystem.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ConceptSubsumptionOutcome {
    /** **equivalent**

Equivalent. A equivalent to B if A subsumes B and B subsumes A */
    Equivalent,
    /** **not-subsumed**

Not-Subsumed. Neither A subsumes B nor B subsumes A */
    NotSubsumed,
    /** **subsumed-by**

Subsumed-By. A subsumed by B if B subsumes A */
    SubsumedBy,
    /** **subsumes**

Subsumes. A subsumes B if there is a subsumption relationship between A and B */
    Subsumes,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ConceptSubsumptionOutcome {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "equivalent" => Ok(Self::Equivalent),
            "not-subsumed" => Ok(Self::NotSubsumed),
            "subsumed-by" => Ok(Self::SubsumedBy),
            "subsumes" => Ok(Self::Subsumes),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ConceptSubsumptionOutcome {
    fn as_ref(&self) -> &str {
        match self {
            Self::Equivalent => "equivalent",
            Self::NotSubsumed => "not-subsumed",
            Self::SubsumedBy => "subsumed-by",
            Self::Subsumes => "subsumes",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ConceptSubsumptionOutcome {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConceptSubsumptionOutcome {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConceptSubsumptionOutcome {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConceptSubsumptionOutcome {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConceptSubsumptionOutcome> for Coding {
    fn from(code: ConceptSubsumptionOutcome) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/concept-subsumption-outcome".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConceptSubsumptionOutcome> for CodeableConcept {
    fn from(code: ConceptSubsumptionOutcome) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConditionPreconditionType](http://hl7.org/fhir/ValueSet/condition-precondition-type)**. Kind of precondition for the condition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConditionPreconditionType {
    /** **sensitive**

Sensitive. The observation is very sensitive for the condition, but may also indicate other conditions. */
    Sensitive,
    /** **specific**

Specific. The observation is very specific for this condition, but not particularly sensitive. */
    Specific,
}
impl ::core::str::FromStr for ConditionPreconditionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "sensitive" => Ok(Self::Sensitive),
            "specific" => Ok(Self::Specific),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConditionPreconditionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Sensitive => "sensitive",
            Self::Specific => "specific",
        }
    }
}
impl ::std::fmt::Debug for ConditionPreconditionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConditionPreconditionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConditionPreconditionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConditionPreconditionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConditionPreconditionType> for Coding {
    fn from(code: ConditionPreconditionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/condition-precondition-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConditionPreconditionType> for CodeableConcept {
    fn from(code: ConditionPreconditionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConditionQuestionnairePurpose](http://hl7.org/fhir/ValueSet/condition-questionnaire-purpose)**. The use of a questionnaire.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConditionQuestionnairePurpose {
    /** **diff-diagnosis**

Diff Diagnosis. A questionnaire that helps with diferential diagnosis. */
    DiffDiagnosis,
    /** **outcome**

Outcome. A questionnaire to check on outcomes for the patient. */
    Outcome,
    /** **preadmit**

Pre-admit. A pre-admit questionnaire. */
    Preadmit,
}
impl ::core::str::FromStr for ConditionQuestionnairePurpose {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "diff-diagnosis" => Ok(Self::DiffDiagnosis),
            "outcome" => Ok(Self::Outcome),
            "preadmit" => Ok(Self::Preadmit),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConditionQuestionnairePurpose {
    fn as_ref(&self) -> &str {
        match self {
            Self::DiffDiagnosis => "diff-diagnosis",
            Self::Outcome => "outcome",
            Self::Preadmit => "preadmit",
        }
    }
}
impl ::std::fmt::Debug for ConditionQuestionnairePurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConditionQuestionnairePurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConditionQuestionnairePurpose {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConditionQuestionnairePurpose {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConditionQuestionnairePurpose> for Coding {
    fn from(code: ConditionQuestionnairePurpose) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/condition-questionnaire-purpose".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConditionQuestionnairePurpose> for CodeableConcept {
    fn from(code: ConditionQuestionnairePurpose) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConditionalDeleteStatus](http://hl7.org/fhir/ValueSet/conditional-delete-status)**. A code that indicates how the server supports conditional delete.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConditionalDeleteStatus {
    /** **multiple**

Multiple Deletes Supported. Conditional deletes are supported, and multiple resources can be deleted in a single interaction. */
    Multiple,
    /** **not-supported**

Not Supported. No support for conditional deletes. */
    NotSupported,
    /** **single**

Single Deletes Supported. Conditional deletes are supported, but only single resources at a time. */
    Single,
}
impl ::core::str::FromStr for ConditionalDeleteStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "multiple" => Ok(Self::Multiple),
            "not-supported" => Ok(Self::NotSupported),
            "single" => Ok(Self::Single),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConditionalDeleteStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Multiple => "multiple",
            Self::NotSupported => "not-supported",
            Self::Single => "single",
        }
    }
}
impl ::std::fmt::Debug for ConditionalDeleteStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConditionalDeleteStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConditionalDeleteStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConditionalDeleteStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConditionalDeleteStatus> for Coding {
    fn from(code: ConditionalDeleteStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conditional-delete-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConditionalDeleteStatus> for CodeableConcept {
    fn from(code: ConditionalDeleteStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConditionalReadStatus](http://hl7.org/fhir/ValueSet/conditional-read-status)**. A code that indicates how the server supports conditional read.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConditionalReadStatus {
    /** **full-support**

Full Support. Conditional reads are supported, with both If-Modified-Since and If-None-Match HTTP Headers. */
    FullSupport,
    /** **modified-since**

If-Modified-Since. Conditional reads are supported, but only with the If-Modified-Since HTTP Header. */
    ModifiedSince,
    /** **not-match**

If-None-Match. Conditional reads are supported, but only with the If-None-Match HTTP Header. */
    NotMatch,
    /** **not-supported**

Not Supported. No support for conditional reads. */
    NotSupported,
}
impl ::core::str::FromStr for ConditionalReadStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "full-support" => Ok(Self::FullSupport),
            "modified-since" => Ok(Self::ModifiedSince),
            "not-match" => Ok(Self::NotMatch),
            "not-supported" => Ok(Self::NotSupported),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConditionalReadStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::FullSupport => "full-support",
            Self::ModifiedSince => "modified-since",
            Self::NotMatch => "not-match",
            Self::NotSupported => "not-supported",
        }
    }
}
impl ::std::fmt::Debug for ConditionalReadStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConditionalReadStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConditionalReadStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConditionalReadStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConditionalReadStatus> for Coding {
    fn from(code: ConditionalReadStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conditional-read-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConditionalReadStatus> for CodeableConcept {
    fn from(code: ConditionalReadStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConformanceExpectation](http://hl7.org/fhir/ValueSet/conformance-expectation)**. ConformanceExpectation\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConformanceExpectation {
    /** **MAY**

MAY. Support for the specified capability is not necessary to be considered conformant, and the requirement should be considered strictly optional. */
    May,
    /** **SHALL**

SHALL. Support for the specified capability is required to be considered conformant. */
    Shall,
    /** **SHOULD**

SHOULD. Support for the specified capability is strongly encouraged, and failure to support it should only occur after careful consideration. */
    Should,
    /** **SHOULD-NOT**

SHOULD-NOT. Support for the specified capability is strongly discouraged and should occur only after careful consideration. */
    ShouldNot,
}
impl ::core::str::FromStr for ConformanceExpectation {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "MAY" => Ok(Self::May),
            "SHALL" => Ok(Self::Shall),
            "SHOULD" => Ok(Self::Should),
            "SHOULD-NOT" => Ok(Self::ShouldNot),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConformanceExpectation {
    fn as_ref(&self) -> &str {
        match self {
            Self::May => "MAY",
            Self::Shall => "SHALL",
            Self::Should => "SHOULD",
            Self::ShouldNot => "SHOULD-NOT",
        }
    }
}
impl ::std::fmt::Debug for ConformanceExpectation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConformanceExpectation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConformanceExpectation {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConformanceExpectation {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConformanceExpectation> for Coding {
    fn from(code: ConformanceExpectation) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/conformance-expectation".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConformanceExpectation> for CodeableConcept {
    fn from(code: ConformanceExpectation) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConsentDataMeaning](http://hl7.org/fhir/ValueSet/consent-data-meaning)**. How a resource reference is interpreted when testing consent restrictions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConsentDataMeaning {
    /** **authoredby**

AuthoredBy. The consent applies to instances of resources that are authored by. */
    Authoredby,
    /** **dependents**

Dependents. The consent applies directly to the instance of the resource and instances that refer to it. */
    Dependents,
    /** **instance**

Instance. The consent applies directly to the instance of the resource. */
    Instance,
    /** **related**

Related. The consent applies directly to the instance of the resource and instances it refers to. */
    Related,
}
impl ::core::str::FromStr for ConsentDataMeaning {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "authoredby" => Ok(Self::Authoredby),
            "dependents" => Ok(Self::Dependents),
            "instance" => Ok(Self::Instance),
            "related" => Ok(Self::Related),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConsentDataMeaning {
    fn as_ref(&self) -> &str {
        match self {
            Self::Authoredby => "authoredby",
            Self::Dependents => "dependents",
            Self::Instance => "instance",
            Self::Related => "related",
        }
    }
}
impl ::std::fmt::Debug for ConsentDataMeaning {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConsentDataMeaning {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConsentDataMeaning {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConsentDataMeaning {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConsentDataMeaning> for Coding {
    fn from(code: ConsentDataMeaning) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/consent-data-meaning".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConsentDataMeaning> for CodeableConcept {
    fn from(code: ConsentDataMeaning) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConsentProvisionType](http://hl7.org/fhir/ValueSet/consent-provision-type)**. How a rule statement is applied, such as adding additional consent or removing consent.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConsentProvisionType {
    /** **deny**

Deny. Consent is denied for actions meeting these rules. */
    Deny,
    /** **permit**

Permit. Consent is provided for actions meeting these rules. */
    Permit,
}
impl ::core::str::FromStr for ConsentProvisionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "deny" => Ok(Self::Deny),
            "permit" => Ok(Self::Permit),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConsentProvisionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Deny => "deny",
            Self::Permit => "permit",
        }
    }
}
impl ::std::fmt::Debug for ConsentProvisionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConsentProvisionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConsentProvisionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConsentProvisionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConsentProvisionType> for Coding {
    fn from(code: ConsentProvisionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/consent-provision-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConsentProvisionType> for CodeableConcept {
    fn from(code: ConsentProvisionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConsentState](http://hl7.org/fhir/ValueSet/consent-state-codes)**. Indicates the state of the consent.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConsentState {
    /** **active**

Active. The consent is to be followed and enforced. */
    Active,
    /** **draft**

Pending. The consent is in development or awaiting use but is not yet intended to be acted upon. */
    Draft,
    /** **entered-in-error**

Entered in Error. The consent was created wrongly (e.g. wrong patient) and should be ignored. */
    EnteredInError,
    /** **inactive**

Inactive. The consent is terminated or replaced. */
    Inactive,
    /** **not-done**

Abandoned. The consent development has been terminated prior to completion. */
    NotDone,
    /** **unknown**

Unknown. The resource is in an indeterminate state. */
    Unknown,
}
impl ::core::str::FromStr for ConsentState {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            "not-done" => Ok(Self::NotDone),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConsentState {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
            Self::NotDone => "not-done",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for ConsentState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConsentState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConsentState {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConsentState {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConsentState> for Coding {
    fn from(code: ConsentState) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/consent-state-codes".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConsentState> for CodeableConcept {
    fn from(code: ConsentState) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ConstraintSeverity](http://hl7.org/fhir/ValueSet/constraint-severity)**. SHALL applications comply with this constraint?\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ConstraintSeverity {
    /** **error**

Error. If the constraint is violated, the resource is not conformant. */
    Error,
    /** **warning**

Warning. If the constraint is violated, the resource is conformant, but it is not necessarily following best practice. */
    Warning,
}
impl ::core::str::FromStr for ConstraintSeverity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "error" => Ok(Self::Error),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ConstraintSeverity {
    fn as_ref(&self) -> &str {
        match self {
            Self::Error => "error",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for ConstraintSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ConstraintSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ConstraintSeverity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ConstraintSeverity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ConstraintSeverity> for Coding {
    fn from(code: ConstraintSeverity) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/constraint-severity".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ConstraintSeverity> for CodeableConcept {
    fn from(code: ConstraintSeverity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContactPointSystem](http://hl7.org/fhir/ValueSet/contact-point-system)**. Telecommunications form for contact point.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContactPointSystem {
    /** **email**

Email. The value is an email address. */
    Email,
    /** **fax**

Fax. The value is a fax machine. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. */
    Fax,
    /** **other**

Other. A contact that is not a phone, fax, page or email address and is not expressible as a URL.  E.g. Internal mail address.  This SHOULD NOT be used for contacts that are expressible as a URL (e.g. Skype, Twitter, Facebook, etc.)  Extensions may be used to distinguish "other" contact types. */
    Other,
    /** **pager**

Pager. The value is a pager number. These may be local pager numbers that are only usable on a particular pager system. */
    Pager,
    /** **phone**

Phone. The value is a telephone number used for voice calls. Use of full international numbers starting with + is recommended to enable automatic dialing support but not required. */
    Phone,
    /** **sms**

SMS. A contact that can be used for sending a sms message (e.g. mobile phones, some landlines). */
    Sms,
    /** **url**

URL. A contact that is not a phone, fax, pager or email address and is expressed as a URL.  This is intended for various institutional or personal contacts including web sites, blogs, Skype, Twitter, Facebook, etc. Do not use for email addresses. */
    Url,
}
impl ::core::str::FromStr for ContactPointSystem {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "email" => Ok(Self::Email),
            "fax" => Ok(Self::Fax),
            "other" => Ok(Self::Other),
            "pager" => Ok(Self::Pager),
            "phone" => Ok(Self::Phone),
            "sms" => Ok(Self::Sms),
            "url" => Ok(Self::Url),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContactPointSystem {
    fn as_ref(&self) -> &str {
        match self {
            Self::Email => "email",
            Self::Fax => "fax",
            Self::Other => "other",
            Self::Pager => "pager",
            Self::Phone => "phone",
            Self::Sms => "sms",
            Self::Url => "url",
        }
    }
}
impl ::std::fmt::Debug for ContactPointSystem {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContactPointSystem {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContactPointSystem {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContactPointSystem {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContactPointSystem> for Coding {
    fn from(code: ContactPointSystem) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/contact-point-system".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContactPointSystem> for CodeableConcept {
    fn from(code: ContactPointSystem) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContactPointUse](http://hl7.org/fhir/ValueSet/contact-point-use)**. Use of contact point.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContactPointUse {
    /** **home**

Home. A communication contact point at a home; attempted contacts for business purposes might intrude privacy and chances are one will contact family or other household members instead of the person one wishes to call. Typically used with urgent cases, or if no other contacts are available. */
    Home,
    /** **mobile**

Mobile. A telecommunication device that moves and stays with its owner. May have characteristics of all other use codes, suitable for urgent matters, not the first choice for routine business. */
    Mobile,
    /** **old**

Old. This contact point is no longer in use (or was never correct, but retained for records). */
    Old,
    /** **temp**

Temp. A temporary contact point. The period can provide more detailed information. */
    Temp,
    /** **work**

Work. An office contact point. First choice for business related contacts during business hours. */
    Work,
}
impl ::core::str::FromStr for ContactPointUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "home" => Ok(Self::Home),
            "mobile" => Ok(Self::Mobile),
            "old" => Ok(Self::Old),
            "temp" => Ok(Self::Temp),
            "work" => Ok(Self::Work),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContactPointUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Home => "home",
            Self::Mobile => "mobile",
            Self::Old => "old",
            Self::Temp => "temp",
            Self::Work => "work",
        }
    }
}
impl ::std::fmt::Debug for ContactPointUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContactPointUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContactPointUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContactPointUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContactPointUse> for Coding {
    fn from(code: ContactPointUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/contact-point-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContactPointUse> for CodeableConcept {
    fn from(code: ContactPointUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractActionStatus](http://hl7.org/fhir/contract-action-status)**. This CodeSystem contains FHIR-defined contract action status types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractActionStatus {
    /** **complete**

Complete. To be completed */
    Complete,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractActionStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractActionStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractActionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractActionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractActionStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractActionStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractActionStatus> for Coding {
    fn from(code: ContractActionStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-action-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractActionStatus> for CodeableConcept {
    fn from(code: ContractActionStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractAssetAvailability](http://hl7.org/fhir/asset-availability)**. This CodeSystem contains FHIR-defined contract asset availability types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractAssetAvailability {
    /** **lease**

Lease. To be completed */
    Lease,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractAssetAvailability {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "lease" => Ok(Self::Lease),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractAssetAvailability {
    fn as_ref(&self) -> &str {
        match self {
            Self::Lease => "lease",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractAssetAvailability {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractAssetAvailability {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractAssetAvailability {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractAssetAvailability {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractAssetAvailability> for Coding {
    fn from(code: ContractAssetAvailability) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/asset-availability".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractAssetAvailability> for CodeableConcept {
    fn from(code: ContractAssetAvailability) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractAssetContext](http://hl7.org/fhir/contract-asset-context)**. This CodeSystem contains FHIR-defined contract asset context types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractAssetContext {
    /** **custodian**

Custodian. To be completed */
    Custodian,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractAssetContext {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "custodian" => Ok(Self::Custodian),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractAssetContext {
    fn as_ref(&self) -> &str {
        match self {
            Self::Custodian => "custodian",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractAssetContext {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractAssetContext {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractAssetContext {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractAssetContext {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractAssetContext> for Coding {
    fn from(code: ContractAssetContext) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-asset-context".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractAssetContext> for CodeableConcept {
    fn from(code: ContractAssetContext) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractAssetScope](http://hl7.org/fhir/contract-asset-scope)**. This CodeSystem contains FHIR-defined contract asset scope types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractAssetScope {
    /** **thing**

Thing. To be completed */
    Thing,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractAssetScope {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "thing" => Ok(Self::Thing),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractAssetScope {
    fn as_ref(&self) -> &str {
        match self {
            Self::Thing => "thing",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractAssetScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractAssetScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractAssetScope {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractAssetScope {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractAssetScope> for Coding {
    fn from(code: ContractAssetScope) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-asset-scope".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractAssetScope> for CodeableConcept {
    fn from(code: ContractAssetScope) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractAssetSubtype](http://hl7.org/fhir/contract-asset-subtype)**. This CodeSystem contains FHIR-defined contract asset type sub-types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractAssetSubtype {
    /** **participation**

Participation. To be completed */
    Participation,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractAssetSubtype {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "participation" => Ok(Self::Participation),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractAssetSubtype {
    fn as_ref(&self) -> &str {
        match self {
            Self::Participation => "participation",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractAssetSubtype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractAssetSubtype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractAssetSubtype {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractAssetSubtype {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractAssetSubtype> for Coding {
    fn from(code: ContractAssetSubtype) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-asset-subtype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractAssetSubtype> for CodeableConcept {
    fn from(code: ContractAssetSubtype) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractAssetType](http://hl7.org/fhir/contract-asset-type)**. This CodeSystem contains FHIR-defined contract asset type types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractAssetType {
    /** **participation**

Participation. To be completed */
    Participation,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractAssetType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "participation" => Ok(Self::Participation),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractAssetType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Participation => "participation",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractAssetType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractAssetType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractAssetType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractAssetType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractAssetType> for Coding {
    fn from(code: ContractAssetType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-asset-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractAssetType> for CodeableConcept {
    fn from(code: ContractAssetType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractDecisionMode](http://hl7.org/fhir/contract-decision-mode)**. This CodeSystem contains FHIR-defined contract decision mode types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractDecisionMode {
    /** **policy**

Policy. To be completed */
    Policy,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractDecisionMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "policy" => Ok(Self::Policy),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractDecisionMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Policy => "policy",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractDecisionMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractDecisionMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractDecisionMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractDecisionMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractDecisionMode> for Coding {
    fn from(code: ContractDecisionMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-decision-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractDecisionMode> for CodeableConcept {
    fn from(code: ContractDecisionMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractDefinitionSubtype](http://hl7.org/fhir/contract-definition-subtype)**. This CodeSystem contains FHIR-defined contract definition subtypes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractDefinitionSubtype {
    /** **temp**

Temporary Value. To be completed */
    Temp,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractDefinitionSubtype {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "temp" => Ok(Self::Temp),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractDefinitionSubtype {
    fn as_ref(&self) -> &str {
        match self {
            Self::Temp => "temp",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractDefinitionSubtype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractDefinitionSubtype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractDefinitionSubtype {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractDefinitionSubtype {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractDefinitionSubtype> for Coding {
    fn from(code: ContractDefinitionSubtype) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-definition-subtype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractDefinitionSubtype> for CodeableConcept {
    fn from(code: ContractDefinitionSubtype) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractDefinitionType](http://hl7.org/fhir/contract-definition-type)**. This CodeSystem contains FHIR-defined contract definition types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractDefinitionType {
    /** **temp**

Temporary Value. To be completed */
    Temp,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractDefinitionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "temp" => Ok(Self::Temp),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractDefinitionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Temp => "temp",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractDefinitionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractDefinitionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractDefinitionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractDefinitionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractDefinitionType> for Coding {
    fn from(code: ContractDefinitionType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-definition-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractDefinitionType> for CodeableConcept {
    fn from(code: ContractDefinitionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractExpirationType](http://hl7.org/fhir/contract-expiration-type)**. This CodeSystem contains FHIR-defined contract Expiration types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractExpirationType {
    /** **breach**

Breach. To be completed */
    Breach,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractExpirationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "breach" => Ok(Self::Breach),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractExpirationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Breach => "breach",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractExpirationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractExpirationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractExpirationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractExpirationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractExpirationType> for Coding {
    fn from(code: ContractExpirationType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-expiration-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractExpirationType> for CodeableConcept {
    fn from(code: ContractExpirationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractLegalState](http://hl7.org/fhir/contract-legalstate)**. This CodeSystem contains FHIR-defined contract status types. Each definition includes usage notes explaining the precedence order in contract lifecycle - i.e., while only some stages are required, the order in which they may occur is deterministic; and a map to comparable FHIR and v.3 status codes. It follows guidance about use of status codes in FHIR in the [Status Codes Grid](sc.html).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractLegalState {
    /** **amended**

Amended. Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. */
    Amended,
    /** **appended**

Appended. Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. */
    Appended,
    /** **cancelled**

Cancelled. Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. */
    Cancelled,
    /** **disputed**

Disputed. Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended. */
    Disputed,
    /** **entered-in-error**

Entered in Error. Contract was created in error. No Precedence Order.  Status may be applied to a Contract with any status. */
    EnteredInError,
    /** **executable**

Executable. Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity.  May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. */
    Executable,
    /** **executed**

Executed. Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity.  Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. */
    Executed,
    /** **negotiable**

Negotiable. Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms.  E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. */
    Negotiable,
    /** **offered**

Offered. Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. */
    Offered,
    /** **policy**

Policy. Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy.  Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. */
    Policy,
    /** **rejected**

Rejected.  Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes:  stopped; cancelled. */
    Rejected,
    /** **renewed**

Renewed. Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. */
    Renewed,
    /** **resolved**

Resolved. Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. */
    Resolved,
    /** **revoked**

Revoked. A Contract that is rescinded.  May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. */
    Revoked,
    /** **terminated**

Terminated. Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. */
    Terminated,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractLegalState {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "appended" => Ok(Self::Appended),
            "cancelled" => Ok(Self::Cancelled),
            "disputed" => Ok(Self::Disputed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "executable" => Ok(Self::Executable),
            "executed" => Ok(Self::Executed),
            "negotiable" => Ok(Self::Negotiable),
            "offered" => Ok(Self::Offered),
            "policy" => Ok(Self::Policy),
            "rejected" => Ok(Self::Rejected),
            "renewed" => Ok(Self::Renewed),
            "resolved" => Ok(Self::Resolved),
            "revoked" => Ok(Self::Revoked),
            "terminated" => Ok(Self::Terminated),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractLegalState {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Appended => "appended",
            Self::Cancelled => "cancelled",
            Self::Disputed => "disputed",
            Self::EnteredInError => "entered-in-error",
            Self::Executable => "executable",
            Self::Executed => "executed",
            Self::Negotiable => "negotiable",
            Self::Offered => "offered",
            Self::Policy => "policy",
            Self::Rejected => "rejected",
            Self::Renewed => "renewed",
            Self::Resolved => "resolved",
            Self::Revoked => "revoked",
            Self::Terminated => "terminated",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractLegalState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractLegalState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractLegalState {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractLegalState {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractLegalState> for Coding {
    fn from(code: ContractLegalState) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-legalstate".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractLegalState> for CodeableConcept {
    fn from(code: ContractLegalState) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractPartyRole](http://hl7.org/fhir/contract-party-role)**. This CodeSystem contains FHIR-defined contract party role types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractPartyRole {
    /** **flunky**

FLunky. To be completed */
    Flunky,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractPartyRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "flunky" => Ok(Self::Flunky),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractPartyRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Flunky => "flunky",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractPartyRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractPartyRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractPartyRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractPartyRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractPartyRole> for Coding {
    fn from(code: ContractPartyRole) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-party-role".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractPartyRole> for CodeableConcept {
    fn from(code: ContractPartyRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractPublicationStatus](http://hl7.org/fhir/contract-publicationstatus)**. This CodeSystem contains FHIR-defined contract publication status types. Each definition includes usage notes explaining the precedence order in contract publication lifecycle - i.e., while only some stages are required, the order in which they may occur is deterministic.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractPublicationStatus {
    /** **amended**

Amended. Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. */
    Amended,
    /** **appended**

Appended. Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. */
    Appended,
    /** **cancelled**

Cancelled. Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. */
    Cancelled,
    /** **disputed**

Disputed. Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended. */
    Disputed,
    /** **entered-in-error**

Entered in Error. Contract was created in error. No Precedence Order.  Status may be applied to a Contract with any status. */
    EnteredInError,
    /** **executable**

Executable. Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity.  May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. */
    Executable,
    /** **executed**

Executed. Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity.  Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. */
    Executed,
    /** **negotiable**

Negotiable. Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms.  E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. */
    Negotiable,
    /** **offered**

Offered. Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. */
    Offered,
    /** **policy**

Policy. Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy.  Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. */
    Policy,
    /** **rejected**

Rejected.  Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes:  stopped; cancelled. */
    Rejected,
    /** **renewed**

Renewed. Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. */
    Renewed,
    /** **resolved**

Resolved. Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. */
    Resolved,
    /** **revoked**

Revoked. A Contract that is rescinded.  May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. */
    Revoked,
    /** **terminated**

Terminated. Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. */
    Terminated,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractPublicationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "appended" => Ok(Self::Appended),
            "cancelled" => Ok(Self::Cancelled),
            "disputed" => Ok(Self::Disputed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "executable" => Ok(Self::Executable),
            "executed" => Ok(Self::Executed),
            "negotiable" => Ok(Self::Negotiable),
            "offered" => Ok(Self::Offered),
            "policy" => Ok(Self::Policy),
            "rejected" => Ok(Self::Rejected),
            "renewed" => Ok(Self::Renewed),
            "resolved" => Ok(Self::Resolved),
            "revoked" => Ok(Self::Revoked),
            "terminated" => Ok(Self::Terminated),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractPublicationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Appended => "appended",
            Self::Cancelled => "cancelled",
            Self::Disputed => "disputed",
            Self::EnteredInError => "entered-in-error",
            Self::Executable => "executable",
            Self::Executed => "executed",
            Self::Negotiable => "negotiable",
            Self::Offered => "offered",
            Self::Policy => "policy",
            Self::Rejected => "rejected",
            Self::Renewed => "renewed",
            Self::Resolved => "resolved",
            Self::Revoked => "revoked",
            Self::Terminated => "terminated",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractPublicationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractPublicationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractPublicationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractPublicationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractPublicationStatus> for Coding {
    fn from(code: ContractPublicationStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-publicationstatus".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractPublicationStatus> for CodeableConcept {
    fn from(code: ContractPublicationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractScope](http://hl7.org/fhir/contract-scope)**. This CodeSystem contains FHIR-defined contract Expiration types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractScope {
    /** **policy**

Policy. To be completed */
    Policy,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractScope {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "policy" => Ok(Self::Policy),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractScope {
    fn as_ref(&self) -> &str {
        match self {
            Self::Policy => "policy",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractScope {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractScope {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractScope> for Coding {
    fn from(code: ContractScope) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-scope".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractScope> for CodeableConcept {
    fn from(code: ContractScope) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractSecurityCategory](http://hl7.org/fhir/contract-security-category)**. This CodeSystem contains FHIR-defined contract security category types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractSecurityCategory {
    /** **policy**

Policy. To be completed */
    Policy,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractSecurityCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "policy" => Ok(Self::Policy),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractSecurityCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Policy => "policy",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractSecurityCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractSecurityCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractSecurityCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractSecurityCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractSecurityCategory> for Coding {
    fn from(code: ContractSecurityCategory) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-security-category".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractSecurityCategory> for CodeableConcept {
    fn from(code: ContractSecurityCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractSecurityClassification](http://hl7.org/fhir/contract-security-classification)**. This CodeSystem contains FHIR-defined contract security classification types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractSecurityClassification {
    /** **policy**

Policy. To be completed */
    Policy,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractSecurityClassification {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "policy" => Ok(Self::Policy),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractSecurityClassification {
    fn as_ref(&self) -> &str {
        match self {
            Self::Policy => "policy",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractSecurityClassification {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractSecurityClassification {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractSecurityClassification {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractSecurityClassification {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractSecurityClassification> for Coding {
    fn from(code: ContractSecurityClassification) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/contract-security-classification".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractSecurityClassification> for CodeableConcept {
    fn from(code: ContractSecurityClassification) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractSecurityControl](http://hl7.org/fhir/contract-security-control)**. This CodeSystem contains FHIR-defined contract security control types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractSecurityControl {
    /** **policy**

Policy. To be completed */
    Policy,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractSecurityControl {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "policy" => Ok(Self::Policy),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractSecurityControl {
    fn as_ref(&self) -> &str {
        match self {
            Self::Policy => "policy",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractSecurityControl {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractSecurityControl {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractSecurityControl {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractSecurityControl {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractSecurityControl> for Coding {
    fn from(code: ContractSecurityControl) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-security-control".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractSecurityControl> for CodeableConcept {
    fn from(code: ContractSecurityControl) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContractStatus](http://hl7.org/fhir/contract-status)**. This CodeSystem contains FHIR-defined contract status types. Each definition includes usage notes explaining the precedence order in contract lifecycle - i.e., while only some stages are required, the order in which they may occur is deterministic; and a map to comparable FHIR and v.3 status codes. It follows guidance about use of status codes in FHIR in [the Status Codes Grid](sc.html).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ContractStatus {
    /** **amended**

Amended. Contract is augmented with additional information to correct errors in a predecessor or to updated values in a predecessor. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: revised; replaced. */
    Amended,
    /** **appended**

Appended. Contract is augmented with additional information that was missing from a predecessor Contract. Usage: Contract altered within effective time. Precedence Order = 9. Comparable FHIR and v.3 status codes: updated, replaced. */
    Appended,
    /** **cancelled**

Cancelled. Contract is terminated due to failure of the Grantor and/or the Grantee to fulfil one or more contract provisions. Usage: Abnormal contract termination. Precedence Order = 10. Comparable FHIR and v.3 status codes: stopped; failed; aborted. */
    Cancelled,
    /** **disputed**

Disputed. Contract is pended to rectify failure of the Grantor or the Grantee to fulfil contract provision(s). E.g., Grantee complaint about Grantor's failure to comply with contract provisions. Usage: Contract pended. Precedence Order = 7. Comparable FHIR and v.3 status codes: on hold; pended; suspended. */
    Disputed,
    /** **entered-in-error**

Entered in Error. Contract was created in error. No Precedence Order.  Status may be applied to a Contract with any status. */
    EnteredInError,
    /** **executable**

Executable. Contract execution pending; may be executed when either the Grantor or the Grantee accepts the contract provisions by signing. I.e., where either the Grantor or the Grantee has signed, but not both. E.g., when an insurance applicant signs the insurers application, which references the policy. Usage: Optional first step of contract execution activity.  May be skipped and contracting activity moves directly to executed state. Precedence Order = 3. Comparable FHIR and v.3 status codes: draft; preliminary; planned; intended; active. */
    Executable,
    /** **executed**

Executed. Contract is activated for period stipulated when both the Grantor and Grantee have signed it. Usage: Required state for normal completion of contracting activity.  Precedence Order = 6. Comparable FHIR and v.3 status codes: accepted; completed. */
    Executed,
    /** **negotiable**

Negotiable. Contract execution is suspended while either or both the Grantor and Grantee propose and consider new or revised contract provisions. I.e., where the party which has not signed proposes changes to the terms.  E .g., a life insurer declines to agree to the signed application because the life insurer has evidence that the applicant, who asserted to being younger or a non-smoker to get a lower premium rate - but offers instead to agree to a higher premium based on the applicants actual age or smoking status. Usage: Optional contract activity between executable and executed state. Precedence Order = 4. Comparable FHIR and v.3 status codes: in progress; review; held. */
    Negotiable,
    /** **offered**

Offered. Contract is a proposal by either the Grantor or the Grantee. Aka - A Contract hard copy or electronic 'template', 'form' or 'application'. E.g., health insurance application; consent directive form. Usage: Beginning of contract negotiation, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 2. Comparable FHIR and v.3 status codes: requested; new. */
    Offered,
    /** **policy**

Policy. Contract template is available as the basis for an application or offer by the Grantor or Grantee. E.g., health insurance policy; consent directive policy.  Usage: Required initial contract activity, which may have been completed as a precondition because used for 0..* contracts. Precedence Order = 1. Comparable FHIR and v.3 status codes: proposed; intended. */
    Policy,
    /** **rejected**

Rejected.  Execution of the Contract is not completed because either or both the Grantor and Grantee decline to accept some or all of the contract provisions. Usage: Optional contract activity between executable and abnormal termination. Precedence Order = 5. Comparable FHIR and v.3 status codes:  stopped; cancelled. */
    Rejected,
    /** **renewed**

Renewed. Beginning of a successor Contract at the termination of predecessor Contract lifecycle. Usage: Follows termination of a preceding Contract that has reached its expiry date. Precedence Order = 13. Comparable FHIR and v.3 status codes: superseded. */
    Renewed,
    /** **resolved**

Resolved. Contract is reactivated after being pended because of faulty execution. *E.g., competency of the signer(s), or where the policy is substantially different from and did not accompany the application/form so that the applicant could not compare them. Aka - ''reactivated''. Usage: Optional stage where a pended contract is reactivated. Precedence Order = 8. Comparable FHIR and v.3 status codes: reactivated. */
    Resolved,
    /** **revoked**

Revoked. A Contract that is rescinded.  May be required prior to replacing with an updated Contract. Comparable FHIR and v.3 status codes: nullified. */
    Revoked,
    /** **terminated**

Terminated. Contract reaches its expiry date. It might or might not be renewed or renegotiated. Usage: Normal end of contract period. Precedence Order = 12. Comparable FHIR and v.3 status codes: Obsoleted. */
    Terminated,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ContractStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "appended" => Ok(Self::Appended),
            "cancelled" => Ok(Self::Cancelled),
            "disputed" => Ok(Self::Disputed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "executable" => Ok(Self::Executable),
            "executed" => Ok(Self::Executed),
            "negotiable" => Ok(Self::Negotiable),
            "offered" => Ok(Self::Offered),
            "policy" => Ok(Self::Policy),
            "rejected" => Ok(Self::Rejected),
            "renewed" => Ok(Self::Renewed),
            "resolved" => Ok(Self::Resolved),
            "revoked" => Ok(Self::Revoked),
            "terminated" => Ok(Self::Terminated),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ContractStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Appended => "appended",
            Self::Cancelled => "cancelled",
            Self::Disputed => "disputed",
            Self::EnteredInError => "entered-in-error",
            Self::Executable => "executable",
            Self::Executed => "executed",
            Self::Negotiable => "negotiable",
            Self::Offered => "offered",
            Self::Policy => "policy",
            Self::Rejected => "rejected",
            Self::Renewed => "renewed",
            Self::Resolved => "resolved",
            Self::Revoked => "revoked",
            Self::Terminated => "terminated",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ContractStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContractStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContractStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContractStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContractStatus> for Coding {
    fn from(code: ContractStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/contract-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContractStatus> for CodeableConcept {
    fn from(code: ContractStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContributorRole](http://hl7.org/fhir/ValueSet/contributor-role)**. Used to code the format of the display string.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContributorRole {
    /** **author**

Author/Creator. An entity primarily responsible for making the resource, often called author or creator */
    Author,
    /** **editor**

Editor. Entity that revises or has authority to control the content */
    Editor,
    /** **endorser**

Endorser. Entity that supports, approves, or advocates for the content */
    Endorser,
    /** **funder**

Funder. Entity that supplies financial support */
    Funder,
    /** **informant**

Informant. Entity that supplies information */
    Informant,
    /** **publisher**

Publisher. Entity that makes the content available for public use */
    Publisher,
    /** **reviewer**

Reviewer. Entity that examines the content, formally or informally, and suggests revisions or comments */
    Reviewer,
}
impl ::core::str::FromStr for ContributorRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "author" => Ok(Self::Author),
            "editor" => Ok(Self::Editor),
            "endorser" => Ok(Self::Endorser),
            "funder" => Ok(Self::Funder),
            "informant" => Ok(Self::Informant),
            "publisher" => Ok(Self::Publisher),
            "reviewer" => Ok(Self::Reviewer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContributorRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Author => "author",
            Self::Editor => "editor",
            Self::Endorser => "endorser",
            Self::Funder => "funder",
            Self::Informant => "informant",
            Self::Publisher => "publisher",
            Self::Reviewer => "reviewer",
        }
    }
}
impl ::std::fmt::Debug for ContributorRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContributorRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContributorRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContributorRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContributorRole> for Coding {
    fn from(code: ContributorRole) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/contributor-role".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContributorRole> for CodeableConcept {
    fn from(code: ContributorRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContributorSummarySource](http://hl7.org/fhir/ValueSet/contributor-summary-source)**. Used to code the producer or rule for creating the display string.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContributorSummarySource {
    /** **article-copy**

Copied from article. Data copied by human from article text. */
    ArticleCopy,
    /** **citation-manager**

Reported by citation manager. Data copied by machine from citation manager data. */
    CitationManager,
    /** **custom**

custom format. Custom format (may be described in text note). */
    Custom,
    /** **publisher-data**

Publisher provided. Data copied by machine from publisher data. */
    PublisherData,
}
impl ::core::str::FromStr for ContributorSummarySource {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "article-copy" => Ok(Self::ArticleCopy),
            "citation-manager" => Ok(Self::CitationManager),
            "custom" => Ok(Self::Custom),
            "publisher-data" => Ok(Self::PublisherData),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContributorSummarySource {
    fn as_ref(&self) -> &str {
        match self {
            Self::ArticleCopy => "article-copy",
            Self::CitationManager => "citation-manager",
            Self::Custom => "custom",
            Self::PublisherData => "publisher-data",
        }
    }
}
impl ::std::fmt::Debug for ContributorSummarySource {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContributorSummarySource {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContributorSummarySource {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContributorSummarySource {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContributorSummarySource> for Coding {
    fn from(code: ContributorSummarySource) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/contributor-summary-source".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContributorSummarySource> for CodeableConcept {
    fn from(code: ContributorSummarySource) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContributorSummaryStyle](http://hl7.org/fhir/ValueSet/contributor-summary-style)**. Used to code the format of the display string.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContributorSummaryStyle {
    /** **a1full**

First author (full name) et al. Example: Jennifer Laskowski et al. */
    A1full,
    /** **a1init**

First author (last name first initials) et al. Example: Laskowski J et al. */
    A1init,
    /** **a3full**

First 3 authors (full name) et al. Example: Jennifer Laskowski, Brandon Renner, Matthew C. Pickering, et al. */
    A3full,
    /** **a3init**

First 3 authors (last name first initials) et al. Example:  Laskowski J, Renner B, Pickering MC, et al. */
    A3init,
    /** **a6full**

First 6 authors (full name) et al. Example: Jennifer Laskowski, Brandon Renner, Matthew C. Pickering, Natalie J. Serkova, Peter M. Smith-Jones, Eric T. Clambey, et al. */
    A6full,
    /** **a6init**

First 6 authors (last name first initials) et al. Example: Laskowski J, Renner B, Pickering MC, Serkova NJ, Smith-Jones PM, Clambey ET, et al. */
    A6init,
    /** **aallfull**

All authors (full name). Example: Jennifer Laskowski, Brandon Renner, Matthew C. Pickering, Natalie J. Serkova, Peter M. Smith-Jones, Eric T. Clambey, Raphael A. Nemenoff, Joshua M. Thurman. */
    Aallfull,
    /** **aallfullwithampersand**

All authors (full name) with an ampersand before last author. Example: Jennifer Laskowski, Brandon Renner, Matthew C. Pickering, Natalie J. Serkova, Peter M. Smith-Jones, Eric T. Clambey, Raphael A. Nemenoff, & Joshua M. Thurman. */
    Aallfullwithampersand,
    /** **aallfullwithand**

All authors (full name) with and before last author. Example: Jennifer Laskowski, Brandon Renner, Matthew C. Pickering, Natalie J. Serkova, Peter M. Smith-Jones, Eric T. Clambey, Raphael A. Nemenoff, and Joshua M. Thurman. */
    Aallfullwithand,
    /** **aallinit**

All authors (last name first initials). Example: Laskowski J, Renner B, Pickering MC, Serkova NJ, Smith-Jones PM, Clambey ET, Nemenoff RA, Thurman JM. */
    Aallinit,
    /** **aallinitwithampersand**

All authors (last name first initials) with an ampersand before last author. Example: Laskowski J, Renner B, Pickering MC, Serkova NJ, Smith-Jones PM, Clambey ET, Nemenoff RA, & Thurman JM. */
    Aallinitwithampersand,
    /** **aallinitwithand**

All authors (last name first initials) with and before last author. Example: Laskowski J, Renner B, Pickering MC, Serkova NJ, Smith-Jones PM, Clambey ET, Nemenoff RA, and Thurman JM. */
    Aallinitwithand,
    /** **contr-full-by-contr**

Contributorship statement listed by contribution with full names. Project design by Jennnifer Laskowski (JL), Experiment design by JL and Joshua M. Thurman (JMT), technical advice and study design contribution by Matthew C. Pickering, experiments performed by JL, data collection and analysis by JL, PET imaging and associated analyses by Natalie J. Serkova and Peter M. Smith-Jones, conceptual and technical guidance by Eric T. Clambey (etc.) and Raphael A. Nemenoff (RAN), manuscript writing by JL and JMT, manuscript revised critically by JL, Brandon Renner, etc., and RAN. */
    ContrFullByContr,
    /** **contr-full-by-person**

Contributorship statement listed by person with full names. Jennnifer Laskowski designed project; developed and performed experiments; collected and analyzed data; wrote and revised manuscript. Brandon Renner performed critical review of manuscript. Matthew C. Pickering provided technical advice and contributed to study design. Natalie J. Serkova and Peter M. Smith-Jones performed PET imaging and associated analyses. Eric T. Clambey and Raphael A. Nemenoff provided conceptual and technical guidance and critical review of manuscript. Joshua M. Thurman contributed to experimental design and wrote manuscript. */
    ContrFullByPerson,
    /** **contr-init-by-contr**

Contributorship statement listed by contribution with initials. Project design by JL, Experiment design by JL and JMT, technical advice and study design contribution by MCP, experiments performed by JL, data collection and analysis by JL, PET imaging and associated analyses by NJS and PMS-J, conceptual and technical guidance by etc. and RAN, manuscript writing by JL and JMT, manuscript revised critically by JL, BR, etc., and RAN. */
    ContrInitByContr,
    /** **contr-init-by-person**

Contributorship statement listed by person with initials. J.L. designed project; developed and performed experiments; collected and analyzed data; wrote and revised manuscript. B.R. performed critical review of manuscript. M.C.P. provided technical advice and contributed to study design. N.J.S and P.M.S.-J. performed PET imaging and associated analyses. E.T.C. and R.A.N provided conceptual and technical guidance and critical review of manuscript. J.M.T contributed to experimental design and wrote manuscript. */
    ContrInitByPerson,
}
impl ::core::str::FromStr for ContributorSummaryStyle {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "a1full" => Ok(Self::A1full),
            "a1init" => Ok(Self::A1init),
            "a3full" => Ok(Self::A3full),
            "a3init" => Ok(Self::A3init),
            "a6full" => Ok(Self::A6full),
            "a6init" => Ok(Self::A6init),
            "aallfull" => Ok(Self::Aallfull),
            "aallfullwithampersand" => Ok(Self::Aallfullwithampersand),
            "aallfullwithand" => Ok(Self::Aallfullwithand),
            "aallinit" => Ok(Self::Aallinit),
            "aallinitwithampersand" => Ok(Self::Aallinitwithampersand),
            "aallinitwithand" => Ok(Self::Aallinitwithand),
            "contr-full-by-contr" => Ok(Self::ContrFullByContr),
            "contr-full-by-person" => Ok(Self::ContrFullByPerson),
            "contr-init-by-contr" => Ok(Self::ContrInitByContr),
            "contr-init-by-person" => Ok(Self::ContrInitByPerson),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContributorSummaryStyle {
    fn as_ref(&self) -> &str {
        match self {
            Self::A1full => "a1full",
            Self::A1init => "a1init",
            Self::A3full => "a3full",
            Self::A3init => "a3init",
            Self::A6full => "a6full",
            Self::A6init => "a6init",
            Self::Aallfull => "aallfull",
            Self::Aallfullwithampersand => "aallfullwithampersand",
            Self::Aallfullwithand => "aallfullwithand",
            Self::Aallinit => "aallinit",
            Self::Aallinitwithampersand => "aallinitwithampersand",
            Self::Aallinitwithand => "aallinitwithand",
            Self::ContrFullByContr => "contr-full-by-contr",
            Self::ContrFullByPerson => "contr-full-by-person",
            Self::ContrInitByContr => "contr-init-by-contr",
            Self::ContrInitByPerson => "contr-init-by-person",
        }
    }
}
impl ::std::fmt::Debug for ContributorSummaryStyle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContributorSummaryStyle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContributorSummaryStyle {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContributorSummaryStyle {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContributorSummaryStyle> for Coding {
    fn from(code: ContributorSummaryStyle) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/contributor-summary-style".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContributorSummaryStyle> for CodeableConcept {
    fn from(code: ContributorSummaryStyle) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContributorSummaryType](http://hl7.org/fhir/ValueSet/contributor-summary-type)**. Used to code author list statement, contributorship statement, and such.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContributorSummaryType {
    /** **acknowledgement-list**

Acknowledgment list. Display of the list of acknowledged parties as a complete string. */
    AcknowledgementList,
    /** **acknowledgment-statement**

Acknowledgment statement. Statement of acknowledgment of contributions beyond those compiled for formal contributorship statements. */
    AcknowledgmentStatement,
    /** **author-string**

Author string. Display of the author list as a complete string. */
    AuthorString,
    /** **competing-interests-statement**

Competing interests statement. Statement of completing interests related to the creation of the cited artifact. Also called conflicts of interest or declaration of interests. */
    CompetingInterestsStatement,
    /** **contributorship-list**

Contributorship list. Display of the list of contributors as a complete string. */
    ContributorshipList,
    /** **contributorship-statement**

Contributorship statement. Compiled summary of contributions. */
    ContributorshipStatement,
    /** **funding-statement**

Funding statement. Statement of financial support for the creation of the cited artifact. */
    FundingStatement,
}
impl ::core::str::FromStr for ContributorSummaryType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "acknowledgement-list" => Ok(Self::AcknowledgementList),
            "acknowledgment-statement" => Ok(Self::AcknowledgmentStatement),
            "author-string" => Ok(Self::AuthorString),
            "competing-interests-statement" => Ok(Self::CompetingInterestsStatement),
            "contributorship-list" => Ok(Self::ContributorshipList),
            "contributorship-statement" => Ok(Self::ContributorshipStatement),
            "funding-statement" => Ok(Self::FundingStatement),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContributorSummaryType {
    fn as_ref(&self) -> &str {
        match self {
            Self::AcknowledgementList => "acknowledgement-list",
            Self::AcknowledgmentStatement => "acknowledgment-statement",
            Self::AuthorString => "author-string",
            Self::CompetingInterestsStatement => "competing-interests-statement",
            Self::ContributorshipList => "contributorship-list",
            Self::ContributorshipStatement => "contributorship-statement",
            Self::FundingStatement => "funding-statement",
        }
    }
}
impl ::std::fmt::Debug for ContributorSummaryType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContributorSummaryType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContributorSummaryType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContributorSummaryType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContributorSummaryType> for Coding {
    fn from(code: ContributorSummaryType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/contributor-summary-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContributorSummaryType> for CodeableConcept {
    fn from(code: ContributorSummaryType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ContributorType](http://hl7.org/fhir/ValueSet/contributor-type)**. The type of contributor.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ContributorType {
    /** **author**

Author. An author of the content of the module. */
    Author,
    /** **editor**

Editor. An editor of the content of the module. */
    Editor,
    /** **endorser**

Endorser. An endorser of the content of the module. */
    Endorser,
    /** **reviewer**

Reviewer. A reviewer of the content of the module. */
    Reviewer,
}
impl ::core::str::FromStr for ContributorType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "author" => Ok(Self::Author),
            "editor" => Ok(Self::Editor),
            "endorser" => Ok(Self::Endorser),
            "reviewer" => Ok(Self::Reviewer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ContributorType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Author => "author",
            Self::Editor => "editor",
            Self::Endorser => "endorser",
            Self::Reviewer => "reviewer",
        }
    }
}
impl ::std::fmt::Debug for ContributorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ContributorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ContributorType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ContributorType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ContributorType> for Coding {
    fn from(code: ContributorType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/contributor-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ContributorType> for CodeableConcept {
    fn from(code: ContributorType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[CriteriaNotExistsBehavior](http://hl7.org/fhir/ValueSet/subscriptiontopic-cr-behavior)**. Behavior a server can exhibit when a criteria state does not exist (e.g., state prior to a create or after a delete).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum CriteriaNotExistsBehavior {
    /** **test-fails**

Test fails. The requested conditional statement will fail if a matching state does not exist (e.g., previous state during create). */
    TestFails,
    /** **test-passes**

Test passes. The requested conditional statement will pass if a matching state does not exist (e.g., previous state during create). */
    TestPasses,
}
impl ::core::str::FromStr for CriteriaNotExistsBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "test-fails" => Ok(Self::TestFails),
            "test-passes" => Ok(Self::TestPasses),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for CriteriaNotExistsBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::TestFails => "test-fails",
            Self::TestPasses => "test-passes",
        }
    }
}
impl ::std::fmt::Debug for CriteriaNotExistsBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for CriteriaNotExistsBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for CriteriaNotExistsBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for CriteriaNotExistsBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<CriteriaNotExistsBehavior> for Coding {
    fn from(code: CriteriaNotExistsBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/subscriptiontopic-cr-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<CriteriaNotExistsBehavior> for CodeableConcept {
    fn from(code: CriteriaNotExistsBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DatesEventTypeCodes](http://hl7.org/fhir/datestype)**. This value set includes sample Dates Event Type codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum DatesEventTypeCodes {
    /** **card-issued**

Card Issued. The date when an insurance card was issued. */
    CardIssued,
    /** **claim-received**

Claim Received. The date when an insurer nreceived a claim, pre-authorization or predetermination. */
    ClaimReceived,
    /** **service-expected**

Service Expected. The date or period on or during which the services are expected to be performed. */
    ServiceExpected,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for DatesEventTypeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "card-issued" => Ok(Self::CardIssued),
            "claim-received" => Ok(Self::ClaimReceived),
            "service-expected" => Ok(Self::ServiceExpected),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for DatesEventTypeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::CardIssued => "card-issued",
            Self::ClaimReceived => "claim-received",
            Self::ServiceExpected => "service-expected",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for DatesEventTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DatesEventTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DatesEventTypeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DatesEventTypeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DatesEventTypeCodes> for Coding {
    fn from(code: DatesEventTypeCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/datestype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DatesEventTypeCodes> for CodeableConcept {
    fn from(code: DatesEventTypeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DaysOfWeek](http://hl7.org/fhir/ValueSet/days-of-week)**. The days of the week.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DaysOfWeek {
    /** **fri**

Friday. Friday. */
    Fri,
    /** **mon**

Monday. Monday. */
    Mon,
    /** **sat**

Saturday. Saturday. */
    Sat,
    /** **sun**

Sunday. Sunday. */
    Sun,
    /** **thu**

Thursday. Thursday. */
    Thu,
    /** **tue**

Tuesday. Tuesday. */
    Tue,
    /** **wed**

Wednesday. Wednesday. */
    Wed,
}
impl ::core::str::FromStr for DaysOfWeek {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fri" => Ok(Self::Fri),
            "mon" => Ok(Self::Mon),
            "sat" => Ok(Self::Sat),
            "sun" => Ok(Self::Sun),
            "thu" => Ok(Self::Thu),
            "tue" => Ok(Self::Tue),
            "wed" => Ok(Self::Wed),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DaysOfWeek {
    fn as_ref(&self) -> &str {
        match self {
            Self::Fri => "fri",
            Self::Mon => "mon",
            Self::Sat => "sat",
            Self::Sun => "sun",
            Self::Thu => "thu",
            Self::Tue => "tue",
            Self::Wed => "wed",
        }
    }
}
impl ::std::fmt::Debug for DaysOfWeek {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DaysOfWeek {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DaysOfWeek {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DaysOfWeek {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DaysOfWeek> for Coding {
    fn from(code: DaysOfWeek) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/days-of-week".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DaysOfWeek> for CodeableConcept {
    fn from(code: DaysOfWeek) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DefinitionMethod](http://hl7.org/fhir/ValueSet/definition-method)**. The method used to define, describe, or determine a characteristic value.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DefinitionMethod {
    /** **mean**

Mean. Aggregated using mean of observed values. */
    Mean,
    /** **mean-of-mean**

Mean of Means. Aggregated using mean of means (e.g. study mean values). */
    MeanOfMean,
    /** **mean-of-median**

Mean of Medians. Aggregated using mean of medians (e.g. study median values). */
    MeanOfMedian,
    /** **median**

Median. Aggregated using median of observed values. */
    Median,
    /** **median-of-mean**

Median of Means. Aggregated using median of means (e.g. study mean values). */
    MedianOfMean,
    /** **median-of-median**

Median of Medians. Aggregated using median of medians (e.g. study median values). */
    MedianOfMedian,
    /** **non-systematic-assessment**

Non-Systematic Assessment. Any non-systematic method for determining whether or not adverse events have occurred, such as self-reporting by participants or occasional assessment/testing */
    NonSystematicAssessment,
    /** **systematic-assessment**

Systematic Assessment. Any method of routinely determining whether or not specific outcomes (e.g. adverse events) have occurred, for example through a standard questionnaire, regular investigator assessment, regular laboratory testing, or other method */
    SystematicAssessment,
}
impl ::core::str::FromStr for DefinitionMethod {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "mean" => Ok(Self::Mean),
            "mean-of-mean" => Ok(Self::MeanOfMean),
            "mean-of-median" => Ok(Self::MeanOfMedian),
            "median" => Ok(Self::Median),
            "median-of-mean" => Ok(Self::MedianOfMean),
            "median-of-median" => Ok(Self::MedianOfMedian),
            "non-systematic-assessment" => Ok(Self::NonSystematicAssessment),
            "systematic-assessment" => Ok(Self::SystematicAssessment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DefinitionMethod {
    fn as_ref(&self) -> &str {
        match self {
            Self::Mean => "mean",
            Self::MeanOfMean => "mean-of-mean",
            Self::MeanOfMedian => "mean-of-median",
            Self::Median => "median",
            Self::MedianOfMean => "median-of-mean",
            Self::MedianOfMedian => "median-of-median",
            Self::NonSystematicAssessment => "non-systematic-assessment",
            Self::SystematicAssessment => "systematic-assessment",
        }
    }
}
impl ::std::fmt::Debug for DefinitionMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DefinitionMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DefinitionMethod {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DefinitionMethod {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DefinitionMethod> for Coding {
    fn from(code: DefinitionMethod) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/definition-method".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DefinitionMethod> for CodeableConcept {
    fn from(code: DefinitionMethod) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DetectedIssueSeverity](http://hl7.org/fhir/ValueSet/detectedissue-severity)**. Indicates the potential degree of impact of the identified issue on the patient.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DetectedIssueSeverity {
    /** **high**

High. Indicates the issue may be life-threatening or has the potential to cause permanent injury. */
    High,
    /** **low**

Low. Indicates the issue may result in some adverse consequences but is unlikely to substantially affect the situation of the subject. */
    Low,
    /** **moderate**

Moderate. Indicates the issue may result in noticeable adverse consequences but is unlikely to be life-threatening or cause permanent injury. */
    Moderate,
}
impl ::core::str::FromStr for DetectedIssueSeverity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "high" => Ok(Self::High),
            "low" => Ok(Self::Low),
            "moderate" => Ok(Self::Moderate),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DetectedIssueSeverity {
    fn as_ref(&self) -> &str {
        match self {
            Self::High => "high",
            Self::Low => "low",
            Self::Moderate => "moderate",
        }
    }
}
impl ::std::fmt::Debug for DetectedIssueSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DetectedIssueSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DetectedIssueSeverity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DetectedIssueSeverity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DetectedIssueSeverity> for Coding {
    fn from(code: DetectedIssueSeverity) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/detectedissue-severity".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DetectedIssueSeverity> for CodeableConcept {
    fn from(code: DetectedIssueSeverity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DetectedIssueStatus](http://hl7.org/fhir/detectedissue-status)**. Indicates the status of the detected issue. This code system contains only status codes that are not already defined and used from the ObservationStatus code system.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum DetectedIssueStatus {
    /** **mitigated**

Mitigated. Indicates the detected issue has been mitigated */
    Mitigated,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for DetectedIssueStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "mitigated" => Ok(Self::Mitigated),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for DetectedIssueStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Mitigated => "mitigated",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for DetectedIssueStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DetectedIssueStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DetectedIssueStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DetectedIssueStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DetectedIssueStatus> for Coding {
    fn from(code: DetectedIssueStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/detectedissue-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DetectedIssueStatus> for CodeableConcept {
    fn from(code: DetectedIssueStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceAssociation](http://hl7.org/fhir/ValueSet/deviceassociation-status)**. DeviceAssociation Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceAssociation {
    /** **attached**

Attached. The device is attached to the patient but not implanted in the patient. */
    Attached,
    /** **entered-in-error**

Entered in Error. The association was entered in error and therefore nullified. */
    EnteredInError,
    /** **explanted**

Explanted. The device is no longer implanted in the patient. Note that this is not the value to be used for devices that have never been implanted. In those cases, no value or a specific value can be used. */
    Explanted,
    /** **implanted**

Implanted. The device is implanted in the patient. */
    Implanted,
    /** **unknown**

Unknown. The association status of the device has not been determined. */
    Unknown,
}
impl ::core::str::FromStr for DeviceAssociation {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "attached" => Ok(Self::Attached),
            "entered-in-error" => Ok(Self::EnteredInError),
            "explanted" => Ok(Self::Explanted),
            "implanted" => Ok(Self::Implanted),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceAssociation {
    fn as_ref(&self) -> &str {
        match self {
            Self::Attached => "attached",
            Self::EnteredInError => "entered-in-error",
            Self::Explanted => "explanted",
            Self::Implanted => "implanted",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for DeviceAssociation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceAssociation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceAssociation {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceAssociation {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceAssociation> for Coding {
    fn from(code: DeviceAssociation) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/deviceassociation-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceAssociation> for CodeableConcept {
    fn from(code: DeviceAssociation) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceCorrectiveActionScope](http://hl7.org/fhir/ValueSet/device-correctiveactionscope)**. The type of relation between devices.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceCorrectiveActionScope {
    /** **lot-numbers**

Lot Numbers. The corrective action was intended for a specific batch of units identified by a lot number. */
    LotNumbers,
    /** **model**

Model. The corrective action was intended for all units of the same model. */
    Model,
    /** **serial-numbers**

Serial Numbers. The corrective action was intended for an individual unit (or a set of units) individually identified by serial number. */
    SerialNumbers,
}
impl ::core::str::FromStr for DeviceCorrectiveActionScope {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "lot-numbers" => Ok(Self::LotNumbers),
            "model" => Ok(Self::Model),
            "serial-numbers" => Ok(Self::SerialNumbers),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceCorrectiveActionScope {
    fn as_ref(&self) -> &str {
        match self {
            Self::LotNumbers => "lot-numbers",
            Self::Model => "model",
            Self::SerialNumbers => "serial-numbers",
        }
    }
}
impl ::std::fmt::Debug for DeviceCorrectiveActionScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceCorrectiveActionScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceCorrectiveActionScope {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceCorrectiveActionScope {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceCorrectiveActionScope> for Coding {
    fn from(code: DeviceCorrectiveActionScope) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/device-correctiveactionscope".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceCorrectiveActionScope> for CodeableConcept {
    fn from(code: DeviceCorrectiveActionScope) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceDefinitionRelationType](http://hl7.org/fhir/ValueSet/device-relationtype)**. The type of relation between devices.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceDefinitionRelationType {
    /** **gateway**

Gateway. Gateway. */
    Gateway,
    /** **previous**

Previous. The current device is a previous device and has been replaced by the linked device. */
    Previous,
    /** **replaces**

Replaces. The current device replaces the linked device. */
    Replaces,
}
impl ::core::str::FromStr for DeviceDefinitionRelationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "gateway" => Ok(Self::Gateway),
            "previous" => Ok(Self::Previous),
            "replaces" => Ok(Self::Replaces),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceDefinitionRelationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Gateway => "gateway",
            Self::Previous => "previous",
            Self::Replaces => "replaces",
        }
    }
}
impl ::std::fmt::Debug for DeviceDefinitionRelationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceDefinitionRelationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceDefinitionRelationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceDefinitionRelationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceDefinitionRelationType> for Coding {
    fn from(code: DeviceDefinitionRelationType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/device-relationtype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceDefinitionRelationType> for CodeableConcept {
    fn from(code: DeviceDefinitionRelationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceDispenseStatusCodes](http://hl7.org/fhir/ValueSet/devicedispense-status)**. DeviceDispense Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceDispenseStatusCodes {
    /** **cancelled**

Cancelled. The dispensed product was not and will never be picked up by the patient. */
    Cancelled,
    /** **completed**

Completed. The dispensed product has been picked up. */
    Completed,
    /** **declined**

Declined. The dispense was declined and not performed. */
    Declined,
    /** **entered-in-error**

Entered in Error. The dispense was entered in error and therefore nullified. */
    EnteredInError,
    /** **in-progress**

In Progress. The dispensed product is ready for pickup. */
    InProgress,
    /** **on-hold**

On Hold. The dispense process is paused while waiting for an external event to reactivate the dispense.  For example, new stock has arrived or the prescriber has called. */
    OnHold,
    /** **preparation**

Preparation. The core event has not started yet, but some staging activities have begun (e.g. initial preparing of the device. Preparation stages may be tracked e.g. for planning, supply or billing purposes. */
    Preparation,
    /** **stopped**

Stopped. Actions implied by the dispense have been permanently halted, before all of them occurred. */
    Stopped,
    /** **unknown**

Unknown. The authoring system does not know which of the status values applies for this dispense.  Note: this concept is not to be used for other - one of the listed statuses is presumed to apply, it's just now known which one. */
    Unknown,
}
impl ::core::str::FromStr for DeviceDispenseStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "declined" => Ok(Self::Declined),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "on-hold" => Ok(Self::OnHold),
            "preparation" => Ok(Self::Preparation),
            "stopped" => Ok(Self::Stopped),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceDispenseStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Declined => "declined",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::OnHold => "on-hold",
            Self::Preparation => "preparation",
            Self::Stopped => "stopped",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for DeviceDispenseStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceDispenseStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceDispenseStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceDispenseStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceDispenseStatusCodes> for Coding {
    fn from(code: DeviceDispenseStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/devicedispense-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceDispenseStatusCodes> for CodeableConcept {
    fn from(code: DeviceDispenseStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceDispenseStatusReasonCodes](http://hl7.org/fhir/CodeSystem/devicedispense-status-reason)**. DeviceDispense Status Reason Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum DeviceDispenseStatusReasonCodes {
    /** **contraindication**

Contraindication. The device was not dispensed because a contraindication was found - for example pregnancy, allergy to a device component... */
    Contraindication,
    /** **incompatible-device**

Incompatible device. The device was not dispensed because an incompatibility has been found with the device or between the device and other devices being used in the same context. */
    IncompatibleDevice,
    /** **off-market**

Off market. The device was not dispensed because it is of-market - for example not authorized, withdrawn or recalled. */
    OffMarket,
    /** **order-expired**

Order expired. The device was not dispensed because the order has expired or been invalidated. */
    OrderExpired,
    /** **out-of-stock**

Out of Stock. The device was not dispensed because it was not available. */
    OutOfStock,
    /** **verbal-order**

Verbal order. The device not dispensed because there was a verbal order. */
    VerbalOrder,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for DeviceDispenseStatusReasonCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "contraindication" => Ok(Self::Contraindication),
            "incompatible-device" => Ok(Self::IncompatibleDevice),
            "off-market" => Ok(Self::OffMarket),
            "order-expired" => Ok(Self::OrderExpired),
            "out-of-stock" => Ok(Self::OutOfStock),
            "verbal-order" => Ok(Self::VerbalOrder),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for DeviceDispenseStatusReasonCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Contraindication => "contraindication",
            Self::IncompatibleDevice => "incompatible-device",
            Self::OffMarket => "off-market",
            Self::OrderExpired => "order-expired",
            Self::OutOfStock => "out-of-stock",
            Self::VerbalOrder => "verbal-order",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for DeviceDispenseStatusReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceDispenseStatusReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceDispenseStatusReasonCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceDispenseStatusReasonCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceDispenseStatusReasonCodes> for Coding {
    fn from(code: DeviceDispenseStatusReasonCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/CodeSystem/devicedispense-status-reason".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceDispenseStatusReasonCodes> for CodeableConcept {
    fn from(code: DeviceDispenseStatusReasonCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceMetricCalibrationState](http://hl7.org/fhir/ValueSet/metric-calibration-state)**. Describes the state of a metric calibration.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceMetricCalibrationState {
    /** **calibrated**

Calibrated. The metric has been calibrated. */
    Calibrated,
    /** **calibration-required**

Calibration Required. The metric needs to be calibrated. */
    CalibrationRequired,
    /** **not-calibrated**

Not Calibrated. The metric has not been calibrated. */
    NotCalibrated,
    /** **unspecified**

Unspecified. The state of calibration of this metric is unspecified. */
    Unspecified,
}
impl ::core::str::FromStr for DeviceMetricCalibrationState {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "calibrated" => Ok(Self::Calibrated),
            "calibration-required" => Ok(Self::CalibrationRequired),
            "not-calibrated" => Ok(Self::NotCalibrated),
            "unspecified" => Ok(Self::Unspecified),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceMetricCalibrationState {
    fn as_ref(&self) -> &str {
        match self {
            Self::Calibrated => "calibrated",
            Self::CalibrationRequired => "calibration-required",
            Self::NotCalibrated => "not-calibrated",
            Self::Unspecified => "unspecified",
        }
    }
}
impl ::std::fmt::Debug for DeviceMetricCalibrationState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceMetricCalibrationState {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceMetricCalibrationState {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceMetricCalibrationState {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceMetricCalibrationState> for Coding {
    fn from(code: DeviceMetricCalibrationState) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/metric-calibration-state".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceMetricCalibrationState> for CodeableConcept {
    fn from(code: DeviceMetricCalibrationState) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceMetricCalibrationType](http://hl7.org/fhir/ValueSet/metric-calibration-type)**. Describes the type of a metric calibration.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceMetricCalibrationType {
    /** **gain**

Gain. Gain metric calibration method. */
    Gain,
    /** **offset**

Offset. Offset metric calibration method. */
    Offset,
    /** **two-point**

Two Point. Two-point metric calibration method. */
    TwoPoint,
    /** **unspecified**

Unspecified. Metric calibration method has not been identified. */
    Unspecified,
}
impl ::core::str::FromStr for DeviceMetricCalibrationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "gain" => Ok(Self::Gain),
            "offset" => Ok(Self::Offset),
            "two-point" => Ok(Self::TwoPoint),
            "unspecified" => Ok(Self::Unspecified),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceMetricCalibrationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Gain => "gain",
            Self::Offset => "offset",
            Self::TwoPoint => "two-point",
            Self::Unspecified => "unspecified",
        }
    }
}
impl ::std::fmt::Debug for DeviceMetricCalibrationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceMetricCalibrationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceMetricCalibrationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceMetricCalibrationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceMetricCalibrationType> for Coding {
    fn from(code: DeviceMetricCalibrationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/metric-calibration-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceMetricCalibrationType> for CodeableConcept {
    fn from(code: DeviceMetricCalibrationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceMetricCategory](http://hl7.org/fhir/ValueSet/metric-category)**. Describes the category of the metric.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceMetricCategory {
    /** **calculation**

Calculation. Observations generated for this DeviceMetric are calculated. */
    Calculation,
    /** **measurement**

Measurement. Observations generated for this DeviceMetric are measured. */
    Measurement,
    /** **setting**

Setting. Observations generated for this DeviceMetric is a setting that will influence the behavior of the Device. */
    Setting,
    /** **unspecified**

Unspecified. The category of this DeviceMetric is unspecified. */
    Unspecified,
}
impl ::core::str::FromStr for DeviceMetricCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "calculation" => Ok(Self::Calculation),
            "measurement" => Ok(Self::Measurement),
            "setting" => Ok(Self::Setting),
            "unspecified" => Ok(Self::Unspecified),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceMetricCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Calculation => "calculation",
            Self::Measurement => "measurement",
            Self::Setting => "setting",
            Self::Unspecified => "unspecified",
        }
    }
}
impl ::std::fmt::Debug for DeviceMetricCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceMetricCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceMetricCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceMetricCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceMetricCategory> for Coding {
    fn from(code: DeviceMetricCategory) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/metric-category".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceMetricCategory> for CodeableConcept {
    fn from(code: DeviceMetricCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceMetricOperationalStatus](http://hl7.org/fhir/ValueSet/metric-operational-status)**. Describes the operational status of the DeviceMetric.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceMetricOperationalStatus {
    /** **entered-in-error**

Entered In Error. The DeviceMetric was entered in error. */
    EnteredInError,
    /** **off**

Off. The DeviceMetric is not operating. */
    Off,
    /** **on**

On. The DeviceMetric is operating and will generate Observations. */
    On,
    /** **standby**

Standby. The DeviceMetric is operating, but will not generate any Observations. */
    Standby,
}
impl ::core::str::FromStr for DeviceMetricOperationalStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "entered-in-error" => Ok(Self::EnteredInError),
            "off" => Ok(Self::Off),
            "on" => Ok(Self::On),
            "standby" => Ok(Self::Standby),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceMetricOperationalStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::EnteredInError => "entered-in-error",
            Self::Off => "off",
            Self::On => "on",
            Self::Standby => "standby",
        }
    }
}
impl ::std::fmt::Debug for DeviceMetricOperationalStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceMetricOperationalStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceMetricOperationalStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceMetricOperationalStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceMetricOperationalStatus> for Coding {
    fn from(code: DeviceMetricOperationalStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/metric-operational-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceMetricOperationalStatus> for CodeableConcept {
    fn from(code: DeviceMetricOperationalStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceNameType](http://hl7.org/fhir/ValueSet/device-nametype)**. The type of name the device is referred by.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceNameType {
    /** **patient-reported-name**

Patient Reported name. the term used by the patient associated with the device when describing the device, for example 'knee implant', when documented as a self-reported device. */
    PatientReportedName,
    /** **registered-name**

Registered name. The term assigned to a medical device by the entity who registers or submits information about it to a jurisdiction or its databases. This may be considered the manufacturer assigned name (e.g., brand name assigned by the labeler or manufacturer in US, or device name assigned by the manufacturer in EU) and may also be synonymous with proprietary name or trade name of the device. */
    RegisteredName,
    /** **user-friendly-name**

User Friendly name. The term that generically describes the device by a name as assigned by the manufacturer that is recognized by lay person.  This common or generic name may be printed on the package it came in or some combination of that name with the model number, serial number, or other attribute that makes the name easy to understand for the user of that device. It is often exposed in communicating devices transport protocols. It is provided to help users identify the device when reported in discovery operations. */
    UserFriendlyName,
}
impl ::core::str::FromStr for DeviceNameType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "patient-reported-name" => Ok(Self::PatientReportedName),
            "registered-name" => Ok(Self::RegisteredName),
            "user-friendly-name" => Ok(Self::UserFriendlyName),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceNameType {
    fn as_ref(&self) -> &str {
        match self {
            Self::PatientReportedName => "patient-reported-name",
            Self::RegisteredName => "registered-name",
            Self::UserFriendlyName => "user-friendly-name",
        }
    }
}
impl ::std::fmt::Debug for DeviceNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceNameType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceNameType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceNameType> for Coding {
    fn from(code: DeviceNameType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/device-nametype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceNameType> for CodeableConcept {
    fn from(code: DeviceNameType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceProductionIdentifierInUDI](http://hl7.org/fhir/device-productidentifierinudi)**. The production identifier(s) that are expected to appear in the UDI carrier.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum DeviceProductionIdentifierInUDI {
    /** **biological-source**

Biological source. The label includes the biological source identifier. */
    BiologicalSource,
    /** **expiration-date**

Expiration date. The label includes the expiration date. */
    ExpirationDate,
    /** **lot-number**

Lot Number. The label includes the lot number. */
    LotNumber,
    /** **manufactured-date**

Manufactured date. The label includes the manufacture date. */
    ManufacturedDate,
    /** **serial-number**

Serial Number. The label includes the serial number. */
    SerialNumber,
    /** **software-version**

Software Version. The label includes the software version. */
    SoftwareVersion,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for DeviceProductionIdentifierInUDI {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "biological-source" => Ok(Self::BiologicalSource),
            "expiration-date" => Ok(Self::ExpirationDate),
            "lot-number" => Ok(Self::LotNumber),
            "manufactured-date" => Ok(Self::ManufacturedDate),
            "serial-number" => Ok(Self::SerialNumber),
            "software-version" => Ok(Self::SoftwareVersion),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for DeviceProductionIdentifierInUDI {
    fn as_ref(&self) -> &str {
        match self {
            Self::BiologicalSource => "biological-source",
            Self::ExpirationDate => "expiration-date",
            Self::LotNumber => "lot-number",
            Self::ManufacturedDate => "manufactured-date",
            Self::SerialNumber => "serial-number",
            Self::SoftwareVersion => "software-version",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for DeviceProductionIdentifierInUDI {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceProductionIdentifierInUDI {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceProductionIdentifierInUDI {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceProductionIdentifierInUDI {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceProductionIdentifierInUDI> for Coding {
    fn from(code: DeviceProductionIdentifierInUDI) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/device-productidentifierinudi".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceProductionIdentifierInUDI> for CodeableConcept {
    fn from(code: DeviceProductionIdentifierInUDI) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceRegulatoryIdentifierType](http://hl7.org/fhir/devicedefinition-regulatory-identifier-type)**. The type of regulatory identifier.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum DeviceRegulatoryIdentifierType {
    /** **basic**

Basic. EUDAMED's basic UDI-DI identifier. */
    Basic,
    /** **license**

License. The identifier is a license number. */
    License,
    /** **master**

Master. EUDAMED's master UDI-DI identifier. */
    Master,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for DeviceRegulatoryIdentifierType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "basic" => Ok(Self::Basic),
            "license" => Ok(Self::License),
            "master" => Ok(Self::Master),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for DeviceRegulatoryIdentifierType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Basic => "basic",
            Self::License => "license",
            Self::Master => "master",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for DeviceRegulatoryIdentifierType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceRegulatoryIdentifierType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceRegulatoryIdentifierType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceRegulatoryIdentifierType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceRegulatoryIdentifierType> for Coding {
    fn from(code: DeviceRegulatoryIdentifierType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/devicedefinition-regulatory-identifier-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceRegulatoryIdentifierType> for CodeableConcept {
    fn from(code: DeviceRegulatoryIdentifierType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceUsageAdherenceCode](http://hl7.org/fhir/ValueSet/deviceusage-adherence-code)**. A coded concept indicating the usage of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceUsageAdherenceCode {
    /** **always**

Always. The device is always used. */
    Always,
    /** **never**

Never. The device is never used. */
    Never,
    /** **sometimes**

Sometimes. The device is sometimes used. */
    Sometimes,
}
impl ::core::str::FromStr for DeviceUsageAdherenceCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "always" => Ok(Self::Always),
            "never" => Ok(Self::Never),
            "sometimes" => Ok(Self::Sometimes),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceUsageAdherenceCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Always => "always",
            Self::Never => "never",
            Self::Sometimes => "sometimes",
        }
    }
}
impl ::std::fmt::Debug for DeviceUsageAdherenceCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceUsageAdherenceCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceUsageAdherenceCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceUsageAdherenceCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceUsageAdherenceCode> for Coding {
    fn from(code: DeviceUsageAdherenceCode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/deviceusage-adherence-code".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceUsageAdherenceCode> for CodeableConcept {
    fn from(code: DeviceUsageAdherenceCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceUsageAdherenceReason](http://hl7.org/fhir/ValueSet/deviceusage-adherence-reason)**. A coded concept indicating the reason for the usage of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceUsageAdherenceReason {
    /** **broken**

Broken. The device is broken. */
    Broken,
    /** **burned**

Burned. The device is burned. */
    Burned,
    /** **forgot**

Forgot. The device is forgotten. */
    Forgot,
    /** **lost**

Lost. The device is lost. */
    Lost,
    /** **prescribed**

Prescribed. The device is prescribed. */
    Prescribed,
    /** **stolen**

Stolen. The device is stolen. */
    Stolen,
}
impl ::core::str::FromStr for DeviceUsageAdherenceReason {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "broken" => Ok(Self::Broken),
            "burned" => Ok(Self::Burned),
            "forgot" => Ok(Self::Forgot),
            "lost" => Ok(Self::Lost),
            "prescribed" => Ok(Self::Prescribed),
            "stolen" => Ok(Self::Stolen),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceUsageAdherenceReason {
    fn as_ref(&self) -> &str {
        match self {
            Self::Broken => "broken",
            Self::Burned => "burned",
            Self::Forgot => "forgot",
            Self::Lost => "lost",
            Self::Prescribed => "prescribed",
            Self::Stolen => "stolen",
        }
    }
}
impl ::std::fmt::Debug for DeviceUsageAdherenceReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceUsageAdherenceReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceUsageAdherenceReason {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceUsageAdherenceReason {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceUsageAdherenceReason> for Coding {
    fn from(code: DeviceUsageAdherenceReason) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/deviceusage-adherence-reason".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceUsageAdherenceReason> for CodeableConcept {
    fn from(code: DeviceUsageAdherenceReason) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DeviceUsageStatus](http://hl7.org/fhir/ValueSet/deviceusage-status)**. A coded concept indicating the current status of the Device Usage.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DeviceUsageStatus {
    /** **active**

Active. The device is still being used. */
    Active,
    /** **completed**

Completed. The device is no longer being used. */
    Completed,
    /** **entered-in-error**

Entered in Error. The statement was recorded incorrectly. */
    EnteredInError,
    /** **intended**

Intended. The device may be used at some time in the future. */
    Intended,
    /** **not-done**

Not done. The device was not used. */
    NotDone,
    /** **on-hold**

On Hold. Actions implied by the statement have been temporarily halted, but are expected to continue later. May also be called "suspended". */
    OnHold,
    /** **stopped**

Stopped. Actions implied by the statement have been permanently halted, before all of them occurred. */
    Stopped,
}
impl ::core::str::FromStr for DeviceUsageStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "intended" => Ok(Self::Intended),
            "not-done" => Ok(Self::NotDone),
            "on-hold" => Ok(Self::OnHold),
            "stopped" => Ok(Self::Stopped),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DeviceUsageStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::Intended => "intended",
            Self::NotDone => "not-done",
            Self::OnHold => "on-hold",
            Self::Stopped => "stopped",
        }
    }
}
impl ::std::fmt::Debug for DeviceUsageStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DeviceUsageStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DeviceUsageStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DeviceUsageStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DeviceUsageStatus> for Coding {
    fn from(code: DeviceUsageStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/deviceusage-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DeviceUsageStatus> for CodeableConcept {
    fn from(code: DeviceUsageStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DiagnosticReportStatus](http://hl7.org/fhir/ValueSet/diagnostic-report-status)**. The status of the diagnostic report.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DiagnosticReportStatus {
    /** **amended**

Amended. Subsequent to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a report that has been issued. */
    Amended,
    /** **appended**

Appended. Subsequent to being final, the report has been modified by adding new content. The existing content is unchanged. */
    Appended,
    /** **cancelled**

Cancelled. The report is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). */
    Cancelled,
    /** **corrected**

Corrected. Subsequent to being final, the report has been modified to correct an error in the report or referenced results. */
    Corrected,
    /** **entered-in-error**

Entered in Error. The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **final**

Final. The report is complete and verified by an authorized person. */
    Final,
    /** **modified**

Modified. Prior to being final, the report has been modified.  This includes any change in the results, diagnosis, narrative text, or other content of a non-finalized (e.g., preliminary) report that has been issued. */
    Modified,
    /** **partial**

Partial. This is a partial (e.g. initial, interim or preliminary) report: data in the report may be incomplete or unverified. */
    Partial,
    /** **preliminary**

Preliminary. Verified early results are available, but not all results are final. */
    Preliminary,
    /** **registered**

Registered. The existence of the report is registered, but there is nothing yet available. */
    Registered,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for DiagnosticReportStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "appended" => Ok(Self::Appended),
            "cancelled" => Ok(Self::Cancelled),
            "corrected" => Ok(Self::Corrected),
            "entered-in-error" => Ok(Self::EnteredInError),
            "final" => Ok(Self::Final),
            "modified" => Ok(Self::Modified),
            "partial" => Ok(Self::Partial),
            "preliminary" => Ok(Self::Preliminary),
            "registered" => Ok(Self::Registered),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DiagnosticReportStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Appended => "appended",
            Self::Cancelled => "cancelled",
            Self::Corrected => "corrected",
            Self::EnteredInError => "entered-in-error",
            Self::Final => "final",
            Self::Modified => "modified",
            Self::Partial => "partial",
            Self::Preliminary => "preliminary",
            Self::Registered => "registered",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for DiagnosticReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DiagnosticReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DiagnosticReportStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DiagnosticReportStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DiagnosticReportStatus> for Coding {
    fn from(code: DiagnosticReportStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/diagnostic-report-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DiagnosticReportStatus> for CodeableConcept {
    fn from(code: DiagnosticReportStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DiscriminatorType](http://hl7.org/fhir/ValueSet/discriminator-type)**. How an element value is interpreted when discrimination is evaluated.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DiscriminatorType {
    /** **exists**

Exists. The slices are differentiated by the presence or absence of the nominated element. There SHALL be no more than two slices. The slices are differentiated by the fact that one must have a max of 0 and the other must have a min of 1 (or more).  The order in which the slices are declared doesn't matter. */
    Exists,
    /** **pattern**

Pattern. The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding. This has the same meaning as 'value' and is deprecated. */
    Pattern,
    /** **position**

Position. The slices are differentiated by their index. This is only possible if all but the last slice have min=max cardinality, and the (optional) last slice contains other undifferentiated elements. */
    Position,
    /** **profile**

Profile. The slices are differentiated by conformance of the nominated element to a specified profile. Note that if the path specifies .resolve() then the profile is the target profile on the reference. In this case, validation by the possible profiles is required to differentiate the slices. */
    Profile,
    /** **type**

Type. The slices are differentiated by type of the nominated element. */
    Type,
    /** **value**

Value. The slices have different values in the nominated element, as determined by the applicable fixed value, pattern, or required ValueSet binding. */
    Value,
}
impl ::core::str::FromStr for DiscriminatorType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "exists" => Ok(Self::Exists),
            "pattern" => Ok(Self::Pattern),
            "position" => Ok(Self::Position),
            "profile" => Ok(Self::Profile),
            "type" => Ok(Self::Type),
            "value" => Ok(Self::Value),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DiscriminatorType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Exists => "exists",
            Self::Pattern => "pattern",
            Self::Position => "position",
            Self::Profile => "profile",
            Self::Type => "type",
            Self::Value => "value",
        }
    }
}
impl ::std::fmt::Debug for DiscriminatorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DiscriminatorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DiscriminatorType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DiscriminatorType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DiscriminatorType> for Coding {
    fn from(code: DiscriminatorType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/discriminator-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DiscriminatorType> for CodeableConcept {
    fn from(code: DiscriminatorType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DocumentMode](http://hl7.org/fhir/ValueSet/document-mode)**. Whether the application produces or consumes documents.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DocumentMode {
    /** **consumer**

Consumer. The application consumes documents of the specified type. */
    Consumer,
    /** **producer**

Producer. The application produces documents of the specified type. */
    Producer,
}
impl ::core::str::FromStr for DocumentMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "consumer" => Ok(Self::Consumer),
            "producer" => Ok(Self::Producer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DocumentMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Consumer => "consumer",
            Self::Producer => "producer",
        }
    }
}
impl ::std::fmt::Debug for DocumentMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DocumentMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DocumentMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DocumentMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DocumentMode> for Coding {
    fn from(code: DocumentMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/document-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DocumentMode> for CodeableConcept {
    fn from(code: DocumentMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DocumentReferenceStatus](http://hl7.org/fhir/ValueSet/document-reference-status)**. The status of the document reference.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DocumentReferenceStatus {
    /** **current**

Current. This is the current reference for this document. */
    Current,
    /** **entered-in-error**

Entered in Error. This reference was created in error. */
    EnteredInError,
    /** **superseded**

Superseded. This reference has been superseded by another reference. */
    Superseded,
}
impl ::core::str::FromStr for DocumentReferenceStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "current" => Ok(Self::Current),
            "entered-in-error" => Ok(Self::EnteredInError),
            "superseded" => Ok(Self::Superseded),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DocumentReferenceStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Current => "current",
            Self::EnteredInError => "entered-in-error",
            Self::Superseded => "superseded",
        }
    }
}
impl ::std::fmt::Debug for DocumentReferenceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DocumentReferenceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DocumentReferenceStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DocumentReferenceStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DocumentReferenceStatus> for Coding {
    fn from(code: DocumentReferenceStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/document-reference-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DocumentReferenceStatus> for CodeableConcept {
    fn from(code: DocumentReferenceStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[DocumentRelationshipType](http://hl7.org/fhir/ValueSet/document-relationship-type)**. The type of relationship between documents.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum DocumentRelationshipType {
    /** **appends**

Appends. This document adds additional information to the target document. */
    Appends,
    /** **incorporates**

Incorporates. This document embeds the content from the (source) target document. */
    Incorporates,
    /** **replaces**

Replaces. This document logically replaces or supersedes the target document. */
    Replaces,
    /** **signs**

Signs. This document is a signature of the target document. */
    Signs,
    /** **summarizes**

Summarizes. This document summarizes the content from the (source) target document. */
    Summarizes,
    /** **transforms**

Transforms. This document was generated by transforming the target document (e.g. format or language conversion). */
    Transforms,
}
impl ::core::str::FromStr for DocumentRelationshipType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "appends" => Ok(Self::Appends),
            "incorporates" => Ok(Self::Incorporates),
            "replaces" => Ok(Self::Replaces),
            "signs" => Ok(Self::Signs),
            "summarizes" => Ok(Self::Summarizes),
            "transforms" => Ok(Self::Transforms),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for DocumentRelationshipType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Appends => "appends",
            Self::Incorporates => "incorporates",
            Self::Replaces => "replaces",
            Self::Signs => "signs",
            Self::Summarizes => "summarizes",
            Self::Transforms => "transforms",
        }
    }
}
impl ::std::fmt::Debug for DocumentRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for DocumentRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for DocumentRelationshipType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for DocumentRelationshipType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<DocumentRelationshipType> for Coding {
    fn from(code: DocumentRelationshipType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/document-relationship-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<DocumentRelationshipType> for CodeableConcept {
    fn from(code: DocumentRelationshipType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ETSISignatureTypeCodes](http://uri.etsi.org/01903/v1.2.2)**. The ETSI TS 101 733 V2.2.1 (2013-04) - Electronic Signatures and Infrastructures (ESI) - defines a set of Commitment Types (Purpose of Signature). ETSI TS 101 903 V1.2.2 defines vocabulary identifiers for these Commitment Types. Digital Signature Purposes, an indication of the reason an entity signs a document. This is included in the signed information and can be used when determining accountability for various actions concerning the document. \n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ETSISignatureTypeCodes {
    /** **ProofOfCreation**

Proof of creation. indicates that the signer has created the signed data object (but not necessarily approved, nor sent it). */
    ProofOfCreation,
    /** **ProofOfDelivery**

Proof of delivery. indicates that the TSP providing that indication has delivered a signed data object in a local store accessible to the recipient of the signed data object. */
    ProofOfDelivery,
    /** **ProofOfOrigin**

Proof of origin. indicates that the signer recognizes to have created, approved and sent the signed data object. */
    ProofOfOrigin,
    /** **ProofOfReceipt**

Proof of receipt. indicates that signer recognizes to have received the content of the signed data object. */
    ProofOfReceipt,
    /** **ProofOfSender**

Proof of sender. indicates that the entity providing that indication has sent the signed data object (but not necessarily created it). */
    ProofOfSender,
    /** **ProofOfapproval**

Proof of approval. indicates that the signer has approved the content of the signed data object. */
    ProofOfapproval,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ETSISignatureTypeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ProofOfCreation" => Ok(Self::ProofOfCreation),
            "ProofOfDelivery" => Ok(Self::ProofOfDelivery),
            "ProofOfOrigin" => Ok(Self::ProofOfOrigin),
            "ProofOfReceipt" => Ok(Self::ProofOfReceipt),
            "ProofOfSender" => Ok(Self::ProofOfSender),
            "ProofOfapproval" => Ok(Self::ProofOfapproval),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ETSISignatureTypeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::ProofOfCreation => "ProofOfCreation",
            Self::ProofOfDelivery => "ProofOfDelivery",
            Self::ProofOfOrigin => "ProofOfOrigin",
            Self::ProofOfReceipt => "ProofOfReceipt",
            Self::ProofOfSender => "ProofOfSender",
            Self::ProofOfapproval => "ProofOfapproval",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ETSISignatureTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ETSISignatureTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ETSISignatureTypeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ETSISignatureTypeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ETSISignatureTypeCodes> for Coding {
    fn from(code: ETSISignatureTypeCodes) -> Self {
        CodingInner {
            system: Some("http://uri.etsi.org/01903/v1.2.2".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ETSISignatureTypeCodes> for CodeableConcept {
    fn from(code: ETSISignatureTypeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EligibilityRequestPurpose](http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose)**. A code specifying the types of information being requested.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EligibilityRequestPurpose {
    /** **auth-requirements**

Coverage auth-requirements. The prior authorization requirements for the listed, or discovered if specified, converages for the categories of service and/or specifed biling codes are requested. */
    AuthRequirements,
    /** **benefits**

Coverage benefits. The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested. */
    Benefits,
    /** **discovery**

Coverage Discovery. The insurer is requested to report on any coverages which they are aware of in addition to any specifed. */
    Discovery,
    /** **validation**

Coverage Validation. A check that the specified coverages are in-force is requested. */
    Validation,
}
impl ::core::str::FromStr for EligibilityRequestPurpose {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "auth-requirements" => Ok(Self::AuthRequirements),
            "benefits" => Ok(Self::Benefits),
            "discovery" => Ok(Self::Discovery),
            "validation" => Ok(Self::Validation),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EligibilityRequestPurpose {
    fn as_ref(&self) -> &str {
        match self {
            Self::AuthRequirements => "auth-requirements",
            Self::Benefits => "benefits",
            Self::Discovery => "discovery",
            Self::Validation => "validation",
        }
    }
}
impl ::std::fmt::Debug for EligibilityRequestPurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EligibilityRequestPurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EligibilityRequestPurpose {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EligibilityRequestPurpose {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EligibilityRequestPurpose> for Coding {
    fn from(code: EligibilityRequestPurpose) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/eligibilityrequest-purpose".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EligibilityRequestPurpose> for CodeableConcept {
    fn from(code: EligibilityRequestPurpose) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EligibilityResponsePurpose](http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose)**. A code specifying the types of information being requested.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EligibilityResponsePurpose {
    /** **auth-requirements**

Coverage auth-requirements. The prior authorization requirements for the listed, or discovered if specified, converages for the categories of service and/or specifed biling codes are requested. */
    AuthRequirements,
    /** **benefits**

Coverage benefits. The plan benefits and optionally benefits consumed  for the listed, or discovered if specified, converages are requested. */
    Benefits,
    /** **discovery**

Coverage Discovery. The insurer is requested to report on any coverages which they are aware of in addition to any specifed. */
    Discovery,
    /** **validation**

Coverage Validation. A check that the specified coverages are in-force is requested. */
    Validation,
}
impl ::core::str::FromStr for EligibilityResponsePurpose {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "auth-requirements" => Ok(Self::AuthRequirements),
            "benefits" => Ok(Self::Benefits),
            "discovery" => Ok(Self::Discovery),
            "validation" => Ok(Self::Validation),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EligibilityResponsePurpose {
    fn as_ref(&self) -> &str {
        match self {
            Self::AuthRequirements => "auth-requirements",
            Self::Benefits => "benefits",
            Self::Discovery => "discovery",
            Self::Validation => "validation",
        }
    }
}
impl ::std::fmt::Debug for EligibilityResponsePurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EligibilityResponsePurpose {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EligibilityResponsePurpose {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EligibilityResponsePurpose {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EligibilityResponsePurpose> for Coding {
    fn from(code: EligibilityResponsePurpose) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/eligibilityresponse-purpose".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EligibilityResponsePurpose> for CodeableConcept {
    fn from(code: EligibilityResponsePurpose) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EnableWhenBehavior](http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior)**. Controls how multiple enableWhen values are interpreted -  whether all or any must be true.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EnableWhenBehavior {
    /** **all**

All. Enable the question when all the enableWhen criteria are satisfied. */
    All,
    /** **any**

Any. Enable the question when any of the enableWhen criteria are satisfied. */
    Any,
}
impl ::core::str::FromStr for EnableWhenBehavior {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "all" => Ok(Self::All),
            "any" => Ok(Self::Any),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EnableWhenBehavior {
    fn as_ref(&self) -> &str {
        match self {
            Self::All => "all",
            Self::Any => "any",
        }
    }
}
impl ::std::fmt::Debug for EnableWhenBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EnableWhenBehavior {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EnableWhenBehavior {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EnableWhenBehavior {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EnableWhenBehavior> for Coding {
    fn from(code: EnableWhenBehavior) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/questionnaire-enable-behavior".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EnableWhenBehavior> for CodeableConcept {
    fn from(code: EnableWhenBehavior) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EncounterDiagnosisUse](http://hl7.org/fhir/encounter-diagnosis-use)**. Encounter Condition Use\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum EncounterDiagnosisUse {
    /** **final**

Final. */
    Final,
    /** **working**

Working. */
    Working,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for EncounterDiagnosisUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "final" => Ok(Self::Final),
            "working" => Ok(Self::Working),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for EncounterDiagnosisUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Final => "final",
            Self::Working => "working",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for EncounterDiagnosisUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EncounterDiagnosisUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EncounterDiagnosisUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EncounterDiagnosisUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EncounterDiagnosisUse> for Coding {
    fn from(code: EncounterDiagnosisUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/encounter-diagnosis-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EncounterDiagnosisUse> for CodeableConcept {
    fn from(code: EncounterDiagnosisUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EncounterLocationStatus](http://hl7.org/fhir/ValueSet/encounter-location-status)**. The status of the location.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EncounterLocationStatus {
    /** **active**

Active. The patient is currently at this location, or was between the period specified.

A system may update these records when the patient leaves the location to either reserved, or completed. */
    Active,
    /** **completed**

Completed. The patient was at this location during the period specified.

Not to be used when the patient is currently at the location. */
    Completed,
    /** **planned**

Planned. The patient is planned to be moved to this location at some point in the future. */
    Planned,
    /** **reserved**

Reserved. This location is held empty for this patient. */
    Reserved,
}
impl ::core::str::FromStr for EncounterLocationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "completed" => Ok(Self::Completed),
            "planned" => Ok(Self::Planned),
            "reserved" => Ok(Self::Reserved),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EncounterLocationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Completed => "completed",
            Self::Planned => "planned",
            Self::Reserved => "reserved",
        }
    }
}
impl ::std::fmt::Debug for EncounterLocationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EncounterLocationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EncounterLocationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EncounterLocationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EncounterLocationStatus> for Coding {
    fn from(code: EncounterLocationStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/encounter-location-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EncounterLocationStatus> for CodeableConcept {
    fn from(code: EncounterLocationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EncounterReasonUse](http://hl7.org/fhir/ValueSet/encounter-reason-use)**. Encounter Reason Use\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EncounterReasonUse {
    /** **AD**

Admitting Diagnosis. */
    Ad,
    /** **CC**

Chief Complaint. */
    Cc,
    /** **HC**

Health Concern. */
    Hc,
    /** **HM**

Health Maintenance (including screening). */
    Hm,
    /** **RV**

Reason for Visit. */
    Rv,
}
impl ::core::str::FromStr for EncounterReasonUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "AD" => Ok(Self::Ad),
            "CC" => Ok(Self::Cc),
            "HC" => Ok(Self::Hc),
            "HM" => Ok(Self::Hm),
            "RV" => Ok(Self::Rv),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EncounterReasonUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ad => "AD",
            Self::Cc => "CC",
            Self::Hc => "HC",
            Self::Hm => "HM",
            Self::Rv => "RV",
        }
    }
}
impl ::std::fmt::Debug for EncounterReasonUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EncounterReasonUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EncounterReasonUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EncounterReasonUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EncounterReasonUse> for Coding {
    fn from(code: EncounterReasonUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/encounter-reason-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EncounterReasonUse> for CodeableConcept {
    fn from(code: EncounterReasonUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EncounterStatus](http://hl7.org/fhir/ValueSet/encounter-status)**. Current state of the encounter.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EncounterStatus {
    /** **cancelled**

Cancelled. The Encounter has ended before it has begun. */
    Cancelled,
    /** **completed**

Completed. The Encounter has ended. */
    Completed,
    /** **discharged**

Discharged. The Encounter has been clinically completed, the patient has been discharged from the facility or the visit has ended, and the patient may have departed (refer to subjectStatus). While the encounter is in this status, administrative activities are usually performed, collating all required documentation and charge information before being released for billing, at which point the status will move to completed. */
    Discharged,
    /** **discontinued**

Discontinued. The Encounter has started, but was not able to be completed. Further action may need to be performed, such as rescheduling appointments related to this encounter. */
    Discontinued,
    /** **entered-in-error**

Entered in Error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **in-progress**

In Progress. The Encounter has begun and the patient is present / the practitioner and the patient are meeting. */
    InProgress,
    /** **on-hold**

On Hold. The Encounter has begun, but is currently on hold, e.g. because the patient is temporarily on leave. */
    OnHold,
    /** **planned**

Planned. The Encounter has not yet started. */
    Planned,
    /** **unknown**

Unknown. The encounter status is unknown. Note that "unknown" is a value of last resort and every attempt should be made to provide a meaningful value other than "unknown". */
    Unknown,
}
impl ::core::str::FromStr for EncounterStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "discharged" => Ok(Self::Discharged),
            "discontinued" => Ok(Self::Discontinued),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "on-hold" => Ok(Self::OnHold),
            "planned" => Ok(Self::Planned),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EncounterStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Discharged => "discharged",
            Self::Discontinued => "discontinued",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::OnHold => "on-hold",
            Self::Planned => "planned",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for EncounterStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EncounterStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EncounterStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EncounterStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EncounterStatus> for Coding {
    fn from(code: EncounterStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/encounter-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EncounterStatus> for CodeableConcept {
    fn from(code: EncounterStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EndpointEnvironment](http://hl7.org/fhir/ValueSet/endpoint-environment)**. The environment type of the endpoint.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EndpointEnvironment {
    /** **dev**

Development. Development environment used while building systems */
    Dev,
    /** **prod**

Production. Production environment and is expected to contain real data and should be protected appropriately */
    Prod,
    /** **staging**

Staging. Staging environment typically used while preparing for a release to production */
    Staging,
    /** **test**

Test. Test environment, it is not intended for production usage. */
    Test,
    /** **train**

Training. Training environment, it is not intended for production usage and typically contains data specifically prepared for training usage. */
    Train,
}
impl ::core::str::FromStr for EndpointEnvironment {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "dev" => Ok(Self::Dev),
            "prod" => Ok(Self::Prod),
            "staging" => Ok(Self::Staging),
            "test" => Ok(Self::Test),
            "train" => Ok(Self::Train),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EndpointEnvironment {
    fn as_ref(&self) -> &str {
        match self {
            Self::Dev => "dev",
            Self::Prod => "prod",
            Self::Staging => "staging",
            Self::Test => "test",
            Self::Train => "train",
        }
    }
}
impl ::std::fmt::Debug for EndpointEnvironment {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EndpointEnvironment {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EndpointEnvironment {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EndpointEnvironment {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EndpointEnvironment> for Coding {
    fn from(code: EndpointEnvironment) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/endpoint-environment".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EndpointEnvironment> for CodeableConcept {
    fn from(code: EndpointEnvironment) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EndpointStatus](http://hl7.org/fhir/ValueSet/endpoint-status)**. The status of the endpoint.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EndpointStatus {
    /** **active**

Active. This endpoint is expected to be active and can be used. */
    Active,
    /** **entered-in-error**

Entered in error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **error**

Error. This endpoint has exceeded connectivity thresholds and is considered in an error state and should no longer be attempted to connect to until corrective action is taken. */
    Error,
    /** **off**

Off. This endpoint is no longer to be used. */
    Off,
    /** **suspended**

Suspended. This endpoint is temporarily unavailable. */
    Suspended,
}
impl ::core::str::FromStr for EndpointStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "error" => Ok(Self::Error),
            "off" => Ok(Self::Off),
            "suspended" => Ok(Self::Suspended),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EndpointStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Error => "error",
            Self::Off => "off",
            Self::Suspended => "suspended",
        }
    }
}
impl ::std::fmt::Debug for EndpointStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EndpointStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EndpointStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EndpointStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EndpointStatus> for Coding {
    fn from(code: EndpointStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/endpoint-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EndpointStatus> for CodeableConcept {
    fn from(code: EndpointStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EpisodeOfCareStatus](http://hl7.org/fhir/ValueSet/episode-of-care-status)**. The status of the episode of care.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EpisodeOfCareStatus {
    /** **active**

Active. This episode of care is current. */
    Active,
    /** **cancelled**

Cancelled. The episode of care was cancelled, or withdrawn from service, often selected during the planned stage as the patient may have gone elsewhere, or the circumstances have changed and the organization is unable to provide the care. It indicates that services terminated outside the planned/expected workflow. */
    Cancelled,
    /** **entered-in-error**

Entered in Error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **finished**

Finished. This episode of care is finished and the organization is not expecting to be providing further care to the patient. Can also be known as "closed", "completed" or other similar terms. */
    Finished,
    /** **onhold**

On Hold. This episode of care is on hold; the organization has limited responsibility for the patient (such as while on respite). */
    Onhold,
    /** **planned**

Planned. This episode of care is planned to start at the date specified in the period.start. During this status, an organization may perform assessments to determine if the patient is eligible to receive services, or be organizing to make resources available to provide care services. */
    Planned,
    /** **waitlist**

Waitlist. This episode has been placed on a waitlist, pending the episode being made active (or cancelled). */
    Waitlist,
}
impl ::core::str::FromStr for EpisodeOfCareStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "entered-in-error" => Ok(Self::EnteredInError),
            "finished" => Ok(Self::Finished),
            "onhold" => Ok(Self::Onhold),
            "planned" => Ok(Self::Planned),
            "waitlist" => Ok(Self::Waitlist),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EpisodeOfCareStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::EnteredInError => "entered-in-error",
            Self::Finished => "finished",
            Self::Onhold => "onhold",
            Self::Planned => "planned",
            Self::Waitlist => "waitlist",
        }
    }
}
impl ::std::fmt::Debug for EpisodeOfCareStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EpisodeOfCareStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EpisodeOfCareStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EpisodeOfCareStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EpisodeOfCareStatus> for Coding {
    fn from(code: EpisodeOfCareStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/episode-of-care-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EpisodeOfCareStatus> for CodeableConcept {
    fn from(code: EpisodeOfCareStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EventCapabilityMode](http://hl7.org/fhir/ValueSet/event-capability-mode)**. The mode of a message capability statement.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EventCapabilityMode {
    /** **receiver**

Receiver. The application receives requests and sends responses. */
    Receiver,
    /** **sender**

Sender. The application sends requests and receives responses. */
    Sender,
}
impl ::core::str::FromStr for EventCapabilityMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "receiver" => Ok(Self::Receiver),
            "sender" => Ok(Self::Sender),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EventCapabilityMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Receiver => "receiver",
            Self::Sender => "sender",
        }
    }
}
impl ::std::fmt::Debug for EventCapabilityMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EventCapabilityMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EventCapabilityMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EventCapabilityMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EventCapabilityMode> for Coding {
    fn from(code: EventCapabilityMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/event-capability-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EventCapabilityMode> for CodeableConcept {
    fn from(code: EventCapabilityMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EventStatus](http://hl7.org/fhir/ValueSet/event-status)**. Codes identifying the lifecycle stage of an event.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EventStatus {
    /** **completed**

Completed. The event has now concluded. */
    Completed,
    /** **entered-in-error**

Entered in Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "stopped" rather than "entered-in-error".). */
    EnteredInError,
    /** **in-progress**

In Progress. The event is currently occurring. */
    InProgress,
    /** **not-done**

Not Done. The event was terminated prior to any activity beyond preparation.  I.e. The 'main' activity has not yet begun.  The boundary between preparatory and the 'main' activity is context-specific. */
    NotDone,
    /** **on-hold**

On Hold. The event has been temporarily stopped but is expected to resume in the future. */
    OnHold,
    /** **preparation**

Preparation. The core event has not started yet, but some staging activities have begun (e.g. surgical suite preparation).  Preparation stages may be tracked for billing purposes. */
    Preparation,
    /** **stopped**

Stopped. The event was terminated prior to the full completion of the intended activity but after at least some of the 'main' activity (beyond preparation) has occurred. */
    Stopped,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this event.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for EventStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "not-done" => Ok(Self::NotDone),
            "on-hold" => Ok(Self::OnHold),
            "preparation" => Ok(Self::Preparation),
            "stopped" => Ok(Self::Stopped),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EventStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::NotDone => "not-done",
            Self::OnHold => "on-hold",
            Self::Preparation => "preparation",
            Self::Stopped => "stopped",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for EventStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EventStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EventStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EventStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EventStatus> for Coding {
    fn from(code: EventStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/event-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EventStatus> for CodeableConcept {
    fn from(code: EventStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EventTiming](http://hl7.org/fhir/event-timing)**. Real-world event relating to the schedule.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum EventTiming {
    /** **AFT**

Afternoon. Event occurs during the afternoon. The exact time is unspecified and established by institution convention or patient interpretation. */
    Aft,
    /** **AFT.early**

Early Afternoon. Event occurs during the early afternoon. The exact time is unspecified and established by institution convention or patient interpretation. */
    AftEarly,
    /** **AFT.late**

Late Afternoon. Event occurs during the late afternoon. The exact time is unspecified and established by institution convention or patient interpretation. */
    AftLate,
    /** **EVE**

Evening. Event occurs during the evening. The exact time is unspecified and established by institution convention or patient interpretation. */
    Eve,
    /** **EVE.early**

Early Evening. Event occurs during the early evening. The exact time is unspecified and established by institution convention or patient interpretation. */
    EveEarly,
    /** **EVE.late**

Late Evening. Event occurs during the late evening. The exact time is unspecified and established by institution convention or patient interpretation. */
    EveLate,
    /** **IMD**

Immediate. Event occurs a single time (with no repetitions) as soon as possible after the scheduled or actual start of the overall event. */
    Imd,
    /** **MORN**

Morning. Event occurs during the morning. The exact time is unspecified and established by institution convention or patient interpretation. */
    Morn,
    /** **MORN.early**

Early Morning. Event occurs during the early morning. The exact time is unspecified and established by institution convention or patient interpretation. */
    MornEarly,
    /** **MORN.late**

Late Morning. Event occurs during the late morning. The exact time is unspecified and established by institution convention or patient interpretation. */
    MornLate,
    /** **NIGHT**

Night. Event occurs during the night. The exact time is unspecified and established by institution convention or patient interpretation. */
    Night,
    /** **NOON**

Noon. Event occurs around 12:00pm. The exact time is unspecified and established by institution convention or patient interpretation. */
    Noon,
    /** **PHS**

After Sleep. Event occurs [offset] after subject goes to sleep. The exact time is unspecified and established by institution convention or patient interpretation. */
    Phs,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for EventTiming {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "AFT" => Ok(Self::Aft),
            "AFT.early" => Ok(Self::AftEarly),
            "AFT.late" => Ok(Self::AftLate),
            "EVE" => Ok(Self::Eve),
            "EVE.early" => Ok(Self::EveEarly),
            "EVE.late" => Ok(Self::EveLate),
            "IMD" => Ok(Self::Imd),
            "MORN" => Ok(Self::Morn),
            "MORN.early" => Ok(Self::MornEarly),
            "MORN.late" => Ok(Self::MornLate),
            "NIGHT" => Ok(Self::Night),
            "NOON" => Ok(Self::Noon),
            "PHS" => Ok(Self::Phs),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for EventTiming {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aft => "AFT",
            Self::AftEarly => "AFT.early",
            Self::AftLate => "AFT.late",
            Self::Eve => "EVE",
            Self::EveEarly => "EVE.early",
            Self::EveLate => "EVE.late",
            Self::Imd => "IMD",
            Self::Morn => "MORN",
            Self::MornEarly => "MORN.early",
            Self::MornLate => "MORN.late",
            Self::Night => "NIGHT",
            Self::Noon => "NOON",
            Self::Phs => "PHS",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for EventTiming {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EventTiming {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EventTiming {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EventTiming {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EventTiming> for Coding {
    fn from(code: EventTiming) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/event-timing".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EventTiming> for CodeableConcept {
    fn from(code: EventTiming) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceCertaintyRating](http://hl7.org/fhir/ValueSet/certainty-rating)**. The assessment of quality, confidence, or certainty.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceCertaintyRating {
    /** **absent**

absent. possible reason for increasing quality rating was checked and found to be absent. */
    Absent,
    /** **downcode1**

reduce rating: -1. reduce quality rating by 1. */
    Downcode1,
    /** **downcode2**

reduce rating: -2. reduce quality rating by 2. */
    Downcode2,
    /** **downcode3**

reduce rating: -3. reduce quality rating by 3. */
    Downcode3,
    /** **extremely-serious-concern**

extremely serious concern. extremely serious concern. */
    ExtremelySeriousConcern,
    /** **high**

High quality. High quality evidence. */
    High,
    /** **low**

Low quality. Low quality evidence. */
    Low,
    /** **moderate**

Moderate quality. Moderate quality evidence. */
    Moderate,
    /** **no-change**

no change to rating. no change to quality rating. */
    NoChange,
    /** **no-concern**

no serious concern. no serious concern. */
    NoConcern,
    /** **present**

present. possible reason for increasing quality rating was checked and found to be present. */
    Present,
    /** **serious-concern**

serious concern. serious concern. */
    SeriousConcern,
    /** **upcode1**

increase rating: +1. increase quality rating by 1. */
    Upcode1,
    /** **upcode2**

increase rating: +2. increase quality rating by 2. */
    Upcode2,
    /** **very-low**

Very low quality. Very low quality evidence. */
    VeryLow,
    /** **very-serious-concern**

very serious concern. very serious concern. */
    VerySeriousConcern,
}
impl ::core::str::FromStr for EvidenceCertaintyRating {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "absent" => Ok(Self::Absent),
            "downcode1" => Ok(Self::Downcode1),
            "downcode2" => Ok(Self::Downcode2),
            "downcode3" => Ok(Self::Downcode3),
            "extremely-serious-concern" => Ok(Self::ExtremelySeriousConcern),
            "high" => Ok(Self::High),
            "low" => Ok(Self::Low),
            "moderate" => Ok(Self::Moderate),
            "no-change" => Ok(Self::NoChange),
            "no-concern" => Ok(Self::NoConcern),
            "present" => Ok(Self::Present),
            "serious-concern" => Ok(Self::SeriousConcern),
            "upcode1" => Ok(Self::Upcode1),
            "upcode2" => Ok(Self::Upcode2),
            "very-low" => Ok(Self::VeryLow),
            "very-serious-concern" => Ok(Self::VerySeriousConcern),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceCertaintyRating {
    fn as_ref(&self) -> &str {
        match self {
            Self::Absent => "absent",
            Self::Downcode1 => "downcode1",
            Self::Downcode2 => "downcode2",
            Self::Downcode3 => "downcode3",
            Self::ExtremelySeriousConcern => "extremely-serious-concern",
            Self::High => "high",
            Self::Low => "low",
            Self::Moderate => "moderate",
            Self::NoChange => "no-change",
            Self::NoConcern => "no-concern",
            Self::Present => "present",
            Self::SeriousConcern => "serious-concern",
            Self::Upcode1 => "upcode1",
            Self::Upcode2 => "upcode2",
            Self::VeryLow => "very-low",
            Self::VerySeriousConcern => "very-serious-concern",
        }
    }
}
impl ::std::fmt::Debug for EvidenceCertaintyRating {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceCertaintyRating {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceCertaintyRating {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceCertaintyRating {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceCertaintyRating> for Coding {
    fn from(code: EvidenceCertaintyRating) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/certainty-rating".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceCertaintyRating> for CodeableConcept {
    fn from(code: EvidenceCertaintyRating) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceCertaintyType](http://hl7.org/fhir/ValueSet/certainty-type)**. The aspect of quality, confidence, or certainty.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceCertaintyType {
    /** **DoseResponseGradient**

Dose response gradient. higher certainty due to dose response relationship. */
    DoseResponseGradient,
    /** **Imprecision**

Imprecision. fuzzy or wide variability. */
    Imprecision,
    /** **Inconsistency**

Inconsistency. concerns that findings are not similar enough to support certainty. */
    Inconsistency,
    /** **Indirectness**

Indirectness. concerns reducing external validity. */
    Indirectness,
    /** **LargeEffect**

Large effect. higher certainty due to large effect size. */
    LargeEffect,
    /** **Overall**

Overall certainty. Overall certainty of evidence (quality of evidence). */
    Overall,
    /** **PlausibleConfounding**

Plausible confounding. higher certainty due to risk of bias in opposite direction. */
    PlausibleConfounding,
    /** **PublicationBias**

Publication bias. likelihood that what is published misrepresents what is available to publish. */
    PublicationBias,
    /** **RiskOfBias**

Risk of bias. methodologic concerns reducing internal validity. */
    RiskOfBias,
}
impl ::core::str::FromStr for EvidenceCertaintyType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "DoseResponseGradient" => Ok(Self::DoseResponseGradient),
            "Imprecision" => Ok(Self::Imprecision),
            "Inconsistency" => Ok(Self::Inconsistency),
            "Indirectness" => Ok(Self::Indirectness),
            "LargeEffect" => Ok(Self::LargeEffect),
            "Overall" => Ok(Self::Overall),
            "PlausibleConfounding" => Ok(Self::PlausibleConfounding),
            "PublicationBias" => Ok(Self::PublicationBias),
            "RiskOfBias" => Ok(Self::RiskOfBias),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceCertaintyType {
    fn as_ref(&self) -> &str {
        match self {
            Self::DoseResponseGradient => "DoseResponseGradient",
            Self::Imprecision => "Imprecision",
            Self::Inconsistency => "Inconsistency",
            Self::Indirectness => "Indirectness",
            Self::LargeEffect => "LargeEffect",
            Self::Overall => "Overall",
            Self::PlausibleConfounding => "PlausibleConfounding",
            Self::PublicationBias => "PublicationBias",
            Self::RiskOfBias => "RiskOfBias",
        }
    }
}
impl ::std::fmt::Debug for EvidenceCertaintyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceCertaintyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceCertaintyType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceCertaintyType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceCertaintyType> for Coding {
    fn from(code: EvidenceCertaintyType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/certainty-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceCertaintyType> for CodeableConcept {
    fn from(code: EvidenceCertaintyType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceClassifier](http://hl7.org/fhir/ValueSet/evidence-classifier-code)**. Commonly used classifiers for evidence sets.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceClassifier {
    /** **AllocConcealNotStated**

Allocation concealment not stated. Allocation concealment not stated. */
    AllocConcealNotStated,
    /** **BaselineImbalance**

Baseline imbalances. Differences between groups at start of trial may confound or bias the findings. */
    BaselineImbalance,
    /** **COVID19HumanResearch**

COVID-19 human data in population, exposure, or outcome. contains human COVID-19 disease in the research data as any variable (population, exposure or outcome). */
    Covid19HumanResearch,
    /** **COVID19Relevant**

COVID-19 relevant (but not specific) article. Not about COVID-19 but relevant to COVID-19 management or understanding. */
    Covid19Relevant,
    /** **COVID19Specific**

COVID-19 specific article. About COVID-19. */
    Covid19Specific,
    /** **Diagnosis**

Article about diagnosis. about methods to distinguish having or not having a condition. */
    Diagnosis,
    /** **EarlyTrialTermination**

Early trial termination. Early trial termination. */
    EarlyTrialTermination,
    /** **Guideline**

Article includes guideline. for clinical practice guidelines. */
    Guideline,
    /** **NoBlinding**

No blinding. No blinding. */
    NoBlinding,
    /** **NoITT**

No intention-to-treat analysis. No intention-to-treat analysis. */
    NoItt,
    /** **NotAssessed**

Not rated, not assessed. Neither rated as yes nor rated as no. */
    NotAssessed,
    /** **NotResearchNotGuideline**

Article is neither research nor guideline. for things that are not research reports, research protocols or guidelines. */
    NotResearchNotGuideline,
    /** **OriginalResearch**

Article includes original research. such as randomized trial, observational study. */
    OriginalResearch,
    /** **PreliminaryAnalysis**

Preliminary analysis. Preliminary analysis. */
    PreliminaryAnalysis,
    /** **Preprint**

Preprint (not final publication). Results presented in preprint (pre-final publication) form. */
    Preprint,
    /** **PreventionAndControl**

Article about prevention and control. about preventive care and interventions. */
    PreventionAndControl,
    /** **PrognosisPrediction**

Article about prognosis or prediction. about predicting risk for something or risk factors for it. */
    PrognosisPrediction,
    /** **RatedAsCaseControl**

classified as case-control study. classified as case-control study. */
    RatedAsCaseControl,
    /** **RatedAsComparativeCohort**

classified as comparative cohort study (observational). classified as comparative cohort study (observational). */
    RatedAsComparativeCohort,
    /** **RatedAsControlledTrial**

classified as nonrandomized controlled trial (experimental). classified as nonrandomized controlled trial (experimental). */
    RatedAsControlledTrial,
    /** **RatedAsMixedMethods**

classified as mixed-methods study. classified as mixed-methods study. */
    RatedAsMixedMethods,
    /** **RatedAsNo**

Rated as no, negative, absent, or exclude. Rated as no, negative, absent, or exclude. */
    RatedAsNo,
    /** **RatedAsOther**

classified as other concept (not elsewhere classified). classified as other concept (not elsewhere classified). */
    RatedAsOther,
    /** **RatedAsRCT**

classified as randomized controlled trial. classified as randomized controlled trial. */
    RatedAsRct,
    /** **RatedAsUncontrolledSeries**

classified as uncontrolled cohort (case series). classified as uncontrolled cohort (case series). */
    RatedAsUncontrolledSeries,
    /** **RatedAsYes**

Rated as yes, affirmative, positive, present, or include. */
    RatedAsYes,
    /** **ResearchProtocol**

Article provides protocol without results. for research protocols. */
    ResearchProtocol,
    /** **ResearchSynthesis**

Article includes synthesis of research. such as systematic review, meta-analysis, rapid review. */
    ResearchSynthesis,
    /** **RiskOfBias**

Risk of bias assessment. Risk of bias assessment. */
    RiskOfBias,
    /** **SubgroupAnalysis**

Subgroup analysis. Subgroup analysis. */
    SubgroupAnalysis,
    /** **Treatment**

Article about treatment. about therapeutic interventions. */
    Treatment,
}
impl ::core::str::FromStr for EvidenceClassifier {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "AllocConcealNotStated" => Ok(Self::AllocConcealNotStated),
            "BaselineImbalance" => Ok(Self::BaselineImbalance),
            "COVID19HumanResearch" => Ok(Self::Covid19HumanResearch),
            "COVID19Relevant" => Ok(Self::Covid19Relevant),
            "COVID19Specific" => Ok(Self::Covid19Specific),
            "Diagnosis" => Ok(Self::Diagnosis),
            "EarlyTrialTermination" => Ok(Self::EarlyTrialTermination),
            "Guideline" => Ok(Self::Guideline),
            "NoBlinding" => Ok(Self::NoBlinding),
            "NoITT" => Ok(Self::NoItt),
            "NotAssessed" => Ok(Self::NotAssessed),
            "NotResearchNotGuideline" => Ok(Self::NotResearchNotGuideline),
            "OriginalResearch" => Ok(Self::OriginalResearch),
            "PreliminaryAnalysis" => Ok(Self::PreliminaryAnalysis),
            "Preprint" => Ok(Self::Preprint),
            "PreventionAndControl" => Ok(Self::PreventionAndControl),
            "PrognosisPrediction" => Ok(Self::PrognosisPrediction),
            "RatedAsCaseControl" => Ok(Self::RatedAsCaseControl),
            "RatedAsComparativeCohort" => Ok(Self::RatedAsComparativeCohort),
            "RatedAsControlledTrial" => Ok(Self::RatedAsControlledTrial),
            "RatedAsMixedMethods" => Ok(Self::RatedAsMixedMethods),
            "RatedAsNo" => Ok(Self::RatedAsNo),
            "RatedAsOther" => Ok(Self::RatedAsOther),
            "RatedAsRCT" => Ok(Self::RatedAsRct),
            "RatedAsUncontrolledSeries" => Ok(Self::RatedAsUncontrolledSeries),
            "RatedAsYes" => Ok(Self::RatedAsYes),
            "ResearchProtocol" => Ok(Self::ResearchProtocol),
            "ResearchSynthesis" => Ok(Self::ResearchSynthesis),
            "RiskOfBias" => Ok(Self::RiskOfBias),
            "SubgroupAnalysis" => Ok(Self::SubgroupAnalysis),
            "Treatment" => Ok(Self::Treatment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceClassifier {
    fn as_ref(&self) -> &str {
        match self {
            Self::AllocConcealNotStated => "AllocConcealNotStated",
            Self::BaselineImbalance => "BaselineImbalance",
            Self::Covid19HumanResearch => "COVID19HumanResearch",
            Self::Covid19Relevant => "COVID19Relevant",
            Self::Covid19Specific => "COVID19Specific",
            Self::Diagnosis => "Diagnosis",
            Self::EarlyTrialTermination => "EarlyTrialTermination",
            Self::Guideline => "Guideline",
            Self::NoBlinding => "NoBlinding",
            Self::NoItt => "NoITT",
            Self::NotAssessed => "NotAssessed",
            Self::NotResearchNotGuideline => "NotResearchNotGuideline",
            Self::OriginalResearch => "OriginalResearch",
            Self::PreliminaryAnalysis => "PreliminaryAnalysis",
            Self::Preprint => "Preprint",
            Self::PreventionAndControl => "PreventionAndControl",
            Self::PrognosisPrediction => "PrognosisPrediction",
            Self::RatedAsCaseControl => "RatedAsCaseControl",
            Self::RatedAsComparativeCohort => "RatedAsComparativeCohort",
            Self::RatedAsControlledTrial => "RatedAsControlledTrial",
            Self::RatedAsMixedMethods => "RatedAsMixedMethods",
            Self::RatedAsNo => "RatedAsNo",
            Self::RatedAsOther => "RatedAsOther",
            Self::RatedAsRct => "RatedAsRCT",
            Self::RatedAsUncontrolledSeries => "RatedAsUncontrolledSeries",
            Self::RatedAsYes => "RatedAsYes",
            Self::ResearchProtocol => "ResearchProtocol",
            Self::ResearchSynthesis => "ResearchSynthesis",
            Self::RiskOfBias => "RiskOfBias",
            Self::SubgroupAnalysis => "SubgroupAnalysis",
            Self::Treatment => "Treatment",
        }
    }
}
impl ::std::fmt::Debug for EvidenceClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceClassifier {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceClassifier {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceClassifier {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceClassifier> for Coding {
    fn from(code: EvidenceClassifier) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/evidence-classifier-code".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceClassifier> for CodeableConcept {
    fn from(code: EvidenceClassifier) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceReportType](http://hl7.org/fhir/ValueSet/evidence-report-type)**. The kind of report, such as grouping of classifiers, search results, or human-compiled expression.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceReportType {
    /** **classification**

Classification. The report is primarily a listing of classifiers about the report subject. */
    Classification,
    /** **resources-compiled**

Resource Compilation. The report is a composition containing one or more FHIR resources in the content. */
    ResourcesCompiled,
    /** **search-results**

Search Results. The report is a composition of results generated in response to a search query. */
    SearchResults,
    /** **text-structured**

Structured Text. The report is a structured representation of text. */
    TextStructured,
}
impl ::core::str::FromStr for EvidenceReportType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "classification" => Ok(Self::Classification),
            "resources-compiled" => Ok(Self::ResourcesCompiled),
            "search-results" => Ok(Self::SearchResults),
            "text-structured" => Ok(Self::TextStructured),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceReportType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Classification => "classification",
            Self::ResourcesCompiled => "resources-compiled",
            Self::SearchResults => "search-results",
            Self::TextStructured => "text-structured",
        }
    }
}
impl ::std::fmt::Debug for EvidenceReportType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceReportType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceReportType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceReportType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceReportType> for Coding {
    fn from(code: EvidenceReportType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/evidence-report-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceReportType> for CodeableConcept {
    fn from(code: EvidenceReportType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceVariableEvent](http://hl7.org/fhir/ValueSet/evidence-variable-event)**. The event used as a base point (reference point) in time.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceVariableEvent {
    /** **condition-detection**

Detection of Condition. The time of first detection of the condition */
    ConditionDetection,
    /** **condition-treatment**

Treatment of Condition. The time of first treatment of the condition */
    ConditionTreatment,
    /** **hospital-admission**

Hospital Admission. The time of admission to the hospital */
    HospitalAdmission,
    /** **hospital-discharge**

Hospital Discharge. The time of discharge from the hospital */
    HospitalDischarge,
    /** **operative-procedure**

Operative Procedure. The time of surgery */
    OperativeProcedure,
    /** **study-start**

Study Start. The time of enrollment for the study participant */
    StudyStart,
    /** **treatment-start**

Start of Treatment. The time of initiation of the treatment */
    TreatmentStart,
}
impl ::core::str::FromStr for EvidenceVariableEvent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "condition-detection" => Ok(Self::ConditionDetection),
            "condition-treatment" => Ok(Self::ConditionTreatment),
            "hospital-admission" => Ok(Self::HospitalAdmission),
            "hospital-discharge" => Ok(Self::HospitalDischarge),
            "operative-procedure" => Ok(Self::OperativeProcedure),
            "study-start" => Ok(Self::StudyStart),
            "treatment-start" => Ok(Self::TreatmentStart),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceVariableEvent {
    fn as_ref(&self) -> &str {
        match self {
            Self::ConditionDetection => "condition-detection",
            Self::ConditionTreatment => "condition-treatment",
            Self::HospitalAdmission => "hospital-admission",
            Self::HospitalDischarge => "hospital-discharge",
            Self::OperativeProcedure => "operative-procedure",
            Self::StudyStart => "study-start",
            Self::TreatmentStart => "treatment-start",
        }
    }
}
impl ::std::fmt::Debug for EvidenceVariableEvent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceVariableEvent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceVariableEvent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceVariableEvent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceVariableEvent> for Coding {
    fn from(code: EvidenceVariableEvent) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/evidence-variable-event".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceVariableEvent> for CodeableConcept {
    fn from(code: EvidenceVariableEvent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[EvidenceVariableHandling](http://hl7.org/fhir/ValueSet/variable-handling)**. The handling of the variable in statistical analysis for exposures or outcomes (E.g. Dichotomous, Continuous, Descriptive).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum EvidenceVariableHandling {
    /** **continuous**

continuous variable. A continuous variable is one for which, within the limits the variable ranges, any value is possible (from STATO http://purl.obolibrary.org/obo/STATO_0000251). */
    Continuous,
    /** **dichotomous**

dichotomous variable. A dichotomous variable is a categorical variable which is defined to have only 2 categories or possible values (from STATO http://purl.obolibrary.org/obo/STATO_0000090). */
    Dichotomous,
    /** **ordinal**

ordinal variable. An ordinal variable is a categorical variable where the discrete possible values are ordered or correspond to an implicit ranking (from STATO http://purl.obolibrary.org/obo/STATO_0000228). */
    Ordinal,
    /** **polychotomous**

polychotomous variable. A polychotomous variable is a categorical variable which is defined to have minimally 2 categories or possible values. (from STATO  http://purl.obolibrary.org/obo/STATO_0000087).  Suggestion to limit code use to situations when neither dichotomous nor ordinal variables apply. */
    Polychotomous,
}
impl ::core::str::FromStr for EvidenceVariableHandling {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "continuous" => Ok(Self::Continuous),
            "dichotomous" => Ok(Self::Dichotomous),
            "ordinal" => Ok(Self::Ordinal),
            "polychotomous" => Ok(Self::Polychotomous),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for EvidenceVariableHandling {
    fn as_ref(&self) -> &str {
        match self {
            Self::Continuous => "continuous",
            Self::Dichotomous => "dichotomous",
            Self::Ordinal => "ordinal",
            Self::Polychotomous => "polychotomous",
        }
    }
}
impl ::std::fmt::Debug for EvidenceVariableHandling {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for EvidenceVariableHandling {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for EvidenceVariableHandling {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for EvidenceVariableHandling {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<EvidenceVariableHandling> for Coding {
    fn from(code: EvidenceVariableHandling) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/variable-handling".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<EvidenceVariableHandling> for CodeableConcept {
    fn from(code: EvidenceVariableHandling) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ExampleMetadata](http://hl7.org/fhir/CodeSystem/example-metadata)**. This is an example code system that illustrates usage of the metadata resource elements introduced in R5\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ExampleMetadata {
    /** **A**

A. A */
    A,
    /** **B**

B. B */
    B,
    /** **C**

C. C */
    C,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ExampleMetadata {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "A" => Ok(Self::A),
            "B" => Ok(Self::B),
            "C" => Ok(Self::C),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ExampleMetadata {
    fn as_ref(&self) -> &str {
        match self {
            Self::A => "A",
            Self::B => "B",
            Self::C => "C",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ExampleMetadata {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ExampleMetadata {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ExampleMetadata {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ExampleMetadata {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ExampleMetadata> for Coding {
    fn from(code: ExampleMetadata) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/CodeSystem/example-metadata".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ExampleMetadata> for CodeableConcept {
    fn from(code: ExampleMetadata) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ExampleScenarioActorType](http://hl7.org/fhir/ValueSet/examplescenario-actor-type)**. The type of actor - system or human.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ExampleScenarioActorType {
    /** **person**

Person. A human actor */
    Person,
    /** **system**

System. A software application or other system */
    System,
}
impl ::core::str::FromStr for ExampleScenarioActorType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "person" => Ok(Self::Person),
            "system" => Ok(Self::System),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ExampleScenarioActorType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Person => "person",
            Self::System => "system",
        }
    }
}
impl ::std::fmt::Debug for ExampleScenarioActorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ExampleScenarioActorType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ExampleScenarioActorType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ExampleScenarioActorType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ExampleScenarioActorType> for Coding {
    fn from(code: ExampleScenarioActorType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/examplescenario-actor-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ExampleScenarioActorType> for CodeableConcept {
    fn from(code: ExampleScenarioActorType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ExplanationOfBenefitStatus](http://hl7.org/fhir/ValueSet/explanationofbenefit-status)**. A code specifying the state of the resource instance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ExplanationOfBenefitStatus {
    /** **active**

Active. The resource instance is currently in-force. */
    Active,
    /** **cancelled**

Cancelled. The resource instance is withdrawn, rescinded or reversed. */
    Cancelled,
    /** **draft**

Draft. A new resource instance the contents of which is not complete. */
    Draft,
    /** **entered-in-error**

Entered In Error. The resource instance was entered in error. */
    EnteredInError,
}
impl ::core::str::FromStr for ExplanationOfBenefitStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ExplanationOfBenefitStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
        }
    }
}
impl ::std::fmt::Debug for ExplanationOfBenefitStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ExplanationOfBenefitStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ExplanationOfBenefitStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ExplanationOfBenefitStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ExplanationOfBenefitStatus> for Coding {
    fn from(code: ExplanationOfBenefitStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/explanationofbenefit-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ExplanationOfBenefitStatus> for CodeableConcept {
    fn from(code: ExplanationOfBenefitStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ExtensionContextType](http://hl7.org/fhir/ValueSet/extension-context-type)**. How an extension context is interpreted.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ExtensionContextType {
    /** **element**

Element ID. The context is any element that has an ElementDefinition.id that matches that found in the expression. This includes ElementDefinition Ids that have slicing identifiers. The full path for the element is [url]#[elementid]. If there is no #, the Element id is one defined in the base specification. */
    Element,
    /** **extension**

Extension URL. The context is a particular extension from a particular StructureDefinition, and the expression is just a uri that identifies the extension. */
    Extension,
    /** **fhirpath**

FHIRPath. The context is all elements that match the FHIRPath query found in the expression. */
    Fhirpath,
}
impl ::core::str::FromStr for ExtensionContextType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "element" => Ok(Self::Element),
            "extension" => Ok(Self::Extension),
            "fhirpath" => Ok(Self::Fhirpath),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ExtensionContextType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Element => "element",
            Self::Extension => "extension",
            Self::Fhirpath => "fhirpath",
        }
    }
}
impl ::std::fmt::Debug for ExtensionContextType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ExtensionContextType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ExtensionContextType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ExtensionContextType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ExtensionContextType> for Coding {
    fn from(code: ExtensionContextType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/extension-context-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ExtensionContextType> for CodeableConcept {
    fn from(code: ExtensionContextType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ExtraActivityType](http://hl7.org/fhir/extra-activity-type)**. This value set includes coded concepts not well covered in any of the included valuesets.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ExtraActivityType {
    /** **aggregate**

aggregate. Activity resulting in a structured collection of preexisting content that does not necessarily result in an integral object with semantic context making it more than the sum of component parts, from which components could be disaggregated without loss of semantic context, e.g., the assembly of multiple stand-alone documents. */
    Aggregate,
    /** **compose**

compose. Activity resulting in the structured compilation of new and preexisting content for the purposes of forming an integral object with  semantic context making it more than the sum of component parts, which would be lost if decomposed. For example, the composition of a document that includes in whole or part other documents along with new content that result in a new document that has unique semantic meaning. */
    Compose,
    /** **label**

label. The means used to associate a set of security attributes with a specific information object as part of the data structure for that object. [ISO-10181-3 Access Control] */
    Label,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ExtraActivityType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "aggregate" => Ok(Self::Aggregate),
            "compose" => Ok(Self::Compose),
            "label" => Ok(Self::Label),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ExtraActivityType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aggregate => "aggregate",
            Self::Compose => "compose",
            Self::Label => "label",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ExtraActivityType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ExtraActivityType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ExtraActivityType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ExtraActivityType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ExtraActivityType> for Coding {
    fn from(code: ExtraActivityType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/extra-activity-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ExtraActivityType> for CodeableConcept {
    fn from(code: ExtraActivityType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRCanonicalStatusCodes](http://hl7.org/fhir/ValueSet/resource-status)**. The master set of status codes used throughout FHIR. All status codes are mapped to one of these codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRCanonicalStatusCodes {
    /** **abandoned**

abandoned. The process described/requested in the resource did not complete - usually due to some workflow error, and no further action is planned */
    Abandoned,
    /** **accepted**

accepted. The fulfiller has decided to perform the action, and plans are in train to do this in the future */
    Accepted,
    /** **active**

active. The resource describes information that is currently valid or a process that is presently occuring */
    Active,
    /** **ahead-of-target**

ahead-of-target. Ahead of the planned timelines */
    AheadOfTarget,
    /** **arrived**

arrived. The pre-conditions for the action are all fulfilled, and it is imminent */
    Arrived,
    /** **behind-target**

behind-target. Behind the planned timelines */
    BehindTarget,
    /** **busy-unavailable**

busy-unavailable. not available at this time/location */
    BusyUnavailable,
    /** **complete**

complete. The process described/requested in the resource has been completed, and no further action is planned */
    Complete,
    /** **confirmed**

confirmed. The information in this resource is approved */
    Confirmed,
    /** **declined**

declined. The fulfiller chose not to perform the action */
    Declined,
    /** **differential**

differential. Potentially true? */
    Differential,
    /** **draft**

draft. The information in the resource is still being prepared and edited */
    Draft,
    /** **error**

error. The resource was created in error, and should not be treated as valid (note: in many cases, for various data integrity related reasons, the information cannot be removed from the record) */
    Error,
    /** **failed**

failed. The process described/requested in the resource could not be completed, and no further action is planned */
    Failed,
    /** **free**

free. Free for scheduling */
    Free,
    /** **hw-discon**

hw-discon. The hardware is disconnected */
    HwDiscon,
    /** **inactive**

inactive. The resource describes information that is no longer valid or a process that is stopped occurring */
    Inactive,
    /** **not-ready**

not-ready. Not ready to act */
    NotReady,
    /** **on-target**

on-target. Ready to act */
    OnTarget,
    /** **partial**

partial. This information is still being assembled */
    Partial,
    /** **planned**

planned. The resource describes a course of action that is planned and agreed/approved, but at the time of recording was still future */
    Planned,
    /** **proposed**

proposed. The resource describes an action or plan that is proposed, and not yet approved by the participants */
    Proposed,
    /** **received**

received. The fulfiller has received the request, but not yet agreed to carry out the action */
    Received,
    /** **refuted**

refuted. This information has been ruled out by testing and evaluation */
    Refuted,
    /** **replaced**

replaced. The information in this resource has been replaced by information in another resource */
    Replaced,
    /** **requested**

requested. A fulfiller has been asked to perform this action, but it has not yet occurred */
    Requested,
    /** **resolved**

resolved. The issue identified by this resource is no longer of concern */
    Resolved,
    /** **suspended**

suspended. The process described/requested in this resource has been halted for some reason */
    Suspended,
    /** **transduc-discon**

transduc-discon. The device transducer is disconnected */
    TransducDiscon,
    /** **unconfirmed**

unconfirmed. The information in this resource is not yet approved */
    Unconfirmed,
    /** **unknown**

unknown. Authoring system does not know the status */
    Unknown,
}
impl ::core::str::FromStr for FHIRCanonicalStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abandoned" => Ok(Self::Abandoned),
            "accepted" => Ok(Self::Accepted),
            "active" => Ok(Self::Active),
            "ahead-of-target" => Ok(Self::AheadOfTarget),
            "arrived" => Ok(Self::Arrived),
            "behind-target" => Ok(Self::BehindTarget),
            "busy-unavailable" => Ok(Self::BusyUnavailable),
            "complete" => Ok(Self::Complete),
            "confirmed" => Ok(Self::Confirmed),
            "declined" => Ok(Self::Declined),
            "differential" => Ok(Self::Differential),
            "draft" => Ok(Self::Draft),
            "error" => Ok(Self::Error),
            "failed" => Ok(Self::Failed),
            "free" => Ok(Self::Free),
            "hw-discon" => Ok(Self::HwDiscon),
            "inactive" => Ok(Self::Inactive),
            "not-ready" => Ok(Self::NotReady),
            "on-target" => Ok(Self::OnTarget),
            "partial" => Ok(Self::Partial),
            "planned" => Ok(Self::Planned),
            "proposed" => Ok(Self::Proposed),
            "received" => Ok(Self::Received),
            "refuted" => Ok(Self::Refuted),
            "replaced" => Ok(Self::Replaced),
            "requested" => Ok(Self::Requested),
            "resolved" => Ok(Self::Resolved),
            "suspended" => Ok(Self::Suspended),
            "transduc-discon" => Ok(Self::TransducDiscon),
            "unconfirmed" => Ok(Self::Unconfirmed),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRCanonicalStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abandoned => "abandoned",
            Self::Accepted => "accepted",
            Self::Active => "active",
            Self::AheadOfTarget => "ahead-of-target",
            Self::Arrived => "arrived",
            Self::BehindTarget => "behind-target",
            Self::BusyUnavailable => "busy-unavailable",
            Self::Complete => "complete",
            Self::Confirmed => "confirmed",
            Self::Declined => "declined",
            Self::Differential => "differential",
            Self::Draft => "draft",
            Self::Error => "error",
            Self::Failed => "failed",
            Self::Free => "free",
            Self::HwDiscon => "hw-discon",
            Self::Inactive => "inactive",
            Self::NotReady => "not-ready",
            Self::OnTarget => "on-target",
            Self::Partial => "partial",
            Self::Planned => "planned",
            Self::Proposed => "proposed",
            Self::Received => "received",
            Self::Refuted => "refuted",
            Self::Replaced => "replaced",
            Self::Requested => "requested",
            Self::Resolved => "resolved",
            Self::Suspended => "suspended",
            Self::TransducDiscon => "transduc-discon",
            Self::Unconfirmed => "unconfirmed",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for FHIRCanonicalStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRCanonicalStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRCanonicalStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRCanonicalStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRCanonicalStatusCodes> for Coding {
    fn from(code: FHIRCanonicalStatusCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/resource-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRCanonicalStatusCodes> for CodeableConcept {
    fn from(code: FHIRCanonicalStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceAssociationOperationStatus](http://hl7.org/fhir/ValueSet/deviceassociation-operationstatus)**. The operational status of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceAssociationOperationStatus {
    /** **defective**

Stand By. The device is defective or for maintenance and is not available or working. */
    Defective,
    /** **off**

Off. The device is inactive, switched off, or deactivated. */
    Off,
    /** **on**

On. The device is working or switched on, i.e. active. */
    On,
    /** **standby**

Stand By. The device is in stand-by mode i.e. not actively working but not powered off. */
    Standby,
    /** **unknown**

Unknown. The operational status of the device has not been determined. */
    Unknown,
}
impl ::core::str::FromStr for FHIRDeviceAssociationOperationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "defective" => Ok(Self::Defective),
            "off" => Ok(Self::Off),
            "on" => Ok(Self::On),
            "standby" => Ok(Self::Standby),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceAssociationOperationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Defective => "defective",
            Self::Off => "off",
            Self::On => "on",
            Self::Standby => "standby",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceAssociationOperationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceAssociationOperationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceAssociationOperationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceAssociationOperationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceAssociationOperationStatus> for Coding {
    fn from(code: FHIRDeviceAssociationOperationStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/deviceassociation-operationstatus"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceAssociationOperationStatus> for CodeableConcept {
    fn from(code: FHIRDeviceAssociationOperationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceAvailabilityStatus](http://hl7.org/fhir/ValueSet/device-availability-status)**. The record status of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceAvailabilityStatus {
    /** **available**

Available. The device is available. */
    Available,
    /** **damaged**

Damaged. The device is damaged. */
    Damaged,
    /** **destroyed**

Destroyed. The device is destroyed. */
    Destroyed,
    /** **lost**

Lost. The device is lost. */
    Lost,
}
impl ::core::str::FromStr for FHIRDeviceAvailabilityStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "damaged" => Ok(Self::Damaged),
            "destroyed" => Ok(Self::Destroyed),
            "lost" => Ok(Self::Lost),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceAvailabilityStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::Damaged => "damaged",
            Self::Destroyed => "destroyed",
            Self::Lost => "lost",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceAvailabilityStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceAvailabilityStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceAvailabilityStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceAvailabilityStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceAvailabilityStatus> for Coding {
    fn from(code: FHIRDeviceAvailabilityStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/device-availability-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceAvailabilityStatus> for CodeableConcept {
    fn from(code: FHIRDeviceAvailabilityStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceCategory](http://hl7.org/fhir/ValueSet/device-category)**. The category of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceCategory {
    /** **active**

Active. Device where the operation depends on a source of energy. */
    Active,
    /** **communicating**

communicating. Device communicates electronically to peer information systems or possibly another device. */
    Communicating,
    /** **dme**

Durable Medical Equipment. Equipment and supplies that provides therapeutic benefits to a patient. */
    Dme,
    /** **home-use**

Maintenance. Medical device intended for users in a non-medical setting. */
    HomeUse,
    /** **implantable**

Implantable. A device that is placed into a surgically or naturally formed cavity of the human body. */
    Implantable,
    /** **in-vitro**

In vitro. Tests done on samples such as blood or tissue that have been taken from the human body. */
    InVitro,
    /** **point-of-care**

Point of Care. a class of communicating devices that are used by medical providers for various purposes (e.g., monitoring, delivering or measuring). */
    PointOfCare,
    /** **reusable**

Reusable. A device that healthcare providers can use to diagnose and treat one or more patients. */
    Reusable,
    /** **single-use**

Single Use. A device use on one individual during a single procedure. */
    SingleUse,
    /** **software**

Software. A device that may include a software component or consist exclusively of software e.g. data transformer or converter, clinical support algorithms, clinical apps */
    Software,
}
impl ::core::str::FromStr for FHIRDeviceCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "communicating" => Ok(Self::Communicating),
            "dme" => Ok(Self::Dme),
            "home-use" => Ok(Self::HomeUse),
            "implantable" => Ok(Self::Implantable),
            "in-vitro" => Ok(Self::InVitro),
            "point-of-care" => Ok(Self::PointOfCare),
            "reusable" => Ok(Self::Reusable),
            "single-use" => Ok(Self::SingleUse),
            "software" => Ok(Self::Software),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Communicating => "communicating",
            Self::Dme => "dme",
            Self::HomeUse => "home-use",
            Self::Implantable => "implantable",
            Self::InVitro => "in-vitro",
            Self::PointOfCare => "point-of-care",
            Self::Reusable => "reusable",
            Self::SingleUse => "single-use",
            Self::Software => "software",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceCategory> for Coding {
    fn from(code: FHIRDeviceCategory) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/device-category".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceCategory> for CodeableConcept {
    fn from(code: FHIRDeviceCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceOperationMode](http://hl7.org/fhir/ValueSet/device-operation-mode)**. The operation mode of the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceOperationMode {
    /** **demo**

Demo. The device operates in a mode that is intended for demonstration purposes only. Arbitrary values are generated. */
    Demo,
    /** **maintenance**

Maintenance. The device operates in a mode that is intended for preventative and/or scheduled maintenance purposes only. */
    Maintenance,
    /** **normal**

Normal. The device operates in a mode that supports the fulfillment of its clinical functions. */
    Normal,
    /** **service**

Service. The device operates in a mode that is intended for correcting a functional problem of the device only. Arbitrary values may be generated. */
    Service,
    /** **test**

Test. The device operates in a test mode that is not intended to be used for production/operational purposes. */
    Test,
}
impl ::core::str::FromStr for FHIRDeviceOperationMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "demo" => Ok(Self::Demo),
            "maintenance" => Ok(Self::Maintenance),
            "normal" => Ok(Self::Normal),
            "service" => Ok(Self::Service),
            "test" => Ok(Self::Test),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceOperationMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Demo => "demo",
            Self::Maintenance => "maintenance",
            Self::Normal => "normal",
            Self::Service => "service",
            Self::Test => "test",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceOperationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceOperationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceOperationMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceOperationMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceOperationMode> for Coding {
    fn from(code: FHIRDeviceOperationMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/device-operation-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceOperationMode> for CodeableConcept {
    fn from(code: FHIRDeviceOperationMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceSpecializationCategory](http://hl7.org/fhir/ValueSet/device-specification-category)**. The kind of standards used by the device.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceSpecializationCategory {
    /** **communication**

Communication. A communication standard. */
    Communication,
    /** **electrical**

Electrical. Electrical classification. */
    Electrical,
    /** **exchange**

Exchange. Exchange category. */
    Exchange,
    /** **material**

Material. Classification related to materials. */
    Material,
    /** **measurement**

Measurement. A measurement standard. */
    Measurement,
    /** **performance**

Performance. A performance standard. */
    Performance,
    /** **risk-class**

Risk Class. Class or catefory of risk. */
    RiskClass,
}
impl ::core::str::FromStr for FHIRDeviceSpecializationCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "communication" => Ok(Self::Communication),
            "electrical" => Ok(Self::Electrical),
            "exchange" => Ok(Self::Exchange),
            "material" => Ok(Self::Material),
            "measurement" => Ok(Self::Measurement),
            "performance" => Ok(Self::Performance),
            "risk-class" => Ok(Self::RiskClass),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceSpecializationCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Communication => "communication",
            Self::Electrical => "electrical",
            Self::Exchange => "exchange",
            Self::Material => "material",
            Self::Measurement => "measurement",
            Self::Performance => "performance",
            Self::RiskClass => "risk-class",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceSpecializationCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceSpecializationCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceSpecializationCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceSpecializationCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceSpecializationCategory> for Coding {
    fn from(code: FHIRDeviceSpecializationCategory) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/device-specification-category".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceSpecializationCategory> for CodeableConcept {
    fn from(code: FHIRDeviceSpecializationCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRDeviceStatus](http://hl7.org/fhir/ValueSet/device-status)**. The status of the Device record.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRDeviceStatus {
    /** **active**

Active. The device record is current and is appropriate for reference in new instances. */
    Active,
    /** **entered-in-error**

Entered in Error. The device record is not current and is not appropriate for reference in new instances. */
    EnteredInError,
    /** **inactive**

Inactive. The device record is not current and is not appropriate for reference in new instances. */
    Inactive,
}
impl ::core::str::FromStr for FHIRDeviceStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRDeviceStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for FHIRDeviceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRDeviceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRDeviceStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRDeviceStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRDeviceStatus> for Coding {
    fn from(code: FHIRDeviceStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/device-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRDeviceStatus> for CodeableConcept {
    fn from(code: FHIRDeviceStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRFormatType](http://hl7.org/fhir/ValueSet/fhir-content-type)**. FHIR Format types\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRFormatType {
    /** **json**

JSON. JSON content-type corresponding to the application/fhir+json mime-type. */
    Json,
    /** **ttl**

TTL. RDF content-type corresponding to the text/turtle mime-type. */
    Ttl,
    /** **xml**

XML. XML content-type corresponding to the application/fhir+xml mime-type. */
    Xml,
}
impl ::core::str::FromStr for FHIRFormatType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "json" => Ok(Self::Json),
            "ttl" => Ok(Self::Ttl),
            "xml" => Ok(Self::Xml),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRFormatType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Json => "json",
            Self::Ttl => "ttl",
            Self::Xml => "xml",
        }
    }
}
impl ::std::fmt::Debug for FHIRFormatType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRFormatType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRFormatType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRFormatType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRFormatType> for Coding {
    fn from(code: FHIRFormatType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/fhir-content-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRFormatType> for CodeableConcept {
    fn from(code: FHIRFormatType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIROldTypes](http://hl7.org/fhir/ValueSet/fhir-old-types)**. An old resource name no longer used in this version of FHIR (deleted or renamed).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIROldTypes {
    /** **BodySite**

BodySite. */
    BodySite,
    /** **CatalogEntry**

CatalogEntry. */
    CatalogEntry,
    /** **Conformance**

Conformance. */
    Conformance,
    /** **DataElement**

DataElement. */
    DataElement,
    /** **DeviceComponent**

DeviceComponent. */
    DeviceComponent,
    /** **DeviceUseRequest**

DeviceUseRequest. */
    DeviceUseRequest,
    /** **DeviceUseStatement**

DeviceUseStatement. */
    DeviceUseStatement,
    /** **DiagnosticOrder**

DiagnosticOrder. */
    DiagnosticOrder,
    /** **DocumentManifest**

DocumentManifest. */
    DocumentManifest,
    /** **EffectEvidenceSynthesis**

EffectEvidenceSynthesis. */
    EffectEvidenceSynthesis,
    /** **EligibilityRequest**

EligibilityRequest. */
    EligibilityRequest,
    /** **EligibilityResponse**

EligibilityResponse. */
    EligibilityResponse,
    /** **ExpansionProfile**

ExpansionProfile. */
    ExpansionProfile,
    /** **ImagingManifest**

ImagingManifest. */
    ImagingManifest,
    /** **ImagingObjectSelection**

ImagingObjectSelection. */
    ImagingObjectSelection,
    /** **Media**

Media. */
    Media,
    /** **MedicationOrder**

MedicationOrder. */
    MedicationOrder,
    /** **MedicationUsage**

MedicationUsage. */
    MedicationUsage,
    /** **MedicinalProduct**

MedicinalProduct. */
    MedicinalProduct,
    /** **MedicinalProductAuthorization**

MedicinalProductAuthorization. */
    MedicinalProductAuthorization,
    /** **MedicinalProductContraindication**

MedicinalProductContraindication. */
    MedicinalProductContraindication,
    /** **MedicinalProductIndication**

MedicinalProductIndication. */
    MedicinalProductIndication,
    /** **MedicinalProductIngredient**

MedicinalProductIngredient. */
    MedicinalProductIngredient,
    /** **MedicinalProductInteraction**

MedicinalProductInteraction. */
    MedicinalProductInteraction,
    /** **MedicinalProductManufactured**

MedicinalProductManufactured. */
    MedicinalProductManufactured,
    /** **MedicinalProductPackaged**

MedicinalProductPackaged. */
    MedicinalProductPackaged,
    /** **MedicinalProductPharmaceutical**

MedicinalProductPharmaceutical. */
    MedicinalProductPharmaceutical,
    /** **MedicinalProductUndesirableEffect**

MedicinalProductUndesirableEffect. */
    MedicinalProductUndesirableEffect,
    /** **Order**

Order. */
    Order,
    /** **OrderResponse**

OrderResponse. */
    OrderResponse,
    /** **ProcedureRequest**

ProcedureRequest. */
    ProcedureRequest,
    /** **ProcessRequest**

ProcessRequest. */
    ProcessRequest,
    /** **ProcessResponse**

ProcessResponse. */
    ProcessResponse,
    /** **ReferralRequest**

ReferralRequest. */
    ReferralRequest,
    /** **RequestGroup**

RequestGroup. */
    RequestGroup,
    /** **ResearchDefinition**

ResearchDefinition. */
    ResearchDefinition,
    /** **ResearchElementDefinition**

ResearchElementDefinition. */
    ResearchElementDefinition,
    /** **RiskEvidenceSynthesis**

RiskEvidenceSynthesis. */
    RiskEvidenceSynthesis,
    /** **Sequence**

Sequence. */
    Sequence,
    /** **ServiceDefinition**

ServiceDefinition. */
    ServiceDefinition,
    /** **SubstanceSpecification**

SubstanceSpecification. */
    SubstanceSpecification,
}
impl ::core::str::FromStr for FHIROldTypes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "BodySite" => Ok(Self::BodySite),
            "CatalogEntry" => Ok(Self::CatalogEntry),
            "Conformance" => Ok(Self::Conformance),
            "DataElement" => Ok(Self::DataElement),
            "DeviceComponent" => Ok(Self::DeviceComponent),
            "DeviceUseRequest" => Ok(Self::DeviceUseRequest),
            "DeviceUseStatement" => Ok(Self::DeviceUseStatement),
            "DiagnosticOrder" => Ok(Self::DiagnosticOrder),
            "DocumentManifest" => Ok(Self::DocumentManifest),
            "EffectEvidenceSynthesis" => Ok(Self::EffectEvidenceSynthesis),
            "EligibilityRequest" => Ok(Self::EligibilityRequest),
            "EligibilityResponse" => Ok(Self::EligibilityResponse),
            "ExpansionProfile" => Ok(Self::ExpansionProfile),
            "ImagingManifest" => Ok(Self::ImagingManifest),
            "ImagingObjectSelection" => Ok(Self::ImagingObjectSelection),
            "Media" => Ok(Self::Media),
            "MedicationOrder" => Ok(Self::MedicationOrder),
            "MedicationUsage" => Ok(Self::MedicationUsage),
            "MedicinalProduct" => Ok(Self::MedicinalProduct),
            "MedicinalProductAuthorization" => Ok(Self::MedicinalProductAuthorization),
            "MedicinalProductContraindication" => {
                Ok(Self::MedicinalProductContraindication)
            }
            "MedicinalProductIndication" => Ok(Self::MedicinalProductIndication),
            "MedicinalProductIngredient" => Ok(Self::MedicinalProductIngredient),
            "MedicinalProductInteraction" => Ok(Self::MedicinalProductInteraction),
            "MedicinalProductManufactured" => Ok(Self::MedicinalProductManufactured),
            "MedicinalProductPackaged" => Ok(Self::MedicinalProductPackaged),
            "MedicinalProductPharmaceutical" => Ok(Self::MedicinalProductPharmaceutical),
            "MedicinalProductUndesirableEffect" => {
                Ok(Self::MedicinalProductUndesirableEffect)
            }
            "Order" => Ok(Self::Order),
            "OrderResponse" => Ok(Self::OrderResponse),
            "ProcedureRequest" => Ok(Self::ProcedureRequest),
            "ProcessRequest" => Ok(Self::ProcessRequest),
            "ProcessResponse" => Ok(Self::ProcessResponse),
            "ReferralRequest" => Ok(Self::ReferralRequest),
            "RequestGroup" => Ok(Self::RequestGroup),
            "ResearchDefinition" => Ok(Self::ResearchDefinition),
            "ResearchElementDefinition" => Ok(Self::ResearchElementDefinition),
            "RiskEvidenceSynthesis" => Ok(Self::RiskEvidenceSynthesis),
            "Sequence" => Ok(Self::Sequence),
            "ServiceDefinition" => Ok(Self::ServiceDefinition),
            "SubstanceSpecification" => Ok(Self::SubstanceSpecification),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIROldTypes {
    fn as_ref(&self) -> &str {
        match self {
            Self::BodySite => "BodySite",
            Self::CatalogEntry => "CatalogEntry",
            Self::Conformance => "Conformance",
            Self::DataElement => "DataElement",
            Self::DeviceComponent => "DeviceComponent",
            Self::DeviceUseRequest => "DeviceUseRequest",
            Self::DeviceUseStatement => "DeviceUseStatement",
            Self::DiagnosticOrder => "DiagnosticOrder",
            Self::DocumentManifest => "DocumentManifest",
            Self::EffectEvidenceSynthesis => "EffectEvidenceSynthesis",
            Self::EligibilityRequest => "EligibilityRequest",
            Self::EligibilityResponse => "EligibilityResponse",
            Self::ExpansionProfile => "ExpansionProfile",
            Self::ImagingManifest => "ImagingManifest",
            Self::ImagingObjectSelection => "ImagingObjectSelection",
            Self::Media => "Media",
            Self::MedicationOrder => "MedicationOrder",
            Self::MedicationUsage => "MedicationUsage",
            Self::MedicinalProduct => "MedicinalProduct",
            Self::MedicinalProductAuthorization => "MedicinalProductAuthorization",
            Self::MedicinalProductContraindication => "MedicinalProductContraindication",
            Self::MedicinalProductIndication => "MedicinalProductIndication",
            Self::MedicinalProductIngredient => "MedicinalProductIngredient",
            Self::MedicinalProductInteraction => "MedicinalProductInteraction",
            Self::MedicinalProductManufactured => "MedicinalProductManufactured",
            Self::MedicinalProductPackaged => "MedicinalProductPackaged",
            Self::MedicinalProductPharmaceutical => "MedicinalProductPharmaceutical",
            Self::MedicinalProductUndesirableEffect => {
                "MedicinalProductUndesirableEffect"
            }
            Self::Order => "Order",
            Self::OrderResponse => "OrderResponse",
            Self::ProcedureRequest => "ProcedureRequest",
            Self::ProcessRequest => "ProcessRequest",
            Self::ProcessResponse => "ProcessResponse",
            Self::ReferralRequest => "ReferralRequest",
            Self::RequestGroup => "RequestGroup",
            Self::ResearchDefinition => "ResearchDefinition",
            Self::ResearchElementDefinition => "ResearchElementDefinition",
            Self::RiskEvidenceSynthesis => "RiskEvidenceSynthesis",
            Self::Sequence => "Sequence",
            Self::ServiceDefinition => "ServiceDefinition",
            Self::SubstanceSpecification => "SubstanceSpecification",
        }
    }
}
impl ::std::fmt::Debug for FHIROldTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIROldTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIROldTypes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIROldTypes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIROldTypes> for Coding {
    fn from(code: FHIROldTypes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/fhir-old-types".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIROldTypes> for CodeableConcept {
    fn from(code: FHIROldTypes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRPathTypesCodeSystem](http://hl7.org/fhir/ValueSet/fhirpath-types)**. Data types defined by FHIRPath and used within the FHIR specification\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRPathTypesCodeSystem {
    /** **http://hl7.org/fhirpath/System.Boolean**

Boolean. */
    HttpHl7OrgFhirpathSystemBoolean,
    /** **http://hl7.org/fhirpath/System.Date**

Date. */
    HttpHl7OrgFhirpathSystemDate,
    /** **http://hl7.org/fhirpath/System.DateTime**

DateTime. */
    HttpHl7OrgFhirpathSystemDateTime,
    /** **http://hl7.org/fhirpath/System.Decimal**

Decimal. */
    HttpHl7OrgFhirpathSystemDecimal,
    /** **http://hl7.org/fhirpath/System.Integer**

Integer. */
    HttpHl7OrgFhirpathSystemInteger,
    /** **http://hl7.org/fhirpath/System.String**

String. */
    HttpHl7OrgFhirpathSystemString,
    /** **http://hl7.org/fhirpath/System.Time**

Time. */
    HttpHl7OrgFhirpathSystemTime,
}
impl ::core::str::FromStr for FHIRPathTypesCodeSystem {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "http://hl7.org/fhirpath/System.Boolean" => {
                Ok(Self::HttpHl7OrgFhirpathSystemBoolean)
            }
            "http://hl7.org/fhirpath/System.Date" => {
                Ok(Self::HttpHl7OrgFhirpathSystemDate)
            }
            "http://hl7.org/fhirpath/System.DateTime" => {
                Ok(Self::HttpHl7OrgFhirpathSystemDateTime)
            }
            "http://hl7.org/fhirpath/System.Decimal" => {
                Ok(Self::HttpHl7OrgFhirpathSystemDecimal)
            }
            "http://hl7.org/fhirpath/System.Integer" => {
                Ok(Self::HttpHl7OrgFhirpathSystemInteger)
            }
            "http://hl7.org/fhirpath/System.String" => {
                Ok(Self::HttpHl7OrgFhirpathSystemString)
            }
            "http://hl7.org/fhirpath/System.Time" => {
                Ok(Self::HttpHl7OrgFhirpathSystemTime)
            }
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRPathTypesCodeSystem {
    fn as_ref(&self) -> &str {
        match self {
            Self::HttpHl7OrgFhirpathSystemBoolean => {
                "http://hl7.org/fhirpath/System.Boolean"
            }
            Self::HttpHl7OrgFhirpathSystemDate => "http://hl7.org/fhirpath/System.Date",
            Self::HttpHl7OrgFhirpathSystemDateTime => {
                "http://hl7.org/fhirpath/System.DateTime"
            }
            Self::HttpHl7OrgFhirpathSystemDecimal => {
                "http://hl7.org/fhirpath/System.Decimal"
            }
            Self::HttpHl7OrgFhirpathSystemInteger => {
                "http://hl7.org/fhirpath/System.Integer"
            }
            Self::HttpHl7OrgFhirpathSystemString => {
                "http://hl7.org/fhirpath/System.String"
            }
            Self::HttpHl7OrgFhirpathSystemTime => "http://hl7.org/fhirpath/System.Time",
        }
    }
}
impl ::std::fmt::Debug for FHIRPathTypesCodeSystem {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRPathTypesCodeSystem {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRPathTypesCodeSystem {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRPathTypesCodeSystem {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRPathTypesCodeSystem> for Coding {
    fn from(code: FHIRPathTypesCodeSystem) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/fhirpath-types".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRPathTypesCodeSystem> for CodeableConcept {
    fn from(code: FHIRPathTypesCodeSystem) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRRestfulInteractions](http://hl7.org/fhir/ValueSet/restful-interaction)**. The set of interactions defined by the RESTful part of the FHIR specification.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRRestfulInteractions {
    /** **batch**

batch. perform a set of a separate interactions in a single http operation */
    Batch,
    /** **capabilities**

capabilities. Get a Capability Statement for the system. */
    Capabilities,
    /** **create**

create. Create a new resource with a server assigned id. */
    Create,
    /** **delete**

delete. Delete a resource. */
    Delete,
    /** **history**

history. Retrieve the change history for a particular resource, type of resource, or the entire system. */
    History,
    /** **history-instance**

history-instance. Retrieve the change history for a particular resource. */
    HistoryInstance,
    /** **history-system**

history-system. Retrieve the change history for all resources on a system. */
    HistorySystem,
    /** **history-type**

history-type. Retrieve the change history for all resources of a particular type. */
    HistoryType,
    /** **operation**

operation. Perform an operation as defined by an OperationDefinition. */
    Operation,
    /** **patch**

patch. Update an existing resource by posting a set of changes to it. */
    Patch,
    /** **read**

read. Read the current state of the resource. */
    Read,
    /** **search**

search. Search a resource type or all resources based on some filter criteria. */
    Search,
    /** **search-compartment**

search-compartment. Search resources in a compartment based on some filter criteria. */
    SearchCompartment,
    /** **search-system**

search-system. Search all resources based on some filter criteria. */
    SearchSystem,
    /** **search-type**

search-type. Search all resources of the specified type based on some filter criteria. */
    SearchType,
    /** **transaction**

transaction. Update, create or delete a set of resources as a single transaction. */
    Transaction,
    /** **update**

update. Update an existing resource by its id (or create it if it is new). */
    Update,
    /** **vread**

vread. Read the state of a specific version of the resource. */
    Vread,
}
impl ::core::str::FromStr for FHIRRestfulInteractions {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "batch" => Ok(Self::Batch),
            "capabilities" => Ok(Self::Capabilities),
            "create" => Ok(Self::Create),
            "delete" => Ok(Self::Delete),
            "history" => Ok(Self::History),
            "history-instance" => Ok(Self::HistoryInstance),
            "history-system" => Ok(Self::HistorySystem),
            "history-type" => Ok(Self::HistoryType),
            "operation" => Ok(Self::Operation),
            "patch" => Ok(Self::Patch),
            "read" => Ok(Self::Read),
            "search" => Ok(Self::Search),
            "search-compartment" => Ok(Self::SearchCompartment),
            "search-system" => Ok(Self::SearchSystem),
            "search-type" => Ok(Self::SearchType),
            "transaction" => Ok(Self::Transaction),
            "update" => Ok(Self::Update),
            "vread" => Ok(Self::Vread),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRRestfulInteractions {
    fn as_ref(&self) -> &str {
        match self {
            Self::Batch => "batch",
            Self::Capabilities => "capabilities",
            Self::Create => "create",
            Self::Delete => "delete",
            Self::History => "history",
            Self::HistoryInstance => "history-instance",
            Self::HistorySystem => "history-system",
            Self::HistoryType => "history-type",
            Self::Operation => "operation",
            Self::Patch => "patch",
            Self::Read => "read",
            Self::Search => "search",
            Self::SearchCompartment => "search-compartment",
            Self::SearchSystem => "search-system",
            Self::SearchType => "search-type",
            Self::Transaction => "transaction",
            Self::Update => "update",
            Self::Vread => "vread",
        }
    }
}
impl ::std::fmt::Debug for FHIRRestfulInteractions {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRRestfulInteractions {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRRestfulInteractions {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRRestfulInteractions {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRRestfulInteractions> for Coding {
    fn from(code: FHIRRestfulInteractions) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/restful-interaction".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRRestfulInteractions> for CodeableConcept {
    fn from(code: FHIRRestfulInteractions) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRSafetyCheckListEntries](http://hl7.org/fhir/ValueSet/safety-entries)**. The [checklist items](http://hl7.org/fhir/safety.html) defined as part of the FHIR specification.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRSafetyCheckListEntries {
    /** **check-clocks**

My system ensures that system clocks are synchronized using a protocol like NTP or SNTP, or my server is robust against clients that have the wrong clock set */
    CheckClocks,
    /** **check-consent**

My system checks that the right [Patient consent](consent.html) has been granted (where applicable) */
    CheckConsent,
    /** **check-dns-responses**

My system uses security methods for an API to authenticate where Domain Name System (DNS) responses are coming from and ensure that they are valid */
    CheckDnsResponses,
    /** **check=validation**

My system [validates all input received](validation.html) (whether in resource format or other) from other actors so that it data is well-formed and does not contain content that would cause unwanted system behavior */
    CheckValidation,
    /** **cross-resource**

My system takes care to ensure that clients can (for servers) or will (for clients) find the information they need when content that might reasonably be exposed using more than one FHIR resource. Possible patterns: Support a single search across the applicable resources, or expose data through each applicable resource. See discussion on [Wiki Page](https://confluence.hl7.org/display/FHIR/Managing+Overlap+Between+Resources) for further information */
    CrossResource,
    /** **cs-declare**

My system publishes a [Capability Statement](capabilitystatement.html) with [StructureDefinitions](structuredefinition.html), [ValueSets](valueset.html), and [OperationDefinitions](operationdefinition.html), etc., so other implementers know how the system functions */
    CsDeclare,
    /** **current**

My system manages lists of [current resources](lifecycle.html#current) correctly */
    Current,
    /** **date-rendering**

My system renders dates safely for changes in culture and language (the date formats D-M-Y and M-D-Y are not differentiated for many dates, and this is a well-known source of confusion. Systems should use the month name, or otherwise be specific for each date when rendering, unless there is solid confidence that such confusion cannot arise, even in the future when information/narrative from resources will be shared much more widely) */
    DateRendering,
    /** **default-filters**

My system includes appropriate default filters when searching based on patient context - e.g. filtering out entered-in-error records, filtering to only include active, living patients if appropriate, and clearly documents these (preferably including them in the self link for a search */
    DefaultFilters,
    /** **deletion-check**

For each resource, I have checked whether resources can be deleted, and/or how records are marked as incorrect/no longer relevant */
    DeletionCheck,
    /** **deletion-replication**

Deletion of records (or equivalent updates in status) flow through the system so any replicated copies are deleted/updated */
    DeletionReplication,
    /** **deletion-support**

(If a server) my documentation about deleted resources is clear, and my test sandbox (if exists) has deleted/error record cases in the test data */
    DeletionSupport,
    /** **display-warnings**

My system will display warnings returned by the server to the user */
    DisplayWarnings,
    /** **distribute-aod**

My system sends an [Accounting of Disclosure](secpriv-module.html#AoD) to the consenter as requested when permitted actions on resources are performed using an [AuditEvent](auditevent.html) Resource */
    DistributeAod,
    /** **enable-cors**

Server: CORS ([cross-origin resource sharing](http://enable-cors.org/)) is appropriately enabled (many clients are Javascript apps running in a browser) */
    EnableCors,
    /** **error-checks**

When other systems [return http errors from the RESTful API](http.html#summary) and [Operations](operations.html) (perhaps using [Operation Outcome](operationoutcome.html)), my system checks for them and handles them appropriately */
    ErrorChecks,
    /** **identity**

My system has documented how [distributed resource identification](managing.html#distributed) works in its relevant contexts of use, and where (and why) [contained](references.html#contained) resources are used */
    Identity,
    /** **json-for-errors**

JSON is returned correctly when errors happen (clients often don't handle HTML errors well) */
    JsonForErrors,
    /** **life-cycle**

For each resource that my system handles, my system handles the full [Life cycle](lifecycle.html) (status codes, currency issues, and erroneous entry status) */
    LifeCycle,
    /** **link-merge**

My system ensures checks for patient links (and/or merges) and handles data that is linked to patients accordingly */
    LinkMerge,
    /** **missing-values**

My system caters for [parameters that have missing values](search.html#missing) when doing search operations, and responds correctly to the client with regard to [erroneous search parameters](search.html#errors) */
    MissingValues,
    /** **modifier-extensions**

My system checks for [modifierExtension](extensibility.html#modifierExtension) elements */
    ModifierExtensions,
    /** **modifiers**

For each resource that my system handles, I've reviewed the [Modifier elements](conformance-rules.html#isModifier) */
    Modifiers,
    /** **must-support**

My system supports [elements labeled as 'MustSupport'](conformance-rules.html#mustSupport) in the [profiles](profiling.html) that apply to my system */
    MustSupport,
    /** **obs-focus**

I've reviewed the [Observation](observation.html) resource, and understand how ```textfocus``` is a mechanism for observations to be about someone or something other than the patient or subject of record. */
    ObsFocus,
    /** **render-narratives**

My system can [render narratives properly](narrative.html#css) and [securely](security.html#narrative)(where they are used) */
    RenderNarratives,
    /** **search-parameters**

My system checks whether the server processed all the requested search parameter, and is safe if servers ignore parameters (typically, either filters locally or warns the user) */
    SearchParameters,
    /** **time-zone**

My system checks for timezones and adjusts times appropriately. (note: timezones are extremely difficult to get correct - see [W3C Timezone Advice](https://www.w3.org/TR/timezone/), and note that some fields should be timezone corrected, and others should not be) */
    TimeZone,
    /** **use-encryption**

Production exchange of patient or other sensitive data will always use some form of [encryption on the wire](security.html#http) */
    UseEncryption,
    /** **use-format-header**

The _format header is supported correctly */
    UseFormatHeader,
    /** **use-json**

JSON is supported (many clients are Javascript apps running in a browser; XML is inconvenient at best) */
    UseJson,
    /** **use-labels**

My system considers [security labels](security-labels.html) on the affected resources when making access control decisions */
    UseLabels,
    /** **use-openidconnect**

My system uses [OpenID Connect](https://openid.net/connect/) (or other suitable authentication protocol) to verify identity of end user, where it is necessary that end-users be identified to the client application, and has a clear policy on [identity proofing](secpriv-module.html#user) */
    UseOpenidconnect,
    /** **use-operation-outcome**

Errors are trapped and an OperationOutcome returned */
    UseOperationOutcome,
    /** **use-ouath**

My system utilizes a risk and use case [appropriate OAuth profile](security.html#oauth) (preferably [Smart App Launch](http://hl7.org/fhir/smart-app-launch)), with a [clear policy on authentication strength](security.html#authentication) */
    UseOuath,
    /** **use-provenance**

My system makes the right [Provenance](provenance.html) statements and [AuditEvent](auditevent.html) logs, and uses the right [security labels](security-labels.html#core) where appropriate */
    UseProvenance,
    /** **use-rbac**

My system applies appropriate access control to every request, using a combination of requester’s clearance (ABAC) and/or roles (RBAC) */
    UseRbac,
    /** **use-smime**

Where resources are exchanged using email, [S/MIME](https://en.wikipedia.org/wiki/S/MIME) should be used to protect the end-to-end communication */
    UseSmime,
    /** **use-tls**

Where resources are exchanged using [HTTP](security.html#http), [TLS](https://en.wikipedia.org/wiki/Transport_Layer_Security) should be utilized to protect the communications channel */
    UseTls,
    /** **use-tls-per-bcp195**

Production exchange should utilize recommendations for [Best-Current-Practice on TLS in BCP 195](https://tools.ietf.org/html/bcp195) */
    UseTlsPerBcp195,
    /** **valid-checked**

All resources in use are [valid](validation.html) against the base specification and the [profiles](profiling.html) that apply to my system (see note about the [correct run-time use of validation](validation.html#correct-use)) */
    ValidChecked,
}
impl ::core::str::FromStr for FHIRSafetyCheckListEntries {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "check-clocks" => Ok(Self::CheckClocks),
            "check-consent" => Ok(Self::CheckConsent),
            "check-dns-responses" => Ok(Self::CheckDnsResponses),
            "check=validation" => Ok(Self::CheckValidation),
            "cross-resource" => Ok(Self::CrossResource),
            "cs-declare" => Ok(Self::CsDeclare),
            "current" => Ok(Self::Current),
            "date-rendering" => Ok(Self::DateRendering),
            "default-filters" => Ok(Self::DefaultFilters),
            "deletion-check" => Ok(Self::DeletionCheck),
            "deletion-replication" => Ok(Self::DeletionReplication),
            "deletion-support" => Ok(Self::DeletionSupport),
            "display-warnings" => Ok(Self::DisplayWarnings),
            "distribute-aod" => Ok(Self::DistributeAod),
            "enable-cors" => Ok(Self::EnableCors),
            "error-checks" => Ok(Self::ErrorChecks),
            "identity" => Ok(Self::Identity),
            "json-for-errors" => Ok(Self::JsonForErrors),
            "life-cycle" => Ok(Self::LifeCycle),
            "link-merge" => Ok(Self::LinkMerge),
            "missing-values" => Ok(Self::MissingValues),
            "modifier-extensions" => Ok(Self::ModifierExtensions),
            "modifiers" => Ok(Self::Modifiers),
            "must-support" => Ok(Self::MustSupport),
            "obs-focus" => Ok(Self::ObsFocus),
            "render-narratives" => Ok(Self::RenderNarratives),
            "search-parameters" => Ok(Self::SearchParameters),
            "time-zone" => Ok(Self::TimeZone),
            "use-encryption" => Ok(Self::UseEncryption),
            "use-format-header" => Ok(Self::UseFormatHeader),
            "use-json" => Ok(Self::UseJson),
            "use-labels" => Ok(Self::UseLabels),
            "use-openidconnect" => Ok(Self::UseOpenidconnect),
            "use-operation-outcome" => Ok(Self::UseOperationOutcome),
            "use-ouath" => Ok(Self::UseOuath),
            "use-provenance" => Ok(Self::UseProvenance),
            "use-rbac" => Ok(Self::UseRbac),
            "use-smime" => Ok(Self::UseSmime),
            "use-tls" => Ok(Self::UseTls),
            "use-tls-per-bcp195" => Ok(Self::UseTlsPerBcp195),
            "valid-checked" => Ok(Self::ValidChecked),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRSafetyCheckListEntries {
    fn as_ref(&self) -> &str {
        match self {
            Self::CheckClocks => "check-clocks",
            Self::CheckConsent => "check-consent",
            Self::CheckDnsResponses => "check-dns-responses",
            Self::CheckValidation => "check=validation",
            Self::CrossResource => "cross-resource",
            Self::CsDeclare => "cs-declare",
            Self::Current => "current",
            Self::DateRendering => "date-rendering",
            Self::DefaultFilters => "default-filters",
            Self::DeletionCheck => "deletion-check",
            Self::DeletionReplication => "deletion-replication",
            Self::DeletionSupport => "deletion-support",
            Self::DisplayWarnings => "display-warnings",
            Self::DistributeAod => "distribute-aod",
            Self::EnableCors => "enable-cors",
            Self::ErrorChecks => "error-checks",
            Self::Identity => "identity",
            Self::JsonForErrors => "json-for-errors",
            Self::LifeCycle => "life-cycle",
            Self::LinkMerge => "link-merge",
            Self::MissingValues => "missing-values",
            Self::ModifierExtensions => "modifier-extensions",
            Self::Modifiers => "modifiers",
            Self::MustSupport => "must-support",
            Self::ObsFocus => "obs-focus",
            Self::RenderNarratives => "render-narratives",
            Self::SearchParameters => "search-parameters",
            Self::TimeZone => "time-zone",
            Self::UseEncryption => "use-encryption",
            Self::UseFormatHeader => "use-format-header",
            Self::UseJson => "use-json",
            Self::UseLabels => "use-labels",
            Self::UseOpenidconnect => "use-openidconnect",
            Self::UseOperationOutcome => "use-operation-outcome",
            Self::UseOuath => "use-ouath",
            Self::UseProvenance => "use-provenance",
            Self::UseRbac => "use-rbac",
            Self::UseSmime => "use-smime",
            Self::UseTls => "use-tls",
            Self::UseTlsPerBcp195 => "use-tls-per-bcp195",
            Self::ValidChecked => "valid-checked",
        }
    }
}
impl ::std::fmt::Debug for FHIRSafetyCheckListEntries {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRSafetyCheckListEntries {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRSafetyCheckListEntries {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRSafetyCheckListEntries {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRSafetyCheckListEntries> for Coding {
    fn from(code: FHIRSafetyCheckListEntries) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/safety-entries".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRSafetyCheckListEntries> for CodeableConcept {
    fn from(code: FHIRSafetyCheckListEntries) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRSubstanceStatus](http://hl7.org/fhir/ValueSet/substance-status)**. A code to indicate if the substance is actively used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRSubstanceStatus {
    /** **active**

Active. The substance is considered for use or reference. */
    Active,
    /** **entered-in-error**

Entered in Error. The substance was entered in error. */
    EnteredInError,
    /** **inactive**

Inactive. The substance is considered for reference, but not for use. */
    Inactive,
}
impl ::core::str::FromStr for FHIRSubstanceStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRSubstanceStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for FHIRSubstanceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRSubstanceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRSubstanceStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRSubstanceStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRSubstanceStatus> for Coding {
    fn from(code: FHIRSubstanceStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/substance-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRSubstanceStatus> for CodeableConcept {
    fn from(code: FHIRSubstanceStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRTypes](http://hl7.org/fhir/ValueSet/fhir-types)**. One of the types defined as part of this version of FHIR.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRTypes {
    /** **Account**

Account. A financial tool for tracking value accrued for a particular purpose.  In the healthcare field, used to track charges for a patient, cost centers, etc. */
    Account,
    /** **ActivityDefinition**

ActivityDefinition. This resource allows for the definition of some activity to be performed, independent of a particular patient, practitioner, or other performance context. */
    ActivityDefinition,
    /** **ActorDefinition**

ActorDefinition. The ActorDefinition resource is used to describe an actor - a human or an application that plays a role in data exchange, and that may have obligations associated with the role the actor plays. */
    ActorDefinition,
    /** **Address**

Address. Address Type: An address expressed using postal conventions (as opposed to GPS or other location definition formats).  This data type may be used to convey addresses for use in delivering mail as well as for visiting locations which might not be valid for mail delivery.  There are a variety of postal address formats defined around the world.
The ISO21090-codedString may be used to provide a coded representation of the contents of strings in an Address. */
    Address,
    /** **AdministrableProductDefinition**

AdministrableProductDefinition. A medicinal product in the final form which is suitable for administering to a patient (after any mixing of multiple components, dissolution etc. has been performed). */
    AdministrableProductDefinition,
    /** **AdverseEvent**

AdverseEvent. An event (i.e. any change to current patient status) that may be related to unintended effects on a patient or research participant. The unintended effects may require additional monitoring, treatment, hospitalization, or may result in death. The AdverseEvent resource also extends to potential or avoided events that could have had such effects. There are two major domains where the AdverseEvent resource is expected to be used. One is in clinical care reported adverse events and the other is in reporting adverse events in clinical  research trial management.  Adverse events can be reported by healthcare providers, patients, caregivers or by medical products manufacturers.  Given the differences between these two concepts, we recommend consulting the domain specific implementation guides when implementing the AdverseEvent Resource. The implementation guides include specific extensions, value sets and constraints. */
    AdverseEvent,
    /** **Age**

Age. Age Type: A duration of time during which an organism (or a process) has existed. */
    Age,
    /** **AllergyIntolerance**

AllergyIntolerance. Risk of harmful or undesirable, physiological response which is unique to an individual and associated with exposure to a substance. */
    AllergyIntolerance,
    /** **Annotation**

Annotation. Annotation Type: A  text note which also  contains information about who made the statement and when. */
    Annotation,
    /** **Appointment**

Appointment. A booking of a healthcare event among patient(s), practitioner(s), related person(s) and/or device(s) for a specific date/time. This may result in one or more Encounter(s). */
    Appointment,
    /** **AppointmentResponse**

AppointmentResponse. A reply to an appointment request for a patient and/or practitioner(s), such as a confirmation or rejection. */
    AppointmentResponse,
    /** **ArtifactAssessment**

ArtifactAssessment. This Resource provides one or more comments, classifiers or ratings about a Resource and supports attribution and rights management metadata for the added content. */
    ArtifactAssessment,
    /** **Attachment**

Attachment. Attachment Type: For referring to data content defined in other formats. */
    Attachment,
    /** **AuditEvent**

AuditEvent. A record of an event relevant for purposes such as operations, privacy, security, maintenance, and performance analysis. */
    AuditEvent,
    /** **Availability**

Availability. Availability Type: Availability data for an {item}. */
    Availability,
    /** **BackboneElement**

BackboneElement. BackboneElement Type: Base definition for all elements that are defined inside a resource - but not those in a data type. */
    BackboneElement,
    /** **BackboneType**

BackboneType. BackboneType Type: Base definition for the few data types that are allowed to carry modifier extensions. */
    BackboneType,
    /** **Base**

Base. Base Type: Base definition for all types defined in FHIR type system. */
    Base,
    /** **Basic**

Basic. Basic is used for handling concepts not yet defined in FHIR, narrative-only resources that don't map to an existing resource, and custom resources not appropriate for inclusion in the FHIR specification. */
    Basic,
    /** **Binary**

Binary. A resource that represents the data of a single raw artifact as digital content accessible in its native format.  A Binary resource can contain any content, whether text, image, pdf, zip archive, etc. */
    Binary,
    /** **BiologicallyDerivedProduct**

BiologicallyDerivedProduct. A biological material originating from a biological entity intended to be transplanted or infused into another (possibly the same) biological entity. */
    BiologicallyDerivedProduct,
    /** **BiologicallyDerivedProductDispense**

BiologicallyDerivedProductDispense. A record of dispensation of a biologically derived product. */
    BiologicallyDerivedProductDispense,
    /** **BodyStructure**

BodyStructure. Record details about an anatomical structure.  This resource may be used when a coded concept does not provide the necessary detail needed for the use case. */
    BodyStructure,
    /** **Bundle**

Bundle. A container for a collection of resources. */
    Bundle,
    /** **CanonicalResource**

CanonicalResource. Common Interface declaration for conformance and knowledge artifact resources. */
    CanonicalResource,
    /** **CapabilityStatement**

CapabilityStatement. A Capability Statement documents a set of capabilities (behaviors) of a FHIR Server or Client for a particular version of FHIR that may be used as a statement of actual server functionality or a statement of required or desired server implementation. */
    CapabilityStatement,
    /** **CarePlan**

CarePlan. Describes the intention of how one or more practitioners intend to deliver care for a particular patient, group or community for a period of time, possibly limited to care for a specific condition or set of conditions. */
    CarePlan,
    /** **CareTeam**

CareTeam. The Care Team includes all the people and organizations who plan to participate in the coordination and delivery of care. */
    CareTeam,
    /** **ChargeItem**

ChargeItem. The resource ChargeItem describes the provision of healthcare provider products for a certain patient, therefore referring not only to the product, but containing in addition details of the provision, like date, time, amounts and participating organizations and persons. Main Usage of the ChargeItem is to enable the billing process and internal cost allocation. */
    ChargeItem,
    /** **ChargeItemDefinition**

ChargeItemDefinition. The ChargeItemDefinition resource provides the properties that apply to the (billing) codes necessary to calculate costs and prices. The properties may differ largely depending on type and realm, therefore this resource gives only a rough structure and requires profiling for each type of billing code system. */
    ChargeItemDefinition,
    /** **Citation**

Citation. The Citation Resource enables reference to any knowledge artifact for purposes of identification and attribution. The Citation Resource supports existing reference structures and developing publication practices such as versioning, expressing complex contributorship roles, and referencing computable resources. */
    Citation,
    /** **Claim**

Claim. A provider issued list of professional services and products which have been provided, or are to be provided, to a patient which is sent to an insurer for reimbursement. */
    Claim,
    /** **ClaimResponse**

ClaimResponse. This resource provides the adjudication details from the processing of a Claim resource. */
    ClaimResponse,
    /** **ClinicalImpression**

ClinicalImpression. A record of a clinical assessment performed to determine what problem(s) may affect the patient and before planning the treatments or management strategies that are best to manage a patient's condition. Assessments are often 1:1 with a clinical consultation / encounter,  but this varies greatly depending on the clinical workflow. This resource is called "ClinicalImpression" rather than "ClinicalAssessment" to avoid confusion with the recording of assessment tools such as Apgar score. */
    ClinicalImpression,
    /** **ClinicalUseDefinition**

ClinicalUseDefinition. A single issue - either an indication, contraindication, interaction or an undesirable effect for a medicinal product, medication, device or procedure. */
    ClinicalUseDefinition,
    /** **CodeSystem**

CodeSystem. The CodeSystem resource is used to declare the existence of and describe a code system or code system supplement and its key properties, and optionally define a part or all of its content. */
    CodeSystem,
    /** **CodeableConcept**

CodeableConcept. CodeableConcept Type: A concept that may be defined by a formal reference to a terminology or ontology or may be provided by text. */
    CodeableConcept,
    /** **CodeableReference**

CodeableReference. CodeableReference Type: A reference to a resource (by instance), or instead, a reference to a concept defined in a terminology or ontology (by class). */
    CodeableReference,
    /** **Coding**

Coding. Coding Type: A reference to a code defined by a terminology system. */
    Coding,
    /** **Communication**

Communication. A clinical or business level record of information being transmitted or shared; e.g. an alert that was sent to a responsible provider, a public health agency communication to a provider/reporter in response to a case report for a reportable condition. */
    Communication,
    /** **CommunicationRequest**

CommunicationRequest. A request to convey information; e.g. the CDS system proposes that an alert be sent to a responsible provider, the CDS system proposes that the public health agency be notified about a reportable condition. */
    CommunicationRequest,
    /** **CompartmentDefinition**

CompartmentDefinition. A compartment definition that defines how resources are accessed on a server. */
    CompartmentDefinition,
    /** **Composition**

Composition. A set of healthcare-related information that is assembled together into a single logical package that provides a single coherent statement of meaning, establishes its own context and that has clinical attestation with regard to who is making the statement. A Composition defines the structure and narrative content necessary for a document. However, a Composition alone does not constitute a document. Rather, the Composition must be the first entry in a Bundle where Bundle.type=document, and any other resources referenced from Composition must be included as subsequent entries in the Bundle (for example Patient, Practitioner, Encounter, etc.). */
    Composition,
    /** **ConceptMap**

ConceptMap. A statement of relationships from one set of concepts to one or more other concepts - either concepts in code systems, or data element/data element concepts, or classes in class models. */
    ConceptMap,
    /** **Condition**

Condition. A clinical condition, problem, diagnosis, or other event, situation, issue, or clinical concept that has risen to a level of concern. */
    Condition,
    /** **ConditionDefinition**

ConditionDefinition. A definition of a condition and information relevant to managing it. */
    ConditionDefinition,
    /** **Consent**

Consent. A record of a healthcare consumer’s  choices  or choices made on their behalf by a third party, which permits or denies identified recipient(s) or recipient role(s) to perform one or more actions within a given policy context, for specific purposes and periods of time. */
    Consent,
    /** **ContactDetail**

ContactDetail. ContactDetail Type: Specifies contact information for a person or organization. */
    ContactDetail,
    /** **ContactPoint**

ContactPoint. ContactPoint Type: Details for all kinds of technology mediated contact points for a person or organization, including telephone, email, etc. */
    ContactPoint,
    /** **Contract**

Contract. Legally enforceable, formally recorded unilateral or bilateral directive i.e., a policy or agreement. */
    Contract,
    /** **Contributor**

Contributor. Contributor Type: A contributor to the content of a knowledge asset, including authors, editors, reviewers, and endorsers. */
    Contributor,
    /** **Count**

Count. Count Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */
    Count,
    /** **Coverage**

Coverage. Financial instrument which may be used to reimburse or pay for health care products and services. Includes both insurance and self-payment. */
    Coverage,
    /** **CoverageEligibilityRequest**

CoverageEligibilityRequest. The CoverageEligibilityRequest provides patient and insurance coverage information to an insurer for them to respond, in the form of an CoverageEligibilityResponse, with information regarding whether the stated coverage is valid and in-force and optionally to provide the insurance details of the policy. */
    CoverageEligibilityRequest,
    /** **CoverageEligibilityResponse**

CoverageEligibilityResponse. This resource provides eligibility and plan details from the processing of an CoverageEligibilityRequest resource. */
    CoverageEligibilityResponse,
    /** **DataRequirement**

DataRequirement. DataRequirement Type: Describes a required data item for evaluation in terms of the type of data, and optional code or date-based filters of the data. */
    DataRequirement,
    /** **DataType**

DataType. DataType Type: The base class for all re-useable types defined as part of the FHIR Specification. */
    DataType,
    /** **DetectedIssue**

DetectedIssue. Indicates an actual or potential clinical issue with or between one or more active or proposed clinical actions for a patient; e.g. Drug-drug interaction, Ineffective treatment frequency, Procedure-condition conflict, gaps in care, etc. */
    DetectedIssue,
    /** **Device**

Device. This resource describes the properties (regulated, has real time clock, etc.), adminstrative (manufacturer name, model number, serial number, firmware, etc.), and type (knee replacement, blood pressure cuff, MRI, etc.) of a physical unit (these values do not change much within a given module, for example the serail number, manufacturer name, and model number). An actual unit may consist of several modules in a distinct hierarchy and these are represented by multiple Device resources and bound through the 'parent' element. */
    Device,
    /** **DeviceAssociation**

DeviceAssociation. A record of association of a device. */
    DeviceAssociation,
    /** **DeviceDefinition**

DeviceDefinition. This is a specialized resource that defines the characteristics and capabilities of a device. */
    DeviceDefinition,
    /** **DeviceDispense**

DeviceDispense. Indicates that a device is to be or has been dispensed for a named person/patient.  This includes a description of the product (supply) provided and the instructions for using the device. */
    DeviceDispense,
    /** **DeviceMetric**

DeviceMetric. Describes a measurement, calculation or setting capability of a device.  The DeviceMetric resource is derived from the ISO/IEEE 11073-10201 Domain Information Model standard, but is more widely applicable.  */
    DeviceMetric,
    /** **DeviceRequest**

DeviceRequest. Represents a request a device to be provided to a specific patient. The device may be an implantable device to be subsequently implanted, or an external assistive device, such as a walker, to be delivered and subsequently be used. */
    DeviceRequest,
    /** **DeviceUsage**

DeviceUsage. A record of a device being used by a patient where the record is the result of a report from the patient or a clinician. */
    DeviceUsage,
    /** **DiagnosticReport**

DiagnosticReport. The findings and interpretation of diagnostic tests performed on patients, groups of patients, products, substances, devices, and locations, and/or specimens derived from these. The report includes clinical context such as requesting provider information, and some mix of atomic results, images, textual and coded interpretations, and formatted representation of diagnostic reports. The report also includes non-clinical context such as batch analysis and stability reporting of products and substances. */
    DiagnosticReport,
    /** **Distance**

Distance. Distance Type: A length - a value with a unit that is a physical distance. */
    Distance,
    /** **DocumentReference**

DocumentReference. A reference to a document of any kind for any purpose. While the term “document” implies a more narrow focus, for this resource this “document” encompasses *any* serialized object with a mime-type, it includes formal patient-centric documents (CDA), clinical notes, scanned paper, non-patient specific documents like policy text, as well as a photo, video, or audio recording acquired or used in healthcare.  The DocumentReference resource provides metadata about the document so that the document can be discovered and managed.  The actual content may be inline base64 encoded data or provided by direct reference. */
    DocumentReference,
    /** **DomainResource**

DomainResource. A resource that includes narrative, extensions, and contained resources. */
    DomainResource,
    /** **Dosage**

Dosage. Dosage Type: Indicates how the medication is/was taken or should be taken by the patient. */
    Dosage,
    /** **Duration**

Duration. Duration Type: A length of time. */
    Duration,
    /** **Element**

Element. Element Type: Base definition for all elements in a resource. */
    Element,
    /** **ElementDefinition**

ElementDefinition. ElementDefinition Type: Captures constraints on each element within the resource, profile, or extension. */
    ElementDefinition,
    /** **Encounter**

Encounter. An interaction between healthcare provider(s), and/or patient(s) for the purpose of providing healthcare service(s) or assessing the health status of patient(s). */
    Encounter,
    /** **EncounterHistory**

EncounterHistory. A record of significant events/milestones key data throughout the history of an Encounter */
    EncounterHistory,
    /** **Endpoint**

Endpoint. The technical details of an endpoint that can be used for electronic services, such as for web services providing XDS.b, a REST endpoint for another FHIR server, or a s/Mime email address. This may include any security context information. */
    Endpoint,
    /** **EnrollmentRequest**

EnrollmentRequest. This resource provides the insurance enrollment details to the insurer regarding a specified coverage. */
    EnrollmentRequest,
    /** **EnrollmentResponse**

EnrollmentResponse. This resource provides enrollment and plan details from the processing of an EnrollmentRequest resource. */
    EnrollmentResponse,
    /** **EpisodeOfCare**

EpisodeOfCare. An association between a patient and an organization / healthcare provider(s) during which time encounters may occur. The managing organization assumes a level of responsibility for the patient during this time. */
    EpisodeOfCare,
    /** **EventDefinition**

EventDefinition. The EventDefinition resource provides a reusable description of when a particular event can occur. */
    EventDefinition,
    /** **Evidence**

Evidence. The Evidence Resource provides a machine-interpretable expression of an evidence concept including the evidence variables (e.g., population, exposures/interventions, comparators, outcomes, measured variables, confounding variables), the statistics, and the certainty of this evidence. */
    Evidence,
    /** **EvidenceReport**

EvidenceReport. The EvidenceReport Resource is a specialized container for a collection of resources and codeable concepts, adapted to support compositions of Evidence, EvidenceVariable, and Citation resources and related concepts. */
    EvidenceReport,
    /** **EvidenceVariable**

EvidenceVariable. The EvidenceVariable resource describes an element that knowledge (Evidence) is about. */
    EvidenceVariable,
    /** **ExampleScenario**

ExampleScenario. A walkthrough of a workflow showing the interaction between systems and the instances shared, possibly including the evolution of instances over time. */
    ExampleScenario,
    /** **ExplanationOfBenefit**

ExplanationOfBenefit. This resource provides: the claim details; adjudication details from the processing of a Claim; and optionally account balance information, for informing the subscriber of the benefits provided. */
    ExplanationOfBenefit,
    /** **Expression**

Expression. Expression Type: A expression that is evaluated in a specified context and returns a value. The context of use of the expression must specify the context in which the expression is evaluated, and how the result of the expression is used. */
    Expression,
    /** **ExtendedContactDetail**

ExtendedContactDetail. ExtendedContactDetail Type: Specifies contact information for a specific purpose over a period of time, might be handled/monitored by a specific named person or organization. */
    ExtendedContactDetail,
    /** **Extension**

Extension. Extension Type: Optional Extension Element - found in all resources. */
    Extension,
    /** **FamilyMemberHistory**

FamilyMemberHistory. Significant health conditions for a person related to the patient relevant in the context of care for the patient. */
    FamilyMemberHistory,
    /** **Flag**

Flag. Prospective warnings of potential issues when providing care to the patient. */
    Flag,
    /** **FormularyItem**

FormularyItem. This resource describes a product or service that is available through a program and includes the conditions and constraints of availability.  All of the information in this resource is specific to the inclusion of the item in the formulary and is not inherent to the item itself. */
    FormularyItem,
    /** **GenomicStudy**

GenomicStudy. A set of analyses performed to analyze and generate genomic data. */
    GenomicStudy,
    /** **Goal**

Goal. Describes the intended objective(s) for a patient, group or organization care, for example, weight loss, restoring an activity of daily living, obtaining herd immunity via immunization, meeting a process improvement objective, etc. */
    Goal,
    /** **GraphDefinition**

GraphDefinition. A formal computable definition of a graph of resources - that is, a coherent set of resources that form a graph by following references. The Graph Definition resource defines a set and makes rules about the set. */
    GraphDefinition,
    /** **Group**

Group. Represents a defined collection of entities that may be discussed or acted upon collectively but which are not expected to act collectively, and are not formally or legally recognized; i.e. a collection of entities that isn't an Organization. */
    Group,
    /** **GuidanceResponse**

GuidanceResponse. A guidance response is the formal response to a guidance request, including any output parameters returned by the evaluation, as well as the description of any proposed actions to be taken. */
    GuidanceResponse,
    /** **HealthcareService**

HealthcareService. The details of a healthcare service available at a location or in a catalog.  In the case where there is a hierarchy of services (for example, Lab -> Pathology -> Wound Cultures), this can be represented using a set of linked HealthcareServices. */
    HealthcareService,
    /** **HumanName**

HumanName. HumanName Type: A name, normally of a human, that can be used for other living entities (e.g. animals but not organizations) that have been assigned names by a human and may need the use of name parts or the need for usage information. */
    HumanName,
    /** **Identifier**

Identifier. Identifier Type: An identifier - identifies some entity uniquely and unambiguously. Typically this is used for business identifiers. */
    Identifier,
    /** **ImagingSelection**

ImagingSelection. A selection of DICOM SOP instances and/or frames within a single Study and Series. This might include additional specifics such as an image region, an Observation UID or a Segmentation Number, allowing linkage to an Observation Resource or transferring this information along with the ImagingStudy Resource. */
    ImagingSelection,
    /** **ImagingStudy**

ImagingStudy. Representation of the content produced in a DICOM imaging study. A study comprises a set of series, each of which includes a set of Service-Object Pair Instances (SOP Instances - images or other data) acquired or produced in a common context.  A series is of only one modality (e.g. X-ray, CT, MR, ultrasound), but a study may have multiple series of different modalities. */
    ImagingStudy,
    /** **Immunization**

Immunization. Describes the event of a patient being administered a vaccine or a record of an immunization as reported by a patient, a clinician or another party. */
    Immunization,
    /** **ImmunizationEvaluation**

ImmunizationEvaluation. Describes a comparison of an immunization event against published recommendations to determine if the administration is "valid" in relation to those  recommendations. */
    ImmunizationEvaluation,
    /** **ImmunizationRecommendation**

ImmunizationRecommendation. A patient's point-in-time set of recommendations (i.e. forecasting) according to a published schedule with optional supporting justification. */
    ImmunizationRecommendation,
    /** **ImplementationGuide**

ImplementationGuide. A set of rules of how a particular interoperability or standards problem is solved - typically through the use of FHIR resources. This resource is used to gather all the parts of an implementation guide into a logical whole and to publish a computable definition of all the parts. */
    ImplementationGuide,
    /** **Ingredient**

Ingredient. An ingredient of a manufactured item or pharmaceutical product. */
    Ingredient,
    /** **InsurancePlan**

InsurancePlan. Details of a Health Insurance product/plan provided by an organization. */
    InsurancePlan,
    /** **InventoryItem**

InventoryItem. functional description of an inventory item used in inventory and supply-related workflows. */
    InventoryItem,
    /** **InventoryReport**

InventoryReport. A report of inventory or stock items. */
    InventoryReport,
    /** **Invoice**

Invoice. Invoice containing collected ChargeItems from an Account with calculated individual and total price for Billing purpose. */
    Invoice,
    /** **Library**

Library. The Library resource is a general-purpose container for knowledge asset definitions. It can be used to describe and expose existing knowledge assets such as logic libraries and information model descriptions, as well as to describe a collection of knowledge assets. */
    Library,
    /** **Linkage**

Linkage. Identifies two or more records (resource instances) that refer to the same real-world "occurrence". */
    Linkage,
    /** **List**

List. A List is a curated collection of resources, for things such as problem lists, allergy lists, facility list, organization list, etc. */
    List,
    /** **Location**

Location. Details and position information for a place where services are provided and resources and participants may be stored, found, contained, or accommodated. */
    Location,
    /** **ManufacturedItemDefinition**

ManufacturedItemDefinition. The definition and characteristics of a medicinal manufactured item, such as a tablet or capsule, as contained in a packaged medicinal product. */
    ManufacturedItemDefinition,
    /** **MarketingStatus**

MarketingStatus. MarketingStatus Type: The marketing status describes the date when a medicinal product is actually put on the market or the date as of which it is no longer available. */
    MarketingStatus,
    /** **Measure**

Measure. The Measure resource provides the definition of a quality measure. */
    Measure,
    /** **MeasureReport**

MeasureReport. The MeasureReport resource contains the results of the calculation of a measure; and optionally a reference to the resources involved in that calculation. */
    MeasureReport,
    /** **Medication**

Medication. This resource is primarily used for the identification and definition of a medication, including ingredients, for the purposes of prescribing, dispensing, and administering a medication as well as for making statements about medication use. */
    Medication,
    /** **MedicationAdministration**

MedicationAdministration. Describes the event of a patient consuming or otherwise being administered a medication.  This may be as simple as swallowing a tablet or it may be a long running infusion. Related resources tie this event to the authorizing prescription, and the specific encounter between patient and health care practitioner. This event can also be used to record waste using a status of not-done and the appropriate statusReason. */
    MedicationAdministration,
    /** **MedicationDispense**

MedicationDispense. Indicates that a medication product is to be or has been dispensed for a named person/patient.  This includes a description of the medication product (supply) provided and the instructions for administering the medication.  The medication dispense is the result of a pharmacy system responding to a medication order. */
    MedicationDispense,
    /** **MedicationKnowledge**

MedicationKnowledge. Information about a medication that is used to support knowledge. */
    MedicationKnowledge,
    /** **MedicationRequest**

MedicationRequest. An order or request for both supply of the medication and the instructions for administration of the medication to a patient. The resource is called "MedicationRequest" rather than "MedicationPrescription" or "MedicationOrder" to generalize the use across inpatient and outpatient settings, including care plans, etc., and to harmonize with workflow patterns. */
    MedicationRequest,
    /** **MedicationStatement**

MedicationStatement. A record of a medication that is being consumed by a patient.   A MedicationStatement may indicate that the patient may be taking the medication now or has taken the medication in the past or will be taking the medication in the future.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay.   The medication information may come from sources such as the patient's memory, from a prescription bottle,  or from a list of medications the patient, clinician or other party maintains.

The primary difference between a medicationstatement and a medicationadministration is that the medication administration has complete administration information and is based on actual administration information from the person who administered the medication.  A medicationstatement is often, if not always, less specific.  There is no required date/time when the medication was administered, in fact we only know that a source has reported the patient is taking this medication, where details such as time, quantity, or rate or even medication product may be incomplete or missing or less precise.  As stated earlier, the Medication Statement information may come from the patient's memory, from a prescription bottle or from a list of medications the patient, clinician or other party maintains.  Medication administration is more formal and is not missing detailed information. */
    MedicationStatement,
    /** **MedicinalProductDefinition**

MedicinalProductDefinition. Detailed definition of a medicinal product, typically for uses other than direct patient care (e.g. regulatory use, drug catalogs, to support prescribing, adverse events management etc.). */
    MedicinalProductDefinition,
    /** **MessageDefinition**

MessageDefinition. Defines the characteristics of a message that can be shared between systems, including the type of event that initiates the message, the content to be transmitted and what response(s), if any, are permitted. */
    MessageDefinition,
    /** **MessageHeader**

MessageHeader. The header for a message exchange that is either requesting or responding to an action.  The reference(s) that are the subject of the action as well as other information related to the action are typically transmitted in a bundle in which the MessageHeader resource instance is the first resource in the bundle. */
    MessageHeader,
    /** **Meta**

Meta. Meta Type: The metadata about a resource. This is content in the resource that is maintained by the infrastructure. Changes to the content might not always be associated with version changes to the resource. */
    Meta,
    /** **MetadataResource**

MetadataResource. Common Interface declaration for conformance and knowledge artifact resources. */
    MetadataResource,
    /** **MolecularSequence**

MolecularSequence. Representation of a molecular sequence. */
    MolecularSequence,
    /** **MonetaryComponent**

MonetaryComponent. MonetaryComponent Type: Availability data for an {item}. */
    MonetaryComponent,
    /** **Money**

Money. Money Type: An amount of economic utility in some recognized currency. */
    Money,
    /** **NamingSystem**

NamingSystem. A curated namespace that issues unique symbols within that namespace for the identification of concepts, people, devices, etc.  Represents a "System" used within the Identifier and Coding data types. */
    NamingSystem,
    /** **Narrative**

Narrative. Narrative Type: A human-readable summary of the resource conveying the essential clinical and business information for the resource. */
    Narrative,
    /** **NutritionIntake**

NutritionIntake. A record of food or fluid that is being consumed by a patient.  A NutritionIntake may indicate that the patient may be consuming the food or fluid now or has consumed the food or fluid in the past.  The source of this information can be the patient, significant other (such as a family member or spouse), or a clinician.  A common scenario where this information is captured is during the history taking process during a patient visit or stay or through an app that tracks food or fluids consumed.   The consumption information may come from sources such as the patient's memory, from a nutrition label,  or from a clinician documenting observed intake. */
    NutritionIntake,
    /** **NutritionOrder**

NutritionOrder. A request to supply a diet, formula feeding (enteral) or oral nutritional supplement to a patient/resident. */
    NutritionOrder,
    /** **NutritionProduct**

NutritionProduct. A food or supplement that is consumed by patients. */
    NutritionProduct,
    /** **Observation**

Observation. Measurements and simple assertions made about a patient, device or other subject. */
    Observation,
    /** **ObservationDefinition**

ObservationDefinition. Set of definitional characteristics for a kind of observation or measurement produced or consumed by an orderable health care service. */
    ObservationDefinition,
    /** **OperationDefinition**

OperationDefinition. A formal computable definition of an operation (on the RESTful interface) or a named query (using the search interaction). */
    OperationDefinition,
    /** **OperationOutcome**

OperationOutcome. A collection of error, warning, or information messages that result from a system action. */
    OperationOutcome,
    /** **Organization**

Organization. A formally or informally recognized grouping of people or organizations formed for the purpose of achieving some form of collective action.  Includes companies, institutions, corporations, departments, community groups, healthcare practice groups, payer/insurer, etc. */
    Organization,
    /** **OrganizationAffiliation**

OrganizationAffiliation. Defines an affiliation/assotiation/relationship between 2 distinct organizations, that is not a part-of relationship/sub-division relationship. */
    OrganizationAffiliation,
    /** **PackagedProductDefinition**

PackagedProductDefinition. A medically related item or items, in a container or package. */
    PackagedProductDefinition,
    /** **ParameterDefinition**

ParameterDefinition. ParameterDefinition Type: The parameters to the module. This collection specifies both the input and output parameters. Input parameters are provided by the caller as part of the $evaluate operation. Output parameters are included in the GuidanceResponse. */
    ParameterDefinition,
    /** **Parameters**

Parameters. This resource is used to pass information into and back from an operation (whether invoked directly from REST or within a messaging environment).  It is not persisted or allowed to be referenced by other resources except as described in the definition of the Parameters resource. */
    Parameters,
    /** **Patient**

Patient. Demographics and other administrative information about an individual or animal receiving care or other health-related services. */
    Patient,
    /** **PaymentNotice**

PaymentNotice. This resource provides the status of the payment for goods and services rendered, and the request and response resource references. */
    PaymentNotice,
    /** **PaymentReconciliation**

PaymentReconciliation. This resource provides the details including amount of a payment and allocates the payment items being paid. */
    PaymentReconciliation,
    /** **Period**

Period. Period Type: A time period defined by a start and end date and optionally time. */
    Period,
    /** **Permission**

Permission. Permission resource holds access rules for a given data and context. */
    Permission,
    /** **Person**

Person. Demographics and administrative information about a person independent of a specific health-related context. */
    Person,
    /** **PlanDefinition**

PlanDefinition. This resource allows for the definition of various types of plans as a sharable, consumable, and executable artifact. The resource is general enough to support the description of a broad range of clinical and non-clinical artifacts such as clinical decision support rules, order sets, protocols, and drug quality specifications. */
    PlanDefinition,
    /** **Practitioner**

Practitioner. A person who is directly or indirectly involved in the provisioning of healthcare or related services. */
    Practitioner,
    /** **PractitionerRole**

PractitionerRole. A specific set of Roles/Locations/specialties/services that a practitioner may perform, or has performed at an organization during a period of time. */
    PractitionerRole,
    /** **PrimitiveType**

PrimitiveType. PrimitiveType Type: The base type for all re-useable types defined that have a simple property. */
    PrimitiveType,
    /** **Procedure**

Procedure. An action that is or was performed on or for a patient, practitioner, device, organization, or location. For example, this can be a physical intervention on a patient like an operation, or less invasive like long term services, counseling, or hypnotherapy.  This can be a quality or safety inspection for a location, organization, or device.  This can be an accreditation procedure on a practitioner for licensing. */
    Procedure,
    /** **ProductShelfLife**

ProductShelfLife. ProductShelfLife Type: The shelf-life and storage information for a medicinal product item or container can be described using this class. */
    ProductShelfLife,
    /** **Provenance**

Provenance. Provenance of a resource is a record that describes entities and processes involved in producing and delivering or otherwise influencing that resource. Provenance provides a critical foundation for assessing authenticity, enabling trust, and allowing reproducibility. Provenance assertions are a form of contextual metadata and can themselves become important records with their own provenance. Provenance statement indicates clinical significance in terms of confidence in authenticity, reliability, and trustworthiness, integrity, and stage in lifecycle (e.g. Document Completion - has the artifact been legally authenticated), all of which may impact security, privacy, and trust policies. */
    Provenance,
    /** **Quantity**

Quantity. Quantity Type: A measured amount (or an amount that can potentially be measured). Note that measured amounts include amounts that are not precisely quantified, including amounts involving arbitrary units and floating currencies. */
    Quantity,
    /** **Questionnaire**

Questionnaire. A structured set of questions intended to guide the collection of answers from end-users. Questionnaires provide detailed control over order, presentation, phraseology and grouping to allow coherent, consistent data collection. */
    Questionnaire,
    /** **QuestionnaireResponse**

QuestionnaireResponse. A structured set of questions and their answers. The questions are ordered and grouped into coherent subsets, corresponding to the structure of the grouping of the questionnaire being responded to. */
    QuestionnaireResponse,
    /** **Range**

Range. Range Type: A set of ordered Quantities defined by a low and high limit. */
    Range,
    /** **Ratio**

Ratio. Ratio Type: A relationship of two Quantity values - expressed as a numerator and a denominator. */
    Ratio,
    /** **RatioRange**

RatioRange. RatioRange Type: A range of ratios expressed as a low and high numerator and a denominator. */
    RatioRange,
    /** **Reference**

Reference. Reference Type: A reference from one resource to another. */
    Reference,
    /** **RegulatedAuthorization**

RegulatedAuthorization. Regulatory approval, clearance or licencing related to a regulated product, treatment, facility or activity that is cited in a guidance, regulation, rule or legislative act. An example is Market Authorization relating to a Medicinal Product. */
    RegulatedAuthorization,
    /** **RelatedArtifact**

RelatedArtifact. RelatedArtifact Type: Related artifacts such as additional documentation, justification, or bibliographic references. */
    RelatedArtifact,
    /** **RelatedPerson**

RelatedPerson. Information about a person that is involved in a patient's health or the care for a patient, but who is not the target of healthcare, nor has a formal responsibility in the care process. */
    RelatedPerson,
    /** **RequestOrchestration**

RequestOrchestration. A set of related requests that can be used to capture intended activities that have inter-dependencies such as "give this medication after that one". */
    RequestOrchestration,
    /** **Requirements**

Requirements. The Requirements resource is used to describe an actor - a human or an application that plays a role in data exchange, and that may have obligations associated with the role the actor plays. */
    Requirements,
    /** **ResearchStudy**

ResearchStudy. A scientific study of nature that sometimes includes processes involved in health and disease. For example, clinical trials are research studies that involve people. These studies may be related to new ways to screen, prevent, diagnose, and treat disease. They may also study certain outcomes and certain groups of people by looking at data collected in the past or future. */
    ResearchStudy,
    /** **ResearchSubject**

ResearchSubject. A ResearchSubject is a participant or object which is the recipient of investigative activities in a research study. */
    ResearchSubject,
    /** **Resource**

Resource. This is the base resource type for everything. */
    Resource,
    /** **RiskAssessment**

RiskAssessment. An assessment of the likely outcome(s) for a patient or other subject as well as the likelihood of each outcome. */
    RiskAssessment,
    /** **SampledData**

SampledData. SampledData Type: A series of measurements taken by a device, with upper and lower limits. There may be more than one dimension in the data. */
    SampledData,
    /** **Schedule**

Schedule. A container for slots of time that may be available for booking appointments. */
    Schedule,
    /** **SearchParameter**

SearchParameter. A search parameter that defines a named search item that can be used to search/filter on a resource. */
    SearchParameter,
    /** **ServiceRequest**

ServiceRequest. A record of a request for service such as diagnostic investigations, treatments, or operations to be performed. */
    ServiceRequest,
    /** **Signature**

Signature. Signature Type: A signature along with supporting context. The signature may be a digital signature that is cryptographic in nature, or some other signature acceptable to the domain. This other signature may be as simple as a graphical image representing a hand-written signature, or a signature ceremony Different signature approaches have different utilities. */
    Signature,
    /** **Slot**

Slot. A slot of time on a schedule that may be available for booking appointments. */
    Slot,
    /** **Specimen**

Specimen. A sample to be used for analysis. */
    Specimen,
    /** **SpecimenDefinition**

SpecimenDefinition. A kind of specimen with associated set of requirements. */
    SpecimenDefinition,
    /** **StructureDefinition**

StructureDefinition. A definition of a FHIR structure. This resource is used to describe the underlying resources, data types defined in FHIR, and also for describing extensions and constraints on resources and data types. */
    StructureDefinition,
    /** **StructureMap**

StructureMap. A Map of relationships between 2 structures that can be used to transform data. */
    StructureMap,
    /** **Subscription**

Subscription. The subscription resource describes a particular client's request to be notified about a SubscriptionTopic. */
    Subscription,
    /** **SubscriptionStatus**

SubscriptionStatus. The SubscriptionStatus resource describes the state of a Subscription during notifications. It is not persisted. */
    SubscriptionStatus,
    /** **SubscriptionTopic**

SubscriptionTopic. Describes a stream of resource state changes identified by trigger criteria and annotated with labels useful to filter projections from this topic. */
    SubscriptionTopic,
    /** **Substance**

Substance. A homogeneous material with a definite composition. */
    Substance,
    /** **SubstanceDefinition**

SubstanceDefinition. The detailed description of a substance, typically at a level beyond what is used for prescribing. */
    SubstanceDefinition,
    /** **SubstanceNucleicAcid**

SubstanceNucleicAcid. Nucleic acids are defined by three distinct elements: the base, sugar and linkage. Individual substance/moiety IDs will be created for each of these elements. The nucleotide sequence will be always entered in the 5’-3’ direction. */
    SubstanceNucleicAcid,
    /** **SubstancePolymer**

SubstancePolymer. Properties of a substance specific to it being a polymer. */
    SubstancePolymer,
    /** **SubstanceProtein**

SubstanceProtein. A SubstanceProtein is defined as a single unit of a linear amino acid sequence, or a combination of subunits that are either covalently linked or have a defined invariant stoichiometric relationship. This includes all synthetic, recombinant and purified SubstanceProteins of defined sequence, whether the use is therapeutic or prophylactic. This set of elements will be used to describe albumins, coagulation factors, cytokines, growth factors, peptide/SubstanceProtein hormones, enzymes, toxins, toxoids, recombinant vaccines, and immunomodulators. */
    SubstanceProtein,
    /** **SubstanceReferenceInformation**

SubstanceReferenceInformation. Todo. */
    SubstanceReferenceInformation,
    /** **SubstanceSourceMaterial**

SubstanceSourceMaterial. Source material shall capture information on the taxonomic and anatomical origins as well as the fraction of a material that can result in or can be modified to form a substance. This set of data elements shall be used to define polymer substances isolated from biological matrices. Taxonomic and anatomical origins shall be described using a controlled vocabulary as required. This information is captured for naturally derived polymers ( . starch) and structurally diverse substances. For Organisms belonging to the Kingdom Plantae the Substance level defines the fresh material of a single species or infraspecies, the Herbal Drug and the Herbal preparation. For Herbal preparations, the fraction information will be captured at the Substance information level and additional information for herbal extracts will be captured at the Specified Substance Group 1 information level. See for further explanation the Substance Class: Structurally Diverse and the herbal annex. */
    SubstanceSourceMaterial,
    /** **SupplyDelivery**

SupplyDelivery. Record of delivery of what is supplied. */
    SupplyDelivery,
    /** **SupplyRequest**

SupplyRequest. A record of a non-patient specific request for a medication, substance, device, certain types of biologically derived product, and nutrition product used in the healthcare setting. */
    SupplyRequest,
    /** **Task**

Task. A task to be performed. */
    Task,
    /** **TerminologyCapabilities**

TerminologyCapabilities. A TerminologyCapabilities resource documents a set of capabilities (behaviors) of a FHIR Terminology Server that may be used as a statement of actual server functionality or a statement of required or desired server implementation. */
    TerminologyCapabilities,
    /** **TestPlan**

TestPlan. A plan for executing testing on an artifact or specifications */
    TestPlan,
    /** **TestReport**

TestReport. A summary of information based on the results of executing a TestScript. */
    TestReport,
    /** **TestScript**

TestScript. A structured set of tests against a FHIR server or client implementation to determine compliance against the FHIR specification. */
    TestScript,
    /** **Timing**

Timing. Timing Type: Specifies an event that may occur multiple times. Timing schedules are used to record when things are planned, expected or requested to occur. The most common usage is in dosage instructions for medications. They are also used when planning care of various kinds, and may be used for reporting the schedule to which past regular activities were carried out. */
    Timing,
    /** **Transport**

Transport. Record of transport. */
    Transport,
    /** **TriggerDefinition**

TriggerDefinition. TriggerDefinition Type: A description of a triggering event. Triggering events can be named events, data events, or periodic, as determined by the type element. */
    TriggerDefinition,
    /** **UsageContext**

UsageContext. UsageContext Type: Specifies clinical/business/etc. metadata that can be used to retrieve, index and/or categorize an artifact. This metadata can either be specific to the applicable population (e.g., age category, DRG) or the specific context of care (e.g., venue, care setting, provider of care). */
    UsageContext,
    /** **ValueSet**

ValueSet. A ValueSet resource instance specifies a set of codes drawn from one or more code systems, intended for use in a particular context. Value sets link between [[[CodeSystem]]] definitions and their use in [coded elements](terminologies.html). */
    ValueSet,
    /** **VerificationResult**

VerificationResult. Describes validation requirements, source(s), status and dates for one or more elements. */
    VerificationResult,
    /** **VirtualServiceDetail**

VirtualServiceDetail. VirtualServiceDetail Type: Virtual Service Contact Details. */
    VirtualServiceDetail,
    /** **VisionPrescription**

VisionPrescription. An authorization for the provision of glasses and/or contact lenses to a patient. */
    VisionPrescription,
    /** **base64Binary**

base64Binary. base64Binary Type: A stream of bytes */
    Base64Binary,
    /** **boolean**

boolean. boolean Type: Value of "true" or "false" */
    Boolean,
    /** **canonical**

canonical. canonical type: A URI that is a reference to a canonical URL on a FHIR resource */
    Canonical,
    /** **code**

code. code type: A string which has at least one character and no leading or trailing whitespace and where there is no whitespace other than single spaces in the contents */
    Code,
    /** **date**

date. date Type: A date or partial date (e.g. just year or year + month). There is no UTC offset. The format is a union of the schema types gYear, gYearMonth and date.  Dates SHALL be valid dates. */
    Date,
    /** **dateTime**

dateTime. dateTime Type: A date, date-time or partial date (e.g. just year or year + month).  If hours and minutes are specified, a UTC offset SHALL be populated. The format is a union of the schema types gYear, gYearMonth, date and dateTime. Seconds must be provided due to schema type constraints but may be zero-filled and may be ignored.                 Dates SHALL be valid dates. */
    DateTime,
    /** **decimal**

decimal. decimal Type: A rational number with implicit precision */
    Decimal,
    /** **id**

id. id type: Any combination of letters, numerals, "-" and ".", with a length limit of 64 characters.  (This might be an integer, an unprefixed OID, UUID or any other identifier pattern that meets these constraints.)  Ids are case-insensitive. */
    Id,
    /** **instant**

instant. instant Type: An instant in time - known at least to the second */
    Instant,
    /** **integer**

integer. integer Type: A whole number */
    Integer,
    /** **integer64**

integer64. integer64 Type: A very large whole number */
    Integer64,
    /** **markdown**

markdown. markdown type: A string that may contain Github Flavored Markdown syntax for optional processing by a mark down presentation engine */
    Markdown,
    /** **oid**

oid. oid type: An OID represented as a URI */
    Oid,
    /** **positiveInt**

positiveInt. positiveInt type: An integer with a value that is positive (e.g. >0) */
    PositiveInt,
    /** **string**

string. string Type: A sequence of Unicode characters */
    String,
    /** **time**

time. time Type: A time during the day, with no date specified */
    Time,
    /** **unsignedInt**

unsignedInt. unsignedInt type: An integer with a value that is not negative (e.g. >= 0) */
    UnsignedInt,
    /** **uri**

uri. uri Type: String of characters used to identify a name or a resource */
    Uri,
    /** **url**

url. url type: A URI that is a literal reference */
    Url,
    /** **uuid**

uuid. uuid type: A UUID, represented as a URI */
    Uuid,
    /** **xhtml**

xhtml. xhtml Type definition */
    Xhtml,
}
impl ::core::str::FromStr for FHIRTypes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Account" => Ok(Self::Account),
            "ActivityDefinition" => Ok(Self::ActivityDefinition),
            "ActorDefinition" => Ok(Self::ActorDefinition),
            "Address" => Ok(Self::Address),
            "AdministrableProductDefinition" => Ok(Self::AdministrableProductDefinition),
            "AdverseEvent" => Ok(Self::AdverseEvent),
            "Age" => Ok(Self::Age),
            "AllergyIntolerance" => Ok(Self::AllergyIntolerance),
            "Annotation" => Ok(Self::Annotation),
            "Appointment" => Ok(Self::Appointment),
            "AppointmentResponse" => Ok(Self::AppointmentResponse),
            "ArtifactAssessment" => Ok(Self::ArtifactAssessment),
            "Attachment" => Ok(Self::Attachment),
            "AuditEvent" => Ok(Self::AuditEvent),
            "Availability" => Ok(Self::Availability),
            "BackboneElement" => Ok(Self::BackboneElement),
            "BackboneType" => Ok(Self::BackboneType),
            "Base" => Ok(Self::Base),
            "Basic" => Ok(Self::Basic),
            "Binary" => Ok(Self::Binary),
            "BiologicallyDerivedProduct" => Ok(Self::BiologicallyDerivedProduct),
            "BiologicallyDerivedProductDispense" => {
                Ok(Self::BiologicallyDerivedProductDispense)
            }
            "BodyStructure" => Ok(Self::BodyStructure),
            "Bundle" => Ok(Self::Bundle),
            "CanonicalResource" => Ok(Self::CanonicalResource),
            "CapabilityStatement" => Ok(Self::CapabilityStatement),
            "CarePlan" => Ok(Self::CarePlan),
            "CareTeam" => Ok(Self::CareTeam),
            "ChargeItem" => Ok(Self::ChargeItem),
            "ChargeItemDefinition" => Ok(Self::ChargeItemDefinition),
            "Citation" => Ok(Self::Citation),
            "Claim" => Ok(Self::Claim),
            "ClaimResponse" => Ok(Self::ClaimResponse),
            "ClinicalImpression" => Ok(Self::ClinicalImpression),
            "ClinicalUseDefinition" => Ok(Self::ClinicalUseDefinition),
            "CodeSystem" => Ok(Self::CodeSystem),
            "CodeableConcept" => Ok(Self::CodeableConcept),
            "CodeableReference" => Ok(Self::CodeableReference),
            "Coding" => Ok(Self::Coding),
            "Communication" => Ok(Self::Communication),
            "CommunicationRequest" => Ok(Self::CommunicationRequest),
            "CompartmentDefinition" => Ok(Self::CompartmentDefinition),
            "Composition" => Ok(Self::Composition),
            "ConceptMap" => Ok(Self::ConceptMap),
            "Condition" => Ok(Self::Condition),
            "ConditionDefinition" => Ok(Self::ConditionDefinition),
            "Consent" => Ok(Self::Consent),
            "ContactDetail" => Ok(Self::ContactDetail),
            "ContactPoint" => Ok(Self::ContactPoint),
            "Contract" => Ok(Self::Contract),
            "Contributor" => Ok(Self::Contributor),
            "Count" => Ok(Self::Count),
            "Coverage" => Ok(Self::Coverage),
            "CoverageEligibilityRequest" => Ok(Self::CoverageEligibilityRequest),
            "CoverageEligibilityResponse" => Ok(Self::CoverageEligibilityResponse),
            "DataRequirement" => Ok(Self::DataRequirement),
            "DataType" => Ok(Self::DataType),
            "DetectedIssue" => Ok(Self::DetectedIssue),
            "Device" => Ok(Self::Device),
            "DeviceAssociation" => Ok(Self::DeviceAssociation),
            "DeviceDefinition" => Ok(Self::DeviceDefinition),
            "DeviceDispense" => Ok(Self::DeviceDispense),
            "DeviceMetric" => Ok(Self::DeviceMetric),
            "DeviceRequest" => Ok(Self::DeviceRequest),
            "DeviceUsage" => Ok(Self::DeviceUsage),
            "DiagnosticReport" => Ok(Self::DiagnosticReport),
            "Distance" => Ok(Self::Distance),
            "DocumentReference" => Ok(Self::DocumentReference),
            "DomainResource" => Ok(Self::DomainResource),
            "Dosage" => Ok(Self::Dosage),
            "Duration" => Ok(Self::Duration),
            "Element" => Ok(Self::Element),
            "ElementDefinition" => Ok(Self::ElementDefinition),
            "Encounter" => Ok(Self::Encounter),
            "EncounterHistory" => Ok(Self::EncounterHistory),
            "Endpoint" => Ok(Self::Endpoint),
            "EnrollmentRequest" => Ok(Self::EnrollmentRequest),
            "EnrollmentResponse" => Ok(Self::EnrollmentResponse),
            "EpisodeOfCare" => Ok(Self::EpisodeOfCare),
            "EventDefinition" => Ok(Self::EventDefinition),
            "Evidence" => Ok(Self::Evidence),
            "EvidenceReport" => Ok(Self::EvidenceReport),
            "EvidenceVariable" => Ok(Self::EvidenceVariable),
            "ExampleScenario" => Ok(Self::ExampleScenario),
            "ExplanationOfBenefit" => Ok(Self::ExplanationOfBenefit),
            "Expression" => Ok(Self::Expression),
            "ExtendedContactDetail" => Ok(Self::ExtendedContactDetail),
            "Extension" => Ok(Self::Extension),
            "FamilyMemberHistory" => Ok(Self::FamilyMemberHistory),
            "Flag" => Ok(Self::Flag),
            "FormularyItem" => Ok(Self::FormularyItem),
            "GenomicStudy" => Ok(Self::GenomicStudy),
            "Goal" => Ok(Self::Goal),
            "GraphDefinition" => Ok(Self::GraphDefinition),
            "Group" => Ok(Self::Group),
            "GuidanceResponse" => Ok(Self::GuidanceResponse),
            "HealthcareService" => Ok(Self::HealthcareService),
            "HumanName" => Ok(Self::HumanName),
            "Identifier" => Ok(Self::Identifier),
            "ImagingSelection" => Ok(Self::ImagingSelection),
            "ImagingStudy" => Ok(Self::ImagingStudy),
            "Immunization" => Ok(Self::Immunization),
            "ImmunizationEvaluation" => Ok(Self::ImmunizationEvaluation),
            "ImmunizationRecommendation" => Ok(Self::ImmunizationRecommendation),
            "ImplementationGuide" => Ok(Self::ImplementationGuide),
            "Ingredient" => Ok(Self::Ingredient),
            "InsurancePlan" => Ok(Self::InsurancePlan),
            "InventoryItem" => Ok(Self::InventoryItem),
            "InventoryReport" => Ok(Self::InventoryReport),
            "Invoice" => Ok(Self::Invoice),
            "Library" => Ok(Self::Library),
            "Linkage" => Ok(Self::Linkage),
            "List" => Ok(Self::List),
            "Location" => Ok(Self::Location),
            "ManufacturedItemDefinition" => Ok(Self::ManufacturedItemDefinition),
            "MarketingStatus" => Ok(Self::MarketingStatus),
            "Measure" => Ok(Self::Measure),
            "MeasureReport" => Ok(Self::MeasureReport),
            "Medication" => Ok(Self::Medication),
            "MedicationAdministration" => Ok(Self::MedicationAdministration),
            "MedicationDispense" => Ok(Self::MedicationDispense),
            "MedicationKnowledge" => Ok(Self::MedicationKnowledge),
            "MedicationRequest" => Ok(Self::MedicationRequest),
            "MedicationStatement" => Ok(Self::MedicationStatement),
            "MedicinalProductDefinition" => Ok(Self::MedicinalProductDefinition),
            "MessageDefinition" => Ok(Self::MessageDefinition),
            "MessageHeader" => Ok(Self::MessageHeader),
            "Meta" => Ok(Self::Meta),
            "MetadataResource" => Ok(Self::MetadataResource),
            "MolecularSequence" => Ok(Self::MolecularSequence),
            "MonetaryComponent" => Ok(Self::MonetaryComponent),
            "Money" => Ok(Self::Money),
            "NamingSystem" => Ok(Self::NamingSystem),
            "Narrative" => Ok(Self::Narrative),
            "NutritionIntake" => Ok(Self::NutritionIntake),
            "NutritionOrder" => Ok(Self::NutritionOrder),
            "NutritionProduct" => Ok(Self::NutritionProduct),
            "Observation" => Ok(Self::Observation),
            "ObservationDefinition" => Ok(Self::ObservationDefinition),
            "OperationDefinition" => Ok(Self::OperationDefinition),
            "OperationOutcome" => Ok(Self::OperationOutcome),
            "Organization" => Ok(Self::Organization),
            "OrganizationAffiliation" => Ok(Self::OrganizationAffiliation),
            "PackagedProductDefinition" => Ok(Self::PackagedProductDefinition),
            "ParameterDefinition" => Ok(Self::ParameterDefinition),
            "Parameters" => Ok(Self::Parameters),
            "Patient" => Ok(Self::Patient),
            "PaymentNotice" => Ok(Self::PaymentNotice),
            "PaymentReconciliation" => Ok(Self::PaymentReconciliation),
            "Period" => Ok(Self::Period),
            "Permission" => Ok(Self::Permission),
            "Person" => Ok(Self::Person),
            "PlanDefinition" => Ok(Self::PlanDefinition),
            "Practitioner" => Ok(Self::Practitioner),
            "PractitionerRole" => Ok(Self::PractitionerRole),
            "PrimitiveType" => Ok(Self::PrimitiveType),
            "Procedure" => Ok(Self::Procedure),
            "ProductShelfLife" => Ok(Self::ProductShelfLife),
            "Provenance" => Ok(Self::Provenance),
            "Quantity" => Ok(Self::Quantity),
            "Questionnaire" => Ok(Self::Questionnaire),
            "QuestionnaireResponse" => Ok(Self::QuestionnaireResponse),
            "Range" => Ok(Self::Range),
            "Ratio" => Ok(Self::Ratio),
            "RatioRange" => Ok(Self::RatioRange),
            "Reference" => Ok(Self::Reference),
            "RegulatedAuthorization" => Ok(Self::RegulatedAuthorization),
            "RelatedArtifact" => Ok(Self::RelatedArtifact),
            "RelatedPerson" => Ok(Self::RelatedPerson),
            "RequestOrchestration" => Ok(Self::RequestOrchestration),
            "Requirements" => Ok(Self::Requirements),
            "ResearchStudy" => Ok(Self::ResearchStudy),
            "ResearchSubject" => Ok(Self::ResearchSubject),
            "Resource" => Ok(Self::Resource),
            "RiskAssessment" => Ok(Self::RiskAssessment),
            "SampledData" => Ok(Self::SampledData),
            "Schedule" => Ok(Self::Schedule),
            "SearchParameter" => Ok(Self::SearchParameter),
            "ServiceRequest" => Ok(Self::ServiceRequest),
            "Signature" => Ok(Self::Signature),
            "Slot" => Ok(Self::Slot),
            "Specimen" => Ok(Self::Specimen),
            "SpecimenDefinition" => Ok(Self::SpecimenDefinition),
            "StructureDefinition" => Ok(Self::StructureDefinition),
            "StructureMap" => Ok(Self::StructureMap),
            "Subscription" => Ok(Self::Subscription),
            "SubscriptionStatus" => Ok(Self::SubscriptionStatus),
            "SubscriptionTopic" => Ok(Self::SubscriptionTopic),
            "Substance" => Ok(Self::Substance),
            "SubstanceDefinition" => Ok(Self::SubstanceDefinition),
            "SubstanceNucleicAcid" => Ok(Self::SubstanceNucleicAcid),
            "SubstancePolymer" => Ok(Self::SubstancePolymer),
            "SubstanceProtein" => Ok(Self::SubstanceProtein),
            "SubstanceReferenceInformation" => Ok(Self::SubstanceReferenceInformation),
            "SubstanceSourceMaterial" => Ok(Self::SubstanceSourceMaterial),
            "SupplyDelivery" => Ok(Self::SupplyDelivery),
            "SupplyRequest" => Ok(Self::SupplyRequest),
            "Task" => Ok(Self::Task),
            "TerminologyCapabilities" => Ok(Self::TerminologyCapabilities),
            "TestPlan" => Ok(Self::TestPlan),
            "TestReport" => Ok(Self::TestReport),
            "TestScript" => Ok(Self::TestScript),
            "Timing" => Ok(Self::Timing),
            "Transport" => Ok(Self::Transport),
            "TriggerDefinition" => Ok(Self::TriggerDefinition),
            "UsageContext" => Ok(Self::UsageContext),
            "ValueSet" => Ok(Self::ValueSet),
            "VerificationResult" => Ok(Self::VerificationResult),
            "VirtualServiceDetail" => Ok(Self::VirtualServiceDetail),
            "VisionPrescription" => Ok(Self::VisionPrescription),
            "base64Binary" => Ok(Self::Base64Binary),
            "boolean" => Ok(Self::Boolean),
            "canonical" => Ok(Self::Canonical),
            "code" => Ok(Self::Code),
            "date" => Ok(Self::Date),
            "dateTime" => Ok(Self::DateTime),
            "decimal" => Ok(Self::Decimal),
            "id" => Ok(Self::Id),
            "instant" => Ok(Self::Instant),
            "integer" => Ok(Self::Integer),
            "integer64" => Ok(Self::Integer64),
            "markdown" => Ok(Self::Markdown),
            "oid" => Ok(Self::Oid),
            "positiveInt" => Ok(Self::PositiveInt),
            "string" => Ok(Self::String),
            "time" => Ok(Self::Time),
            "unsignedInt" => Ok(Self::UnsignedInt),
            "uri" => Ok(Self::Uri),
            "url" => Ok(Self::Url),
            "uuid" => Ok(Self::Uuid),
            "xhtml" => Ok(Self::Xhtml),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRTypes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Account => "Account",
            Self::ActivityDefinition => "ActivityDefinition",
            Self::ActorDefinition => "ActorDefinition",
            Self::Address => "Address",
            Self::AdministrableProductDefinition => "AdministrableProductDefinition",
            Self::AdverseEvent => "AdverseEvent",
            Self::Age => "Age",
            Self::AllergyIntolerance => "AllergyIntolerance",
            Self::Annotation => "Annotation",
            Self::Appointment => "Appointment",
            Self::AppointmentResponse => "AppointmentResponse",
            Self::ArtifactAssessment => "ArtifactAssessment",
            Self::Attachment => "Attachment",
            Self::AuditEvent => "AuditEvent",
            Self::Availability => "Availability",
            Self::BackboneElement => "BackboneElement",
            Self::BackboneType => "BackboneType",
            Self::Base => "Base",
            Self::Basic => "Basic",
            Self::Binary => "Binary",
            Self::BiologicallyDerivedProduct => "BiologicallyDerivedProduct",
            Self::BiologicallyDerivedProductDispense => {
                "BiologicallyDerivedProductDispense"
            }
            Self::BodyStructure => "BodyStructure",
            Self::Bundle => "Bundle",
            Self::CanonicalResource => "CanonicalResource",
            Self::CapabilityStatement => "CapabilityStatement",
            Self::CarePlan => "CarePlan",
            Self::CareTeam => "CareTeam",
            Self::ChargeItem => "ChargeItem",
            Self::ChargeItemDefinition => "ChargeItemDefinition",
            Self::Citation => "Citation",
            Self::Claim => "Claim",
            Self::ClaimResponse => "ClaimResponse",
            Self::ClinicalImpression => "ClinicalImpression",
            Self::ClinicalUseDefinition => "ClinicalUseDefinition",
            Self::CodeSystem => "CodeSystem",
            Self::CodeableConcept => "CodeableConcept",
            Self::CodeableReference => "CodeableReference",
            Self::Coding => "Coding",
            Self::Communication => "Communication",
            Self::CommunicationRequest => "CommunicationRequest",
            Self::CompartmentDefinition => "CompartmentDefinition",
            Self::Composition => "Composition",
            Self::ConceptMap => "ConceptMap",
            Self::Condition => "Condition",
            Self::ConditionDefinition => "ConditionDefinition",
            Self::Consent => "Consent",
            Self::ContactDetail => "ContactDetail",
            Self::ContactPoint => "ContactPoint",
            Self::Contract => "Contract",
            Self::Contributor => "Contributor",
            Self::Count => "Count",
            Self::Coverage => "Coverage",
            Self::CoverageEligibilityRequest => "CoverageEligibilityRequest",
            Self::CoverageEligibilityResponse => "CoverageEligibilityResponse",
            Self::DataRequirement => "DataRequirement",
            Self::DataType => "DataType",
            Self::DetectedIssue => "DetectedIssue",
            Self::Device => "Device",
            Self::DeviceAssociation => "DeviceAssociation",
            Self::DeviceDefinition => "DeviceDefinition",
            Self::DeviceDispense => "DeviceDispense",
            Self::DeviceMetric => "DeviceMetric",
            Self::DeviceRequest => "DeviceRequest",
            Self::DeviceUsage => "DeviceUsage",
            Self::DiagnosticReport => "DiagnosticReport",
            Self::Distance => "Distance",
            Self::DocumentReference => "DocumentReference",
            Self::DomainResource => "DomainResource",
            Self::Dosage => "Dosage",
            Self::Duration => "Duration",
            Self::Element => "Element",
            Self::ElementDefinition => "ElementDefinition",
            Self::Encounter => "Encounter",
            Self::EncounterHistory => "EncounterHistory",
            Self::Endpoint => "Endpoint",
            Self::EnrollmentRequest => "EnrollmentRequest",
            Self::EnrollmentResponse => "EnrollmentResponse",
            Self::EpisodeOfCare => "EpisodeOfCare",
            Self::EventDefinition => "EventDefinition",
            Self::Evidence => "Evidence",
            Self::EvidenceReport => "EvidenceReport",
            Self::EvidenceVariable => "EvidenceVariable",
            Self::ExampleScenario => "ExampleScenario",
            Self::ExplanationOfBenefit => "ExplanationOfBenefit",
            Self::Expression => "Expression",
            Self::ExtendedContactDetail => "ExtendedContactDetail",
            Self::Extension => "Extension",
            Self::FamilyMemberHistory => "FamilyMemberHistory",
            Self::Flag => "Flag",
            Self::FormularyItem => "FormularyItem",
            Self::GenomicStudy => "GenomicStudy",
            Self::Goal => "Goal",
            Self::GraphDefinition => "GraphDefinition",
            Self::Group => "Group",
            Self::GuidanceResponse => "GuidanceResponse",
            Self::HealthcareService => "HealthcareService",
            Self::HumanName => "HumanName",
            Self::Identifier => "Identifier",
            Self::ImagingSelection => "ImagingSelection",
            Self::ImagingStudy => "ImagingStudy",
            Self::Immunization => "Immunization",
            Self::ImmunizationEvaluation => "ImmunizationEvaluation",
            Self::ImmunizationRecommendation => "ImmunizationRecommendation",
            Self::ImplementationGuide => "ImplementationGuide",
            Self::Ingredient => "Ingredient",
            Self::InsurancePlan => "InsurancePlan",
            Self::InventoryItem => "InventoryItem",
            Self::InventoryReport => "InventoryReport",
            Self::Invoice => "Invoice",
            Self::Library => "Library",
            Self::Linkage => "Linkage",
            Self::List => "List",
            Self::Location => "Location",
            Self::ManufacturedItemDefinition => "ManufacturedItemDefinition",
            Self::MarketingStatus => "MarketingStatus",
            Self::Measure => "Measure",
            Self::MeasureReport => "MeasureReport",
            Self::Medication => "Medication",
            Self::MedicationAdministration => "MedicationAdministration",
            Self::MedicationDispense => "MedicationDispense",
            Self::MedicationKnowledge => "MedicationKnowledge",
            Self::MedicationRequest => "MedicationRequest",
            Self::MedicationStatement => "MedicationStatement",
            Self::MedicinalProductDefinition => "MedicinalProductDefinition",
            Self::MessageDefinition => "MessageDefinition",
            Self::MessageHeader => "MessageHeader",
            Self::Meta => "Meta",
            Self::MetadataResource => "MetadataResource",
            Self::MolecularSequence => "MolecularSequence",
            Self::MonetaryComponent => "MonetaryComponent",
            Self::Money => "Money",
            Self::NamingSystem => "NamingSystem",
            Self::Narrative => "Narrative",
            Self::NutritionIntake => "NutritionIntake",
            Self::NutritionOrder => "NutritionOrder",
            Self::NutritionProduct => "NutritionProduct",
            Self::Observation => "Observation",
            Self::ObservationDefinition => "ObservationDefinition",
            Self::OperationDefinition => "OperationDefinition",
            Self::OperationOutcome => "OperationOutcome",
            Self::Organization => "Organization",
            Self::OrganizationAffiliation => "OrganizationAffiliation",
            Self::PackagedProductDefinition => "PackagedProductDefinition",
            Self::ParameterDefinition => "ParameterDefinition",
            Self::Parameters => "Parameters",
            Self::Patient => "Patient",
            Self::PaymentNotice => "PaymentNotice",
            Self::PaymentReconciliation => "PaymentReconciliation",
            Self::Period => "Period",
            Self::Permission => "Permission",
            Self::Person => "Person",
            Self::PlanDefinition => "PlanDefinition",
            Self::Practitioner => "Practitioner",
            Self::PractitionerRole => "PractitionerRole",
            Self::PrimitiveType => "PrimitiveType",
            Self::Procedure => "Procedure",
            Self::ProductShelfLife => "ProductShelfLife",
            Self::Provenance => "Provenance",
            Self::Quantity => "Quantity",
            Self::Questionnaire => "Questionnaire",
            Self::QuestionnaireResponse => "QuestionnaireResponse",
            Self::Range => "Range",
            Self::Ratio => "Ratio",
            Self::RatioRange => "RatioRange",
            Self::Reference => "Reference",
            Self::RegulatedAuthorization => "RegulatedAuthorization",
            Self::RelatedArtifact => "RelatedArtifact",
            Self::RelatedPerson => "RelatedPerson",
            Self::RequestOrchestration => "RequestOrchestration",
            Self::Requirements => "Requirements",
            Self::ResearchStudy => "ResearchStudy",
            Self::ResearchSubject => "ResearchSubject",
            Self::Resource => "Resource",
            Self::RiskAssessment => "RiskAssessment",
            Self::SampledData => "SampledData",
            Self::Schedule => "Schedule",
            Self::SearchParameter => "SearchParameter",
            Self::ServiceRequest => "ServiceRequest",
            Self::Signature => "Signature",
            Self::Slot => "Slot",
            Self::Specimen => "Specimen",
            Self::SpecimenDefinition => "SpecimenDefinition",
            Self::StructureDefinition => "StructureDefinition",
            Self::StructureMap => "StructureMap",
            Self::Subscription => "Subscription",
            Self::SubscriptionStatus => "SubscriptionStatus",
            Self::SubscriptionTopic => "SubscriptionTopic",
            Self::Substance => "Substance",
            Self::SubstanceDefinition => "SubstanceDefinition",
            Self::SubstanceNucleicAcid => "SubstanceNucleicAcid",
            Self::SubstancePolymer => "SubstancePolymer",
            Self::SubstanceProtein => "SubstanceProtein",
            Self::SubstanceReferenceInformation => "SubstanceReferenceInformation",
            Self::SubstanceSourceMaterial => "SubstanceSourceMaterial",
            Self::SupplyDelivery => "SupplyDelivery",
            Self::SupplyRequest => "SupplyRequest",
            Self::Task => "Task",
            Self::TerminologyCapabilities => "TerminologyCapabilities",
            Self::TestPlan => "TestPlan",
            Self::TestReport => "TestReport",
            Self::TestScript => "TestScript",
            Self::Timing => "Timing",
            Self::Transport => "Transport",
            Self::TriggerDefinition => "TriggerDefinition",
            Self::UsageContext => "UsageContext",
            Self::ValueSet => "ValueSet",
            Self::VerificationResult => "VerificationResult",
            Self::VirtualServiceDetail => "VirtualServiceDetail",
            Self::VisionPrescription => "VisionPrescription",
            Self::Base64Binary => "base64Binary",
            Self::Boolean => "boolean",
            Self::Canonical => "canonical",
            Self::Code => "code",
            Self::Date => "date",
            Self::DateTime => "dateTime",
            Self::Decimal => "decimal",
            Self::Id => "id",
            Self::Instant => "instant",
            Self::Integer => "integer",
            Self::Integer64 => "integer64",
            Self::Markdown => "markdown",
            Self::Oid => "oid",
            Self::PositiveInt => "positiveInt",
            Self::String => "string",
            Self::Time => "time",
            Self::UnsignedInt => "unsignedInt",
            Self::Uri => "uri",
            Self::Url => "url",
            Self::Uuid => "uuid",
            Self::Xhtml => "xhtml",
        }
    }
}
impl ::std::fmt::Debug for FHIRTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRTypes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRTypes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRTypes> for Coding {
    fn from(code: FHIRTypes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/fhir-types".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRTypes> for CodeableConcept {
    fn from(code: FHIRTypes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FHIRVersion](http://hl7.org/fhir/ValueSet/FHIR-version)**. All published FHIR Versions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FHIRVersion {
    /** **0.0**

0.0. DSTU 1 version. */
    N00,
    /** **0.0.80**

0.0.80. DSTU 1 Official version. */
    N0080,
    /** **0.0.81**

0.0.81. DSTU 1 Official version Technical Errata #1. */
    N0081,
    /** **0.0.82**

0.0.82. DSTU 1 Official version Technical Errata #2. */
    N0082,
    /** **0.01**

0.01. Oldest archived version of FHIR. */
    N001,
    /** **0.05**

0.05. 1st Draft for Comment (Sept 2012 Ballot). */
    N005,
    /** **0.06**

0.06. 2nd Draft for Comment (January 2013 Ballot). */
    N006,
    /** **0.11**

0.11. DSTU 1 Ballot version. */
    N011,
    /** **0.4**

0.4. January 2015 Ballot. */
    N04,
    /** **0.4.0**

0.4.0. Draft For Comment (January 2015 Ballot). */
    N040,
    /** **0.5**

0.5. May 2015 Ballot. */
    N05,
    /** **0.5.0**

0.5.0. DSTU 2 Ballot version (May 2015 Ballot). */
    N050,
    /** **1.0**

1.0. DSTU 2 version. */
    N10,
    /** **1.0.0**

1.0.0. DSTU 2 QA Preview + CQIF Ballot (Sep 2015). */
    N100,
    /** **1.0.1**

1.0.1. DSTU 2 (Official version). */
    N101,
    /** **1.0.2**

1.0.2. DSTU 2 (Official version) with 1 technical errata. */
    N102,
    /** **1.1**

1.1. GAO Ballot version. */
    N11,
    /** **1.1.0**

1.1.0. GAO Ballot + draft changes to main FHIR standard. */
    N110,
    /** **1.4**

1.4. Connectathon 12 (Montreal) version. */
    N14,
    /** **1.4.0**

1.4.0. CQF on FHIR Ballot + Connectathon 12 (Montreal). */
    N140,
    /** **1.6**

1.6. Connectathon 13 (Baltimore) version. */
    N16,
    /** **1.6.0**

1.6.0. FHIR STU3 Ballot + Connectathon 13 (Baltimore). */
    N160,
    /** **1.8**

1.8. Connectathon 14 (San Antonio) version. */
    N18,
    /** **1.8.0**

1.8.0. FHIR STU3 Candidate + Connectathon 14 (San Antonio). */
    N180,
    /** **3.0**

3.0. STU3 version. */
    N30,
    /** **3.0.0**

3.0.0. FHIR Release 3 (STU). */
    N300,
    /** **3.0.1**

3.0.1. FHIR Release 3 (STU) with 1 technical errata. */
    N301,
    /** **3.0.2**

3.0.2. FHIR Release 3 (STU) with 2 technical errata. */
    N302,
    /** **3.3**

3.3. R4 Ballot #1 version. */
    N33,
    /** **3.3.0**

3.3.0. R4 Ballot #1 + Connectaton 18 (Cologne). */
    N330,
    /** **3.5**

3.5. R4 Ballot #2 version. */
    N35,
    /** **3.5.0**

3.5.0. R4 Ballot #2 + Connectathon 19 (Baltimore). */
    N350,
    /** **4.0**

4.0. R4 version. */
    N40,
    /** **4.0.0**

4.0.0. FHIR Release 4 (Normative + STU). */
    N400,
    /** **4.0.1**

4.0.1. FHIR Release 4 (Normative + STU) with 1 technical errata. */
    N401,
    /** **4.1**

4.1. R4B Ballot #1 version. */
    N41,
    /** **4.1.0**

4.1.0. R4B Ballot #1 + Connectathon 27 (Virtual). */
    N410,
    /** **4.2**

4.2. R5 Preview #1 version. */
    N42,
    /** **4.2.0**

4.2.0. R5 Preview #1 + Connectathon 23 (Sydney). */
    N420,
    /** **4.3**

4.3. R4B version. */
    N43,
    /** **4.3.0**

4.3.0. FHIR Release 4B (Normative + STU). */
    N430,
    /** **4.3.0-cibuild**

4.3.0-cibuild. FHIR Release 4B CI-Builld. */
    N430Cibuild,
    /** **4.3.0-snapshot1**

4.3.0-snapshot1. FHIR Release 4B Snapshot #1. */
    N430Snapshot1,
    /** **4.4**

4.4. R5 Preview #2 version. */
    N44,
    /** **4.4.0**

4.4.0. R5 Preview #2 + Connectathon 24 (Virtual). */
    N440,
    /** **4.5**

4.5. R5 Preview #3 version. */
    N45,
    /** **4.5.0**

4.5.0. R5 Preview #3 + Connectathon 25 (Virtual). */
    N450,
    /** **4.6**

4.6. R5 Draft Ballot version. */
    N46,
    /** **4.6.0**

4.6.0. R5 Draft Ballot + Connectathon 27 (Virtual). */
    N460,
    /** **5.0**

5.0. R5 Versions. */
    N50,
    /** **5.0.0**

5.0.0. R5 Final Version. */
    N500,
    /** **5.0.0-ballot**

5.0.0-ballot. R5 Ballot. */
    N500Ballot,
    /** **5.0.0-cibuild**

5.0.0-cibuild. R5 Rolling ci-build. */
    N500Cibuild,
    /** **5.0.0-draft-final**

5.0.0-draft-final. R5 Final QA. */
    N500DraftFinal,
    /** **5.0.0-snapshot1**

5.0.0-snapshot1. R5 Preview #2. */
    N500Snapshot1,
    /** **5.0.0-snapshot2**

5.0.0-snapshot2. R5 Interim tooling stage. */
    N500Snapshot2,
    /** **5.0.0-snapshot3**

5.0.0-snapshot3. R5 January 2023 Staging Release + Connectathon 32. */
    N500Snapshot3,
}
impl ::core::str::FromStr for FHIRVersion {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "0.0" => Ok(Self::N00),
            "0.0.80" => Ok(Self::N0080),
            "0.0.81" => Ok(Self::N0081),
            "0.0.82" => Ok(Self::N0082),
            "0.01" => Ok(Self::N001),
            "0.05" => Ok(Self::N005),
            "0.06" => Ok(Self::N006),
            "0.11" => Ok(Self::N011),
            "0.4" => Ok(Self::N04),
            "0.4.0" => Ok(Self::N040),
            "0.5" => Ok(Self::N05),
            "0.5.0" => Ok(Self::N050),
            "1.0" => Ok(Self::N10),
            "1.0.0" => Ok(Self::N100),
            "1.0.1" => Ok(Self::N101),
            "1.0.2" => Ok(Self::N102),
            "1.1" => Ok(Self::N11),
            "1.1.0" => Ok(Self::N110),
            "1.4" => Ok(Self::N14),
            "1.4.0" => Ok(Self::N140),
            "1.6" => Ok(Self::N16),
            "1.6.0" => Ok(Self::N160),
            "1.8" => Ok(Self::N18),
            "1.8.0" => Ok(Self::N180),
            "3.0" => Ok(Self::N30),
            "3.0.0" => Ok(Self::N300),
            "3.0.1" => Ok(Self::N301),
            "3.0.2" => Ok(Self::N302),
            "3.3" => Ok(Self::N33),
            "3.3.0" => Ok(Self::N330),
            "3.5" => Ok(Self::N35),
            "3.5.0" => Ok(Self::N350),
            "4.0" => Ok(Self::N40),
            "4.0.0" => Ok(Self::N400),
            "4.0.1" => Ok(Self::N401),
            "4.1" => Ok(Self::N41),
            "4.1.0" => Ok(Self::N410),
            "4.2" => Ok(Self::N42),
            "4.2.0" => Ok(Self::N420),
            "4.3" => Ok(Self::N43),
            "4.3.0" => Ok(Self::N430),
            "4.3.0-cibuild" => Ok(Self::N430Cibuild),
            "4.3.0-snapshot1" => Ok(Self::N430Snapshot1),
            "4.4" => Ok(Self::N44),
            "4.4.0" => Ok(Self::N440),
            "4.5" => Ok(Self::N45),
            "4.5.0" => Ok(Self::N450),
            "4.6" => Ok(Self::N46),
            "4.6.0" => Ok(Self::N460),
            "5.0" => Ok(Self::N50),
            "5.0.0" => Ok(Self::N500),
            "5.0.0-ballot" => Ok(Self::N500Ballot),
            "5.0.0-cibuild" => Ok(Self::N500Cibuild),
            "5.0.0-draft-final" => Ok(Self::N500DraftFinal),
            "5.0.0-snapshot1" => Ok(Self::N500Snapshot1),
            "5.0.0-snapshot2" => Ok(Self::N500Snapshot2),
            "5.0.0-snapshot3" => Ok(Self::N500Snapshot3),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FHIRVersion {
    fn as_ref(&self) -> &str {
        match self {
            Self::N00 => "0.0",
            Self::N0080 => "0.0.80",
            Self::N0081 => "0.0.81",
            Self::N0082 => "0.0.82",
            Self::N001 => "0.01",
            Self::N005 => "0.05",
            Self::N006 => "0.06",
            Self::N011 => "0.11",
            Self::N04 => "0.4",
            Self::N040 => "0.4.0",
            Self::N05 => "0.5",
            Self::N050 => "0.5.0",
            Self::N10 => "1.0",
            Self::N100 => "1.0.0",
            Self::N101 => "1.0.1",
            Self::N102 => "1.0.2",
            Self::N11 => "1.1",
            Self::N110 => "1.1.0",
            Self::N14 => "1.4",
            Self::N140 => "1.4.0",
            Self::N16 => "1.6",
            Self::N160 => "1.6.0",
            Self::N18 => "1.8",
            Self::N180 => "1.8.0",
            Self::N30 => "3.0",
            Self::N300 => "3.0.0",
            Self::N301 => "3.0.1",
            Self::N302 => "3.0.2",
            Self::N33 => "3.3",
            Self::N330 => "3.3.0",
            Self::N35 => "3.5",
            Self::N350 => "3.5.0",
            Self::N40 => "4.0",
            Self::N400 => "4.0.0",
            Self::N401 => "4.0.1",
            Self::N41 => "4.1",
            Self::N410 => "4.1.0",
            Self::N42 => "4.2",
            Self::N420 => "4.2.0",
            Self::N43 => "4.3",
            Self::N430 => "4.3.0",
            Self::N430Cibuild => "4.3.0-cibuild",
            Self::N430Snapshot1 => "4.3.0-snapshot1",
            Self::N44 => "4.4",
            Self::N440 => "4.4.0",
            Self::N45 => "4.5",
            Self::N450 => "4.5.0",
            Self::N46 => "4.6",
            Self::N460 => "4.6.0",
            Self::N50 => "5.0",
            Self::N500 => "5.0.0",
            Self::N500Ballot => "5.0.0-ballot",
            Self::N500Cibuild => "5.0.0-cibuild",
            Self::N500DraftFinal => "5.0.0-draft-final",
            Self::N500Snapshot1 => "5.0.0-snapshot1",
            Self::N500Snapshot2 => "5.0.0-snapshot2",
            Self::N500Snapshot3 => "5.0.0-snapshot3",
        }
    }
}
impl ::std::fmt::Debug for FHIRVersion {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FHIRVersion {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FHIRVersion {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FHIRVersion {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FHIRVersion> for Coding {
    fn from(code: FHIRVersion) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/FHIR-version".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FHIRVersion> for CodeableConcept {
    fn from(code: FHIRVersion) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FamilyHistoryStatus](http://hl7.org/fhir/ValueSet/history-status)**. A code that identifies the status of the family history record.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FamilyHistoryStatus {
    /** **completed**

Completed. All available related health information is captured as of the date (and possibly time) when the family member history was taken. */
    Completed,
    /** **entered-in-error**

Entered in Error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **health-unknown**

Health Unknown. Health information for this family member is unavailable/unknown. */
    HealthUnknown,
    /** **partial**

Partial. Some health information is known and captured, but not complete - see notes for details. */
    Partial,
}
impl ::core::str::FromStr for FamilyHistoryStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "health-unknown" => Ok(Self::HealthUnknown),
            "partial" => Ok(Self::Partial),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FamilyHistoryStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::HealthUnknown => "health-unknown",
            Self::Partial => "partial",
        }
    }
}
impl ::std::fmt::Debug for FamilyHistoryStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FamilyHistoryStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FamilyHistoryStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FamilyHistoryStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FamilyHistoryStatus> for Coding {
    fn from(code: FamilyHistoryStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/history-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FamilyHistoryStatus> for CodeableConcept {
    fn from(code: FamilyHistoryStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FilterOperator](http://hl7.org/fhir/ValueSet/filter-operator)**. The kind of operation to perform as a part of a property based filter.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FilterOperator {
    /** **=**

Equals. The specified property of the code equals the provided value. */
    Equal,
    /** **child-of**

Child Of. Only concepts with a direct hierarchical relationship to the index code and no other concepts. This does not include the index code in the output. */
    ChildOf,
    /** **descendent-leaf**

Descendent Leaf. Includes concept ids that have a transitive is-a relationship with the concept Id provided as the value, but which do not have any concept ids with transitive is-a relationships with themselves. */
    DescendentLeaf,
    /** **descendent-of**

Descendent Of (by subsumption). Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, excluding the provided concept itself (i.e. include descendant codes only). */
    DescendentOf,
    /** **exists**

Exists. The specified property of the code has at least one value (if the specified value is true; if the specified value is false, then matches when the specified property of the code has no values). */
    Exists,
    /** **generalizes**

Generalizes (by Subsumption). Includes all concept ids that have a transitive is-a relationship from the concept Id provided as the value, including the provided concept itself (i.e. include ancestor codes and self). */
    Generalizes,
    /** **in**

In Set. The specified property of the code is in the set of codes or concepts specified in the provided value (comma-separated list). */
    In,
    /** **is-a**

Is A (by subsumption). Includes all concept ids that have a transitive is-a relationship with the concept Id provided as the value, including the provided concept itself (include descendant codes and self). */
    IsA,
    /** **is-not-a**

Not (Is A) (by subsumption). The specified property of the code does not have an is-a relationship with the provided value. */
    IsNotA,
    /** **not-in**

Not in Set. The specified property of the code is not in the set of codes or concepts specified in the provided value (comma-separated list). */
    NotIn,
    /** **regex**

Regular Expression. The specified property of the code  matches the regex specified in the provided value. */
    Regex,
}
impl ::core::str::FromStr for FilterOperator {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "=" => Ok(Self::Equal),
            "child-of" => Ok(Self::ChildOf),
            "descendent-leaf" => Ok(Self::DescendentLeaf),
            "descendent-of" => Ok(Self::DescendentOf),
            "exists" => Ok(Self::Exists),
            "generalizes" => Ok(Self::Generalizes),
            "in" => Ok(Self::In),
            "is-a" => Ok(Self::IsA),
            "is-not-a" => Ok(Self::IsNotA),
            "not-in" => Ok(Self::NotIn),
            "regex" => Ok(Self::Regex),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FilterOperator {
    fn as_ref(&self) -> &str {
        match self {
            Self::Equal => "=",
            Self::ChildOf => "child-of",
            Self::DescendentLeaf => "descendent-leaf",
            Self::DescendentOf => "descendent-of",
            Self::Exists => "exists",
            Self::Generalizes => "generalizes",
            Self::In => "in",
            Self::IsA => "is-a",
            Self::IsNotA => "is-not-a",
            Self::NotIn => "not-in",
            Self::Regex => "regex",
        }
    }
}
impl ::std::fmt::Debug for FilterOperator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FilterOperator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FilterOperator {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FilterOperator {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FilterOperator> for Coding {
    fn from(code: FilterOperator) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/filter-operator".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FilterOperator> for CodeableConcept {
    fn from(code: FilterOperator) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FinancialResourceStatusCodes](http://hl7.org/fhir/fm-status)**. This value set includes Status codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum FinancialResourceStatusCodes {
    /** **active**

Active. The instance is currently in-force. */
    Active,
    /** **cancelled**

Cancelled. The instance is withdrawn, rescinded or reversed. */
    Cancelled,
    /** **draft**

Draft. A new instance the contents of which is not complete. */
    Draft,
    /** **entered-in-error**

Entered in Error. The instance was entered in error. */
    EnteredInError,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for FinancialResourceStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for FinancialResourceStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for FinancialResourceStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FinancialResourceStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FinancialResourceStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FinancialResourceStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FinancialResourceStatusCodes> for Coding {
    fn from(code: FinancialResourceStatusCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/fm-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FinancialResourceStatusCodes> for CodeableConcept {
    fn from(code: FinancialResourceStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FlagStatus](http://hl7.org/fhir/ValueSet/flag-status)**. Indicates whether this flag is active and needs to be displayed to a user, or whether it is no longer needed or was entered in error.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FlagStatus {
    /** **active**

Active. A current flag that should be displayed to a user. A system may use the category to determine which user roles should view the flag. */
    Active,
    /** **entered-in-error**

Entered in Error. The flag was added in error and should no longer be displayed. */
    EnteredInError,
    /** **inactive**

Inactive. The flag no longer needs to be displayed. */
    Inactive,
}
impl ::core::str::FromStr for FlagStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FlagStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for FlagStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FlagStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FlagStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FlagStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FlagStatus> for Coding {
    fn from(code: FlagStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/flag-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FlagStatus> for CodeableConcept {
    fn from(code: FlagStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FocusCharacteristicCode](http://hl7.org/fhir/ValueSet/focus-characteristic-code)**. Evidence focus characteristic code.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FocusCharacteristicCode {
    /** **citation**

Citation. Used to reference a specific article. */
    Citation,
    /** **clinical-outcomes-observed**

Observed outcomes are clinical outcomes. Used to denote a focus on clinical outcomes, ie evidence variable in role of outcome (measured variable) as observed is considered a "clinical outcome" (patient-important outcome such as mortality, symptoms, function or quality of life). */
    ClinicalOutcomesObserved,
    /** **comparator**

Comparator. The comparator (intervention or control state) of interest. */
    Comparator,
    /** **exposure**

Exposure. The exposure of interest, such as an intervention. */
    Exposure,
    /** **medication-exposures**

Medication exposures. Any medication exposures. A subset of exposures or interventions that are medications. */
    MedicationExposures,
    /** **outcome**

Outcome. the outcome of interest. */
    Outcome,
    /** **population**

Population. The population of interest. */
    Population,
    /** **study-type**

Study type. Type of research study, such as randomized trial or case-control study. */
    StudyType,
}
impl ::core::str::FromStr for FocusCharacteristicCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "citation" => Ok(Self::Citation),
            "clinical-outcomes-observed" => Ok(Self::ClinicalOutcomesObserved),
            "comparator" => Ok(Self::Comparator),
            "exposure" => Ok(Self::Exposure),
            "medication-exposures" => Ok(Self::MedicationExposures),
            "outcome" => Ok(Self::Outcome),
            "population" => Ok(Self::Population),
            "study-type" => Ok(Self::StudyType),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FocusCharacteristicCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Citation => "citation",
            Self::ClinicalOutcomesObserved => "clinical-outcomes-observed",
            Self::Comparator => "comparator",
            Self::Exposure => "exposure",
            Self::MedicationExposures => "medication-exposures",
            Self::Outcome => "outcome",
            Self::Population => "population",
            Self::StudyType => "study-type",
        }
    }
}
impl ::std::fmt::Debug for FocusCharacteristicCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FocusCharacteristicCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FocusCharacteristicCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FocusCharacteristicCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FocusCharacteristicCode> for Coding {
    fn from(code: FocusCharacteristicCode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/focus-characteristic-code".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FocusCharacteristicCode> for CodeableConcept {
    fn from(code: FocusCharacteristicCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[FormularyItemStatusCodes](http://hl7.org/fhir/ValueSet/formularyitem-status)**. FormularyItem Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum FormularyItemStatusCodes {
    /** **active**

Active. The service or product referred to by this FormularyItem is in active use within the drug database or inventory system. */
    Active,
    /** **entered-in-error**

Entered in Error. The service or product referred to by this FormularyItem was entered in error within the drug database or inventory system. */
    EnteredInError,
    /** **inactive**

Inactive. The service or product referred to by this FormularyItem is not in active use within the drug database or inventory system. */
    Inactive,
}
impl ::core::str::FromStr for FormularyItemStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for FormularyItemStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for FormularyItemStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for FormularyItemStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for FormularyItemStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for FormularyItemStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<FormularyItemStatusCodes> for Coding {
    fn from(code: FormularyItemStatusCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/formularyitem-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<FormularyItemStatusCodes> for CodeableConcept {
    fn from(code: FormularyItemStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GenomicStudyChangeType](http://hl7.org/fhir/ValueSet/genomicstudy-changetype)**. The change type relevant to GenomicStudy analysis.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GenomicStudyChangeType {
    /** **AA**

Protein/amino Acids change . Change that involves Amino Acid (AA) or protein sequences. */
    Aa,
    /** **CHR**

Chromosomal changes. Change that involves number or strcture of chromosomes. */
    Chr,
    /** **CNV**

Copy number variations. Change that involves copy number variations among various genomes. */
    Cnv,
    /** **DNA**

DNA change. Change that involves Deoxyribonucleic acid (DNA) sequences. */
    Dna,
    /** **RNA**

RNA change. Change that involves Ribonucleic Acid (RNA) sequences. */
    Rna,
}
impl ::core::str::FromStr for GenomicStudyChangeType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "AA" => Ok(Self::Aa),
            "CHR" => Ok(Self::Chr),
            "CNV" => Ok(Self::Cnv),
            "DNA" => Ok(Self::Dna),
            "RNA" => Ok(Self::Rna),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GenomicStudyChangeType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aa => "AA",
            Self::Chr => "CHR",
            Self::Cnv => "CNV",
            Self::Dna => "DNA",
            Self::Rna => "RNA",
        }
    }
}
impl ::std::fmt::Debug for GenomicStudyChangeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GenomicStudyChangeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GenomicStudyChangeType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GenomicStudyChangeType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GenomicStudyChangeType> for Coding {
    fn from(code: GenomicStudyChangeType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/genomicstudy-changetype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GenomicStudyChangeType> for CodeableConcept {
    fn from(code: GenomicStudyChangeType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GenomicStudyDataFormat](http://hl7.org/fhir/ValueSet/genomicstudy-dataformat)**. The data format relevant to genomics. These formats and relevant codes were pulled from [Integrative Genomics Viewer Documentation](https://software.broadinstitute.org/software/igv/FileFormats) by Broad Institute.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GenomicStudyDataFormat {
    /** **bam**

BAM. */
    Bam,
    /** **bed**

BED. */
    Bed,
    /** **bedgraph**

BedGraph. */
    Bedgraph,
    /** **bedpe**

BEDPE. */
    Bedpe,
    /** **bigWig**

bigWig. */
    BigWig,
    /** **bigbed**

bigBed. */
    Bigbed,
    /** **birdsuite-files**

Birdsuite-Files. */
    BirdsuiteFiles,
    /** **broadpeak**

broadPeak. */
    Broadpeak,
    /** **cbs**

CBS. */
    Cbs,
    /** **chemical-reactivity-probing-profiles**

Chemical-Reactivity-Probing-Profiles. */
    ChemicalReactivityProbingProfiles,
    /** **chrom-sizes**

chrom-sizes. */
    ChromSizes,
    /** **cn**

CN. */
    Cn,
    /** **cram**

CRAM. */
    Cram,
    /** **custom-file-formats**

Custom-File-Formats. */
    CustomFileFormats,
    /** **cytoband**

Cytoband. */
    Cytoband,
    /** **fasta**

FASTA. */
    Fasta,
    /** **gct**

GCT. */
    Gct,
    /** **genepred**

genePred. */
    Genepred,
    /** **gff-gtf**

GFF/GTF. */
    GffGtf,
    /** **gistic**

GISTIC. */
    Gistic,
    /** **goby**

Goby. */
    Goby,
    /** **gwas**

GWAS. */
    Gwas,
    /** **igv**

IGV. */
    Igv,
    /** **loh**

LOH. */
    Loh,
    /** **maf-multiple-alignment-format**

MAF-Multiple Alignment Format. */
    MafMultipleAlignmentFormat,
    /** **maf-mutation-annotation-format**

MAF-Mutation-Annotation-Format. */
    MafMutationAnnotationFormat,
    /** **merged-bam-file**

Merged BAM File. */
    MergedBamFile,
    /** **mut**

MUT. */
    Mut,
    /** **narrowpeak**

narrowPeak. */
    Narrowpeak,
    /** **psl**

PSL. */
    Psl,
    /** **res**

RES. */
    Res,
    /** **rna-secondary-structure-formats**

RNA-Secondary-Structure-Formats. */
    RnaSecondaryStructureFormats,
    /** **sam**

SAM. */
    Sam,
    /** **sample-info-attributes-file**

Sample-Info-Attributes-file. */
    SampleInfoAttributesFile,
    /** **seg**

SEG. */
    Seg,
    /** **tdf**

TDF. */
    Tdf,
    /** **track-line**

Track Line. */
    TrackLine,
    /** **type-line**

Type Line. */
    TypeLine,
    /** **vcf**

VCF. */
    Vcf,
    /** **wig**

WIG. */
    Wig,
}
impl ::core::str::FromStr for GenomicStudyDataFormat {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "bam" => Ok(Self::Bam),
            "bed" => Ok(Self::Bed),
            "bedgraph" => Ok(Self::Bedgraph),
            "bedpe" => Ok(Self::Bedpe),
            "bigWig" => Ok(Self::BigWig),
            "bigbed" => Ok(Self::Bigbed),
            "birdsuite-files" => Ok(Self::BirdsuiteFiles),
            "broadpeak" => Ok(Self::Broadpeak),
            "cbs" => Ok(Self::Cbs),
            "chemical-reactivity-probing-profiles" => {
                Ok(Self::ChemicalReactivityProbingProfiles)
            }
            "chrom-sizes" => Ok(Self::ChromSizes),
            "cn" => Ok(Self::Cn),
            "cram" => Ok(Self::Cram),
            "custom-file-formats" => Ok(Self::CustomFileFormats),
            "cytoband" => Ok(Self::Cytoband),
            "fasta" => Ok(Self::Fasta),
            "gct" => Ok(Self::Gct),
            "genepred" => Ok(Self::Genepred),
            "gff-gtf" => Ok(Self::GffGtf),
            "gistic" => Ok(Self::Gistic),
            "goby" => Ok(Self::Goby),
            "gwas" => Ok(Self::Gwas),
            "igv" => Ok(Self::Igv),
            "loh" => Ok(Self::Loh),
            "maf-multiple-alignment-format" => Ok(Self::MafMultipleAlignmentFormat),
            "maf-mutation-annotation-format" => Ok(Self::MafMutationAnnotationFormat),
            "merged-bam-file" => Ok(Self::MergedBamFile),
            "mut" => Ok(Self::Mut),
            "narrowpeak" => Ok(Self::Narrowpeak),
            "psl" => Ok(Self::Psl),
            "res" => Ok(Self::Res),
            "rna-secondary-structure-formats" => Ok(Self::RnaSecondaryStructureFormats),
            "sam" => Ok(Self::Sam),
            "sample-info-attributes-file" => Ok(Self::SampleInfoAttributesFile),
            "seg" => Ok(Self::Seg),
            "tdf" => Ok(Self::Tdf),
            "track-line" => Ok(Self::TrackLine),
            "type-line" => Ok(Self::TypeLine),
            "vcf" => Ok(Self::Vcf),
            "wig" => Ok(Self::Wig),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GenomicStudyDataFormat {
    fn as_ref(&self) -> &str {
        match self {
            Self::Bam => "bam",
            Self::Bed => "bed",
            Self::Bedgraph => "bedgraph",
            Self::Bedpe => "bedpe",
            Self::BigWig => "bigWig",
            Self::Bigbed => "bigbed",
            Self::BirdsuiteFiles => "birdsuite-files",
            Self::Broadpeak => "broadpeak",
            Self::Cbs => "cbs",
            Self::ChemicalReactivityProbingProfiles => {
                "chemical-reactivity-probing-profiles"
            }
            Self::ChromSizes => "chrom-sizes",
            Self::Cn => "cn",
            Self::Cram => "cram",
            Self::CustomFileFormats => "custom-file-formats",
            Self::Cytoband => "cytoband",
            Self::Fasta => "fasta",
            Self::Gct => "gct",
            Self::Genepred => "genepred",
            Self::GffGtf => "gff-gtf",
            Self::Gistic => "gistic",
            Self::Goby => "goby",
            Self::Gwas => "gwas",
            Self::Igv => "igv",
            Self::Loh => "loh",
            Self::MafMultipleAlignmentFormat => "maf-multiple-alignment-format",
            Self::MafMutationAnnotationFormat => "maf-mutation-annotation-format",
            Self::MergedBamFile => "merged-bam-file",
            Self::Mut => "mut",
            Self::Narrowpeak => "narrowpeak",
            Self::Psl => "psl",
            Self::Res => "res",
            Self::RnaSecondaryStructureFormats => "rna-secondary-structure-formats",
            Self::Sam => "sam",
            Self::SampleInfoAttributesFile => "sample-info-attributes-file",
            Self::Seg => "seg",
            Self::Tdf => "tdf",
            Self::TrackLine => "track-line",
            Self::TypeLine => "type-line",
            Self::Vcf => "vcf",
            Self::Wig => "wig",
        }
    }
}
impl ::std::fmt::Debug for GenomicStudyDataFormat {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GenomicStudyDataFormat {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GenomicStudyDataFormat {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GenomicStudyDataFormat {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GenomicStudyDataFormat> for Coding {
    fn from(code: GenomicStudyDataFormat) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/genomicstudy-dataformat".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GenomicStudyDataFormat> for CodeableConcept {
    fn from(code: GenomicStudyDataFormat) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GenomicStudyMethodType](http://hl7.org/fhir/ValueSet/genomicstudy-methodtype)**. The method type of the GenomicStudy analysis. These method types and relevant codes were pulled from [National Library of Medicine-Genetic Testing Registry](https://www.ncbi.nlm.nih.gov/gtr/) (NCBI-GTR) values of describing different testing methods on various levels: [major method category](https://ftp.ncbi.nlm.nih.gov/pub/GTR/standard_terms/Major_method_category.txt), [method category](https://ftp.ncbi.nlm.nih.gov/pub/GTR/standard_terms/Method_category.txt), and [primary methodology](https://ftp.ncbi.nlm.nih.gov/pub/GTR/standard_terms/Primary_test_methodology.txt)\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GenomicStudyMethodType {
    /** **alternative-splicing-detection**

Alternative splicing detection. */
    AlternativeSplicingDetection,
    /** **analyte**

Analyte. */
    Analyte,
    /** **aspe**

Allele-specific primer extension (ASPE). */
    Aspe,
    /** **bi-directional-sanger-sequence-analysis**

Bi-directional Sanger Sequence Analysis. */
    BiDirectionalSangerSequenceAnalysis,
    /** **biochemical-genetics**

Biochemical Genetics. */
    BiochemicalGenetics,
    /** **c-banding**

C-banding. */
    CBanding,
    /** **chromatin-immunoprecipitation-on-chip**

Chromatin Immunoprecipitation on ChIP. */
    ChromatinImmunoprecipitationOnChip,
    /** **chromosome-breakage-studies**

Chromosome breakage studies. */
    ChromosomeBreakageStudies,
    /** **cia**

Chemiluminescent Immunoassay (CIA). */
    Cia,
    /** **comparative-genomic-hybridization**

Comparative Genomic Hybridization. */
    ComparativeGenomicHybridization,
    /** **cytogenetics**

Cytogenetics. */
    Cytogenetics,
    /** **damid**

DamID. */
    Damid,
    /** **deletion-duplication-analysis**

Deletion/duplication analysis. */
    DeletionDuplicationAnalysis,
    /** **detection-of-homozygosity**

Detection of homozygosity. */
    DetectionOfHomozygosity,
    /** **digital-microfluidic-microspheres**

Digital microfluidic microspheres. */
    DigitalMicrofluidicMicrospheres,
    /** **digital-virtual-karyotyping**

Digital / Virtual karyotyping. */
    DigitalVirtualKaryotyping,
    /** **elisa**

Enzyme-Linked Immunosorbent Assays (ELISA). */
    Elisa,
    /** **enzymatic-levels**

Enzymatic levels. */
    EnzymaticLevels,
    /** **enzyme-activity**

Enzyme activity. */
    EnzymeActivity,
    /** **enzyme-assay**

Enzyme assay. */
    EnzymeAssay,
    /** **fish**

Fluorescence in situ hybridization (FISH). */
    Fish,
    /** **fish-interphase**

FISH-interphase. */
    FishInterphase,
    /** **fish-metaphase**

FISH-metaphase. */
    FishMetaphase,
    /** **flow-cytometry**

Flow cytometry. */
    FlowCytometry,
    /** **fluorometry**

Fluorometry. */
    Fluorometry,
    /** **fusion-genes-microarrays**

Fusion genes microarrays. */
    FusionGenesMicroarrays,
    /** **g-banding**

G-banding. */
    GBanding,
    /** **gc-ms**

Gas chromatographyâ€“mass spectrometry (GC-MS). */
    GcMs,
    /** **gene-expression-profiling**

Gene expression profiling. */
    GeneExpressionProfiling,
    /** **gene-id**

GeneID. */
    GeneId,
    /** **gold-nanoparticle-probe-technology**

Gold nanoparticle probe technology. */
    GoldNanoparticleProbeTechnology,
    /** **hplc**

High-performance liquid chromatography (HPLC). */
    Hplc,
    /** **immunohistochemistry**

Immunohistochemistry. */
    Immunohistochemistry,
    /** **karyotyping**

Karyotyping. */
    Karyotyping,
    /** **lc-ms**

Liquid chromatography mass spectrometry (LC-MS). */
    LcMs,
    /** **lc-ms-ms**

Liquid chromatography-tandem mass spectrometry (LC-MS/MS). */
    LcMsMs,
    /** **linkage-analysis**

Linkage analysis. */
    LinkageAnalysis,
    /** **m-fish**

Multicolor FISH (M-FISH). */
    MFish,
    /** **metabolite-levels**

Metabolite levels. */
    MetaboliteLevels,
    /** **methylation-analysis**

Methylation analysis. */
    MethylationAnalysis,
    /** **methylation-specific-pcr**

Methylation-specific PCR. */
    MethylationSpecificPcr,
    /** **microarray**

Microarray. */
    Microarray,
    /** **mlpa**

Multiplex Ligation-dependent Probe Amplification (MLPA). */
    Mlpa,
    /** **molecular-genetics**

Molecular Genetics. */
    MolecularGenetics,
    /** **ms-ms**

Tandem mass spectrometry (MS/MS). */
    MsMs,
    /** **msi**

Microsatellite instability testing (MSI). */
    Msi,
    /** **mutation-scanning-of-select-exons**

Mutation scanning of select exons. */
    MutationScanningOfSelectExons,
    /** **mutation-scanning-of-the-entire-coding-region**

Mutation scanning of the entire coding region. */
    MutationScanningOfTheEntireCodingRegion,
    /** **ngs-mps**

Next-Generation (NGS)/Massively parallel sequencing (MPS). */
    NgsMps,
    /** **ola**

Oligonucleotide Ligation Assay (OLA). */
    Ola,
    /** **oligonucleotide-hybridization-based-dna-sequencing**

Oligonucleotide hybridization-based DNA sequencing. */
    OligonucleotideHybridizationBasedDnaSequencing,
    /** **other**

Other. */
    Other,
    /** **pcr**

PCR. */
    Pcr,
    /** **pcr-rflp-with-southern-hybridization**

PCR-RFLP with Southern hybridization. */
    PcrRflpWithSouthernHybridization,
    /** **pcr-with-allele-specific-hybridization**

PCR with allele specific hybridization. */
    PcrWithAlleleSpecificHybridization,
    /** **protein-analysis**

Protein analysis. */
    ProteinAnalysis,
    /** **protein-expression**

Protein expression. */
    ProteinExpression,
    /** **protein-truncation-test**

Protein truncation test. */
    ProteinTruncationTest,
    /** **pyrosequencing**

Pyrosequencing. */
    Pyrosequencing,
    /** **q-banding**

Q-banding. */
    QBanding,
    /** **qpcr**

Quantitative PCR (qPCR). */
    Qpcr,
    /** **r-banding**

R-banding. */
    RBanding,
    /** **rflp**

RFLP. */
    Rflp,
    /** **rna-analysis**

RNA analysis. */
    RnaAnalysis,
    /** **rt-lamp**

RT-LAMP. */
    RtLamp,
    /** **rt-pcr**

RT-PCR. */
    RtPcr,
    /** **rt-pcr-with-gel-analysis**

RT-PCR with gel analysis. */
    RtPcrWithGelAnalysis,
    /** **rt-qpcr**

RT-qPCR. */
    RtQpcr,
    /** **sequence-analysis-of-select-exons**

Sequence analysis of select exons. */
    SequenceAnalysisOfSelectExons,
    /** **sequence-analysis-of-the-entire-coding-region**

Sequence analysis of the entire coding region. */
    SequenceAnalysisOfTheEntireCodingRegion,
    /** **silver-staining**

Silver staining. */
    SilverStaining,
    /** **sister-chromatid-exchange**

Sister chromatid exchange. */
    SisterChromatidExchange,
    /** **sky**

Spectral karyotyping (SKY). */
    Sky,
    /** **snp-detection**

SNP Detection. */
    SnpDetection,
    /** **t-banding**

T-banding. */
    TBanding,
    /** **targeted-variant-analysis**

Targeted variant analysis. */
    TargetedVariantAnalysis,
    /** **tetra-nucleotide-repeat-by-pcr-or-southern-blot**

Tetra-nucleotide repeat by PCR or Southern Blot. */
    TetraNucleotideRepeatByPcrOrSouthernBlot,
    /** **tiling-arrays**

Tiling Arrays. */
    TilingArrays,
    /** **trinucleotide-repeat-by-pcr-or-southern-blot**

Trinucleotide repeat by PCR or Southern Blot. */
    TrinucleotideRepeatByPcrOrSouthernBlot,
    /** **udp**

Uniparental disomy study (UPD). */
    Udp,
    /** **uni-directional-sanger-sequencing**

Uni-directional Sanger sequencing. */
    UniDirectionalSangerSequencing,
}
impl ::core::str::FromStr for GenomicStudyMethodType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alternative-splicing-detection" => Ok(Self::AlternativeSplicingDetection),
            "analyte" => Ok(Self::Analyte),
            "aspe" => Ok(Self::Aspe),
            "bi-directional-sanger-sequence-analysis" => {
                Ok(Self::BiDirectionalSangerSequenceAnalysis)
            }
            "biochemical-genetics" => Ok(Self::BiochemicalGenetics),
            "c-banding" => Ok(Self::CBanding),
            "chromatin-immunoprecipitation-on-chip" => {
                Ok(Self::ChromatinImmunoprecipitationOnChip)
            }
            "chromosome-breakage-studies" => Ok(Self::ChromosomeBreakageStudies),
            "cia" => Ok(Self::Cia),
            "comparative-genomic-hybridization" => {
                Ok(Self::ComparativeGenomicHybridization)
            }
            "cytogenetics" => Ok(Self::Cytogenetics),
            "damid" => Ok(Self::Damid),
            "deletion-duplication-analysis" => Ok(Self::DeletionDuplicationAnalysis),
            "detection-of-homozygosity" => Ok(Self::DetectionOfHomozygosity),
            "digital-microfluidic-microspheres" => {
                Ok(Self::DigitalMicrofluidicMicrospheres)
            }
            "digital-virtual-karyotyping" => Ok(Self::DigitalVirtualKaryotyping),
            "elisa" => Ok(Self::Elisa),
            "enzymatic-levels" => Ok(Self::EnzymaticLevels),
            "enzyme-activity" => Ok(Self::EnzymeActivity),
            "enzyme-assay" => Ok(Self::EnzymeAssay),
            "fish" => Ok(Self::Fish),
            "fish-interphase" => Ok(Self::FishInterphase),
            "fish-metaphase" => Ok(Self::FishMetaphase),
            "flow-cytometry" => Ok(Self::FlowCytometry),
            "fluorometry" => Ok(Self::Fluorometry),
            "fusion-genes-microarrays" => Ok(Self::FusionGenesMicroarrays),
            "g-banding" => Ok(Self::GBanding),
            "gc-ms" => Ok(Self::GcMs),
            "gene-expression-profiling" => Ok(Self::GeneExpressionProfiling),
            "gene-id" => Ok(Self::GeneId),
            "gold-nanoparticle-probe-technology" => {
                Ok(Self::GoldNanoparticleProbeTechnology)
            }
            "hplc" => Ok(Self::Hplc),
            "immunohistochemistry" => Ok(Self::Immunohistochemistry),
            "karyotyping" => Ok(Self::Karyotyping),
            "lc-ms" => Ok(Self::LcMs),
            "lc-ms-ms" => Ok(Self::LcMsMs),
            "linkage-analysis" => Ok(Self::LinkageAnalysis),
            "m-fish" => Ok(Self::MFish),
            "metabolite-levels" => Ok(Self::MetaboliteLevels),
            "methylation-analysis" => Ok(Self::MethylationAnalysis),
            "methylation-specific-pcr" => Ok(Self::MethylationSpecificPcr),
            "microarray" => Ok(Self::Microarray),
            "mlpa" => Ok(Self::Mlpa),
            "molecular-genetics" => Ok(Self::MolecularGenetics),
            "ms-ms" => Ok(Self::MsMs),
            "msi" => Ok(Self::Msi),
            "mutation-scanning-of-select-exons" => {
                Ok(Self::MutationScanningOfSelectExons)
            }
            "mutation-scanning-of-the-entire-coding-region" => {
                Ok(Self::MutationScanningOfTheEntireCodingRegion)
            }
            "ngs-mps" => Ok(Self::NgsMps),
            "ola" => Ok(Self::Ola),
            "oligonucleotide-hybridization-based-dna-sequencing" => {
                Ok(Self::OligonucleotideHybridizationBasedDnaSequencing)
            }
            "other" => Ok(Self::Other),
            "pcr" => Ok(Self::Pcr),
            "pcr-rflp-with-southern-hybridization" => {
                Ok(Self::PcrRflpWithSouthernHybridization)
            }
            "pcr-with-allele-specific-hybridization" => {
                Ok(Self::PcrWithAlleleSpecificHybridization)
            }
            "protein-analysis" => Ok(Self::ProteinAnalysis),
            "protein-expression" => Ok(Self::ProteinExpression),
            "protein-truncation-test" => Ok(Self::ProteinTruncationTest),
            "pyrosequencing" => Ok(Self::Pyrosequencing),
            "q-banding" => Ok(Self::QBanding),
            "qpcr" => Ok(Self::Qpcr),
            "r-banding" => Ok(Self::RBanding),
            "rflp" => Ok(Self::Rflp),
            "rna-analysis" => Ok(Self::RnaAnalysis),
            "rt-lamp" => Ok(Self::RtLamp),
            "rt-pcr" => Ok(Self::RtPcr),
            "rt-pcr-with-gel-analysis" => Ok(Self::RtPcrWithGelAnalysis),
            "rt-qpcr" => Ok(Self::RtQpcr),
            "sequence-analysis-of-select-exons" => {
                Ok(Self::SequenceAnalysisOfSelectExons)
            }
            "sequence-analysis-of-the-entire-coding-region" => {
                Ok(Self::SequenceAnalysisOfTheEntireCodingRegion)
            }
            "silver-staining" => Ok(Self::SilverStaining),
            "sister-chromatid-exchange" => Ok(Self::SisterChromatidExchange),
            "sky" => Ok(Self::Sky),
            "snp-detection" => Ok(Self::SnpDetection),
            "t-banding" => Ok(Self::TBanding),
            "targeted-variant-analysis" => Ok(Self::TargetedVariantAnalysis),
            "tetra-nucleotide-repeat-by-pcr-or-southern-blot" => {
                Ok(Self::TetraNucleotideRepeatByPcrOrSouthernBlot)
            }
            "tiling-arrays" => Ok(Self::TilingArrays),
            "trinucleotide-repeat-by-pcr-or-southern-blot" => {
                Ok(Self::TrinucleotideRepeatByPcrOrSouthernBlot)
            }
            "udp" => Ok(Self::Udp),
            "uni-directional-sanger-sequencing" => {
                Ok(Self::UniDirectionalSangerSequencing)
            }
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GenomicStudyMethodType {
    fn as_ref(&self) -> &str {
        match self {
            Self::AlternativeSplicingDetection => "alternative-splicing-detection",
            Self::Analyte => "analyte",
            Self::Aspe => "aspe",
            Self::BiDirectionalSangerSequenceAnalysis => {
                "bi-directional-sanger-sequence-analysis"
            }
            Self::BiochemicalGenetics => "biochemical-genetics",
            Self::CBanding => "c-banding",
            Self::ChromatinImmunoprecipitationOnChip => {
                "chromatin-immunoprecipitation-on-chip"
            }
            Self::ChromosomeBreakageStudies => "chromosome-breakage-studies",
            Self::Cia => "cia",
            Self::ComparativeGenomicHybridization => "comparative-genomic-hybridization",
            Self::Cytogenetics => "cytogenetics",
            Self::Damid => "damid",
            Self::DeletionDuplicationAnalysis => "deletion-duplication-analysis",
            Self::DetectionOfHomozygosity => "detection-of-homozygosity",
            Self::DigitalMicrofluidicMicrospheres => "digital-microfluidic-microspheres",
            Self::DigitalVirtualKaryotyping => "digital-virtual-karyotyping",
            Self::Elisa => "elisa",
            Self::EnzymaticLevels => "enzymatic-levels",
            Self::EnzymeActivity => "enzyme-activity",
            Self::EnzymeAssay => "enzyme-assay",
            Self::Fish => "fish",
            Self::FishInterphase => "fish-interphase",
            Self::FishMetaphase => "fish-metaphase",
            Self::FlowCytometry => "flow-cytometry",
            Self::Fluorometry => "fluorometry",
            Self::FusionGenesMicroarrays => "fusion-genes-microarrays",
            Self::GBanding => "g-banding",
            Self::GcMs => "gc-ms",
            Self::GeneExpressionProfiling => "gene-expression-profiling",
            Self::GeneId => "gene-id",
            Self::GoldNanoparticleProbeTechnology => "gold-nanoparticle-probe-technology",
            Self::Hplc => "hplc",
            Self::Immunohistochemistry => "immunohistochemistry",
            Self::Karyotyping => "karyotyping",
            Self::LcMs => "lc-ms",
            Self::LcMsMs => "lc-ms-ms",
            Self::LinkageAnalysis => "linkage-analysis",
            Self::MFish => "m-fish",
            Self::MetaboliteLevels => "metabolite-levels",
            Self::MethylationAnalysis => "methylation-analysis",
            Self::MethylationSpecificPcr => "methylation-specific-pcr",
            Self::Microarray => "microarray",
            Self::Mlpa => "mlpa",
            Self::MolecularGenetics => "molecular-genetics",
            Self::MsMs => "ms-ms",
            Self::Msi => "msi",
            Self::MutationScanningOfSelectExons => "mutation-scanning-of-select-exons",
            Self::MutationScanningOfTheEntireCodingRegion => {
                "mutation-scanning-of-the-entire-coding-region"
            }
            Self::NgsMps => "ngs-mps",
            Self::Ola => "ola",
            Self::OligonucleotideHybridizationBasedDnaSequencing => {
                "oligonucleotide-hybridization-based-dna-sequencing"
            }
            Self::Other => "other",
            Self::Pcr => "pcr",
            Self::PcrRflpWithSouthernHybridization => {
                "pcr-rflp-with-southern-hybridization"
            }
            Self::PcrWithAlleleSpecificHybridization => {
                "pcr-with-allele-specific-hybridization"
            }
            Self::ProteinAnalysis => "protein-analysis",
            Self::ProteinExpression => "protein-expression",
            Self::ProteinTruncationTest => "protein-truncation-test",
            Self::Pyrosequencing => "pyrosequencing",
            Self::QBanding => "q-banding",
            Self::Qpcr => "qpcr",
            Self::RBanding => "r-banding",
            Self::Rflp => "rflp",
            Self::RnaAnalysis => "rna-analysis",
            Self::RtLamp => "rt-lamp",
            Self::RtPcr => "rt-pcr",
            Self::RtPcrWithGelAnalysis => "rt-pcr-with-gel-analysis",
            Self::RtQpcr => "rt-qpcr",
            Self::SequenceAnalysisOfSelectExons => "sequence-analysis-of-select-exons",
            Self::SequenceAnalysisOfTheEntireCodingRegion => {
                "sequence-analysis-of-the-entire-coding-region"
            }
            Self::SilverStaining => "silver-staining",
            Self::SisterChromatidExchange => "sister-chromatid-exchange",
            Self::Sky => "sky",
            Self::SnpDetection => "snp-detection",
            Self::TBanding => "t-banding",
            Self::TargetedVariantAnalysis => "targeted-variant-analysis",
            Self::TetraNucleotideRepeatByPcrOrSouthernBlot => {
                "tetra-nucleotide-repeat-by-pcr-or-southern-blot"
            }
            Self::TilingArrays => "tiling-arrays",
            Self::TrinucleotideRepeatByPcrOrSouthernBlot => {
                "trinucleotide-repeat-by-pcr-or-southern-blot"
            }
            Self::Udp => "udp",
            Self::UniDirectionalSangerSequencing => "uni-directional-sanger-sequencing",
        }
    }
}
impl ::std::fmt::Debug for GenomicStudyMethodType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GenomicStudyMethodType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GenomicStudyMethodType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GenomicStudyMethodType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GenomicStudyMethodType> for Coding {
    fn from(code: GenomicStudyMethodType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/genomicstudy-methodtype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GenomicStudyMethodType> for CodeableConcept {
    fn from(code: GenomicStudyMethodType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GenomicStudyStatus](http://hl7.org/fhir/ValueSet/genomicstudy-status)**. The status of the GenomicStudy.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GenomicStudyStatus {
    /** **available**

Available. At least one instance has been associated with this genomic study. */
    Available,
    /** **cancelled**

Cancelled. The genomic study is unavailable because the genomic study was not started or not completed (also sometimes called "aborted"). */
    Cancelled,
    /** **entered-in-error**

Entered in Error. The genomic study has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **registered**

Registered. The existence of the genomic study is registered, but there is nothing yet available. */
    Registered,
    /** **unknown**

Unknown. The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for GenomicStudyStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "cancelled" => Ok(Self::Cancelled),
            "entered-in-error" => Ok(Self::EnteredInError),
            "registered" => Ok(Self::Registered),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GenomicStudyStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::Cancelled => "cancelled",
            Self::EnteredInError => "entered-in-error",
            Self::Registered => "registered",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for GenomicStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GenomicStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GenomicStudyStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GenomicStudyStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GenomicStudyStatus> for Coding {
    fn from(code: GenomicStudyStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/genomicstudy-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GenomicStudyStatus> for CodeableConcept {
    fn from(code: GenomicStudyStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GenomicStudyType](http://hl7.org/fhir/ValueSet/genomicstudy-type)**. The type relevant to GenomicStudy.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GenomicStudyType {
    /** **alt-splc**

Alternative splicing detection. Identification of multiple different processed mRNA transcripts from the same DNA template */
    AltSplc,
    /** **chromatin**

Chromatin conformation. Analysis of the spacial organization of chromatin within a cell */
    Chromatin,
    /** **cnv**

CNV detection. Detection of a change in the number of copies of a defined region of genomic DNA sequence resulting in structural variation when compared to the reference sequence */
    Cnv,
    /** **epi-alt-dna**

Epigenetic Alterations -DNA methylation. Detection of the presence of an additional methyl group on a DNA nucleobase, which may alter gene transcription */
    EpiAltDna,
    /** **epi-alt-hist**

Epigenetic Alterations - histone modifications. Detection of biochemical modifications covalently bound to the N-terminal tail of a histone protein. These modifications may alter chromatin compaction and gene expression */
    EpiAltHist,
    /** **fam-var-segr**

Familial variant segregation. Determining if a variant identified in an individual is present in other family members */
    FamVarSegr,
    /** **func-var**

Functional variation detection. Detection of sequence variants which may alter gene expression or gene product function when compared to the reference sequence */
    FuncVar,
    /** **gene-expression**

Gene expression profiling. Measurement and characterization of activity from all gene products */
    GeneExpression,
    /** **post-trans-mod**

Post-translational Modification Identification. Detection of biochemical modifications covalently bound to the amino acid monomers of a processed protein */
    PostTransMod,
    /** **snp**

SNP Detection. Determination of which nucleotide is base present at a known variable location of the genomic sequence */
    Snp,
    /** **str**

STR count. Quantification of the number of sequential microsatellite units in a repetitive sequence region */
    Str,
    /** **struc-var**

Structural variation detection. Detection of deletions, insertions, or rearrangements of DNA segments compared to the reference sequence */
    StrucVar,
}
impl ::core::str::FromStr for GenomicStudyType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alt-splc" => Ok(Self::AltSplc),
            "chromatin" => Ok(Self::Chromatin),
            "cnv" => Ok(Self::Cnv),
            "epi-alt-dna" => Ok(Self::EpiAltDna),
            "epi-alt-hist" => Ok(Self::EpiAltHist),
            "fam-var-segr" => Ok(Self::FamVarSegr),
            "func-var" => Ok(Self::FuncVar),
            "gene-expression" => Ok(Self::GeneExpression),
            "post-trans-mod" => Ok(Self::PostTransMod),
            "snp" => Ok(Self::Snp),
            "str" => Ok(Self::Str),
            "struc-var" => Ok(Self::StrucVar),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GenomicStudyType {
    fn as_ref(&self) -> &str {
        match self {
            Self::AltSplc => "alt-splc",
            Self::Chromatin => "chromatin",
            Self::Cnv => "cnv",
            Self::EpiAltDna => "epi-alt-dna",
            Self::EpiAltHist => "epi-alt-hist",
            Self::FamVarSegr => "fam-var-segr",
            Self::FuncVar => "func-var",
            Self::GeneExpression => "gene-expression",
            Self::PostTransMod => "post-trans-mod",
            Self::Snp => "snp",
            Self::Str => "str",
            Self::StrucVar => "struc-var",
        }
    }
}
impl ::std::fmt::Debug for GenomicStudyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GenomicStudyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GenomicStudyType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GenomicStudyType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GenomicStudyType> for Coding {
    fn from(code: GenomicStudyType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/genomicstudy-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GenomicStudyType> for CodeableConcept {
    fn from(code: GenomicStudyType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GoalLifecycleStatus](http://hl7.org/fhir/ValueSet/goal-status)**. Codes that reflect the current state of a goal and whether the goal is still being targeted.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GoalLifecycleStatus {
    /** **accepted**

Accepted. A proposed goal was accepted or acknowledged. */
    Accepted,
    /** **active**

Active. The goal is being sought actively. */
    Active,
    /** **cancelled**

Cancelled. The goal has been abandoned. */
    Cancelled,
    /** **completed**

Completed. The goal is no longer being sought. */
    Completed,
    /** **entered-in-error**

Entered in Error. The goal was entered in error and voided. */
    EnteredInError,
    /** **on-hold**

On Hold. The goal remains a long term objective but is no longer being actively pursued for a temporary period of time. */
    OnHold,
    /** **planned**

Planned. A goal is planned for this patient. */
    Planned,
    /** **proposed**

Proposed. A goal is proposed for this patient. */
    Proposed,
    /** **rejected**

Rejected. A proposed goal was rejected. */
    Rejected,
}
impl ::core::str::FromStr for GoalLifecycleStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accepted" => Ok(Self::Accepted),
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "on-hold" => Ok(Self::OnHold),
            "planned" => Ok(Self::Planned),
            "proposed" => Ok(Self::Proposed),
            "rejected" => Ok(Self::Rejected),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GoalLifecycleStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Accepted => "accepted",
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::OnHold => "on-hold",
            Self::Planned => "planned",
            Self::Proposed => "proposed",
            Self::Rejected => "rejected",
        }
    }
}
impl ::std::fmt::Debug for GoalLifecycleStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GoalLifecycleStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GoalLifecycleStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GoalLifecycleStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GoalLifecycleStatus> for Coding {
    fn from(code: GoalLifecycleStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/goal-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GoalLifecycleStatus> for CodeableConcept {
    fn from(code: GoalLifecycleStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GraphCompartmentRule](http://hl7.org/fhir/ValueSet/graph-compartment-rule)**. How a compartment must be linked.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GraphCompartmentRule {
    /** **custom**

Custom. The compartment rule is defined in the accompanying FHIRPath expression. */
    Custom,
    /** **different**

Different. The compartment must be different. */
    Different,
    /** **identical**

Identical. The compartment must be identical (the same literal reference). */
    Identical,
    /** **matching**

Matching. The compartment must be the same - the record must be about the same patient, but the reference may be different. */
    Matching,
}
impl ::core::str::FromStr for GraphCompartmentRule {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "custom" => Ok(Self::Custom),
            "different" => Ok(Self::Different),
            "identical" => Ok(Self::Identical),
            "matching" => Ok(Self::Matching),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GraphCompartmentRule {
    fn as_ref(&self) -> &str {
        match self {
            Self::Custom => "custom",
            Self::Different => "different",
            Self::Identical => "identical",
            Self::Matching => "matching",
        }
    }
}
impl ::std::fmt::Debug for GraphCompartmentRule {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GraphCompartmentRule {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GraphCompartmentRule {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GraphCompartmentRule {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GraphCompartmentRule> for Coding {
    fn from(code: GraphCompartmentRule) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/graph-compartment-rule".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GraphCompartmentRule> for CodeableConcept {
    fn from(code: GraphCompartmentRule) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GraphCompartmentUse](http://hl7.org/fhir/ValueSet/graph-compartment-use)**. Defines how a compartment rule is used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GraphCompartmentUse {
    /** **requires**

requires. This compartment rule is enforced on any relationships that meet the conditions. */
    Requires,
    /** **where**

Where. This compartment rule is a condition for whether the rule applies. */
    Where,
}
impl ::core::str::FromStr for GraphCompartmentUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "requires" => Ok(Self::Requires),
            "where" => Ok(Self::Where),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GraphCompartmentUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Requires => "requires",
            Self::Where => "where",
        }
    }
}
impl ::std::fmt::Debug for GraphCompartmentUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GraphCompartmentUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GraphCompartmentUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GraphCompartmentUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GraphCompartmentUse> for Coding {
    fn from(code: GraphCompartmentUse) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/graph-compartment-use".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GraphCompartmentUse> for CodeableConcept {
    fn from(code: GraphCompartmentUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GroupMembershipBasis](http://hl7.org/fhir/ValueSet/group-membership-basis)**. Basis for membership in a group\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GroupMembershipBasis {
    /** **definitional**

Definitional. The Group.characteristics specified are both necessary and sufficient to determine membership. All entities that meet the criteria are considered to be members of the group, whether referenced by the group or not. If members are present, they are individuals that happen to be known as meeting the Group.characteristics. The list cannot be presumed to be complete. */
    Definitional,
    /** **enumerated**

Enumerated. The Group.characteristics are necessary but not sufficient to determine membership. Membership is determined by being listed as one of the Group.member. */
    Enumerated,
}
impl ::core::str::FromStr for GroupMembershipBasis {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "definitional" => Ok(Self::Definitional),
            "enumerated" => Ok(Self::Enumerated),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GroupMembershipBasis {
    fn as_ref(&self) -> &str {
        match self {
            Self::Definitional => "definitional",
            Self::Enumerated => "enumerated",
        }
    }
}
impl ::std::fmt::Debug for GroupMembershipBasis {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GroupMembershipBasis {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GroupMembershipBasis {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GroupMembershipBasis {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GroupMembershipBasis> for Coding {
    fn from(code: GroupMembershipBasis) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/group-membership-basis".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GroupMembershipBasis> for CodeableConcept {
    fn from(code: GroupMembershipBasis) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GroupType](http://hl7.org/fhir/ValueSet/group-type)**. Types of resources that are part of group.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GroupType {
    /** **animal**

Animal. Group contains "animal" Patient resources. */
    Animal,
    /** **careteam**

CareTeam. Group contains CareTeam resources. */
    Careteam,
    /** **device**

Device. Group contains Device resources. */
    Device,
    /** **healthcareservice**

HealthcareService. Group contains HealthcareService resources. */
    Healthcareservice,
    /** **location**

Location. Group contains Location resources. */
    Location,
    /** **organization**

Organization. Group contains Organization resources. */
    Organization,
    /** **person**

Person. Group contains "person" Patient resources. */
    Person,
    /** **practitioner**

Practitioner. Group contains healthcare practitioner resources (Practitioner or PractitionerRole). */
    Practitioner,
    /** **relatedperson**

RelatedPerson. Group contains RelatedPerson resources. */
    Relatedperson,
    /** **specimen**

Specimen. Group contains Specimen resources. */
    Specimen,
}
impl ::core::str::FromStr for GroupType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "animal" => Ok(Self::Animal),
            "careteam" => Ok(Self::Careteam),
            "device" => Ok(Self::Device),
            "healthcareservice" => Ok(Self::Healthcareservice),
            "location" => Ok(Self::Location),
            "organization" => Ok(Self::Organization),
            "person" => Ok(Self::Person),
            "practitioner" => Ok(Self::Practitioner),
            "relatedperson" => Ok(Self::Relatedperson),
            "specimen" => Ok(Self::Specimen),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GroupType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Animal => "animal",
            Self::Careteam => "careteam",
            Self::Device => "device",
            Self::Healthcareservice => "healthcareservice",
            Self::Location => "location",
            Self::Organization => "organization",
            Self::Person => "person",
            Self::Practitioner => "practitioner",
            Self::Relatedperson => "relatedperson",
            Self::Specimen => "specimen",
        }
    }
}
impl ::std::fmt::Debug for GroupType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GroupType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GroupType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GroupType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GroupType> for Coding {
    fn from(code: GroupType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/group-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GroupType> for CodeableConcept {
    fn from(code: GroupType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GuidanceModuleCode](http://hl7.org/fhir/ValueSet/guidance-module-code)**. Example guidance module codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GuidanceModuleCode {
    /** **anc-cds**

ANC CDS. Clinical Decision Support for Antenatal Care. */
    AncCds,
    /** **bmi-calculator**

BMI Calculator. A Body Mass Index (BMI) calculator. */
    BmiCalculator,
    /** **chf-pathway**

CHF Pathway. Congestive Heart Failure Pathway */
    ChfPathway,
    /** **covid-19-severity**

COVID-19 Severity Score. A COVID-19 Severity Score Calculator. */
    Covid19Severity,
    /** **mme-calculator**

MME Calculator. A Morphine Milligram Equivalent (MME) calculator. */
    MmeCalculator,
    /** **opioid-cds**

Opioid CDS. Clinical Decision Support for Opioid Prescribing. */
    OpioidCds,
}
impl ::core::str::FromStr for GuidanceModuleCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "anc-cds" => Ok(Self::AncCds),
            "bmi-calculator" => Ok(Self::BmiCalculator),
            "chf-pathway" => Ok(Self::ChfPathway),
            "covid-19-severity" => Ok(Self::Covid19Severity),
            "mme-calculator" => Ok(Self::MmeCalculator),
            "opioid-cds" => Ok(Self::OpioidCds),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GuidanceModuleCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::AncCds => "anc-cds",
            Self::BmiCalculator => "bmi-calculator",
            Self::ChfPathway => "chf-pathway",
            Self::Covid19Severity => "covid-19-severity",
            Self::MmeCalculator => "mme-calculator",
            Self::OpioidCds => "opioid-cds",
        }
    }
}
impl ::std::fmt::Debug for GuidanceModuleCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GuidanceModuleCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GuidanceModuleCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GuidanceModuleCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GuidanceModuleCode> for Coding {
    fn from(code: GuidanceModuleCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/guidance-module-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GuidanceModuleCode> for CodeableConcept {
    fn from(code: GuidanceModuleCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GuidanceResponseStatus](http://hl7.org/fhir/ValueSet/guidance-response-status)**. The status of a guidance response.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GuidanceResponseStatus {
    /** **data-requested**

Data Requested. The request was processed successfully, but more data may result in a more complete evaluation. */
    DataRequested,
    /** **data-required**

Data Required. The request was processed, but more data is required to complete the evaluation. */
    DataRequired,
    /** **entered-in-error**

Entered In Error. The response was entered in error. */
    EnteredInError,
    /** **failure**

Failure. The request was not processed successfully. */
    Failure,
    /** **in-progress**

In Progress. The request is currently being processed. */
    InProgress,
    /** **success**

Success. The request was processed successfully. */
    Success,
}
impl ::core::str::FromStr for GuidanceResponseStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "data-requested" => Ok(Self::DataRequested),
            "data-required" => Ok(Self::DataRequired),
            "entered-in-error" => Ok(Self::EnteredInError),
            "failure" => Ok(Self::Failure),
            "in-progress" => Ok(Self::InProgress),
            "success" => Ok(Self::Success),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GuidanceResponseStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::DataRequested => "data-requested",
            Self::DataRequired => "data-required",
            Self::EnteredInError => "entered-in-error",
            Self::Failure => "failure",
            Self::InProgress => "in-progress",
            Self::Success => "success",
        }
    }
}
impl ::std::fmt::Debug for GuidanceResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GuidanceResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GuidanceResponseStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GuidanceResponseStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GuidanceResponseStatus> for Coding {
    fn from(code: GuidanceResponseStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/guidance-response-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GuidanceResponseStatus> for CodeableConcept {
    fn from(code: GuidanceResponseStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GuidePageGeneration](http://hl7.org/fhir/ValueSet/guide-page-generation)**. A code that indicates how the page is generated.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum GuidePageGeneration {
    /** **generated**

Generated. Page will be generated by the publication process - no source to bring across. */
    Generated,
    /** **html**

HTML. Page is proper xhtml with no templating.  Will be brought across unchanged for standard post-processing. */
    Html,
    /** **markdown**

Markdown. Page is markdown with templating.  Will use the template to create a file that imports the markdown file prior to post-processing. */
    Markdown,
    /** **xml**

XML. Page is xml with templating.  Will use the template to create a file that imports the source file and run the nominated XSLT transform (see parameters) if present prior to post-processing. */
    Xml,
}
impl ::core::str::FromStr for GuidePageGeneration {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "generated" => Ok(Self::Generated),
            "html" => Ok(Self::Html),
            "markdown" => Ok(Self::Markdown),
            "xml" => Ok(Self::Xml),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for GuidePageGeneration {
    fn as_ref(&self) -> &str {
        match self {
            Self::Generated => "generated",
            Self::Html => "html",
            Self::Markdown => "markdown",
            Self::Xml => "xml",
        }
    }
}
impl ::std::fmt::Debug for GuidePageGeneration {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GuidePageGeneration {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GuidePageGeneration {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GuidePageGeneration {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GuidePageGeneration> for Coding {
    fn from(code: GuidePageGeneration) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/guide-page-generation".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GuidePageGeneration> for CodeableConcept {
    fn from(code: GuidePageGeneration) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[GuideParameterCode](http://hl7.org/fhir/guide-parameter-code)**. GuideParameterCode\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum GuideParameterCode {
    /** **apply**

Apply Metadata Value. If the value of this string 0..* parameter is one of the metadata fields then all conformance resources will have any specified [Resource].[field] overwritten with the ImplementationGuide.[field], where field is one of: version, date, status, publisher, contact, copyright, experimental, jurisdiction, useContext. */
    Apply,
    /** **expansion-parameter**

Expansion Profile. The value of this string 0..* parameter is a parameter (name=value) when expanding value sets for this implementation guide. This is particularly used to specify the versions of published terminologies such as SNOMED CT. */
    ExpansionParameter,
    /** **generate-json**

Generate JSON. The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in JSON format. If not present, the Publication Tool decides whether to generate JSON. */
    GenerateJson,
    /** **generate-turtle**

Generate Turtle. The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in Turtle format. If not present, the Publication Tool decides whether to generate Turtle. */
    GenerateTurtle,
    /** **generate-xml**

Generate XML. The value of this boolean 0..1 parameter specifies whether the IG publisher creates examples in XML format. If not present, the Publication Tool decides whether to generate XML. */
    GenerateXml,
    /** **html-template**

HTML Template. The value of this string singleton parameter is the name of the file to use as the builder template for each generated page (see templating). */
    HtmlTemplate,
    /** **path-pages**

Pages Path. The value of this string 0..1 parameter is a subfolder of the build context's location that contains files that are part of the html content processed by the builder. */
    PathPages,
    /** **path-resource**

Resource Path. The value of this string 0..* parameter is a subfolder of the build context's location that is to be scanned to load resources. Scope is (if present) a particular resource type. */
    PathResource,
    /** **path-tx-cache**

Terminology Cache Path. The value of this string 0..1 parameter is a subfolder of the build context's location that is used as the terminology cache. If this is not present, the terminology cache is on the local system, not under version control. */
    PathTxCache,
    /** **rule-broken-links**

Broken Links Rule. The value of this string 0..1 parameter is either "warning" or "error" (default = "error"). If the value is "warning" then IG build tools allow the IG to be considered successfully build even when there is no internal broken links. */
    RuleBrokenLinks,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for GuideParameterCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "apply" => Ok(Self::Apply),
            "expansion-parameter" => Ok(Self::ExpansionParameter),
            "generate-json" => Ok(Self::GenerateJson),
            "generate-turtle" => Ok(Self::GenerateTurtle),
            "generate-xml" => Ok(Self::GenerateXml),
            "html-template" => Ok(Self::HtmlTemplate),
            "path-pages" => Ok(Self::PathPages),
            "path-resource" => Ok(Self::PathResource),
            "path-tx-cache" => Ok(Self::PathTxCache),
            "rule-broken-links" => Ok(Self::RuleBrokenLinks),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for GuideParameterCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Apply => "apply",
            Self::ExpansionParameter => "expansion-parameter",
            Self::GenerateJson => "generate-json",
            Self::GenerateTurtle => "generate-turtle",
            Self::GenerateXml => "generate-xml",
            Self::HtmlTemplate => "html-template",
            Self::PathPages => "path-pages",
            Self::PathResource => "path-resource",
            Self::PathTxCache => "path-tx-cache",
            Self::RuleBrokenLinks => "rule-broken-links",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for GuideParameterCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for GuideParameterCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for GuideParameterCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for GuideParameterCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<GuideParameterCode> for Coding {
    fn from(code: GuideParameterCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/guide-parameter-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<GuideParameterCode> for CodeableConcept {
    fn from(code: GuideParameterCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[HTTPVerb](http://hl7.org/fhir/ValueSet/http-verb)**. HTTP verbs (in the HTTP command line). See [HTTP rfc](https://tools.ietf.org/html/rfc7231) for details.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum HTTPVerb {
    /** **DELETE**

DELETE. HTTP DELETE Command. */
    Delete,
    /** **GET**

GET. HTTP GET Command. */
    Get,
    /** **HEAD**

HEAD. HTTP HEAD Command. */
    Head,
    /** **PATCH**

PATCH. HTTP PATCH Command. */
    Patch,
    /** **POST**

POST. HTTP POST Command. */
    Post,
    /** **PUT**

PUT. HTTP PUT Command. */
    Put,
}
impl ::core::str::FromStr for HTTPVerb {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "DELETE" => Ok(Self::Delete),
            "GET" => Ok(Self::Get),
            "HEAD" => Ok(Self::Head),
            "PATCH" => Ok(Self::Patch),
            "POST" => Ok(Self::Post),
            "PUT" => Ok(Self::Put),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for HTTPVerb {
    fn as_ref(&self) -> &str {
        match self {
            Self::Delete => "DELETE",
            Self::Get => "GET",
            Self::Head => "HEAD",
            Self::Patch => "PATCH",
            Self::Post => "POST",
            Self::Put => "PUT",
        }
    }
}
impl ::std::fmt::Debug for HTTPVerb {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for HTTPVerb {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for HTTPVerb {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for HTTPVerb {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<HTTPVerb> for Coding {
    fn from(code: HTTPVerb) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/http-verb".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<HTTPVerb> for CodeableConcept {
    fn from(code: HTTPVerb) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ICD10ProcedureCodes](http://hl7.org/fhir/sid/ex-icd-10-procedures)**. This value set includes sample ICD-10 Procedure codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ICD10ProcedureCodes {
    /** **123001**

PROC-1. Procedure 1 */
    N123001,
    /** **123002**

PROC-2. Procedure 2 */
    N123002,
    /** **123003**

PROC-3. Procedure 3 */
    N123003,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ICD10ProcedureCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "123001" => Ok(Self::N123001),
            "123002" => Ok(Self::N123002),
            "123003" => Ok(Self::N123003),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ICD10ProcedureCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::N123001 => "123001",
            Self::N123002 => "123002",
            Self::N123003 => "123003",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ICD10ProcedureCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ICD10ProcedureCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ICD10ProcedureCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ICD10ProcedureCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ICD10ProcedureCodes> for Coding {
    fn from(code: ICD10ProcedureCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/sid/ex-icd-10-procedures".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ICD10ProcedureCodes> for CodeableConcept {
    fn from(code: ICD10ProcedureCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IdentifierUse](http://hl7.org/fhir/ValueSet/identifier-use)**. Identifies the purpose for this identifier, if known .\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IdentifierUse {
    /** **official**

Official. The identifier considered to be most trusted for the identification of this item. Sometimes also known as "primary" and "main". The determination of "official" is subjective and implementation guides often provide additional guidelines for use. */
    Official,
    /** **old**

Old. The identifier id no longer considered valid, but may be relevant for search purposes.  E.g. Changes to identifier schemes, account merges, etc. */
    Old,
    /** **secondary**

Secondary. An identifier that was assigned in secondary use - it serves to identify the object in a relative context, but cannot be consistently assigned to the same object again in a different context. */
    Secondary,
    /** **temp**

Temp. A temporary identifier. */
    Temp,
    /** **usual**

Usual. The identifier recommended for display and use in real-world interactions which should be used when such identifier is different from the "official" identifier. */
    Usual,
}
impl ::core::str::FromStr for IdentifierUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "official" => Ok(Self::Official),
            "old" => Ok(Self::Old),
            "secondary" => Ok(Self::Secondary),
            "temp" => Ok(Self::Temp),
            "usual" => Ok(Self::Usual),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IdentifierUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Official => "official",
            Self::Old => "old",
            Self::Secondary => "secondary",
            Self::Temp => "temp",
            Self::Usual => "usual",
        }
    }
}
impl ::std::fmt::Debug for IdentifierUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IdentifierUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IdentifierUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IdentifierUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IdentifierUse> for Coding {
    fn from(code: IdentifierUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/identifier-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IdentifierUse> for CodeableConcept {
    fn from(code: IdentifierUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IdentityAssuranceLevel](http://hl7.org/fhir/ValueSet/identity-assuranceLevel)**. The level of confidence that this link represents the same actual person, based on NIST Authentication Levels.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IdentityAssuranceLevel {
    /** **level1**

Level 1. Little or no confidence in the asserted identity's accuracy. */
    Level1,
    /** **level2**

Level 2. Some confidence in the asserted identity's accuracy. */
    Level2,
    /** **level3**

Level 3. High confidence in the asserted identity's accuracy. */
    Level3,
    /** **level4**

Level 4. Very high confidence in the asserted identity's accuracy. */
    Level4,
}
impl ::core::str::FromStr for IdentityAssuranceLevel {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "level1" => Ok(Self::Level1),
            "level2" => Ok(Self::Level2),
            "level3" => Ok(Self::Level3),
            "level4" => Ok(Self::Level4),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IdentityAssuranceLevel {
    fn as_ref(&self) -> &str {
        match self {
            Self::Level1 => "level1",
            Self::Level2 => "level2",
            Self::Level3 => "level3",
            Self::Level4 => "level4",
        }
    }
}
impl ::std::fmt::Debug for IdentityAssuranceLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IdentityAssuranceLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IdentityAssuranceLevel {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IdentityAssuranceLevel {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IdentityAssuranceLevel> for Coding {
    fn from(code: IdentityAssuranceLevel) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/identity-assuranceLevel".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IdentityAssuranceLevel> for CodeableConcept {
    fn from(code: IdentityAssuranceLevel) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ImagingSelection2DGraphicType](http://hl7.org/fhir/ValueSet/imagingselection-2dgraphictype)**. The type of coordinates describing a 2D image region.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ImagingSelection2DGraphicType {
    /** **circle**

CIRCLE. Two points shall be present; the first point is to be interpreted as the center and the second point as a point on the circumference of a circle, some form of implementation dependent representation of which is to be drawn. */
    Circle,
    /** **ellipse**

ELLIPSE. An ellipse defined by four (x,y) pairs, the first two pairs specifying the endpoints of the major axis and the second two pairs specifying the endpoints of the minor axis. */
    Ellipse,
    /** **interpolated**

INTERPOLATED. An n-tuple list of (x,y) pair end points between which some form of implementation dependent curved lines are to be drawn. The rendered line shall pass through all the specified points. */
    Interpolated,
    /** **point**

POINT. A single location denoted by a single (x,y) pair. */
    Point,
    /** **polyline**

POLYLINE. A series of connected line segments with ordered vertices denoted by (x,y) triplets; the points need not be coplanar. */
    Polyline,
}
impl ::core::str::FromStr for ImagingSelection2DGraphicType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "circle" => Ok(Self::Circle),
            "ellipse" => Ok(Self::Ellipse),
            "interpolated" => Ok(Self::Interpolated),
            "point" => Ok(Self::Point),
            "polyline" => Ok(Self::Polyline),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ImagingSelection2DGraphicType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Circle => "circle",
            Self::Ellipse => "ellipse",
            Self::Interpolated => "interpolated",
            Self::Point => "point",
            Self::Polyline => "polyline",
        }
    }
}
impl ::std::fmt::Debug for ImagingSelection2DGraphicType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ImagingSelection2DGraphicType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ImagingSelection2DGraphicType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ImagingSelection2DGraphicType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ImagingSelection2DGraphicType> for Coding {
    fn from(code: ImagingSelection2DGraphicType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/imagingselection-2dgraphictype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ImagingSelection2DGraphicType> for CodeableConcept {
    fn from(code: ImagingSelection2DGraphicType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ImagingSelection3DGraphicType](http://hl7.org/fhir/ValueSet/imagingselection-3dgraphictype)**. The type of coordinates describing an image region.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ImagingSelection3DGraphicType {
    /** **ellipse**

ELLIPSE. an ellipse defined by four (x,y,z) triplets, the first two triplets specifying the endpoints of the major axis and the second two triplets specifying the endpoints of the minor axis. */
    Ellipse,
    /** **ellipsoid**

ELLIPSOID. a three-dimensional geometric surface whose plane sections are either ellipses or circles and contains three intersecting orthogonal axes, "a", "b", and "c"; the ellipsoid is defined by six (x,y,z) triplets, the first and second triplets specifying the endpoints of axis "a", the third and fourth triplets specifying the endpoints of axis "b", and the fifth and sixth triplets specifying the endpoints of axis "c". */
    Ellipsoid,
    /** **multipoint**

MULTIPOINT. multiple locations each denoted by an (x,y,z) triplet; the points need not be coplanar. */
    Multipoint,
    /** **point**

POINT. A single location denoted by a single (x,y,z) triplet. */
    Point,
    /** **polygon**

POLYGON. a series of connected line segments with ordered vertices denoted by (x,y,z) triplets, where the first and last vertices shall be the same forming a polygon; the points shall be coplanar. */
    Polygon,
    /** **polyline**

POLYLINE. a series of connected line segments with ordered vertices denoted by (x,y,z) triplets; the points need not be coplanar. */
    Polyline,
}
impl ::core::str::FromStr for ImagingSelection3DGraphicType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ellipse" => Ok(Self::Ellipse),
            "ellipsoid" => Ok(Self::Ellipsoid),
            "multipoint" => Ok(Self::Multipoint),
            "point" => Ok(Self::Point),
            "polygon" => Ok(Self::Polygon),
            "polyline" => Ok(Self::Polyline),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ImagingSelection3DGraphicType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ellipse => "ellipse",
            Self::Ellipsoid => "ellipsoid",
            Self::Multipoint => "multipoint",
            Self::Point => "point",
            Self::Polygon => "polygon",
            Self::Polyline => "polyline",
        }
    }
}
impl ::std::fmt::Debug for ImagingSelection3DGraphicType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ImagingSelection3DGraphicType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ImagingSelection3DGraphicType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ImagingSelection3DGraphicType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ImagingSelection3DGraphicType> for Coding {
    fn from(code: ImagingSelection3DGraphicType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/imagingselection-3dgraphictype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ImagingSelection3DGraphicType> for CodeableConcept {
    fn from(code: ImagingSelection3DGraphicType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ImagingSelectionStatus](http://hl7.org/fhir/ValueSet/imagingselection-status)**. The status of the ImagingSelection.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ImagingSelectionStatus {
    /** **available**

Available. The selected resources are available.. */
    Available,
    /** **entered-in-error**

Entered in Error. The imaging selection has been withdrawn following a release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **unknown**

Unknown. The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for ImagingSelectionStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "entered-in-error" => Ok(Self::EnteredInError),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ImagingSelectionStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::EnteredInError => "entered-in-error",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for ImagingSelectionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ImagingSelectionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ImagingSelectionStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ImagingSelectionStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ImagingSelectionStatus> for Coding {
    fn from(code: ImagingSelectionStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/imagingselection-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ImagingSelectionStatus> for CodeableConcept {
    fn from(code: ImagingSelectionStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ImagingStudyStatus](http://hl7.org/fhir/ValueSet/imagingstudy-status)**. The status of the ImagingStudy.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ImagingStudyStatus {
    /** **available**

Available. At least one instance has been associated with this imaging study. */
    Available,
    /** **cancelled**

Cancelled. The imaging study is unavailable because the imaging study was not started or not completed (also sometimes called "aborted"). */
    Cancelled,
    /** **entered-in-error**

Entered in Error. The imaging study has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **registered**

Registered. The existence of the imaging study is registered, but there is nothing yet available. */
    Registered,
    /** **unknown**

Unknown. The system does not know which of the status values currently applies for this request. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for ImagingStudyStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "cancelled" => Ok(Self::Cancelled),
            "entered-in-error" => Ok(Self::EnteredInError),
            "registered" => Ok(Self::Registered),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ImagingStudyStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::Cancelled => "cancelled",
            Self::EnteredInError => "entered-in-error",
            Self::Registered => "registered",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for ImagingStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ImagingStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ImagingStudyStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ImagingStudyStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ImagingStudyStatus> for Coding {
    fn from(code: ImagingStudyStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/imagingstudy-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ImagingStudyStatus> for CodeableConcept {
    fn from(code: ImagingStudyStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[Indicator](http://hl7.org/fhir/ValueSet/cdshooks-indicator)**. This codesystem captures the indicator codes defined by the CDS Hooks specification. The indicator is included as an element of the cards in a CDS Hooks response and conveys the urgency and/or importance of the information in each card. See [Card Attributes](https://cds-hooks.hl7.org/1.0/#card-attributes) in the CDS Hooks specification for more information.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum Indicator {
    /** **critical**

Critical. The response is critical and indicates that it contains information or activities that have high urgency and importance that should be immediately addressed */
    Critical,
    /** **info**

Information. The response is informational and indicates that it contains additional information or relevant guidance that may be of interest */
    Info,
    /** **warning**

Warning. The response is a warning and indicates that it contains urgent or highly relevant information that should be considered */
    Warning,
}
impl ::core::str::FromStr for Indicator {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "critical" => Ok(Self::Critical),
            "info" => Ok(Self::Info),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for Indicator {
    fn as_ref(&self) -> &str {
        match self {
            Self::Critical => "critical",
            Self::Info => "info",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for Indicator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for Indicator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for Indicator {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for Indicator {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<Indicator> for Coding {
    fn from(code: Indicator) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/cdshooks-indicator".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<Indicator> for CodeableConcept {
    fn from(code: Indicator) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IngredientFunction](http://hl7.org/fhir/ValueSet/ingredient-function)**. A classification of the ingredient identifying its precise purpose(s) in the drug product (beyond e.g. active/inactive).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IngredientFunction {
    /** **AlkalizingAgent**

Alkalizing Agent. */
    AlkalizingAgent,
    /** **Antioxidant**

Antioxidant. */
    Antioxidant,
}
impl ::core::str::FromStr for IngredientFunction {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "AlkalizingAgent" => Ok(Self::AlkalizingAgent),
            "Antioxidant" => Ok(Self::Antioxidant),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IngredientFunction {
    fn as_ref(&self) -> &str {
        match self {
            Self::AlkalizingAgent => "AlkalizingAgent",
            Self::Antioxidant => "Antioxidant",
        }
    }
}
impl ::std::fmt::Debug for IngredientFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IngredientFunction {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IngredientFunction {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IngredientFunction {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IngredientFunction> for Coding {
    fn from(code: IngredientFunction) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/ingredient-function".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IngredientFunction> for CodeableConcept {
    fn from(code: IngredientFunction) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IngredientManufacturerRole](http://hl7.org/fhir/ValueSet/ingredient-manufacturer-role)**. The way in which this manufacturer is associated with the ingredient. For example whether it is a possible one (others allowed), or an exclusive authorized one for this ingredient. Note that this is not the manufacturing process role\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IngredientManufacturerRole {
    /** **actual**

Manufacturer actually makes this particular ingredient. */
    Actual,
    /** **allowed**

Manufacturer is specifically allowed for this ingredient. */
    Allowed,
    /** **possible**

Manufacturer is known to make this ingredient in general. */
    Possible,
}
impl ::core::str::FromStr for IngredientManufacturerRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "actual" => Ok(Self::Actual),
            "allowed" => Ok(Self::Allowed),
            "possible" => Ok(Self::Possible),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IngredientManufacturerRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Actual => "actual",
            Self::Allowed => "allowed",
            Self::Possible => "possible",
        }
    }
}
impl ::std::fmt::Debug for IngredientManufacturerRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IngredientManufacturerRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IngredientManufacturerRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IngredientManufacturerRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IngredientManufacturerRole> for Coding {
    fn from(code: IngredientManufacturerRole) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/ingredient-manufacturer-role".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IngredientManufacturerRole> for CodeableConcept {
    fn from(code: IngredientManufacturerRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IngredientRole](http://hl7.org/fhir/ValueSet/ingredient-role)**. A classification of the ingredient identifying its purpose within the product, e.g. active, inactive.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IngredientRole {
    /** **100000072072**

Active. */
    N100000072072,
    /** **100000072073**

Adjuvant. */
    N100000072073,
    /** **100000072082**

Excipient. */
    N100000072082,
    /** **100000136065**

Starting material for excipient. */
    N100000136065,
    /** **100000136066**

Solvent / Diluent. */
    N100000136066,
    /** **100000136178**

Raw materials used in the manufacture of the product. */
    N100000136178,
    /** **100000136179**

Starting material for active substance. */
    N100000136179,
    /** **100000136561**

Overage. */
    N100000136561,
    /** **200000003427**

bioenhancer. */
    N200000003427,
}
impl ::core::str::FromStr for IngredientRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000072072" => Ok(Self::N100000072072),
            "100000072073" => Ok(Self::N100000072073),
            "100000072082" => Ok(Self::N100000072082),
            "100000136065" => Ok(Self::N100000136065),
            "100000136066" => Ok(Self::N100000136066),
            "100000136178" => Ok(Self::N100000136178),
            "100000136179" => Ok(Self::N100000136179),
            "100000136561" => Ok(Self::N100000136561),
            "200000003427" => Ok(Self::N200000003427),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IngredientRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000072072 => "100000072072",
            Self::N100000072073 => "100000072073",
            Self::N100000072082 => "100000072082",
            Self::N100000136065 => "100000136065",
            Self::N100000136066 => "100000136066",
            Self::N100000136178 => "100000136178",
            Self::N100000136179 => "100000136179",
            Self::N100000136561 => "100000136561",
            Self::N200000003427 => "200000003427",
        }
    }
}
impl ::std::fmt::Debug for IngredientRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IngredientRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IngredientRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IngredientRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IngredientRole> for Coding {
    fn from(code: IngredientRole) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/ingredient-role".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IngredientRole> for CodeableConcept {
    fn from(code: IngredientRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InteractionIncidence](http://hl7.org/fhir/ValueSet/interaction-incidence)**. A categorisation for a frequency of occurence of an undesirable effect.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InteractionIncidence {
    /** **Observed**

Observed. */
    Observed,
    /** **Theoretical**

Theoretical. */
    Theoretical,
}
impl ::core::str::FromStr for InteractionIncidence {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Observed" => Ok(Self::Observed),
            "Theoretical" => Ok(Self::Theoretical),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InteractionIncidence {
    fn as_ref(&self) -> &str {
        match self {
            Self::Observed => "Observed",
            Self::Theoretical => "Theoretical",
        }
    }
}
impl ::std::fmt::Debug for InteractionIncidence {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InteractionIncidence {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InteractionIncidence {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InteractionIncidence {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InteractionIncidence> for Coding {
    fn from(code: InteractionIncidence) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/interaction-incidence".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InteractionIncidence> for CodeableConcept {
    fn from(code: InteractionIncidence) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InteractionType](http://hl7.org/fhir/ValueSet/interaction-type)**. A categorisation for an interaction between two substances.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InteractionType {
    /** **drug-drug**

drug to drug interaction. */
    DrugDrug,
    /** **drug-food**

drug to food interaction. */
    DrugFood,
    /** **drug-test**

drug to laboratory test interaction. */
    DrugTest,
    /** **other**

other interaction. */
    Other,
}
impl ::core::str::FromStr for InteractionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "drug-drug" => Ok(Self::DrugDrug),
            "drug-food" => Ok(Self::DrugFood),
            "drug-test" => Ok(Self::DrugTest),
            "other" => Ok(Self::Other),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InteractionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::DrugDrug => "drug-drug",
            Self::DrugFood => "drug-food",
            Self::DrugTest => "drug-test",
            Self::Other => "other",
        }
    }
}
impl ::std::fmt::Debug for InteractionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InteractionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InteractionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InteractionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InteractionType> for Coding {
    fn from(code: InteractionType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/interaction-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InteractionType> for CodeableConcept {
    fn from(code: InteractionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InventoryCountType](http://hl7.org/fhir/ValueSet/inventoryreport-counttype)**. The type of count.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InventoryCountType {
    /** **difference**

Difference. The inventory report is about the difference between a previous count and a current count, i.e. it represents the items that have been added/subtracted from inventory. */
    Difference,
    /** **snapshot**

Snapshot. The inventory report is a current absolute snapshot, i.e. it represents the quantities at hand. */
    Snapshot,
}
impl ::core::str::FromStr for InventoryCountType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "difference" => Ok(Self::Difference),
            "snapshot" => Ok(Self::Snapshot),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InventoryCountType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Difference => "difference",
            Self::Snapshot => "snapshot",
        }
    }
}
impl ::std::fmt::Debug for InventoryCountType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InventoryCountType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InventoryCountType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InventoryCountType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InventoryCountType> for Coding {
    fn from(code: InventoryCountType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/inventoryreport-counttype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InventoryCountType> for CodeableConcept {
    fn from(code: InventoryCountType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InventoryItemNameType](http://hl7.org/fhir/ValueSet/inventoryitem-nametype)**. InventoryItem Name Type\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InventoryItemNameType {
    /** **alias**

Alias. An alias or common name for the item. */
    Alias,
    /** **original-name**

Original Name. The original name of the item. */
    OriginalName,
    /** **preferred**

Preferred. The preferred name of the item. */
    Preferred,
    /** **trade-name**

Trade Name. The official trade name of the item. */
    TradeName,
}
impl ::core::str::FromStr for InventoryItemNameType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alias" => Ok(Self::Alias),
            "original-name" => Ok(Self::OriginalName),
            "preferred" => Ok(Self::Preferred),
            "trade-name" => Ok(Self::TradeName),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InventoryItemNameType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alias => "alias",
            Self::OriginalName => "original-name",
            Self::Preferred => "preferred",
            Self::TradeName => "trade-name",
        }
    }
}
impl ::std::fmt::Debug for InventoryItemNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InventoryItemNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InventoryItemNameType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InventoryItemNameType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InventoryItemNameType> for Coding {
    fn from(code: InventoryItemNameType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/inventoryitem-nametype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InventoryItemNameType> for CodeableConcept {
    fn from(code: InventoryItemNameType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InventoryItemStatus](http://hl7.org/fhir/ValueSet/inventoryitem-status)**. InventoryItem Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InventoryItemStatus {
    /** **active**

Active. The item is active and can be referenced. */
    Active,
    /** **entered-in-error**

Entered in Error. The item record was entered in error. */
    EnteredInError,
    /** **inactive**

Inactive. The item is presently inactive - there may be references to it but the item is not expected to be used. */
    Inactive,
    /** **unknown**

Unknown. The item status has not been determined. */
    Unknown,
}
impl ::core::str::FromStr for InventoryItemStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InventoryItemStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for InventoryItemStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InventoryItemStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InventoryItemStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InventoryItemStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InventoryItemStatus> for Coding {
    fn from(code: InventoryItemStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/inventoryitem-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InventoryItemStatus> for CodeableConcept {
    fn from(code: InventoryItemStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InventoryReportStatus](http://hl7.org/fhir/ValueSet/inventoryreport-status)**. The status of the InventoryReport.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InventoryReportStatus {
    /** **active**

Active. This report is submitted as current. */
    Active,
    /** **draft**

Draft. The existence of the report is registered, but it is still without content or only some preliminary content. */
    Draft,
    /** **entered-in-error**

Entered in Error. The report has been withdrawn following a previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. */
    EnteredInError,
    /** **requested**

Requested. The inventory report has been requested but there is no data available. */
    Requested,
}
impl ::core::str::FromStr for InventoryReportStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "requested" => Ok(Self::Requested),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InventoryReportStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Requested => "requested",
        }
    }
}
impl ::std::fmt::Debug for InventoryReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InventoryReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InventoryReportStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InventoryReportStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InventoryReportStatus> for Coding {
    fn from(code: InventoryReportStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/inventoryreport-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InventoryReportStatus> for CodeableConcept {
    fn from(code: InventoryReportStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[InvoiceStatus](http://hl7.org/fhir/ValueSet/invoice-status)**. Codes identifying the lifecycle stage of an Invoice.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum InvoiceStatus {
    /** **balanced**

balanced. the invoice has been balaced / completely paid. */
    Balanced,
    /** **cancelled**

cancelled. the invoice was cancelled. */
    Cancelled,
    /** **draft**

draft. the invoice has been prepared but not yet finalized. */
    Draft,
    /** **entered-in-error**

entered in error. the invoice was determined as entered in error before it was issued. */
    EnteredInError,
    /** **issued**

issued. the invoice has been finalized and sent to the recipient. */
    Issued,
}
impl ::core::str::FromStr for InvoiceStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "balanced" => Ok(Self::Balanced),
            "cancelled" => Ok(Self::Cancelled),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "issued" => Ok(Self::Issued),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for InvoiceStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Balanced => "balanced",
            Self::Cancelled => "cancelled",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Issued => "issued",
        }
    }
}
impl ::std::fmt::Debug for InvoiceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for InvoiceStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for InvoiceStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for InvoiceStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<InvoiceStatus> for Coding {
    fn from(code: InvoiceStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/invoice-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<InvoiceStatus> for CodeableConcept {
    fn from(code: InvoiceStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IssueSeverity](http://hl7.org/fhir/ValueSet/issue-severity)**. How the issue affects the success of the action.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IssueSeverity {
    /** **error**

Error. The issue is sufficiently important to cause the action to fail. */
    Error,
    /** **fatal**

Fatal. The issue caused the action to fail and no further checking could be performed. */
    Fatal,
    /** **information**

Information. The issue has no relation to the degree of success of the action. */
    Information,
    /** **success**

Operation Successful. The operation completed successfully. */
    Success,
    /** **warning**

Warning. The issue is not important enough to cause the action to fail but may cause it to be performed suboptimally or in a way that is not as desired. */
    Warning,
}
impl ::core::str::FromStr for IssueSeverity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "error" => Ok(Self::Error),
            "fatal" => Ok(Self::Fatal),
            "information" => Ok(Self::Information),
            "success" => Ok(Self::Success),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IssueSeverity {
    fn as_ref(&self) -> &str {
        match self {
            Self::Error => "error",
            Self::Fatal => "fatal",
            Self::Information => "information",
            Self::Success => "success",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for IssueSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IssueSeverity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IssueSeverity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IssueSeverity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IssueSeverity> for Coding {
    fn from(code: IssueSeverity) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/issue-severity".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IssueSeverity> for CodeableConcept {
    fn from(code: IssueSeverity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[IssueType](http://hl7.org/fhir/ValueSet/issue-type)**. A code that describes the type of issue.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum IssueType {
    /** **business-rule**

Business Rule Violation. The content/operation failed to pass some business rule and so could not proceed. */
    BusinessRule,
    /** **code-invalid**

Invalid Code. The code or system could not be understood, or it was not valid in the context of a particular ValueSet.code. */
    CodeInvalid,
    /** **conflict**

Edit Version Conflict. Content could not be accepted because of an edit conflict (i.e. version aware updates). (In a pure RESTful environment, this would be an HTTP 409 error, but this code may be used where the conflict is discovered further into the application architecture.). */
    Conflict,
    /** **deleted**

Deleted. The reference pointed to content (usually a resource) that has been deleted. */
    Deleted,
    /** **duplicate**

Duplicate. An attempt was made to create a duplicate record. */
    Duplicate,
    /** **exception**

Exception. An unexpected internal error has occurred. */
    Exception,
    /** **expired**

Session Expired. User session expired; a login may be required. */
    Expired,
    /** **extension**

Unacceptable Extension. An extension was found that was not acceptable, could not be resolved, or a modifierExtension was not recognized. */
    Extension,
    /** **forbidden**

Forbidden. The user does not have the rights to perform this action. */
    Forbidden,
    /** **incomplete**

Incomplete Results. Not all data sources typically accessed could be reached or responded in time, so the returned information might not be complete (applies to search interactions and some operations). */
    Incomplete,
    /** **informational**

Informational Note. A message unrelated to the processing success of the completed operation (examples of the latter include things like reminders of password expiry, system maintenance times, etc.). */
    Informational,
    /** **invalid**

Invalid Content. Content invalid against the specification or a profile. */
    Invalid,
    /** **invariant**

Validation rule failed. A content validation rule failed - e.g. a schematron rule. */
    Invariant,
    /** **limited-filter**

Limited Filter Application. Some search filters might not have applied on all results.  Data may have been included that does not meet all of the filters listed in the `self` `Bundle.link`. */
    LimitedFilter,
    /** **lock-error**

Lock Error. A resource/record locking failure (usually in an underlying database). */
    LockError,
    /** **login**

Login Required. The client needs to initiate an authentication process. */
    Login,
    /** **multiple-matches**

Multiple Matches. Multiple matching records were found when the operation required only one match. */
    MultipleMatches,
    /** **no-store**

No Store Available. The persistent store is unavailable; e.g. the database is down for maintenance or similar action, and the interaction or operation cannot be processed. */
    NoStore,
    /** **not-found**

Not Found. The reference provided was not found. In a pure RESTful environment, this would be an HTTP 404 error, but this code may be used where the content is not found further into the application architecture. */
    NotFound,
    /** **not-supported**

Content not supported. The interaction, operation, resource or profile is not supported. */
    NotSupported,
    /** **processing**

Processing Failure. Processing issues. These are expected to be final e.g. there is no point resubmitting the same content unchanged. */
    Processing,
    /** **required**

Required element missing. A required element is missing. */
    Required,
    /** **security**

Security Problem. An authentication/authorization/permissions issue of some kind. */
    Security,
    /** **structure**

Structural Issue. A structural issue in the content such as wrong namespace, unable to parse the content completely, invalid syntax, etc. */
    Structure,
    /** **success**

Operation Successful. The operation completed successfully. */
    Success,
    /** **suppressed**

Information  Suppressed. Some information was not or might not have been returned due to business rules, consent or privacy rules, or access permission constraints.  This information may be accessible through alternate processes. */
    Suppressed,
    /** **throttled**

Throttled. The system is not prepared to handle this request due to load management. */
    Throttled,
    /** **timeout**

Timeout. An internal timeout has occurred. */
    Timeout,
    /** **too-costly**

Operation Too Costly. The operation was stopped to protect server resources; e.g. a request for a value set expansion on all of SNOMED CT. */
    TooCostly,
    /** **too-long**

Content Too Long. Provided content is too long (typically, this is a denial of service protection type of error). */
    TooLong,
    /** **transient**

Transient Issue. Transient processing issues. The system receiving the message may be able to resubmit the same content once an underlying issue is resolved. */
    Transient,
    /** **unknown**

Unknown User. The user or system was not able to be authenticated (either there is no process, or the proferred token is unacceptable). */
    Unknown,
    /** **value**

Element value invalid. An element or header value is invalid. */
    Value,
}
impl ::core::str::FromStr for IssueType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "business-rule" => Ok(Self::BusinessRule),
            "code-invalid" => Ok(Self::CodeInvalid),
            "conflict" => Ok(Self::Conflict),
            "deleted" => Ok(Self::Deleted),
            "duplicate" => Ok(Self::Duplicate),
            "exception" => Ok(Self::Exception),
            "expired" => Ok(Self::Expired),
            "extension" => Ok(Self::Extension),
            "forbidden" => Ok(Self::Forbidden),
            "incomplete" => Ok(Self::Incomplete),
            "informational" => Ok(Self::Informational),
            "invalid" => Ok(Self::Invalid),
            "invariant" => Ok(Self::Invariant),
            "limited-filter" => Ok(Self::LimitedFilter),
            "lock-error" => Ok(Self::LockError),
            "login" => Ok(Self::Login),
            "multiple-matches" => Ok(Self::MultipleMatches),
            "no-store" => Ok(Self::NoStore),
            "not-found" => Ok(Self::NotFound),
            "not-supported" => Ok(Self::NotSupported),
            "processing" => Ok(Self::Processing),
            "required" => Ok(Self::Required),
            "security" => Ok(Self::Security),
            "structure" => Ok(Self::Structure),
            "success" => Ok(Self::Success),
            "suppressed" => Ok(Self::Suppressed),
            "throttled" => Ok(Self::Throttled),
            "timeout" => Ok(Self::Timeout),
            "too-costly" => Ok(Self::TooCostly),
            "too-long" => Ok(Self::TooLong),
            "transient" => Ok(Self::Transient),
            "unknown" => Ok(Self::Unknown),
            "value" => Ok(Self::Value),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for IssueType {
    fn as_ref(&self) -> &str {
        match self {
            Self::BusinessRule => "business-rule",
            Self::CodeInvalid => "code-invalid",
            Self::Conflict => "conflict",
            Self::Deleted => "deleted",
            Self::Duplicate => "duplicate",
            Self::Exception => "exception",
            Self::Expired => "expired",
            Self::Extension => "extension",
            Self::Forbidden => "forbidden",
            Self::Incomplete => "incomplete",
            Self::Informational => "informational",
            Self::Invalid => "invalid",
            Self::Invariant => "invariant",
            Self::LimitedFilter => "limited-filter",
            Self::LockError => "lock-error",
            Self::Login => "login",
            Self::MultipleMatches => "multiple-matches",
            Self::NoStore => "no-store",
            Self::NotFound => "not-found",
            Self::NotSupported => "not-supported",
            Self::Processing => "processing",
            Self::Required => "required",
            Self::Security => "security",
            Self::Structure => "structure",
            Self::Success => "success",
            Self::Suppressed => "suppressed",
            Self::Throttled => "throttled",
            Self::Timeout => "timeout",
            Self::TooCostly => "too-costly",
            Self::TooLong => "too-long",
            Self::Transient => "transient",
            Self::Unknown => "unknown",
            Self::Value => "value",
        }
    }
}
impl ::std::fmt::Debug for IssueType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for IssueType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for IssueType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for IssueType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<IssueType> for Coding {
    fn from(code: IssueType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/issue-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<IssueType> for CodeableConcept {
    fn from(code: IssueType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[Kind](http://hl7.org/fhir/ValueSet/coverage-kind)**. The nature of the Coverage details which convey who is paying potentially for health services.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum Kind {
    /** **insurance**

Insurance. The Coverage provides the identifiers and card-level details of an insurance policy. */
    Insurance,
    /** **other**

Other. Some other organization is paying for the service. */
    Other,
    /** **self-pay**

Self-pay. One or more persons and/or organizations are paying for the services rendered. */
    SelfPay,
}
impl ::core::str::FromStr for Kind {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "insurance" => Ok(Self::Insurance),
            "other" => Ok(Self::Other),
            "self-pay" => Ok(Self::SelfPay),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for Kind {
    fn as_ref(&self) -> &str {
        match self {
            Self::Insurance => "insurance",
            Self::Other => "other",
            Self::SelfPay => "self-pay",
        }
    }
}
impl ::std::fmt::Debug for Kind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for Kind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for Kind {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for Kind {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<Kind> for Coding {
    fn from(code: Kind) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/coverage-kind".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<Kind> for CodeableConcept {
    fn from(code: Kind) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[KnowledgeRepresentationLevel](http://hl7.org/fhir/uv/cpg/ValueSet/knowledge-representation-level)**. A knowledge representation level, narrative, semi-structured, structured, and executable\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum KnowledgeRepresentationLevel {
    /** **executable**

Executable. The knowledge is expressed in a way that is coded and interpretable by CDS systems using a variety of formats, affording direct executability, but potentially limited shareability. The knowledge is typically expressed focusing on a specific delivery method (modality), technology platform, and implementation environment. Knowledge at this level is typically built and developed by implementers working in specific technology platforms, for the purpose of implementation at a specific site, though affordances such as computable mappings and configuration capabilities can broaden the usability of the knowledge artifact. */
    Executable,
    /** **narrative**

Narrative. The knowledge is expressed as narrative text, affording broad shareability, but limited computability. The knowledge is typically expressed independent of delivery method (modality), technology platform, and implementation site. Knowledge at this level is typically authored by guideline developers for a broad range of purposes including communication of policy, synthesis of evidence, and dissemination of best-practices. */
    Narrative,
    /** **semi-structured**

Semi-Structured. The knowledge is expressed as organized text, often accompanied by diagrams such as flow charts and decision tables, affording broad shareability and moderate computability. The knowledge is typically expressed independent of delivery method (modality), technology platform, and implementation site. Knowledge at this level is typically authored by clinical domain experts for the purpose of communication the description of recommendations for implementation in various modalities. */
    SemiStructured,
    /** **structured**

Structured. The knowledge is expressed in a structured way that is interpretable by computer, including being coded using standard terminologies and specifications for the representation of structured content, affording broad shareability and high computability. The knowledge is typically expressed independent of delivery method (modality), technology platform, and implementation site. Knowledge at this level is typically authored by knowledge engineersto enable precise communication and validation of the recommendations. */
    Structured,
}
impl ::core::str::FromStr for KnowledgeRepresentationLevel {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "executable" => Ok(Self::Executable),
            "narrative" => Ok(Self::Narrative),
            "semi-structured" => Ok(Self::SemiStructured),
            "structured" => Ok(Self::Structured),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for KnowledgeRepresentationLevel {
    fn as_ref(&self) -> &str {
        match self {
            Self::Executable => "executable",
            Self::Narrative => "narrative",
            Self::SemiStructured => "semi-structured",
            Self::Structured => "structured",
        }
    }
}
impl ::std::fmt::Debug for KnowledgeRepresentationLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for KnowledgeRepresentationLevel {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for KnowledgeRepresentationLevel {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for KnowledgeRepresentationLevel {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<KnowledgeRepresentationLevel> for Coding {
    fn from(code: KnowledgeRepresentationLevel) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/uv/cpg/ValueSet/knowledge-representation-level"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<KnowledgeRepresentationLevel> for CodeableConcept {
    fn from(code: KnowledgeRepresentationLevel) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LegalStatusOfSupply](http://hl7.org/fhir/ValueSet/legal-status-of-supply)**. The prescription supply types appropriate to a medicinal product\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LegalStatusOfSupply {
    /** **100000072076**

Medicinal product not subject to medical prescription. */
    N100000072076,
    /** **100000072077**

Medicinal product on medical prescription for renewable or non-renewable delivery. */
    N100000072077,
    /** **100000072078**

Medicinal product subject to restricted medical prescription. */
    N100000072078,
    /** **100000072079**

Medicinal product on medical prescription for non-renewable delivery. */
    N100000072079,
    /** **100000072084**

Medicinal product subject to medical prescription. */
    N100000072084,
    /** **100000072085**

Medicinal product subject to special medical prescription. */
    N100000072085,
    /** **100000072086**

Medicinal product on medical prescription for renewable delivery. */
    N100000072086,
    /** **100000157313**

Medicinal product subject to special and restricted medical prescription. */
    N100000157313,
}
impl ::core::str::FromStr for LegalStatusOfSupply {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000072076" => Ok(Self::N100000072076),
            "100000072077" => Ok(Self::N100000072077),
            "100000072078" => Ok(Self::N100000072078),
            "100000072079" => Ok(Self::N100000072079),
            "100000072084" => Ok(Self::N100000072084),
            "100000072085" => Ok(Self::N100000072085),
            "100000072086" => Ok(Self::N100000072086),
            "100000157313" => Ok(Self::N100000157313),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LegalStatusOfSupply {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000072076 => "100000072076",
            Self::N100000072077 => "100000072077",
            Self::N100000072078 => "100000072078",
            Self::N100000072079 => "100000072079",
            Self::N100000072084 => "100000072084",
            Self::N100000072085 => "100000072085",
            Self::N100000072086 => "100000072086",
            Self::N100000157313 => "100000157313",
        }
    }
}
impl ::std::fmt::Debug for LegalStatusOfSupply {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LegalStatusOfSupply {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LegalStatusOfSupply {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LegalStatusOfSupply {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LegalStatusOfSupply> for Coding {
    fn from(code: LegalStatusOfSupply) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/legal-status-of-supply".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LegalStatusOfSupply> for CodeableConcept {
    fn from(code: LegalStatusOfSupply) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LinkRelationTypes](http://hl7.org/fhir/ValueSet/iana-link-relations)**. Link Relation Types defined at https://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LinkRelationTypes {
    /** **P3Pv1**

Refers to a P3P privacy policy for the context.. Refers to a P3P privacy policy for the context. */
    P3Pv1,
    /** **about**

Refers to a resource that is the subject of the link's context.. Refers to a resource that is the subject of the link's context. */
    About,
    /** **acl**

Asserts that the link target provides an access control description for the link context.. Asserts that the link target provides an access control description for the link context. */
    Acl,
    /** **alternate**

Refers to a substitute for this context. Refers to a substitute for this context */
    Alternate,
    /** **amphtml**

Used to reference alternative content that uses the AMP profile of the HTML format.. Used to reference alternative content that uses the AMP profile of the HTML format. */
    Amphtml,
    /** **appendix**

Refers to an appendix.. Refers to an appendix. */
    Appendix,
    /** **apple-touch-icon**

Refers to an icon for the context. Synonym for icon.. Refers to an icon for the context. Synonym for icon. */
    AppleTouchIcon,
    /** **apple-touch-startup-image**

Refers to a launch screen for the context.. Refers to a launch screen for the context. */
    AppleTouchStartupImage,
    /** **archives**

Refers to a collection of records, documents, or other
      materials of historical interest.. Refers to a collection of records, documents, or other
      materials of historical interest. */
    Archives,
    /** **author**

Refers to the context's author.. Refers to the context's author. */
    Author,
    /** **blocked-by**

Identifies the entity that blocks access to a resource
      following receipt of a legal demand.. Identifies the entity that blocks access to a resource
      following receipt of a legal demand. */
    BlockedBy,
    /** **bookmark**

Gives a permanent link to use for bookmarking purposes.. Gives a permanent link to use for bookmarking purposes. */
    Bookmark,
    /** **canonical**

Designates the preferred version of a resource (the IRI and its contents).. Designates the preferred version of a resource (the IRI and its contents). */
    Canonical,
    /** **chapter**

Refers to a chapter in a collection of resources.. Refers to a chapter in a collection of resources. */
    Chapter,
    /** **cite-as**

Indicates that the link target is preferred over the link context for the purpose of permanent citation.. Indicates that the link target is preferred over the link context for the purpose of permanent citation. */
    CiteAs,
    /** **collection**

The target IRI points to a resource which represents the collection resource for the context IRI.. The target IRI points to a resource which represents the collection resource for the context IRI. */
    Collection,
    /** **contents**

Refers to a table of contents.. Refers to a table of contents. */
    Contents,
    /** **convertedFrom**

The document linked to was later converted to the
      document that contains this link relation.  For example, an RFC can
      have a link to the Internet-Draft that became the RFC; in that case,
      the link relation would be "convertedFrom".. The document linked to was later converted to the
      document that contains this link relation.  For example, an RFC can
      have a link to the Internet-Draft that became the RFC; in that case,
      the link relation would be "convertedFrom". */
    ConvertedFrom,
    /** **copyright**

Refers to a copyright statement that applies to the
    link's context.. Refers to a copyright statement that applies to the
    link's context. */
    Copyright,
    /** **create-form**

The target IRI points to a resource where a submission form can be obtained.. The target IRI points to a resource where a submission form can be obtained. */
    CreateForm,
    /** **current**

Refers to a resource containing the most recent
      item(s) in a collection of resources.. Refers to a resource containing the most recent
      item(s) in a collection of resources. */
    Current,
    /** **describedby**

Refers to a resource providing information about the
      link's context.. Refers to a resource providing information about the
      link's context. */
    Describedby,
    /** **describes**

The relationship A 'describes' B asserts that
      resource A provides a description of resource B. There are no
      constraints on the format or representation of either A or B,
      neither are there any further constraints on either resource.. The relationship A 'describes' B asserts that
      resource A provides a description of resource B. There are no
      constraints on the format or representation of either A or B,
      neither are there any further constraints on either resource. */
    Describes,
    /** **disclosure**

Refers to a list of patent disclosures made with respect to
      material for which 'disclosure' relation is specified.. Refers to a list of patent disclosures made with respect to
      material for which 'disclosure' relation is specified. */
    Disclosure,
    /** **dns-prefetch**

Used to indicate an origin that will be used to fetch required
      resources for the link context, and that the user agent ought to resolve
      as early as possible.. Used to indicate an origin that will be used to fetch required
      resources for the link context, and that the user agent ought to resolve
      as early as possible. */
    DnsPrefetch,
    /** **duplicate**

Refers to a resource whose available representations
      are byte-for-byte identical with the corresponding representations of
      the context IRI.. Refers to a resource whose available representations
      are byte-for-byte identical with the corresponding representations of
      the context IRI. */
    Duplicate,
    /** **edit**

Refers to a resource that can be used to edit the
      link's context.. Refers to a resource that can be used to edit the
      link's context. */
    Edit,
    /** **edit-form**

The target IRI points to a resource where a submission form for
      editing associated resource can be obtained.. The target IRI points to a resource where a submission form for
      editing associated resource can be obtained. */
    EditForm,
    /** **edit-media**

Refers to a resource that can be used to edit media
      associated with the link's context.. Refers to a resource that can be used to edit media
      associated with the link's context. */
    EditMedia,
    /** **enclosure**

Identifies a related resource that is potentially
      large and might require special handling.. Identifies a related resource that is potentially
      large and might require special handling. */
    Enclosure,
    /** **external**

Refers to a resource that is not part of the same site as the current context.. Refers to a resource that is not part of the same site as the current context. */
    External,
    /** **first**

An IRI that refers to the furthest preceding resource
    in a series of resources.. An IRI that refers to the furthest preceding resource
    in a series of resources. */
    First,
    /** **glossary**

Refers to a glossary of terms.. Refers to a glossary of terms. */
    Glossary,
    /** **help**

Refers to context-sensitive help.. Refers to context-sensitive help. */
    Help,
    /** **hosts**

Refers to a resource hosted by the server indicated by
      the link context.. Refers to a resource hosted by the server indicated by
      the link context. */
    Hosts,
    /** **hub**

Refers to a hub that enables registration for
    notification of updates to the context.. Refers to a hub that enables registration for
    notification of updates to the context. */
    Hub,
    /** **icon**

Refers to an icon representing the link's context.. Refers to an icon representing the link's context. */
    Icon,
    /** **index**

Refers to an index.. Refers to an index. */
    Index,
    /** **intervalAfter**

refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource. refers to a resource associated with a time interval that ends before the beginning of the time interval associated with the context resource */
    IntervalAfter,
    /** **intervalBefore**

refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource */
    IntervalBefore,
    /** **intervalContains**

refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource */
    IntervalContains,
    /** **intervalDisjoint**

refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource. refers to a resource associated with a time interval that begins after the end of the time interval associated with the context resource, or ends before the beginning of the time interval associated with the context resource */
    IntervalDisjoint,
    /** **intervalDuring**

refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource */
    IntervalDuring,
    /** **intervalEquals**

refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource. refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource */
    IntervalEquals,
    /** **intervalFinishedBy**

refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins after the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource */
    IntervalFinishedBy,
    /** **intervalFinishes**

refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and whose end coincides with the end of the time interval associated with the context resource */
    IntervalFinishes,
    /** **intervalIn**

refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins before or is coincident with the beginning of the time interval associated with the context resource, and ends after or is coincident with the end of the time interval associated with the context resource */
    IntervalIn,
    /** **intervalMeets**

refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource. refers to a resource associated with a time interval whose beginning coincides with the end of the time interval associated with the context resource */
    IntervalMeets,
    /** **intervalMetBy**

refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource. refers to a resource associated with a time interval whose end coincides with the beginning of the time interval associated with the context resource */
    IntervalMetBy,
    /** **intervalOverlappedBy**

refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource. refers to a resource associated with a time interval that begins before the beginning of the time interval associated with the context resource, and ends after the beginning of the time interval associated with the context resource */
    IntervalOverlappedBy,
    /** **intervalOverlaps**

refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource. refers to a resource associated with a time interval that begins before the end of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource */
    IntervalOverlaps,
    /** **intervalStartedBy**

refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource. refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends before the end of the time interval associated with the context resource */
    IntervalStartedBy,
    /** **intervalStarts**

refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource. refers to a resource associated with a time interval whose beginning coincides with the beginning of the time interval associated with the context resource, and ends after the end of the time interval associated with the context resource */
    IntervalStarts,
    /** **item**

The target IRI points to a resource that is a member of the collection represented by the context IRI.. The target IRI points to a resource that is a member of the collection represented by the context IRI. */
    Item,
    /** **last**

An IRI that refers to the furthest following resource
      in a series of resources.. An IRI that refers to the furthest following resource
      in a series of resources. */
    Last,
    /** **latest-version**

Points to a resource containing the latest (e.g.,
      current) version of the context.. Points to a resource containing the latest (e.g.,
      current) version of the context. */
    LatestVersion,
    /** **license**

Refers to a license associated with this context.. Refers to a license associated with this context. */
    License,
    /** **linkset**

The link target of a link with the "linkset" relation
      type provides a set of links, including links in which the link
      context of the link participates.
    . The link target of a link with the "linkset" relation
      type provides a set of links, including links in which the link
      context of the link participates.
     */
    Linkset,
    /** **lrdd**

Refers to further information about the link's context,
      expressed as a LRDD ("Link-based Resource Descriptor Document")
      resource.  See  for information about
      processing this relation type in host-meta documents. When used
      elsewhere, it refers to additional links and other metadata.
      Multiple instances indicate additional LRDD resources. LRDD
      resources MUST have an "application/xrd+xml" representation, and
      MAY have others.. Refers to further information about the link's context,
      expressed as a LRDD ("Link-based Resource Descriptor Document")
      resource.  See  for information about
      processing this relation type in host-meta documents. When used
      elsewhere, it refers to additional links and other metadata.
      Multiple instances indicate additional LRDD resources. LRDD
      resources MUST have an "application/xrd+xml" representation, and
      MAY have others. */
    Lrdd,
    /** **manifest**

Links to a manifest file for the context.. Links to a manifest file for the context. */
    Manifest,
    /** **mask-icon**

Refers to a mask that can be applied to the icon for the context.. Refers to a mask that can be applied to the icon for the context. */
    MaskIcon,
    /** **media-feed**

Refers to a feed of personalised media recommendations relevant to the link context.. Refers to a feed of personalised media recommendations relevant to the link context. */
    MediaFeed,
    /** **memento**

The Target IRI points to a Memento, a fixed resource that will not change state anymore.. The Target IRI points to a Memento, a fixed resource that will not change state anymore. */
    Memento,
    /** **micropub**

Links to the context's Micropub endpoint.. Links to the context's Micropub endpoint. */
    Micropub,
    /** **modulepreload**

Refers to a module that the user agent is to preemptively fetch and store for use in the current context.. Refers to a module that the user agent is to preemptively fetch and store for use in the current context. */
    Modulepreload,
    /** **monitor**

Refers to a resource that can be used to monitor changes in an HTTP resource.
    . Refers to a resource that can be used to monitor changes in an HTTP resource.
     */
    Monitor,
    /** **monitor-group**

Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.
    . Refers to a resource that can be used to monitor changes in a specified group of HTTP resources.
     */
    MonitorGroup,
    /** **next**

Indicates that the link's context is a part of a series, and
      that the next in the series is the link target.
    . Indicates that the link's context is a part of a series, and
      that the next in the series is the link target.
     */
    Next,
    /** **next-archive**

Refers to the immediately following archive resource.. Refers to the immediately following archive resource. */
    NextArchive,
    /** **nofollow**

Indicates that the context’s original author or publisher does not endorse the link target.. Indicates that the context’s original author or publisher does not endorse the link target. */
    Nofollow,
    /** **noopener**

Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context.. Indicates that any newly created top-level browsing context which results from following the link will not be an auxiliary browsing context. */
    Noopener,
    /** **noreferrer**

Indicates that no referrer information is to be leaked when following the link.. Indicates that no referrer information is to be leaked when following the link. */
    Noreferrer,
    /** **opener**

Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context.. Indicates that any newly created top-level browsing context which results from following the link will be an auxiliary browsing context. */
    Opener,
    /** **openid2.local_id**

Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier.. Refers to an OpenID Authentication server on which the context relies for an assertion that the end user controls an Identifier. */
    Openid2LocalId,
    /** **openid2.provider**

Refers to a resource which accepts OpenID Authentication protocol messages for the context.. Refers to a resource which accepts OpenID Authentication protocol messages for the context. */
    Openid2Provider,
    /** **original**

The Target IRI points to an Original Resource.. The Target IRI points to an Original Resource. */
    Original,
    /** **payment**

Indicates a resource where payment is accepted.. Indicates a resource where payment is accepted. */
    Payment,
    /** **pingback**

Gives the address of the pingback resource for the link context.. Gives the address of the pingback resource for the link context. */
    Pingback,
    /** **preconnect**

Used to indicate an origin that will be used to fetch required
      resources for the link context. Initiating an early connection, which
      includes the DNS lookup, TCP handshake, and optional TLS negotiation,
      allows the user agent to mask the high latency costs of establishing a
      connection.. Used to indicate an origin that will be used to fetch required
      resources for the link context. Initiating an early connection, which
      includes the DNS lookup, TCP handshake, and optional TLS negotiation,
      allows the user agent to mask the high latency costs of establishing a
      connection. */
    Preconnect,
    /** **predecessor-version**

Points to a resource containing the predecessor
      version in the version history.
    . Points to a resource containing the predecessor
      version in the version history.
     */
    PredecessorVersion,
    /** **prefetch**

The prefetch link relation type is used to identify a resource
      that might be required by the next navigation from the link context, and
      that the user agent ought to fetch, such that the user agent can deliver a
      faster response once the resource is requested in the future.. The prefetch link relation type is used to identify a resource
      that might be required by the next navigation from the link context, and
      that the user agent ought to fetch, such that the user agent can deliver a
      faster response once the resource is requested in the future. */
    Prefetch,
    /** **preload**

Refers to a resource that should be loaded early in the
      processing of the link's context, without blocking rendering.. Refers to a resource that should be loaded early in the
      processing of the link's context, without blocking rendering. */
    Preload,
    /** **prerender**

Used to identify a resource that might be required by the next
      navigation from the link context, and that the user agent ought to fetch
      and execute, such that the user agent can deliver a faster response once
      the resource is requested in the future.. Used to identify a resource that might be required by the next
      navigation from the link context, and that the user agent ought to fetch
      and execute, such that the user agent can deliver a faster response once
      the resource is requested in the future. */
    Prerender,
    /** **prev**

Indicates that the link's context is a part of a series, and
      that the previous in the series is the link target.
    . Indicates that the link's context is a part of a series, and
      that the previous in the series is the link target.
     */
    Prev,
    /** **prev-archive**

Refers to the immediately preceding archive resource.. Refers to the immediately preceding archive resource. */
    PrevArchive,
    /** **preview**

Refers to a resource that provides a preview of the link's context.. Refers to a resource that provides a preview of the link's context. */
    Preview,
    /** **previous**

Refers to the previous resource in an ordered series
      of resources.  Synonym for "prev".. Refers to the previous resource in an ordered series
      of resources.  Synonym for "prev". */
    Previous,
    /** **privacy-policy**

Refers to a privacy policy associated with the link's context.. Refers to a privacy policy associated with the link's context. */
    PrivacyPolicy,
    /** **profile**

Identifying that a resource representation conforms
to a certain profile, without affecting the non-profile semantics
of the resource representation.. Identifying that a resource representation conforms
to a certain profile, without affecting the non-profile semantics
of the resource representation. */
    Profile,
    /** **publication**

Links to a publication manifest. A manifest represents
      structured information about a publication, such as informative metadata,
      a list of resources, and a default reading order.. Links to a publication manifest. A manifest represents
      structured information about a publication, such as informative metadata,
      a list of resources, and a default reading order. */
    Publication,
    /** **related**

Identifies a related resource.. Identifies a related resource. */
    Related,
    /** **replies**

Identifies a resource that is a reply to the context
      of the link.
    . Identifies a resource that is a reply to the context
      of the link.
     */
    Replies,
    /** **restconf**

Identifies the root of RESTCONF API as configured on this HTTP server.
      The "restconf" relation defines the root of the API defined in RFC8040.
      Subsequent revisions of RESTCONF will use alternate relation values to support
      protocol versioning.. Identifies the root of RESTCONF API as configured on this HTTP server.
      The "restconf" relation defines the root of the API defined in RFC8040.
      Subsequent revisions of RESTCONF will use alternate relation values to support
      protocol versioning. */
    Restconf,
    /** **ruleinput**

The resource identified by the link target provides an input value to an
    instance of a rule, where the resource which represents the rule instance is
    identified by the link context.
    . The resource identified by the link target provides an input value to an
    instance of a rule, where the resource which represents the rule instance is
    identified by the link context.
     */
    Ruleinput,
    /** **search**

Refers to a resource that can be used to search through
      the link's context and related resources.. Refers to a resource that can be used to search through
      the link's context and related resources. */
    Search,
    /** **section**

Refers to a section in a collection of resources.. Refers to a section in a collection of resources. */
    Section,
    /** **self**

Conveys an identifier for the link's context.
    . Conveys an identifier for the link's context.
     */
    _Self,
    /** **service**

Indicates a URI that can be used to retrieve a
      service document.. Indicates a URI that can be used to retrieve a
      service document. */
    Service,
    /** **service-desc**

Identifies service description for the context that
      is primarily intended for consumption by machines.. Identifies service description for the context that
      is primarily intended for consumption by machines. */
    ServiceDesc,
    /** **service-doc**

Identifies service documentation for the context that
      is primarily intended for human consumption.. Identifies service documentation for the context that
      is primarily intended for human consumption. */
    ServiceDoc,
    /** **service-meta**

Identifies general metadata for the context that is
      primarily intended for consumption by machines.. Identifies general metadata for the context that is
      primarily intended for consumption by machines. */
    ServiceMeta,
    /** **sponsored**

Refers to a resource that is within a context that is
		sponsored (such as advertising or another compensation agreement).. Refers to a resource that is within a context that is
		sponsored (such as advertising or another compensation agreement). */
    Sponsored,
    /** **start**

Refers to the first resource in a collection of
      resources.. Refers to the first resource in a collection of
      resources. */
    Start,
    /** **status**

Identifies a resource that represents the context's
      status.. Identifies a resource that represents the context's
      status. */
    Status,
    /** **stylesheet**

Refers to a stylesheet.. Refers to a stylesheet. */
    Stylesheet,
    /** **subsection**

Refers to a resource serving as a subsection in a
      collection of resources.. Refers to a resource serving as a subsection in a
      collection of resources. */
    Subsection,
    /** **successor-version**

Points to a resource containing the successor version
      in the version history.
    . Points to a resource containing the successor version
      in the version history.
     */
    SuccessorVersion,
    /** **sunset**

Identifies a resource that provides information about
      the context's retirement policy.
    . Identifies a resource that provides information about
      the context's retirement policy.
     */
    Sunset,
    /** **tag**

Gives a tag (identified by the given address) that applies to
      the current document.
    . Gives a tag (identified by the given address) that applies to
      the current document.
     */
    Tag,
    /** **terms-of-service**

Refers to the terms of service associated with the link's context.. Refers to the terms of service associated with the link's context. */
    TermsOfService,
    /** **timegate**

The Target IRI points to a TimeGate for an Original Resource.. The Target IRI points to a TimeGate for an Original Resource. */
    Timegate,
    /** **timemap**

The Target IRI points to a TimeMap for an Original Resource.. The Target IRI points to a TimeMap for an Original Resource. */
    Timemap,
    /** **type**

Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance.. Refers to a resource identifying the abstract semantic type of which the link's context is considered to be an instance. */
    Type,
    /** **ugc**

Refers to a resource that is within a context that is User Generated Content.
    . Refers to a resource that is within a context that is User Generated Content.
     */
    Ugc,
    /** **up**

Refers to a parent document in a hierarchy of
      documents.
    . Refers to a parent document in a hierarchy of
      documents.
     */
    Up,
    /** **version-history**

Points to a resource containing the version history
      for the context.
    . Points to a resource containing the version history
      for the context.
     */
    VersionHistory,
    /** **via**

Identifies a resource that is the source of the
      information in the link's context.
    . Identifies a resource that is the source of the
      information in the link's context.
     */
    Via,
    /** **webmention**

Identifies a target URI that supports the Webmention protocol.
    This allows clients that mention a resource in some form of publishing process
    to contact that endpoint and inform it that this resource has been mentioned.. Identifies a target URI that supports the Webmention protocol.
    This allows clients that mention a resource in some form of publishing process
    to contact that endpoint and inform it that this resource has been mentioned. */
    Webmention,
    /** **working-copy**

Points to a working copy for this resource.. Points to a working copy for this resource. */
    WorkingCopy,
    /** **working-copy-of**

Points to the versioned resource from which this
      working copy was obtained.
    . Points to the versioned resource from which this
      working copy was obtained.
     */
    WorkingCopyOf,
}
impl ::core::str::FromStr for LinkRelationTypes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "P3Pv1" => Ok(Self::P3Pv1),
            "about" => Ok(Self::About),
            "acl" => Ok(Self::Acl),
            "alternate" => Ok(Self::Alternate),
            "amphtml" => Ok(Self::Amphtml),
            "appendix" => Ok(Self::Appendix),
            "apple-touch-icon" => Ok(Self::AppleTouchIcon),
            "apple-touch-startup-image" => Ok(Self::AppleTouchStartupImage),
            "archives" => Ok(Self::Archives),
            "author" => Ok(Self::Author),
            "blocked-by" => Ok(Self::BlockedBy),
            "bookmark" => Ok(Self::Bookmark),
            "canonical" => Ok(Self::Canonical),
            "chapter" => Ok(Self::Chapter),
            "cite-as" => Ok(Self::CiteAs),
            "collection" => Ok(Self::Collection),
            "contents" => Ok(Self::Contents),
            "convertedFrom" => Ok(Self::ConvertedFrom),
            "copyright" => Ok(Self::Copyright),
            "create-form" => Ok(Self::CreateForm),
            "current" => Ok(Self::Current),
            "describedby" => Ok(Self::Describedby),
            "describes" => Ok(Self::Describes),
            "disclosure" => Ok(Self::Disclosure),
            "dns-prefetch" => Ok(Self::DnsPrefetch),
            "duplicate" => Ok(Self::Duplicate),
            "edit" => Ok(Self::Edit),
            "edit-form" => Ok(Self::EditForm),
            "edit-media" => Ok(Self::EditMedia),
            "enclosure" => Ok(Self::Enclosure),
            "external" => Ok(Self::External),
            "first" => Ok(Self::First),
            "glossary" => Ok(Self::Glossary),
            "help" => Ok(Self::Help),
            "hosts" => Ok(Self::Hosts),
            "hub" => Ok(Self::Hub),
            "icon" => Ok(Self::Icon),
            "index" => Ok(Self::Index),
            "intervalAfter" => Ok(Self::IntervalAfter),
            "intervalBefore" => Ok(Self::IntervalBefore),
            "intervalContains" => Ok(Self::IntervalContains),
            "intervalDisjoint" => Ok(Self::IntervalDisjoint),
            "intervalDuring" => Ok(Self::IntervalDuring),
            "intervalEquals" => Ok(Self::IntervalEquals),
            "intervalFinishedBy" => Ok(Self::IntervalFinishedBy),
            "intervalFinishes" => Ok(Self::IntervalFinishes),
            "intervalIn" => Ok(Self::IntervalIn),
            "intervalMeets" => Ok(Self::IntervalMeets),
            "intervalMetBy" => Ok(Self::IntervalMetBy),
            "intervalOverlappedBy" => Ok(Self::IntervalOverlappedBy),
            "intervalOverlaps" => Ok(Self::IntervalOverlaps),
            "intervalStartedBy" => Ok(Self::IntervalStartedBy),
            "intervalStarts" => Ok(Self::IntervalStarts),
            "item" => Ok(Self::Item),
            "last" => Ok(Self::Last),
            "latest-version" => Ok(Self::LatestVersion),
            "license" => Ok(Self::License),
            "linkset" => Ok(Self::Linkset),
            "lrdd" => Ok(Self::Lrdd),
            "manifest" => Ok(Self::Manifest),
            "mask-icon" => Ok(Self::MaskIcon),
            "media-feed" => Ok(Self::MediaFeed),
            "memento" => Ok(Self::Memento),
            "micropub" => Ok(Self::Micropub),
            "modulepreload" => Ok(Self::Modulepreload),
            "monitor" => Ok(Self::Monitor),
            "monitor-group" => Ok(Self::MonitorGroup),
            "next" => Ok(Self::Next),
            "next-archive" => Ok(Self::NextArchive),
            "nofollow" => Ok(Self::Nofollow),
            "noopener" => Ok(Self::Noopener),
            "noreferrer" => Ok(Self::Noreferrer),
            "opener" => Ok(Self::Opener),
            "openid2.local_id" => Ok(Self::Openid2LocalId),
            "openid2.provider" => Ok(Self::Openid2Provider),
            "original" => Ok(Self::Original),
            "payment" => Ok(Self::Payment),
            "pingback" => Ok(Self::Pingback),
            "preconnect" => Ok(Self::Preconnect),
            "predecessor-version" => Ok(Self::PredecessorVersion),
            "prefetch" => Ok(Self::Prefetch),
            "preload" => Ok(Self::Preload),
            "prerender" => Ok(Self::Prerender),
            "prev" => Ok(Self::Prev),
            "prev-archive" => Ok(Self::PrevArchive),
            "preview" => Ok(Self::Preview),
            "previous" => Ok(Self::Previous),
            "privacy-policy" => Ok(Self::PrivacyPolicy),
            "profile" => Ok(Self::Profile),
            "publication" => Ok(Self::Publication),
            "related" => Ok(Self::Related),
            "replies" => Ok(Self::Replies),
            "restconf" => Ok(Self::Restconf),
            "ruleinput" => Ok(Self::Ruleinput),
            "search" => Ok(Self::Search),
            "section" => Ok(Self::Section),
            "self" => Ok(Self::_Self),
            "service" => Ok(Self::Service),
            "service-desc" => Ok(Self::ServiceDesc),
            "service-doc" => Ok(Self::ServiceDoc),
            "service-meta" => Ok(Self::ServiceMeta),
            "sponsored" => Ok(Self::Sponsored),
            "start" => Ok(Self::Start),
            "status" => Ok(Self::Status),
            "stylesheet" => Ok(Self::Stylesheet),
            "subsection" => Ok(Self::Subsection),
            "successor-version" => Ok(Self::SuccessorVersion),
            "sunset" => Ok(Self::Sunset),
            "tag" => Ok(Self::Tag),
            "terms-of-service" => Ok(Self::TermsOfService),
            "timegate" => Ok(Self::Timegate),
            "timemap" => Ok(Self::Timemap),
            "type" => Ok(Self::Type),
            "ugc" => Ok(Self::Ugc),
            "up" => Ok(Self::Up),
            "version-history" => Ok(Self::VersionHistory),
            "via" => Ok(Self::Via),
            "webmention" => Ok(Self::Webmention),
            "working-copy" => Ok(Self::WorkingCopy),
            "working-copy-of" => Ok(Self::WorkingCopyOf),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LinkRelationTypes {
    fn as_ref(&self) -> &str {
        match self {
            Self::P3Pv1 => "P3Pv1",
            Self::About => "about",
            Self::Acl => "acl",
            Self::Alternate => "alternate",
            Self::Amphtml => "amphtml",
            Self::Appendix => "appendix",
            Self::AppleTouchIcon => "apple-touch-icon",
            Self::AppleTouchStartupImage => "apple-touch-startup-image",
            Self::Archives => "archives",
            Self::Author => "author",
            Self::BlockedBy => "blocked-by",
            Self::Bookmark => "bookmark",
            Self::Canonical => "canonical",
            Self::Chapter => "chapter",
            Self::CiteAs => "cite-as",
            Self::Collection => "collection",
            Self::Contents => "contents",
            Self::ConvertedFrom => "convertedFrom",
            Self::Copyright => "copyright",
            Self::CreateForm => "create-form",
            Self::Current => "current",
            Self::Describedby => "describedby",
            Self::Describes => "describes",
            Self::Disclosure => "disclosure",
            Self::DnsPrefetch => "dns-prefetch",
            Self::Duplicate => "duplicate",
            Self::Edit => "edit",
            Self::EditForm => "edit-form",
            Self::EditMedia => "edit-media",
            Self::Enclosure => "enclosure",
            Self::External => "external",
            Self::First => "first",
            Self::Glossary => "glossary",
            Self::Help => "help",
            Self::Hosts => "hosts",
            Self::Hub => "hub",
            Self::Icon => "icon",
            Self::Index => "index",
            Self::IntervalAfter => "intervalAfter",
            Self::IntervalBefore => "intervalBefore",
            Self::IntervalContains => "intervalContains",
            Self::IntervalDisjoint => "intervalDisjoint",
            Self::IntervalDuring => "intervalDuring",
            Self::IntervalEquals => "intervalEquals",
            Self::IntervalFinishedBy => "intervalFinishedBy",
            Self::IntervalFinishes => "intervalFinishes",
            Self::IntervalIn => "intervalIn",
            Self::IntervalMeets => "intervalMeets",
            Self::IntervalMetBy => "intervalMetBy",
            Self::IntervalOverlappedBy => "intervalOverlappedBy",
            Self::IntervalOverlaps => "intervalOverlaps",
            Self::IntervalStartedBy => "intervalStartedBy",
            Self::IntervalStarts => "intervalStarts",
            Self::Item => "item",
            Self::Last => "last",
            Self::LatestVersion => "latest-version",
            Self::License => "license",
            Self::Linkset => "linkset",
            Self::Lrdd => "lrdd",
            Self::Manifest => "manifest",
            Self::MaskIcon => "mask-icon",
            Self::MediaFeed => "media-feed",
            Self::Memento => "memento",
            Self::Micropub => "micropub",
            Self::Modulepreload => "modulepreload",
            Self::Monitor => "monitor",
            Self::MonitorGroup => "monitor-group",
            Self::Next => "next",
            Self::NextArchive => "next-archive",
            Self::Nofollow => "nofollow",
            Self::Noopener => "noopener",
            Self::Noreferrer => "noreferrer",
            Self::Opener => "opener",
            Self::Openid2LocalId => "openid2.local_id",
            Self::Openid2Provider => "openid2.provider",
            Self::Original => "original",
            Self::Payment => "payment",
            Self::Pingback => "pingback",
            Self::Preconnect => "preconnect",
            Self::PredecessorVersion => "predecessor-version",
            Self::Prefetch => "prefetch",
            Self::Preload => "preload",
            Self::Prerender => "prerender",
            Self::Prev => "prev",
            Self::PrevArchive => "prev-archive",
            Self::Preview => "preview",
            Self::Previous => "previous",
            Self::PrivacyPolicy => "privacy-policy",
            Self::Profile => "profile",
            Self::Publication => "publication",
            Self::Related => "related",
            Self::Replies => "replies",
            Self::Restconf => "restconf",
            Self::Ruleinput => "ruleinput",
            Self::Search => "search",
            Self::Section => "section",
            Self::_Self => "self",
            Self::Service => "service",
            Self::ServiceDesc => "service-desc",
            Self::ServiceDoc => "service-doc",
            Self::ServiceMeta => "service-meta",
            Self::Sponsored => "sponsored",
            Self::Start => "start",
            Self::Status => "status",
            Self::Stylesheet => "stylesheet",
            Self::Subsection => "subsection",
            Self::SuccessorVersion => "successor-version",
            Self::Sunset => "sunset",
            Self::Tag => "tag",
            Self::TermsOfService => "terms-of-service",
            Self::Timegate => "timegate",
            Self::Timemap => "timemap",
            Self::Type => "type",
            Self::Ugc => "ugc",
            Self::Up => "up",
            Self::VersionHistory => "version-history",
            Self::Via => "via",
            Self::Webmention => "webmention",
            Self::WorkingCopy => "working-copy",
            Self::WorkingCopyOf => "working-copy-of",
        }
    }
}
impl ::std::fmt::Debug for LinkRelationTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LinkRelationTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LinkRelationTypes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LinkRelationTypes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LinkRelationTypes> for Coding {
    fn from(code: LinkRelationTypes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/iana-link-relations".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LinkRelationTypes> for CodeableConcept {
    fn from(code: LinkRelationTypes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LinkType](http://hl7.org/fhir/ValueSet/link-type)**. The type of link between this Patient resource and other Patient/RelatedPerson resource(s).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LinkType {
    /** **refer**

Refer. The patient resource containing this link is in use and valid but not considered the main source of information about a patient. The link points forward to another patient resource that should be consulted to retrieve additional patient information. */
    Refer,
    /** **replaced-by**

Replaced-by. The patient resource containing this link must no longer be used. The link points forward to another patient resource that must be used in lieu of the patient resource that contains this link. */
    ReplacedBy,
    /** **replaces**

Replaces. The patient resource containing this link is the current active patient record. The link points back to an inactive patient resource that has been merged into this resource, and should be consulted to retrieve additional referenced information. */
    Replaces,
    /** **seealso**

See also. The patient resource containing this link is in use and valid, but points to another Patient or RelatedPerson resource that is known to contain data about the same person. Data in this resource might overlap or contradict information found in the other Patient/RelatedPerson resource. This link does not indicate any relative importance of the resources concerned, and both should be regarded as equally valid. */
    Seealso,
}
impl ::core::str::FromStr for LinkType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "refer" => Ok(Self::Refer),
            "replaced-by" => Ok(Self::ReplacedBy),
            "replaces" => Ok(Self::Replaces),
            "seealso" => Ok(Self::Seealso),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LinkType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Refer => "refer",
            Self::ReplacedBy => "replaced-by",
            Self::Replaces => "replaces",
            Self::Seealso => "seealso",
        }
    }
}
impl ::std::fmt::Debug for LinkType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LinkType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LinkType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LinkType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LinkType> for Coding {
    fn from(code: LinkType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/link-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LinkType> for CodeableConcept {
    fn from(code: LinkType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LinkageType](http://hl7.org/fhir/ValueSet/linkage-type)**. Used to distinguish different roles a resource can play within a set of linked resources.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LinkageType {
    /** **alternate**

Alternate Record. The resource represents an alternative view of the underlying event/condition/etc.  The resource may still be actively maintained, even though it is not considered to be the source of truth. */
    Alternate,
    /** **historical**

Historical/Obsolete Record. The resource represents an obsolete record of the underlying event/condition/etc.  It is not expected to be actively maintained. */
    Historical,
    /** **source**

Source of Truth. The resource represents the "source of truth" (from the perspective of this Linkage resource) for the underlying event/condition/etc. */
    Source,
}
impl ::core::str::FromStr for LinkageType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alternate" => Ok(Self::Alternate),
            "historical" => Ok(Self::Historical),
            "source" => Ok(Self::Source),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LinkageType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alternate => "alternate",
            Self::Historical => "historical",
            Self::Source => "source",
        }
    }
}
impl ::std::fmt::Debug for LinkageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LinkageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LinkageType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LinkageType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LinkageType> for Coding {
    fn from(code: LinkageType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/linkage-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LinkageType> for CodeableConcept {
    fn from(code: LinkageType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ListMode](http://hl7.org/fhir/ValueSet/list-mode)**. The processing mode that applies to this list.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ListMode {
    /** **changes**

Change List. A point-in-time list that shows what changes have been made or recommended.  E.g. a discharge medication list showing what was added and removed during an encounter. */
    Changes,
    /** **snapshot**

Snapshot List. This list was prepared as a snapshot. It should not be assumed to be current. */
    Snapshot,
    /** **working**

Working List. This list is the master list, maintained in an ongoing fashion with regular updates as the real-world list it is tracking changes. */
    Working,
}
impl ::core::str::FromStr for ListMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "changes" => Ok(Self::Changes),
            "snapshot" => Ok(Self::Snapshot),
            "working" => Ok(Self::Working),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ListMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Changes => "changes",
            Self::Snapshot => "snapshot",
            Self::Working => "working",
        }
    }
}
impl ::std::fmt::Debug for ListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ListMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ListMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ListMode> for Coding {
    fn from(code: ListMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/list-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ListMode> for CodeableConcept {
    fn from(code: ListMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ListStatus](http://hl7.org/fhir/ValueSet/list-status)**. The current state of the list.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ListStatus {
    /** **current**

Current. The list is considered to be an active part of the patient's record. */
    Current,
    /** **entered-in-error**

Entered In Error. The list was never accurate.  It is retained for medico-legal purposes only. */
    EnteredInError,
    /** **retired**

Retired. The list is "old" and should no longer be considered accurate or relevant. */
    Retired,
}
impl ::core::str::FromStr for ListStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "current" => Ok(Self::Current),
            "entered-in-error" => Ok(Self::EnteredInError),
            "retired" => Ok(Self::Retired),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ListStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Current => "current",
            Self::EnteredInError => "entered-in-error",
            Self::Retired => "retired",
        }
    }
}
impl ::std::fmt::Debug for ListStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ListStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ListStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ListStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ListStatus> for Coding {
    fn from(code: ListStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/list-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ListStatus> for CodeableConcept {
    fn from(code: ListStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LocationCharacteristic](http://hl7.org/fhir/ValueSet/location-characteristic)**. Example Set of Location Characteristics.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LocationCharacteristic {
    /** **has-icu**

has ICU. The location is or has an intensive care unit */
    HasIcu,
    /** **has-iso-ward**

isolation ward. The location is or has an isolation ward */
    HasIsoWard,
    /** **has-neg-press**

negative pressure rooms available. The location has negative pressure rooms available */
    HasNegPress,
    /** **has-oxy-nitro**

oxygen/nitrogen available. The location has oxygen and nitrogen services available */
    HasOxyNitro,
    /** **has-translation**

translation services available. The location has translation services available */
    HasTranslation,
    /** **wheelchair**

Wheelchair accessible. The location is accessible to thosre requiring wheelchair access */
    Wheelchair,
}
impl ::core::str::FromStr for LocationCharacteristic {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "has-icu" => Ok(Self::HasIcu),
            "has-iso-ward" => Ok(Self::HasIsoWard),
            "has-neg-press" => Ok(Self::HasNegPress),
            "has-oxy-nitro" => Ok(Self::HasOxyNitro),
            "has-translation" => Ok(Self::HasTranslation),
            "wheelchair" => Ok(Self::Wheelchair),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LocationCharacteristic {
    fn as_ref(&self) -> &str {
        match self {
            Self::HasIcu => "has-icu",
            Self::HasIsoWard => "has-iso-ward",
            Self::HasNegPress => "has-neg-press",
            Self::HasOxyNitro => "has-oxy-nitro",
            Self::HasTranslation => "has-translation",
            Self::Wheelchair => "wheelchair",
        }
    }
}
impl ::std::fmt::Debug for LocationCharacteristic {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LocationCharacteristic {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LocationCharacteristic {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LocationCharacteristic {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LocationCharacteristic> for Coding {
    fn from(code: LocationCharacteristic) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/location-characteristic".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LocationCharacteristic> for CodeableConcept {
    fn from(code: LocationCharacteristic) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LocationMode](http://hl7.org/fhir/ValueSet/location-mode)**. Indicates whether a resource instance represents a specific location or a class of locations.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LocationMode {
    /** **instance**

Instance. The Location resource represents a specific instance of a location (e.g. Operating Theatre 1A). */
    Instance,
    /** **kind**

Kind. The Location represents a class of locations (e.g. Any Operating Theatre) although this class of locations could be constrained within a specific boundary (such as organization, or parent location, address etc.). */
    Kind,
}
impl ::core::str::FromStr for LocationMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "instance" => Ok(Self::Instance),
            "kind" => Ok(Self::Kind),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LocationMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Instance => "instance",
            Self::Kind => "kind",
        }
    }
}
impl ::std::fmt::Debug for LocationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LocationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LocationMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LocationMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LocationMode> for Coding {
    fn from(code: LocationMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/location-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LocationMode> for CodeableConcept {
    fn from(code: LocationMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[LocationStatus](http://hl7.org/fhir/ValueSet/location-status)**. Indicates whether the location is still in use.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum LocationStatus {
    /** **active**

Active. The location is operational. */
    Active,
    /** **inactive**

Inactive. The location is no longer used. */
    Inactive,
    /** **suspended**

Suspended. The location is temporarily closed. */
    Suspended,
}
impl ::core::str::FromStr for LocationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "inactive" => Ok(Self::Inactive),
            "suspended" => Ok(Self::Suspended),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for LocationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Inactive => "inactive",
            Self::Suspended => "suspended",
        }
    }
}
impl ::std::fmt::Debug for LocationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for LocationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for LocationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for LocationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<LocationStatus> for Coding {
    fn from(code: LocationStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/location-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<LocationStatus> for CodeableConcept {
    fn from(code: LocationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ManufacturedDoseForm](http://hl7.org/fhir/ValueSet/manufactured-dose-form)**. Dose form for a medication, as manufactured (and before any mixing etc.), not necessarily ready for administration to the patient.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ManufacturedDoseForm {
    /** **100000073362**

Oral suspension. */
    N100000073362,
    /** **100000073363**

Oral gel. */
    N100000073363,
    /** **100000073364**

Powder for oral solution. */
    N100000073364,
    /** **100000073365**

Granules for oral solution. */
    N100000073365,
    /** **100000073367**

Lyophilisate for suspension. */
    N100000073367,
    /** **100000073368**

Powder for syrup. */
    N100000073368,
    /** **100000073369**

Soluble tablet. */
    N100000073369,
    /** **100000073370**

Herbal tea. */
    N100000073370,
    /** **100000073371**

Instant herbal tea. */
    N100000073371,
    /** **100000073372**

Granules. */
    N100000073372,
    /** **100000073373**

Gastro-resistant granules. */
    N100000073373,
    /** **100000073374**

Modified-release granules. */
    N100000073374,
    /** **100000073375**

Capsule, hard. */
    N100000073375,
    /** **100000073376**

Gastro-resistant capsule, hard. */
    N100000073376,
    /** **100000073377**

Chewable capsule, soft. */
    N100000073377,
    /** **100000073378**

Prolonged-release capsule, soft. */
    N100000073378,
    /** **100000073379**

Modified-release capsule, soft. */
    N100000073379,
    /** **100000073380**

Coated tablet. */
    N100000073380,
    /** **100000073642**

Oral drops, solution. */
    N100000073642,
    /** **100000073643**

Oral drops, suspension. */
    N100000073643,
    /** **100000073644**

Oral drops, emulsion. */
    N100000073644,
    /** **100000073645**

Oral liquid. */
    N100000073645,
    /** **100000073646**

Oral solution. */
    N100000073646,
    /** **100000073647**

Oral emulsion. */
    N100000073647,
    /** **100000073648**

Oral paste. */
    N100000073648,
    /** **100000073649**

Powder for oral suspension. */
    N100000073649,
    /** **100000073650**

Granules for oral suspension. */
    N100000073650,
    /** **100000073652**

Syrup. */
    N100000073652,
    /** **100000073653**

Granules for syrup. */
    N100000073653,
    /** **100000073654**

Dispersible tablet. */
    N100000073654,
    /** **100000073655**

Oral powder. */
    N100000073655,
    /** **100000073656**

Effervescent powder. */
    N100000073656,
    /** **100000073657**

Effervescent granules. */
    N100000073657,
    /** **100000073658**

Prolonged-release granules. */
    N100000073658,
    /** **100000073659**

Cachet. */
    N100000073659,
    /** **100000073660**

Capsule, soft. */
    N100000073660,
    /** **100000073661**

Gastro-resistant capsule, soft. */
    N100000073661,
    /** **100000073662**

Prolonged-release capsule, hard. */
    N100000073662,
    /** **100000073663**

Modified-release capsule, hard. */
    N100000073663,
    /** **100000073664**

Tablet. */
    N100000073664,
    /** **100000073665**

Film-coated tablet. */
    N100000073665,
    /** **100000073666**

Orodispersible tablet. */
    N100000073666,
    /** **100000073667**

Gastro-resistant tablet. */
    N100000073667,
    /** **100000073668**

Modified-release tablet. */
    N100000073668,
    /** **100000073669**

Medicated chewing-gum. */
    N100000073669,
    /** **100000073670**

Pillules. */
    N100000073670,
    /** **100000073671**

Pulsatile-release intraruminal device. */
    N100000073671,
    /** **100000073672**

Premix for medicated feeding stuff. */
    N100000073672,
    /** **100000073673**

Gargle. */
    N100000073673,
    /** **100000073674**

Gargle, powder for solution. */
    N100000073674,
    /** **100000073675**

Oromucosal suspension. */
    N100000073675,
    /** **100000073676**

Oromucosal spray. */
    N100000073676,
    /** **100000073677**

Mouthwash. */
    N100000073677,
    /** **100000073678**

Gingival solution. */
    N100000073678,
    /** **100000073679**

Oromucosal paste. */
    N100000073679,
    /** **100000073680**

Gingival gel. */
    N100000073680,
    /** **100000073681**

Effervescent tablet. */
    N100000073681,
    /** **100000073682**

Oral lyophilisate. */
    N100000073682,
    /** **100000073683**

Prolonged-release tablet. */
    N100000073683,
    /** **100000073684**

Chewable tablet. */
    N100000073684,
    /** **100000073685**

Oral gum. */
    N100000073685,
    /** **100000073686**

Continuous-release intraruminal device. */
    N100000073686,
    /** **100000073687**

Lick block. */
    N100000073687,
    /** **100000073688**

Medicated pellets. */
    N100000073688,
    /** **100000073689**

Concentrate for gargle. */
    N100000073689,
    /** **100000073690**

Gargle, tablet for solution. */
    N100000073690,
    /** **100000073691**

Oromucosal solution. */
    N100000073691,
    /** **100000073692**

Oromucosal drops. */
    N100000073692,
    /** **100000073693**

Sublingual spray. */
    N100000073693,
    /** **100000073694**

Mouthwash, tablet for solution. */
    N100000073694,
    /** **100000073695**

Oromucosal gel. */
    N100000073695,
    /** **100000073696**

Oromucosal cream. */
    N100000073696,
    /** **100000073697**

Gingival paste. */
    N100000073697,
    /** **100000073698**

Sublingual tablet. */
    N100000073698,
    /** **100000073699**

Buccal tablet. */
    N100000073699,
    /** **100000073700**

Compressed lozenge. */
    N100000073700,
    /** **100000073701**

Oromucosal capsule. */
    N100000073701,
    /** **100000073702**

Muco-adhesive buccal tablet. */
    N100000073702,
    /** **100000073703**

Lozenge. */
    N100000073703,
    /** **100000073704**

Pastille. */
    N100000073704,
    /** **100000073705**

Dental gel. */
    N100000073705,
    /** **100000073706**

Dental insert. */
    N100000073706,
    /** **100000073707**

Dental powder. */
    N100000073707,
    /** **100000073708**

Dental suspension. */
    N100000073708,
    /** **100000073709**

Toothpaste. */
    N100000073709,
    /** **100000073710**

Periodontal gel. */
    N100000073710,
    /** **100000073711**

Bath additive. */
    N100000073711,
    /** **100000073712**

Cream. */
    N100000073712,
    /** **100000073713**

Ointment. */
    N100000073713,
    /** **100000073714**

Medicated plaster. */
    N100000073714,
    /** **100000073715**

Shampoo. */
    N100000073715,
    /** **100000073716**

Cutaneous spray, suspension. */
    N100000073716,
    /** **100000073717**

Cutaneous liquid. */
    N100000073717,
    /** **100000073718**

Concentrate for cutaneous solution. */
    N100000073718,
    /** **100000073719**

Cutaneous emulsion. */
    N100000073719,
    /** **100000073720**

Cutaneous patch. */
    N100000073720,
    /** **100000073721**

Periodontal powder. */
    N100000073721,
    /** **100000073722**

Dental stick. */
    N100000073722,
    /** **100000073723**

Dental solution. */
    N100000073723,
    /** **100000073724**

Dental emulsion. */
    N100000073724,
    /** **100000073725**

Periodontal insert. */
    N100000073725,
    /** **100000073726**

Gel. */
    N100000073726,
    /** **100000073727**

Cutaneous paste. */
    N100000073727,
    /** **100000073728**

Cutaneous foam. */
    N100000073728,
    /** **100000073729**

Cutaneous spray, solution. */
    N100000073729,
    /** **100000073730**

Cutaneous spray, powder. */
    N100000073730,
    /** **100000073731**

Cutaneous solution. */
    N100000073731,
    /** **100000073732**

Cutaneous suspension. */
    N100000073732,
    /** **100000073733**

Cutaneous powder. */
    N100000073733,
    /** **100000073734**

Solution for iontophoresis. */
    N100000073734,
    /** **100000073735**

Collodion. */
    N100000073735,
    /** **100000073736**

Poultice. */
    N100000073736,
    /** **100000073737**

Cutaneous sponge. */
    N100000073737,
    /** **100000073738**

Collar. */
    N100000073738,
    /** **100000073739**

Ear tag. */
    N100000073739,
    /** **100000073740**

Dip suspension. */
    N100000073740,
    /** **100000073741**

Transdermal patch. */
    N100000073741,
    /** **100000073742**

Medicated nail lacquer. */
    N100000073742,
    /** **100000073743**

Cutaneous stick. */
    N100000073743,
    /** **100000073744**

Impregnated dressing. */
    N100000073744,
    /** **100000073745**

Medicated pendant. */
    N100000073745,
    /** **100000073746**

Dip solution. */
    N100000073746,
    /** **100000073747**

Dip emulsion. */
    N100000073747,
    /** **100000073748**

Concentrate for dip suspension. */
    N100000073748,
    /** **100000073749**

Powder for dip solution. */
    N100000073749,
    /** **100000073750**

Powder for suspension for fish treatment. */
    N100000073750,
    /** **100000073751**

Pour-on suspension. */
    N100000073751,
    /** **100000073752**

Spot-on solution. */
    N100000073752,
    /** **100000073753**

Spot-on emulsion. */
    N100000073753,
    /** **100000073754**

Teat dip suspension. */
    N100000073754,
    /** **100000073755**

Teat spray solution. */
    N100000073755,
    /** **100000073756**

Solution for skin-prick test. */
    N100000073756,
    /** **100000073757**

Plaster for provocation test. */
    N100000073757,
    /** **100000073758**

Eye gel. */
    N100000073758,
    /** **100000073759**

Eye drops, solution. */
    N100000073759,
    /** **100000073760**

Eye drops, suspension. */
    N100000073760,
    /** **100000073761**

Concentrate for dip solution. */
    N100000073761,
    /** **100000073762**

Concentrate for dip emulsion. */
    N100000073762,
    /** **100000073763**

Concentrate for solution for fish treatment. */
    N100000073763,
    /** **100000073764**

Pour-on solution. */
    N100000073764,
    /** **100000073765**

Pour-on emulsion. */
    N100000073765,
    /** **100000073766**

Spot-on suspension. */
    N100000073766,
    /** **100000073767**

Teat dip solution. */
    N100000073767,
    /** **100000073768**

Teat dip emulsion. */
    N100000073768,
    /** **100000073769**

Transdermal system. */
    N100000073769,
    /** **100000073770**

Solution for skin-scratch test. */
    N100000073770,
    /** **100000073771**

Eye cream. */
    N100000073771,
    /** **100000073772**

Eye ointment. */
    N100000073772,
    /** **100000073773**

Eye drops, emulsion. */
    N100000073773,
    /** **100000073775**

Eye drops, solvent for reconstitution. */
    N100000073775,
    /** **100000073776**

Eye lotion. */
    N100000073776,
    /** **100000073777**

Ophthalmic insert. */
    N100000073777,
    /** **100000073778**

Ear cream. */
    N100000073778,
    /** **100000073779**

Ear ointment. */
    N100000073779,
    /** **100000073780**

Ear drops, suspension. */
    N100000073780,
    /** **100000073782**

Eye drops, prolonged-release. */
    N100000073782,
    /** **100000073783**

Eye lotion, solvent for reconstitution. */
    N100000073783,
    /** **100000073784**

Ophthalmic strip. */
    N100000073784,
    /** **100000073785**

Ear gel. */
    N100000073785,
    /** **100000073786**

Ear drops, solution. */
    N100000073786,
    /** **100000073787**

Ear drops, emulsion. */
    N100000073787,
    /** **100000073788**

Ear powder. */
    N100000073788,
    /** **100000073789**

Ear spray, suspension. */
    N100000073789,
    /** **100000073790**

Ear wash, solution. */
    N100000073790,
    /** **100000073791**

Ear tampon. */
    N100000073791,
    /** **100000073792**

Nasal cream. */
    N100000073792,
    /** **100000073793**

Nasal gel. */
    N100000073793,
    /** **100000073794**

Nasal drops, solution. */
    N100000073794,
    /** **100000073795**

Nasal drops, emulsion. */
    N100000073795,
    /** **100000073796**

Nasal spray, solution. */
    N100000073796,
    /** **100000073797**

Nasal spray, emulsion. */
    N100000073797,
    /** **100000073798**

Nasal stick. */
    N100000073798,
    /** **100000073799**

Vaginal gel. */
    N100000073799,
    /** **100000073800**

Vaginal foam. */
    N100000073800,
    /** **100000073802**

Ear spray, solution. */
    N100000073802,
    /** **100000073803**

Ear spray, emulsion. */
    N100000073803,
    /** **100000073804**

Ear wash, emulsion. */
    N100000073804,
    /** **100000073805**

Ear stick. */
    N100000073805,
    /** **100000073806**

Nasal ointment. */
    N100000073806,
    /** **100000073807**

Nasal drops, suspension. */
    N100000073807,
    /** **100000073808**

Nasal powder. */
    N100000073808,
    /** **100000073809**

Nasal spray, suspension. */
    N100000073809,
    /** **100000073810**

Nasal wash. */
    N100000073810,
    /** **100000073811**

Vaginal cream. */
    N100000073811,
    /** **100000073812**

Vaginal ointment. */
    N100000073812,
    /** **100000073813**

Vaginal solution. */
    N100000073813,
    /** **100000073814**

Vaginal emulsion. */
    N100000073814,
    /** **100000073815**

Pessary. */
    N100000073815,
    /** **100000073816**

Vaginal capsule, soft. */
    N100000073816,
    /** **100000073817**

Effervescent vaginal tablet. */
    N100000073817,
    /** **100000073818**

Vaginal delivery system. */
    N100000073818,
    /** **100000073819**

Rectal cream. */
    N100000073819,
    /** **100000073820**

Rectal foam. */
    N100000073820,
    /** **100000073821**

Vaginal suspension. */
    N100000073821,
    /** **100000073822**

Tablet for vaginal solution. */
    N100000073822,
    /** **100000073823**

Vaginal capsule, hard. */
    N100000073823,
    /** **100000073824**

Vaginal tablet. */
    N100000073824,
    /** **100000073825**

Medicated vaginal tampon. */
    N100000073825,
    /** **100000073826**

Vaginal sponge. */
    N100000073826,
    /** **100000073827**

Rectal gel. */
    N100000073827,
    /** **100000073863**

Solution for injection. */
    N100000073863,
}
impl ::core::str::FromStr for ManufacturedDoseForm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000073362" => Ok(Self::N100000073362),
            "100000073363" => Ok(Self::N100000073363),
            "100000073364" => Ok(Self::N100000073364),
            "100000073365" => Ok(Self::N100000073365),
            "100000073367" => Ok(Self::N100000073367),
            "100000073368" => Ok(Self::N100000073368),
            "100000073369" => Ok(Self::N100000073369),
            "100000073370" => Ok(Self::N100000073370),
            "100000073371" => Ok(Self::N100000073371),
            "100000073372" => Ok(Self::N100000073372),
            "100000073373" => Ok(Self::N100000073373),
            "100000073374" => Ok(Self::N100000073374),
            "100000073375" => Ok(Self::N100000073375),
            "100000073376" => Ok(Self::N100000073376),
            "100000073377" => Ok(Self::N100000073377),
            "100000073378" => Ok(Self::N100000073378),
            "100000073379" => Ok(Self::N100000073379),
            "100000073380" => Ok(Self::N100000073380),
            "100000073642" => Ok(Self::N100000073642),
            "100000073643" => Ok(Self::N100000073643),
            "100000073644" => Ok(Self::N100000073644),
            "100000073645" => Ok(Self::N100000073645),
            "100000073646" => Ok(Self::N100000073646),
            "100000073647" => Ok(Self::N100000073647),
            "100000073648" => Ok(Self::N100000073648),
            "100000073649" => Ok(Self::N100000073649),
            "100000073650" => Ok(Self::N100000073650),
            "100000073652" => Ok(Self::N100000073652),
            "100000073653" => Ok(Self::N100000073653),
            "100000073654" => Ok(Self::N100000073654),
            "100000073655" => Ok(Self::N100000073655),
            "100000073656" => Ok(Self::N100000073656),
            "100000073657" => Ok(Self::N100000073657),
            "100000073658" => Ok(Self::N100000073658),
            "100000073659" => Ok(Self::N100000073659),
            "100000073660" => Ok(Self::N100000073660),
            "100000073661" => Ok(Self::N100000073661),
            "100000073662" => Ok(Self::N100000073662),
            "100000073663" => Ok(Self::N100000073663),
            "100000073664" => Ok(Self::N100000073664),
            "100000073665" => Ok(Self::N100000073665),
            "100000073666" => Ok(Self::N100000073666),
            "100000073667" => Ok(Self::N100000073667),
            "100000073668" => Ok(Self::N100000073668),
            "100000073669" => Ok(Self::N100000073669),
            "100000073670" => Ok(Self::N100000073670),
            "100000073671" => Ok(Self::N100000073671),
            "100000073672" => Ok(Self::N100000073672),
            "100000073673" => Ok(Self::N100000073673),
            "100000073674" => Ok(Self::N100000073674),
            "100000073675" => Ok(Self::N100000073675),
            "100000073676" => Ok(Self::N100000073676),
            "100000073677" => Ok(Self::N100000073677),
            "100000073678" => Ok(Self::N100000073678),
            "100000073679" => Ok(Self::N100000073679),
            "100000073680" => Ok(Self::N100000073680),
            "100000073681" => Ok(Self::N100000073681),
            "100000073682" => Ok(Self::N100000073682),
            "100000073683" => Ok(Self::N100000073683),
            "100000073684" => Ok(Self::N100000073684),
            "100000073685" => Ok(Self::N100000073685),
            "100000073686" => Ok(Self::N100000073686),
            "100000073687" => Ok(Self::N100000073687),
            "100000073688" => Ok(Self::N100000073688),
            "100000073689" => Ok(Self::N100000073689),
            "100000073690" => Ok(Self::N100000073690),
            "100000073691" => Ok(Self::N100000073691),
            "100000073692" => Ok(Self::N100000073692),
            "100000073693" => Ok(Self::N100000073693),
            "100000073694" => Ok(Self::N100000073694),
            "100000073695" => Ok(Self::N100000073695),
            "100000073696" => Ok(Self::N100000073696),
            "100000073697" => Ok(Self::N100000073697),
            "100000073698" => Ok(Self::N100000073698),
            "100000073699" => Ok(Self::N100000073699),
            "100000073700" => Ok(Self::N100000073700),
            "100000073701" => Ok(Self::N100000073701),
            "100000073702" => Ok(Self::N100000073702),
            "100000073703" => Ok(Self::N100000073703),
            "100000073704" => Ok(Self::N100000073704),
            "100000073705" => Ok(Self::N100000073705),
            "100000073706" => Ok(Self::N100000073706),
            "100000073707" => Ok(Self::N100000073707),
            "100000073708" => Ok(Self::N100000073708),
            "100000073709" => Ok(Self::N100000073709),
            "100000073710" => Ok(Self::N100000073710),
            "100000073711" => Ok(Self::N100000073711),
            "100000073712" => Ok(Self::N100000073712),
            "100000073713" => Ok(Self::N100000073713),
            "100000073714" => Ok(Self::N100000073714),
            "100000073715" => Ok(Self::N100000073715),
            "100000073716" => Ok(Self::N100000073716),
            "100000073717" => Ok(Self::N100000073717),
            "100000073718" => Ok(Self::N100000073718),
            "100000073719" => Ok(Self::N100000073719),
            "100000073720" => Ok(Self::N100000073720),
            "100000073721" => Ok(Self::N100000073721),
            "100000073722" => Ok(Self::N100000073722),
            "100000073723" => Ok(Self::N100000073723),
            "100000073724" => Ok(Self::N100000073724),
            "100000073725" => Ok(Self::N100000073725),
            "100000073726" => Ok(Self::N100000073726),
            "100000073727" => Ok(Self::N100000073727),
            "100000073728" => Ok(Self::N100000073728),
            "100000073729" => Ok(Self::N100000073729),
            "100000073730" => Ok(Self::N100000073730),
            "100000073731" => Ok(Self::N100000073731),
            "100000073732" => Ok(Self::N100000073732),
            "100000073733" => Ok(Self::N100000073733),
            "100000073734" => Ok(Self::N100000073734),
            "100000073735" => Ok(Self::N100000073735),
            "100000073736" => Ok(Self::N100000073736),
            "100000073737" => Ok(Self::N100000073737),
            "100000073738" => Ok(Self::N100000073738),
            "100000073739" => Ok(Self::N100000073739),
            "100000073740" => Ok(Self::N100000073740),
            "100000073741" => Ok(Self::N100000073741),
            "100000073742" => Ok(Self::N100000073742),
            "100000073743" => Ok(Self::N100000073743),
            "100000073744" => Ok(Self::N100000073744),
            "100000073745" => Ok(Self::N100000073745),
            "100000073746" => Ok(Self::N100000073746),
            "100000073747" => Ok(Self::N100000073747),
            "100000073748" => Ok(Self::N100000073748),
            "100000073749" => Ok(Self::N100000073749),
            "100000073750" => Ok(Self::N100000073750),
            "100000073751" => Ok(Self::N100000073751),
            "100000073752" => Ok(Self::N100000073752),
            "100000073753" => Ok(Self::N100000073753),
            "100000073754" => Ok(Self::N100000073754),
            "100000073755" => Ok(Self::N100000073755),
            "100000073756" => Ok(Self::N100000073756),
            "100000073757" => Ok(Self::N100000073757),
            "100000073758" => Ok(Self::N100000073758),
            "100000073759" => Ok(Self::N100000073759),
            "100000073760" => Ok(Self::N100000073760),
            "100000073761" => Ok(Self::N100000073761),
            "100000073762" => Ok(Self::N100000073762),
            "100000073763" => Ok(Self::N100000073763),
            "100000073764" => Ok(Self::N100000073764),
            "100000073765" => Ok(Self::N100000073765),
            "100000073766" => Ok(Self::N100000073766),
            "100000073767" => Ok(Self::N100000073767),
            "100000073768" => Ok(Self::N100000073768),
            "100000073769" => Ok(Self::N100000073769),
            "100000073770" => Ok(Self::N100000073770),
            "100000073771" => Ok(Self::N100000073771),
            "100000073772" => Ok(Self::N100000073772),
            "100000073773" => Ok(Self::N100000073773),
            "100000073775" => Ok(Self::N100000073775),
            "100000073776" => Ok(Self::N100000073776),
            "100000073777" => Ok(Self::N100000073777),
            "100000073778" => Ok(Self::N100000073778),
            "100000073779" => Ok(Self::N100000073779),
            "100000073780" => Ok(Self::N100000073780),
            "100000073782" => Ok(Self::N100000073782),
            "100000073783" => Ok(Self::N100000073783),
            "100000073784" => Ok(Self::N100000073784),
            "100000073785" => Ok(Self::N100000073785),
            "100000073786" => Ok(Self::N100000073786),
            "100000073787" => Ok(Self::N100000073787),
            "100000073788" => Ok(Self::N100000073788),
            "100000073789" => Ok(Self::N100000073789),
            "100000073790" => Ok(Self::N100000073790),
            "100000073791" => Ok(Self::N100000073791),
            "100000073792" => Ok(Self::N100000073792),
            "100000073793" => Ok(Self::N100000073793),
            "100000073794" => Ok(Self::N100000073794),
            "100000073795" => Ok(Self::N100000073795),
            "100000073796" => Ok(Self::N100000073796),
            "100000073797" => Ok(Self::N100000073797),
            "100000073798" => Ok(Self::N100000073798),
            "100000073799" => Ok(Self::N100000073799),
            "100000073800" => Ok(Self::N100000073800),
            "100000073802" => Ok(Self::N100000073802),
            "100000073803" => Ok(Self::N100000073803),
            "100000073804" => Ok(Self::N100000073804),
            "100000073805" => Ok(Self::N100000073805),
            "100000073806" => Ok(Self::N100000073806),
            "100000073807" => Ok(Self::N100000073807),
            "100000073808" => Ok(Self::N100000073808),
            "100000073809" => Ok(Self::N100000073809),
            "100000073810" => Ok(Self::N100000073810),
            "100000073811" => Ok(Self::N100000073811),
            "100000073812" => Ok(Self::N100000073812),
            "100000073813" => Ok(Self::N100000073813),
            "100000073814" => Ok(Self::N100000073814),
            "100000073815" => Ok(Self::N100000073815),
            "100000073816" => Ok(Self::N100000073816),
            "100000073817" => Ok(Self::N100000073817),
            "100000073818" => Ok(Self::N100000073818),
            "100000073819" => Ok(Self::N100000073819),
            "100000073820" => Ok(Self::N100000073820),
            "100000073821" => Ok(Self::N100000073821),
            "100000073822" => Ok(Self::N100000073822),
            "100000073823" => Ok(Self::N100000073823),
            "100000073824" => Ok(Self::N100000073824),
            "100000073825" => Ok(Self::N100000073825),
            "100000073826" => Ok(Self::N100000073826),
            "100000073827" => Ok(Self::N100000073827),
            "100000073863" => Ok(Self::N100000073863),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ManufacturedDoseForm {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000073362 => "100000073362",
            Self::N100000073363 => "100000073363",
            Self::N100000073364 => "100000073364",
            Self::N100000073365 => "100000073365",
            Self::N100000073367 => "100000073367",
            Self::N100000073368 => "100000073368",
            Self::N100000073369 => "100000073369",
            Self::N100000073370 => "100000073370",
            Self::N100000073371 => "100000073371",
            Self::N100000073372 => "100000073372",
            Self::N100000073373 => "100000073373",
            Self::N100000073374 => "100000073374",
            Self::N100000073375 => "100000073375",
            Self::N100000073376 => "100000073376",
            Self::N100000073377 => "100000073377",
            Self::N100000073378 => "100000073378",
            Self::N100000073379 => "100000073379",
            Self::N100000073380 => "100000073380",
            Self::N100000073642 => "100000073642",
            Self::N100000073643 => "100000073643",
            Self::N100000073644 => "100000073644",
            Self::N100000073645 => "100000073645",
            Self::N100000073646 => "100000073646",
            Self::N100000073647 => "100000073647",
            Self::N100000073648 => "100000073648",
            Self::N100000073649 => "100000073649",
            Self::N100000073650 => "100000073650",
            Self::N100000073652 => "100000073652",
            Self::N100000073653 => "100000073653",
            Self::N100000073654 => "100000073654",
            Self::N100000073655 => "100000073655",
            Self::N100000073656 => "100000073656",
            Self::N100000073657 => "100000073657",
            Self::N100000073658 => "100000073658",
            Self::N100000073659 => "100000073659",
            Self::N100000073660 => "100000073660",
            Self::N100000073661 => "100000073661",
            Self::N100000073662 => "100000073662",
            Self::N100000073663 => "100000073663",
            Self::N100000073664 => "100000073664",
            Self::N100000073665 => "100000073665",
            Self::N100000073666 => "100000073666",
            Self::N100000073667 => "100000073667",
            Self::N100000073668 => "100000073668",
            Self::N100000073669 => "100000073669",
            Self::N100000073670 => "100000073670",
            Self::N100000073671 => "100000073671",
            Self::N100000073672 => "100000073672",
            Self::N100000073673 => "100000073673",
            Self::N100000073674 => "100000073674",
            Self::N100000073675 => "100000073675",
            Self::N100000073676 => "100000073676",
            Self::N100000073677 => "100000073677",
            Self::N100000073678 => "100000073678",
            Self::N100000073679 => "100000073679",
            Self::N100000073680 => "100000073680",
            Self::N100000073681 => "100000073681",
            Self::N100000073682 => "100000073682",
            Self::N100000073683 => "100000073683",
            Self::N100000073684 => "100000073684",
            Self::N100000073685 => "100000073685",
            Self::N100000073686 => "100000073686",
            Self::N100000073687 => "100000073687",
            Self::N100000073688 => "100000073688",
            Self::N100000073689 => "100000073689",
            Self::N100000073690 => "100000073690",
            Self::N100000073691 => "100000073691",
            Self::N100000073692 => "100000073692",
            Self::N100000073693 => "100000073693",
            Self::N100000073694 => "100000073694",
            Self::N100000073695 => "100000073695",
            Self::N100000073696 => "100000073696",
            Self::N100000073697 => "100000073697",
            Self::N100000073698 => "100000073698",
            Self::N100000073699 => "100000073699",
            Self::N100000073700 => "100000073700",
            Self::N100000073701 => "100000073701",
            Self::N100000073702 => "100000073702",
            Self::N100000073703 => "100000073703",
            Self::N100000073704 => "100000073704",
            Self::N100000073705 => "100000073705",
            Self::N100000073706 => "100000073706",
            Self::N100000073707 => "100000073707",
            Self::N100000073708 => "100000073708",
            Self::N100000073709 => "100000073709",
            Self::N100000073710 => "100000073710",
            Self::N100000073711 => "100000073711",
            Self::N100000073712 => "100000073712",
            Self::N100000073713 => "100000073713",
            Self::N100000073714 => "100000073714",
            Self::N100000073715 => "100000073715",
            Self::N100000073716 => "100000073716",
            Self::N100000073717 => "100000073717",
            Self::N100000073718 => "100000073718",
            Self::N100000073719 => "100000073719",
            Self::N100000073720 => "100000073720",
            Self::N100000073721 => "100000073721",
            Self::N100000073722 => "100000073722",
            Self::N100000073723 => "100000073723",
            Self::N100000073724 => "100000073724",
            Self::N100000073725 => "100000073725",
            Self::N100000073726 => "100000073726",
            Self::N100000073727 => "100000073727",
            Self::N100000073728 => "100000073728",
            Self::N100000073729 => "100000073729",
            Self::N100000073730 => "100000073730",
            Self::N100000073731 => "100000073731",
            Self::N100000073732 => "100000073732",
            Self::N100000073733 => "100000073733",
            Self::N100000073734 => "100000073734",
            Self::N100000073735 => "100000073735",
            Self::N100000073736 => "100000073736",
            Self::N100000073737 => "100000073737",
            Self::N100000073738 => "100000073738",
            Self::N100000073739 => "100000073739",
            Self::N100000073740 => "100000073740",
            Self::N100000073741 => "100000073741",
            Self::N100000073742 => "100000073742",
            Self::N100000073743 => "100000073743",
            Self::N100000073744 => "100000073744",
            Self::N100000073745 => "100000073745",
            Self::N100000073746 => "100000073746",
            Self::N100000073747 => "100000073747",
            Self::N100000073748 => "100000073748",
            Self::N100000073749 => "100000073749",
            Self::N100000073750 => "100000073750",
            Self::N100000073751 => "100000073751",
            Self::N100000073752 => "100000073752",
            Self::N100000073753 => "100000073753",
            Self::N100000073754 => "100000073754",
            Self::N100000073755 => "100000073755",
            Self::N100000073756 => "100000073756",
            Self::N100000073757 => "100000073757",
            Self::N100000073758 => "100000073758",
            Self::N100000073759 => "100000073759",
            Self::N100000073760 => "100000073760",
            Self::N100000073761 => "100000073761",
            Self::N100000073762 => "100000073762",
            Self::N100000073763 => "100000073763",
            Self::N100000073764 => "100000073764",
            Self::N100000073765 => "100000073765",
            Self::N100000073766 => "100000073766",
            Self::N100000073767 => "100000073767",
            Self::N100000073768 => "100000073768",
            Self::N100000073769 => "100000073769",
            Self::N100000073770 => "100000073770",
            Self::N100000073771 => "100000073771",
            Self::N100000073772 => "100000073772",
            Self::N100000073773 => "100000073773",
            Self::N100000073775 => "100000073775",
            Self::N100000073776 => "100000073776",
            Self::N100000073777 => "100000073777",
            Self::N100000073778 => "100000073778",
            Self::N100000073779 => "100000073779",
            Self::N100000073780 => "100000073780",
            Self::N100000073782 => "100000073782",
            Self::N100000073783 => "100000073783",
            Self::N100000073784 => "100000073784",
            Self::N100000073785 => "100000073785",
            Self::N100000073786 => "100000073786",
            Self::N100000073787 => "100000073787",
            Self::N100000073788 => "100000073788",
            Self::N100000073789 => "100000073789",
            Self::N100000073790 => "100000073790",
            Self::N100000073791 => "100000073791",
            Self::N100000073792 => "100000073792",
            Self::N100000073793 => "100000073793",
            Self::N100000073794 => "100000073794",
            Self::N100000073795 => "100000073795",
            Self::N100000073796 => "100000073796",
            Self::N100000073797 => "100000073797",
            Self::N100000073798 => "100000073798",
            Self::N100000073799 => "100000073799",
            Self::N100000073800 => "100000073800",
            Self::N100000073802 => "100000073802",
            Self::N100000073803 => "100000073803",
            Self::N100000073804 => "100000073804",
            Self::N100000073805 => "100000073805",
            Self::N100000073806 => "100000073806",
            Self::N100000073807 => "100000073807",
            Self::N100000073808 => "100000073808",
            Self::N100000073809 => "100000073809",
            Self::N100000073810 => "100000073810",
            Self::N100000073811 => "100000073811",
            Self::N100000073812 => "100000073812",
            Self::N100000073813 => "100000073813",
            Self::N100000073814 => "100000073814",
            Self::N100000073815 => "100000073815",
            Self::N100000073816 => "100000073816",
            Self::N100000073817 => "100000073817",
            Self::N100000073818 => "100000073818",
            Self::N100000073819 => "100000073819",
            Self::N100000073820 => "100000073820",
            Self::N100000073821 => "100000073821",
            Self::N100000073822 => "100000073822",
            Self::N100000073823 => "100000073823",
            Self::N100000073824 => "100000073824",
            Self::N100000073825 => "100000073825",
            Self::N100000073826 => "100000073826",
            Self::N100000073827 => "100000073827",
            Self::N100000073863 => "100000073863",
        }
    }
}
impl ::std::fmt::Debug for ManufacturedDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ManufacturedDoseForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ManufacturedDoseForm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ManufacturedDoseForm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ManufacturedDoseForm> for Coding {
    fn from(code: ManufacturedDoseForm) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/manufactured-dose-form".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ManufacturedDoseForm> for CodeableConcept {
    fn from(code: ManufacturedDoseForm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureAggregateMethod](http://hl7.org/fhir/ValueSet/aggregate-method)**. Aggregation method for a measure (e.g. sum, average, median, minimum, maximum, count)\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureAggregateMethod {
    /** **average**

Average. The measure score is determined by taking the average of the observations derived from the measure population. */
    Average,
    /** **count**

Count. The measure score is determined as the number of observations derived from the measure population. */
    Count,
    /** **maximum**

Maximum. The measure score is determined by taking the maximum of the observations derived from the measure population. */
    Maximum,
    /** **median**

Median. The measure score is determined by taking the median of the observations derived from the measure population. */
    Median,
    /** **minimum**

Minimum. The measure score is determined by taking the minimum of the observations derived from the measure population. */
    Minimum,
    /** **sum**

Sum. The measure score is determined by adding together the observations derived from the measure population. */
    Sum,
}
impl ::core::str::FromStr for MeasureAggregateMethod {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "average" => Ok(Self::Average),
            "count" => Ok(Self::Count),
            "maximum" => Ok(Self::Maximum),
            "median" => Ok(Self::Median),
            "minimum" => Ok(Self::Minimum),
            "sum" => Ok(Self::Sum),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureAggregateMethod {
    fn as_ref(&self) -> &str {
        match self {
            Self::Average => "average",
            Self::Count => "count",
            Self::Maximum => "maximum",
            Self::Median => "median",
            Self::Minimum => "minimum",
            Self::Sum => "sum",
        }
    }
}
impl ::std::fmt::Debug for MeasureAggregateMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureAggregateMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureAggregateMethod {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureAggregateMethod {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureAggregateMethod> for Coding {
    fn from(code: MeasureAggregateMethod) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/aggregate-method".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureAggregateMethod> for CodeableConcept {
    fn from(code: MeasureAggregateMethod) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureDefinitionExample](http://hl7.org/fhir/ValueSet/measure-definition-example)**. Example Measure Definitions for the Measure Resource.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureDefinitionExample {
    /** **screening**

Screening. Completion of a clinical or diagnostic tool used to identify people at risk of developing or having a certain disease or condition, even in the absence of symptoms. */
    Screening,
    /** **standardized-depression-screening-tool**

Standardized Depression Screening Tool. A normalized and validated depression screening tool developed for the patient population in which it is being utilized. */
    StandardizedDepressionScreeningTool,
}
impl ::core::str::FromStr for MeasureDefinitionExample {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "screening" => Ok(Self::Screening),
            "standardized-depression-screening-tool" => {
                Ok(Self::StandardizedDepressionScreeningTool)
            }
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureDefinitionExample {
    fn as_ref(&self) -> &str {
        match self {
            Self::Screening => "screening",
            Self::StandardizedDepressionScreeningTool => {
                "standardized-depression-screening-tool"
            }
        }
    }
}
impl ::std::fmt::Debug for MeasureDefinitionExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureDefinitionExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureDefinitionExample {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureDefinitionExample {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureDefinitionExample> for Coding {
    fn from(code: MeasureDefinitionExample) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measure-definition-example".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureDefinitionExample> for CodeableConcept {
    fn from(code: MeasureDefinitionExample) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureGroupExample](http://hl7.org/fhir/ValueSet/measure-group-example)**. Example Measure Groups for the Measure Resource.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureGroupExample {
    /** **primary-rate**

Primary Rate. Primary Measure Group. */
    PrimaryRate,
    /** **secondary-rate**

Secondary Rate. Secondary Measure Group */
    SecondaryRate,
}
impl ::core::str::FromStr for MeasureGroupExample {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "primary-rate" => Ok(Self::PrimaryRate),
            "secondary-rate" => Ok(Self::SecondaryRate),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureGroupExample {
    fn as_ref(&self) -> &str {
        match self {
            Self::PrimaryRate => "primary-rate",
            Self::SecondaryRate => "secondary-rate",
        }
    }
}
impl ::std::fmt::Debug for MeasureGroupExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureGroupExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureGroupExample {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureGroupExample {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureGroupExample> for Coding {
    fn from(code: MeasureGroupExample) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measure-group-example".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureGroupExample> for CodeableConcept {
    fn from(code: MeasureGroupExample) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureReportStatus](http://hl7.org/fhir/ValueSet/measure-report-status)**. The status of the measure report.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureReportStatus {
    /** **complete**

Complete. The report is complete and ready for use. */
    Complete,
    /** **error**

Error. An error occurred attempting to generate the report. */
    Error,
    /** **pending**

Pending. The report is currently being generated. */
    Pending,
}
impl ::core::str::FromStr for MeasureReportStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            "error" => Ok(Self::Error),
            "pending" => Ok(Self::Pending),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureReportStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::Error => "error",
            Self::Pending => "pending",
        }
    }
}
impl ::std::fmt::Debug for MeasureReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureReportStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureReportStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureReportStatus> for Coding {
    fn from(code: MeasureReportStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measure-report-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureReportStatus> for CodeableConcept {
    fn from(code: MeasureReportStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureReportStratifierValueExample](http://hl7.org/fhir/ValueSet/measurereport-stratifier-value-example)**. Example Region Value Measure Groups for the Measure Resource.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureReportStratifierValueExample {
    /** **northeast**

Northeast. Northeast region stratification. */
    Northeast,
    /** **northwest**

Northwest. Northwest region stratification. */
    Northwest,
    /** **southeast**

Southeast. Southeast region stratification. */
    Southeast,
    /** **southwest**

Soutwest. Soutwest region stratification. */
    Southwest,
}
impl ::core::str::FromStr for MeasureReportStratifierValueExample {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "northeast" => Ok(Self::Northeast),
            "northwest" => Ok(Self::Northwest),
            "southeast" => Ok(Self::Southeast),
            "southwest" => Ok(Self::Southwest),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureReportStratifierValueExample {
    fn as_ref(&self) -> &str {
        match self {
            Self::Northeast => "northeast",
            Self::Northwest => "northwest",
            Self::Southeast => "southeast",
            Self::Southwest => "southwest",
        }
    }
}
impl ::std::fmt::Debug for MeasureReportStratifierValueExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureReportStratifierValueExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureReportStratifierValueExample {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureReportStratifierValueExample {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureReportStratifierValueExample> for Coding {
    fn from(code: MeasureReportStratifierValueExample) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measurereport-stratifier-value-example"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureReportStratifierValueExample> for CodeableConcept {
    fn from(code: MeasureReportStratifierValueExample) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureReportType](http://hl7.org/fhir/ValueSet/measure-report-type)**. The type of the measure report.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureReportType {
    /** **data-exchange**

Data Exchange. A data exchange report that contains data-of-interest for the measure (i.e. data that is needed to calculate the measure) */
    DataExchange,
    /** **individual**

Individual. An individual report that provides information on the performance for a given measure with respect to a single subject. */
    Individual,
    /** **subject-list**

Subject List. A subject list report that includes a listing of subjects that satisfied each population criteria in the measure. */
    SubjectList,
    /** **summary**

Summary. A summary report that returns the number of members in each population criteria for the measure. */
    Summary,
}
impl ::core::str::FromStr for MeasureReportType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "data-exchange" => Ok(Self::DataExchange),
            "individual" => Ok(Self::Individual),
            "subject-list" => Ok(Self::SubjectList),
            "summary" => Ok(Self::Summary),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureReportType {
    fn as_ref(&self) -> &str {
        match self {
            Self::DataExchange => "data-exchange",
            Self::Individual => "individual",
            Self::SubjectList => "subject-list",
            Self::Summary => "summary",
        }
    }
}
impl ::std::fmt::Debug for MeasureReportType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureReportType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureReportType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureReportType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureReportType> for Coding {
    fn from(code: MeasureReportType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/measure-report-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureReportType> for CodeableConcept {
    fn from(code: MeasureReportType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureStratifierExample](http://hl7.org/fhir/ValueSet/measure-stratifier-example)**. Identifier subgroups in a population for measuring purposes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureStratifierExample {
    /** **age**

Age. Age Stratification. */
    Age,
    /** **gender**

Gender. Gender Stratification. */
    Gender,
    /** **region**

Region. Region Stratification. */
    Region,
}
impl ::core::str::FromStr for MeasureStratifierExample {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "age" => Ok(Self::Age),
            "gender" => Ok(Self::Gender),
            "region" => Ok(Self::Region),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureStratifierExample {
    fn as_ref(&self) -> &str {
        match self {
            Self::Age => "age",
            Self::Gender => "gender",
            Self::Region => "region",
        }
    }
}
impl ::std::fmt::Debug for MeasureStratifierExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureStratifierExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureStratifierExample {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureStratifierExample {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureStratifierExample> for Coding {
    fn from(code: MeasureStratifierExample) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measure-stratifier-example".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureStratifierExample> for CodeableConcept {
    fn from(code: MeasureStratifierExample) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MeasureSupplementalDataExample](http://hl7.org/fhir/ValueSet/measure-supplemental-data-example)**. Identifier supplemental data in a population for measuring purposes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MeasureSupplementalDataExample {
    /** **age**

Age. Age Supplemental Data. */
    Age,
    /** **ethnicity**

Ethnicity. Ethnicity Supplemental Data . */
    Ethnicity,
    /** **gender**

Gender. Gender Supplemental Data . */
    Gender,
    /** **payer**

Payer. Payer Supplemental Data. */
    Payer,
}
impl ::core::str::FromStr for MeasureSupplementalDataExample {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "age" => Ok(Self::Age),
            "ethnicity" => Ok(Self::Ethnicity),
            "gender" => Ok(Self::Gender),
            "payer" => Ok(Self::Payer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MeasureSupplementalDataExample {
    fn as_ref(&self) -> &str {
        match self {
            Self::Age => "age",
            Self::Ethnicity => "ethnicity",
            Self::Gender => "gender",
            Self::Payer => "payer",
        }
    }
}
impl ::std::fmt::Debug for MeasureSupplementalDataExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MeasureSupplementalDataExample {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MeasureSupplementalDataExample {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MeasureSupplementalDataExample {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MeasureSupplementalDataExample> for Coding {
    fn from(code: MeasureSupplementalDataExample) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/measure-supplemental-data-example"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MeasureSupplementalDataExample> for CodeableConcept {
    fn from(code: MeasureSupplementalDataExample) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedDispenseAdminLocationCodes](http://hl7.org/fhir/ValueSet/medicationdispense-admin-location)**. Medication Dispense Administration Location Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedDispenseAdminLocationCodes {
    /** **community**

Community. Includes dispenses for medications to be administered or consumed by the patient in their home (this would include long term care or nursing homes, hospices, etc.). */
    Community,
    /** **inpatient**

Inpatient. Includes dispenses for medications to be administered or consumed in an inpatient or acute care setting. */
    Inpatient,
    /** **outpatient**

Outpatient. Includes dispenses for medications to be administered or consumed in an outpatient setting (for example, Emergency Department, Outpatient Clinic, Outpatient Surgery, Doctor's office). */
    Outpatient,
}
impl ::core::str::FromStr for MedDispenseAdminLocationCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "community" => Ok(Self::Community),
            "inpatient" => Ok(Self::Inpatient),
            "outpatient" => Ok(Self::Outpatient),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedDispenseAdminLocationCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Community => "community",
            Self::Inpatient => "inpatient",
            Self::Outpatient => "outpatient",
        }
    }
}
impl ::std::fmt::Debug for MedDispenseAdminLocationCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedDispenseAdminLocationCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedDispenseAdminLocationCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedDispenseAdminLocationCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedDispenseAdminLocationCodes> for Coding {
    fn from(code: MedDispenseAdminLocationCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationdispense-admin-location"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedDispenseAdminLocationCodes> for CodeableConcept {
    fn from(code: MedDispenseAdminLocationCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationAdministrationStatusCodes](http://hl7.org/fhir/ValueSet/medication-admin-status)**. MedicationAdministration Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationAdministrationStatusCodes {
    /** **completed**

Completed. All actions that are implied by the administration have occurred. */
    Completed,
    /** **entered-in-error**

Entered in Error. The administration was entered in error and therefore nullified. */
    EnteredInError,
    /** **in-progress**

In Progress. The administration has started but has not yet completed. */
    InProgress,
    /** **not-done**

Not Done. The administration was terminated prior to any impact on the subject (though preparatory actions may have been taken) */
    NotDone,
    /** **on-hold**

On Hold. Actions implied by the administration have been temporarily halted, but are expected to continue later. May also be called 'suspended'. */
    OnHold,
    /** **stopped**

Stopped. Actions implied by the administration have been permanently halted, before all of them occurred. */
    Stopped,
    /** **unknown**

Unknown. The authoring system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for MedicationAdministrationStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "not-done" => Ok(Self::NotDone),
            "on-hold" => Ok(Self::OnHold),
            "stopped" => Ok(Self::Stopped),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationAdministrationStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::NotDone => "not-done",
            Self::OnHold => "on-hold",
            Self::Stopped => "stopped",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for MedicationAdministrationStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationAdministrationStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationAdministrationStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationAdministrationStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationAdministrationStatusCodes> for Coding {
    fn from(code: MedicationAdministrationStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-admin-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationAdministrationStatusCodes> for CodeableConcept {
    fn from(code: MedicationAdministrationStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationCostCategoryCodes](http://hl7.org/fhir/ValueSet/medication-cost-category)**. Medication Cost Category Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationCostCategoryCodes {
    /** **banda**

Band A. Tier A cost for this medication */
    Banda,
    /** **bandb**

Band B. Tier B cost for this medication */
    Bandb,
}
impl ::core::str::FromStr for MedicationCostCategoryCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "banda" => Ok(Self::Banda),
            "bandb" => Ok(Self::Bandb),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationCostCategoryCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Banda => "banda",
            Self::Bandb => "bandb",
        }
    }
}
impl ::std::fmt::Debug for MedicationCostCategoryCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationCostCategoryCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationCostCategoryCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationCostCategoryCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationCostCategoryCodes> for Coding {
    fn from(code: MedicationCostCategoryCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-cost-category".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationCostCategoryCodes> for CodeableConcept {
    fn from(code: MedicationCostCategoryCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationDispenseStatusCodes](http://hl7.org/fhir/ValueSet/medicationDispense-status)**. Medication Dispense Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationDispenseStatusCodes {
    /** **cancelled**

Cancelled. The dispensed product was not and will never be picked up by the patient. */
    Cancelled,
    /** **completed**

Completed. The dispensed product has been picked up. */
    Completed,
    /** **declined**

Declined. The dispense was declined and not performed. */
    Declined,
    /** **entered-in-error**

Entered in Error. The dispense was entered in error and therefore nullified. */
    EnteredInError,
    /** **in-progress**

In Progress. The dispensed product is ready for pickup. */
    InProgress,
    /** **on-hold**

On Hold. The dispense process is paused while waiting for an external event to reactivate the dispense.  For example, new stock has arrived or the prescriber has called. */
    OnHold,
    /** **preparation**

Preparation. The core event has not started yet, but some staging activities have begun (e.g. initial compounding or packaging of medication). Preparation stages may be tracked for billing purposes. */
    Preparation,
    /** **stopped**

Stopped. Actions implied by the dispense have been permanently halted, before all of them occurred. */
    Stopped,
    /** **unknown**

Unknown. The authoring system does not know which of the status values applies for this medication dispense.  Note: this concept is not to be used for other - one of the listed statuses is presumed to apply, it's just now known which one. */
    Unknown,
}
impl ::core::str::FromStr for MedicationDispenseStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "declined" => Ok(Self::Declined),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "on-hold" => Ok(Self::OnHold),
            "preparation" => Ok(Self::Preparation),
            "stopped" => Ok(Self::Stopped),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationDispenseStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Declined => "declined",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::OnHold => "on-hold",
            Self::Preparation => "preparation",
            Self::Stopped => "stopped",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for MedicationDispenseStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationDispenseStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationDispenseStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationDispenseStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationDispenseStatusCodes> for Coding {
    fn from(code: MedicationDispenseStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationDispense-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationDispenseStatusCodes> for CodeableConcept {
    fn from(code: MedicationDispenseStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationDispenseStatusReasonCodes](http://hl7.org/fhir/ValueSet/medicationdispense-status-reason)**. Medication Dispense Status Reason Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationDispenseStatusReasonCodes {
    /** **altchoice**

Try another treatment first. This therapy has been ordered as a backup to a preferred therapy. This order will be released when and if the preferred therapy is unsuccessful. */
    Altchoice,
    /** **clarif**

Prescription/Request requires clarification. Clarification is required before the order can be acted upon. */
    Clarif,
    /** **drughigh**

Drug level too high. The current level of the medication in the patient's system is too high. The medication is suspended to allow the level to subside to a safer level. */
    Drughigh,
    /** **frr01**

Order Stopped. The order has been stopped by the prescriber but this fact has not necessarily captured electronically. Example: A verbal stop, a fax, etc. */
    Frr01,
    /** **frr02**

Stale-dated Order. Order has not been fulfilled within a reasonable amount of time, and might not be current. */
    Frr02,
    /** **frr03**

Incomplete data. Data needed to safely act on the order which was expected to become available independent of the order is not yet available. Example: Lab results, diagnostic imaging, etc. */
    Frr03,
    /** **frr04**

Product unavailable. Product not available or manufactured. Cannot supply. */
    Frr04,
    /** **frr05**

Ethical/religious. The dispenser has ethical, religious or moral objections to fulfilling the order/dispensing the product. */
    Frr05,
    /** **frr06**

Unable to provide care. Fulfiller not able to provide appropriate care associated with fulfilling the order. Example: Therapy requires ongoing monitoring by fulfiller and fulfiller will be ending practice, leaving town, unable to schedule necessary time, etc. */
    Frr06,
    /** **hospadm**

Admission to hospital. The patient has been admitted to a care facility and their community medications are suspended until hospital discharge. */
    Hospadm,
    /** **labint**

Lab interference issues. The therapy would interfere with a planned lab test and the therapy is being withdrawn until the test is completed. */
    Labint,
    /** **non-avail**

Patient not available. Patient not available for a period of time due to a scheduled therapy, leave of absence or other reason. */
    NonAvail,
    /** **offmarket**

Drug not available - off market. Drug no longer marketed Cannot supply. */
    Offmarket,
    /** **outofstock**

Drug not available - out of stock. Drug out of stock. Cannot supply. */
    Outofstock,
    /** **preg**

Patient is pregnant or breastfeeding. The patient is pregnant or breast feeding. The therapy will be resumed when the pregnancy is complete and the patient is no longer breastfeeding. */
    Preg,
    /** **saig**

Allergy. The patient is believed to be allergic to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. */
    Saig,
    /** **sddi**

Drug interacts with another drug. The drug interacts with a short-term treatment that is more urgently required. This order will be resumed when the short-term treatment is complete. */
    Sddi,
    /** **sdupther**

Duplicate therapy. Another short-term co-occurring therapy fulfills the same purpose as this therapy. This therapy will be resumed when the co-occuring therapy is complete. */
    Sdupther,
    /** **sintol**

Suspected intolerance. The patient is believed to have an intolerance to a substance that is part of the therapy and the therapy is being temporarily withdrawn to confirm. */
    Sintol,
    /** **surg**

Patient scheduled for surgery. The drug is contraindicated for patients receiving surgery and the patient is scheduled to be admitted for surgery in the near future. The drug will be resumed when the patient has sufficiently recovered from the surgery. */
    Surg,
    /** **washout**

Washout. The patient was previously receiving a medication contraindicated with the current medication. The current medication will remain on hold until the prior medication has been cleansed from their system. */
    Washout,
}
impl ::core::str::FromStr for MedicationDispenseStatusReasonCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "altchoice" => Ok(Self::Altchoice),
            "clarif" => Ok(Self::Clarif),
            "drughigh" => Ok(Self::Drughigh),
            "frr01" => Ok(Self::Frr01),
            "frr02" => Ok(Self::Frr02),
            "frr03" => Ok(Self::Frr03),
            "frr04" => Ok(Self::Frr04),
            "frr05" => Ok(Self::Frr05),
            "frr06" => Ok(Self::Frr06),
            "hospadm" => Ok(Self::Hospadm),
            "labint" => Ok(Self::Labint),
            "non-avail" => Ok(Self::NonAvail),
            "offmarket" => Ok(Self::Offmarket),
            "outofstock" => Ok(Self::Outofstock),
            "preg" => Ok(Self::Preg),
            "saig" => Ok(Self::Saig),
            "sddi" => Ok(Self::Sddi),
            "sdupther" => Ok(Self::Sdupther),
            "sintol" => Ok(Self::Sintol),
            "surg" => Ok(Self::Surg),
            "washout" => Ok(Self::Washout),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationDispenseStatusReasonCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Altchoice => "altchoice",
            Self::Clarif => "clarif",
            Self::Drughigh => "drughigh",
            Self::Frr01 => "frr01",
            Self::Frr02 => "frr02",
            Self::Frr03 => "frr03",
            Self::Frr04 => "frr04",
            Self::Frr05 => "frr05",
            Self::Frr06 => "frr06",
            Self::Hospadm => "hospadm",
            Self::Labint => "labint",
            Self::NonAvail => "non-avail",
            Self::Offmarket => "offmarket",
            Self::Outofstock => "outofstock",
            Self::Preg => "preg",
            Self::Saig => "saig",
            Self::Sddi => "sddi",
            Self::Sdupther => "sdupther",
            Self::Sintol => "sintol",
            Self::Surg => "surg",
            Self::Washout => "washout",
        }
    }
}
impl ::std::fmt::Debug for MedicationDispenseStatusReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationDispenseStatusReasonCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationDispenseStatusReasonCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationDispenseStatusReasonCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationDispenseStatusReasonCodes> for Coding {
    fn from(code: MedicationDispenseStatusReasonCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationdispense-status-reason"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationDispenseStatusReasonCodes> for CodeableConcept {
    fn from(code: MedicationDispenseStatusReasonCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationDoseAid](http://hl7.org/fhir/ValueSet/medication-dose-aid)**. Medication dose aid\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationDoseAid {
    /** **blisterpack**

Blister Pack. A type of packaging in which a medication is sealed in plastic, often with a cardboard backing. */
    Blisterpack,
    /** **dosette**

Dosette. A box or tray that organizes mediations into separate compartments */
    Dosette,
    /** **sachets**

Sachets. A small packet that contains medication for individual use. */
    Sachets,
}
impl ::core::str::FromStr for MedicationDoseAid {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "blisterpack" => Ok(Self::Blisterpack),
            "dosette" => Ok(Self::Dosette),
            "sachets" => Ok(Self::Sachets),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationDoseAid {
    fn as_ref(&self) -> &str {
        match self {
            Self::Blisterpack => "blisterpack",
            Self::Dosette => "dosette",
            Self::Sachets => "sachets",
        }
    }
}
impl ::std::fmt::Debug for MedicationDoseAid {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationDoseAid {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationDoseAid {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationDoseAid {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationDoseAid> for Coding {
    fn from(code: MedicationDoseAid) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/medication-dose-aid".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationDoseAid> for CodeableConcept {
    fn from(code: MedicationDoseAid) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationIngredientStrengthCodes](http://hl7.org/fhir/ValueSet/medication-ingredientstrength)**. Medication Ingredient Strength Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationIngredientStrengthCodes {
    /** **qs**

QS. As much as is sufficient. */
    Qs,
    /** **trace**

Trace. Very small amount. */
    Trace,
}
impl ::core::str::FromStr for MedicationIngredientStrengthCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "qs" => Ok(Self::Qs),
            "trace" => Ok(Self::Trace),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationIngredientStrengthCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Qs => "qs",
            Self::Trace => "trace",
        }
    }
}
impl ::std::fmt::Debug for MedicationIngredientStrengthCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationIngredientStrengthCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationIngredientStrengthCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationIngredientStrengthCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationIngredientStrengthCodes> for Coding {
    fn from(code: MedicationIngredientStrengthCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-ingredientstrength".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationIngredientStrengthCodes> for CodeableConcept {
    fn from(code: MedicationIngredientStrengthCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationIntendedPerformerRole](http://hl7.org/fhir/ValueSet/medication-intended-performer-role)**. Medication Intended Performer Role\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationIntendedPerformerRole {
    /** **oncologynurse**

Oncology Nurse. */
    Oncologynurse,
    /** **paincontrolnurse**

Pain Control Nurse. */
    Paincontrolnurse,
    /** **pharmacist**

Pharmacist. */
    Pharmacist,
    /** **physician**

Physician. */
    Physician,
    /** **registerednurse**

Registered Nurse. */
    Registerednurse,
}
impl ::core::str::FromStr for MedicationIntendedPerformerRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "oncologynurse" => Ok(Self::Oncologynurse),
            "paincontrolnurse" => Ok(Self::Paincontrolnurse),
            "pharmacist" => Ok(Self::Pharmacist),
            "physician" => Ok(Self::Physician),
            "registerednurse" => Ok(Self::Registerednurse),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationIntendedPerformerRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Oncologynurse => "oncologynurse",
            Self::Paincontrolnurse => "paincontrolnurse",
            Self::Pharmacist => "pharmacist",
            Self::Physician => "physician",
            Self::Registerednurse => "registerednurse",
        }
    }
}
impl ::std::fmt::Debug for MedicationIntendedPerformerRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationIntendedPerformerRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationIntendedPerformerRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationIntendedPerformerRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationIntendedPerformerRole> for Coding {
    fn from(code: MedicationIntendedPerformerRole) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-intended-performer-role"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationIntendedPerformerRole> for CodeableConcept {
    fn from(code: MedicationIntendedPerformerRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationKnowledgeStatusCodes](http://hl7.org/fhir/ValueSet/medicationknowledge-status)**. MedicationKnowledge Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationKnowledgeStatusCodes {
    /** **active**

Active. The medication referred to by this MedicationKnowledge is in active use within the drug database or inventory system. */
    Active,
    /** **entered-in-error**

Entered in Error. The medication referred to by this MedicationKnowledge was entered in error within the drug database or inventory system. */
    EnteredInError,
    /** **inactive**

Inactive. The medication referred to by this MedicationKnowledge is not in active use within the drug database or inventory system. */
    Inactive,
}
impl ::core::str::FromStr for MedicationKnowledgeStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationKnowledgeStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for MedicationKnowledgeStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationKnowledgeStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationKnowledgeStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationKnowledgeStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationKnowledgeStatusCodes> for Coding {
    fn from(code: MedicationKnowledgeStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationknowledge-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationKnowledgeStatusCodes> for CodeableConcept {
    fn from(code: MedicationKnowledgeStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationRequestIntentCodes](http://hl7.org/fhir/ValueSet/medicationrequest-intent)**. MedicationRequest Intent Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationRequestIntentCodes {
    /** **filler-order**

Filler Order. The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order. */
    FillerOrder,
    /** **instance-order**

Instance Order. The request represents an instance for the particular order and is used to generate a schedule of requests on a medication administration record (MAR). */
    InstanceOrder,
    /** **option**

Option. The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or  other constraints among a set of requests. */
    Option,
    /** **order**

Order. The request represents a request/demand and authorization for action */
    Order,
    /** **original-order**

Original Order. The request represents the original authorization for the medication request. */
    OriginalOrder,
    /** **plan**

Plan. The request represents an intention to ensure something occurs without providing an authorization for others to act. */
    Plan,
    /** **proposal**

Proposal. The request is a suggestion made by someone/something that doesn't have an intention to ensure it occurs and without providing an authorization to act */
    Proposal,
    /** **reflex-order**

Reflex Order. The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization.. */
    ReflexOrder,
}
impl ::core::str::FromStr for MedicationRequestIntentCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "filler-order" => Ok(Self::FillerOrder),
            "instance-order" => Ok(Self::InstanceOrder),
            "option" => Ok(Self::Option),
            "order" => Ok(Self::Order),
            "original-order" => Ok(Self::OriginalOrder),
            "plan" => Ok(Self::Plan),
            "proposal" => Ok(Self::Proposal),
            "reflex-order" => Ok(Self::ReflexOrder),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationRequestIntentCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::FillerOrder => "filler-order",
            Self::InstanceOrder => "instance-order",
            Self::Option => "option",
            Self::Order => "order",
            Self::OriginalOrder => "original-order",
            Self::Plan => "plan",
            Self::Proposal => "proposal",
            Self::ReflexOrder => "reflex-order",
        }
    }
}
impl ::std::fmt::Debug for MedicationRequestIntentCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationRequestIntentCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationRequestIntentCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationRequestIntentCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationRequestIntentCodes> for Coding {
    fn from(code: MedicationRequestIntentCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationrequest-intent".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationRequestIntentCodes> for CodeableConcept {
    fn from(code: MedicationRequestIntentCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationRequestStatusCodes](http://hl7.org/fhir/ValueSet/medicationrequest-status)**. MedicationRequest Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationRequestStatusCodes {
    /** **active**

Active. The request is 'actionable', but not all actions that are implied by it have occurred yet. */
    Active,
    /** **cancelled**

Cancelled. The request has been withdrawn before any administrations have occurred */
    Cancelled,
    /** **completed**

Completed. All actions that are implied by the request have occurred. */
    Completed,
    /** **draft**

Draft. The request is not yet 'actionable', e.g. it is a work in progress, requires sign-off, verification or needs to be run through decision support process. */
    Draft,
    /** **ended**

Ended. The request is no longer active and the subject should no longer be taking the medication. */
    Ended,
    /** **entered-in-error**

Entered in Error. The request was recorded against the wrong patient or for some reason should not have been recorded (e.g. wrong medication, wrong dose, etc.). Some of the actions that are implied by the medication request may have occurred. For example, the medication may have been dispensed and the patient may have taken some of the medication. */
    EnteredInError,
    /** **on-hold**

On Hold. Actions implied by the request are to be temporarily halted. The request might or might not be resumed. May also be called 'suspended'. */
    OnHold,
    /** **stopped**

Stopped. Actions implied by the request are to be permanently halted, before all of the administrations occurred. This should not be used if the original order was entered in error */
    Stopped,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this request. Note: This concept is not to be used for 'other' - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for MedicationRequestStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "draft" => Ok(Self::Draft),
            "ended" => Ok(Self::Ended),
            "entered-in-error" => Ok(Self::EnteredInError),
            "on-hold" => Ok(Self::OnHold),
            "stopped" => Ok(Self::Stopped),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationRequestStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Draft => "draft",
            Self::Ended => "ended",
            Self::EnteredInError => "entered-in-error",
            Self::OnHold => "on-hold",
            Self::Stopped => "stopped",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for MedicationRequestStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationRequestStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationRequestStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationRequestStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationRequestStatusCodes> for Coding {
    fn from(code: MedicationRequestStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicationrequest-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationRequestStatusCodes> for CodeableConcept {
    fn from(code: MedicationRequestStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationStatementAdherenceCodes](http://hl7.org/fhir/ValueSet/medication-statement-adherence)**. MedicationStatement Adherence Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationStatementAdherenceCodes {
    /** **not-taking**

Not Taking. The medication is not being taken. */
    NotTaking,
    /** **on-hold**

On Hold. The medication is on hold. */
    OnHold,
    /** **on-hold-as-directed**

On Hold As Directed. The medication is on hold as directed. */
    OnHoldAsDirected,
    /** **on-hold-not-as-directed**

On Hold Not As Directed. The medication is on hold not as directed. */
    OnHoldNotAsDirected,
    /** **stopped**

Stopped. The medication is stopped. */
    Stopped,
    /** **stopped-as-directed**

Stopped As Directed. The medication is stopped as directed. */
    StoppedAsDirected,
    /** **stopped-not-as-directed**

Stopped Not As Directed. The medication is stopped not as directed. */
    StoppedNotAsDirected,
    /** **taking**

Taking. The medication is being taken. */
    Taking,
    /** **taking-as-directed**

Taking As Directed. The medication is being taken as directed. */
    TakingAsDirected,
    /** **taking-not-as-directed**

Taking Not As Directed. The medication is not being taken as directed. */
    TakingNotAsDirected,
    /** **unknown**

Unknown. Whether the medication is being taken or not is not currently known. */
    Unknown,
}
impl ::core::str::FromStr for MedicationStatementAdherenceCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "not-taking" => Ok(Self::NotTaking),
            "on-hold" => Ok(Self::OnHold),
            "on-hold-as-directed" => Ok(Self::OnHoldAsDirected),
            "on-hold-not-as-directed" => Ok(Self::OnHoldNotAsDirected),
            "stopped" => Ok(Self::Stopped),
            "stopped-as-directed" => Ok(Self::StoppedAsDirected),
            "stopped-not-as-directed" => Ok(Self::StoppedNotAsDirected),
            "taking" => Ok(Self::Taking),
            "taking-as-directed" => Ok(Self::TakingAsDirected),
            "taking-not-as-directed" => Ok(Self::TakingNotAsDirected),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationStatementAdherenceCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::NotTaking => "not-taking",
            Self::OnHold => "on-hold",
            Self::OnHoldAsDirected => "on-hold-as-directed",
            Self::OnHoldNotAsDirected => "on-hold-not-as-directed",
            Self::Stopped => "stopped",
            Self::StoppedAsDirected => "stopped-as-directed",
            Self::StoppedNotAsDirected => "stopped-not-as-directed",
            Self::Taking => "taking",
            Self::TakingAsDirected => "taking-as-directed",
            Self::TakingNotAsDirected => "taking-not-as-directed",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for MedicationStatementAdherenceCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationStatementAdherenceCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationStatementAdherenceCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationStatementAdherenceCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationStatementAdherenceCodes> for Coding {
    fn from(code: MedicationStatementAdherenceCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-statement-adherence".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationStatementAdherenceCodes> for CodeableConcept {
    fn from(code: MedicationStatementAdherenceCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationStatementStatusCodes](http://hl7.org/fhir/ValueSet/medication-statement-status)**. MedicationStatement Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationStatementStatusCodes {
    /** **draft**

Draft. The medication usage is draft or preliminary. */
    Draft,
    /** **entered-in-error**

Entered in Error. Some of the actions that are implied by the medication usage may have occurred.  For example, the patient may have taken some of the medication.  Clinical decision support systems should take this status into account. */
    EnteredInError,
    /** **recorded**

Recorded. The action of recording the medication statement is finished. */
    Recorded,
}
impl ::core::str::FromStr for MedicationStatementStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "recorded" => Ok(Self::Recorded),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationStatementStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Recorded => "recorded",
        }
    }
}
impl ::std::fmt::Debug for MedicationStatementStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationStatementStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationStatementStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationStatementStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationStatementStatusCodes> for Coding {
    fn from(code: MedicationStatementStatusCodes) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medication-statement-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationStatementStatusCodes> for CodeableConcept {
    fn from(code: MedicationStatementStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicationStatusCodes](http://hl7.org/fhir/ValueSet/medication-status)**. Medication Status Codes\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicationStatusCodes {
    /** **active**

Active. The medication record is current and is appropriate for reference in new instances. */
    Active,
    /** **entered-in-error**

Entered in Error. The medication record was created erroneously and is not appropriated for reference in new instances. */
    EnteredInError,
    /** **inactive**

Inactive. The medication record is not current and is not is appropriate for reference in new instances. */
    Inactive,
}
impl ::core::str::FromStr for MedicationStatusCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicationStatusCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for MedicationStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicationStatusCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicationStatusCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicationStatusCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicationStatusCodes> for Coding {
    fn from(code: MedicationStatusCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/medication-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicationStatusCodes> for CodeableConcept {
    fn from(code: MedicationStatusCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicinalProductDomain](http://hl7.org/fhir/ValueSet/medicinal-product-domain)**. Applicable domain for this product (e.g. human, veterinary).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicinalProductDomain {
    /** **Human**

Human use. Product intended for use with humans */
    Human,
    /** **HumanAndVeterinary**

Human and Veterinary use. Product intended for use with both humans and animals */
    HumanAndVeterinary,
    /** **Veterinary**

Veterinary use. Product intended for use with animals */
    Veterinary,
}
impl ::core::str::FromStr for MedicinalProductDomain {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Human" => Ok(Self::Human),
            "HumanAndVeterinary" => Ok(Self::HumanAndVeterinary),
            "Veterinary" => Ok(Self::Veterinary),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicinalProductDomain {
    fn as_ref(&self) -> &str {
        match self {
            Self::Human => "Human",
            Self::HumanAndVeterinary => "HumanAndVeterinary",
            Self::Veterinary => "Veterinary",
        }
    }
}
impl ::std::fmt::Debug for MedicinalProductDomain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicinalProductDomain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicinalProductDomain {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicinalProductDomain {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicinalProductDomain> for Coding {
    fn from(code: MedicinalProductDomain) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-domain".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicinalProductDomain> for CodeableConcept {
    fn from(code: MedicinalProductDomain) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicinalProductPackageType](http://hl7.org/fhir/ValueSet/medicinal-product-package-type)**. Types of medicinal product packs\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicinalProductPackageType {
    /** **100000073490**

Ampoule. */
    N100000073490,
    /** **100000073491**

Applicator. */
    N100000073491,
    /** **100000073492**

Automatic injection device. */
    N100000073492,
    /** **100000073493**

Bag. */
    N100000073493,
    /** **100000073494**

Balling gun. */
    N100000073494,
    /** **100000073495**

Barrel. */
    N100000073495,
    /** **100000073496**

Blister. */
    N100000073496,
    /** **100000073497**

Bottle. */
    N100000073497,
    /** **100000073498**

Box. */
    N100000073498,
    /** **100000073547**

Sachet. */
    N100000073547,
    /** **100000073563**

Vial. */
    N100000073563,
    /** **100000143555**

Pack. */
    N100000143555,
}
impl ::core::str::FromStr for MedicinalProductPackageType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000073490" => Ok(Self::N100000073490),
            "100000073491" => Ok(Self::N100000073491),
            "100000073492" => Ok(Self::N100000073492),
            "100000073493" => Ok(Self::N100000073493),
            "100000073494" => Ok(Self::N100000073494),
            "100000073495" => Ok(Self::N100000073495),
            "100000073496" => Ok(Self::N100000073496),
            "100000073497" => Ok(Self::N100000073497),
            "100000073498" => Ok(Self::N100000073498),
            "100000073547" => Ok(Self::N100000073547),
            "100000073563" => Ok(Self::N100000073563),
            "100000143555" => Ok(Self::N100000143555),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicinalProductPackageType {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000073490 => "100000073490",
            Self::N100000073491 => "100000073491",
            Self::N100000073492 => "100000073492",
            Self::N100000073493 => "100000073493",
            Self::N100000073494 => "100000073494",
            Self::N100000073495 => "100000073495",
            Self::N100000073496 => "100000073496",
            Self::N100000073497 => "100000073497",
            Self::N100000073498 => "100000073498",
            Self::N100000073547 => "100000073547",
            Self::N100000073563 => "100000073563",
            Self::N100000143555 => "100000143555",
        }
    }
}
impl ::std::fmt::Debug for MedicinalProductPackageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicinalProductPackageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicinalProductPackageType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicinalProductPackageType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicinalProductPackageType> for Coding {
    fn from(code: MedicinalProductPackageType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-package-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicinalProductPackageType> for CodeableConcept {
    fn from(code: MedicinalProductPackageType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MedicinalProductType](http://hl7.org/fhir/ValueSet/medicinal-product-type)**. Overall defining type of this Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MedicinalProductType {
    /** **InvestigationalProduct**

Investigational Medicinal Product. An investigational medicinal product. */
    InvestigationalProduct,
    /** **MedicinalProduct**

Medicinal Product. A standard medicinal product. */
    MedicinalProduct,
}
impl ::core::str::FromStr for MedicinalProductType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "InvestigationalProduct" => Ok(Self::InvestigationalProduct),
            "MedicinalProduct" => Ok(Self::MedicinalProduct),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MedicinalProductType {
    fn as_ref(&self) -> &str {
        match self {
            Self::InvestigationalProduct => "InvestigationalProduct",
            Self::MedicinalProduct => "MedicinalProduct",
        }
    }
}
impl ::std::fmt::Debug for MedicinalProductType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MedicinalProductType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MedicinalProductType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MedicinalProductType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MedicinalProductType> for Coding {
    fn from(code: MedicinalProductType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MedicinalProductType> for CodeableConcept {
    fn from(code: MedicinalProductType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MessageEvent](http://hl7.org/fhir/message-events)**. One of the message events defined as part of this version of FHIR.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum MessageEvent {
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for MessageEvent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for MessageEvent {
    fn as_ref(&self) -> &str {
        match self {
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for MessageEvent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MessageEvent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MessageEvent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MessageEvent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MessageEvent> for Coding {
    fn from(code: MessageEvent) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/message-events".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MessageEvent> for CodeableConcept {
    fn from(code: MessageEvent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MessageSignificanceCategory](http://hl7.org/fhir/ValueSet/message-significance-category)**. The impact of the content of a message.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MessageSignificanceCategory {
    /** **consequence**

Consequence. The message represents/requests a change that should not be processed more than once; e.g., making a booking for an appointment. */
    Consequence,
    /** **currency**

Currency. The message represents a response to query for current information. Retrospective processing is wrong and/or wasteful. */
    Currency,
    /** **notification**

Notification. The content is not necessarily intended to be current, and it can be reprocessed, though there may be version issues created by processing old notifications. */
    Notification,
}
impl ::core::str::FromStr for MessageSignificanceCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "consequence" => Ok(Self::Consequence),
            "currency" => Ok(Self::Currency),
            "notification" => Ok(Self::Notification),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MessageSignificanceCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Consequence => "consequence",
            Self::Currency => "currency",
            Self::Notification => "notification",
        }
    }
}
impl ::std::fmt::Debug for MessageSignificanceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MessageSignificanceCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MessageSignificanceCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MessageSignificanceCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MessageSignificanceCategory> for Coding {
    fn from(code: MessageSignificanceCategory) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/message-significance-category".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MessageSignificanceCategory> for CodeableConcept {
    fn from(code: MessageSignificanceCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MessageTransport](http://hl7.org/fhir/ValueSet/message-transport)**. The protocol used for message transport.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MessageTransport {
    /** **ftp**

FTP. The application sends or receives messages using File Transfer Protocol. */
    Ftp,
    /** **http**

HTTP. The application sends or receives messages using HTTP POST (may be over http: or https:). */
    Http,
    /** **mllp**

MLLP. The application sends or receives messages using HL7's Minimal Lower Level Protocol. */
    Mllp,
}
impl ::core::str::FromStr for MessageTransport {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ftp" => Ok(Self::Ftp),
            "http" => Ok(Self::Http),
            "mllp" => Ok(Self::Mllp),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MessageTransport {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ftp => "ftp",
            Self::Http => "http",
            Self::Mllp => "mllp",
        }
    }
}
impl ::std::fmt::Debug for MessageTransport {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MessageTransport {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MessageTransport {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MessageTransport {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MessageTransport> for Coding {
    fn from(code: MessageTransport) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/message-transport".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MessageTransport> for CodeableConcept {
    fn from(code: MessageTransport) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[MessageheaderResponseRequest](http://hl7.org/fhir/ValueSet/messageheader-response-request)**. HL7-defined table of codes which identify conditions under which acknowledgments are required to be returned in response to a message.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum MessageheaderResponseRequest {
    /** **always**

Always. initiator expects a response for this message. */
    Always,
    /** **never**

Never. initiator does not expect a response. */
    Never,
    /** **on-error**

Error/reject conditions only. initiator expects a response only if in error. */
    OnError,
    /** **on-success**

Successful completion only. initiator expects a response only if successful. */
    OnSuccess,
}
impl ::core::str::FromStr for MessageheaderResponseRequest {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "always" => Ok(Self::Always),
            "never" => Ok(Self::Never),
            "on-error" => Ok(Self::OnError),
            "on-success" => Ok(Self::OnSuccess),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for MessageheaderResponseRequest {
    fn as_ref(&self) -> &str {
        match self {
            Self::Always => "always",
            Self::Never => "never",
            Self::OnError => "on-error",
            Self::OnSuccess => "on-success",
        }
    }
}
impl ::std::fmt::Debug for MessageheaderResponseRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for MessageheaderResponseRequest {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for MessageheaderResponseRequest {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for MessageheaderResponseRequest {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<MessageheaderResponseRequest> for Coding {
    fn from(code: MessageheaderResponseRequest) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/messageheader-response-request".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<MessageheaderResponseRequest> for CodeableConcept {
    fn from(code: MessageheaderResponseRequest) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NHINPurposeOfUse](http://hl7.org/fhir/ValueSet/nhin-purposeofuse)**. This value set is suitable for use with the provenance resource. It is derived from, but not compatible with, the HL7 v3 Purpose of use Code system.\n\nFHIR version: 2.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NHINPurposeOfUse {
    /** **ABUSE**

Abuse. Disclosures about victims of abuse, neglect or domestic violence. */
    Abuse,
    /** **COVERAGE**

Coverage. Disclosures for insurance or disability coverage determination */
    Coverage,
    /** **DECEASED**

Deceased. Uses and disclosures about decedents. */
    Deceased,
    /** **DIRECTORY**

Directory. Use and disclosure for facility directories */
    Directory,
    /** **DISASTER**

Disaster. Use and disclosures for disaster relief purposes. */
    Disaster,
    /** **DONATION**

Donation. Uses and disclosures for cadaveric organ,  eye or tissue donation purposes */
    Donation,
    /** **EMERGENCY**

Emergency. Permission cannot practicably be provided because of the individual's incapacity or an emergency. */
    Emergency,
    /** **FAMILY**

Family. Disclose to a family member, other relative, or a close personal friend of the individual */
    Family,
    /** **FRAUD**

Fraud. Fraud detection */
    Fraud,
    /** **GOVERNMENT**

Government. Uses and disclosures for specialized government functions. */
    Government,
    /** **JUDICIAL**

Judicial. Disclosures for judicial and administrative proceedings. */
    Judicial,
    /** **LAW**

Law Enforcement. Disclosures for law enforcement purposes. */
    Law,
    /** **LEGAL**

Legal. Use or disclosure by the covered entity to defend itself in a legal action */
    Legal,
    /** **MARKETING**

Marketing. Marketing */
    Marketing,
    /** **OPERATIONS**

Operations. Healthcare Operations */
    Operations,
    /** **OVERSIGHT**

Oversight. Uses and disclosures for health oversight activities. */
    Oversight,
    /** **PAYMENT**

Payment. Payment */
    Payment,
    /** **PRESENT**

Present. Uses and disclosures with the individual present. */
    Present,
    /** **PSYCHOTHERAPY**

Psychotherapy. Use or disclosure of Psychotherapy Notes */
    Psychotherapy,
    /** **PUBLICHEALTH**

Public Health. Uses and disclosures for public health activities. */
    Publichealth,
    /** **REQUEST**

Request. Request of the Individual */
    Request,
    /** **RESEARCH**

Research. Uses and disclosures for research purposes. */
    Research,
    /** **SYSADMIN**

Sysadmin. System Administration */
    Sysadmin,
    /** **THREAT**

Threat. Uses and disclosures to avert a serious threat to health or safety. */
    Threat,
    /** **TRAINING**

Training. Use or disclosure by the covered entity for its own training programs */
    Training,
    /** **TREATMENT**

Treatment. Treatment */
    Treatment,
    /** **WORKERSCOMP**

Worker's Comp. Disclosures for workers' compensation. */
    Workerscomp,
}
impl ::core::str::FromStr for NHINPurposeOfUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ABUSE" => Ok(Self::Abuse),
            "COVERAGE" => Ok(Self::Coverage),
            "DECEASED" => Ok(Self::Deceased),
            "DIRECTORY" => Ok(Self::Directory),
            "DISASTER" => Ok(Self::Disaster),
            "DONATION" => Ok(Self::Donation),
            "EMERGENCY" => Ok(Self::Emergency),
            "FAMILY" => Ok(Self::Family),
            "FRAUD" => Ok(Self::Fraud),
            "GOVERNMENT" => Ok(Self::Government),
            "JUDICIAL" => Ok(Self::Judicial),
            "LAW" => Ok(Self::Law),
            "LEGAL" => Ok(Self::Legal),
            "MARKETING" => Ok(Self::Marketing),
            "OPERATIONS" => Ok(Self::Operations),
            "OVERSIGHT" => Ok(Self::Oversight),
            "PAYMENT" => Ok(Self::Payment),
            "PRESENT" => Ok(Self::Present),
            "PSYCHOTHERAPY" => Ok(Self::Psychotherapy),
            "PUBLICHEALTH" => Ok(Self::Publichealth),
            "REQUEST" => Ok(Self::Request),
            "RESEARCH" => Ok(Self::Research),
            "SYSADMIN" => Ok(Self::Sysadmin),
            "THREAT" => Ok(Self::Threat),
            "TRAINING" => Ok(Self::Training),
            "TREATMENT" => Ok(Self::Treatment),
            "WORKERSCOMP" => Ok(Self::Workerscomp),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NHINPurposeOfUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abuse => "ABUSE",
            Self::Coverage => "COVERAGE",
            Self::Deceased => "DECEASED",
            Self::Directory => "DIRECTORY",
            Self::Disaster => "DISASTER",
            Self::Donation => "DONATION",
            Self::Emergency => "EMERGENCY",
            Self::Family => "FAMILY",
            Self::Fraud => "FRAUD",
            Self::Government => "GOVERNMENT",
            Self::Judicial => "JUDICIAL",
            Self::Law => "LAW",
            Self::Legal => "LEGAL",
            Self::Marketing => "MARKETING",
            Self::Operations => "OPERATIONS",
            Self::Oversight => "OVERSIGHT",
            Self::Payment => "PAYMENT",
            Self::Present => "PRESENT",
            Self::Psychotherapy => "PSYCHOTHERAPY",
            Self::Publichealth => "PUBLICHEALTH",
            Self::Request => "REQUEST",
            Self::Research => "RESEARCH",
            Self::Sysadmin => "SYSADMIN",
            Self::Threat => "THREAT",
            Self::Training => "TRAINING",
            Self::Treatment => "TREATMENT",
            Self::Workerscomp => "WORKERSCOMP",
        }
    }
}
impl ::std::fmt::Debug for NHINPurposeOfUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NHINPurposeOfUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NHINPurposeOfUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NHINPurposeOfUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NHINPurposeOfUse> for Coding {
    fn from(code: NHINPurposeOfUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/nhin-purposeofuse".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NHINPurposeOfUse> for CodeableConcept {
    fn from(code: NHINPurposeOfUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NameUse](http://hl7.org/fhir/ValueSet/name-use)**. The use of a human name.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NameUse {
    /** **anonymous**

Anonymous. Anonymous assigned name, alias, or pseudonym (used to protect a person's identity for privacy reasons). */
    Anonymous,
    /** **maiden**

Name changed for Marriage. A name used prior to changing name because of marriage. This name use is for use by applications that collect and store names that were used prior to a marriage. Marriage naming customs vary greatly around the world, and are constantly changing. This term is not gender specific. The use of this term does not imply any particular history for a person's name. */
    Maiden,
    /** **nickname**

Nickname. A name that is used to address the person in an informal manner, but is not part of their formal or usual name. */
    Nickname,
    /** **official**

Official. The formal name as registered in an official (government) registry, but which name might not be commonly used. May be called "legal name". */
    Official,
    /** **old**

Old. This name is no longer in use (or was never correct, but retained for records). */
    Old,
    /** **temp**

Temp. A temporary name. Name.period can provide more detailed information. This may also be used for temporary names assigned at birth or in emergency situations. */
    Temp,
    /** **usual**

Usual. Known as/conventional/the one you normally use. */
    Usual,
}
impl ::core::str::FromStr for NameUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "anonymous" => Ok(Self::Anonymous),
            "maiden" => Ok(Self::Maiden),
            "nickname" => Ok(Self::Nickname),
            "official" => Ok(Self::Official),
            "old" => Ok(Self::Old),
            "temp" => Ok(Self::Temp),
            "usual" => Ok(Self::Usual),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NameUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Anonymous => "anonymous",
            Self::Maiden => "maiden",
            Self::Nickname => "nickname",
            Self::Official => "official",
            Self::Old => "old",
            Self::Temp => "temp",
            Self::Usual => "usual",
        }
    }
}
impl ::std::fmt::Debug for NameUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NameUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NameUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NameUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NameUse> for Coding {
    fn from(code: NameUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/name-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NameUse> for CodeableConcept {
    fn from(code: NameUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NamingSystemIdentifierType](http://hl7.org/fhir/ValueSet/namingsystem-identifier-type)**. Identifies the style of unique identifier used to identify a namespace.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NamingSystemIdentifierType {
    /** **iri-stem**

IRI stem. An IRI string that can be prepended to the code to obtain a concept IRI for RDF applications. This should be a valid, absolute IRI as defined in RFC 3987. See rdf.html#iri-stem for details on how this value may be used. */
    IriStem,
    /** **oid**

OID. An ISO object identifier; e.g. 1.2.3.4.5. */
    Oid,
    /** **other**

Other. Some other type of unique identifier; e.g. HL7-assigned reserved string such as LN for LOINC. */
    Other,
    /** **uri**

URI. A uniform resource identifier (ideally a URL - uniform resource locator); e.g. http://unitsofmeasure.org. */
    Uri,
    /** **uuid**

UUID. A universally unique identifier of the form a5afddf4-e880-459b-876e-e4591b0acc11. */
    Uuid,
    /** **v2csmnemonic**

V2CSMNemonic. A short string published by HL7 for use in the V2 family of standsrds to idenfify a code system in the V12 coded data types CWE, CNE, and CF. The code values are also published by HL7 at http://www.hl7.org/Special/committees/vocab/table_0396/index.cfm */
    V2csmnemonic,
}
impl ::core::str::FromStr for NamingSystemIdentifierType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "iri-stem" => Ok(Self::IriStem),
            "oid" => Ok(Self::Oid),
            "other" => Ok(Self::Other),
            "uri" => Ok(Self::Uri),
            "uuid" => Ok(Self::Uuid),
            "v2csmnemonic" => Ok(Self::V2csmnemonic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NamingSystemIdentifierType {
    fn as_ref(&self) -> &str {
        match self {
            Self::IriStem => "iri-stem",
            Self::Oid => "oid",
            Self::Other => "other",
            Self::Uri => "uri",
            Self::Uuid => "uuid",
            Self::V2csmnemonic => "v2csmnemonic",
        }
    }
}
impl ::std::fmt::Debug for NamingSystemIdentifierType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NamingSystemIdentifierType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NamingSystemIdentifierType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NamingSystemIdentifierType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NamingSystemIdentifierType> for Coding {
    fn from(code: NamingSystemIdentifierType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/namingsystem-identifier-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NamingSystemIdentifierType> for CodeableConcept {
    fn from(code: NamingSystemIdentifierType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NamingSystemType](http://hl7.org/fhir/ValueSet/namingsystem-type)**. Identifies the purpose of the naming system.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NamingSystemType {
    /** **codesystem**

Code System. The naming system is used to define concepts and symbols to represent those concepts; e.g. UCUM, LOINC, NDC code, local lab codes, etc. */
    Codesystem,
    /** **identifier**

Identifier. The naming system is used to manage identifiers (e.g. license numbers, order numbers, etc.). */
    Identifier,
    /** **root**

Root. The naming system is used as the root for other identifiers and naming systems. */
    Root,
}
impl ::core::str::FromStr for NamingSystemType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "codesystem" => Ok(Self::Codesystem),
            "identifier" => Ok(Self::Identifier),
            "root" => Ok(Self::Root),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NamingSystemType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Codesystem => "codesystem",
            Self::Identifier => "identifier",
            Self::Root => "root",
        }
    }
}
impl ::std::fmt::Debug for NamingSystemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NamingSystemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NamingSystemType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NamingSystemType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NamingSystemType> for Coding {
    fn from(code: NamingSystemType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/namingsystem-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NamingSystemType> for CodeableConcept {
    fn from(code: NamingSystemType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NarrativeStatus](http://hl7.org/fhir/ValueSet/narrative-status)**. The status of a resource narrative.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NarrativeStatus {
    /** **additional**

Additional. The contents of the narrative may contain additional information not found in the structured data. Note that there is no computable way to determine what the extra information is, other than by human inspection. */
    Additional,
    /** **empty**

Empty. The contents of the narrative are some equivalent of "No human-readable text provided in this case". */
    Empty,
    /** **extensions**

Extensions. The contents of the narrative are entirely generated from the core elements in the content and some of the content is generated from extensions. The narrative SHALL reflect the impact of all modifier extensions. */
    Extensions,
    /** **generated**

Generated. The contents of the narrative are entirely generated from the core elements in the content. */
    Generated,
}
impl ::core::str::FromStr for NarrativeStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "additional" => Ok(Self::Additional),
            "empty" => Ok(Self::Empty),
            "extensions" => Ok(Self::Extensions),
            "generated" => Ok(Self::Generated),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NarrativeStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Additional => "additional",
            Self::Empty => "empty",
            Self::Extensions => "extensions",
            Self::Generated => "generated",
        }
    }
}
impl ::std::fmt::Debug for NarrativeStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NarrativeStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NarrativeStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NarrativeStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NarrativeStatus> for Coding {
    fn from(code: NarrativeStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/narrative-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NarrativeStatus> for CodeableConcept {
    fn from(code: NarrativeStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NoteType](http://hl7.org/fhir/ValueSet/note-type)**. The presentation types of notes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NoteType {
    /** **display**

Display. Display the note. */
    Display,
    /** **print**

Print (Form). Print the note on the form. */
    Print,
    /** **printoper**

Print (Operator). Print the note for the operator. */
    Printoper,
}
impl ::core::str::FromStr for NoteType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "display" => Ok(Self::Display),
            "print" => Ok(Self::Print),
            "printoper" => Ok(Self::Printoper),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NoteType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Display => "display",
            Self::Print => "print",
            Self::Printoper => "printoper",
        }
    }
}
impl ::std::fmt::Debug for NoteType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NoteType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NoteType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NoteType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NoteType> for Coding {
    fn from(code: NoteType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/note-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NoteType> for CodeableConcept {
    fn from(code: NoteType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[NutritionProductStatus](http://hl7.org/fhir/ValueSet/nutritionproduct-status)**. Codes identifying the lifecycle stage of a product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum NutritionProductStatus {
    /** **active**

Active. The product can be used. */
    Active,
    /** **entered-in-error**

Entered in Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **inactive**

Inactive. The product is not expected or allowed to be used. */
    Inactive,
}
impl ::core::str::FromStr for NutritionProductStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "inactive" => Ok(Self::Inactive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for NutritionProductStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Inactive => "inactive",
        }
    }
}
impl ::std::fmt::Debug for NutritionProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for NutritionProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for NutritionProductStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for NutritionProductStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<NutritionProductStatus> for Coding {
    fn from(code: NutritionProductStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/nutritionproduct-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<NutritionProductStatus> for CodeableConcept {
    fn from(code: NutritionProductStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ObservationDataType](http://hl7.org/fhir/ValueSet/permitted-data-type)**. Permitted data type for observation value.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ObservationDataType {
    /** **CodeableConcept**

CodeableConcept. A coded concept from a reference terminology and/or text. */
    CodeableConcept,
    /** **Period**

Period. A time range defined by start and end date/time. */
    Period,
    /** **Quantity**

Quantity. A measured amount. */
    Quantity,
    /** **Range**

Range. A set of values bounded by low and high. */
    Range,
    /** **Ratio**

Ratio. A ratio of two Quantity values - a numerator and a denominator. */
    Ratio,
    /** **SampledData**

SampledData. A series of measurements taken by a device. */
    SampledData,
    /** **boolean**

boolean. true or false. */
    Boolean,
    /** **dateTime**

dateTime. A date, date-time or partial date (e.g. just year or year + month) as used in human communication. */
    DateTime,
    /** **integer**

integer. A signed integer. */
    Integer,
    /** **string**

string. A sequence of Unicode characters. */
    String,
    /** **time**

time. A time during the day, in the format hh:mm:ss. */
    Time,
}
impl ::core::str::FromStr for ObservationDataType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "CodeableConcept" => Ok(Self::CodeableConcept),
            "Period" => Ok(Self::Period),
            "Quantity" => Ok(Self::Quantity),
            "Range" => Ok(Self::Range),
            "Ratio" => Ok(Self::Ratio),
            "SampledData" => Ok(Self::SampledData),
            "boolean" => Ok(Self::Boolean),
            "dateTime" => Ok(Self::DateTime),
            "integer" => Ok(Self::Integer),
            "string" => Ok(Self::String),
            "time" => Ok(Self::Time),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ObservationDataType {
    fn as_ref(&self) -> &str {
        match self {
            Self::CodeableConcept => "CodeableConcept",
            Self::Period => "Period",
            Self::Quantity => "Quantity",
            Self::Range => "Range",
            Self::Ratio => "Ratio",
            Self::SampledData => "SampledData",
            Self::Boolean => "boolean",
            Self::DateTime => "dateTime",
            Self::Integer => "integer",
            Self::String => "string",
            Self::Time => "time",
        }
    }
}
impl ::std::fmt::Debug for ObservationDataType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ObservationDataType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ObservationDataType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ObservationDataType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ObservationDataType> for Coding {
    fn from(code: ObservationDataType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/permitted-data-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ObservationDataType> for CodeableConcept {
    fn from(code: ObservationDataType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ObservationRangeCategory](http://hl7.org/fhir/ValueSet/observation-range-category)**. Codes identifying the category of observation range.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ObservationRangeCategory {
    /** **absolute**

absolute range. Absolute Range for Ordinal and Continuous Observations. Results outside this range are not possible. */
    Absolute,
    /** **critical**

critical range. Critical Range for Ordinal and Continuous Observations. Results outside this range are critical. */
    Critical,
    /** **reference**

reference range. Reference (Normal) Range for Ordinal and Continuous Observations. */
    Reference,
}
impl ::core::str::FromStr for ObservationRangeCategory {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "absolute" => Ok(Self::Absolute),
            "critical" => Ok(Self::Critical),
            "reference" => Ok(Self::Reference),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ObservationRangeCategory {
    fn as_ref(&self) -> &str {
        match self {
            Self::Absolute => "absolute",
            Self::Critical => "critical",
            Self::Reference => "reference",
        }
    }
}
impl ::std::fmt::Debug for ObservationRangeCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ObservationRangeCategory {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ObservationRangeCategory {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ObservationRangeCategory {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ObservationRangeCategory> for Coding {
    fn from(code: ObservationRangeCategory) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/observation-range-category".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ObservationRangeCategory> for CodeableConcept {
    fn from(code: ObservationRangeCategory) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ObservationReferenceRangeNormalValue](http://hl7.org/fhir/ValueSet/observation-referencerange-normalvalue)**. Codes that describe the normal value in the reference range.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ObservationReferenceRangeNormalValue {
    /** **absent**

Absent. The expected normal value for the observation is absent. */
    Absent,
    /** **negative**

Negative. The expected normal value for the observation is negative. */
    Negative,
}
impl ::core::str::FromStr for ObservationReferenceRangeNormalValue {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "absent" => Ok(Self::Absent),
            "negative" => Ok(Self::Negative),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ObservationReferenceRangeNormalValue {
    fn as_ref(&self) -> &str {
        match self {
            Self::Absent => "absent",
            Self::Negative => "negative",
        }
    }
}
impl ::std::fmt::Debug for ObservationReferenceRangeNormalValue {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ObservationReferenceRangeNormalValue {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ObservationReferenceRangeNormalValue {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ObservationReferenceRangeNormalValue {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ObservationReferenceRangeNormalValue> for Coding {
    fn from(code: ObservationReferenceRangeNormalValue) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/observation-referencerange-normalvalue"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ObservationReferenceRangeNormalValue> for CodeableConcept {
    fn from(code: ObservationReferenceRangeNormalValue) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ObservationStatus](http://hl7.org/fhir/ValueSet/observation-status)**. Codes providing the status of an observation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ObservationStatus {
    /** **amended**

Amended. Subsequent to being Final, the observation has been modified subsequent.  This includes updates/new information and corrections. */
    Amended,
    /** **cancelled**

Cancelled. The observation is unavailable because the measurement was not started or not completed (also sometimes called "aborted"). */
    Cancelled,
    /** **corrected**

Corrected. Subsequent to being Final, the observation has been modified to correct an error in the test result. */
    Corrected,
    /** **entered-in-error**

Entered in Error. The observation has been withdrawn following previous final release.  This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **final**

Final. The observation is complete and there are no further actions needed. Additional information such "released", "signed", etc. would be represented using [Provenance](provenance.html) which provides not only the act but also the actors and dates and other related data. These act states would be associated with an observation status of `preliminary` until they are all completed and then a status of `final` would be applied. */
    Final,
    /** **preliminary**

Preliminary. This is an initial or interim observation: data may be incomplete or unverified. */
    Preliminary,
    /** **registered**

Registered. The existence of the observation is registered, but there is no result yet available. */
    Registered,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for ObservationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "cancelled" => Ok(Self::Cancelled),
            "corrected" => Ok(Self::Corrected),
            "entered-in-error" => Ok(Self::EnteredInError),
            "final" => Ok(Self::Final),
            "preliminary" => Ok(Self::Preliminary),
            "registered" => Ok(Self::Registered),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ObservationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Cancelled => "cancelled",
            Self::Corrected => "corrected",
            Self::EnteredInError => "entered-in-error",
            Self::Final => "final",
            Self::Preliminary => "preliminary",
            Self::Registered => "registered",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for ObservationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ObservationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ObservationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ObservationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ObservationStatus> for Coding {
    fn from(code: ObservationStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/observation-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ObservationStatus> for CodeableConcept {
    fn from(code: ObservationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OperationKind](http://hl7.org/fhir/ValueSet/operation-kind)**. Whether an operation is a normal operation or a query.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum OperationKind {
    /** **operation**

Operation. This operation is invoked as an operation. */
    Operation,
    /** **query**

Query. This operation is a named query, invoked using the search mechanism. */
    Query,
}
impl ::core::str::FromStr for OperationKind {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "operation" => Ok(Self::Operation),
            "query" => Ok(Self::Query),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for OperationKind {
    fn as_ref(&self) -> &str {
        match self {
            Self::Operation => "operation",
            Self::Query => "query",
        }
    }
}
impl ::std::fmt::Debug for OperationKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OperationKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OperationKind {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OperationKind {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OperationKind> for Coding {
    fn from(code: OperationKind) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/operation-kind".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OperationKind> for CodeableConcept {
    fn from(code: OperationKind) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OperationOutcomeCodes](http://hl7.org/fhir/operation-outcome)**. Operation Outcome codes for translatable phrases used by FHIR test servers (see Implementation file translations.xml)\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum OperationOutcomeCodes {
    /** **DELETE_MULTIPLE_MATCHES**

Error: Multiple matches exist for the conditional delete. */
    DeleteMultipleMatches,
    /** **MSG_AUTH_REQUIRED**

You must authenticate before you can use this service. */
    MsgAuthRequired,
    /** **MSG_BAD_FORMAT**

Bad Syntax: "%s" must be a %s'. */
    MsgBadFormat,
    /** **MSG_BAD_SYNTAX**

Bad Syntax in %s. */
    MsgBadSyntax,
    /** **MSG_CANT_PARSE_CONTENT**

Unable to parse feed (entry content type = "%s"). */
    MsgCantParseContent,
    /** **MSG_CANT_PARSE_ROOT**

Unable to parse feed (root element name = "%s"). */
    MsgCantParseRoot,
    /** **MSG_CREATED**

New resource created. */
    MsgCreated,
    /** **MSG_DATE_FORMAT**

The Date value %s is not in the correct format (Xml Date Format required). */
    MsgDateFormat,
    /** **MSG_DELETED**

This resource has been deleted. */
    MsgDeleted,
    /** **MSG_DELETED_DONE**

Resource deleted. */
    MsgDeletedDone,
    /** **MSG_DELETED_ID**

The resource "%s" has been deleted. */
    MsgDeletedId,
    /** **MSG_DUPLICATE_ID**

Duplicate Id %s for resource type %s. */
    MsgDuplicateId,
    /** **MSG_ERROR_PARSING**

Error parsing resource Xml (%s). */
    MsgErrorParsing,
    /** **MSG_ID_INVALID**

Id "%s" has an invalid character "%s". */
    MsgIdInvalid,
    /** **MSG_ID_TOO_LONG**

Id "%s" too long (length limit 36). */
    MsgIdTooLong,
    /** **MSG_INVALID_ID**

Id not accepted. */
    MsgInvalidId,
    /** **MSG_JSON_OBJECT**

Json Source for a resource should start with an object. */
    MsgJsonObject,
    /** **MSG_LOCAL_FAIL**

Unable to resolve local reference to resource %s. */
    MsgLocalFail,
    /** **MSG_NO_EXIST**

Resource Id "%s" does not exist. */
    MsgNoExist,
    /** **MSG_NO_MATCH**

No Resource found matching the query "%s". */
    MsgNoMatch,
    /** **MSG_NO_MODULE**

No module could be found to handle the request "%s". */
    MsgNoModule,
    /** **MSG_NO_SUMMARY**

No Summary for this resource. */
    MsgNoSummary,
    /** **MSG_OP_NOT_ALLOWED**

Operation %s not allowed for resource %s (due to local configuration). */
    MsgOpNotAllowed,
    /** **MSG_PARAM_CHAINED**

Unknown chained parameter name "%s". */
    MsgParamChained,
    /** **MSG_PARAM_INVALID**

Parameter "%s" content is invalid. */
    MsgParamInvalid,
    /** **MSG_PARAM_MODIFIER_INVALID**

Parameter "%s" modifier is invalid. */
    MsgParamModifierInvalid,
    /** **MSG_PARAM_NO_REPEAT**

Parameter "%s" is not allowed to repeat. */
    MsgParamNoRepeat,
    /** **MSG_PARAM_UNKNOWN**

Parameter "%s" not understood. */
    MsgParamUnknown,
    /** **MSG_REMOTE_FAIL**

Unable to resolve local reference to resource %s. */
    MsgRemoteFail,
    /** **MSG_RESOURCE_EXAMPLE_PROTECTED**

Resources with identity "example" cannot be deleted (for testing/training purposes). */
    MsgResourceExampleProtected,
    /** **MSG_RESOURCE_ID_FAIL**

unable to allocate resource id. */
    MsgResourceIdFail,
    /** **MSG_RESOURCE_ID_MISMATCH**

Resource Id Mismatch. */
    MsgResourceIdMismatch,
    /** **MSG_RESOURCE_ID_MISSING**

Resource Id Missing. */
    MsgResourceIdMissing,
    /** **MSG_RESOURCE_NOT_ALLOWED**

Not allowed to submit a resource for this operation. */
    MsgResourceNotAllowed,
    /** **MSG_RESOURCE_REQUIRED**

A resource is required. */
    MsgResourceRequired,
    /** **MSG_RESOURCE_TYPE_MISMATCH**

Resource Type Mismatch. */
    MsgResourceTypeMismatch,
    /** **MSG_SORT_UNKNOWN**

Unknown sort parameter name "%s". */
    MsgSortUnknown,
    /** **MSG_TRANSACTION_DUPLICATE_ID**

Duplicate Identifier in transaction: %s. */
    MsgTransactionDuplicateId,
    /** **MSG_TRANSACTION_MISSING_ID**

Missing Identifier in transaction - an entry.id must be provided. */
    MsgTransactionMissingId,
    /** **MSG_UNHANDLED_NODE_TYPE**

Unhandled xml node type "%s". */
    MsgUnhandledNodeType,
    /** **MSG_UNKNOWN_CONTENT**

Unknown Content (%s) at %s. */
    MsgUnknownContent,
    /** **MSG_UNKNOWN_OPERATION**

unknown FHIR http operation. */
    MsgUnknownOperation,
    /** **MSG_UNKNOWN_TYPE**

Resource Type "%s" not recognised. */
    MsgUnknownType,
    /** **MSG_UPDATED**

existing resource updated. */
    MsgUpdated,
    /** **MSG_VERSION_AWARE**

Version aware updates are required for this resource. */
    MsgVersionAware,
    /** **MSG_VERSION_AWARE_CONFLICT**

Update Conflict (server current version = "%s", client version referenced = "%s"). */
    MsgVersionAwareConflict,
    /** **MSG_VERSION_AWARE_URL**

Version specific URL not recognised. */
    MsgVersionAwareUrl,
    /** **MSG_WRONG_NS**

This does not appear to be a FHIR element or resource (wrong namespace "%s"). */
    MsgWrongNs,
    /** **SEARCH_MULTIPLE**

Error: Multiple matches exist for %s search parameters "%s". */
    SearchMultiple,
    /** **SEARCH_NONE**

Error: no processable search found for %s search parameters "%s". */
    SearchNone,
    /** **UPDATE_MULTIPLE_MATCHES**

Error: Multiple matches exist for the conditional update. */
    UpdateMultipleMatches,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for OperationOutcomeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "DELETE_MULTIPLE_MATCHES" => Ok(Self::DeleteMultipleMatches),
            "MSG_AUTH_REQUIRED" => Ok(Self::MsgAuthRequired),
            "MSG_BAD_FORMAT" => Ok(Self::MsgBadFormat),
            "MSG_BAD_SYNTAX" => Ok(Self::MsgBadSyntax),
            "MSG_CANT_PARSE_CONTENT" => Ok(Self::MsgCantParseContent),
            "MSG_CANT_PARSE_ROOT" => Ok(Self::MsgCantParseRoot),
            "MSG_CREATED" => Ok(Self::MsgCreated),
            "MSG_DATE_FORMAT" => Ok(Self::MsgDateFormat),
            "MSG_DELETED" => Ok(Self::MsgDeleted),
            "MSG_DELETED_DONE" => Ok(Self::MsgDeletedDone),
            "MSG_DELETED_ID" => Ok(Self::MsgDeletedId),
            "MSG_DUPLICATE_ID" => Ok(Self::MsgDuplicateId),
            "MSG_ERROR_PARSING" => Ok(Self::MsgErrorParsing),
            "MSG_ID_INVALID" => Ok(Self::MsgIdInvalid),
            "MSG_ID_TOO_LONG" => Ok(Self::MsgIdTooLong),
            "MSG_INVALID_ID" => Ok(Self::MsgInvalidId),
            "MSG_JSON_OBJECT" => Ok(Self::MsgJsonObject),
            "MSG_LOCAL_FAIL" => Ok(Self::MsgLocalFail),
            "MSG_NO_EXIST" => Ok(Self::MsgNoExist),
            "MSG_NO_MATCH" => Ok(Self::MsgNoMatch),
            "MSG_NO_MODULE" => Ok(Self::MsgNoModule),
            "MSG_NO_SUMMARY" => Ok(Self::MsgNoSummary),
            "MSG_OP_NOT_ALLOWED" => Ok(Self::MsgOpNotAllowed),
            "MSG_PARAM_CHAINED" => Ok(Self::MsgParamChained),
            "MSG_PARAM_INVALID" => Ok(Self::MsgParamInvalid),
            "MSG_PARAM_MODIFIER_INVALID" => Ok(Self::MsgParamModifierInvalid),
            "MSG_PARAM_NO_REPEAT" => Ok(Self::MsgParamNoRepeat),
            "MSG_PARAM_UNKNOWN" => Ok(Self::MsgParamUnknown),
            "MSG_REMOTE_FAIL" => Ok(Self::MsgRemoteFail),
            "MSG_RESOURCE_EXAMPLE_PROTECTED" => Ok(Self::MsgResourceExampleProtected),
            "MSG_RESOURCE_ID_FAIL" => Ok(Self::MsgResourceIdFail),
            "MSG_RESOURCE_ID_MISMATCH" => Ok(Self::MsgResourceIdMismatch),
            "MSG_RESOURCE_ID_MISSING" => Ok(Self::MsgResourceIdMissing),
            "MSG_RESOURCE_NOT_ALLOWED" => Ok(Self::MsgResourceNotAllowed),
            "MSG_RESOURCE_REQUIRED" => Ok(Self::MsgResourceRequired),
            "MSG_RESOURCE_TYPE_MISMATCH" => Ok(Self::MsgResourceTypeMismatch),
            "MSG_SORT_UNKNOWN" => Ok(Self::MsgSortUnknown),
            "MSG_TRANSACTION_DUPLICATE_ID" => Ok(Self::MsgTransactionDuplicateId),
            "MSG_TRANSACTION_MISSING_ID" => Ok(Self::MsgTransactionMissingId),
            "MSG_UNHANDLED_NODE_TYPE" => Ok(Self::MsgUnhandledNodeType),
            "MSG_UNKNOWN_CONTENT" => Ok(Self::MsgUnknownContent),
            "MSG_UNKNOWN_OPERATION" => Ok(Self::MsgUnknownOperation),
            "MSG_UNKNOWN_TYPE" => Ok(Self::MsgUnknownType),
            "MSG_UPDATED" => Ok(Self::MsgUpdated),
            "MSG_VERSION_AWARE" => Ok(Self::MsgVersionAware),
            "MSG_VERSION_AWARE_CONFLICT" => Ok(Self::MsgVersionAwareConflict),
            "MSG_VERSION_AWARE_URL" => Ok(Self::MsgVersionAwareUrl),
            "MSG_WRONG_NS" => Ok(Self::MsgWrongNs),
            "SEARCH_MULTIPLE" => Ok(Self::SearchMultiple),
            "SEARCH_NONE" => Ok(Self::SearchNone),
            "UPDATE_MULTIPLE_MATCHES" => Ok(Self::UpdateMultipleMatches),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for OperationOutcomeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::DeleteMultipleMatches => "DELETE_MULTIPLE_MATCHES",
            Self::MsgAuthRequired => "MSG_AUTH_REQUIRED",
            Self::MsgBadFormat => "MSG_BAD_FORMAT",
            Self::MsgBadSyntax => "MSG_BAD_SYNTAX",
            Self::MsgCantParseContent => "MSG_CANT_PARSE_CONTENT",
            Self::MsgCantParseRoot => "MSG_CANT_PARSE_ROOT",
            Self::MsgCreated => "MSG_CREATED",
            Self::MsgDateFormat => "MSG_DATE_FORMAT",
            Self::MsgDeleted => "MSG_DELETED",
            Self::MsgDeletedDone => "MSG_DELETED_DONE",
            Self::MsgDeletedId => "MSG_DELETED_ID",
            Self::MsgDuplicateId => "MSG_DUPLICATE_ID",
            Self::MsgErrorParsing => "MSG_ERROR_PARSING",
            Self::MsgIdInvalid => "MSG_ID_INVALID",
            Self::MsgIdTooLong => "MSG_ID_TOO_LONG",
            Self::MsgInvalidId => "MSG_INVALID_ID",
            Self::MsgJsonObject => "MSG_JSON_OBJECT",
            Self::MsgLocalFail => "MSG_LOCAL_FAIL",
            Self::MsgNoExist => "MSG_NO_EXIST",
            Self::MsgNoMatch => "MSG_NO_MATCH",
            Self::MsgNoModule => "MSG_NO_MODULE",
            Self::MsgNoSummary => "MSG_NO_SUMMARY",
            Self::MsgOpNotAllowed => "MSG_OP_NOT_ALLOWED",
            Self::MsgParamChained => "MSG_PARAM_CHAINED",
            Self::MsgParamInvalid => "MSG_PARAM_INVALID",
            Self::MsgParamModifierInvalid => "MSG_PARAM_MODIFIER_INVALID",
            Self::MsgParamNoRepeat => "MSG_PARAM_NO_REPEAT",
            Self::MsgParamUnknown => "MSG_PARAM_UNKNOWN",
            Self::MsgRemoteFail => "MSG_REMOTE_FAIL",
            Self::MsgResourceExampleProtected => "MSG_RESOURCE_EXAMPLE_PROTECTED",
            Self::MsgResourceIdFail => "MSG_RESOURCE_ID_FAIL",
            Self::MsgResourceIdMismatch => "MSG_RESOURCE_ID_MISMATCH",
            Self::MsgResourceIdMissing => "MSG_RESOURCE_ID_MISSING",
            Self::MsgResourceNotAllowed => "MSG_RESOURCE_NOT_ALLOWED",
            Self::MsgResourceRequired => "MSG_RESOURCE_REQUIRED",
            Self::MsgResourceTypeMismatch => "MSG_RESOURCE_TYPE_MISMATCH",
            Self::MsgSortUnknown => "MSG_SORT_UNKNOWN",
            Self::MsgTransactionDuplicateId => "MSG_TRANSACTION_DUPLICATE_ID",
            Self::MsgTransactionMissingId => "MSG_TRANSACTION_MISSING_ID",
            Self::MsgUnhandledNodeType => "MSG_UNHANDLED_NODE_TYPE",
            Self::MsgUnknownContent => "MSG_UNKNOWN_CONTENT",
            Self::MsgUnknownOperation => "MSG_UNKNOWN_OPERATION",
            Self::MsgUnknownType => "MSG_UNKNOWN_TYPE",
            Self::MsgUpdated => "MSG_UPDATED",
            Self::MsgVersionAware => "MSG_VERSION_AWARE",
            Self::MsgVersionAwareConflict => "MSG_VERSION_AWARE_CONFLICT",
            Self::MsgVersionAwareUrl => "MSG_VERSION_AWARE_URL",
            Self::MsgWrongNs => "MSG_WRONG_NS",
            Self::SearchMultiple => "SEARCH_MULTIPLE",
            Self::SearchNone => "SEARCH_NONE",
            Self::UpdateMultipleMatches => "UPDATE_MULTIPLE_MATCHES",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for OperationOutcomeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OperationOutcomeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OperationOutcomeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OperationOutcomeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OperationOutcomeCodes> for Coding {
    fn from(code: OperationOutcomeCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/operation-outcome".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OperationOutcomeCodes> for CodeableConcept {
    fn from(code: OperationOutcomeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OperationParameterScope](http://hl7.org/fhir/ValueSet/operation-parameter-scope)**. Indicates that a parameter applies when the operation is being invoked at the specified level\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum OperationParameterScope {
    /** **instance**

Instance. This is a parameter that can be used at the instance level. */
    Instance,
    /** **system**

System. This is a parameter that can be used at the system level. */
    System,
    /** **type**

Type. This is a parameter that can be used at the type level. */
    Type,
}
impl ::core::str::FromStr for OperationParameterScope {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "instance" => Ok(Self::Instance),
            "system" => Ok(Self::System),
            "type" => Ok(Self::Type),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for OperationParameterScope {
    fn as_ref(&self) -> &str {
        match self {
            Self::Instance => "instance",
            Self::System => "system",
            Self::Type => "type",
        }
    }
}
impl ::std::fmt::Debug for OperationParameterScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OperationParameterScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OperationParameterScope {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OperationParameterScope {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OperationParameterScope> for Coding {
    fn from(code: OperationParameterScope) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/operation-parameter-scope".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OperationParameterScope> for CodeableConcept {
    fn from(code: OperationParameterScope) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OperationParameterUse](http://hl7.org/fhir/ValueSet/operation-parameter-use)**. Whether an operation parameter is an input or an output parameter.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum OperationParameterUse {
    /** **in**

In. This is an input parameter. */
    In,
    /** **out**

Out. This is an output parameter. */
    Out,
}
impl ::core::str::FromStr for OperationParameterUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "in" => Ok(Self::In),
            "out" => Ok(Self::Out),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for OperationParameterUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::In => "in",
            Self::Out => "out",
        }
    }
}
impl ::std::fmt::Debug for OperationParameterUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OperationParameterUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OperationParameterUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OperationParameterUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OperationParameterUse> for Coding {
    fn from(code: OperationParameterUse) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/operation-parameter-use".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OperationParameterUse> for CodeableConcept {
    fn from(code: OperationParameterUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OrganizationAffiliationRole](http://hl7.org/fhir/organization-role)**. This example value set defines a set of codes that can be used to indicate the role of one Organization in relation to its affiliation with another.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum OrganizationAffiliationRole {
    /** **HIE/HIO**

HIE/HIO. An organization that facilitates electronic clinical data exchange between entities */
    HieHio,
    /** **agency**

Agency. An organization such as a public health agency, community/social services provider, etc. */
    Agency,
    /** **diagnostics**

Diagnostics. An organization providing diagnostic testing/laboratory services */
    Diagnostics,
    /** **member**

Member. A type of non-ownership relationship between entities (encompasses partnerships, collaboration, joint ventures, etc.) */
    Member,
    /** **payer**

Payer. An organization providing reimbursement, payment, or related services */
    Payer,
    /** **provider**

Provider. An organization that delivers care services (e.g. hospitals, clinics, community and social services, etc.). */
    Provider,
    /** **research**

Research. An organization providing research-related services such as conducting research, recruiting research participants, analyzing data, etc. */
    Research,
    /** **supplier**

Supplier. An organization that provides medical supplies (e.g. medical devices, equipment, pharmaceutical products, etc.) */
    Supplier,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for OrganizationAffiliationRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "HIE/HIO" => Ok(Self::HieHio),
            "agency" => Ok(Self::Agency),
            "diagnostics" => Ok(Self::Diagnostics),
            "member" => Ok(Self::Member),
            "payer" => Ok(Self::Payer),
            "provider" => Ok(Self::Provider),
            "research" => Ok(Self::Research),
            "supplier" => Ok(Self::Supplier),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for OrganizationAffiliationRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::HieHio => "HIE/HIO",
            Self::Agency => "agency",
            Self::Diagnostics => "diagnostics",
            Self::Member => "member",
            Self::Payer => "payer",
            Self::Provider => "provider",
            Self::Research => "research",
            Self::Supplier => "supplier",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for OrganizationAffiliationRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OrganizationAffiliationRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OrganizationAffiliationRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OrganizationAffiliationRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OrganizationAffiliationRole> for Coding {
    fn from(code: OrganizationAffiliationRole) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/organization-role".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OrganizationAffiliationRole> for CodeableConcept {
    fn from(code: OrganizationAffiliationRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[OrientationType](http://hl7.org/fhir/ValueSet/orientation-type)**. Type for orientation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum OrientationType {
    /** **antisense**

Antisense orientation of referenceSeq. Antisense orientation of reference sequence. */
    Antisense,
    /** **sense**

Sense orientation of referenceSeq. Sense orientation of reference sequence. */
    Sense,
}
impl ::core::str::FromStr for OrientationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "antisense" => Ok(Self::Antisense),
            "sense" => Ok(Self::Sense),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for OrientationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Antisense => "antisense",
            Self::Sense => "sense",
        }
    }
}
impl ::std::fmt::Debug for OrientationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for OrientationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for OrientationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for OrientationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<OrientationType> for Coding {
    fn from(code: OrientationType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/orientation-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<OrientationType> for CodeableConcept {
    fn from(code: OrientationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PackageMaterial](http://hl7.org/fhir/ValueSet/package-material)**. A material used in the construction of packages and their components.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PackageMaterial {
    /** **200000003200**

Aluminium. */
    N200000003200,
    /** **200000003201**

Cyclic Olefin Copolymer. */
    N200000003201,
    /** **200000003202**

Epoxyphenol. */
    N200000003202,
    /** **200000003203**

Glass. */
    N200000003203,
    /** **200000003204**

Glass type I. */
    N200000003204,
    /** **200000003205**

Glass type II. */
    N200000003205,
    /** **200000003206**

Glass type III. */
    N200000003206,
    /** **200000003207**

Paper. */
    N200000003207,
    /** **200000003208**

Plastic. */
    N200000003208,
    /** **200000003209**

PolyAmide. */
    N200000003209,
    /** **200000003210**

Orientated PolyAmide. */
    N200000003210,
    /** **200000003211**

PolyCarbonate. */
    N200000003211,
    /** **200000003212**

PolyChloroTriFluoroEthylene. */
    N200000003212,
    /** **200000003213**

Polyester. */
    N200000003213,
    /** **200000003214**

PolyEthylene. */
    N200000003214,
    /** **200000003215**

High Density PolyEthylene. */
    N200000003215,
    /** **200000003216**

Low Density PolyEthylene. */
    N200000003216,
    /** **200000003217**

PolyEthylene TerePhthalate. */
    N200000003217,
    /** **200000003218**

Polyolefin. */
    N200000003218,
    /** **200000003219**

PolyPropylene. */
    N200000003219,
    /** **200000003220**

PolyStyrene. */
    N200000003220,
    /** **200000003221**

PolyVinyl Acetate. */
    N200000003221,
    /** **200000003222**

PolyVinyl Chloride. */
    N200000003222,
    /** **200000003223**

Plasticised PolyVinyl Chloride. */
    N200000003223,
    /** **200000003224**

Non-plasticised PolyVinyl Chloride / Unplasticised PolyVinyl Chloride. */
    N200000003224,
    /** **200000003225**

PolyVinylidene Chloride. */
    N200000003225,
    /** **200000003226**

Rubber. */
    N200000003226,
    /** **200000003227**

Silicone oil. */
    N200000003227,
    /** **200000003228**

Silicone elastomer. */
    N200000003228,
    /** **200000003229**

Steel. */
    N200000003229,
    /** **200000003529**

Cardboard. */
    N200000003529,
    /** **200000012514**

PolyAcryloNitrile. */
    N200000012514,
    /** **200000012515**

Ethylene acrylic acid copolymer. */
    N200000012515,
    /** **200000012521**

Ethylene meta-acrylic acid. */
    N200000012521,
    /** **200000012522**

Ethylene-Vinyl Alcohol copolymer. */
    N200000012522,
    /** **200000012523**

PolyVinylidene Fluoride. */
    N200000012523,
    /** **200000012524**

Medium Density PolyEthylene. */
    N200000012524,
    /** **200000012538**

Syndiotactic Polypropylene. */
    N200000012538,
    /** **200000015521**

PolyEthylene copolymer. */
    N200000015521,
    /** **200000023330**

Expanded Polyethylene. */
    N200000023330,
    /** **200000023332**

Cyclic Olefin Polymer. */
    N200000023332,
    /** **200000025255**

Silica gel. */
    N200000025255,
    /** **200000025257**

Linear Low Density PolyEthylene. */
    N200000025257,
}
impl ::core::str::FromStr for PackageMaterial {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "200000003200" => Ok(Self::N200000003200),
            "200000003201" => Ok(Self::N200000003201),
            "200000003202" => Ok(Self::N200000003202),
            "200000003203" => Ok(Self::N200000003203),
            "200000003204" => Ok(Self::N200000003204),
            "200000003205" => Ok(Self::N200000003205),
            "200000003206" => Ok(Self::N200000003206),
            "200000003207" => Ok(Self::N200000003207),
            "200000003208" => Ok(Self::N200000003208),
            "200000003209" => Ok(Self::N200000003209),
            "200000003210" => Ok(Self::N200000003210),
            "200000003211" => Ok(Self::N200000003211),
            "200000003212" => Ok(Self::N200000003212),
            "200000003213" => Ok(Self::N200000003213),
            "200000003214" => Ok(Self::N200000003214),
            "200000003215" => Ok(Self::N200000003215),
            "200000003216" => Ok(Self::N200000003216),
            "200000003217" => Ok(Self::N200000003217),
            "200000003218" => Ok(Self::N200000003218),
            "200000003219" => Ok(Self::N200000003219),
            "200000003220" => Ok(Self::N200000003220),
            "200000003221" => Ok(Self::N200000003221),
            "200000003222" => Ok(Self::N200000003222),
            "200000003223" => Ok(Self::N200000003223),
            "200000003224" => Ok(Self::N200000003224),
            "200000003225" => Ok(Self::N200000003225),
            "200000003226" => Ok(Self::N200000003226),
            "200000003227" => Ok(Self::N200000003227),
            "200000003228" => Ok(Self::N200000003228),
            "200000003229" => Ok(Self::N200000003229),
            "200000003529" => Ok(Self::N200000003529),
            "200000012514" => Ok(Self::N200000012514),
            "200000012515" => Ok(Self::N200000012515),
            "200000012521" => Ok(Self::N200000012521),
            "200000012522" => Ok(Self::N200000012522),
            "200000012523" => Ok(Self::N200000012523),
            "200000012524" => Ok(Self::N200000012524),
            "200000012538" => Ok(Self::N200000012538),
            "200000015521" => Ok(Self::N200000015521),
            "200000023330" => Ok(Self::N200000023330),
            "200000023332" => Ok(Self::N200000023332),
            "200000025255" => Ok(Self::N200000025255),
            "200000025257" => Ok(Self::N200000025257),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PackageMaterial {
    fn as_ref(&self) -> &str {
        match self {
            Self::N200000003200 => "200000003200",
            Self::N200000003201 => "200000003201",
            Self::N200000003202 => "200000003202",
            Self::N200000003203 => "200000003203",
            Self::N200000003204 => "200000003204",
            Self::N200000003205 => "200000003205",
            Self::N200000003206 => "200000003206",
            Self::N200000003207 => "200000003207",
            Self::N200000003208 => "200000003208",
            Self::N200000003209 => "200000003209",
            Self::N200000003210 => "200000003210",
            Self::N200000003211 => "200000003211",
            Self::N200000003212 => "200000003212",
            Self::N200000003213 => "200000003213",
            Self::N200000003214 => "200000003214",
            Self::N200000003215 => "200000003215",
            Self::N200000003216 => "200000003216",
            Self::N200000003217 => "200000003217",
            Self::N200000003218 => "200000003218",
            Self::N200000003219 => "200000003219",
            Self::N200000003220 => "200000003220",
            Self::N200000003221 => "200000003221",
            Self::N200000003222 => "200000003222",
            Self::N200000003223 => "200000003223",
            Self::N200000003224 => "200000003224",
            Self::N200000003225 => "200000003225",
            Self::N200000003226 => "200000003226",
            Self::N200000003227 => "200000003227",
            Self::N200000003228 => "200000003228",
            Self::N200000003229 => "200000003229",
            Self::N200000003529 => "200000003529",
            Self::N200000012514 => "200000012514",
            Self::N200000012515 => "200000012515",
            Self::N200000012521 => "200000012521",
            Self::N200000012522 => "200000012522",
            Self::N200000012523 => "200000012523",
            Self::N200000012524 => "200000012524",
            Self::N200000012538 => "200000012538",
            Self::N200000015521 => "200000015521",
            Self::N200000023330 => "200000023330",
            Self::N200000023332 => "200000023332",
            Self::N200000025255 => "200000025255",
            Self::N200000025257 => "200000025257",
        }
    }
}
impl ::std::fmt::Debug for PackageMaterial {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PackageMaterial {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PackageMaterial {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PackageMaterial {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PackageMaterial> for Coding {
    fn from(code: PackageMaterial) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/package-material".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PackageMaterial> for CodeableConcept {
    fn from(code: PackageMaterial) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PackageType](http://hl7.org/fhir/ValueSet/package-type)**. A high level categorisation of a package.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PackageType {
    /** **MedicinalProductPack**

Medicinal product pack. */
    MedicinalProductPack,
    /** **RawMaterialPackage**

Raw material package. */
    RawMaterialPackage,
    /** **Shipping-TransportContainer**

Shipping or transport container. */
    ShippingTransportContainer,
}
impl ::core::str::FromStr for PackageType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "MedicinalProductPack" => Ok(Self::MedicinalProductPack),
            "RawMaterialPackage" => Ok(Self::RawMaterialPackage),
            "Shipping-TransportContainer" => Ok(Self::ShippingTransportContainer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PackageType {
    fn as_ref(&self) -> &str {
        match self {
            Self::MedicinalProductPack => "MedicinalProductPack",
            Self::RawMaterialPackage => "RawMaterialPackage",
            Self::ShippingTransportContainer => "Shipping-TransportContainer",
        }
    }
}
impl ::std::fmt::Debug for PackageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PackageType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PackageType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PackageType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PackageType> for Coding {
    fn from(code: PackageType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/package-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PackageType> for CodeableConcept {
    fn from(code: PackageType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PackagingType](http://hl7.org/fhir/ValueSet/packaging-type)**. A type of packaging.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PackagingType {
    /** **100000073490**

Ampoule. */
    N100000073490,
    /** **100000073491**

Applicator. */
    N100000073491,
    /** **100000073492**

Automatic injection device. */
    N100000073492,
    /** **100000073493**

Bag. */
    N100000073493,
    /** **100000073494**

Balling gun. */
    N100000073494,
    /** **100000073495**

Barrel. */
    N100000073495,
    /** **100000073496**

Blister. */
    N100000073496,
    /** **100000073497**

Bottle. */
    N100000073497,
    /** **100000073498**

Box. */
    N100000073498,
    /** **100000073499**

Brush. */
    N100000073499,
    /** **100000073500**

Brush applicator. */
    N100000073500,
    /** **100000073501**

Cannula. */
    N100000073501,
    /** **100000073502**

Cap. */
    N100000073502,
    /** **100000073503**

Cartridge. */
    N100000073503,
    /** **100000073504**

Child-resistant closure. */
    N100000073504,
    /** **100000073505**

Cup. */
    N100000073505,
    /** **100000073506**

Dabbing applicator. */
    N100000073506,
    /** **100000073507**

Dart. */
    N100000073507,
    /** **100000073508**

Dredging applicator. */
    N100000073508,
    /** **100000073509**

Dredging container. */
    N100000073509,
    /** **100000073510**

Drench gun. */
    N100000073510,
    /** **100000073511**

Dropper applicator. */
    N100000073511,
    /** **100000073512**

Dropper container. */
    N100000073512,
    /** **100000073513**

Fixed cryogenic vessel. */
    N100000073513,
    /** **100000073514**

Gas cylinder. */
    N100000073514,
    /** **100000073515**

High pressure transdermal delivery device. */
    N100000073515,
    /** **100000073516**

Implanter. */
    N100000073516,
    /** **100000073517**

Inhaler. */
    N100000073517,
    /** **100000073518**

In-ovo injection device. */
    N100000073518,
    /** **100000073519**

Injection needle. */
    N100000073519,
    /** **100000073520**

Injection syringe. */
    N100000073520,
    /** **100000073521**

Internal graduated calibration chamber. */
    N100000073521,
    /** **100000073522**

Intramammary syringe. */
    N100000073522,
    /** **100000073523**

Jar. */
    N100000073523,
    /** **100000073524**

Measuring device. */
    N100000073524,
    /** **100000073525**

Measuring spoon. */
    N100000073525,
    /** **100000073526**

Metering pump. */
    N100000073526,
    /** **100000073527**

Metering valve. */
    N100000073527,
    /** **100000073528**

Mobile cryogenic vessel. */
    N100000073528,
    /** **100000073529**

Mouthpiece. */
    N100000073529,
    /** **100000073530**

Multidose container. */
    N100000073530,
    /** **100000073531**

Multidose container with airless pump. */
    N100000073531,
    /** **100000073532**

Multipuncturer. */
    N100000073532,
    /** **100000073533**

Nasal applicator. */
    N100000073533,
    /** **100000073534**

Nebuliser. */
    N100000073534,
    /** **100000073535**

Needle applicator. */
    N100000073535,
    /** **100000073536**

Nozzle. */
    N100000073536,
    /** **100000073537**

Oral syringe. */
    N100000073537,
    /** **100000073538**

Pipette. */
    N100000073538,
    /** **100000073539**

Pipette applicator. */
    N100000073539,
    /** **100000073540**

Pouch. */
    N100000073540,
    /** **100000073541**

Pour-on container. */
    N100000073541,
    /** **100000073542**

Pre-filled gastroenteral tube. */
    N100000073542,
    /** **100000073543**

Pre-filled pen. */
    N100000073543,
    /** **100000073544**

Pre-filled syringe. */
    N100000073544,
    /** **100000073545**

Pressurised container. */
    N100000073545,
    /** **100000073546**

Prick test applicator. */
    N100000073546,
    /** **100000073547**

Sachet. */
    N100000073547,
    /** **100000073548**

Scarifier. */
    N100000073548,
    /** **100000073549**

Screw cap. */
    N100000073549,
    /** **100000073550**

Single-dose container. */
    N100000073550,
    /** **100000073551**

Spatula. */
    N100000073551,
    /** **100000073552**

Spot-on applicator. */
    N100000073552,
    /** **100000073553**

Spray container. */
    N100000073553,
    /** **100000073554**

Spray pump. */
    N100000073554,
    /** **100000073555**

Spray valve. */
    N100000073555,
    /** **100000073556**

Stab vaccinator. */
    N100000073556,
    /** **100000073557**

Stopper. */
    N100000073557,
    /** **100000073558**

Straw. */
    N100000073558,
    /** **100000073559**

Strip. */
    N100000073559,
    /** **100000073560**

Tablet container. */
    N100000073560,
    /** **100000073561**

Tube. */
    N100000073561,
    /** **100000073562**

Vaginal sponge applicator. */
    N100000073562,
    /** **100000073563**

Vial. */
    N100000073563,
    /** **100000075664**

Administration system. */
    N100000075664,
    /** **100000116195**

Calendar package. */
    N100000116195,
    /** **100000116196**

Needle-free injector. */
    N100000116196,
    /** **100000116197**

Roll-on container. */
    N100000116197,
    /** **100000125779**

Multidose container with pump. */
    N100000125779,
    /** **100000137702**

Container. */
    N100000137702,
    /** **100000137703**

Oral applicator. */
    N100000137703,
    /** **100000143554**

Multidose container with metering pump. */
    N100000143554,
    /** **100000143555**

Pack. */
    N100000143555,
    /** **100000163233**

disk. */
    N100000163233,
    /** **100000163234**

plunger. */
    N100000163234,
    /** **100000164143**

infusion port. */
    N100000164143,
    /** **100000166980**

Valve. */
    N100000166980,
    /** **100000169899**

Jerrycan. */
    N100000169899,
    /** **100000173982**

Oral applicator. */
    N100000173982,
    /** **100000173983**

Dose dispenser. */
    N100000173983,
    /** **100000174066**

Unit-dose blister. */
    N100000174066,
    /** **100000174067**

Pre-filled injector. */
    N100000174067,
    /** **100000174068**

Pre-filled oral syringe. */
    N100000174068,
    /** **100000174069**

Pre-filled oral applicator. */
    N100000174069,
    /** **100000174070**

Dose-dispenser cartridge. */
    N100000174070,
    /** **200000005068**

Pen. */
    N200000005068,
    /** **200000005585**

Wrapper. */
    N200000005585,
    /** **200000010647**

Lid. */
    N200000010647,
    /** **200000011726**

Capsule for opening. */
    N200000011726,
    /** **200000012539**

Child-resistant sachet. */
    N200000012539,
    /** **200000013191**

Tamper-evident closure. */
    N200000013191,
    /** **200000024874**

Tablet tube. */
    N200000024874,
}
impl ::core::str::FromStr for PackagingType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000073490" => Ok(Self::N100000073490),
            "100000073491" => Ok(Self::N100000073491),
            "100000073492" => Ok(Self::N100000073492),
            "100000073493" => Ok(Self::N100000073493),
            "100000073494" => Ok(Self::N100000073494),
            "100000073495" => Ok(Self::N100000073495),
            "100000073496" => Ok(Self::N100000073496),
            "100000073497" => Ok(Self::N100000073497),
            "100000073498" => Ok(Self::N100000073498),
            "100000073499" => Ok(Self::N100000073499),
            "100000073500" => Ok(Self::N100000073500),
            "100000073501" => Ok(Self::N100000073501),
            "100000073502" => Ok(Self::N100000073502),
            "100000073503" => Ok(Self::N100000073503),
            "100000073504" => Ok(Self::N100000073504),
            "100000073505" => Ok(Self::N100000073505),
            "100000073506" => Ok(Self::N100000073506),
            "100000073507" => Ok(Self::N100000073507),
            "100000073508" => Ok(Self::N100000073508),
            "100000073509" => Ok(Self::N100000073509),
            "100000073510" => Ok(Self::N100000073510),
            "100000073511" => Ok(Self::N100000073511),
            "100000073512" => Ok(Self::N100000073512),
            "100000073513" => Ok(Self::N100000073513),
            "100000073514" => Ok(Self::N100000073514),
            "100000073515" => Ok(Self::N100000073515),
            "100000073516" => Ok(Self::N100000073516),
            "100000073517" => Ok(Self::N100000073517),
            "100000073518" => Ok(Self::N100000073518),
            "100000073519" => Ok(Self::N100000073519),
            "100000073520" => Ok(Self::N100000073520),
            "100000073521" => Ok(Self::N100000073521),
            "100000073522" => Ok(Self::N100000073522),
            "100000073523" => Ok(Self::N100000073523),
            "100000073524" => Ok(Self::N100000073524),
            "100000073525" => Ok(Self::N100000073525),
            "100000073526" => Ok(Self::N100000073526),
            "100000073527" => Ok(Self::N100000073527),
            "100000073528" => Ok(Self::N100000073528),
            "100000073529" => Ok(Self::N100000073529),
            "100000073530" => Ok(Self::N100000073530),
            "100000073531" => Ok(Self::N100000073531),
            "100000073532" => Ok(Self::N100000073532),
            "100000073533" => Ok(Self::N100000073533),
            "100000073534" => Ok(Self::N100000073534),
            "100000073535" => Ok(Self::N100000073535),
            "100000073536" => Ok(Self::N100000073536),
            "100000073537" => Ok(Self::N100000073537),
            "100000073538" => Ok(Self::N100000073538),
            "100000073539" => Ok(Self::N100000073539),
            "100000073540" => Ok(Self::N100000073540),
            "100000073541" => Ok(Self::N100000073541),
            "100000073542" => Ok(Self::N100000073542),
            "100000073543" => Ok(Self::N100000073543),
            "100000073544" => Ok(Self::N100000073544),
            "100000073545" => Ok(Self::N100000073545),
            "100000073546" => Ok(Self::N100000073546),
            "100000073547" => Ok(Self::N100000073547),
            "100000073548" => Ok(Self::N100000073548),
            "100000073549" => Ok(Self::N100000073549),
            "100000073550" => Ok(Self::N100000073550),
            "100000073551" => Ok(Self::N100000073551),
            "100000073552" => Ok(Self::N100000073552),
            "100000073553" => Ok(Self::N100000073553),
            "100000073554" => Ok(Self::N100000073554),
            "100000073555" => Ok(Self::N100000073555),
            "100000073556" => Ok(Self::N100000073556),
            "100000073557" => Ok(Self::N100000073557),
            "100000073558" => Ok(Self::N100000073558),
            "100000073559" => Ok(Self::N100000073559),
            "100000073560" => Ok(Self::N100000073560),
            "100000073561" => Ok(Self::N100000073561),
            "100000073562" => Ok(Self::N100000073562),
            "100000073563" => Ok(Self::N100000073563),
            "100000075664" => Ok(Self::N100000075664),
            "100000116195" => Ok(Self::N100000116195),
            "100000116196" => Ok(Self::N100000116196),
            "100000116197" => Ok(Self::N100000116197),
            "100000125779" => Ok(Self::N100000125779),
            "100000137702" => Ok(Self::N100000137702),
            "100000137703" => Ok(Self::N100000137703),
            "100000143554" => Ok(Self::N100000143554),
            "100000143555" => Ok(Self::N100000143555),
            "100000163233" => Ok(Self::N100000163233),
            "100000163234" => Ok(Self::N100000163234),
            "100000164143" => Ok(Self::N100000164143),
            "100000166980" => Ok(Self::N100000166980),
            "100000169899" => Ok(Self::N100000169899),
            "100000173982" => Ok(Self::N100000173982),
            "100000173983" => Ok(Self::N100000173983),
            "100000174066" => Ok(Self::N100000174066),
            "100000174067" => Ok(Self::N100000174067),
            "100000174068" => Ok(Self::N100000174068),
            "100000174069" => Ok(Self::N100000174069),
            "100000174070" => Ok(Self::N100000174070),
            "200000005068" => Ok(Self::N200000005068),
            "200000005585" => Ok(Self::N200000005585),
            "200000010647" => Ok(Self::N200000010647),
            "200000011726" => Ok(Self::N200000011726),
            "200000012539" => Ok(Self::N200000012539),
            "200000013191" => Ok(Self::N200000013191),
            "200000024874" => Ok(Self::N200000024874),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PackagingType {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000073490 => "100000073490",
            Self::N100000073491 => "100000073491",
            Self::N100000073492 => "100000073492",
            Self::N100000073493 => "100000073493",
            Self::N100000073494 => "100000073494",
            Self::N100000073495 => "100000073495",
            Self::N100000073496 => "100000073496",
            Self::N100000073497 => "100000073497",
            Self::N100000073498 => "100000073498",
            Self::N100000073499 => "100000073499",
            Self::N100000073500 => "100000073500",
            Self::N100000073501 => "100000073501",
            Self::N100000073502 => "100000073502",
            Self::N100000073503 => "100000073503",
            Self::N100000073504 => "100000073504",
            Self::N100000073505 => "100000073505",
            Self::N100000073506 => "100000073506",
            Self::N100000073507 => "100000073507",
            Self::N100000073508 => "100000073508",
            Self::N100000073509 => "100000073509",
            Self::N100000073510 => "100000073510",
            Self::N100000073511 => "100000073511",
            Self::N100000073512 => "100000073512",
            Self::N100000073513 => "100000073513",
            Self::N100000073514 => "100000073514",
            Self::N100000073515 => "100000073515",
            Self::N100000073516 => "100000073516",
            Self::N100000073517 => "100000073517",
            Self::N100000073518 => "100000073518",
            Self::N100000073519 => "100000073519",
            Self::N100000073520 => "100000073520",
            Self::N100000073521 => "100000073521",
            Self::N100000073522 => "100000073522",
            Self::N100000073523 => "100000073523",
            Self::N100000073524 => "100000073524",
            Self::N100000073525 => "100000073525",
            Self::N100000073526 => "100000073526",
            Self::N100000073527 => "100000073527",
            Self::N100000073528 => "100000073528",
            Self::N100000073529 => "100000073529",
            Self::N100000073530 => "100000073530",
            Self::N100000073531 => "100000073531",
            Self::N100000073532 => "100000073532",
            Self::N100000073533 => "100000073533",
            Self::N100000073534 => "100000073534",
            Self::N100000073535 => "100000073535",
            Self::N100000073536 => "100000073536",
            Self::N100000073537 => "100000073537",
            Self::N100000073538 => "100000073538",
            Self::N100000073539 => "100000073539",
            Self::N100000073540 => "100000073540",
            Self::N100000073541 => "100000073541",
            Self::N100000073542 => "100000073542",
            Self::N100000073543 => "100000073543",
            Self::N100000073544 => "100000073544",
            Self::N100000073545 => "100000073545",
            Self::N100000073546 => "100000073546",
            Self::N100000073547 => "100000073547",
            Self::N100000073548 => "100000073548",
            Self::N100000073549 => "100000073549",
            Self::N100000073550 => "100000073550",
            Self::N100000073551 => "100000073551",
            Self::N100000073552 => "100000073552",
            Self::N100000073553 => "100000073553",
            Self::N100000073554 => "100000073554",
            Self::N100000073555 => "100000073555",
            Self::N100000073556 => "100000073556",
            Self::N100000073557 => "100000073557",
            Self::N100000073558 => "100000073558",
            Self::N100000073559 => "100000073559",
            Self::N100000073560 => "100000073560",
            Self::N100000073561 => "100000073561",
            Self::N100000073562 => "100000073562",
            Self::N100000073563 => "100000073563",
            Self::N100000075664 => "100000075664",
            Self::N100000116195 => "100000116195",
            Self::N100000116196 => "100000116196",
            Self::N100000116197 => "100000116197",
            Self::N100000125779 => "100000125779",
            Self::N100000137702 => "100000137702",
            Self::N100000137703 => "100000137703",
            Self::N100000143554 => "100000143554",
            Self::N100000143555 => "100000143555",
            Self::N100000163233 => "100000163233",
            Self::N100000163234 => "100000163234",
            Self::N100000164143 => "100000164143",
            Self::N100000166980 => "100000166980",
            Self::N100000169899 => "100000169899",
            Self::N100000173982 => "100000173982",
            Self::N100000173983 => "100000173983",
            Self::N100000174066 => "100000174066",
            Self::N100000174067 => "100000174067",
            Self::N100000174068 => "100000174068",
            Self::N100000174069 => "100000174069",
            Self::N100000174070 => "100000174070",
            Self::N200000005068 => "200000005068",
            Self::N200000005585 => "200000005585",
            Self::N200000010647 => "200000010647",
            Self::N200000011726 => "200000011726",
            Self::N200000012539 => "200000012539",
            Self::N200000013191 => "200000013191",
            Self::N200000024874 => "200000024874",
        }
    }
}
impl ::std::fmt::Debug for PackagingType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PackagingType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PackagingType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PackagingType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PackagingType> for Coding {
    fn from(code: PackagingType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/packaging-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PackagingType> for CodeableConcept {
    fn from(code: PackagingType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ParticipationStatus](http://hl7.org/fhir/ValueSet/participationstatus)**. The Participation status of an appointment.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ParticipationStatus {
    /** **accepted**

Accepted. The participant has accepted the appointment. */
    Accepted,
    /** **declined**

Declined. The participant has declined the appointment and will not participate in the appointment. */
    Declined,
    /** **needs-action**

Needs Action. The participant needs to indicate if they accept the appointment by changing this status to one of the other statuses. */
    NeedsAction,
    /** **tentative**

Tentative. The participant has  tentatively accepted the appointment. This could be automatically created by a system and requires further processing before it can be accepted. There is no commitment that attendance will occur. */
    Tentative,
}
impl ::core::str::FromStr for ParticipationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accepted" => Ok(Self::Accepted),
            "declined" => Ok(Self::Declined),
            "needs-action" => Ok(Self::NeedsAction),
            "tentative" => Ok(Self::Tentative),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ParticipationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Accepted => "accepted",
            Self::Declined => "declined",
            Self::NeedsAction => "needs-action",
            Self::Tentative => "tentative",
        }
    }
}
impl ::std::fmt::Debug for ParticipationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ParticipationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ParticipationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ParticipationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ParticipationStatus> for Coding {
    fn from(code: ParticipationStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/participationstatus".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ParticipationStatus> for CodeableConcept {
    fn from(code: ParticipationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PatientMedicineChangeTypes](http://hl7.org/fhir/ValueSet/list-item-flag)**. Example Item Flags for the List Resource. In this case, these are the kind of flags that would be used on a medication list at the end of a consultation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PatientMedicineChangeTypes {
    /** **01**

Unchanged. No change has been made to the status of this medicine item. */
    N01,
    /** **02**

Changed. The medicine item has changed. The change may be described in an extension (not defined yet) */
    N02,
    /** **03**

Cancelled. The prescription for this medicine item was cancelled by an authorized health care provider. The patient may be advised to complete the course of the prescribed medicine. This advice is a clinical decision made based on assessment of the patient's clinical condition. */
    N03,
    /** **04**

Prescribed. A new medicine item has been prescribed */
    N04,
    /** **05**

Ceased. Administration of this medication item that the patient is currently taking is stopped or recommended to be stopped (i.e. instructed to be ceased by a health care provider). This cessation is anticipated to be permanent. The Change Description should describe the reason for cessation. Example uses: the medication in question is considered ineffective or has caused serious adverse effects. This value applies both to the cessation of a medication that is prescribed by another healthcare provider or patient self-administration of OTC medicines. */
    N05,
    /** **06**

Suspended. Administration of this medication item that the patient is currently taking is on hold, or instructed or recommended by a health care provider to be temporarily stopped, or subject to clinical review (i.e. the stop may be temporary or permanent depending on the outcome of clinical review), or temporarily suspended as a pre-requisite to certain surgical or diagnostic procedures. */
    N06,
}
impl ::core::str::FromStr for PatientMedicineChangeTypes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "01" => Ok(Self::N01),
            "02" => Ok(Self::N02),
            "03" => Ok(Self::N03),
            "04" => Ok(Self::N04),
            "05" => Ok(Self::N05),
            "06" => Ok(Self::N06),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PatientMedicineChangeTypes {
    fn as_ref(&self) -> &str {
        match self {
            Self::N01 => "01",
            Self::N02 => "02",
            Self::N03 => "03",
            Self::N04 => "04",
            Self::N05 => "05",
            Self::N06 => "06",
        }
    }
}
impl ::std::fmt::Debug for PatientMedicineChangeTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PatientMedicineChangeTypes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PatientMedicineChangeTypes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PatientMedicineChangeTypes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PatientMedicineChangeTypes> for Coding {
    fn from(code: PatientMedicineChangeTypes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/list-item-flag".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PatientMedicineChangeTypes> for CodeableConcept {
    fn from(code: PatientMedicineChangeTypes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PaymentIssuerTypeCodes](http://hl7.org/fhir/ValueSet/payment-issuertype)**. This value set contains codes for the type of payment issuers.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PaymentIssuerTypeCodes {
    /** **insurance**

Insurance. An insurer, or party acting on their behalf, which is making payment following a contract, direct or indirect, with the patient to pay for healthcare-related services. */
    Insurance,
    /** **patient**

Patient. The patient or a party issuing payment on behalf of the patient. */
    Patient,
}
impl ::core::str::FromStr for PaymentIssuerTypeCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "insurance" => Ok(Self::Insurance),
            "patient" => Ok(Self::Patient),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PaymentIssuerTypeCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Insurance => "insurance",
            Self::Patient => "patient",
        }
    }
}
impl ::std::fmt::Debug for PaymentIssuerTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PaymentIssuerTypeCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PaymentIssuerTypeCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PaymentIssuerTypeCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PaymentIssuerTypeCodes> for Coding {
    fn from(code: PaymentIssuerTypeCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/payment-issuertype".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PaymentIssuerTypeCodes> for CodeableConcept {
    fn from(code: PaymentIssuerTypeCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PaymentKindCodes](http://hl7.org/fhir/ValueSet/payment-kind)**. This value set contains codes for the type of workflow from which payments arise.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PaymentKindCodes {
    /** **deposit**

Deposit on Account. The payment or adjustment is to an indicated account not to a specific charge. */
    Deposit,
    /** **kiosk**

Kiosk Payment. Payment made at an authorized Kiosk. */
    Kiosk,
    /** **online**

Online Bill Payment. Payment, full or partial, of an invoice or statement provided to the payment issuer. */
    Online,
    /** **periodic-payment**

Periodic Payment. The payment is one of a set of previously agreed payments, for example in fullfilment of a payment plan. */
    PeriodicPayment,
}
impl ::core::str::FromStr for PaymentKindCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "deposit" => Ok(Self::Deposit),
            "kiosk" => Ok(Self::Kiosk),
            "online" => Ok(Self::Online),
            "periodic-payment" => Ok(Self::PeriodicPayment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PaymentKindCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Deposit => "deposit",
            Self::Kiosk => "kiosk",
            Self::Online => "online",
            Self::PeriodicPayment => "periodic-payment",
        }
    }
}
impl ::std::fmt::Debug for PaymentKindCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PaymentKindCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PaymentKindCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PaymentKindCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PaymentKindCodes> for Coding {
    fn from(code: PaymentKindCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/payment-kind".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PaymentKindCodes> for CodeableConcept {
    fn from(code: PaymentKindCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PediatricUse](http://hl7.org/fhir/ValueSet/medicinal-product-pediatric-use)**. Suitability for age groups, in particular children.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PediatricUse {
    /** **Adolescents**

Adolescents (12 to < 18 years). Adolescents (12 to < 18 years) */
    Adolescents,
    /** **Adults**

Adults (18 to < 65 years). Adults (18 to < 65 years) */
    Adults,
    /** **AdultsAndElderly**

Adult and elderly population (> 18 years). Adult and elderly population (> 18 years) */
    AdultsAndElderly,
    /** **All**

All. All */
    All,
    /** **Children**

Children (2 to < 12 years). Children (2 to < 12 years) */
    Children,
    /** **Elderly**

Elderly (≥ 65 years). Elderly (≥ 65 years) */
    Elderly,
    /** **InUtero**

In utero. In utero */
    InUtero,
    /** **Infants**

Infants and toddlers (28 days – 23 months). Infants and toddlers (28 days – 23 months) */
    Infants,
    /** **Neonate**

Neonate. Neonate */
    Neonate,
    /** **PediatricPopulation**

Pediatric Population (< 18 years). Pediatric Population (< 18 years) */
    PediatricPopulation,
    /** **Prepubertal**

Prepubertal children (2 years to onset of puberty). Prepubertal children (2 years to onset of puberty) */
    Prepubertal,
    /** **PretermNewborn**

Preterm newborn infants (0 – 27 days). Preterm newborn infants (0 – 27 days) */
    PretermNewborn,
    /** **PubertalAndPostpubertal**

Pubertal and postpubertal adolescents (onset of puberty to < 18 years). Pubertal and postpubertal adolescents (onset of puberty to < 18 years) */
    PubertalAndPostpubertal,
    /** **TermNewborn**

Term newborn infants (0 – 27 days). Term newborn infants (0 – 27 days) */
    TermNewborn,
}
impl ::core::str::FromStr for PediatricUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Adolescents" => Ok(Self::Adolescents),
            "Adults" => Ok(Self::Adults),
            "AdultsAndElderly" => Ok(Self::AdultsAndElderly),
            "All" => Ok(Self::All),
            "Children" => Ok(Self::Children),
            "Elderly" => Ok(Self::Elderly),
            "InUtero" => Ok(Self::InUtero),
            "Infants" => Ok(Self::Infants),
            "Neonate" => Ok(Self::Neonate),
            "PediatricPopulation" => Ok(Self::PediatricPopulation),
            "Prepubertal" => Ok(Self::Prepubertal),
            "PretermNewborn" => Ok(Self::PretermNewborn),
            "PubertalAndPostpubertal" => Ok(Self::PubertalAndPostpubertal),
            "TermNewborn" => Ok(Self::TermNewborn),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PediatricUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Adolescents => "Adolescents",
            Self::Adults => "Adults",
            Self::AdultsAndElderly => "AdultsAndElderly",
            Self::All => "All",
            Self::Children => "Children",
            Self::Elderly => "Elderly",
            Self::InUtero => "InUtero",
            Self::Infants => "Infants",
            Self::Neonate => "Neonate",
            Self::PediatricPopulation => "PediatricPopulation",
            Self::Prepubertal => "Prepubertal",
            Self::PretermNewborn => "PretermNewborn",
            Self::PubertalAndPostpubertal => "PubertalAndPostpubertal",
            Self::TermNewborn => "TermNewborn",
        }
    }
}
impl ::std::fmt::Debug for PediatricUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PediatricUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PediatricUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PediatricUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PediatricUse> for Coding {
    fn from(code: PediatricUse) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-pediatric-use".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PediatricUse> for CodeableConcept {
    fn from(code: PediatricUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PermissionRuleCombining](http://hl7.org/fhir/permission-rule-combining)**. Codes identifying the rule combining. See XACML Combining algorithms  http://docs.oasis-open.org/xacml/3.0/xacml-3.0-core-spec-cos01-en.html\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum PermissionRuleCombining {
    /** **deny-overrides**

Deny-overrides. The deny overrides combining algorithm is intended for those cases where a deny decision should have priority over a permit decision. */
    DenyOverrides,
    /** **deny-unless-permit**

Deny-unless-permit. The “Deny-unless-permit” combining algorithm is intended for those cases where a permit decision should have priority over a deny decision, and an “Indeterminate” or “NotApplicable” must never be the result. It is particularly useful at the top level in a policy structure to ensure that a PDP will always return a definite “Permit” or “Deny” result. */
    DenyUnlessPermit,
    /** **ordered-deny-overrides**

Ordered-deny-overrides. The behavior of this algorithm is identical to that of the “Deny-overrides” rule-combining algorithm with one exception.  The order in which the collection of rules is evaluated SHALL match the order as listed in the permission. */
    OrderedDenyOverrides,
    /** **ordered-permit-overrides**

Ordered-permit-overrides. The behavior of this algorithm is identical to that of the “Permit-overrides” rule-combining algorithm with one exception.  The order in which the collection of rules is evaluated SHALL match the order as listed in the permission. */
    OrderedPermitOverrides,
    /** **permit-overrides**

Permit-overrides. The permit overrides combining algorithm is intended for those cases where a permit decision should have priority over a deny decision. */
    PermitOverrides,
    /** **permit-unless-deny**

Permit-unless-deny. The “Permit-unless-deny” combining algorithm is intended for those cases where a deny decision should have priority over a permit decision, and an “Indeterminate” or “NotApplicable” must never be the result. It is particularly useful at the top level in a policy structure to ensure that a PDP will always return a definite “Permit” or “Deny” result. This algorithm has the following behavior. */
    PermitUnlessDeny,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for PermissionRuleCombining {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "deny-overrides" => Ok(Self::DenyOverrides),
            "deny-unless-permit" => Ok(Self::DenyUnlessPermit),
            "ordered-deny-overrides" => Ok(Self::OrderedDenyOverrides),
            "ordered-permit-overrides" => Ok(Self::OrderedPermitOverrides),
            "permit-overrides" => Ok(Self::PermitOverrides),
            "permit-unless-deny" => Ok(Self::PermitUnlessDeny),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for PermissionRuleCombining {
    fn as_ref(&self) -> &str {
        match self {
            Self::DenyOverrides => "deny-overrides",
            Self::DenyUnlessPermit => "deny-unless-permit",
            Self::OrderedDenyOverrides => "ordered-deny-overrides",
            Self::OrderedPermitOverrides => "ordered-permit-overrides",
            Self::PermitOverrides => "permit-overrides",
            Self::PermitUnlessDeny => "permit-unless-deny",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for PermissionRuleCombining {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PermissionRuleCombining {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PermissionRuleCombining {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PermissionRuleCombining {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PermissionRuleCombining> for Coding {
    fn from(code: PermissionRuleCombining) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/permission-rule-combining".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PermissionRuleCombining> for CodeableConcept {
    fn from(code: PermissionRuleCombining) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PermissionStatus](http://hl7.org/fhir/ValueSet/permission-status)**. Codes identifying the lifecycle stage of a product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PermissionStatus {
    /** **active**

Active. Permission is given. */
    Active,
    /** **draft**

Draft. Permission is being defined. */
    Draft,
    /** **entered-in-error**

Entered in Error. Permission was entered in error and is not active. */
    EnteredInError,
    /** **rejected**

Rejected. Permission not granted. */
    Rejected,
}
impl ::core::str::FromStr for PermissionStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "rejected" => Ok(Self::Rejected),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PermissionStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Rejected => "rejected",
        }
    }
}
impl ::std::fmt::Debug for PermissionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PermissionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PermissionStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PermissionStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PermissionStatus> for Coding {
    fn from(code: PermissionStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/permission-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PermissionStatus> for CodeableConcept {
    fn from(code: PermissionStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PriceComponentType](http://hl7.org/fhir/ValueSet/price-component-type)**. Codes indicating the kind of the price component.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PriceComponentType {
    /** **base**

base price. the amount is the base price used for calculating the total price before applying surcharges, discount or taxes. */
    Base,
    /** **deduction**

deduction. the amount is a deduction applied on the base price. */
    Deduction,
    /** **discount**

discount. the amount is a discount applied on the base price. */
    Discount,
    /** **informational**

informational. the amount is of informational character, it has not been applied in the calculation of the total price. */
    Informational,
    /** **surcharge**

surcharge. the amount is a surcharge applied on the base price. */
    Surcharge,
    /** **tax**

tax. the amount is the tax component of the total price. */
    Tax,
}
impl ::core::str::FromStr for PriceComponentType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "base" => Ok(Self::Base),
            "deduction" => Ok(Self::Deduction),
            "discount" => Ok(Self::Discount),
            "informational" => Ok(Self::Informational),
            "surcharge" => Ok(Self::Surcharge),
            "tax" => Ok(Self::Tax),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PriceComponentType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Base => "base",
            Self::Deduction => "deduction",
            Self::Discount => "discount",
            Self::Informational => "informational",
            Self::Surcharge => "surcharge",
            Self::Tax => "tax",
        }
    }
}
impl ::std::fmt::Debug for PriceComponentType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PriceComponentType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PriceComponentType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PriceComponentType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PriceComponentType> for Coding {
    fn from(code: PriceComponentType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/price-component-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PriceComponentType> for CodeableConcept {
    fn from(code: PriceComponentType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProcedureDeviceActionCodes](http://hl7.org/fhir/device-action)**. Example value set for Procedure Device Action code (what happened to a device during a procedure.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ProcedureDeviceActionCodes {
    /** **explanted**

Explanted. The device was explanted from the patient during the procedure. */
    Explanted,
    /** **implanted**

Implanted. The device was implanted in the patient during the procedure. */
    Implanted,
    /** **manipulated**

Manipulated. The device remains in the patient, but its location, settings, or functionality was changed. */
    Manipulated,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ProcedureDeviceActionCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "explanted" => Ok(Self::Explanted),
            "implanted" => Ok(Self::Implanted),
            "manipulated" => Ok(Self::Manipulated),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ProcedureDeviceActionCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Explanted => "explanted",
            Self::Implanted => "implanted",
            Self::Manipulated => "manipulated",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ProcedureDeviceActionCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProcedureDeviceActionCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProcedureDeviceActionCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProcedureDeviceActionCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProcedureDeviceActionCodes> for Coding {
    fn from(code: ProcedureDeviceActionCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/device-action".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProcedureDeviceActionCodes> for CodeableConcept {
    fn from(code: ProcedureDeviceActionCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductConfidentiality](http://hl7.org/fhir/ValueSet/medicinal-product-confidentiality)**. Confidentiality rating, e.g. commercial sensitivity for a Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductConfidentiality {
    /** **CommerciallySensitive**

Commercially Sensitive. Commercially Sensitive */
    CommerciallySensitive,
    /** **NotCommerciallySensitive**

Not Commercially Sensitive. Not Commercially Sensitive */
    NotCommerciallySensitive,
}
impl ::core::str::FromStr for ProductConfidentiality {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "CommerciallySensitive" => Ok(Self::CommerciallySensitive),
            "NotCommerciallySensitive" => Ok(Self::NotCommerciallySensitive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductConfidentiality {
    fn as_ref(&self) -> &str {
        match self {
            Self::CommerciallySensitive => "CommerciallySensitive",
            Self::NotCommerciallySensitive => "NotCommerciallySensitive",
        }
    }
}
impl ::std::fmt::Debug for ProductConfidentiality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductConfidentiality {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductConfidentiality {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductConfidentiality {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductConfidentiality> for Coding {
    fn from(code: ProductConfidentiality) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-confidentiality"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductConfidentiality> for CodeableConcept {
    fn from(code: ProductConfidentiality) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductContactType](http://hl7.org/fhir/ValueSet/medicinal-product-contact-type)**. Contact type for a Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductContactType {
    /** **PVEnquiries**

Pharmacovigilance Enquiry Information. Pharmacovigilance Enquiry Information */
    PvEnquiries,
    /** **ProcedureContactAfter**

Person/Company authorised for Communication after procedure. Person/Company authorised for Communication between MAH and Authorities after Authorization */
    ProcedureContactAfter,
    /** **ProcedureContactDuring**

Person/Company authorised for Communication during procedure. Person/Company authorised for Communication on behalf of the Applicant during the Procedure */
    ProcedureContactDuring,
    /** **ProposedMAH**

Proposed Marketing Authorization Holder/Person. Proposed Marketing Authorization Holder/Person */
    ProposedMah,
    /** **QPPV**

Qualified Person Responsible for Pharmacovigilance. Qualified Person Responsible for Pharmacovigilance */
    Qppv,
}
impl ::core::str::FromStr for ProductContactType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "PVEnquiries" => Ok(Self::PvEnquiries),
            "ProcedureContactAfter" => Ok(Self::ProcedureContactAfter),
            "ProcedureContactDuring" => Ok(Self::ProcedureContactDuring),
            "ProposedMAH" => Ok(Self::ProposedMah),
            "QPPV" => Ok(Self::Qppv),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductContactType {
    fn as_ref(&self) -> &str {
        match self {
            Self::PvEnquiries => "PVEnquiries",
            Self::ProcedureContactAfter => "ProcedureContactAfter",
            Self::ProcedureContactDuring => "ProcedureContactDuring",
            Self::ProposedMah => "ProposedMAH",
            Self::Qppv => "QPPV",
        }
    }
}
impl ::std::fmt::Debug for ProductContactType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductContactType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductContactType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductContactType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductContactType> for Coding {
    fn from(code: ProductContactType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-contact-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductContactType> for CodeableConcept {
    fn from(code: ProductContactType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductCrossReferenceType](http://hl7.org/fhir/ValueSet/medicinal-product-cross-reference-type)**. Relationship to another Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductCrossReferenceType {
    /** **ActualProduct**

Link Virtual to Actual Product. Link Virtual to Actual Product */
    ActualProduct,
    /** **BrandedProduct**

Link Generic to Branded Product. Link Generic to Branded Product */
    BrandedProduct,
    /** **GenericProduct**

Link Branded to Generic Product. Link Branded to Generic Product */
    GenericProduct,
    /** **InvestigationalProduct**

Link to Investigational Product. Link to Investigational (Development) Product */
    InvestigationalProduct,
    /** **Parallel**

Link to Parallel Import Product. Link to Parallel Import Product */
    Parallel,
    /** **VirtualProduct**

Link Actual to Virtual Product. Link Actual to Virtual Product */
    VirtualProduct,
}
impl ::core::str::FromStr for ProductCrossReferenceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ActualProduct" => Ok(Self::ActualProduct),
            "BrandedProduct" => Ok(Self::BrandedProduct),
            "GenericProduct" => Ok(Self::GenericProduct),
            "InvestigationalProduct" => Ok(Self::InvestigationalProduct),
            "Parallel" => Ok(Self::Parallel),
            "VirtualProduct" => Ok(Self::VirtualProduct),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductCrossReferenceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ActualProduct => "ActualProduct",
            Self::BrandedProduct => "BrandedProduct",
            Self::GenericProduct => "GenericProduct",
            Self::InvestigationalProduct => "InvestigationalProduct",
            Self::Parallel => "Parallel",
            Self::VirtualProduct => "VirtualProduct",
        }
    }
}
impl ::std::fmt::Debug for ProductCrossReferenceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductCrossReferenceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductCrossReferenceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductCrossReferenceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductCrossReferenceType> for Coding {
    fn from(code: ProductCrossReferenceType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-cross-reference-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductCrossReferenceType> for CodeableConcept {
    fn from(code: ProductCrossReferenceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductIntendedUse](http://hl7.org/fhir/ValueSet/product-intended-use)**. ProductIntendedUse\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductIntendedUse {
    /** **Alleviation**

Alleviation. */
    Alleviation,
    /** **Diagnosis**

Diagnosis. */
    Diagnosis,
    /** **Monitoring**

Monitoring. */
    Monitoring,
    /** **Prevention**

Prevention. */
    Prevention,
    /** **Treatment**

Treatment. */
    Treatment,
}
impl ::core::str::FromStr for ProductIntendedUse {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Alleviation" => Ok(Self::Alleviation),
            "Diagnosis" => Ok(Self::Diagnosis),
            "Monitoring" => Ok(Self::Monitoring),
            "Prevention" => Ok(Self::Prevention),
            "Treatment" => Ok(Self::Treatment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductIntendedUse {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alleviation => "Alleviation",
            Self::Diagnosis => "Diagnosis",
            Self::Monitoring => "Monitoring",
            Self::Prevention => "Prevention",
            Self::Treatment => "Treatment",
        }
    }
}
impl ::std::fmt::Debug for ProductIntendedUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductIntendedUse {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductIntendedUse {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductIntendedUse {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductIntendedUse> for Coding {
    fn from(code: ProductIntendedUse) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/product-intended-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductIntendedUse> for CodeableConcept {
    fn from(code: ProductIntendedUse) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductNamePartType](http://hl7.org/fhir/ValueSet/medicinal-product-name-part-type)**. Type of part of a name for a Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductNamePartType {
    /** **ContainerPart**

Container or pack part. */
    ContainerPart,
    /** **DelimiterPart**

Delimiter part. */
    DelimiterPart,
    /** **DevicePart**

Device part. */
    DevicePart,
    /** **DoseFormPart**

Pharmaceutical dose form part. */
    DoseFormPart,
    /** **FlavorPart**

Flavor part. */
    FlavorPart,
    /** **FormulationPart**

Formulation part. */
    FormulationPart,
    /** **FullName**

Full name. */
    FullName,
    /** **IntendedUsePart**

Intended use part. */
    IntendedUsePart,
    /** **InventedNamePart**

Invented name part. */
    InventedNamePart,
    /** **LegacyNamePart**

Legacy name. */
    LegacyNamePart,
    /** **PopulationPart**

Target population part. */
    PopulationPart,
    /** **ScientificNamePart**

Scientific name part. */
    ScientificNamePart,
    /** **SpeciesNamePart**

Target species name part. */
    SpeciesNamePart,
    /** **StrengthPart**

Strength part. */
    StrengthPart,
    /** **TimeOrPeriodPart**

Time/Period part. */
    TimeOrPeriodPart,
    /** **TrademarkOrCompanyPart**

Trademark or company name part. */
    TrademarkOrCompanyPart,
}
impl ::core::str::FromStr for ProductNamePartType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ContainerPart" => Ok(Self::ContainerPart),
            "DelimiterPart" => Ok(Self::DelimiterPart),
            "DevicePart" => Ok(Self::DevicePart),
            "DoseFormPart" => Ok(Self::DoseFormPart),
            "FlavorPart" => Ok(Self::FlavorPart),
            "FormulationPart" => Ok(Self::FormulationPart),
            "FullName" => Ok(Self::FullName),
            "IntendedUsePart" => Ok(Self::IntendedUsePart),
            "InventedNamePart" => Ok(Self::InventedNamePart),
            "LegacyNamePart" => Ok(Self::LegacyNamePart),
            "PopulationPart" => Ok(Self::PopulationPart),
            "ScientificNamePart" => Ok(Self::ScientificNamePart),
            "SpeciesNamePart" => Ok(Self::SpeciesNamePart),
            "StrengthPart" => Ok(Self::StrengthPart),
            "TimeOrPeriodPart" => Ok(Self::TimeOrPeriodPart),
            "TrademarkOrCompanyPart" => Ok(Self::TrademarkOrCompanyPart),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductNamePartType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ContainerPart => "ContainerPart",
            Self::DelimiterPart => "DelimiterPart",
            Self::DevicePart => "DevicePart",
            Self::DoseFormPart => "DoseFormPart",
            Self::FlavorPart => "FlavorPart",
            Self::FormulationPart => "FormulationPart",
            Self::FullName => "FullName",
            Self::IntendedUsePart => "IntendedUsePart",
            Self::InventedNamePart => "InventedNamePart",
            Self::LegacyNamePart => "LegacyNamePart",
            Self::PopulationPart => "PopulationPart",
            Self::ScientificNamePart => "ScientificNamePart",
            Self::SpeciesNamePart => "SpeciesNamePart",
            Self::StrengthPart => "StrengthPart",
            Self::TimeOrPeriodPart => "TimeOrPeriodPart",
            Self::TrademarkOrCompanyPart => "TrademarkOrCompanyPart",
        }
    }
}
impl ::std::fmt::Debug for ProductNamePartType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductNamePartType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductNamePartType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductNamePartType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductNamePartType> for Coding {
    fn from(code: ProductNamePartType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-name-part-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductNamePartType> for CodeableConcept {
    fn from(code: ProductNamePartType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductNameType](http://hl7.org/fhir/ValueSet/medicinal-product-name-type)**. Type of a name for a Medicinal Product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductNameType {
    /** **BAN**

British Approved Name. */
    Ban,
    /** **INN**

International Non-Proprietary Name. */
    Inn,
    /** **INNM**

Modified International Non-Proprietary Name. */
    Innm,
    /** **pINN**

Proposed International Non-Proprietary Name. */
    PInn,
    /** **rINN**

Recommended International Non-Proprietary Name. */
    RInn,
}
impl ::core::str::FromStr for ProductNameType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "BAN" => Ok(Self::Ban),
            "INN" => Ok(Self::Inn),
            "INNM" => Ok(Self::Innm),
            "pINN" => Ok(Self::PInn),
            "rINN" => Ok(Self::RInn),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductNameType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ban => "BAN",
            Self::Inn => "INN",
            Self::Innm => "INNM",
            Self::PInn => "pINN",
            Self::RInn => "rINN",
        }
    }
}
impl ::std::fmt::Debug for ProductNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductNameType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductNameType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductNameType> for Coding {
    fn from(code: ProductNameType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-name-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductNameType> for CodeableConcept {
    fn from(code: ProductNameType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProductStatus](http://hl7.org/fhir/ValueSet/product-status)**. Codes identifying the lifecycle stage of a product.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProductStatus {
    /** **active**

Active. The product can be used. */
    Active,
    /** **entered-in-error**

Entered in Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
}
impl ::core::str::FromStr for ProductStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProductStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
        }
    }
}
impl ::std::fmt::Debug for ProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProductStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProductStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProductStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProductStatus> for Coding {
    fn from(code: ProductStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/product-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProductStatus> for CodeableConcept {
    fn from(code: ProductStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PropertyRepresentation](http://hl7.org/fhir/ValueSet/property-representation)**. How a property is represented when serialized.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PropertyRepresentation {
    /** **cdaText**

CDA Text Format. Use CDA narrative instead of XHTML. */
    CdaText,
    /** **typeAttr**

Type Attribute. The type of this element is indicated using xsi:type. */
    TypeAttr,
    /** **xhtml**

XHTML. The property is represented using XHTML. */
    Xhtml,
    /** **xmlAttr**

XML Attribute. In XML, this property is represented as an attribute not an element. */
    XmlAttr,
    /** **xmlText**

XML Text. This element is represented using the XML text attribute (primitives only). */
    XmlText,
}
impl ::core::str::FromStr for PropertyRepresentation {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "cdaText" => Ok(Self::CdaText),
            "typeAttr" => Ok(Self::TypeAttr),
            "xhtml" => Ok(Self::Xhtml),
            "xmlAttr" => Ok(Self::XmlAttr),
            "xmlText" => Ok(Self::XmlText),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PropertyRepresentation {
    fn as_ref(&self) -> &str {
        match self {
            Self::CdaText => "cdaText",
            Self::TypeAttr => "typeAttr",
            Self::Xhtml => "xhtml",
            Self::XmlAttr => "xmlAttr",
            Self::XmlText => "xmlText",
        }
    }
}
impl ::std::fmt::Debug for PropertyRepresentation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PropertyRepresentation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PropertyRepresentation {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PropertyRepresentation {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PropertyRepresentation> for Coding {
    fn from(code: PropertyRepresentation) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/property-representation".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PropertyRepresentation> for CodeableConcept {
    fn from(code: PropertyRepresentation) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PropertyType](http://hl7.org/fhir/ValueSet/concept-property-type)**. The type of a property value.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PropertyType {
    /** **Coding**

Coding (external reference). The property  value is a code defined in an external code system. This may be used for translations, but is not the intent. */
    Coding,
    /** **boolean**

boolean. The property value is a boolean true | false. */
    Boolean,
    /** **code**

code (internal reference). The property value is a code that identifies a concept defined in the code system. */
    Code,
    /** **dateTime**

dateTime. The property is a date or a date + time. */
    DateTime,
    /** **decimal**

decimal. The property value is a decimal number. */
    Decimal,
    /** **integer**

integer. The property value is an integer (often used to assign ranking values to concepts for supporting score assessments). */
    Integer,
    /** **string**

string. The property value is a string. */
    String,
}
impl ::core::str::FromStr for PropertyType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Coding" => Ok(Self::Coding),
            "boolean" => Ok(Self::Boolean),
            "code" => Ok(Self::Code),
            "dateTime" => Ok(Self::DateTime),
            "decimal" => Ok(Self::Decimal),
            "integer" => Ok(Self::Integer),
            "string" => Ok(Self::String),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PropertyType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Coding => "Coding",
            Self::Boolean => "boolean",
            Self::Code => "code",
            Self::DateTime => "dateTime",
            Self::Decimal => "decimal",
            Self::Integer => "integer",
            Self::String => "string",
        }
    }
}
impl ::std::fmt::Debug for PropertyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PropertyType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PropertyType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PropertyType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PropertyType> for Coding {
    fn from(code: PropertyType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/concept-property-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PropertyType> for CodeableConcept {
    fn from(code: PropertyType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ProvenanceEntityRole](http://hl7.org/fhir/ValueSet/provenance-entity-role)**. How an entity was used in an activity.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ProvenanceEntityRole {
    /** **instantiates**

Instantiates. The record resulting from this event adheres to the protocol, guideline, order set or other definition represented by this entity. */
    Instantiates,
    /** **quotation**

Quotation. An entity that is copied in full or part by an agent that is not the author of the entity. */
    Quotation,
    /** **removal**

Removal. An entity that is removed from accessibility, usually through the DELETE operator. */
    Removal,
    /** **revision**

Revision. An entity that is used by the activity to produce a new version of that entity. */
    Revision,
    /** **source**

Source. An entity that is used as input to the activity that produced the target. */
    Source,
}
impl ::core::str::FromStr for ProvenanceEntityRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "instantiates" => Ok(Self::Instantiates),
            "quotation" => Ok(Self::Quotation),
            "removal" => Ok(Self::Removal),
            "revision" => Ok(Self::Revision),
            "source" => Ok(Self::Source),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ProvenanceEntityRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Instantiates => "instantiates",
            Self::Quotation => "quotation",
            Self::Removal => "removal",
            Self::Revision => "revision",
            Self::Source => "source",
        }
    }
}
impl ::std::fmt::Debug for ProvenanceEntityRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ProvenanceEntityRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ProvenanceEntityRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ProvenanceEntityRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ProvenanceEntityRole> for Coding {
    fn from(code: ProvenanceEntityRole) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/provenance-entity-role".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ProvenanceEntityRole> for CodeableConcept {
    fn from(code: ProvenanceEntityRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PublicationStatus](http://hl7.org/fhir/ValueSet/publication-status)**. The lifecycle status of an artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PublicationStatus {
    /** **active**

Active. This resource is ready for normal use. */
    Active,
    /** **draft**

Draft. This resource is still under development and is not yet considered to be ready for normal use. */
    Draft,
    /** **retired**

Retired. This resource has been withdrawn or superseded and should no longer be used. */
    Retired,
    /** **unknown**

Unknown. The authoring system does not know which of the status values currently applies for this resource.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, it's just not known which one. */
    Unknown,
}
impl ::core::str::FromStr for PublicationStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "draft" => Ok(Self::Draft),
            "retired" => Ok(Self::Retired),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PublicationStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Draft => "draft",
            Self::Retired => "retired",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for PublicationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PublicationStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PublicationStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PublicationStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PublicationStatus> for Coding {
    fn from(code: PublicationStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/publication-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PublicationStatus> for CodeableConcept {
    fn from(code: PublicationStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[PublishedInType](http://hl7.org/fhir/ValueSet/published-in-type)**. The type of publication such as book, database, or journal.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum PublishedInType {
    /** **D001877**

Book. Non-periodical written or printed works consisting of sheets of pages fastened or bound together within covers. */
    D001877,
    /** **D019991**

Database. A structured file of information or a set of logically related data stored and retrieved using computer-based means. */
    D019991,
    /** **D020492**

Periodical. Publication intended to be issued on an ongoing basis, generally more frequently than annually, containing separate articles, stories, or writings. */
    D020492,
    /** **D064886**

Dataset. Works consisting of organized collections of data, which have been stored permanently in a formalized manner suitable for communication, interpretation, or processing. */
    D064886,
}
impl ::core::str::FromStr for PublishedInType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "D001877" => Ok(Self::D001877),
            "D019991" => Ok(Self::D019991),
            "D020492" => Ok(Self::D020492),
            "D064886" => Ok(Self::D064886),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for PublishedInType {
    fn as_ref(&self) -> &str {
        match self {
            Self::D001877 => "D001877",
            Self::D019991 => "D019991",
            Self::D020492 => "D020492",
            Self::D064886 => "D064886",
        }
    }
}
impl ::std::fmt::Debug for PublishedInType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for PublishedInType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for PublishedInType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for PublishedInType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<PublishedInType> for Coding {
    fn from(code: PublishedInType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/published-in-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<PublishedInType> for CodeableConcept {
    fn from(code: PublishedInType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuantityComparator](http://hl7.org/fhir/ValueSet/quantity-comparator)**. How the Quantity should be understood and represented.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum QuantityComparator {
    /** **<**

Less than. The actual value is less than the given value. */
    Less,
    /** **<=**

Less or Equal to. The actual value is less than or equal to the given value. */
    LessOrEqual,
    /** **>**

Greater than. The actual value is greater than the given value. */
    Greater,
    /** **>=**

Greater or Equal to. The actual value is greater than or equal to the given value. */
    GreaterOrEqual,
    /** **ad**

Sufficient to achieve this total quantity. The actual value is sufficient for the total quantity to equal the given value. */
    Ad,
}
impl ::core::str::FromStr for QuantityComparator {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "<" => Ok(Self::Less),
            "<=" => Ok(Self::LessOrEqual),
            ">" => Ok(Self::Greater),
            ">=" => Ok(Self::GreaterOrEqual),
            "ad" => Ok(Self::Ad),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for QuantityComparator {
    fn as_ref(&self) -> &str {
        match self {
            Self::Less => "<",
            Self::LessOrEqual => "<=",
            Self::Greater => ">",
            Self::GreaterOrEqual => ">=",
            Self::Ad => "ad",
        }
    }
}
impl ::std::fmt::Debug for QuantityComparator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuantityComparator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuantityComparator {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuantityComparator {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuantityComparator> for Coding {
    fn from(code: QuantityComparator) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/quantity-comparator".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuantityComparator> for CodeableConcept {
    fn from(code: QuantityComparator) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuestionnaireAnswerConstraint](http://hl7.org/fhir/questionnaire-answer-constraint)**. Codes that describe the types of constraints possible on a question item that has a list of permitted answers\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum QuestionnaireAnswerConstraint {
    /** **optionsOnly**

Options only. Only values listed as answerOption or in the expansion of the answerValueSet are permitted */
    OptionsOnly,
    /** **optionsOrString**

Options or string. In addition to the values listed as answerOption or in the expansion of the answerValueSet, free-text strings are permitted.  Answers will have a type of 'string'. */
    OptionsOrString,
    /** **optionsOrType**

Options or 'type'. In addition to the values listed as answerOption or in the expansion of the answerValueSet, any other values that correspond to the specified item.type are permitted */
    OptionsOrType,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for QuestionnaireAnswerConstraint {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "optionsOnly" => Ok(Self::OptionsOnly),
            "optionsOrString" => Ok(Self::OptionsOrString),
            "optionsOrType" => Ok(Self::OptionsOrType),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for QuestionnaireAnswerConstraint {
    fn as_ref(&self) -> &str {
        match self {
            Self::OptionsOnly => "optionsOnly",
            Self::OptionsOrString => "optionsOrString",
            Self::OptionsOrType => "optionsOrType",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for QuestionnaireAnswerConstraint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuestionnaireAnswerConstraint {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuestionnaireAnswerConstraint {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuestionnaireAnswerConstraint {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuestionnaireAnswerConstraint> for Coding {
    fn from(code: QuestionnaireAnswerConstraint) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/questionnaire-answer-constraint".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuestionnaireAnswerConstraint> for CodeableConcept {
    fn from(code: QuestionnaireAnswerConstraint) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuestionnaireItemDisabledDisplay](http://hl7.org/fhir/questionnaire-disabled-display)**. QuestionnaireItemDisabledDisplay\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum QuestionnaireItemDisabledDisplay {
    /** **hidden**

Hidden. The item (and its children) should not be visible to the user at all. */
    Hidden,
    /** **protected**

Protected. The item (and possibly its children) should not be selectable or editable but should still be visible - to allow the user to see what questions *could* have been completed had other answers caused the item to be enabled. */
    Protected,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for QuestionnaireItemDisabledDisplay {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "hidden" => Ok(Self::Hidden),
            "protected" => Ok(Self::Protected),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for QuestionnaireItemDisabledDisplay {
    fn as_ref(&self) -> &str {
        match self {
            Self::Hidden => "hidden",
            Self::Protected => "protected",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for QuestionnaireItemDisabledDisplay {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuestionnaireItemDisabledDisplay {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuestionnaireItemDisabledDisplay {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuestionnaireItemDisabledDisplay {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuestionnaireItemDisabledDisplay> for Coding {
    fn from(code: QuestionnaireItemDisabledDisplay) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/questionnaire-disabled-display".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuestionnaireItemDisabledDisplay> for CodeableConcept {
    fn from(code: QuestionnaireItemDisabledDisplay) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuestionnaireItemOperator](http://hl7.org/fhir/ValueSet/questionnaire-enable-operator)**. The criteria by which a question is enabled.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum QuestionnaireItemOperator {
    /** **!=**

Not Equals. True if no answer has a value that is equal to the enableWhen answer. */
    NotEqual,
    /** **<**

Less Than. True if at least one answer has a value that is less than the enableWhen answer. */
    Less,
    /** **<=**

Less or Equals. True if at least one answer has a value that is less or equal to the enableWhen answer. */
    LessOrEqual,
    /** **=**

Equals. True if at least one answer has a value that is equal to the enableWhen answer. */
    Equal,
    /** **>**

Greater Than. True if at least one answer has a value that is greater than the enableWhen answer. */
    Greater,
    /** **>=**

Greater or Equals. True if at least one answer has a value that is greater or equal to the enableWhen answer. */
    GreaterOrEqual,
    /** **exists**

Exists. True if the determination of 'whether an answer exists for the question' is equal to the enableWhen answer (which must be a boolean). */
    Exists,
}
impl ::core::str::FromStr for QuestionnaireItemOperator {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "!=" => Ok(Self::NotEqual),
            "<" => Ok(Self::Less),
            "<=" => Ok(Self::LessOrEqual),
            "=" => Ok(Self::Equal),
            ">" => Ok(Self::Greater),
            ">=" => Ok(Self::GreaterOrEqual),
            "exists" => Ok(Self::Exists),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for QuestionnaireItemOperator {
    fn as_ref(&self) -> &str {
        match self {
            Self::NotEqual => "!=",
            Self::Less => "<",
            Self::LessOrEqual => "<=",
            Self::Equal => "=",
            Self::Greater => ">",
            Self::GreaterOrEqual => ">=",
            Self::Exists => "exists",
        }
    }
}
impl ::std::fmt::Debug for QuestionnaireItemOperator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuestionnaireItemOperator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuestionnaireItemOperator {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuestionnaireItemOperator {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuestionnaireItemOperator> for Coding {
    fn from(code: QuestionnaireItemOperator) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/questionnaire-enable-operator".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuestionnaireItemOperator> for CodeableConcept {
    fn from(code: QuestionnaireItemOperator) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuestionnaireItemType](http://hl7.org/fhir/ValueSet/item-type)**. Distinguishes groups from questions and display text and indicates data type for questions.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum QuestionnaireItemType {
    /** **attachment**

Attachment. Question with binary content such as an image, PDF, etc. as an answer (valueAttachment). */
    Attachment,
    /** **boolean**

Boolean. Question with a yes/no answer (valueBoolean). */
    Boolean,
    /** **coding**

Coding. Question with a Coding - generally drawn from a list of possible answers (valueCoding) */
    Coding,
    /** **date**

Date. Question with a date answer (valueDate). */
    Date,
    /** **dateTime**

Date Time. Question with a date and time answer (valueDateTime). */
    DateTime,
    /** **decimal**

Decimal. Question with is a real number answer (valueDecimal).  There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to computably convey the unit of measure associated with the answer for use when performing data extraction to an element of type Quantity. */
    Decimal,
    /** **display**

Display. Text for display that will not capture an answer or have child items. */
    Display,
    /** **group**

Group. An item with no direct answer but should have at least one child item. */
    Group,
    /** **integer**

Integer. Question with an integer answer (valueInteger).  There is an extension 'http://hl7.org/fhir/StructureDefinition/questionnaire-unit' that can be used to computably convey the unit of measure associated with the answer for use when performing data extraction to an element of type Quantity. */
    Integer,
    /** **quantity**

Quantity. Question with a combination of a numeric value and unit as an answer. (valueSimpleQuantity)  There are two extensions ('http://hl7.org/fhir/StructureDefinition/questionnaire-unitOption' and 'http://hl7.org/fhir/StructureDefinition/questionnaire-unitValueSet')  that can be used to define what unit should be selected for the Quantity.code and Quantity.system. */
    Quantity,
    /** **question**

Question. An item that defines a specific answer to be captured, and which may have child items. (the answer provided in the QuestionnaireResponse should be of the defined datatype). */
    Question,
    /** **reference**

Reference. Question with a reference to another resource (practitioner, organization, etc.) as an answer (valueReference). */
    Reference,
    /** **string**

String. Question with a short (few words to short sentence) free-text entry answer (valueString).  Strings SHOULD NOT contain carriage return or newline characters.  If multi-line answers are needed, use the 'text' type. */
    String,
    /** **text**

Text. Question with a long (potentially multi-paragraph) free-text entry answer (valueString). */
    Text,
    /** **time**

Time. Question with a time (hour:minute:second) answer independent of date. (valueTime). */
    Time,
    /** **url**

Url. Question with a URL (website, FTP site, etc.) answer (valueUri). */
    Url,
}
impl ::core::str::FromStr for QuestionnaireItemType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "attachment" => Ok(Self::Attachment),
            "boolean" => Ok(Self::Boolean),
            "coding" => Ok(Self::Coding),
            "date" => Ok(Self::Date),
            "dateTime" => Ok(Self::DateTime),
            "decimal" => Ok(Self::Decimal),
            "display" => Ok(Self::Display),
            "group" => Ok(Self::Group),
            "integer" => Ok(Self::Integer),
            "quantity" => Ok(Self::Quantity),
            "question" => Ok(Self::Question),
            "reference" => Ok(Self::Reference),
            "string" => Ok(Self::String),
            "text" => Ok(Self::Text),
            "time" => Ok(Self::Time),
            "url" => Ok(Self::Url),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for QuestionnaireItemType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Attachment => "attachment",
            Self::Boolean => "boolean",
            Self::Coding => "coding",
            Self::Date => "date",
            Self::DateTime => "dateTime",
            Self::Decimal => "decimal",
            Self::Display => "display",
            Self::Group => "group",
            Self::Integer => "integer",
            Self::Quantity => "quantity",
            Self::Question => "question",
            Self::Reference => "reference",
            Self::String => "string",
            Self::Text => "text",
            Self::Time => "time",
            Self::Url => "url",
        }
    }
}
impl ::std::fmt::Debug for QuestionnaireItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuestionnaireItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuestionnaireItemType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuestionnaireItemType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuestionnaireItemType> for Coding {
    fn from(code: QuestionnaireItemType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/item-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuestionnaireItemType> for CodeableConcept {
    fn from(code: QuestionnaireItemType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[QuestionnaireResponseStatus](http://hl7.org/fhir/ValueSet/questionnaire-answers-status)**. Lifecycle status of the questionnaire response.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum QuestionnaireResponseStatus {
    /** **amended**

Amended. This QuestionnaireResponse has been filled out with answers, then marked as complete, yet changes or additions have been made to it afterwards. */
    Amended,
    /** **completed**

Completed. This QuestionnaireResponse has been filled out with answers and the current content is regarded as definitive. */
    Completed,
    /** **entered-in-error**

Entered in Error. This QuestionnaireResponse was entered in error and voided. */
    EnteredInError,
    /** **in-progress**

In Progress. This QuestionnaireResponse has been partially filled out with answers but changes or additions are still expected to be made to it. */
    InProgress,
    /** **stopped**

Stopped. This QuestionnaireResponse has been partially filled out with answers but has been abandoned. No subsequent changes can be made. */
    Stopped,
}
impl ::core::str::FromStr for QuestionnaireResponseStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended" => Ok(Self::Amended),
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "stopped" => Ok(Self::Stopped),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for QuestionnaireResponseStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Amended => "amended",
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::Stopped => "stopped",
        }
    }
}
impl ::std::fmt::Debug for QuestionnaireResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for QuestionnaireResponseStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for QuestionnaireResponseStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for QuestionnaireResponseStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<QuestionnaireResponseStatus> for Coding {
    fn from(code: QuestionnaireResponseStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/questionnaire-answers-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<QuestionnaireResponseStatus> for CodeableConcept {
    fn from(code: QuestionnaireResponseStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ReasonMedicationNotGivenCodes](http://hl7.org/fhir/reason-medication-not-given)**. This value set is provided as an example. The value set to instantiate this attribute should be drawn from a robust terminology code system that consists of or contains concepts to support the medication process.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ReasonMedicationNotGivenCodes {
    /** **a**

None. No reason known. */
    A,
    /** **b**

Away. The patient was not available when the dose was scheduled. */
    B,
    /** **c**

Asleep. The patient was asleep when the dose was scheduled. */
    C,
    /** **d**

Vomit. The patient was given the medication and immediately vomited it back. */
    D,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ReasonMedicationNotGivenCodes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "a" => Ok(Self::A),
            "b" => Ok(Self::B),
            "c" => Ok(Self::C),
            "d" => Ok(Self::D),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ReasonMedicationNotGivenCodes {
    fn as_ref(&self) -> &str {
        match self {
            Self::A => "a",
            Self::B => "b",
            Self::C => "c",
            Self::D => "d",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ReasonMedicationNotGivenCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ReasonMedicationNotGivenCodes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ReasonMedicationNotGivenCodes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ReasonMedicationNotGivenCodes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ReasonMedicationNotGivenCodes> for Coding {
    fn from(code: ReasonMedicationNotGivenCodes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/reason-medication-not-given".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ReasonMedicationNotGivenCodes> for CodeableConcept {
    fn from(code: ReasonMedicationNotGivenCodes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ReferenceHandlingPolicy](http://hl7.org/fhir/ValueSet/reference-handling-policy)**. A set of flags that defines how references are supported.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ReferenceHandlingPolicy {
    /** **enforced**

Reference Integrity Enforced. The server enforces that references have integrity - e.g. it ensures that references can always be resolved. This is typically the case for clinical record systems, but often not the case for middleware/proxy systems. */
    Enforced,
    /** **literal**

Literal References. The server supports and populates Literal references (i.e. using Reference.reference) where they are known (this code does not guarantee that all references are literal; see 'enforced'). */
    Literal,
    /** **local**

Local References Only. The server does not support references that point to other servers. */
    Local,
    /** **logical**

Logical References. The server allows logical references (i.e. using Reference.identifier). */
    Logical,
    /** **resolves**

Resolves References. The server will attempt to resolve logical references to literal references - i.e. converting Reference.identifier to Reference.reference (if resolution fails, the server may still accept resources; see logical). */
    Resolves,
}
impl ::core::str::FromStr for ReferenceHandlingPolicy {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "enforced" => Ok(Self::Enforced),
            "literal" => Ok(Self::Literal),
            "local" => Ok(Self::Local),
            "logical" => Ok(Self::Logical),
            "resolves" => Ok(Self::Resolves),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ReferenceHandlingPolicy {
    fn as_ref(&self) -> &str {
        match self {
            Self::Enforced => "enforced",
            Self::Literal => "literal",
            Self::Local => "local",
            Self::Logical => "logical",
            Self::Resolves => "resolves",
        }
    }
}
impl ::std::fmt::Debug for ReferenceHandlingPolicy {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ReferenceHandlingPolicy {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ReferenceHandlingPolicy {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ReferenceHandlingPolicy {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ReferenceHandlingPolicy> for Coding {
    fn from(code: ReferenceHandlingPolicy) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/reference-handling-policy".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ReferenceHandlingPolicy> for CodeableConcept {
    fn from(code: ReferenceHandlingPolicy) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ReferenceVersionRules](http://hl7.org/fhir/ValueSet/reference-version-rules)**. Whether a reference needs to be version specific or version independent, or whether either can be used.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ReferenceVersionRules {
    /** **either**

Either Specific or independent. The reference may be either version independent or version specific. */
    Either,
    /** **independent**

Version independent. The reference must be version independent. */
    Independent,
    /** **specific**

Version Specific. The reference must be version specific. */
    Specific,
}
impl ::core::str::FromStr for ReferenceVersionRules {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "either" => Ok(Self::Either),
            "independent" => Ok(Self::Independent),
            "specific" => Ok(Self::Specific),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ReferenceVersionRules {
    fn as_ref(&self) -> &str {
        match self {
            Self::Either => "either",
            Self::Independent => "independent",
            Self::Specific => "specific",
        }
    }
}
impl ::std::fmt::Debug for ReferenceVersionRules {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ReferenceVersionRules {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ReferenceVersionRules {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ReferenceVersionRules {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ReferenceVersionRules> for Coding {
    fn from(code: ReferenceVersionRules) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/reference-version-rules".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ReferenceVersionRules> for CodeableConcept {
    fn from(code: ReferenceVersionRules) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RegulatedAuthorizationBasis](http://hl7.org/fhir/ValueSet/regulated-authorization-basis)**. RegulatedAuthorizationBasis\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RegulatedAuthorizationBasis {
    /** **Bibliographical**

Bibliographical application (stand-alone). */
    Bibliographical,
    /** **Full**

Full application. */
    Full,
    /** **KnownHumanBlood**

Known human blood/plasma derived ancillary medicinal substance. */
    KnownHumanBlood,
    /** **KnownSubstance**

Known active substance. */
    KnownSubstance,
    /** **NewSubstance**

New active substance. */
    NewSubstance,
    /** **ParallelTrade**

Parallel traded products. */
    ParallelTrade,
    /** **SimilarBiological**

Similar biological application. */
    SimilarBiological,
    /** **TemporaryUse**

Authorizations for temporary use. */
    TemporaryUse,
    /** **TraditionalUse**

Traditional use registration for herbal medicinal product application. */
    TraditionalUse,
    /** **Well-establishedUse**

Well-established use application. */
    WellEstablishedUse,
}
impl ::core::str::FromStr for RegulatedAuthorizationBasis {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Bibliographical" => Ok(Self::Bibliographical),
            "Full" => Ok(Self::Full),
            "KnownHumanBlood" => Ok(Self::KnownHumanBlood),
            "KnownSubstance" => Ok(Self::KnownSubstance),
            "NewSubstance" => Ok(Self::NewSubstance),
            "ParallelTrade" => Ok(Self::ParallelTrade),
            "SimilarBiological" => Ok(Self::SimilarBiological),
            "TemporaryUse" => Ok(Self::TemporaryUse),
            "TraditionalUse" => Ok(Self::TraditionalUse),
            "Well-establishedUse" => Ok(Self::WellEstablishedUse),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RegulatedAuthorizationBasis {
    fn as_ref(&self) -> &str {
        match self {
            Self::Bibliographical => "Bibliographical",
            Self::Full => "Full",
            Self::KnownHumanBlood => "KnownHumanBlood",
            Self::KnownSubstance => "KnownSubstance",
            Self::NewSubstance => "NewSubstance",
            Self::ParallelTrade => "ParallelTrade",
            Self::SimilarBiological => "SimilarBiological",
            Self::TemporaryUse => "TemporaryUse",
            Self::TraditionalUse => "TraditionalUse",
            Self::WellEstablishedUse => "Well-establishedUse",
        }
    }
}
impl ::std::fmt::Debug for RegulatedAuthorizationBasis {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RegulatedAuthorizationBasis {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RegulatedAuthorizationBasis {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RegulatedAuthorizationBasis {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RegulatedAuthorizationBasis> for Coding {
    fn from(code: RegulatedAuthorizationBasis) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/regulated-authorization-basis".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RegulatedAuthorizationBasis> for CodeableConcept {
    fn from(code: RegulatedAuthorizationBasis) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RegulatedAuthorizationCaseType](http://hl7.org/fhir/ValueSet/regulated-authorization-case-type)**. RegulatedAuthorizationCaseType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RegulatedAuthorizationCaseType {
    /** **100000155699**

Specific Obligation. */
    N100000155699,
    /** **AnnualReassessment**

Annual Reassessment. */
    AnnualReassessment,
    /** **FLU**

FLU STRAIN UPDATE. */
    Flu,
    /** **Follow-up**

Follow-up Measure. */
    FollowUp,
    /** **InitialMAA**

Initial Marketing Authorization Application. */
    InitialMaa,
    /** **LiftingSuspension**

Lifting of a Suspension. */
    LiftingSuspension,
    /** **LineExtension**

Line Extension. */
    LineExtension,
    /** **Orphan**

Orphan Designation Application. */
    Orphan,
    /** **PANDEMIC**

PANDEMIC UPDATE. */
    Pandemic,
    /** **PSUR**

Periodic Safety Update Report. */
    Psur,
    /** **PaediatricSubmission**

Paediatric Submission. */
    PaediatricSubmission,
    /** **RMP**

Risk Management Plan. */
    Rmp,
    /** **Reformatting**

Reformatting. */
    Reformatting,
    /** **Renewal**

Renewal. */
    Renewal,
    /** **RepeatUse**

Repeat Use Procedure. */
    RepeatUse,
    /** **ReviewSuspension**

Review of a Suspension of MA. */
    ReviewSuspension,
    /** **SignalDetection**

Signal detection. */
    SignalDetection,
    /** **SupplementalInformation**

Supplemental Information. */
    SupplementalInformation,
    /** **TransferMA**

Transfer of a marketing authorization. */
    TransferMa,
    /** **UrgentSafetyRestriction**

Urgent Safety Restriction. */
    UrgentSafetyRestriction,
    /** **Variation**

Variation. */
    Variation,
    /** **Withdrawal**

Withdrawal. */
    Withdrawal,
}
impl ::core::str::FromStr for RegulatedAuthorizationCaseType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000155699" => Ok(Self::N100000155699),
            "AnnualReassessment" => Ok(Self::AnnualReassessment),
            "FLU" => Ok(Self::Flu),
            "Follow-up" => Ok(Self::FollowUp),
            "InitialMAA" => Ok(Self::InitialMaa),
            "LiftingSuspension" => Ok(Self::LiftingSuspension),
            "LineExtension" => Ok(Self::LineExtension),
            "Orphan" => Ok(Self::Orphan),
            "PANDEMIC" => Ok(Self::Pandemic),
            "PSUR" => Ok(Self::Psur),
            "PaediatricSubmission" => Ok(Self::PaediatricSubmission),
            "RMP" => Ok(Self::Rmp),
            "Reformatting" => Ok(Self::Reformatting),
            "Renewal" => Ok(Self::Renewal),
            "RepeatUse" => Ok(Self::RepeatUse),
            "ReviewSuspension" => Ok(Self::ReviewSuspension),
            "SignalDetection" => Ok(Self::SignalDetection),
            "SupplementalInformation" => Ok(Self::SupplementalInformation),
            "TransferMA" => Ok(Self::TransferMa),
            "UrgentSafetyRestriction" => Ok(Self::UrgentSafetyRestriction),
            "Variation" => Ok(Self::Variation),
            "Withdrawal" => Ok(Self::Withdrawal),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RegulatedAuthorizationCaseType {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000155699 => "100000155699",
            Self::AnnualReassessment => "AnnualReassessment",
            Self::Flu => "FLU",
            Self::FollowUp => "Follow-up",
            Self::InitialMaa => "InitialMAA",
            Self::LiftingSuspension => "LiftingSuspension",
            Self::LineExtension => "LineExtension",
            Self::Orphan => "Orphan",
            Self::Pandemic => "PANDEMIC",
            Self::Psur => "PSUR",
            Self::PaediatricSubmission => "PaediatricSubmission",
            Self::Rmp => "RMP",
            Self::Reformatting => "Reformatting",
            Self::Renewal => "Renewal",
            Self::RepeatUse => "RepeatUse",
            Self::ReviewSuspension => "ReviewSuspension",
            Self::SignalDetection => "SignalDetection",
            Self::SupplementalInformation => "SupplementalInformation",
            Self::TransferMa => "TransferMA",
            Self::UrgentSafetyRestriction => "UrgentSafetyRestriction",
            Self::Variation => "Variation",
            Self::Withdrawal => "Withdrawal",
        }
    }
}
impl ::std::fmt::Debug for RegulatedAuthorizationCaseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RegulatedAuthorizationCaseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RegulatedAuthorizationCaseType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RegulatedAuthorizationCaseType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RegulatedAuthorizationCaseType> for Coding {
    fn from(code: RegulatedAuthorizationCaseType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/regulated-authorization-case-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RegulatedAuthorizationCaseType> for CodeableConcept {
    fn from(code: RegulatedAuthorizationCaseType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RegulatedAuthorizationType](http://hl7.org/fhir/ValueSet/regulated-authorization-type)**. RegulatedAuthorizationType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RegulatedAuthorizationType {
    /** **MarketingAuth**

Marketing Authorization. */
    MarketingAuth,
    /** **Orphan**

Orphan Drug Authorization. */
    Orphan,
    /** **Pediatric**

Pediatric Use Drug Authorization. */
    Pediatric,
}
impl ::core::str::FromStr for RegulatedAuthorizationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "MarketingAuth" => Ok(Self::MarketingAuth),
            "Orphan" => Ok(Self::Orphan),
            "Pediatric" => Ok(Self::Pediatric),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RegulatedAuthorizationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::MarketingAuth => "MarketingAuth",
            Self::Orphan => "Orphan",
            Self::Pediatric => "Pediatric",
        }
    }
}
impl ::std::fmt::Debug for RegulatedAuthorizationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RegulatedAuthorizationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RegulatedAuthorizationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RegulatedAuthorizationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RegulatedAuthorizationType> for Coding {
    fn from(code: RegulatedAuthorizationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/regulated-authorization-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RegulatedAuthorizationType> for CodeableConcept {
    fn from(code: RegulatedAuthorizationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RelatedArtifactType](http://hl7.org/fhir/ValueSet/related-artifact-type)**. The type of relationship to the related artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RelatedArtifactType {
    /** **amended-with**

Amended With. This artifact is amended with or changed by the target artifact. There is information in this artifact that should be functionally replaced with information in the target artifact. */
    AmendedWith,
    /** **amends**

Amends. This artifact amends or changes the target artifact. This artifact adds additional information that is functionally expected to replace information in the target artifact. This artifact replaces a part but not all of the target artifact. */
    Amends,
    /** **appended-with**

Appended With. This artifact has additional information in the target artifact. */
    AppendedWith,
    /** **appends**

Appends. This artifact adds additional information to the target artifact. The additional information does not replace or change information in the target artifact. */
    Appends,
    /** **citation**

Citation. Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. */
    Citation,
    /** **cite-as**

Cite As. The related artifact is the citation for this artifact. */
    CiteAs,
    /** **cited-by**

Cited By. This artifact is cited by the target artifact. */
    CitedBy,
    /** **cites**

Cites. This artifact cites the target artifact. This may be a bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. */
    Cites,
    /** **comment-in**

Has Comment In. This artifact has comments about it in the target artifact.  The type of comments may be expressed in the targetClassifier element such as reply, review, editorial, feedback, solicited, unsolicited, structured, unstructured. */
    CommentIn,
    /** **comments-on**

Is Comment On. This artifact contains comments about the target artifact. */
    CommentsOn,
    /** **composed-of**

Composed Of. This artifact is composed of the target artifact. This artifact is constructed with the target artifact as a component. The target artifact is a part of this artifact. (A dataset is composed of data.). */
    ComposedOf,
    /** **contained-in**

Contained In. This artifact is contained in the target artifact. The target artifact is a data structure whose instances are collections of other objects. */
    ContainedIn,
    /** **contains**

Contains. This artifact is a container in which the target artifact is contained. A container is a data structure whose instances are collections of other objects. (A database contains the dataset.). */
    Contains,
    /** **correction-in**

Correction In. This artifact has corrections to it in the target artifact. The target artifact identifies errors and replacement content for this artifact. */
    CorrectionIn,
    /** **corrects**

Corrects. This artifact identifies errors and replacement content for the target artifact. */
    Corrects,
    /** **created-with**

Created With. This artifact was created with the target artifact. The target artifact is a tool or support material used in the creation of the artifact, and not content that the artifact was derived from. */
    CreatedWith,
    /** **depends-on**

Depends On. This artifact depends on the target artifact. There is a requirement to use the target artifact in the creation or interpretation of this artifact. */
    DependsOn,
    /** **derived-from**

Derived From. This artifact is derived from the target artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting. The artifact may be derived from one or more target artifacts. */
    DerivedFrom,
    /** **documentation**

Documentation. Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness. */
    Documentation,
    /** **documents**

Documents. This artifact provides additional documentation for the target artifact. This could include additional instructions on usage as well as additional information on clinical context or appropriateness. */
    Documents,
    /** **justification**

Justification. The target artifact is a summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource. */
    Justification,
    /** **part-of**

Part Of. This artifact is a part of the target artifact. The target artifact is composed of this artifact (and possibly other artifacts). */
    PartOf,
    /** **predecessor**

Predecessor. The previous version of the knowledge artifact, used to establish an ordering of versions of an artifact, independent of the status of each version. */
    Predecessor,
    /** **replaced-with**

Replaced With. This artifact is replaced with or superseded by the target artifact. This artifact may be considered deprecated. */
    ReplacedWith,
    /** **replaces**

Replaces. This artifact replaces or supersedes the target artifact. The target artifact may be considered deprecated. */
    Replaces,
    /** **retracted-by**

Retracted By. This artifact is retracted by the target artifact. The content that was published in this artifact should be considered removed from publication and should no longer be considered part of the public record. */
    RetractedBy,
    /** **retracts**

Retracts. This artifact retracts the target artifact. The content that was published in the target artifact should be considered removed from publication and should no longer be considered part of the public record. */
    Retracts,
    /** **signs**

Signs. This artifact is a signature of the target artifact. */
    Signs,
    /** **similar-to**

Similar To. This artifact has characteristics in common with the target artifact. This relationship may be used in systems to “deduplicate” knowledge artifacts from different sources, or in systems to show “similar items”. */
    SimilarTo,
    /** **specification-of**

Specification Of. The target artifact is a precise description of a concept in this artifact. This may be used when the RelatedArtifact datatype is used in elements contained in this artifact. */
    SpecificationOf,
    /** **successor**

Successor. The subsequent version of the knowledge artfact, used to establish an ordering of versions of an artifact, independent of the status of each version. */
    Successor,
    /** **supported-with**

Supported With. The target artifact contains additional information related to the knowledge artifact but is not documentation as the additional information does not describe, explain, or instruct regarding the knowledge artifact content or application. This could include an associated dataset. */
    SupportedWith,
    /** **supports**

Supports. This artifact provides additional support for the target artifact. The type of support  is not documentation as it does not describe, explain, or instruct regarding the target artifact. */
    Supports,
    /** **transformed-into**

Transformed Into. This artifact was transformed into the target artifact (e.g., by format or language conversion). */
    TransformedInto,
    /** **transformed-with**

Transformed With. This artifact was generated by transforming a related artifact (e.g., format or language conversion), noted separately with the “transforms” relationship type. This transformation used the target artifact to inform the transformation. The target artifact may be a conversion script or translation guide. */
    TransformedWith,
    /** **transforms**

Transforms. This artifact was generated by transforming the target artifact (e.g., format or language conversion). This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but changes are only apparent in form and there is only one target artifact with the “transforms” relationship type. */
    Transforms,
}
impl ::core::str::FromStr for RelatedArtifactType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended-with" => Ok(Self::AmendedWith),
            "amends" => Ok(Self::Amends),
            "appended-with" => Ok(Self::AppendedWith),
            "appends" => Ok(Self::Appends),
            "citation" => Ok(Self::Citation),
            "cite-as" => Ok(Self::CiteAs),
            "cited-by" => Ok(Self::CitedBy),
            "cites" => Ok(Self::Cites),
            "comment-in" => Ok(Self::CommentIn),
            "comments-on" => Ok(Self::CommentsOn),
            "composed-of" => Ok(Self::ComposedOf),
            "contained-in" => Ok(Self::ContainedIn),
            "contains" => Ok(Self::Contains),
            "correction-in" => Ok(Self::CorrectionIn),
            "corrects" => Ok(Self::Corrects),
            "created-with" => Ok(Self::CreatedWith),
            "depends-on" => Ok(Self::DependsOn),
            "derived-from" => Ok(Self::DerivedFrom),
            "documentation" => Ok(Self::Documentation),
            "documents" => Ok(Self::Documents),
            "justification" => Ok(Self::Justification),
            "part-of" => Ok(Self::PartOf),
            "predecessor" => Ok(Self::Predecessor),
            "replaced-with" => Ok(Self::ReplacedWith),
            "replaces" => Ok(Self::Replaces),
            "retracted-by" => Ok(Self::RetractedBy),
            "retracts" => Ok(Self::Retracts),
            "signs" => Ok(Self::Signs),
            "similar-to" => Ok(Self::SimilarTo),
            "specification-of" => Ok(Self::SpecificationOf),
            "successor" => Ok(Self::Successor),
            "supported-with" => Ok(Self::SupportedWith),
            "supports" => Ok(Self::Supports),
            "transformed-into" => Ok(Self::TransformedInto),
            "transformed-with" => Ok(Self::TransformedWith),
            "transforms" => Ok(Self::Transforms),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RelatedArtifactType {
    fn as_ref(&self) -> &str {
        match self {
            Self::AmendedWith => "amended-with",
            Self::Amends => "amends",
            Self::AppendedWith => "appended-with",
            Self::Appends => "appends",
            Self::Citation => "citation",
            Self::CiteAs => "cite-as",
            Self::CitedBy => "cited-by",
            Self::Cites => "cites",
            Self::CommentIn => "comment-in",
            Self::CommentsOn => "comments-on",
            Self::ComposedOf => "composed-of",
            Self::ContainedIn => "contained-in",
            Self::Contains => "contains",
            Self::CorrectionIn => "correction-in",
            Self::Corrects => "corrects",
            Self::CreatedWith => "created-with",
            Self::DependsOn => "depends-on",
            Self::DerivedFrom => "derived-from",
            Self::Documentation => "documentation",
            Self::Documents => "documents",
            Self::Justification => "justification",
            Self::PartOf => "part-of",
            Self::Predecessor => "predecessor",
            Self::ReplacedWith => "replaced-with",
            Self::Replaces => "replaces",
            Self::RetractedBy => "retracted-by",
            Self::Retracts => "retracts",
            Self::Signs => "signs",
            Self::SimilarTo => "similar-to",
            Self::SpecificationOf => "specification-of",
            Self::Successor => "successor",
            Self::SupportedWith => "supported-with",
            Self::Supports => "supports",
            Self::TransformedInto => "transformed-into",
            Self::TransformedWith => "transformed-with",
            Self::Transforms => "transforms",
        }
    }
}
impl ::std::fmt::Debug for RelatedArtifactType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RelatedArtifactType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RelatedArtifactType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RelatedArtifactType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RelatedArtifactType> for Coding {
    fn from(code: RelatedArtifactType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/related-artifact-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RelatedArtifactType> for CodeableConcept {
    fn from(code: RelatedArtifactType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RelatedArtifactTypeExpanded](http://hl7.org/fhir/ValueSet/related-artifact-type-expanded)**. The type of relationship to the cited artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RelatedArtifactTypeExpanded {
    /** **amended-with**

Amended With. This artifact is amended with or changed by the target artifact. There is information in this artifact that should be functionally replaced with information in the target artifact. */
    AmendedWith,
    /** **amends**

Amends. This artifact amends or changes the target artifact. This artifact adds additional information that is functionally expected to replace information in the target artifact. This artifact replaces a part but not all of the target artifact. */
    Amends,
    /** **appended-with**

Appended With. This artifact has additional information in the target artifact. */
    AppendedWith,
    /** **appends**

Appends. This artifact adds additional information to the target artifact. The additional information does not replace or change information in the target artifact. */
    Appends,
    /** **citation**

Citation. Bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. */
    Citation,
    /** **cite-as**

Cite As. The related artifact is the citation for this artifact. */
    CiteAs,
    /** **cited-by**

Cited By. This artifact is cited by the target artifact. */
    CitedBy,
    /** **cites**

Cites. This artifact cites the target artifact. This may be a bibliographic citation for papers, references, or other relevant material for the knowledge resource. This is intended to allow for citation of related material, but that was not necessarily specifically prepared in connection with this knowledge resource. */
    Cites,
    /** **comment-in**

Has Comment In. This artifact has comments about it in the target artifact.  The type of comments may be expressed in the targetClassifier element such as reply, review, editorial, feedback, solicited, unsolicited, structured, unstructured. */
    CommentIn,
    /** **comments-on**

Is Comment On. This artifact contains comments about the target artifact. */
    CommentsOn,
    /** **composed-of**

Composed Of. This artifact is composed of the target artifact. This artifact is constructed with the target artifact as a component. The target artifact is a part of this artifact. (A dataset is composed of data.). */
    ComposedOf,
    /** **contained-in**

Contained In. This artifact is contained in the target artifact. The target artifact is a data structure whose instances are collections of other objects. */
    ContainedIn,
    /** **contains**

Contains. This artifact is a container in which the target artifact is contained. A container is a data structure whose instances are collections of other objects. (A database contains the dataset.). */
    Contains,
    /** **correction-in**

Correction In. This artifact has corrections to it in the target artifact. The target artifact identifies errors and replacement content for this artifact. */
    CorrectionIn,
    /** **corrects**

Corrects. This artifact identifies errors and replacement content for the target artifact. */
    Corrects,
    /** **created-with**

Created With. This artifact was created with the target artifact. The target artifact is a tool or support material used in the creation of the artifact, and not content that the artifact was derived from. */
    CreatedWith,
    /** **depends-on**

Depends On. This artifact depends on the target artifact. There is a requirement to use the target artifact in the creation or interpretation of this artifact. */
    DependsOn,
    /** **derived-from**

Derived From. This artifact is derived from the target artifact. This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but is modified to capture either a different set of overall requirements, or a more specific set of requirements such as those involved in a particular institution or clinical setting. The artifact may be derived from one or more target artifacts. */
    DerivedFrom,
    /** **documentation**

Documentation. Additional documentation for the knowledge resource. This would include additional instructions on usage as well as additional information on clinical context or appropriateness. */
    Documentation,
    /** **documents**

Documents. This artifact provides additional documentation for the target artifact. This could include additional instructions on usage as well as additional information on clinical context or appropriateness. */
    Documents,
    /** **justification**

Justification. The target artifact is a summary of the justification for the knowledge resource including supporting evidence, relevant guidelines, or other clinically important information. This information is intended to provide a way to make the justification for the knowledge resource available to the consumer of interventions or results produced by the knowledge resource. */
    Justification,
    /** **part-of**

Part Of. This artifact is a part of the target artifact. The target artifact is composed of this artifact (and possibly other artifacts). */
    PartOf,
    /** **predecessor**

Predecessor. The previous version of the knowledge artifact, used to establish an ordering of versions of an artifact, independent of the status of each version. */
    Predecessor,
    /** **replaced-with**

Replaced With. This artifact is replaced with or superseded by the target artifact. This artifact may be considered deprecated. */
    ReplacedWith,
    /** **replaces**

Replaces. This artifact replaces or supersedes the target artifact. The target artifact may be considered deprecated. */
    Replaces,
    /** **reprint**

Reprint. A copy of the artifact in a publication with a different artifact identifier. */
    Reprint,
    /** **reprint-of**

Reprint Of. The original version of record for which the current artifact is a copy. */
    ReprintOf,
    /** **retracted-by**

Retracted By. This artifact is retracted by the target artifact. The content that was published in this artifact should be considered removed from publication and should no longer be considered part of the public record. */
    RetractedBy,
    /** **retracts**

Retracts. This artifact retracts the target artifact. The content that was published in the target artifact should be considered removed from publication and should no longer be considered part of the public record. */
    Retracts,
    /** **signs**

Signs. This artifact is a signature of the target artifact. */
    Signs,
    /** **similar-to**

Similar To. This artifact has characteristics in common with the target artifact. This relationship may be used in systems to “deduplicate” knowledge artifacts from different sources, or in systems to show “similar items”. */
    SimilarTo,
    /** **specification-of**

Specification Of. The target artifact is a precise description of a concept in this artifact. This may be used when the RelatedArtifact datatype is used in elements contained in this artifact. */
    SpecificationOf,
    /** **successor**

Successor. The subsequent version of the knowledge artfact, used to establish an ordering of versions of an artifact, independent of the status of each version. */
    Successor,
    /** **supported-with**

Supported With. The target artifact contains additional information related to the knowledge artifact but is not documentation as the additional information does not describe, explain, or instruct regarding the knowledge artifact content or application. This could include an associated dataset. */
    SupportedWith,
    /** **supports**

Supports. This artifact provides additional support for the target artifact. The type of support  is not documentation as it does not describe, explain, or instruct regarding the target artifact. */
    Supports,
    /** **transformed-into**

Transformed Into. This artifact was transformed into the target artifact (e.g., by format or language conversion). */
    TransformedInto,
    /** **transformed-with**

Transformed With. This artifact was generated by transforming a related artifact (e.g., format or language conversion), noted separately with the “transforms” relationship type. This transformation used the target artifact to inform the transformation. The target artifact may be a conversion script or translation guide. */
    TransformedWith,
    /** **transforms**

Transforms. This artifact was generated by transforming the target artifact (e.g., format or language conversion). This is intended to capture the relationship in which a particular knowledge resource is based on the content of another artifact, but changes are only apparent in form and there is only one target artifact with the “transforms” relationship type. */
    Transforms,
}
impl ::core::str::FromStr for RelatedArtifactTypeExpanded {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amended-with" => Ok(Self::AmendedWith),
            "amends" => Ok(Self::Amends),
            "appended-with" => Ok(Self::AppendedWith),
            "appends" => Ok(Self::Appends),
            "citation" => Ok(Self::Citation),
            "cite-as" => Ok(Self::CiteAs),
            "cited-by" => Ok(Self::CitedBy),
            "cites" => Ok(Self::Cites),
            "comment-in" => Ok(Self::CommentIn),
            "comments-on" => Ok(Self::CommentsOn),
            "composed-of" => Ok(Self::ComposedOf),
            "contained-in" => Ok(Self::ContainedIn),
            "contains" => Ok(Self::Contains),
            "correction-in" => Ok(Self::CorrectionIn),
            "corrects" => Ok(Self::Corrects),
            "created-with" => Ok(Self::CreatedWith),
            "depends-on" => Ok(Self::DependsOn),
            "derived-from" => Ok(Self::DerivedFrom),
            "documentation" => Ok(Self::Documentation),
            "documents" => Ok(Self::Documents),
            "justification" => Ok(Self::Justification),
            "part-of" => Ok(Self::PartOf),
            "predecessor" => Ok(Self::Predecessor),
            "replaced-with" => Ok(Self::ReplacedWith),
            "replaces" => Ok(Self::Replaces),
            "reprint" => Ok(Self::Reprint),
            "reprint-of" => Ok(Self::ReprintOf),
            "retracted-by" => Ok(Self::RetractedBy),
            "retracts" => Ok(Self::Retracts),
            "signs" => Ok(Self::Signs),
            "similar-to" => Ok(Self::SimilarTo),
            "specification-of" => Ok(Self::SpecificationOf),
            "successor" => Ok(Self::Successor),
            "supported-with" => Ok(Self::SupportedWith),
            "supports" => Ok(Self::Supports),
            "transformed-into" => Ok(Self::TransformedInto),
            "transformed-with" => Ok(Self::TransformedWith),
            "transforms" => Ok(Self::Transforms),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RelatedArtifactTypeExpanded {
    fn as_ref(&self) -> &str {
        match self {
            Self::AmendedWith => "amended-with",
            Self::Amends => "amends",
            Self::AppendedWith => "appended-with",
            Self::Appends => "appends",
            Self::Citation => "citation",
            Self::CiteAs => "cite-as",
            Self::CitedBy => "cited-by",
            Self::Cites => "cites",
            Self::CommentIn => "comment-in",
            Self::CommentsOn => "comments-on",
            Self::ComposedOf => "composed-of",
            Self::ContainedIn => "contained-in",
            Self::Contains => "contains",
            Self::CorrectionIn => "correction-in",
            Self::Corrects => "corrects",
            Self::CreatedWith => "created-with",
            Self::DependsOn => "depends-on",
            Self::DerivedFrom => "derived-from",
            Self::Documentation => "documentation",
            Self::Documents => "documents",
            Self::Justification => "justification",
            Self::PartOf => "part-of",
            Self::Predecessor => "predecessor",
            Self::ReplacedWith => "replaced-with",
            Self::Replaces => "replaces",
            Self::Reprint => "reprint",
            Self::ReprintOf => "reprint-of",
            Self::RetractedBy => "retracted-by",
            Self::Retracts => "retracts",
            Self::Signs => "signs",
            Self::SimilarTo => "similar-to",
            Self::SpecificationOf => "specification-of",
            Self::Successor => "successor",
            Self::SupportedWith => "supported-with",
            Self::Supports => "supports",
            Self::TransformedInto => "transformed-into",
            Self::TransformedWith => "transformed-with",
            Self::Transforms => "transforms",
        }
    }
}
impl ::std::fmt::Debug for RelatedArtifactTypeExpanded {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RelatedArtifactTypeExpanded {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RelatedArtifactTypeExpanded {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RelatedArtifactTypeExpanded {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RelatedArtifactTypeExpanded> for Coding {
    fn from(code: RelatedArtifactTypeExpanded) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/related-artifact-type-expanded".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RelatedArtifactTypeExpanded> for CodeableConcept {
    fn from(code: RelatedArtifactTypeExpanded) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RemittanceOutcome](http://hl7.org/fhir/ValueSet/remittance-outcome)**. The outcome of the processing.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RemittanceOutcome {
    /** **complete**

Complete. The processing completed without errors. */
    Complete,
    /** **error**

Error. The processing identified errors. */
    Error,
    /** **partial**

Partial. No errors have been detected and some of the adjudication has been performed. */
    Partial,
}
impl ::core::str::FromStr for RemittanceOutcome {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complete" => Ok(Self::Complete),
            "error" => Ok(Self::Error),
            "partial" => Ok(Self::Partial),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RemittanceOutcome {
    fn as_ref(&self) -> &str {
        match self {
            Self::Complete => "complete",
            Self::Error => "error",
            Self::Partial => "partial",
        }
    }
}
impl ::std::fmt::Debug for RemittanceOutcome {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RemittanceOutcome {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RemittanceOutcome {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RemittanceOutcome {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RemittanceOutcome> for Coding {
    fn from(code: RemittanceOutcome) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/remittance-outcome".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RemittanceOutcome> for CodeableConcept {
    fn from(code: RemittanceOutcome) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ReportRelationshipType](http://hl7.org/fhir/ValueSet/report-relation-type)**. The type of relationship between reports.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ReportRelationshipType {
    /** **amendedWith**

Amended With. This document was. */
    AmendedWith,
    /** **amends**

Amends. This document notes corrections or changes to replace or supersede parts of the target document. */
    Amends,
    /** **appendedWith**

Appended With. This document was. */
    AppendedWith,
    /** **appends**

Appends. This document adds additional information to the target document. */
    Appends,
    /** **replacedWith**

Replaced With. This document was. */
    ReplacedWith,
    /** **replaces**

Replaces. This document replaces or supersedes the target document. */
    Replaces,
    /** **transformedWith**

Transformed With. This document was. */
    TransformedWith,
    /** **transforms**

Transforms. This document was generated by transforming the target document (eg format or language conversion). */
    Transforms,
}
impl ::core::str::FromStr for ReportRelationshipType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "amendedWith" => Ok(Self::AmendedWith),
            "amends" => Ok(Self::Amends),
            "appendedWith" => Ok(Self::AppendedWith),
            "appends" => Ok(Self::Appends),
            "replacedWith" => Ok(Self::ReplacedWith),
            "replaces" => Ok(Self::Replaces),
            "transformedWith" => Ok(Self::TransformedWith),
            "transforms" => Ok(Self::Transforms),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ReportRelationshipType {
    fn as_ref(&self) -> &str {
        match self {
            Self::AmendedWith => "amendedWith",
            Self::Amends => "amends",
            Self::AppendedWith => "appendedWith",
            Self::Appends => "appends",
            Self::ReplacedWith => "replacedWith",
            Self::Replaces => "replaces",
            Self::TransformedWith => "transformedWith",
            Self::Transforms => "transforms",
        }
    }
}
impl ::std::fmt::Debug for ReportRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ReportRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ReportRelationshipType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ReportRelationshipType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ReportRelationshipType> for Coding {
    fn from(code: ReportRelationshipType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/report-relation-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ReportRelationshipType> for CodeableConcept {
    fn from(code: ReportRelationshipType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ReportSectionType](http://hl7.org/fhir/ValueSet/evidence-report-section)**. Evidence Report Section Type.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ReportSectionType {
    /** **Assertion**

Assertion. Assertion. */
    Assertion,
    /** **Certainty-of-Evidence**

Certainty of Evidence. Certainty of Evidence. */
    CertaintyOfEvidence,
    /** **Column-Header**

Column Header. Denotes the header to use for the column for a tabular report. */
    ColumnHeader,
    /** **Column-Headers**

Column Headers. Denotes a section specifying column headers for a tabular report. */
    ColumnHeaders,
    /** **Control-group-alone-Evidence**

Evidence Results for the control exposure only. Evidence Results for the control exposure only. */
    ControlGroupAloneEvidence,
    /** **Efficacy-outcomes**

Efficacy-outcomes. Outcomes related to efficacy or potential benefits of interventions. */
    EfficacyOutcomes,
    /** **Evidence**

Evidence Results. Evidence Results. */
    Evidence,
    /** **Evidence-Classifier**

Evidence Classifier section. This section is used for classifiers of the evidence. */
    EvidenceClassifier,
    /** **EvidenceVariable**

Evidence Variables used. Evidence Variables used. */
    EvidenceVariable,
    /** **EvidenceVariable-exposure**

Evidence Variable in variable role Exposure. Evidence Variable in variable role Exposure. */
    EvidenceVariableExposure,
    /** **EvidenceVariable-intended**

Evidence Variables intended for interpretation. Evidence Variables intended for interpretation. */
    EvidenceVariableIntended,
    /** **EvidenceVariable-observed**

Evidence Variables actually observed. Evidence Variables as observed in the research data. */
    EvidenceVariableObserved,
    /** **EvidenceVariable-outcome**

Evidence Variable in variable role Outcome (MeasuredVariable). Evidence Variable in variable role Outcome (MeasuredVariable). */
    EvidenceVariableOutcome,
    /** **EvidenceVariable-population**

Evidence Variable in variable role Population. Evidence Variable in variable role Population. */
    EvidenceVariablePopulation,
    /** **Harms-outcomes**

Harms outcomes. Outcomes related to adverse effects or potential harms of interventions. */
    HarmsOutcomes,
    /** **Header**

Header. Denotes the header to use for a Text Summary or above a Table. */
    Header,
    /** **Intervention-group-alone-Evidence**

Evidence Results for the intervention exposure only. Evidence Results for the intervention exposure only. */
    InterventionGroupAloneEvidence,
    /** **Intervention-vs-Control-Evidence**

Evidence Results for comparison of Intervention and Control. Evidence Results for comparison of Intervention and Control. */
    InterventionVsControlEvidence,
    /** **Reasons**

Reasons. Reasons. */
    Reasons,
    /** **References**

References. References. */
    References,
    /** **Row-Headers**

Row Headers. Denotes a section specifying row headers for a tabular report. */
    RowHeaders,
    /** **SampleSize**

Sample Size. Sample Size. */
    SampleSize,
    /** **SummaryOfBodyOfEvidenceFindings**

Summary of Body of Evidence Findings. Summary of Body of Evidence Findings. */
    SummaryOfBodyOfEvidenceFindings,
    /** **SummaryOfIndividualStudyFindings**

Summary of Individual Study Findings. Summary of Individual Study Findings. */
    SummaryOfIndividualStudyFindings,
    /** **Table**

Table. */
    Table,
    /** **Tables**

Tables. Tables. */
    Tables,
    /** **Text-Summary**

Text Summary. Denotes a section specifying text summary for a report. */
    TextSummary,
    /** **Warnings**

Warnings. Warnings. */
    Warnings,
}
impl ::core::str::FromStr for ReportSectionType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Assertion" => Ok(Self::Assertion),
            "Certainty-of-Evidence" => Ok(Self::CertaintyOfEvidence),
            "Column-Header" => Ok(Self::ColumnHeader),
            "Column-Headers" => Ok(Self::ColumnHeaders),
            "Control-group-alone-Evidence" => Ok(Self::ControlGroupAloneEvidence),
            "Efficacy-outcomes" => Ok(Self::EfficacyOutcomes),
            "Evidence" => Ok(Self::Evidence),
            "Evidence-Classifier" => Ok(Self::EvidenceClassifier),
            "EvidenceVariable" => Ok(Self::EvidenceVariable),
            "EvidenceVariable-exposure" => Ok(Self::EvidenceVariableExposure),
            "EvidenceVariable-intended" => Ok(Self::EvidenceVariableIntended),
            "EvidenceVariable-observed" => Ok(Self::EvidenceVariableObserved),
            "EvidenceVariable-outcome" => Ok(Self::EvidenceVariableOutcome),
            "EvidenceVariable-population" => Ok(Self::EvidenceVariablePopulation),
            "Harms-outcomes" => Ok(Self::HarmsOutcomes),
            "Header" => Ok(Self::Header),
            "Intervention-group-alone-Evidence" => {
                Ok(Self::InterventionGroupAloneEvidence)
            }
            "Intervention-vs-Control-Evidence" => Ok(Self::InterventionVsControlEvidence),
            "Reasons" => Ok(Self::Reasons),
            "References" => Ok(Self::References),
            "Row-Headers" => Ok(Self::RowHeaders),
            "SampleSize" => Ok(Self::SampleSize),
            "SummaryOfBodyOfEvidenceFindings" => {
                Ok(Self::SummaryOfBodyOfEvidenceFindings)
            }
            "SummaryOfIndividualStudyFindings" => {
                Ok(Self::SummaryOfIndividualStudyFindings)
            }
            "Table" => Ok(Self::Table),
            "Tables" => Ok(Self::Tables),
            "Text-Summary" => Ok(Self::TextSummary),
            "Warnings" => Ok(Self::Warnings),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ReportSectionType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Assertion => "Assertion",
            Self::CertaintyOfEvidence => "Certainty-of-Evidence",
            Self::ColumnHeader => "Column-Header",
            Self::ColumnHeaders => "Column-Headers",
            Self::ControlGroupAloneEvidence => "Control-group-alone-Evidence",
            Self::EfficacyOutcomes => "Efficacy-outcomes",
            Self::Evidence => "Evidence",
            Self::EvidenceClassifier => "Evidence-Classifier",
            Self::EvidenceVariable => "EvidenceVariable",
            Self::EvidenceVariableExposure => "EvidenceVariable-exposure",
            Self::EvidenceVariableIntended => "EvidenceVariable-intended",
            Self::EvidenceVariableObserved => "EvidenceVariable-observed",
            Self::EvidenceVariableOutcome => "EvidenceVariable-outcome",
            Self::EvidenceVariablePopulation => "EvidenceVariable-population",
            Self::HarmsOutcomes => "Harms-outcomes",
            Self::Header => "Header",
            Self::InterventionGroupAloneEvidence => "Intervention-group-alone-Evidence",
            Self::InterventionVsControlEvidence => "Intervention-vs-Control-Evidence",
            Self::Reasons => "Reasons",
            Self::References => "References",
            Self::RowHeaders => "Row-Headers",
            Self::SampleSize => "SampleSize",
            Self::SummaryOfBodyOfEvidenceFindings => "SummaryOfBodyOfEvidenceFindings",
            Self::SummaryOfIndividualStudyFindings => "SummaryOfIndividualStudyFindings",
            Self::Table => "Table",
            Self::Tables => "Tables",
            Self::TextSummary => "Text-Summary",
            Self::Warnings => "Warnings",
        }
    }
}
impl ::std::fmt::Debug for ReportSectionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ReportSectionType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ReportSectionType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ReportSectionType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ReportSectionType> for Coding {
    fn from(code: ReportSectionType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/evidence-report-section".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ReportSectionType> for CodeableConcept {
    fn from(code: ReportSectionType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RequestIntent](http://hl7.org/fhir/ValueSet/request-intent)**. Codes indicating the degree of authority/intentionality associated with a request.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RequestIntent {
    /** **directive**

Directive. The request represents a legally binding instruction authored by a Patient or RelatedPerson. */
    Directive,
    /** **filler-order**

Filler Order. The request represents the view of an authorization instantiated by a fulfilling system representing the details of the fulfiller's intention to act upon a submitted order. */
    FillerOrder,
    /** **instance-order**

Instance Order. An order created in fulfillment of a broader order that represents the authorization for a single activity occurrence.  E.g. The administration of a single dose of a drug. */
    InstanceOrder,
    /** **option**

Option. The request represents a component or option for a RequestOrchestration that establishes timing, conditionality and/or other constraints among a set of requests.  Refer to [[[RequestOrchestration]]] for additional information on how this status is used. */
    Option,
    /** **order**

Order. The request represents a request/demand and authorization for action by the requestor. */
    Order,
    /** **original-order**

Original Order. The request represents an original authorization for action. */
    OriginalOrder,
    /** **plan**

Plan. The request represents an intention to ensure something occurs without providing an authorization for others to act. */
    Plan,
    /** **proposal**

Proposal. The request is a suggestion made by someone/something that does not have an intention to ensure it occurs and without providing an authorization to act. */
    Proposal,
    /** **reflex-order**

Reflex Order. The request represents an automatically generated supplemental authorization for action based on a parent authorization together with initial results of the action taken against that parent authorization. */
    ReflexOrder,
}
impl ::core::str::FromStr for RequestIntent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "directive" => Ok(Self::Directive),
            "filler-order" => Ok(Self::FillerOrder),
            "instance-order" => Ok(Self::InstanceOrder),
            "option" => Ok(Self::Option),
            "order" => Ok(Self::Order),
            "original-order" => Ok(Self::OriginalOrder),
            "plan" => Ok(Self::Plan),
            "proposal" => Ok(Self::Proposal),
            "reflex-order" => Ok(Self::ReflexOrder),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RequestIntent {
    fn as_ref(&self) -> &str {
        match self {
            Self::Directive => "directive",
            Self::FillerOrder => "filler-order",
            Self::InstanceOrder => "instance-order",
            Self::Option => "option",
            Self::Order => "order",
            Self::OriginalOrder => "original-order",
            Self::Plan => "plan",
            Self::Proposal => "proposal",
            Self::ReflexOrder => "reflex-order",
        }
    }
}
impl ::std::fmt::Debug for RequestIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RequestIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RequestIntent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RequestIntent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RequestIntent> for Coding {
    fn from(code: RequestIntent) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/request-intent".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RequestIntent> for CodeableConcept {
    fn from(code: RequestIntent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RequestPriority](http://hl7.org/fhir/ValueSet/request-priority)**. Identifies the level of importance to be assigned to actioning the request.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RequestPriority {
    /** **asap**

ASAP. The request should be actioned as soon as possible - higher priority than urgent. */
    Asap,
    /** **routine**

Routine. The request has normal priority. */
    Routine,
    /** **stat**

STAT. The request should be actioned immediately - highest possible priority.  E.g. an emergency. */
    Stat,
    /** **urgent**

Urgent. The request should be actioned promptly - higher priority than routine. */
    Urgent,
}
impl ::core::str::FromStr for RequestPriority {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "asap" => Ok(Self::Asap),
            "routine" => Ok(Self::Routine),
            "stat" => Ok(Self::Stat),
            "urgent" => Ok(Self::Urgent),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RequestPriority {
    fn as_ref(&self) -> &str {
        match self {
            Self::Asap => "asap",
            Self::Routine => "routine",
            Self::Stat => "stat",
            Self::Urgent => "urgent",
        }
    }
}
impl ::std::fmt::Debug for RequestPriority {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RequestPriority {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RequestPriority {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RequestPriority {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RequestPriority> for Coding {
    fn from(code: RequestPriority) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/request-priority".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RequestPriority> for CodeableConcept {
    fn from(code: RequestPriority) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RequestStatus](http://hl7.org/fhir/ValueSet/request-status)**. Codes identifying the lifecycle stage of a request.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RequestStatus {
    /** **active**

Active. The request is in force and ready to be acted upon. */
    Active,
    /** **completed**

Completed. The activity described by the request has been fully performed.  No further activity will occur. */
    Completed,
    /** **draft**

Draft. The request has been created but is not yet complete or ready for action. */
    Draft,
    /** **entered-in-error**

Entered in Error. This request should never have existed and should be considered 'void'.  (It is possible that real-world decisions were based on it.  If real-world activity has occurred, the status should be "revoked" rather than "entered-in-error".). */
    EnteredInError,
    /** **on-hold**

On Hold. The request (and any implicit authorization to act) has been temporarily withdrawn but is expected to resume in the future. */
    OnHold,
    /** **revoked**

Revoked. The request (and any implicit authorization to act) has been terminated prior to the known full completion of the intended actions.  No further activity should occur. */
    Revoked,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this request.  Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply,  but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for RequestStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "completed" => Ok(Self::Completed),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "on-hold" => Ok(Self::OnHold),
            "revoked" => Ok(Self::Revoked),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RequestStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Completed => "completed",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::OnHold => "on-hold",
            Self::Revoked => "revoked",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for RequestStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RequestStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RequestStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RequestStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RequestStatus> for Coding {
    fn from(code: RequestStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/request-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RequestStatus> for CodeableConcept {
    fn from(code: RequestStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyArmType](http://hl7.org/fhir/ValueSet/research-study-arm-type)**. Codes for the main intent of the study.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyArmType {
    /** **active-comparator**

Active Comparator. */
    ActiveComparator,
    /** **experimental**

Experimental. */
    Experimental,
    /** **no-intervention**

No Intervention. */
    NoIntervention,
    /** **other-arm-type**

Other Arm Type. */
    OtherArmType,
    /** **placebo-comparator**

Placebo Comparator. */
    PlaceboComparator,
    /** **sham-comparator**

Sham Comparator. */
    ShamComparator,
}
impl ::core::str::FromStr for ResearchStudyArmType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active-comparator" => Ok(Self::ActiveComparator),
            "experimental" => Ok(Self::Experimental),
            "no-intervention" => Ok(Self::NoIntervention),
            "other-arm-type" => Ok(Self::OtherArmType),
            "placebo-comparator" => Ok(Self::PlaceboComparator),
            "sham-comparator" => Ok(Self::ShamComparator),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyArmType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ActiveComparator => "active-comparator",
            Self::Experimental => "experimental",
            Self::NoIntervention => "no-intervention",
            Self::OtherArmType => "other-arm-type",
            Self::PlaceboComparator => "placebo-comparator",
            Self::ShamComparator => "sham-comparator",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyArmType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyArmType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyArmType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyArmType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyArmType> for Coding {
    fn from(code: ResearchStudyArmType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-arm-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyArmType> for CodeableConcept {
    fn from(code: ResearchStudyArmType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyClassifiers](http://hl7.org/fhir/ValueSet/research-study-classifiers)**. Codes for use in ResearchStudy Resource. This resource (this entire set of content) is being used for active development of a ResearchStudyClassifiers CodeSystem for use for supporting multiple value sets in the FHIR ResearchStudy StructureDefinition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyClassifiers {
    /** **fda-regulated-device**

FDA regulated device. A medical device regulated by the U.S. Food and Drug Administration. */
    FdaRegulatedDevice,
    /** **fda-regulated-drug**

FDA regulated drug. A medication regulated by the U.S. Food and Drug Administration. */
    FdaRegulatedDrug,
    /** **irb-exempt**

IRB-exempt. Human subjects research that is excempt from oversight and monitoring by an institutional review board (IRB). */
    IrbExempt,
    /** **mpg-paragraph-23b**

MPG Paragraph 23b. Research regulated by a specific German legal requirement (Medizinproduktegesetz MPG Paragraph 23b). */
    MpgParagraph23b,
}
impl ::core::str::FromStr for ResearchStudyClassifiers {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fda-regulated-device" => Ok(Self::FdaRegulatedDevice),
            "fda-regulated-drug" => Ok(Self::FdaRegulatedDrug),
            "irb-exempt" => Ok(Self::IrbExempt),
            "mpg-paragraph-23b" => Ok(Self::MpgParagraph23b),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyClassifiers {
    fn as_ref(&self) -> &str {
        match self {
            Self::FdaRegulatedDevice => "fda-regulated-device",
            Self::FdaRegulatedDrug => "fda-regulated-drug",
            Self::IrbExempt => "irb-exempt",
            Self::MpgParagraph23b => "mpg-paragraph-23b",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyClassifiers {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyClassifiers {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyClassifiers {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyClassifiers {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyClassifiers> for Coding {
    fn from(code: ResearchStudyClassifiers) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-classifiers".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyClassifiers> for CodeableConcept {
    fn from(code: ResearchStudyClassifiers) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyFocusType](http://hl7.org/fhir/ValueSet/research-study-focus-type)**. Codes for the main intent of the study.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyFocusType {
    /** **device**

Device. */
    Device,
    /** **factor**

Factor. */
    Factor,
    /** **intervention**

Intervention. */
    Intervention,
    /** **medication**

Medication. */
    Medication,
}
impl ::core::str::FromStr for ResearchStudyFocusType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "device" => Ok(Self::Device),
            "factor" => Ok(Self::Factor),
            "intervention" => Ok(Self::Intervention),
            "medication" => Ok(Self::Medication),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyFocusType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Device => "device",
            Self::Factor => "factor",
            Self::Intervention => "intervention",
            Self::Medication => "medication",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyFocusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyFocusType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyFocusType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyFocusType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyFocusType> for Coding {
    fn from(code: ResearchStudyFocusType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-focus-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyFocusType> for CodeableConcept {
    fn from(code: ResearchStudyFocusType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyObjectiveType](http://hl7.org/fhir/ValueSet/research-study-objective-type)**. Codes for the kind of study objective.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyObjectiveType {
    /** **exploratory**

Exploratory. Exploratory questions to be answered in the study. */
    Exploratory,
    /** **primary**

Primary. The main question to be answered, and the one that drives any statistical planning for the study—e.g., calculation of the sample size to provide the appropriate power for statistical testing. */
    Primary,
    /** **secondary**

Secondary. Question to be answered in the study that is of lesser importance than the primary objective. */
    Secondary,
}
impl ::core::str::FromStr for ResearchStudyObjectiveType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "exploratory" => Ok(Self::Exploratory),
            "primary" => Ok(Self::Primary),
            "secondary" => Ok(Self::Secondary),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyObjectiveType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Exploratory => "exploratory",
            Self::Primary => "primary",
            Self::Secondary => "secondary",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyObjectiveType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyObjectiveType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyObjectiveType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyObjectiveType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyObjectiveType> for Coding {
    fn from(code: ResearchStudyObjectiveType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-objective-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyObjectiveType> for CodeableConcept {
    fn from(code: ResearchStudyObjectiveType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyPartyOrganizationType](http://hl7.org/fhir/ValueSet/research-study-party-organization-type)**. This is a ResearchStudy's party organization type.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyPartyOrganizationType {
    /** **academic**

Academic. */
    Academic,
    /** **fda**

FDA. */
    Fda,
    /** **government**

Government. */
    Government,
    /** **industry**

Industry. */
    Industry,
    /** **nih**

NIH. */
    Nih,
    /** **nonprofit**

Nonprofit. */
    Nonprofit,
}
impl ::core::str::FromStr for ResearchStudyPartyOrganizationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "academic" => Ok(Self::Academic),
            "fda" => Ok(Self::Fda),
            "government" => Ok(Self::Government),
            "industry" => Ok(Self::Industry),
            "nih" => Ok(Self::Nih),
            "nonprofit" => Ok(Self::Nonprofit),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyPartyOrganizationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Academic => "academic",
            Self::Fda => "fda",
            Self::Government => "government",
            Self::Industry => "industry",
            Self::Nih => "nih",
            Self::Nonprofit => "nonprofit",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyPartyOrganizationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyPartyOrganizationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyPartyOrganizationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyPartyOrganizationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyPartyOrganizationType> for Coding {
    fn from(code: ResearchStudyPartyOrganizationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-party-organization-type"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyPartyOrganizationType> for CodeableConcept {
    fn from(code: ResearchStudyPartyOrganizationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyPartyRole](http://hl7.org/fhir/ValueSet/research-study-party-role)**. This is a ResearchStudy's party role.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyPartyRole {
    /** **collaborator**

collaborator. collaborator */
    Collaborator,
    /** **funding-source**

funding-source. funding-source */
    FundingSource,
    /** **general-contact**

general-contact. general-contact */
    GeneralContact,
    /** **irb**

Institutional Review Board. */
    Irb,
    /** **lead-sponsor**

lead-sponsor. lead-sponsor */
    LeadSponsor,
    /** **primary-investigator**

primary-investigator. primary-investigator */
    PrimaryInvestigator,
    /** **recruitment-contact**

recruitment-contact. recruitment-contact */
    RecruitmentContact,
    /** **sponsor**

sponsor. sponsor */
    Sponsor,
    /** **sponsor-investigator**

sponsor-investigator. sponsor-investigator */
    SponsorInvestigator,
    /** **study-chair**

study-chair. study-chair */
    StudyChair,
    /** **study-director**

study-director. study-director */
    StudyDirector,
    /** **sub-investigator**

sub-investigator. sub-investigator */
    SubInvestigator,
}
impl ::core::str::FromStr for ResearchStudyPartyRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "collaborator" => Ok(Self::Collaborator),
            "funding-source" => Ok(Self::FundingSource),
            "general-contact" => Ok(Self::GeneralContact),
            "irb" => Ok(Self::Irb),
            "lead-sponsor" => Ok(Self::LeadSponsor),
            "primary-investigator" => Ok(Self::PrimaryInvestigator),
            "recruitment-contact" => Ok(Self::RecruitmentContact),
            "sponsor" => Ok(Self::Sponsor),
            "sponsor-investigator" => Ok(Self::SponsorInvestigator),
            "study-chair" => Ok(Self::StudyChair),
            "study-director" => Ok(Self::StudyDirector),
            "sub-investigator" => Ok(Self::SubInvestigator),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyPartyRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::Collaborator => "collaborator",
            Self::FundingSource => "funding-source",
            Self::GeneralContact => "general-contact",
            Self::Irb => "irb",
            Self::LeadSponsor => "lead-sponsor",
            Self::PrimaryInvestigator => "primary-investigator",
            Self::RecruitmentContact => "recruitment-contact",
            Self::Sponsor => "sponsor",
            Self::SponsorInvestigator => "sponsor-investigator",
            Self::StudyChair => "study-chair",
            Self::StudyDirector => "study-director",
            Self::SubInvestigator => "sub-investigator",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyPartyRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyPartyRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyPartyRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyPartyRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyPartyRole> for Coding {
    fn from(code: ResearchStudyPartyRole) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-party-role".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyPartyRole> for CodeableConcept {
    fn from(code: ResearchStudyPartyRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyPhase](http://hl7.org/fhir/ValueSet/research-study-phase)**. Codes for the stage in the progression of a therapy from initial experimental use in humans in clinical trials to post-market evaluation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyPhase {
    /** **early-phase-1**

Early Phase 1. Designation for optional exploratory trials conducted in accordance with the United States Food and Drug Administration's (FDA) 2006 Guidance on Exploratory Investigational New Drug (IND) Studies. Formerly called Phase 0. */
    EarlyPhase1,
    /** **n-a**

N/A. Trials without phases (for example, studies of devices or behavioral interventions). */
    NA,
    /** **phase-1**

Phase 1. Includes initial studies to determine the metabolism and pharmacologic actions of drugs in humans, the side effects associated with increasing doses, and to gain early evidence of effectiveness; may include healthy participants and/or patients. */
    Phase1,
    /** **phase-1-phase-2**

Phase 1/Phase 2. Trials that are a combination of phases 1 and 2. */
    Phase1Phase2,
    /** **phase-2**

Phase 2. Includes controlled clinical studies conducted to evaluate the effectiveness of the drug for a particular indication or indications in participants with the disease or condition under study and to determine the common short-term side effects and risks. */
    Phase2,
    /** **phase-2-phase-3**

Phase 2/Phase 3. Trials that are a combination of phases 2 and 3. */
    Phase2Phase3,
    /** **phase-3**

Phase 3. Includes trials conducted after preliminary evidence suggesting effectiveness of the drug has been obtained, and are intended to gather additional information to evaluate the overall benefit-risk relationship of the drug. */
    Phase3,
    /** **phase-4**

Phase 4. Studies of FDA-approved drugs to delineate additional information including the drug's risks, benefits, and optimal use. */
    Phase4,
}
impl ::core::str::FromStr for ResearchStudyPhase {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "early-phase-1" => Ok(Self::EarlyPhase1),
            "n-a" => Ok(Self::NA),
            "phase-1" => Ok(Self::Phase1),
            "phase-1-phase-2" => Ok(Self::Phase1Phase2),
            "phase-2" => Ok(Self::Phase2),
            "phase-2-phase-3" => Ok(Self::Phase2Phase3),
            "phase-3" => Ok(Self::Phase3),
            "phase-4" => Ok(Self::Phase4),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyPhase {
    fn as_ref(&self) -> &str {
        match self {
            Self::EarlyPhase1 => "early-phase-1",
            Self::NA => "n-a",
            Self::Phase1 => "phase-1",
            Self::Phase1Phase2 => "phase-1-phase-2",
            Self::Phase2 => "phase-2",
            Self::Phase2Phase3 => "phase-2-phase-3",
            Self::Phase3 => "phase-3",
            Self::Phase4 => "phase-4",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyPhase {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyPhase {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyPhase {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyPhase {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyPhase> for Coding {
    fn from(code: ResearchStudyPhase) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/research-study-phase".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyPhase> for CodeableConcept {
    fn from(code: ResearchStudyPhase) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyPrimaryPurposeType](http://hl7.org/fhir/ValueSet/research-study-prim-purp-type)**. Codes for the main intent of a research study.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyPrimaryPurposeType {
    /** **basic-science**

Basic Science. One or more interventions for examining the basic mechanism of action (for example, physiology or biomechanics of an intervention). */
    BasicScience,
    /** **device-feasibility**

Device Feasibility. An intervention of a device product is being evaluated to determine the feasibility of the product or to test a prototype device and not health outcomes. Such studies are conducted to confirm the design and operating specifications of a device before beginning a full clinical trial. */
    DeviceFeasibility,
    /** **diagnostic**

Diagnostic. One or more interventions are being evaluated for identifying a disease or health condition. */
    Diagnostic,
    /** **health-services-research**

Health Services Research. One or more interventions for evaluating the delivery, processes, management, organization, or financing of healthcare. */
    HealthServicesResearch,
    /** **prevention**

Prevention. One or more interventions are being assessed for preventing the development of a specific disease or health condition. */
    Prevention,
    /** **screening**

Screening. One or more interventions are assessed or examined for identifying a condition, or risk factors for a condition, in people who are not yet known to have the condition or risk factor. */
    Screening,
    /** **supportive-care**

Supportive Care. One or more interventions are evaluated for maximizing comfort, minimizing side effects, or mitigating against a decline in the participant's health or function. */
    SupportiveCare,
    /** **treatment**

Treatment. One or more interventions are being evaluated for treating a disease, syndrome, or condition. */
    Treatment,
}
impl ::core::str::FromStr for ResearchStudyPrimaryPurposeType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "basic-science" => Ok(Self::BasicScience),
            "device-feasibility" => Ok(Self::DeviceFeasibility),
            "diagnostic" => Ok(Self::Diagnostic),
            "health-services-research" => Ok(Self::HealthServicesResearch),
            "prevention" => Ok(Self::Prevention),
            "screening" => Ok(Self::Screening),
            "supportive-care" => Ok(Self::SupportiveCare),
            "treatment" => Ok(Self::Treatment),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyPrimaryPurposeType {
    fn as_ref(&self) -> &str {
        match self {
            Self::BasicScience => "basic-science",
            Self::DeviceFeasibility => "device-feasibility",
            Self::Diagnostic => "diagnostic",
            Self::HealthServicesResearch => "health-services-research",
            Self::Prevention => "prevention",
            Self::Screening => "screening",
            Self::SupportiveCare => "supportive-care",
            Self::Treatment => "treatment",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyPrimaryPurposeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyPrimaryPurposeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyPrimaryPurposeType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyPrimaryPurposeType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyPrimaryPurposeType> for Coding {
    fn from(code: ResearchStudyPrimaryPurposeType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-prim-purp-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyPrimaryPurposeType> for CodeableConcept {
    fn from(code: ResearchStudyPrimaryPurposeType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyReasonStopped](http://hl7.org/fhir/ValueSet/research-study-reason-stopped)**. Codes for why the study ended prematurely.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyReasonStopped {
    /** **accrual-goal-met**

Accrual Goal Met. The study prematurely ended because the accrual goal was met. */
    AccrualGoalMet,
    /** **closed-due-to-lack-of-study-progress**

Closed due to lack of study progress. The study prematurely ended due to lack of study progress. */
    ClosedDueToLackOfStudyProgress,
    /** **closed-due-to-toxicity**

Closed due to toxicity. The study prematurely ended due to toxicity. */
    ClosedDueToToxicity,
    /** **temporarily-closed-per-study-design**

Temporarily closed per study design. The study prematurely ended temporarily per study design. */
    TemporarilyClosedPerStudyDesign,
}
impl ::core::str::FromStr for ResearchStudyReasonStopped {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accrual-goal-met" => Ok(Self::AccrualGoalMet),
            "closed-due-to-lack-of-study-progress" => {
                Ok(Self::ClosedDueToLackOfStudyProgress)
            }
            "closed-due-to-toxicity" => Ok(Self::ClosedDueToToxicity),
            "temporarily-closed-per-study-design" => {
                Ok(Self::TemporarilyClosedPerStudyDesign)
            }
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyReasonStopped {
    fn as_ref(&self) -> &str {
        match self {
            Self::AccrualGoalMet => "accrual-goal-met",
            Self::ClosedDueToLackOfStudyProgress => {
                "closed-due-to-lack-of-study-progress"
            }
            Self::ClosedDueToToxicity => "closed-due-to-toxicity",
            Self::TemporarilyClosedPerStudyDesign => {
                "temporarily-closed-per-study-design"
            }
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyReasonStopped {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyReasonStopped {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyReasonStopped {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyReasonStopped {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyReasonStopped> for Coding {
    fn from(code: ResearchStudyReasonStopped) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-reason-stopped".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyReasonStopped> for CodeableConcept {
    fn from(code: ResearchStudyReasonStopped) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResearchStudyStatus](http://hl7.org/fhir/ValueSet/research-study-status)**. Codes that convey the current status of the research study.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResearchStudyStatus {
    /** **active**

Active. Study is opened for accrual. */
    Active,
    /** **active-but-not-recruiting**

Active, not recruiting. The study is ongoing, and participants are receiving an intervention or being examined, but potential participants are not currently being recruited or enrolled. */
    ActiveButNotRecruiting,
    /** **administratively-completed**

Administratively Completed. Study is completed prematurely and will not resume; patients are no longer examined nor treated. */
    AdministrativelyCompleted,
    /** **approved**

Approved. Protocol is approved by the review board. */
    Approved,
    /** **closed-to-accrual**

Closed to Accrual. Study is closed for accrual; patients can be examined and treated. */
    ClosedToAccrual,
    /** **closed-to-accrual-and-intervention**

Closed to Accrual and Intervention. Study is closed to accrual and intervention, i.e. the study is closed to enrollment, all study subjects have completed treatment or intervention but are still being followed according to the primary objective of the study. */
    ClosedToAccrualAndIntervention,
    /** **completed**

Completed. The study closed according to the study plan. There will be no further treatments, interventions or data collection. */
    Completed,
    /** **disapproved**

Disapproved. Protocol was disapproved by the review board. */
    Disapproved,
    /** **enrolling-by-invitation**

Enrolling by invitation. The study is selecting its participants from a population, or group of people, decided on by the researchers in advance. These studies are not open to everyone who meets the eligibility criteria but only to people in that particular population, who are specifically invited to participate. */
    EnrollingByInvitation,
    /** **in-review**

In Review. Protocol is submitted to the review board for approval. */
    InReview,
    /** **not-yet-recruiting**

Not yet recruiting. The study has not started recruiting participants. */
    NotYetRecruiting,
    /** **overall-study**

Overall study. Used for documenting the start and end of the overall study, distinct from progress states. */
    OverallStudy,
    /** **recruiting**

Recruiting. The study is currently recruiting participants. */
    Recruiting,
    /** **temporarily-closed-to-accrual**

Temporarily Closed to Accrual. Study is temporarily closed for accrual; can be potentially resumed in the future; patients can be examined and treated. */
    TemporarilyClosedToAccrual,
    /** **temporarily-closed-to-accrual-and-intervention**

Temporarily Closed to Accrual and Intervention. Study is temporarily closed for accrual and intervention and potentially can be resumed in the future. */
    TemporarilyClosedToAccrualAndIntervention,
    /** **terminated**

Terminated. The study has stopped early and will not start again. Participants are no longer being examined or treated. */
    Terminated,
    /** **withdrawn**

Withdrawn. Protocol was withdrawn by the lead organization. */
    Withdrawn,
}
impl ::core::str::FromStr for ResearchStudyStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "active-but-not-recruiting" => Ok(Self::ActiveButNotRecruiting),
            "administratively-completed" => Ok(Self::AdministrativelyCompleted),
            "approved" => Ok(Self::Approved),
            "closed-to-accrual" => Ok(Self::ClosedToAccrual),
            "closed-to-accrual-and-intervention" => {
                Ok(Self::ClosedToAccrualAndIntervention)
            }
            "completed" => Ok(Self::Completed),
            "disapproved" => Ok(Self::Disapproved),
            "enrolling-by-invitation" => Ok(Self::EnrollingByInvitation),
            "in-review" => Ok(Self::InReview),
            "not-yet-recruiting" => Ok(Self::NotYetRecruiting),
            "overall-study" => Ok(Self::OverallStudy),
            "recruiting" => Ok(Self::Recruiting),
            "temporarily-closed-to-accrual" => Ok(Self::TemporarilyClosedToAccrual),
            "temporarily-closed-to-accrual-and-intervention" => {
                Ok(Self::TemporarilyClosedToAccrualAndIntervention)
            }
            "terminated" => Ok(Self::Terminated),
            "withdrawn" => Ok(Self::Withdrawn),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResearchStudyStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::ActiveButNotRecruiting => "active-but-not-recruiting",
            Self::AdministrativelyCompleted => "administratively-completed",
            Self::Approved => "approved",
            Self::ClosedToAccrual => "closed-to-accrual",
            Self::ClosedToAccrualAndIntervention => "closed-to-accrual-and-intervention",
            Self::Completed => "completed",
            Self::Disapproved => "disapproved",
            Self::EnrollingByInvitation => "enrolling-by-invitation",
            Self::InReview => "in-review",
            Self::NotYetRecruiting => "not-yet-recruiting",
            Self::OverallStudy => "overall-study",
            Self::Recruiting => "recruiting",
            Self::TemporarilyClosedToAccrual => "temporarily-closed-to-accrual",
            Self::TemporarilyClosedToAccrualAndIntervention => {
                "temporarily-closed-to-accrual-and-intervention"
            }
            Self::Terminated => "terminated",
            Self::Withdrawn => "withdrawn",
        }
    }
}
impl ::std::fmt::Debug for ResearchStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResearchStudyStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResearchStudyStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResearchStudyStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResearchStudyStatus> for Coding {
    fn from(code: ResearchStudyStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/research-study-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResearchStudyStatus> for CodeableConcept {
    fn from(code: ResearchStudyStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResourceValidationMode](http://hl7.org/fhir/resource-validation-mode)**. ResourceValidationMode\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum ResourceValidationMode {
    /** **create**

Validate for Create. The server checks the content, and then checks that the content would be acceptable as a create (e.g. that the content would not violate any uniqueness constraints). */
    Create,
    /** **delete**

Validate for Delete. The server ignores the content and checks that the nominated resource is allowed to be deleted (e.g. checking referential integrity rules). */
    Delete,
    /** **profile**

Validate Against a Profile. The server checks an existing resource (must be nominated by id, not provided as a parameter) as valid against the nominated profile. */
    Profile,
    /** **update**

Validate for Update. The server checks the content, and then checks that it would accept it as an update against the nominated specific resource (e.g. that there are no changes to immutable fields the server does not allow to change and checking version integrity if appropriate). */
    Update,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for ResourceValidationMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "create" => Ok(Self::Create),
            "delete" => Ok(Self::Delete),
            "profile" => Ok(Self::Profile),
            "update" => Ok(Self::Update),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for ResourceValidationMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Create => "create",
            Self::Delete => "delete",
            Self::Profile => "profile",
            Self::Update => "update",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for ResourceValidationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResourceValidationMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResourceValidationMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResourceValidationMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResourceValidationMode> for Coding {
    fn from(code: ResourceValidationMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/resource-validation-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResourceValidationMode> for CodeableConcept {
    fn from(code: ResourceValidationMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResourceVersionPolicy](http://hl7.org/fhir/ValueSet/versioning-policy)**. How the system supports versioning for a resource.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResourceVersionPolicy {
    /** **no-version**

No VersionId Support. VersionId meta-property is not supported (server) or used (client). */
    NoVersion,
    /** **versioned**

Versioned. VersionId meta-property is supported (server) or used (client). */
    Versioned,
    /** **versioned-update**

VersionId tracked fully. Supports version-aware updates (server) or will be specified (If-match header) for updates (client). */
    VersionedUpdate,
}
impl ::core::str::FromStr for ResourceVersionPolicy {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "no-version" => Ok(Self::NoVersion),
            "versioned" => Ok(Self::Versioned),
            "versioned-update" => Ok(Self::VersionedUpdate),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResourceVersionPolicy {
    fn as_ref(&self) -> &str {
        match self {
            Self::NoVersion => "no-version",
            Self::Versioned => "versioned",
            Self::VersionedUpdate => "versioned-update",
        }
    }
}
impl ::std::fmt::Debug for ResourceVersionPolicy {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResourceVersionPolicy {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResourceVersionPolicy {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResourceVersionPolicy {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResourceVersionPolicy> for Coding {
    fn from(code: ResourceVersionPolicy) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/versioning-policy".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResourceVersionPolicy> for CodeableConcept {
    fn from(code: ResourceVersionPolicy) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ResponseType](http://hl7.org/fhir/ValueSet/response-code)**. The kind of response to a message.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ResponseType {
    /** **fatal-error**

Fatal Error. The message was rejected because of a problem with the content. There is no point in re-sending without change. The response narrative SHALL describe the issue. */
    FatalError,
    /** **ok**

OK. The message was accepted and processed without error. */
    Ok,
    /** **transient-error**

Transient Error. Some internal unexpected error occurred - wait and try again. Note - this is usually used for things like database unavailable, which may be expected to resolve, though human intervention may be required. */
    TransientError,
}
impl ::core::str::FromStr for ResponseType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fatal-error" => Ok(Self::FatalError),
            "ok" => Ok(Self::Ok),
            "transient-error" => Ok(Self::TransientError),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ResponseType {
    fn as_ref(&self) -> &str {
        match self {
            Self::FatalError => "fatal-error",
            Self::Ok => "ok",
            Self::TransientError => "transient-error",
        }
    }
}
impl ::std::fmt::Debug for ResponseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ResponseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ResponseType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ResponseType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ResponseType> for Coding {
    fn from(code: ResponseType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/response-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ResponseType> for CodeableConcept {
    fn from(code: ResponseType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RestfulCapabilityMode](http://hl7.org/fhir/ValueSet/restful-capability-mode)**. The mode of a RESTful capability statement.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RestfulCapabilityMode {
    /** **client**

Client. The application acts as a client for this resource. */
    Client,
    /** **server**

Server. The application acts as a server for this resource. */
    Server,
}
impl ::core::str::FromStr for RestfulCapabilityMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "client" => Ok(Self::Client),
            "server" => Ok(Self::Server),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RestfulCapabilityMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Client => "client",
            Self::Server => "server",
        }
    }
}
impl ::std::fmt::Debug for RestfulCapabilityMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RestfulCapabilityMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RestfulCapabilityMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RestfulCapabilityMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RestfulCapabilityMode> for Coding {
    fn from(code: RestfulCapabilityMode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/restful-capability-mode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RestfulCapabilityMode> for CodeableConcept {
    fn from(code: RestfulCapabilityMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[RestfulSecurityService](http://hl7.org/fhir/ValueSet/restful-security-service)**. Types of security services used with FHIR.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum RestfulSecurityService {
    /** **Basic**

Basic. Basic authentication defined in HTTP specification. */
    Basic,
    /** **Certificates**

Certificates. SSL where client must have a certificate registered with the server. */
    Certificates,
    /** **Kerberos**

Kerberos. see http://www.ietf.org/rfc/rfc4120.txt. */
    Kerberos,
    /** **NTLM**

NTLM. Microsoft NTLM Authentication. */
    Ntlm,
    /** **OAuth**

OAuth. OAuth (unspecified version see oauth.net). */
    OAuth,
    /** **SMART-on-FHIR**

SMART-on-FHIR. OAuth2 using SMART-on-FHIR profile (see http://docs.smarthealthit.org/). */
    SmartOnFhir,
}
impl ::core::str::FromStr for RestfulSecurityService {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Basic" => Ok(Self::Basic),
            "Certificates" => Ok(Self::Certificates),
            "Kerberos" => Ok(Self::Kerberos),
            "NTLM" => Ok(Self::Ntlm),
            "OAuth" => Ok(Self::OAuth),
            "SMART-on-FHIR" => Ok(Self::SmartOnFhir),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for RestfulSecurityService {
    fn as_ref(&self) -> &str {
        match self {
            Self::Basic => "Basic",
            Self::Certificates => "Certificates",
            Self::Kerberos => "Kerberos",
            Self::Ntlm => "NTLM",
            Self::OAuth => "OAuth",
            Self::SmartOnFhir => "SMART-on-FHIR",
        }
    }
}
impl ::std::fmt::Debug for RestfulSecurityService {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for RestfulSecurityService {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for RestfulSecurityService {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for RestfulSecurityService {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<RestfulSecurityService> for Coding {
    fn from(code: RestfulSecurityService) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/restful-security-service".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<RestfulSecurityService> for CodeableConcept {
    fn from(code: RestfulSecurityService) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SPDXLicense](http://hl7.org/fhir/ValueSet/spdx-license)**. The license that applies to an Implementation Guide (using an SPDX license Identifiers, or 'not-open-source'). The binding is required but new SPDX license Identifiers are allowed to be used (https://spdx.org/licenses/).\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SPDXLicense {
    /** **0BSD**

BSD Zero Clause License. BSD Zero Clause License. */
    N0bsd,
    /** **AAL**

Attribution Assurance License. Attribution Assurance License. */
    Aal,
    /** **ADSL**

Amazon Digital Services License. Amazon Digital Services License. */
    Adsl,
    /** **AFL-1.1**

Academic Free License v1.1. Academic Free License v1.1. */
    Afl11,
    /** **AFL-1.2**

Academic Free License v1.2. Academic Free License v1.2. */
    Afl12,
    /** **AFL-2.0**

Academic Free License v2.0. Academic Free License v2.0. */
    Afl20,
    /** **AFL-2.1**

Academic Free License v2.1. Academic Free License v2.1. */
    Afl21,
    /** **AFL-3.0**

Academic Free License v3.0. Academic Free License v3.0. */
    Afl30,
    /** **AGPL-1.0-only**

Affero General Public License v1.0 only. Affero General Public License v1.0 only. */
    Agpl10Only,
    /** **AGPL-1.0-or-later**

Affero General Public License v1.0 or later. Affero General Public License v1.0 or later. */
    Agpl10OrLater,
    /** **AGPL-3.0-only**

GNU Affero General Public License v3.0 only. GNU Affero General Public License v3.0 only. */
    Agpl30Only,
    /** **AGPL-3.0-or-later**

GNU Affero General Public License v3.0 or later. GNU Affero General Public License v3.0 or later. */
    Agpl30OrLater,
    /** **AMDPLPA**

AMD's plpa_map.c License. AMD's plpa_map.c License. */
    Amdplpa,
    /** **AML**

Apple MIT License. Apple MIT License. */
    Aml,
    /** **AMPAS**

Academy of Motion Picture Arts and Sciences BSD. Academy of Motion Picture Arts and Sciences BSD. */
    Ampas,
    /** **ANTLR-PD**

ANTLR Software Rights Notice. ANTLR Software Rights Notice. */
    AntlrPd,
    /** **APAFML**

Adobe Postscript AFM License. Adobe Postscript AFM License. */
    Apafml,
    /** **APL-1.0**

Adaptive Public License 1.0. Adaptive Public License 1.0. */
    Apl10,
    /** **APSL-1.0**

Apple Public Source License 1.0. Apple Public Source License 1.0. */
    Apsl10,
    /** **APSL-1.1**

Apple Public Source License 1.1. Apple Public Source License 1.1. */
    Apsl11,
    /** **APSL-1.2**

Apple Public Source License 1.2. Apple Public Source License 1.2. */
    Apsl12,
    /** **APSL-2.0**

Apple Public Source License 2.0. Apple Public Source License 2.0. */
    Apsl20,
    /** **Abstyles**

Abstyles License. Abstyles License. */
    Abstyles,
    /** **Adobe-2006**

Adobe Systems Incorporated Source Code License Agreement. Adobe Systems Incorporated Source Code License Agreement. */
    Adobe2006,
    /** **Adobe-Glyph**

Adobe Glyph List License. Adobe Glyph List License. */
    AdobeGlyph,
    /** **Afmparse**

Afmparse License. Afmparse License. */
    Afmparse,
    /** **Aladdin**

Aladdin Free Public License. Aladdin Free Public License. */
    Aladdin,
    /** **Apache-1.0**

Apache License 1.0. Apache License 1.0. */
    Apache10,
    /** **Apache-1.1**

Apache License 1.1. Apache License 1.1. */
    Apache11,
    /** **Apache-2.0**

Apache License 2.0. Apache License 2.0. */
    Apache20,
    /** **Artistic-1.0**

Artistic License 1.0. Artistic License 1.0. */
    Artistic10,
    /** **Artistic-1.0-Perl**

Artistic License 1.0 (Perl). Artistic License 1.0 (Perl). */
    Artistic10Perl,
    /** **Artistic-1.0-cl8**

Artistic License 1.0 w/clause 8. Artistic License 1.0 w/clause 8. */
    Artistic10Cl8,
    /** **Artistic-2.0**

Artistic License 2.0. Artistic License 2.0. */
    Artistic20,
    /** **BSD-1-Clause**

BSD 1-Clause License. BSD 1-Clause License. */
    Bsd1Clause,
    /** **BSD-2-Clause**

BSD 2-Clause "Simplified" License. BSD 2-Clause "Simplified" License. */
    Bsd2Clause,
    /** **BSD-2-Clause-FreeBSD**

BSD 2-Clause FreeBSD License. BSD 2-Clause FreeBSD License. */
    Bsd2ClauseFreeBsd,
    /** **BSD-2-Clause-NetBSD**

BSD 2-Clause NetBSD License. BSD 2-Clause NetBSD License. */
    Bsd2ClauseNetBsd,
    /** **BSD-2-Clause-Patent**

BSD-2-Clause Plus Patent License. BSD-2-Clause Plus Patent License. */
    Bsd2ClausePatent,
    /** **BSD-3-Clause**

BSD 3-Clause "New" or "Revised" License. BSD 3-Clause "New" or "Revised" License. */
    Bsd3Clause,
    /** **BSD-3-Clause-Attribution**

BSD with attribution. BSD with attribution. */
    Bsd3ClauseAttribution,
    /** **BSD-3-Clause-Clear**

BSD 3-Clause Clear License. BSD 3-Clause Clear License. */
    Bsd3ClauseClear,
    /** **BSD-3-Clause-LBNL**

Lawrence Berkeley National Labs BSD variant license. Lawrence Berkeley National Labs BSD variant license. */
    Bsd3ClauseLbnl,
    /** **BSD-3-Clause-No-Nuclear-License**

BSD 3-Clause No Nuclear License. BSD 3-Clause No Nuclear License. */
    Bsd3ClauseNoNuclearLicense,
    /** **BSD-3-Clause-No-Nuclear-License-2014**

BSD 3-Clause No Nuclear License 2014. BSD 3-Clause No Nuclear License 2014. */
    Bsd3ClauseNoNuclearLicense2014,
    /** **BSD-3-Clause-No-Nuclear-Warranty**

BSD 3-Clause No Nuclear Warranty. BSD 3-Clause No Nuclear Warranty. */
    Bsd3ClauseNoNuclearWarranty,
    /** **BSD-4-Clause**

BSD 4-Clause "Original" or "Old" License. BSD 4-Clause "Original" or "Old" License. */
    Bsd4Clause,
    /** **BSD-4-Clause-UC**

BSD-4-Clause (University of California-Specific). BSD-4-Clause (University of California-Specific). */
    Bsd4ClauseUc,
    /** **BSD-Protection**

BSD Protection License. BSD Protection License. */
    BsdProtection,
    /** **BSD-Source-Code**

BSD Source Code Attribution. BSD Source Code Attribution. */
    BsdSourceCode,
    /** **BSL-1.0**

Boost Software License 1.0. Boost Software License 1.0. */
    Bsl10,
    /** **Bahyph**

Bahyph License. Bahyph License. */
    Bahyph,
    /** **Barr**

Barr License. Barr License. */
    Barr,
    /** **Beerware**

Beerware License. Beerware License. */
    Beerware,
    /** **BitTorrent-1.0**

BitTorrent Open Source License v1.0. BitTorrent Open Source License v1.0. */
    BitTorrent10,
    /** **BitTorrent-1.1**

BitTorrent Open Source License v1.1. BitTorrent Open Source License v1.1. */
    BitTorrent11,
    /** **Borceux**

Borceux license. Borceux license. */
    Borceux,
    /** **CATOSL-1.1**

Computer Associates Trusted Open Source License 1.1. Computer Associates Trusted Open Source License 1.1. */
    Catosl11,
    /** **CC-BY-1.0**

Creative Commons Attribution 1.0 Generic. Creative Commons Attribution 1.0 Generic. */
    CcBy10,
    /** **CC-BY-2.0**

Creative Commons Attribution 2.0 Generic. Creative Commons Attribution 2.0 Generic. */
    CcBy20,
    /** **CC-BY-2.5**

Creative Commons Attribution 2.5 Generic. Creative Commons Attribution 2.5 Generic. */
    CcBy25,
    /** **CC-BY-3.0**

Creative Commons Attribution 3.0 Unported. Creative Commons Attribution 3.0 Unported. */
    CcBy30,
    /** **CC-BY-4.0**

Creative Commons Attribution 4.0 International. Creative Commons Attribution 4.0 International. */
    CcBy40,
    /** **CC-BY-NC-1.0**

Creative Commons Attribution Non Commercial 1.0 Generic. Creative Commons Attribution Non Commercial 1.0 Generic. */
    CcByNc10,
    /** **CC-BY-NC-2.0**

Creative Commons Attribution Non Commercial 2.0 Generic. Creative Commons Attribution Non Commercial 2.0 Generic. */
    CcByNc20,
    /** **CC-BY-NC-2.5**

Creative Commons Attribution Non Commercial 2.5 Generic. Creative Commons Attribution Non Commercial 2.5 Generic. */
    CcByNc25,
    /** **CC-BY-NC-3.0**

Creative Commons Attribution Non Commercial 3.0 Unported. Creative Commons Attribution Non Commercial 3.0 Unported. */
    CcByNc30,
    /** **CC-BY-NC-4.0**

Creative Commons Attribution Non Commercial 4.0 International. Creative Commons Attribution Non Commercial 4.0 International. */
    CcByNc40,
    /** **CC-BY-NC-ND-1.0**

Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic. Creative Commons Attribution Non Commercial No Derivatives 1.0 Generic. */
    CcByNcNd10,
    /** **CC-BY-NC-ND-2.0**

Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic. Creative Commons Attribution Non Commercial No Derivatives 2.0 Generic. */
    CcByNcNd20,
    /** **CC-BY-NC-ND-2.5**

Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic. Creative Commons Attribution Non Commercial No Derivatives 2.5 Generic. */
    CcByNcNd25,
    /** **CC-BY-NC-ND-3.0**

Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported. Creative Commons Attribution Non Commercial No Derivatives 3.0 Unported. */
    CcByNcNd30,
    /** **CC-BY-NC-ND-4.0**

Creative Commons Attribution Non Commercial No Derivatives 4.0 International. Creative Commons Attribution Non Commercial No Derivatives 4.0 International. */
    CcByNcNd40,
    /** **CC-BY-NC-SA-1.0**

Creative Commons Attribution Non Commercial Share Alike 1.0 Generic. Creative Commons Attribution Non Commercial Share Alike 1.0 Generic. */
    CcByNcSa10,
    /** **CC-BY-NC-SA-2.0**

Creative Commons Attribution Non Commercial Share Alike 2.0 Generic. Creative Commons Attribution Non Commercial Share Alike 2.0 Generic. */
    CcByNcSa20,
    /** **CC-BY-NC-SA-2.5**

Creative Commons Attribution Non Commercial Share Alike 2.5 Generic. Creative Commons Attribution Non Commercial Share Alike 2.5 Generic. */
    CcByNcSa25,
    /** **CC-BY-NC-SA-3.0**

Creative Commons Attribution Non Commercial Share Alike 3.0 Unported. Creative Commons Attribution Non Commercial Share Alike 3.0 Unported. */
    CcByNcSa30,
    /** **CC-BY-NC-SA-4.0**

Creative Commons Attribution Non Commercial Share Alike 4.0 International. Creative Commons Attribution Non Commercial Share Alike 4.0 International. */
    CcByNcSa40,
    /** **CC-BY-ND-1.0**

Creative Commons Attribution No Derivatives 1.0 Generic. Creative Commons Attribution No Derivatives 1.0 Generic. */
    CcByNd10,
    /** **CC-BY-ND-2.0**

Creative Commons Attribution No Derivatives 2.0 Generic. Creative Commons Attribution No Derivatives 2.0 Generic. */
    CcByNd20,
    /** **CC-BY-ND-2.5**

Creative Commons Attribution No Derivatives 2.5 Generic. Creative Commons Attribution No Derivatives 2.5 Generic. */
    CcByNd25,
    /** **CC-BY-ND-3.0**

Creative Commons Attribution No Derivatives 3.0 Unported. Creative Commons Attribution No Derivatives 3.0 Unported. */
    CcByNd30,
    /** **CC-BY-ND-4.0**

Creative Commons Attribution No Derivatives 4.0 International. Creative Commons Attribution No Derivatives 4.0 International. */
    CcByNd40,
    /** **CC-BY-SA-1.0**

Creative Commons Attribution Share Alike 1.0 Generic. Creative Commons Attribution Share Alike 1.0 Generic. */
    CcBySa10,
    /** **CC-BY-SA-2.0**

Creative Commons Attribution Share Alike 2.0 Generic. Creative Commons Attribution Share Alike 2.0 Generic. */
    CcBySa20,
    /** **CC-BY-SA-2.5**

Creative Commons Attribution Share Alike 2.5 Generic. Creative Commons Attribution Share Alike 2.5 Generic. */
    CcBySa25,
    /** **CC-BY-SA-3.0**

Creative Commons Attribution Share Alike 3.0 Unported. Creative Commons Attribution Share Alike 3.0 Unported. */
    CcBySa30,
    /** **CC-BY-SA-4.0**

Creative Commons Attribution Share Alike 4.0 International. Creative Commons Attribution Share Alike 4.0 International. */
    CcBySa40,
    /** **CC0-1.0**

Creative Commons Zero v1.0 Universal. Creative Commons Zero v1.0 Universal. */
    Cc010,
    /** **CDDL-1.0**

Common Development and Distribution License 1.0. Common Development and Distribution License 1.0. */
    Cddl10,
    /** **CDDL-1.1**

Common Development and Distribution License 1.1. Common Development and Distribution License 1.1. */
    Cddl11,
    /** **CDLA-Permissive-1.0**

Community Data License Agreement Permissive 1.0. Community Data License Agreement Permissive 1.0. */
    CdlaPermissive10,
    /** **CDLA-Sharing-1.0**

Community Data License Agreement Sharing 1.0. Community Data License Agreement Sharing 1.0. */
    CdlaSharing10,
    /** **CECILL-1.0**

CeCILL Free Software License Agreement v1.0. CeCILL Free Software License Agreement v1.0. */
    Cecill10,
    /** **CECILL-1.1**

CeCILL Free Software License Agreement v1.1. CeCILL Free Software License Agreement v1.1. */
    Cecill11,
    /** **CECILL-2.0**

CeCILL Free Software License Agreement v2.0. CeCILL Free Software License Agreement v2.0. */
    Cecill20,
    /** **CECILL-2.1**

CeCILL Free Software License Agreement v2.1. CeCILL Free Software License Agreement v2.1. */
    Cecill21,
    /** **CECILL-B**

CeCILL-B Free Software License Agreement. CeCILL-B Free Software License Agreement. */
    CecillB,
    /** **CECILL-C**

CeCILL-C Free Software License Agreement. CeCILL-C Free Software License Agreement. */
    CecillC,
    /** **CNRI-Jython**

CNRI Jython License. CNRI Jython License. */
    CnriJython,
    /** **CNRI-Python**

CNRI Python License. CNRI Python License. */
    CnriPython,
    /** **CNRI-Python-GPL-Compatible**

CNRI Python Open Source GPL Compatible License Agreement. CNRI Python Open Source GPL Compatible License Agreement. */
    CnriPythonGplCompatible,
    /** **CPAL-1.0**

Common Public Attribution License 1.0. Common Public Attribution License 1.0. */
    Cpal10,
    /** **CPL-1.0**

Common Public License 1.0. Common Public License 1.0. */
    Cpl10,
    /** **CPOL-1.02**

Code Project Open License 1.02. Code Project Open License 1.02. */
    Cpol102,
    /** **CUA-OPL-1.0**

CUA Office Public License v1.0. CUA Office Public License v1.0. */
    CuaOpl10,
    /** **Caldera**

Caldera License. Caldera License. */
    Caldera,
    /** **ClArtistic**

Clarified Artistic License. Clarified Artistic License. */
    ClArtistic,
    /** **Condor-1.1**

Condor Public License v1.1. Condor Public License v1.1. */
    Condor11,
    /** **Crossword**

Crossword License. Crossword License. */
    Crossword,
    /** **CrystalStacker**

CrystalStacker License. CrystalStacker License. */
    CrystalStacker,
    /** **Cube**

Cube License. Cube License. */
    Cube,
    /** **D-FSL-1.0**

Deutsche Freie Software Lizenz. Deutsche Freie Software Lizenz. */
    DFsl10,
    /** **DOC**

DOC License. DOC License. */
    Doc,
    /** **DSDP**

DSDP License. DSDP License. */
    Dsdp,
    /** **Dotseqn**

Dotseqn License. Dotseqn License. */
    Dotseqn,
    /** **ECL-1.0**

Educational Community License v1.0. Educational Community License v1.0. */
    Ecl10,
    /** **ECL-2.0**

Educational Community License v2.0. Educational Community License v2.0. */
    Ecl20,
    /** **EFL-1.0**

Eiffel Forum License v1.0. Eiffel Forum License v1.0. */
    Efl10,
    /** **EFL-2.0**

Eiffel Forum License v2.0. Eiffel Forum License v2.0. */
    Efl20,
    /** **EPL-1.0**

Eclipse Public License 1.0. Eclipse Public License 1.0. */
    Epl10,
    /** **EPL-2.0**

Eclipse Public License 2.0. Eclipse Public License 2.0. */
    Epl20,
    /** **EUDatagrid**

EU DataGrid Software License. EU DataGrid Software License. */
    EuDatagrid,
    /** **EUPL-1.0**

European Union Public License 1.0. European Union Public License 1.0. */
    Eupl10,
    /** **EUPL-1.1**

European Union Public License 1.1. European Union Public License 1.1. */
    Eupl11,
    /** **EUPL-1.2**

European Union Public License 1.2. European Union Public License 1.2. */
    Eupl12,
    /** **Entessa**

Entessa Public License v1.0. Entessa Public License v1.0. */
    Entessa,
    /** **ErlPL-1.1**

Erlang Public License v1.1. Erlang Public License v1.1. */
    ErlPl11,
    /** **Eurosym**

Eurosym License. Eurosym License. */
    Eurosym,
    /** **FSFAP**

FSF All Permissive License. FSF All Permissive License. */
    Fsfap,
    /** **FSFUL**

FSF Unlimited License. FSF Unlimited License. */
    Fsful,
    /** **FSFULLR**

FSF Unlimited License (with License Retention). FSF Unlimited License (with License Retention). */
    Fsfullr,
    /** **FTL**

Freetype Project License. Freetype Project License. */
    Ftl,
    /** **Fair**

Fair License. Fair License. */
    Fair,
    /** **Frameworx-1.0**

Frameworx Open License 1.0. Frameworx Open License 1.0. */
    Frameworx10,
    /** **FreeImage**

FreeImage Public License v1.0. FreeImage Public License v1.0. */
    FreeImage,
    /** **GFDL-1.1-only**

GNU Free Documentation License v1.1 only. GNU Free Documentation License v1.1 only. */
    Gfdl11Only,
    /** **GFDL-1.1-or-later**

GNU Free Documentation License v1.1 or later. GNU Free Documentation License v1.1 or later. */
    Gfdl11OrLater,
    /** **GFDL-1.2-only**

GNU Free Documentation License v1.2 only. GNU Free Documentation License v1.2 only. */
    Gfdl12Only,
    /** **GFDL-1.2-or-later**

GNU Free Documentation License v1.2 or later. GNU Free Documentation License v1.2 or later. */
    Gfdl12OrLater,
    /** **GFDL-1.3-only**

GNU Free Documentation License v1.3 only. GNU Free Documentation License v1.3 only. */
    Gfdl13Only,
    /** **GFDL-1.3-or-later**

GNU Free Documentation License v1.3 or later. GNU Free Documentation License v1.3 or later. */
    Gfdl13OrLater,
    /** **GL2PS**

GL2PS License. GL2PS License. */
    Gl2ps,
    /** **GPL-1.0-only**

GNU General Public License v1.0 only. GNU General Public License v1.0 only. */
    Gpl10Only,
    /** **GPL-1.0-or-later**

GNU General Public License v1.0 or later. GNU General Public License v1.0 or later. */
    Gpl10OrLater,
    /** **GPL-2.0-only**

GNU General Public License v2.0 only. GNU General Public License v2.0 only. */
    Gpl20Only,
    /** **GPL-2.0-or-later**

GNU General Public License v2.0 or later. GNU General Public License v2.0 or later. */
    Gpl20OrLater,
    /** **GPL-3.0-only**

GNU General Public License v3.0 only. GNU General Public License v3.0 only. */
    Gpl30Only,
    /** **GPL-3.0-or-later**

GNU General Public License v3.0 or later. GNU General Public License v3.0 or later. */
    Gpl30OrLater,
    /** **Giftware**

Giftware License. Giftware License. */
    Giftware,
    /** **Glide**

3dfx Glide License. 3dfx Glide License. */
    Glide,
    /** **Glulxe**

Glulxe License. Glulxe License. */
    Glulxe,
    /** **HPND**

Historical Permission Notice and Disclaimer. Historical Permission Notice and Disclaimer. */
    Hpnd,
    /** **HaskellReport**

Haskell Language Report License. Haskell Language Report License. */
    HaskellReport,
    /** **IBM-pibs**

IBM PowerPC Initialization and Boot Software. IBM PowerPC Initialization and Boot Software. */
    IbmPibs,
    /** **ICU**

ICU License. ICU License. */
    Icu,
    /** **IJG**

Independent JPEG Group License. Independent JPEG Group License. */
    Ijg,
    /** **IPA**

IPA Font License. IPA Font License. */
    Ipa,
    /** **IPL-1.0**

IBM Public License v1.0. IBM Public License v1.0. */
    Ipl10,
    /** **ISC**

ISC License. ISC License. */
    Isc,
    /** **ImageMagick**

ImageMagick License. ImageMagick License. */
    ImageMagick,
    /** **Imlib2**

Imlib2 License. Imlib2 License. */
    Imlib2,
    /** **Info-ZIP**

Info-ZIP License. Info-ZIP License. */
    InfoZip,
    /** **Intel**

Intel Open Source License. Intel Open Source License. */
    Intel,
    /** **Intel-ACPI**

Intel ACPI Software License Agreement. Intel ACPI Software License Agreement. */
    IntelAcpi,
    /** **Interbase-1.0**

Interbase Public License v1.0. Interbase Public License v1.0. */
    Interbase10,
    /** **JSON**

JSON License. JSON License. */
    Json,
    /** **JasPer-2.0**

JasPer License. JasPer License. */
    JasPer20,
    /** **LAL-1.2**

Licence Art Libre 1.2. Licence Art Libre 1.2. */
    Lal12,
    /** **LAL-1.3**

Licence Art Libre 1.3. Licence Art Libre 1.3. */
    Lal13,
    /** **LGPL-2.0-only**

GNU Library General Public License v2 only. GNU Library General Public License v2 only. */
    Lgpl20Only,
    /** **LGPL-2.0-or-later**

GNU Library General Public License v2 or later. GNU Library General Public License v2 or later. */
    Lgpl20OrLater,
    /** **LGPL-2.1-only**

GNU Lesser General Public License v2.1 only. GNU Lesser General Public License v2.1 only. */
    Lgpl21Only,
    /** **LGPL-2.1-or-later**

GNU Lesser General Public License v2.1 or later. GNU Lesser General Public License v2.1 or later. */
    Lgpl21OrLater,
    /** **LGPL-3.0-only**

GNU Lesser General Public License v3.0 only. GNU Lesser General Public License v3.0 only. */
    Lgpl30Only,
    /** **LGPL-3.0-or-later**

GNU Lesser General Public License v3.0 or later. GNU Lesser General Public License v3.0 or later. */
    Lgpl30OrLater,
    /** **LGPLLR**

Lesser General Public License For Linguistic Resources. Lesser General Public License For Linguistic Resources. */
    Lgpllr,
    /** **LPL-1.0**

Lucent Public License Version 1.0. Lucent Public License Version 1.0. */
    Lpl10,
    /** **LPL-1.02**

Lucent Public License v1.02. Lucent Public License v1.02. */
    Lpl102,
    /** **LPPL-1.0**

LaTeX Project Public License v1.0. LaTeX Project Public License v1.0. */
    Lppl10,
    /** **LPPL-1.1**

LaTeX Project Public License v1.1. LaTeX Project Public License v1.1. */
    Lppl11,
    /** **LPPL-1.2**

LaTeX Project Public License v1.2. LaTeX Project Public License v1.2. */
    Lppl12,
    /** **LPPL-1.3a**

LaTeX Project Public License v1.3a. LaTeX Project Public License v1.3a. */
    Lppl13a,
    /** **LPPL-1.3c**

LaTeX Project Public License v1.3c. LaTeX Project Public License v1.3c. */
    Lppl13c,
    /** **Latex2e**

Latex2e License. Latex2e License. */
    Latex2e,
    /** **Leptonica**

Leptonica License. Leptonica License. */
    Leptonica,
    /** **LiLiQ-P-1.1**

Licence Libre du Québec – Permissive version 1.1. Licence Libre du Québec – Permissive version 1.1. */
    LiLiQP11,
    /** **LiLiQ-R-1.1**

Licence Libre du Québec – Réciprocité version 1.1. Licence Libre du Québec – Réciprocité version 1.1. */
    LiLiQR11,
    /** **LiLiQ-Rplus-1.1**

Licence Libre du Québec – Réciprocité forte version 1.1. Licence Libre du Québec – Réciprocité forte version 1.1. */
    LiLiQRplus11,
    /** **Libpng**

libpng License. libpng License. */
    Libpng,
    /** **Linux-OpenIB**

Linux Kernel Variant of OpenIB.org license. Linux Kernel Variant of OpenIB.org license. */
    LinuxOpenIb,
    /** **MIT**

MIT License. MIT License. */
    Mit,
    /** **MIT-0**

MIT No Attribution. MIT No Attribution. */
    Mit0,
    /** **MIT-CMU**

CMU License. CMU License. */
    MitCmu,
    /** **MIT-advertising**

Enlightenment License (e16). Enlightenment License (e16). */
    MitAdvertising,
    /** **MIT-enna**

enna License. enna License. */
    MitEnna,
    /** **MIT-feh**

feh License. feh License. */
    MitFeh,
    /** **MITNFA**

MIT +no-false-attribs license. MIT +no-false-attribs license. */
    Mitnfa,
    /** **MPL-1.0**

Mozilla Public License 1.0. Mozilla Public License 1.0. */
    Mpl10,
    /** **MPL-1.1**

Mozilla Public License 1.1. Mozilla Public License 1.1. */
    Mpl11,
    /** **MPL-2.0**

Mozilla Public License 2.0. Mozilla Public License 2.0. */
    Mpl20,
    /** **MPL-2.0-no-copyleft-exception**

Mozilla Public License 2.0 (no copyleft exception). Mozilla Public License 2.0 (no copyleft exception). */
    Mpl20NoCopyleftException,
    /** **MS-PL**

Microsoft Public License. Microsoft Public License. */
    MsPl,
    /** **MS-RL**

Microsoft Reciprocal License. Microsoft Reciprocal License. */
    MsRl,
    /** **MTLL**

Matrix Template Library License. Matrix Template Library License. */
    Mtll,
    /** **MakeIndex**

MakeIndex License. MakeIndex License. */
    MakeIndex,
    /** **MirOS**

MirOS License. MirOS License. */
    MirOs,
    /** **Motosoto**

Motosoto License. Motosoto License. */
    Motosoto,
    /** **Multics**

Multics License. Multics License. */
    Multics,
    /** **Mup**

Mup License. Mup License. */
    Mup,
    /** **NASA-1.3**

NASA Open Source Agreement 1.3. NASA Open Source Agreement 1.3. */
    Nasa13,
    /** **NBPL-1.0**

Net Boolean Public License v1. Net Boolean Public License v1. */
    Nbpl10,
    /** **NCSA**

University of Illinois/NCSA Open Source License. University of Illinois/NCSA Open Source License. */
    Ncsa,
    /** **NGPL**

Nethack General Public License. Nethack General Public License. */
    Ngpl,
    /** **NLOD-1.0**

Norwegian Licence for Open Government Data. Norwegian Licence for Open Government Data. */
    Nlod10,
    /** **NLPL**

No Limit Public License. No Limit Public License. */
    Nlpl,
    /** **NOSL**

Netizen Open Source License. Netizen Open Source License. */
    Nosl,
    /** **NPL-1.0**

Netscape Public License v1.0. Netscape Public License v1.0. */
    Npl10,
    /** **NPL-1.1**

Netscape Public License v1.1. Netscape Public License v1.1. */
    Npl11,
    /** **NPOSL-3.0**

Non-Profit Open Software License 3.0. Non-Profit Open Software License 3.0. */
    Nposl30,
    /** **NRL**

NRL License. NRL License. */
    Nrl,
    /** **NTP**

NTP License. NTP License. */
    Ntp,
    /** **Naumen**

Naumen Public License. Naumen Public License. */
    Naumen,
    /** **Net-SNMP**

Net-SNMP License. Net-SNMP License. */
    NetSnmp,
    /** **NetCDF**

NetCDF license. NetCDF license. */
    NetCdf,
    /** **Newsletr**

Newsletr License. Newsletr License. */
    Newsletr,
    /** **Nokia**

Nokia Open Source License. Nokia Open Source License. */
    Nokia,
    /** **Noweb**

Noweb License. Noweb License. */
    Noweb,
    /** **OCCT-PL**

Open CASCADE Technology Public License. Open CASCADE Technology Public License. */
    OcctPl,
    /** **OCLC-2.0**

OCLC Research Public License 2.0. OCLC Research Public License 2.0. */
    Oclc20,
    /** **ODbL-1.0**

ODC Open Database License v1.0. ODC Open Database License v1.0. */
    ODbL10,
    /** **OFL-1.0**

SIL Open Font License 1.0. SIL Open Font License 1.0. */
    Ofl10,
    /** **OFL-1.1**

SIL Open Font License 1.1. SIL Open Font License 1.1. */
    Ofl11,
    /** **OGTSL**

Open Group Test Suite License. Open Group Test Suite License. */
    Ogtsl,
    /** **OLDAP-1.1**

Open LDAP Public License v1.1. Open LDAP Public License v1.1. */
    Oldap11,
    /** **OLDAP-1.2**

Open LDAP Public License v1.2. Open LDAP Public License v1.2. */
    Oldap12,
    /** **OLDAP-1.3**

Open LDAP Public License v1.3. Open LDAP Public License v1.3. */
    Oldap13,
    /** **OLDAP-1.4**

Open LDAP Public License v1.4. Open LDAP Public License v1.4. */
    Oldap14,
    /** **OLDAP-2.0**

Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B). Open LDAP Public License v2.0 (or possibly 2.0A and 2.0B). */
    Oldap20,
    /** **OLDAP-2.0.1**

Open LDAP Public License v2.0.1. Open LDAP Public License v2.0.1. */
    Oldap201,
    /** **OLDAP-2.1**

Open LDAP Public License v2.1. Open LDAP Public License v2.1. */
    Oldap21,
    /** **OLDAP-2.2**

Open LDAP Public License v2.2. Open LDAP Public License v2.2. */
    Oldap22,
    /** **OLDAP-2.2.1**

Open LDAP Public License v2.2.1. Open LDAP Public License v2.2.1. */
    Oldap221,
    /** **OLDAP-2.2.2**

Open LDAP Public License 2.2.2. Open LDAP Public License 2.2.2. */
    Oldap222,
    /** **OLDAP-2.3**

Open LDAP Public License v2.3. Open LDAP Public License v2.3. */
    Oldap23,
    /** **OLDAP-2.4**

Open LDAP Public License v2.4. Open LDAP Public License v2.4. */
    Oldap24,
    /** **OLDAP-2.5**

Open LDAP Public License v2.5. Open LDAP Public License v2.5. */
    Oldap25,
    /** **OLDAP-2.6**

Open LDAP Public License v2.6. Open LDAP Public License v2.6. */
    Oldap26,
    /** **OLDAP-2.7**

Open LDAP Public License v2.7. Open LDAP Public License v2.7. */
    Oldap27,
    /** **OLDAP-2.8**

Open LDAP Public License v2.8. Open LDAP Public License v2.8. */
    Oldap28,
    /** **OML**

Open Market License. Open Market License. */
    Oml,
    /** **OPL-1.0**

Open Public License v1.0. Open Public License v1.0. */
    Opl10,
    /** **OSET-PL-2.1**

OSET Public License version 2.1. OSET Public License version 2.1. */
    OsetPl21,
    /** **OSL-1.0**

Open Software License 1.0. Open Software License 1.0. */
    Osl10,
    /** **OSL-1.1**

Open Software License 1.1. Open Software License 1.1. */
    Osl11,
    /** **OSL-2.0**

Open Software License 2.0. Open Software License 2.0. */
    Osl20,
    /** **OSL-2.1**

Open Software License 2.1. Open Software License 2.1. */
    Osl21,
    /** **OSL-3.0**

Open Software License 3.0. Open Software License 3.0. */
    Osl30,
    /** **OpenSSL**

OpenSSL License. OpenSSL License. */
    OpenSsl,
    /** **PDDL-1.0**

ODC Public Domain Dedication & License 1.0. ODC Public Domain Dedication & License 1.0. */
    Pddl10,
    /** **PHP-3.0**

PHP License v3.0. PHP License v3.0. */
    Php30,
    /** **PHP-3.01**

PHP License v3.01. PHP License v3.01. */
    Php301,
    /** **Plexus**

Plexus Classworlds License. Plexus Classworlds License. */
    Plexus,
    /** **PostgreSQL**

PostgreSQL License. PostgreSQL License. */
    PostgreSql,
    /** **Python-2.0**

Python License 2.0. Python License 2.0. */
    Python20,
    /** **QPL-1.0**

Q Public License 1.0. Q Public License 1.0. */
    Qpl10,
    /** **Qhull**

Qhull License. Qhull License. */
    Qhull,
    /** **RHeCos-1.1**

Red Hat eCos Public License v1.1. Red Hat eCos Public License v1.1. */
    RHeCos11,
    /** **RPL-1.1**

Reciprocal Public License 1.1. Reciprocal Public License 1.1. */
    Rpl11,
    /** **RPL-1.5**

Reciprocal Public License 1.5. Reciprocal Public License 1.5. */
    Rpl15,
    /** **RPSL-1.0**

RealNetworks Public Source License v1.0. RealNetworks Public Source License v1.0. */
    Rpsl10,
    /** **RSA-MD**

RSA Message-Digest License. RSA Message-Digest License. */
    RsaMd,
    /** **RSCPL**

Ricoh Source Code Public License. Ricoh Source Code Public License. */
    Rscpl,
    /** **Rdisc**

Rdisc License. Rdisc License. */
    Rdisc,
    /** **Ruby**

Ruby License. Ruby License. */
    Ruby,
    /** **SAX-PD**

Sax Public Domain Notice. Sax Public Domain Notice. */
    SaxPd,
    /** **SCEA**

SCEA Shared Source License. SCEA Shared Source License. */
    Scea,
    /** **SGI-B-1.0**

SGI Free Software License B v1.0. SGI Free Software License B v1.0. */
    SgiB10,
    /** **SGI-B-1.1**

SGI Free Software License B v1.1. SGI Free Software License B v1.1. */
    SgiB11,
    /** **SGI-B-2.0**

SGI Free Software License B v2.0. SGI Free Software License B v2.0. */
    SgiB20,
    /** **SISSL**

Sun Industry Standards Source License v1.1. Sun Industry Standards Source License v1.1. */
    Sissl,
    /** **SISSL-1.2**

Sun Industry Standards Source License v1.2. Sun Industry Standards Source License v1.2. */
    Sissl12,
    /** **SMLNJ**

Standard ML of New Jersey License. Standard ML of New Jersey License. */
    Smlnj,
    /** **SMPPL**

Secure Messaging Protocol Public License. Secure Messaging Protocol Public License. */
    Smppl,
    /** **SNIA**

SNIA Public License 1.1. SNIA Public License 1.1. */
    Snia,
    /** **SPL-1.0**

Sun Public License v1.0. Sun Public License v1.0. */
    Spl10,
    /** **SWL**

Scheme Widget Library (SWL) Software License Agreement. Scheme Widget Library (SWL) Software License Agreement. */
    Swl,
    /** **Saxpath**

Saxpath License. Saxpath License. */
    Saxpath,
    /** **Sendmail**

Sendmail License. Sendmail License. */
    Sendmail,
    /** **SimPL-2.0**

Simple Public License 2.0. Simple Public License 2.0. */
    SimPl20,
    /** **Sleepycat**

Sleepycat License. Sleepycat License. */
    Sleepycat,
    /** **Spencer-86**

Spencer License 86. Spencer License 86. */
    Spencer86,
    /** **Spencer-94**

Spencer License 94. Spencer License 94. */
    Spencer94,
    /** **Spencer-99**

Spencer License 99. Spencer License 99. */
    Spencer99,
    /** **SugarCRM-1.1.3**

SugarCRM Public License v1.1.3. SugarCRM Public License v1.1.3. */
    SugarCrm113,
    /** **TCL**

TCL/TK License. TCL/TK License. */
    Tcl,
    /** **TCP-wrappers**

TCP Wrappers License. TCP Wrappers License. */
    TcpWrappers,
    /** **TMate**

TMate Open Source License. TMate Open Source License. */
    TMate,
    /** **TORQUE-1.1**

TORQUE v2.5+ Software License v1.1. TORQUE v2.5+ Software License v1.1. */
    Torque11,
    /** **TOSL**

Trusster Open Source License. Trusster Open Source License. */
    Tosl,
    /** **UPL-1.0**

Universal Permissive License v1.0. Universal Permissive License v1.0. */
    Upl10,
    /** **Unicode-DFS-2015**

Unicode License Agreement - Data Files and Software (2015). Unicode License Agreement - Data Files and Software (2015). */
    UnicodeDfs2015,
    /** **Unicode-DFS-2016**

Unicode License Agreement - Data Files and Software (2016). Unicode License Agreement - Data Files and Software (2016). */
    UnicodeDfs2016,
    /** **Unicode-TOU**

Unicode Terms of Use. Unicode Terms of Use. */
    UnicodeTou,
    /** **Unlicense**

The Unlicense. The Unlicense. */
    Unlicense,
    /** **VOSTROM**

VOSTROM Public License for Open Source. VOSTROM Public License for Open Source. */
    Vostrom,
    /** **VSL-1.0**

Vovida Software License v1.0. Vovida Software License v1.0. */
    Vsl10,
    /** **Vim**

Vim License. Vim License. */
    Vim,
    /** **W3C**

W3C Software Notice and License (2002-12-31). W3C Software Notice and License (2002-12-31). */
    W3c,
    /** **W3C-19980720**

W3C Software Notice and License (1998-07-20). W3C Software Notice and License (1998-07-20). */
    W3c19980720,
    /** **W3C-20150513**

W3C Software Notice and Document License (2015-05-13). W3C Software Notice and Document License (2015-05-13). */
    W3c20150513,
    /** **WTFPL**

Do What The F*ck You Want To Public License. Do What The F*ck You Want To Public License. */
    Wtfpl,
    /** **Watcom-1.0**

Sybase Open Watcom Public License 1.0. Sybase Open Watcom Public License 1.0. */
    Watcom10,
    /** **Wsuipa**

Wsuipa License. Wsuipa License. */
    Wsuipa,
    /** **X11**

X11 License. X11 License. */
    X11,
    /** **XFree86-1.1**

XFree86 License 1.1. XFree86 License 1.1. */
    XFree8611,
    /** **XSkat**

XSkat License. XSkat License. */
    XSkat,
    /** **Xerox**

Xerox License. Xerox License. */
    Xerox,
    /** **Xnet**

X.Net License. X.Net License. */
    Xnet,
    /** **YPL-1.0**

Yahoo! Public License v1.0. Yahoo! Public License v1.0. */
    Ypl10,
    /** **YPL-1.1**

Yahoo! Public License v1.1. Yahoo! Public License v1.1. */
    Ypl11,
    /** **ZPL-1.1**

Zope Public License 1.1. Zope Public License 1.1. */
    Zpl11,
    /** **ZPL-2.0**

Zope Public License 2.0. Zope Public License 2.0. */
    Zpl20,
    /** **ZPL-2.1**

Zope Public License 2.1. Zope Public License 2.1. */
    Zpl21,
    /** **Zed**

Zed License. Zed License. */
    Zed,
    /** **Zend-2.0**

Zend License v2.0. Zend License v2.0. */
    Zend20,
    /** **Zimbra-1.3**

Zimbra Public License v1.3. Zimbra Public License v1.3. */
    Zimbra13,
    /** **Zimbra-1.4**

Zimbra Public License v1.4. Zimbra Public License v1.4. */
    Zimbra14,
    /** **Zlib**

zlib License. zlib License. */
    Zlib,
    /** **bzip2-1.0.5**

bzip2 and libbzip2 License v1.0.5. bzip2 and libbzip2 License v1.0.5. */
    Bzip2105,
    /** **bzip2-1.0.6**

bzip2 and libbzip2 License v1.0.6. bzip2 and libbzip2 License v1.0.6. */
    Bzip2106,
    /** **curl**

curl License. curl License. */
    Curl,
    /** **diffmark**

diffmark license. diffmark license. */
    Diffmark,
    /** **dvipdfm**

dvipdfm License. dvipdfm License. */
    Dvipdfm,
    /** **eGenix**

eGenix.com Public License 1.1.0. eGenix.com Public License 1.1.0. */
    EGenix,
    /** **gSOAP-1.3b**

gSOAP Public License v1.3b. gSOAP Public License v1.3b. */
    GSoap13b,
    /** **gnuplot**

gnuplot License. gnuplot License. */
    Gnuplot,
    /** **iMatix**

iMatix Standard Function Library Agreement. iMatix Standard Function Library Agreement. */
    IMatix,
    /** **libtiff**

libtiff License. libtiff License. */
    Libtiff,
    /** **mpich2**

mpich2 License. mpich2 License. */
    Mpich2,
    /** **not-open-source**

Not open source. Not an open source license. */
    NotOpenSource,
    /** **psfrag**

psfrag License. psfrag License. */
    Psfrag,
    /** **psutils**

psutils License. psutils License. */
    Psutils,
    /** **xinetd**

xinetd License. xinetd License. */
    Xinetd,
    /** **xpp**

XPP License. XPP License. */
    Xpp,
    /** **zlib-acknowledgement**

zlib/libpng License with Acknowledgement. zlib/libpng License with Acknowledgement. */
    ZlibAcknowledgement,
}
impl ::core::str::FromStr for SPDXLicense {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "0BSD" => Ok(Self::N0bsd),
            "AAL" => Ok(Self::Aal),
            "ADSL" => Ok(Self::Adsl),
            "AFL-1.1" => Ok(Self::Afl11),
            "AFL-1.2" => Ok(Self::Afl12),
            "AFL-2.0" => Ok(Self::Afl20),
            "AFL-2.1" => Ok(Self::Afl21),
            "AFL-3.0" => Ok(Self::Afl30),
            "AGPL-1.0-only" => Ok(Self::Agpl10Only),
            "AGPL-1.0-or-later" => Ok(Self::Agpl10OrLater),
            "AGPL-3.0-only" => Ok(Self::Agpl30Only),
            "AGPL-3.0-or-later" => Ok(Self::Agpl30OrLater),
            "AMDPLPA" => Ok(Self::Amdplpa),
            "AML" => Ok(Self::Aml),
            "AMPAS" => Ok(Self::Ampas),
            "ANTLR-PD" => Ok(Self::AntlrPd),
            "APAFML" => Ok(Self::Apafml),
            "APL-1.0" => Ok(Self::Apl10),
            "APSL-1.0" => Ok(Self::Apsl10),
            "APSL-1.1" => Ok(Self::Apsl11),
            "APSL-1.2" => Ok(Self::Apsl12),
            "APSL-2.0" => Ok(Self::Apsl20),
            "Abstyles" => Ok(Self::Abstyles),
            "Adobe-2006" => Ok(Self::Adobe2006),
            "Adobe-Glyph" => Ok(Self::AdobeGlyph),
            "Afmparse" => Ok(Self::Afmparse),
            "Aladdin" => Ok(Self::Aladdin),
            "Apache-1.0" => Ok(Self::Apache10),
            "Apache-1.1" => Ok(Self::Apache11),
            "Apache-2.0" => Ok(Self::Apache20),
            "Artistic-1.0" => Ok(Self::Artistic10),
            "Artistic-1.0-Perl" => Ok(Self::Artistic10Perl),
            "Artistic-1.0-cl8" => Ok(Self::Artistic10Cl8),
            "Artistic-2.0" => Ok(Self::Artistic20),
            "BSD-1-Clause" => Ok(Self::Bsd1Clause),
            "BSD-2-Clause" => Ok(Self::Bsd2Clause),
            "BSD-2-Clause-FreeBSD" => Ok(Self::Bsd2ClauseFreeBsd),
            "BSD-2-Clause-NetBSD" => Ok(Self::Bsd2ClauseNetBsd),
            "BSD-2-Clause-Patent" => Ok(Self::Bsd2ClausePatent),
            "BSD-3-Clause" => Ok(Self::Bsd3Clause),
            "BSD-3-Clause-Attribution" => Ok(Self::Bsd3ClauseAttribution),
            "BSD-3-Clause-Clear" => Ok(Self::Bsd3ClauseClear),
            "BSD-3-Clause-LBNL" => Ok(Self::Bsd3ClauseLbnl),
            "BSD-3-Clause-No-Nuclear-License" => Ok(Self::Bsd3ClauseNoNuclearLicense),
            "BSD-3-Clause-No-Nuclear-License-2014" => {
                Ok(Self::Bsd3ClauseNoNuclearLicense2014)
            }
            "BSD-3-Clause-No-Nuclear-Warranty" => Ok(Self::Bsd3ClauseNoNuclearWarranty),
            "BSD-4-Clause" => Ok(Self::Bsd4Clause),
            "BSD-4-Clause-UC" => Ok(Self::Bsd4ClauseUc),
            "BSD-Protection" => Ok(Self::BsdProtection),
            "BSD-Source-Code" => Ok(Self::BsdSourceCode),
            "BSL-1.0" => Ok(Self::Bsl10),
            "Bahyph" => Ok(Self::Bahyph),
            "Barr" => Ok(Self::Barr),
            "Beerware" => Ok(Self::Beerware),
            "BitTorrent-1.0" => Ok(Self::BitTorrent10),
            "BitTorrent-1.1" => Ok(Self::BitTorrent11),
            "Borceux" => Ok(Self::Borceux),
            "CATOSL-1.1" => Ok(Self::Catosl11),
            "CC-BY-1.0" => Ok(Self::CcBy10),
            "CC-BY-2.0" => Ok(Self::CcBy20),
            "CC-BY-2.5" => Ok(Self::CcBy25),
            "CC-BY-3.0" => Ok(Self::CcBy30),
            "CC-BY-4.0" => Ok(Self::CcBy40),
            "CC-BY-NC-1.0" => Ok(Self::CcByNc10),
            "CC-BY-NC-2.0" => Ok(Self::CcByNc20),
            "CC-BY-NC-2.5" => Ok(Self::CcByNc25),
            "CC-BY-NC-3.0" => Ok(Self::CcByNc30),
            "CC-BY-NC-4.0" => Ok(Self::CcByNc40),
            "CC-BY-NC-ND-1.0" => Ok(Self::CcByNcNd10),
            "CC-BY-NC-ND-2.0" => Ok(Self::CcByNcNd20),
            "CC-BY-NC-ND-2.5" => Ok(Self::CcByNcNd25),
            "CC-BY-NC-ND-3.0" => Ok(Self::CcByNcNd30),
            "CC-BY-NC-ND-4.0" => Ok(Self::CcByNcNd40),
            "CC-BY-NC-SA-1.0" => Ok(Self::CcByNcSa10),
            "CC-BY-NC-SA-2.0" => Ok(Self::CcByNcSa20),
            "CC-BY-NC-SA-2.5" => Ok(Self::CcByNcSa25),
            "CC-BY-NC-SA-3.0" => Ok(Self::CcByNcSa30),
            "CC-BY-NC-SA-4.0" => Ok(Self::CcByNcSa40),
            "CC-BY-ND-1.0" => Ok(Self::CcByNd10),
            "CC-BY-ND-2.0" => Ok(Self::CcByNd20),
            "CC-BY-ND-2.5" => Ok(Self::CcByNd25),
            "CC-BY-ND-3.0" => Ok(Self::CcByNd30),
            "CC-BY-ND-4.0" => Ok(Self::CcByNd40),
            "CC-BY-SA-1.0" => Ok(Self::CcBySa10),
            "CC-BY-SA-2.0" => Ok(Self::CcBySa20),
            "CC-BY-SA-2.5" => Ok(Self::CcBySa25),
            "CC-BY-SA-3.0" => Ok(Self::CcBySa30),
            "CC-BY-SA-4.0" => Ok(Self::CcBySa40),
            "CC0-1.0" => Ok(Self::Cc010),
            "CDDL-1.0" => Ok(Self::Cddl10),
            "CDDL-1.1" => Ok(Self::Cddl11),
            "CDLA-Permissive-1.0" => Ok(Self::CdlaPermissive10),
            "CDLA-Sharing-1.0" => Ok(Self::CdlaSharing10),
            "CECILL-1.0" => Ok(Self::Cecill10),
            "CECILL-1.1" => Ok(Self::Cecill11),
            "CECILL-2.0" => Ok(Self::Cecill20),
            "CECILL-2.1" => Ok(Self::Cecill21),
            "CECILL-B" => Ok(Self::CecillB),
            "CECILL-C" => Ok(Self::CecillC),
            "CNRI-Jython" => Ok(Self::CnriJython),
            "CNRI-Python" => Ok(Self::CnriPython),
            "CNRI-Python-GPL-Compatible" => Ok(Self::CnriPythonGplCompatible),
            "CPAL-1.0" => Ok(Self::Cpal10),
            "CPL-1.0" => Ok(Self::Cpl10),
            "CPOL-1.02" => Ok(Self::Cpol102),
            "CUA-OPL-1.0" => Ok(Self::CuaOpl10),
            "Caldera" => Ok(Self::Caldera),
            "ClArtistic" => Ok(Self::ClArtistic),
            "Condor-1.1" => Ok(Self::Condor11),
            "Crossword" => Ok(Self::Crossword),
            "CrystalStacker" => Ok(Self::CrystalStacker),
            "Cube" => Ok(Self::Cube),
            "D-FSL-1.0" => Ok(Self::DFsl10),
            "DOC" => Ok(Self::Doc),
            "DSDP" => Ok(Self::Dsdp),
            "Dotseqn" => Ok(Self::Dotseqn),
            "ECL-1.0" => Ok(Self::Ecl10),
            "ECL-2.0" => Ok(Self::Ecl20),
            "EFL-1.0" => Ok(Self::Efl10),
            "EFL-2.0" => Ok(Self::Efl20),
            "EPL-1.0" => Ok(Self::Epl10),
            "EPL-2.0" => Ok(Self::Epl20),
            "EUDatagrid" => Ok(Self::EuDatagrid),
            "EUPL-1.0" => Ok(Self::Eupl10),
            "EUPL-1.1" => Ok(Self::Eupl11),
            "EUPL-1.2" => Ok(Self::Eupl12),
            "Entessa" => Ok(Self::Entessa),
            "ErlPL-1.1" => Ok(Self::ErlPl11),
            "Eurosym" => Ok(Self::Eurosym),
            "FSFAP" => Ok(Self::Fsfap),
            "FSFUL" => Ok(Self::Fsful),
            "FSFULLR" => Ok(Self::Fsfullr),
            "FTL" => Ok(Self::Ftl),
            "Fair" => Ok(Self::Fair),
            "Frameworx-1.0" => Ok(Self::Frameworx10),
            "FreeImage" => Ok(Self::FreeImage),
            "GFDL-1.1-only" => Ok(Self::Gfdl11Only),
            "GFDL-1.1-or-later" => Ok(Self::Gfdl11OrLater),
            "GFDL-1.2-only" => Ok(Self::Gfdl12Only),
            "GFDL-1.2-or-later" => Ok(Self::Gfdl12OrLater),
            "GFDL-1.3-only" => Ok(Self::Gfdl13Only),
            "GFDL-1.3-or-later" => Ok(Self::Gfdl13OrLater),
            "GL2PS" => Ok(Self::Gl2ps),
            "GPL-1.0-only" => Ok(Self::Gpl10Only),
            "GPL-1.0-or-later" => Ok(Self::Gpl10OrLater),
            "GPL-2.0-only" => Ok(Self::Gpl20Only),
            "GPL-2.0-or-later" => Ok(Self::Gpl20OrLater),
            "GPL-3.0-only" => Ok(Self::Gpl30Only),
            "GPL-3.0-or-later" => Ok(Self::Gpl30OrLater),
            "Giftware" => Ok(Self::Giftware),
            "Glide" => Ok(Self::Glide),
            "Glulxe" => Ok(Self::Glulxe),
            "HPND" => Ok(Self::Hpnd),
            "HaskellReport" => Ok(Self::HaskellReport),
            "IBM-pibs" => Ok(Self::IbmPibs),
            "ICU" => Ok(Self::Icu),
            "IJG" => Ok(Self::Ijg),
            "IPA" => Ok(Self::Ipa),
            "IPL-1.0" => Ok(Self::Ipl10),
            "ISC" => Ok(Self::Isc),
            "ImageMagick" => Ok(Self::ImageMagick),
            "Imlib2" => Ok(Self::Imlib2),
            "Info-ZIP" => Ok(Self::InfoZip),
            "Intel" => Ok(Self::Intel),
            "Intel-ACPI" => Ok(Self::IntelAcpi),
            "Interbase-1.0" => Ok(Self::Interbase10),
            "JSON" => Ok(Self::Json),
            "JasPer-2.0" => Ok(Self::JasPer20),
            "LAL-1.2" => Ok(Self::Lal12),
            "LAL-1.3" => Ok(Self::Lal13),
            "LGPL-2.0-only" => Ok(Self::Lgpl20Only),
            "LGPL-2.0-or-later" => Ok(Self::Lgpl20OrLater),
            "LGPL-2.1-only" => Ok(Self::Lgpl21Only),
            "LGPL-2.1-or-later" => Ok(Self::Lgpl21OrLater),
            "LGPL-3.0-only" => Ok(Self::Lgpl30Only),
            "LGPL-3.0-or-later" => Ok(Self::Lgpl30OrLater),
            "LGPLLR" => Ok(Self::Lgpllr),
            "LPL-1.0" => Ok(Self::Lpl10),
            "LPL-1.02" => Ok(Self::Lpl102),
            "LPPL-1.0" => Ok(Self::Lppl10),
            "LPPL-1.1" => Ok(Self::Lppl11),
            "LPPL-1.2" => Ok(Self::Lppl12),
            "LPPL-1.3a" => Ok(Self::Lppl13a),
            "LPPL-1.3c" => Ok(Self::Lppl13c),
            "Latex2e" => Ok(Self::Latex2e),
            "Leptonica" => Ok(Self::Leptonica),
            "LiLiQ-P-1.1" => Ok(Self::LiLiQP11),
            "LiLiQ-R-1.1" => Ok(Self::LiLiQR11),
            "LiLiQ-Rplus-1.1" => Ok(Self::LiLiQRplus11),
            "Libpng" => Ok(Self::Libpng),
            "Linux-OpenIB" => Ok(Self::LinuxOpenIb),
            "MIT" => Ok(Self::Mit),
            "MIT-0" => Ok(Self::Mit0),
            "MIT-CMU" => Ok(Self::MitCmu),
            "MIT-advertising" => Ok(Self::MitAdvertising),
            "MIT-enna" => Ok(Self::MitEnna),
            "MIT-feh" => Ok(Self::MitFeh),
            "MITNFA" => Ok(Self::Mitnfa),
            "MPL-1.0" => Ok(Self::Mpl10),
            "MPL-1.1" => Ok(Self::Mpl11),
            "MPL-2.0" => Ok(Self::Mpl20),
            "MPL-2.0-no-copyleft-exception" => Ok(Self::Mpl20NoCopyleftException),
            "MS-PL" => Ok(Self::MsPl),
            "MS-RL" => Ok(Self::MsRl),
            "MTLL" => Ok(Self::Mtll),
            "MakeIndex" => Ok(Self::MakeIndex),
            "MirOS" => Ok(Self::MirOs),
            "Motosoto" => Ok(Self::Motosoto),
            "Multics" => Ok(Self::Multics),
            "Mup" => Ok(Self::Mup),
            "NASA-1.3" => Ok(Self::Nasa13),
            "NBPL-1.0" => Ok(Self::Nbpl10),
            "NCSA" => Ok(Self::Ncsa),
            "NGPL" => Ok(Self::Ngpl),
            "NLOD-1.0" => Ok(Self::Nlod10),
            "NLPL" => Ok(Self::Nlpl),
            "NOSL" => Ok(Self::Nosl),
            "NPL-1.0" => Ok(Self::Npl10),
            "NPL-1.1" => Ok(Self::Npl11),
            "NPOSL-3.0" => Ok(Self::Nposl30),
            "NRL" => Ok(Self::Nrl),
            "NTP" => Ok(Self::Ntp),
            "Naumen" => Ok(Self::Naumen),
            "Net-SNMP" => Ok(Self::NetSnmp),
            "NetCDF" => Ok(Self::NetCdf),
            "Newsletr" => Ok(Self::Newsletr),
            "Nokia" => Ok(Self::Nokia),
            "Noweb" => Ok(Self::Noweb),
            "OCCT-PL" => Ok(Self::OcctPl),
            "OCLC-2.0" => Ok(Self::Oclc20),
            "ODbL-1.0" => Ok(Self::ODbL10),
            "OFL-1.0" => Ok(Self::Ofl10),
            "OFL-1.1" => Ok(Self::Ofl11),
            "OGTSL" => Ok(Self::Ogtsl),
            "OLDAP-1.1" => Ok(Self::Oldap11),
            "OLDAP-1.2" => Ok(Self::Oldap12),
            "OLDAP-1.3" => Ok(Self::Oldap13),
            "OLDAP-1.4" => Ok(Self::Oldap14),
            "OLDAP-2.0" => Ok(Self::Oldap20),
            "OLDAP-2.0.1" => Ok(Self::Oldap201),
            "OLDAP-2.1" => Ok(Self::Oldap21),
            "OLDAP-2.2" => Ok(Self::Oldap22),
            "OLDAP-2.2.1" => Ok(Self::Oldap221),
            "OLDAP-2.2.2" => Ok(Self::Oldap222),
            "OLDAP-2.3" => Ok(Self::Oldap23),
            "OLDAP-2.4" => Ok(Self::Oldap24),
            "OLDAP-2.5" => Ok(Self::Oldap25),
            "OLDAP-2.6" => Ok(Self::Oldap26),
            "OLDAP-2.7" => Ok(Self::Oldap27),
            "OLDAP-2.8" => Ok(Self::Oldap28),
            "OML" => Ok(Self::Oml),
            "OPL-1.0" => Ok(Self::Opl10),
            "OSET-PL-2.1" => Ok(Self::OsetPl21),
            "OSL-1.0" => Ok(Self::Osl10),
            "OSL-1.1" => Ok(Self::Osl11),
            "OSL-2.0" => Ok(Self::Osl20),
            "OSL-2.1" => Ok(Self::Osl21),
            "OSL-3.0" => Ok(Self::Osl30),
            "OpenSSL" => Ok(Self::OpenSsl),
            "PDDL-1.0" => Ok(Self::Pddl10),
            "PHP-3.0" => Ok(Self::Php30),
            "PHP-3.01" => Ok(Self::Php301),
            "Plexus" => Ok(Self::Plexus),
            "PostgreSQL" => Ok(Self::PostgreSql),
            "Python-2.0" => Ok(Self::Python20),
            "QPL-1.0" => Ok(Self::Qpl10),
            "Qhull" => Ok(Self::Qhull),
            "RHeCos-1.1" => Ok(Self::RHeCos11),
            "RPL-1.1" => Ok(Self::Rpl11),
            "RPL-1.5" => Ok(Self::Rpl15),
            "RPSL-1.0" => Ok(Self::Rpsl10),
            "RSA-MD" => Ok(Self::RsaMd),
            "RSCPL" => Ok(Self::Rscpl),
            "Rdisc" => Ok(Self::Rdisc),
            "Ruby" => Ok(Self::Ruby),
            "SAX-PD" => Ok(Self::SaxPd),
            "SCEA" => Ok(Self::Scea),
            "SGI-B-1.0" => Ok(Self::SgiB10),
            "SGI-B-1.1" => Ok(Self::SgiB11),
            "SGI-B-2.0" => Ok(Self::SgiB20),
            "SISSL" => Ok(Self::Sissl),
            "SISSL-1.2" => Ok(Self::Sissl12),
            "SMLNJ" => Ok(Self::Smlnj),
            "SMPPL" => Ok(Self::Smppl),
            "SNIA" => Ok(Self::Snia),
            "SPL-1.0" => Ok(Self::Spl10),
            "SWL" => Ok(Self::Swl),
            "Saxpath" => Ok(Self::Saxpath),
            "Sendmail" => Ok(Self::Sendmail),
            "SimPL-2.0" => Ok(Self::SimPl20),
            "Sleepycat" => Ok(Self::Sleepycat),
            "Spencer-86" => Ok(Self::Spencer86),
            "Spencer-94" => Ok(Self::Spencer94),
            "Spencer-99" => Ok(Self::Spencer99),
            "SugarCRM-1.1.3" => Ok(Self::SugarCrm113),
            "TCL" => Ok(Self::Tcl),
            "TCP-wrappers" => Ok(Self::TcpWrappers),
            "TMate" => Ok(Self::TMate),
            "TORQUE-1.1" => Ok(Self::Torque11),
            "TOSL" => Ok(Self::Tosl),
            "UPL-1.0" => Ok(Self::Upl10),
            "Unicode-DFS-2015" => Ok(Self::UnicodeDfs2015),
            "Unicode-DFS-2016" => Ok(Self::UnicodeDfs2016),
            "Unicode-TOU" => Ok(Self::UnicodeTou),
            "Unlicense" => Ok(Self::Unlicense),
            "VOSTROM" => Ok(Self::Vostrom),
            "VSL-1.0" => Ok(Self::Vsl10),
            "Vim" => Ok(Self::Vim),
            "W3C" => Ok(Self::W3c),
            "W3C-19980720" => Ok(Self::W3c19980720),
            "W3C-20150513" => Ok(Self::W3c20150513),
            "WTFPL" => Ok(Self::Wtfpl),
            "Watcom-1.0" => Ok(Self::Watcom10),
            "Wsuipa" => Ok(Self::Wsuipa),
            "X11" => Ok(Self::X11),
            "XFree86-1.1" => Ok(Self::XFree8611),
            "XSkat" => Ok(Self::XSkat),
            "Xerox" => Ok(Self::Xerox),
            "Xnet" => Ok(Self::Xnet),
            "YPL-1.0" => Ok(Self::Ypl10),
            "YPL-1.1" => Ok(Self::Ypl11),
            "ZPL-1.1" => Ok(Self::Zpl11),
            "ZPL-2.0" => Ok(Self::Zpl20),
            "ZPL-2.1" => Ok(Self::Zpl21),
            "Zed" => Ok(Self::Zed),
            "Zend-2.0" => Ok(Self::Zend20),
            "Zimbra-1.3" => Ok(Self::Zimbra13),
            "Zimbra-1.4" => Ok(Self::Zimbra14),
            "Zlib" => Ok(Self::Zlib),
            "bzip2-1.0.5" => Ok(Self::Bzip2105),
            "bzip2-1.0.6" => Ok(Self::Bzip2106),
            "curl" => Ok(Self::Curl),
            "diffmark" => Ok(Self::Diffmark),
            "dvipdfm" => Ok(Self::Dvipdfm),
            "eGenix" => Ok(Self::EGenix),
            "gSOAP-1.3b" => Ok(Self::GSoap13b),
            "gnuplot" => Ok(Self::Gnuplot),
            "iMatix" => Ok(Self::IMatix),
            "libtiff" => Ok(Self::Libtiff),
            "mpich2" => Ok(Self::Mpich2),
            "not-open-source" => Ok(Self::NotOpenSource),
            "psfrag" => Ok(Self::Psfrag),
            "psutils" => Ok(Self::Psutils),
            "xinetd" => Ok(Self::Xinetd),
            "xpp" => Ok(Self::Xpp),
            "zlib-acknowledgement" => Ok(Self::ZlibAcknowledgement),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SPDXLicense {
    fn as_ref(&self) -> &str {
        match self {
            Self::N0bsd => "0BSD",
            Self::Aal => "AAL",
            Self::Adsl => "ADSL",
            Self::Afl11 => "AFL-1.1",
            Self::Afl12 => "AFL-1.2",
            Self::Afl20 => "AFL-2.0",
            Self::Afl21 => "AFL-2.1",
            Self::Afl30 => "AFL-3.0",
            Self::Agpl10Only => "AGPL-1.0-only",
            Self::Agpl10OrLater => "AGPL-1.0-or-later",
            Self::Agpl30Only => "AGPL-3.0-only",
            Self::Agpl30OrLater => "AGPL-3.0-or-later",
            Self::Amdplpa => "AMDPLPA",
            Self::Aml => "AML",
            Self::Ampas => "AMPAS",
            Self::AntlrPd => "ANTLR-PD",
            Self::Apafml => "APAFML",
            Self::Apl10 => "APL-1.0",
            Self::Apsl10 => "APSL-1.0",
            Self::Apsl11 => "APSL-1.1",
            Self::Apsl12 => "APSL-1.2",
            Self::Apsl20 => "APSL-2.0",
            Self::Abstyles => "Abstyles",
            Self::Adobe2006 => "Adobe-2006",
            Self::AdobeGlyph => "Adobe-Glyph",
            Self::Afmparse => "Afmparse",
            Self::Aladdin => "Aladdin",
            Self::Apache10 => "Apache-1.0",
            Self::Apache11 => "Apache-1.1",
            Self::Apache20 => "Apache-2.0",
            Self::Artistic10 => "Artistic-1.0",
            Self::Artistic10Perl => "Artistic-1.0-Perl",
            Self::Artistic10Cl8 => "Artistic-1.0-cl8",
            Self::Artistic20 => "Artistic-2.0",
            Self::Bsd1Clause => "BSD-1-Clause",
            Self::Bsd2Clause => "BSD-2-Clause",
            Self::Bsd2ClauseFreeBsd => "BSD-2-Clause-FreeBSD",
            Self::Bsd2ClauseNetBsd => "BSD-2-Clause-NetBSD",
            Self::Bsd2ClausePatent => "BSD-2-Clause-Patent",
            Self::Bsd3Clause => "BSD-3-Clause",
            Self::Bsd3ClauseAttribution => "BSD-3-Clause-Attribution",
            Self::Bsd3ClauseClear => "BSD-3-Clause-Clear",
            Self::Bsd3ClauseLbnl => "BSD-3-Clause-LBNL",
            Self::Bsd3ClauseNoNuclearLicense => "BSD-3-Clause-No-Nuclear-License",
            Self::Bsd3ClauseNoNuclearLicense2014 => {
                "BSD-3-Clause-No-Nuclear-License-2014"
            }
            Self::Bsd3ClauseNoNuclearWarranty => "BSD-3-Clause-No-Nuclear-Warranty",
            Self::Bsd4Clause => "BSD-4-Clause",
            Self::Bsd4ClauseUc => "BSD-4-Clause-UC",
            Self::BsdProtection => "BSD-Protection",
            Self::BsdSourceCode => "BSD-Source-Code",
            Self::Bsl10 => "BSL-1.0",
            Self::Bahyph => "Bahyph",
            Self::Barr => "Barr",
            Self::Beerware => "Beerware",
            Self::BitTorrent10 => "BitTorrent-1.0",
            Self::BitTorrent11 => "BitTorrent-1.1",
            Self::Borceux => "Borceux",
            Self::Catosl11 => "CATOSL-1.1",
            Self::CcBy10 => "CC-BY-1.0",
            Self::CcBy20 => "CC-BY-2.0",
            Self::CcBy25 => "CC-BY-2.5",
            Self::CcBy30 => "CC-BY-3.0",
            Self::CcBy40 => "CC-BY-4.0",
            Self::CcByNc10 => "CC-BY-NC-1.0",
            Self::CcByNc20 => "CC-BY-NC-2.0",
            Self::CcByNc25 => "CC-BY-NC-2.5",
            Self::CcByNc30 => "CC-BY-NC-3.0",
            Self::CcByNc40 => "CC-BY-NC-4.0",
            Self::CcByNcNd10 => "CC-BY-NC-ND-1.0",
            Self::CcByNcNd20 => "CC-BY-NC-ND-2.0",
            Self::CcByNcNd25 => "CC-BY-NC-ND-2.5",
            Self::CcByNcNd30 => "CC-BY-NC-ND-3.0",
            Self::CcByNcNd40 => "CC-BY-NC-ND-4.0",
            Self::CcByNcSa10 => "CC-BY-NC-SA-1.0",
            Self::CcByNcSa20 => "CC-BY-NC-SA-2.0",
            Self::CcByNcSa25 => "CC-BY-NC-SA-2.5",
            Self::CcByNcSa30 => "CC-BY-NC-SA-3.0",
            Self::CcByNcSa40 => "CC-BY-NC-SA-4.0",
            Self::CcByNd10 => "CC-BY-ND-1.0",
            Self::CcByNd20 => "CC-BY-ND-2.0",
            Self::CcByNd25 => "CC-BY-ND-2.5",
            Self::CcByNd30 => "CC-BY-ND-3.0",
            Self::CcByNd40 => "CC-BY-ND-4.0",
            Self::CcBySa10 => "CC-BY-SA-1.0",
            Self::CcBySa20 => "CC-BY-SA-2.0",
            Self::CcBySa25 => "CC-BY-SA-2.5",
            Self::CcBySa30 => "CC-BY-SA-3.0",
            Self::CcBySa40 => "CC-BY-SA-4.0",
            Self::Cc010 => "CC0-1.0",
            Self::Cddl10 => "CDDL-1.0",
            Self::Cddl11 => "CDDL-1.1",
            Self::CdlaPermissive10 => "CDLA-Permissive-1.0",
            Self::CdlaSharing10 => "CDLA-Sharing-1.0",
            Self::Cecill10 => "CECILL-1.0",
            Self::Cecill11 => "CECILL-1.1",
            Self::Cecill20 => "CECILL-2.0",
            Self::Cecill21 => "CECILL-2.1",
            Self::CecillB => "CECILL-B",
            Self::CecillC => "CECILL-C",
            Self::CnriJython => "CNRI-Jython",
            Self::CnriPython => "CNRI-Python",
            Self::CnriPythonGplCompatible => "CNRI-Python-GPL-Compatible",
            Self::Cpal10 => "CPAL-1.0",
            Self::Cpl10 => "CPL-1.0",
            Self::Cpol102 => "CPOL-1.02",
            Self::CuaOpl10 => "CUA-OPL-1.0",
            Self::Caldera => "Caldera",
            Self::ClArtistic => "ClArtistic",
            Self::Condor11 => "Condor-1.1",
            Self::Crossword => "Crossword",
            Self::CrystalStacker => "CrystalStacker",
            Self::Cube => "Cube",
            Self::DFsl10 => "D-FSL-1.0",
            Self::Doc => "DOC",
            Self::Dsdp => "DSDP",
            Self::Dotseqn => "Dotseqn",
            Self::Ecl10 => "ECL-1.0",
            Self::Ecl20 => "ECL-2.0",
            Self::Efl10 => "EFL-1.0",
            Self::Efl20 => "EFL-2.0",
            Self::Epl10 => "EPL-1.0",
            Self::Epl20 => "EPL-2.0",
            Self::EuDatagrid => "EUDatagrid",
            Self::Eupl10 => "EUPL-1.0",
            Self::Eupl11 => "EUPL-1.1",
            Self::Eupl12 => "EUPL-1.2",
            Self::Entessa => "Entessa",
            Self::ErlPl11 => "ErlPL-1.1",
            Self::Eurosym => "Eurosym",
            Self::Fsfap => "FSFAP",
            Self::Fsful => "FSFUL",
            Self::Fsfullr => "FSFULLR",
            Self::Ftl => "FTL",
            Self::Fair => "Fair",
            Self::Frameworx10 => "Frameworx-1.0",
            Self::FreeImage => "FreeImage",
            Self::Gfdl11Only => "GFDL-1.1-only",
            Self::Gfdl11OrLater => "GFDL-1.1-or-later",
            Self::Gfdl12Only => "GFDL-1.2-only",
            Self::Gfdl12OrLater => "GFDL-1.2-or-later",
            Self::Gfdl13Only => "GFDL-1.3-only",
            Self::Gfdl13OrLater => "GFDL-1.3-or-later",
            Self::Gl2ps => "GL2PS",
            Self::Gpl10Only => "GPL-1.0-only",
            Self::Gpl10OrLater => "GPL-1.0-or-later",
            Self::Gpl20Only => "GPL-2.0-only",
            Self::Gpl20OrLater => "GPL-2.0-or-later",
            Self::Gpl30Only => "GPL-3.0-only",
            Self::Gpl30OrLater => "GPL-3.0-or-later",
            Self::Giftware => "Giftware",
            Self::Glide => "Glide",
            Self::Glulxe => "Glulxe",
            Self::Hpnd => "HPND",
            Self::HaskellReport => "HaskellReport",
            Self::IbmPibs => "IBM-pibs",
            Self::Icu => "ICU",
            Self::Ijg => "IJG",
            Self::Ipa => "IPA",
            Self::Ipl10 => "IPL-1.0",
            Self::Isc => "ISC",
            Self::ImageMagick => "ImageMagick",
            Self::Imlib2 => "Imlib2",
            Self::InfoZip => "Info-ZIP",
            Self::Intel => "Intel",
            Self::IntelAcpi => "Intel-ACPI",
            Self::Interbase10 => "Interbase-1.0",
            Self::Json => "JSON",
            Self::JasPer20 => "JasPer-2.0",
            Self::Lal12 => "LAL-1.2",
            Self::Lal13 => "LAL-1.3",
            Self::Lgpl20Only => "LGPL-2.0-only",
            Self::Lgpl20OrLater => "LGPL-2.0-or-later",
            Self::Lgpl21Only => "LGPL-2.1-only",
            Self::Lgpl21OrLater => "LGPL-2.1-or-later",
            Self::Lgpl30Only => "LGPL-3.0-only",
            Self::Lgpl30OrLater => "LGPL-3.0-or-later",
            Self::Lgpllr => "LGPLLR",
            Self::Lpl10 => "LPL-1.0",
            Self::Lpl102 => "LPL-1.02",
            Self::Lppl10 => "LPPL-1.0",
            Self::Lppl11 => "LPPL-1.1",
            Self::Lppl12 => "LPPL-1.2",
            Self::Lppl13a => "LPPL-1.3a",
            Self::Lppl13c => "LPPL-1.3c",
            Self::Latex2e => "Latex2e",
            Self::Leptonica => "Leptonica",
            Self::LiLiQP11 => "LiLiQ-P-1.1",
            Self::LiLiQR11 => "LiLiQ-R-1.1",
            Self::LiLiQRplus11 => "LiLiQ-Rplus-1.1",
            Self::Libpng => "Libpng",
            Self::LinuxOpenIb => "Linux-OpenIB",
            Self::Mit => "MIT",
            Self::Mit0 => "MIT-0",
            Self::MitCmu => "MIT-CMU",
            Self::MitAdvertising => "MIT-advertising",
            Self::MitEnna => "MIT-enna",
            Self::MitFeh => "MIT-feh",
            Self::Mitnfa => "MITNFA",
            Self::Mpl10 => "MPL-1.0",
            Self::Mpl11 => "MPL-1.1",
            Self::Mpl20 => "MPL-2.0",
            Self::Mpl20NoCopyleftException => "MPL-2.0-no-copyleft-exception",
            Self::MsPl => "MS-PL",
            Self::MsRl => "MS-RL",
            Self::Mtll => "MTLL",
            Self::MakeIndex => "MakeIndex",
            Self::MirOs => "MirOS",
            Self::Motosoto => "Motosoto",
            Self::Multics => "Multics",
            Self::Mup => "Mup",
            Self::Nasa13 => "NASA-1.3",
            Self::Nbpl10 => "NBPL-1.0",
            Self::Ncsa => "NCSA",
            Self::Ngpl => "NGPL",
            Self::Nlod10 => "NLOD-1.0",
            Self::Nlpl => "NLPL",
            Self::Nosl => "NOSL",
            Self::Npl10 => "NPL-1.0",
            Self::Npl11 => "NPL-1.1",
            Self::Nposl30 => "NPOSL-3.0",
            Self::Nrl => "NRL",
            Self::Ntp => "NTP",
            Self::Naumen => "Naumen",
            Self::NetSnmp => "Net-SNMP",
            Self::NetCdf => "NetCDF",
            Self::Newsletr => "Newsletr",
            Self::Nokia => "Nokia",
            Self::Noweb => "Noweb",
            Self::OcctPl => "OCCT-PL",
            Self::Oclc20 => "OCLC-2.0",
            Self::ODbL10 => "ODbL-1.0",
            Self::Ofl10 => "OFL-1.0",
            Self::Ofl11 => "OFL-1.1",
            Self::Ogtsl => "OGTSL",
            Self::Oldap11 => "OLDAP-1.1",
            Self::Oldap12 => "OLDAP-1.2",
            Self::Oldap13 => "OLDAP-1.3",
            Self::Oldap14 => "OLDAP-1.4",
            Self::Oldap20 => "OLDAP-2.0",
            Self::Oldap201 => "OLDAP-2.0.1",
            Self::Oldap21 => "OLDAP-2.1",
            Self::Oldap22 => "OLDAP-2.2",
            Self::Oldap221 => "OLDAP-2.2.1",
            Self::Oldap222 => "OLDAP-2.2.2",
            Self::Oldap23 => "OLDAP-2.3",
            Self::Oldap24 => "OLDAP-2.4",
            Self::Oldap25 => "OLDAP-2.5",
            Self::Oldap26 => "OLDAP-2.6",
            Self::Oldap27 => "OLDAP-2.7",
            Self::Oldap28 => "OLDAP-2.8",
            Self::Oml => "OML",
            Self::Opl10 => "OPL-1.0",
            Self::OsetPl21 => "OSET-PL-2.1",
            Self::Osl10 => "OSL-1.0",
            Self::Osl11 => "OSL-1.1",
            Self::Osl20 => "OSL-2.0",
            Self::Osl21 => "OSL-2.1",
            Self::Osl30 => "OSL-3.0",
            Self::OpenSsl => "OpenSSL",
            Self::Pddl10 => "PDDL-1.0",
            Self::Php30 => "PHP-3.0",
            Self::Php301 => "PHP-3.01",
            Self::Plexus => "Plexus",
            Self::PostgreSql => "PostgreSQL",
            Self::Python20 => "Python-2.0",
            Self::Qpl10 => "QPL-1.0",
            Self::Qhull => "Qhull",
            Self::RHeCos11 => "RHeCos-1.1",
            Self::Rpl11 => "RPL-1.1",
            Self::Rpl15 => "RPL-1.5",
            Self::Rpsl10 => "RPSL-1.0",
            Self::RsaMd => "RSA-MD",
            Self::Rscpl => "RSCPL",
            Self::Rdisc => "Rdisc",
            Self::Ruby => "Ruby",
            Self::SaxPd => "SAX-PD",
            Self::Scea => "SCEA",
            Self::SgiB10 => "SGI-B-1.0",
            Self::SgiB11 => "SGI-B-1.1",
            Self::SgiB20 => "SGI-B-2.0",
            Self::Sissl => "SISSL",
            Self::Sissl12 => "SISSL-1.2",
            Self::Smlnj => "SMLNJ",
            Self::Smppl => "SMPPL",
            Self::Snia => "SNIA",
            Self::Spl10 => "SPL-1.0",
            Self::Swl => "SWL",
            Self::Saxpath => "Saxpath",
            Self::Sendmail => "Sendmail",
            Self::SimPl20 => "SimPL-2.0",
            Self::Sleepycat => "Sleepycat",
            Self::Spencer86 => "Spencer-86",
            Self::Spencer94 => "Spencer-94",
            Self::Spencer99 => "Spencer-99",
            Self::SugarCrm113 => "SugarCRM-1.1.3",
            Self::Tcl => "TCL",
            Self::TcpWrappers => "TCP-wrappers",
            Self::TMate => "TMate",
            Self::Torque11 => "TORQUE-1.1",
            Self::Tosl => "TOSL",
            Self::Upl10 => "UPL-1.0",
            Self::UnicodeDfs2015 => "Unicode-DFS-2015",
            Self::UnicodeDfs2016 => "Unicode-DFS-2016",
            Self::UnicodeTou => "Unicode-TOU",
            Self::Unlicense => "Unlicense",
            Self::Vostrom => "VOSTROM",
            Self::Vsl10 => "VSL-1.0",
            Self::Vim => "Vim",
            Self::W3c => "W3C",
            Self::W3c19980720 => "W3C-19980720",
            Self::W3c20150513 => "W3C-20150513",
            Self::Wtfpl => "WTFPL",
            Self::Watcom10 => "Watcom-1.0",
            Self::Wsuipa => "Wsuipa",
            Self::X11 => "X11",
            Self::XFree8611 => "XFree86-1.1",
            Self::XSkat => "XSkat",
            Self::Xerox => "Xerox",
            Self::Xnet => "Xnet",
            Self::Ypl10 => "YPL-1.0",
            Self::Ypl11 => "YPL-1.1",
            Self::Zpl11 => "ZPL-1.1",
            Self::Zpl20 => "ZPL-2.0",
            Self::Zpl21 => "ZPL-2.1",
            Self::Zed => "Zed",
            Self::Zend20 => "Zend-2.0",
            Self::Zimbra13 => "Zimbra-1.3",
            Self::Zimbra14 => "Zimbra-1.4",
            Self::Zlib => "Zlib",
            Self::Bzip2105 => "bzip2-1.0.5",
            Self::Bzip2106 => "bzip2-1.0.6",
            Self::Curl => "curl",
            Self::Diffmark => "diffmark",
            Self::Dvipdfm => "dvipdfm",
            Self::EGenix => "eGenix",
            Self::GSoap13b => "gSOAP-1.3b",
            Self::Gnuplot => "gnuplot",
            Self::IMatix => "iMatix",
            Self::Libtiff => "libtiff",
            Self::Mpich2 => "mpich2",
            Self::NotOpenSource => "not-open-source",
            Self::Psfrag => "psfrag",
            Self::Psutils => "psutils",
            Self::Xinetd => "xinetd",
            Self::Xpp => "xpp",
            Self::ZlibAcknowledgement => "zlib-acknowledgement",
        }
    }
}
impl ::std::fmt::Debug for SPDXLicense {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SPDXLicense {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SPDXLicense {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SPDXLicense {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SPDXLicense> for Coding {
    fn from(code: SPDXLicense) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/spdx-license".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SPDXLicense> for CodeableConcept {
    fn from(code: SPDXLicense) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SampleSecurityStructuralRoles](http://hl7.org/fhir/sample-security-structural-roles)**. This codeSystem contains example structural roles. In general, two types of roles can be distinguished: structural roles and functional roles. Structural Roles reflect human or organizational categories (hierarchies), and describe prerequisites, feasibilities, or competences for actions. Functional roles are bound to the realization or performance of actions..\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum SampleSecurityStructuralRoles {
    /** **business-manager**

Business Manager. */
    BusinessManager,
    /** **claims-adjudicator**

Claims Adjudicator. */
    ClaimsAdjudicator,
    /** **dentist**

Dentist. The specialty relating to the function and diseases of the teeth, mouth, and gums. */
    Dentist,
    /** **dietician**

Dietician. The health profession concerned with the practical application of diet in the prophylaxis and treatment of disease. */
    Dietician,
    /** **general-medicine**

General Medicine. The branch of medicine involving the study and treatment of general diseases or those affecting the internal parts of the body, especially those not usually requiring surgical intervention */
    GeneralMedicine,
    /** **general-nursing**

General Nursing. The branch of healthcare concerned with caring for the sick or injured in any environment. */
    GeneralNursing,
    /** **non-regulated-health-professionals**

Non-Regulated health Professionals. person employed by a healthcare organization who is not a health professional */
    NonRegulatedHealthProfessionals,
    /** **pediatrics**

Pediatrics. The medical specialty concerned with the study of treatment of children in health and disease during development from birth through adolescence. */
    Pediatrics,
    /** **pharmacy**

Pharmacy. The branch of medical science that deals with drugs and their uses. */
    Pharmacy,
    /** **receptionist**

Receptionist. */
    Receptionist,
    /** **regulated-health-professionals**

Regulated Health Professionals. A person who is authorized by a national recognized body to be qualified to perform health services */
    RegulatedHealthProfessionals,
    /** **transcriptionist**

Transcriptionist. */
    Transcriptionist,
    /** **veterinarian**

Veterinarian. The specialty relating to non-human subjects. */
    Veterinarian,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for SampleSecurityStructuralRoles {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "business-manager" => Ok(Self::BusinessManager),
            "claims-adjudicator" => Ok(Self::ClaimsAdjudicator),
            "dentist" => Ok(Self::Dentist),
            "dietician" => Ok(Self::Dietician),
            "general-medicine" => Ok(Self::GeneralMedicine),
            "general-nursing" => Ok(Self::GeneralNursing),
            "non-regulated-health-professionals" => {
                Ok(Self::NonRegulatedHealthProfessionals)
            }
            "pediatrics" => Ok(Self::Pediatrics),
            "pharmacy" => Ok(Self::Pharmacy),
            "receptionist" => Ok(Self::Receptionist),
            "regulated-health-professionals" => Ok(Self::RegulatedHealthProfessionals),
            "transcriptionist" => Ok(Self::Transcriptionist),
            "veterinarian" => Ok(Self::Veterinarian),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for SampleSecurityStructuralRoles {
    fn as_ref(&self) -> &str {
        match self {
            Self::BusinessManager => "business-manager",
            Self::ClaimsAdjudicator => "claims-adjudicator",
            Self::Dentist => "dentist",
            Self::Dietician => "dietician",
            Self::GeneralMedicine => "general-medicine",
            Self::GeneralNursing => "general-nursing",
            Self::NonRegulatedHealthProfessionals => "non-regulated-health-professionals",
            Self::Pediatrics => "pediatrics",
            Self::Pharmacy => "pharmacy",
            Self::Receptionist => "receptionist",
            Self::RegulatedHealthProfessionals => "regulated-health-professionals",
            Self::Transcriptionist => "transcriptionist",
            Self::Veterinarian => "veterinarian",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for SampleSecurityStructuralRoles {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SampleSecurityStructuralRoles {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SampleSecurityStructuralRoles {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SampleSecurityStructuralRoles {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SampleSecurityStructuralRoles> for Coding {
    fn from(code: SampleSecurityStructuralRoles) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/sample-security-structural-roles".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SampleSecurityStructuralRoles> for CodeableConcept {
    fn from(code: SampleSecurityStructuralRoles) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SearchComparator](http://hl7.org/fhir/ValueSet/search-comparator)**. What Search Comparator Codes are supported in search.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SearchComparator {
    /** **ap**

Approximately. the value for the parameter in the resource is approximately the same to the provided value. */
    Ap,
    /** **eb**

Ends Before. the value for the parameter in the resource ends before the provided value. */
    Eb,
    /** **eq**

Equals. the value for the parameter in the resource is equal to the provided value. */
    Eq,
    /** **ge**

Greater or Equals. the value for the parameter in the resource is greater or equal to the provided value. */
    Ge,
    /** **gt**

Greater Than. the value for the parameter in the resource is greater than the provided value. */
    Gt,
    /** **le**

Less of Equal. the value for the parameter in the resource is less or equal to the provided value. */
    Le,
    /** **lt**

Less Than. the value for the parameter in the resource is less than the provided value. */
    Lt,
    /** **ne**

Not Equals. the value for the parameter in the resource is not equal to the provided value. */
    Ne,
    /** **sa**

Starts After. the value for the parameter in the resource starts after the provided value. */
    Sa,
}
impl ::core::str::FromStr for SearchComparator {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ap" => Ok(Self::Ap),
            "eb" => Ok(Self::Eb),
            "eq" => Ok(Self::Eq),
            "ge" => Ok(Self::Ge),
            "gt" => Ok(Self::Gt),
            "le" => Ok(Self::Le),
            "lt" => Ok(Self::Lt),
            "ne" => Ok(Self::Ne),
            "sa" => Ok(Self::Sa),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SearchComparator {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ap => "ap",
            Self::Eb => "eb",
            Self::Eq => "eq",
            Self::Ge => "ge",
            Self::Gt => "gt",
            Self::Le => "le",
            Self::Lt => "lt",
            Self::Ne => "ne",
            Self::Sa => "sa",
        }
    }
}
impl ::std::fmt::Debug for SearchComparator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SearchComparator {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SearchComparator {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SearchComparator {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SearchComparator> for Coding {
    fn from(code: SearchComparator) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/search-comparator".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SearchComparator> for CodeableConcept {
    fn from(code: SearchComparator) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SearchEntryMode](http://hl7.org/fhir/ValueSet/search-entry-mode)**. Why an entry is in the result set - whether it's included as a match or because of an _include requirement, or to convey information or warning information about the search process.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SearchEntryMode {
    /** **include**

Include. This resource is returned because it is referred to from another resource in the search set. */
    Include,
    /** **match**

Match. This resource matched the search specification. */
    Match,
    /** **outcome**

Outcome. An OperationOutcome that provides additional information about the processing of a search. */
    Outcome,
}
impl ::core::str::FromStr for SearchEntryMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "include" => Ok(Self::Include),
            "match" => Ok(Self::Match),
            "outcome" => Ok(Self::Outcome),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SearchEntryMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Include => "include",
            Self::Match => "match",
            Self::Outcome => "outcome",
        }
    }
}
impl ::std::fmt::Debug for SearchEntryMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SearchEntryMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SearchEntryMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SearchEntryMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SearchEntryMode> for Coding {
    fn from(code: SearchEntryMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/search-entry-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SearchEntryMode> for CodeableConcept {
    fn from(code: SearchEntryMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SearchModifierCode](http://hl7.org/fhir/ValueSet/search-modifier-code)**. A supported modifier for a search parameter.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SearchModifierCode {
    /** **above**

Above. The search parameter tests whether the value in a resource subsumes the specified value (is-a, or hierarchical relationships). */
    Above,
    /** **below**

Below. The search parameter tests whether the value in a resource is subsumed by the specified value (is-a, or hierarchical relationships). */
    Below,
    /** **code-text**

Code Text. Tests whether the textual display value in a resource (e.g., CodeableConcept.text, Coding.display, or Reference.display) matches the supplied parameter value. */
    CodeText,
    /** **contains**

Contains. The search parameter returns resources that include the supplied parameter value anywhere within the field being searched. */
    Contains,
    /** **exact**

Exact. The search parameter returns resources that have a value that exactly matches the supplied parameter (the whole string, including casing and accents). */
    Exact,
    /** **identifier**

Identifier. The search parameter applies to the identifier on the resource, not the reference. */
    Identifier,
    /** **in**

In. The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is in the specified value set. */
    In,
    /** **iterate**

Iterate. The search parameter indicates an inclusion directive (_include, _revinclude) that is applied to an included resource instead of the matching resource. */
    Iterate,
    /** **missing**

Missing. The search parameter returns resources that have a value or not. */
    Missing,
    /** **not**

Not. The search parameter returns resources that do not contain a match. */
    Not,
    /** **not-in**

Not In. The search parameter is a URI (relative or absolute) that identifies a value set, and the search parameter tests whether the coding is not in the specified value set. */
    NotIn,
    /** **of-type**

Of Type. The search parameter has the format system|code|value, where the system and code refer to an Identifier.type.coding.system and .code, and match if any of the type codes match. All 3 parts must be present. */
    OfType,
    /** **text**

Text. The search parameter is processed as a string that searches text associated with the code/value - either CodeableConcept.text, Coding.display, Identifier.type.text, or Reference.display. */
    Text,
    /** **text-advanced**

Text Advanced. Tests whether the value in a resource matches the supplied parameter value using advanced text handling that searches text associated with the code/value - e.g., CodeableConcept.text, Coding.display, or Identifier.type.text. */
    TextAdvanced,
    /** **type**

Type. The search parameter only applies to the Resource Type specified as a modifier (e.g. the modifier is not actually :type, but :Patient etc.). */
    Type,
}
impl ::core::str::FromStr for SearchModifierCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "above" => Ok(Self::Above),
            "below" => Ok(Self::Below),
            "code-text" => Ok(Self::CodeText),
            "contains" => Ok(Self::Contains),
            "exact" => Ok(Self::Exact),
            "identifier" => Ok(Self::Identifier),
            "in" => Ok(Self::In),
            "iterate" => Ok(Self::Iterate),
            "missing" => Ok(Self::Missing),
            "not" => Ok(Self::Not),
            "not-in" => Ok(Self::NotIn),
            "of-type" => Ok(Self::OfType),
            "text" => Ok(Self::Text),
            "text-advanced" => Ok(Self::TextAdvanced),
            "type" => Ok(Self::Type),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SearchModifierCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Above => "above",
            Self::Below => "below",
            Self::CodeText => "code-text",
            Self::Contains => "contains",
            Self::Exact => "exact",
            Self::Identifier => "identifier",
            Self::In => "in",
            Self::Iterate => "iterate",
            Self::Missing => "missing",
            Self::Not => "not",
            Self::NotIn => "not-in",
            Self::OfType => "of-type",
            Self::Text => "text",
            Self::TextAdvanced => "text-advanced",
            Self::Type => "type",
        }
    }
}
impl ::std::fmt::Debug for SearchModifierCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SearchModifierCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SearchModifierCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SearchModifierCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SearchModifierCode> for Coding {
    fn from(code: SearchModifierCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/search-modifier-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SearchModifierCode> for CodeableConcept {
    fn from(code: SearchModifierCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SearchParamType](http://hl7.org/fhir/ValueSet/search-param-type)**. Data types allowed to be used for search parameters.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SearchParamType {
    /** **composite**

Composite. A composite search parameter that combines a search on two values together. */
    Composite,
    /** **date**

Date/DateTime. Search parameter is on a date/time. The date format is the standard XML format, though other formats may be supported. */
    Date,
    /** **number**

Number. Search parameter SHALL be a number (a whole number, or a decimal). */
    Number,
    /** **quantity**

Quantity. A search parameter that searches on a quantity. */
    Quantity,
    /** **reference**

Reference. A reference to another resource (Reference or canonical). */
    Reference,
    /** **special**

Special. Special logic applies to this parameter per the description of the search parameter. */
    Special,
    /** **string**

String. Search parameter is a simple string, like a name part. Search is case-insensitive and accent-insensitive. May match just the start of a string. String parameters may contain spaces. */
    String,
    /** **token**

Token. Search parameter on a coded element or identifier. May be used to search through the text, display, code and code/codesystem (for codes) and label, system and key (for identifier). Its value is either a string or a pair of namespace and value, separated by a "|", depending on the modifier used. */
    Token,
    /** **uri**

URI. A search parameter that searches on a URI (RFC 3986). */
    Uri,
}
impl ::core::str::FromStr for SearchParamType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "composite" => Ok(Self::Composite),
            "date" => Ok(Self::Date),
            "number" => Ok(Self::Number),
            "quantity" => Ok(Self::Quantity),
            "reference" => Ok(Self::Reference),
            "special" => Ok(Self::Special),
            "string" => Ok(Self::String),
            "token" => Ok(Self::Token),
            "uri" => Ok(Self::Uri),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SearchParamType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Composite => "composite",
            Self::Date => "date",
            Self::Number => "number",
            Self::Quantity => "quantity",
            Self::Reference => "reference",
            Self::Special => "special",
            Self::String => "string",
            Self::Token => "token",
            Self::Uri => "uri",
        }
    }
}
impl ::std::fmt::Debug for SearchParamType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SearchParamType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SearchParamType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SearchParamType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SearchParamType> for Coding {
    fn from(code: SearchParamType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/search-param-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SearchParamType> for CodeableConcept {
    fn from(code: SearchParamType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SearchProcessingModeType](http://hl7.org/fhir/ValueSet/search-processingmode)**. How a search parameter relates to the set of elements returned by evaluating its expression query.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SearchProcessingModeType {
    /** **normal**

Normal. The search parameter is derived directly from the selected nodes based on the type definitions. */
    Normal,
    /** **other**

Other. The interpretation of the xpath statement is unknown (and can't be automated). */
    Other,
    /** **phonetic**

Phonetic. The search parameter is derived by a phonetic transform from the selected nodes. */
    Phonetic,
}
impl ::core::str::FromStr for SearchProcessingModeType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "normal" => Ok(Self::Normal),
            "other" => Ok(Self::Other),
            "phonetic" => Ok(Self::Phonetic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SearchProcessingModeType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Normal => "normal",
            Self::Other => "other",
            Self::Phonetic => "phonetic",
        }
    }
}
impl ::std::fmt::Debug for SearchProcessingModeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SearchProcessingModeType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SearchProcessingModeType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SearchProcessingModeType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SearchProcessingModeType> for Coding {
    fn from(code: SearchProcessingModeType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/search-processingmode".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SearchProcessingModeType> for CodeableConcept {
    fn from(code: SearchProcessingModeType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SequenceType](http://hl7.org/fhir/ValueSet/sequence-type)**. Type if a sequence -- DNA, RNA, or amino acid sequence.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SequenceType {
    /** **aa**

AA Sequence. Amino acid sequence. */
    Aa,
    /** **dna**

DNA Sequence. DNA Sequence. */
    Dna,
    /** **rna**

RNA Sequence. RNA Sequence. */
    Rna,
}
impl ::core::str::FromStr for SequenceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "aa" => Ok(Self::Aa),
            "dna" => Ok(Self::Dna),
            "rna" => Ok(Self::Rna),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SequenceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Aa => "aa",
            Self::Dna => "dna",
            Self::Rna => "rna",
        }
    }
}
impl ::std::fmt::Debug for SequenceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SequenceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SequenceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SequenceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SequenceType> for Coding {
    fn from(code: SequenceType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/sequence-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SequenceType> for CodeableConcept {
    fn from(code: SequenceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ServiceMode](http://hl7.org/fhir/ValueSet/service-mode)**. An example set of Service Modes that could be applicable to use to characterize HealthcareServices or PractitionerRoles while searching\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ServiceMode {
    /** **chat**

Chat/Messaging. This service will be provided via a realtime chat/messaging conversation */
    Chat,
    /** **in-person**

In Person. The service will be provided in person */
    InPerson,
    /** **telephone**

Telephone. The service will be provided by a teleconferencing facility or regular telephone */
    Telephone,
    /** **videoconference**

Video Conference. The service will be provided over a video-conference facility */
    Videoconference,
}
impl ::core::str::FromStr for ServiceMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "chat" => Ok(Self::Chat),
            "in-person" => Ok(Self::InPerson),
            "telephone" => Ok(Self::Telephone),
            "videoconference" => Ok(Self::Videoconference),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ServiceMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Chat => "chat",
            Self::InPerson => "in-person",
            Self::Telephone => "telephone",
            Self::Videoconference => "videoconference",
        }
    }
}
impl ::std::fmt::Debug for ServiceMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ServiceMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ServiceMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ServiceMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ServiceMode> for Coding {
    fn from(code: ServiceMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/service-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ServiceMode> for CodeableConcept {
    fn from(code: ServiceMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[ServiceRequestOrderDetailParameterCode](http://hl7.org/fhir/ValueSet/servicerequest-orderdetail-parameter-code)**. Codes providing the parameter codes for service request details.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum ServiceRequestOrderDetailParameterCode {
    /** **body-elevation**

Body Elevation. Describes elevation instructions. */
    BodyElevation,
    /** **catheter-insertion**

Catheter Insertion. Describes insertion instructions. */
    CatheterInsertion,
    /** **device-configuration**

Device Configuration. Describes configuration details */
    DeviceConfiguration,
    /** **device-settings**

Device Settings. Describes setting details. */
    DeviceSettings,
}
impl ::core::str::FromStr for ServiceRequestOrderDetailParameterCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "body-elevation" => Ok(Self::BodyElevation),
            "catheter-insertion" => Ok(Self::CatheterInsertion),
            "device-configuration" => Ok(Self::DeviceConfiguration),
            "device-settings" => Ok(Self::DeviceSettings),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for ServiceRequestOrderDetailParameterCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::BodyElevation => "body-elevation",
            Self::CatheterInsertion => "catheter-insertion",
            Self::DeviceConfiguration => "device-configuration",
            Self::DeviceSettings => "device-settings",
        }
    }
}
impl ::std::fmt::Debug for ServiceRequestOrderDetailParameterCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for ServiceRequestOrderDetailParameterCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for ServiceRequestOrderDetailParameterCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for ServiceRequestOrderDetailParameterCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<ServiceRequestOrderDetailParameterCode> for Coding {
    fn from(code: ServiceRequestOrderDetailParameterCode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/servicerequest-orderdetail-parameter-code"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<ServiceRequestOrderDetailParameterCode> for CodeableConcept {
    fn from(code: ServiceRequestOrderDetailParameterCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SlicingRules](http://hl7.org/fhir/ValueSet/resource-slicing-rules)**. How slices are interpreted when evaluating an instance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SlicingRules {
    /** **closed**

Closed. No additional content is allowed other than that described by the slices in this profile. */
    Closed,
    /** **open**

Open. Additional content is allowed anywhere in the list. */
    Open,
    /** **openAtEnd**

Open at End. Additional content is allowed, but only at the end of the list. Note that using this requires that the slices be ordered, which makes it hard to share uses. This should only be done where absolutely required. */
    OpenAtEnd,
}
impl ::core::str::FromStr for SlicingRules {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "closed" => Ok(Self::Closed),
            "open" => Ok(Self::Open),
            "openAtEnd" => Ok(Self::OpenAtEnd),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SlicingRules {
    fn as_ref(&self) -> &str {
        match self {
            Self::Closed => "closed",
            Self::Open => "open",
            Self::OpenAtEnd => "openAtEnd",
        }
    }
}
impl ::std::fmt::Debug for SlicingRules {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SlicingRules {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SlicingRules {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SlicingRules {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SlicingRules> for Coding {
    fn from(code: SlicingRules) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/resource-slicing-rules".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SlicingRules> for CodeableConcept {
    fn from(code: SlicingRules) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SlotStatus](http://hl7.org/fhir/ValueSet/slotstatus)**. The free/busy status of the slot.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SlotStatus {
    /** **busy**

Busy. Indicates that the time interval is busy because one  or more events have been scheduled for that interval. */
    Busy,
    /** **busy-tentative**

Busy (Tentative). Indicates that the time interval is busy because one or more events have been tentatively scheduled for that interval. */
    BusyTentative,
    /** **busy-unavailable**

Busy (Unavailable). Indicates that the time interval is busy and that the interval cannot be scheduled. */
    BusyUnavailable,
    /** **entered-in-error**

Entered in error. This instance should not have been part of this patient's medical record. */
    EnteredInError,
    /** **free**

Free. Indicates that the time interval is free for scheduling. */
    Free,
}
impl ::core::str::FromStr for SlotStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "busy" => Ok(Self::Busy),
            "busy-tentative" => Ok(Self::BusyTentative),
            "busy-unavailable" => Ok(Self::BusyUnavailable),
            "entered-in-error" => Ok(Self::EnteredInError),
            "free" => Ok(Self::Free),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SlotStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Busy => "busy",
            Self::BusyTentative => "busy-tentative",
            Self::BusyUnavailable => "busy-unavailable",
            Self::EnteredInError => "entered-in-error",
            Self::Free => "free",
        }
    }
}
impl ::std::fmt::Debug for SlotStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SlotStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SlotStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SlotStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SlotStatus> for Coding {
    fn from(code: SlotStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/slotstatus".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SlotStatus> for CodeableConcept {
    fn from(code: SlotStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SortDirection](http://hl7.org/fhir/ValueSet/sort-direction)**. The possible sort directions, ascending or descending.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SortDirection {
    /** **ascending**

Ascending. Sort by the value ascending, so that lower values appear first. */
    Ascending,
    /** **descending**

Descending. Sort by the value descending, so that lower values appear last. */
    Descending,
}
impl ::core::str::FromStr for SortDirection {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ascending" => Ok(Self::Ascending),
            "descending" => Ok(Self::Descending),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SortDirection {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ascending => "ascending",
            Self::Descending => "descending",
        }
    }
}
impl ::std::fmt::Debug for SortDirection {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SortDirection {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SortDirection {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SortDirection {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SortDirection> for Coding {
    fn from(code: SortDirection) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/sort-direction".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SortDirection> for CodeableConcept {
    fn from(code: SortDirection) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SpecialMeasures](http://hl7.org/fhir/ValueSet/medicinal-product-special-measures)**. Extra measures defined for a Medicinal Product, such as requirement to conduct post-authorization studies.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SpecialMeasures {
    /** **Post-authorizationStudies**

Requirement to conduct post-authorization studies. Requirement to conduct post-authorization studies */
    PostAuthorizationStudies,
}
impl ::core::str::FromStr for SpecialMeasures {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Post-authorizationStudies" => Ok(Self::PostAuthorizationStudies),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SpecialMeasures {
    fn as_ref(&self) -> &str {
        match self {
            Self::PostAuthorizationStudies => "Post-authorizationStudies",
        }
    }
}
impl ::std::fmt::Debug for SpecialMeasures {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SpecialMeasures {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SpecialMeasures {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SpecialMeasures {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SpecialMeasures> for Coding {
    fn from(code: SpecialMeasures) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/medicinal-product-special-measures"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SpecialMeasures> for CodeableConcept {
    fn from(code: SpecialMeasures) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SpecimenCombined](http://hl7.org/fhir/ValueSet/specimen-combined)**. Codes providing the combined status of the specimen.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SpecimenCombined {
    /** **grouped**

Grouped. The specimen is in a group. */
    Grouped,
    /** **pooled**

Pooled. The specimen is pooled. */
    Pooled,
}
impl ::core::str::FromStr for SpecimenCombined {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "grouped" => Ok(Self::Grouped),
            "pooled" => Ok(Self::Pooled),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SpecimenCombined {
    fn as_ref(&self) -> &str {
        match self {
            Self::Grouped => "grouped",
            Self::Pooled => "pooled",
        }
    }
}
impl ::std::fmt::Debug for SpecimenCombined {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SpecimenCombined {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SpecimenCombined {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SpecimenCombined {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SpecimenCombined> for Coding {
    fn from(code: SpecimenCombined) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/specimen-combined".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SpecimenCombined> for CodeableConcept {
    fn from(code: SpecimenCombined) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SpecimenContainedPreference](http://hl7.org/fhir/ValueSet/specimen-contained-preference)**. Degree of preference of a type of conditioned specimen.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SpecimenContainedPreference {
    /** **alternate**

Alternate. This type of conditioned specimen is an alternate. */
    Alternate,
    /** **preferred**

Preferred. This type of contained specimen is preferred to collect this kind of specimen. */
    Preferred,
}
impl ::core::str::FromStr for SpecimenContainedPreference {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alternate" => Ok(Self::Alternate),
            "preferred" => Ok(Self::Preferred),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SpecimenContainedPreference {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alternate => "alternate",
            Self::Preferred => "preferred",
        }
    }
}
impl ::std::fmt::Debug for SpecimenContainedPreference {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SpecimenContainedPreference {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SpecimenContainedPreference {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SpecimenContainedPreference {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SpecimenContainedPreference> for Coding {
    fn from(code: SpecimenContainedPreference) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/specimen-contained-preference".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SpecimenContainedPreference> for CodeableConcept {
    fn from(code: SpecimenContainedPreference) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SpecimenRole](http://hl7.org/fhir/ValueSet/specimen-role)**. Codes providing the combined status of the specimen.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SpecimenRole {
    /** **b**

Blind Sample. Used to test the validity of the measurement process, where the composition of the sample is unknown except to the person submitting it. */
    B,
    /** **c**

Calibrator. Used for initial setting of calibration of the instrument. */
    C,
    /** **e**

Electronic QC. Used with manufactured reference providing signals that simulate QC results. */
    E,
    /** **f**

Filler Organization Proficiency. Specimen used for testing proficiency of the organization performing the testing (Filler). */
    F,
    /** **o**

Operator Proficiency. Specimen used for testing Operator Proficiency. */
    O,
    /** **p**

Patient. Used for any patient sample. */
    P,
    /** **q**

Control specimen. Used when specimen is the control specimen (either positive or negative). */
    Q,
    /** **r**

Replicate (of patient sample as a control). Used when a patient sample is re-run as a control for a repeat test. */
    R,
    /** **v**

Verifying Calibrator. Used for periodic calibration checks. */
    V,
}
impl ::core::str::FromStr for SpecimenRole {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "b" => Ok(Self::B),
            "c" => Ok(Self::C),
            "e" => Ok(Self::E),
            "f" => Ok(Self::F),
            "o" => Ok(Self::O),
            "p" => Ok(Self::P),
            "q" => Ok(Self::Q),
            "r" => Ok(Self::R),
            "v" => Ok(Self::V),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SpecimenRole {
    fn as_ref(&self) -> &str {
        match self {
            Self::B => "b",
            Self::C => "c",
            Self::E => "e",
            Self::F => "f",
            Self::O => "o",
            Self::P => "p",
            Self::Q => "q",
            Self::R => "r",
            Self::V => "v",
        }
    }
}
impl ::std::fmt::Debug for SpecimenRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SpecimenRole {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SpecimenRole {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SpecimenRole {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SpecimenRole> for Coding {
    fn from(code: SpecimenRole) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/specimen-role".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SpecimenRole> for CodeableConcept {
    fn from(code: SpecimenRole) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SpecimenStatus](http://hl7.org/fhir/ValueSet/specimen-status)**. Codes providing the status/availability of a specimen.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SpecimenStatus {
    /** **available**

Available. The physical specimen is present and in good condition. */
    Available,
    /** **entered-in-error**

Entered in Error. The specimen was entered in error and therefore nullified. */
    EnteredInError,
    /** **unavailable**

Unavailable. There is no physical specimen because it is either lost, destroyed or consumed. */
    Unavailable,
    /** **unsatisfactory**

Unsatisfactory. The specimen cannot be used because of a quality issue such as a broken container, contamination, or too old. */
    Unsatisfactory,
}
impl ::core::str::FromStr for SpecimenStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "available" => Ok(Self::Available),
            "entered-in-error" => Ok(Self::EnteredInError),
            "unavailable" => Ok(Self::Unavailable),
            "unsatisfactory" => Ok(Self::Unsatisfactory),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SpecimenStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Available => "available",
            Self::EnteredInError => "entered-in-error",
            Self::Unavailable => "unavailable",
            Self::Unsatisfactory => "unsatisfactory",
        }
    }
}
impl ::std::fmt::Debug for SpecimenStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SpecimenStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SpecimenStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SpecimenStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SpecimenStatus> for Coding {
    fn from(code: SpecimenStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/specimen-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SpecimenStatus> for CodeableConcept {
    fn from(code: SpecimenStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StatisticModelCode](http://hl7.org/fhir/ValueSet/statistic-model-code)**. The role that the assertion variable plays.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StatisticModelCode {
    /** **adjusted**

Adjusted analysis. Used for adjusted analysis, paired with variable element(s) */
    Adjusted,
    /** **anova**

ANOVA (ANalysis Of VAriance). Used for ANOVA method of analysis, may be paired with "value" to express degrees of freedom */
    Anova,
    /** **anovaOneWay**

one-way ANOVA. Used for one-way ANOVA method of analysis, may be paired with "value" to express degrees of freedom */
    AnovaOneWay,
    /** **anovaThreeWay**

3-way ANOVA. Used for 3-way ANOVA method of analysis, may be paired with "value" to express degrees of freedom */
    AnovaThreeWay,
    /** **anovaTwoWay**

2-way ANOVA without replication. Used for 2-way ANOVA without replication method of analysis, may be paired with "value" to express degrees of freedom */
    AnovaTwoWay,
    /** **anovaTwoWayReplication**

2-way ANOVA with replication. Used for 2-way ANOVA with replication method of analysis, may be paired with "value" to express degrees of freedom */
    AnovaTwoWayReplication,
    /** **binomialDistributionRegression**

Binomial Distribution for Regression. Used for Binomial Distribution for Regression, no additional elements needed */
    BinomialDistributionRegression,
    /** **chiSquareTest**

Chi-square test. Used for Chi-square test, may be paired with "value" to express degrees of freedom */
    ChiSquareTest,
    /** **chiSquareTestHomogeneity**

Chi-square test for homogeneity. Used for Chi-square test for homogeneity, may be paired with "value" to express degrees of freedom */
    ChiSquareTestHomogeneity,
    /** **chiSquareTestTrend**

Chi-square test for trend. Used for Chi-square test for trend, may be paired with "value" to express degrees of freedom */
    ChiSquareTestTrend,
    /** **coxProportionalHazards**

Cox Proportional Hazards. Used for Cox proportional hazards method of analysis, no additional elements needed */
    CoxProportionalHazards,
    /** **dersimonianLairdMethod**

Dersimonian-Laird method. Used for Dersimonian-Laird method of tau estimation, no additional elements needed */
    DersimonianLairdMethod,
    /** **effectsFixed**

Fixed-effects. From a fixed-effects analysis, no additional elements needed */
    EffectsFixed,
    /** **effectsRandom**

Random-effects. From a random-effects analysis, no additional elements needed */
    EffectsRandom,
    /** **empiricalBayes**

Empirical Bayes method. Used for Empirical Bayes method of tau estimation, no additional elements needed */
    EmpiricalBayes,
    /** **fishersExactTest**

Fisher’s exact test. Used for Fisher's exact test, may be paired with "value" to express degrees of freedom */
    FishersExactTest,
    /** **friedmanTest**

Friedman test. Used for Friedman test, no additional elements needed */
    FriedmanTest,
    /** **glm**

GLM (Generalized Linear Model). Used for GLM (Generalized Linear Model), no additional elements needed */
    Glm,
    /** **glmGeneralizedLogit**

GLM with generalized logit link. Used for GLM with generalized logit link, no additional elements needed */
    GlmGeneralizedLogit,
    /** **glmIdentity**

GLM with identity link. Used for GLM with identity link, no additional elements needed */
    GlmIdentity,
    /** **glmLog**

GLM with log link. Used for GLM with log link, no additional elements needed */
    GlmLog,
    /** **glmLogit**

GLM with logit link. Used for GLM with logit link, no additional elements needed */
    GlmLogit,
    /** **glmProbit**

GLM with probit link. Used for GLM with probit link, no additional elements needed */
    GlmProbit,
    /** **glmm**

Generalized linear mixed model (GLMM). Used for Generalized linear mixed model (GLMM), no additional elements needed */
    Glmm,
    /** **glmmGeneralizedLogit**

GLMM with generalized logit link. Used for GLMM with generalized logit link, no additional elements needed */
    GlmmGeneralizedLogit,
    /** **glmmIdentity**

GLMM with identity link. Used for GLMM with identity link, no additional elements needed */
    GlmmIdentity,
    /** **glmmLog**

GLMM with log link. Used for GLMM with log link, no additional elements needed */
    GlmmLog,
    /** **glmmLogit**

GLMM with logit link. Used for GLMM with logit link, no additional elements needed */
    GlmmLogit,
    /** **glmmProbit**

GLMM with probit link. Used for GLMM with probit link, no additional elements needed */
    GlmmProbit,
    /** **goodmanKruskasGamma**

Goodman Kruska’s Gamma. Used for Goodman Kruska’s Gamma, no additional elements needed */
    GoodmanKruskasGamma,
    /** **hartungKnapp**

Hartung-Knapp adjustment. Hartung-Knapp/Hartung-Knapp-Sidik-Jonkman adjustment used in meta-analysis, no additional elements needed */
    HartungKnapp,
    /** **hedgesMethod**

Hedges method. Used for Hedges method of tau estimation, no additional elements needed */
    HedgesMethod,
    /** **hunterSchmidt**

Hunter-Schmidt method. Used for Hunter-Schmidt method of tau estimation, no additional elements needed */
    HunterSchmidt,
    /** **interactionTerm**

Interaction term. Used for interaction term, paired with "value" and two or more variable elements */
    InteractionTerm,
    /** **inverseVariance**

Inverse variance method. Used for inverse variance method of meta-analysis, no additional elements needed */
    InverseVariance,
    /** **kendallCorrelation**

Kendall correlation. Used for Kendall correlation, no additional elements needed */
    KendallCorrelation,
    /** **kruskalWallisTest**

Kruskal Wallis test. Used for Kruskal Wallis test, may be paired with "value" to express degrees of freedom */
    KruskalWallisTest,
    /** **linearRegression**

Linear Regression. Used for linear regression method of analysis, no additional elements needed */
    LinearRegression,
    /** **logisticRegression**

Logistic Regression. Used for logistic regression method of analysis, no additional elements needed */
    LogisticRegression,
    /** **mannWhitneyUTest**

Mann-Whitney U test. Used for Mann-Whitney U test, no additional elements needed */
    MannWhitneyUTest,
    /** **manova**

multivariate ANOVA (MANOVA). Used for multivariate ANOVA (MANOVA) method of analysis, may be paired with "value" to express degrees of freedom */
    Manova,
    /** **manteHaenszelMethod**

Mantel-Haenszel method. Used for Mantel-Haenszel method, no additional elements needed */
    ManteHaenszelMethod,
    /** **maximumLikelihood**

Maximum Likelihood method. Used for Maximum Likelihood method of tau estimation, no additional elements needed */
    MaximumLikelihood,
    /** **mcnemarsTest**

McNemar’s test. Used for McNemar's test, no additional elements needed */
    McnemarsTest,
    /** **metaAnalysis**

Meta-analysis. Used for meta-analysis, no additional elements needed */
    MetaAnalysis,
    /** **modifiedHartungKnapp**

Modified Hartung-Knapp adjustment. Modified Hartung-Knapp/Hartung-Knapp-Sidik-Jonkman adjustment used in meta-analysis, no additional elements needed */
    ModifiedHartungKnapp,
    /** **multinomialDistributionRegression**

Multinomial Distribution for Regression. Used for Multinomial Distribution for Regression, no additional elements needed */
    MultinomialDistributionRegression,
    /** **negativeBinomialRegression**

Negative Binomial Regression. Used for Negative Binomial Regression, no additional elements needed */
    NegativeBinomialRegression,
    /** **oneSampleTTest**

1-sample t-test. Used for 1-sample t-test, may be paired with "value" to express degrees of freedom */
    OneSampleTTest,
    /** **oneTailedTest**

one-tailed test (1 threshold). Used for one-tailed test (1 threshold), no additional elements needed */
    OneTailedTest,
    /** **pairedTTest**

paired t-test. Used for paired t-test, may be paired with "value" to express degrees of freedom */
    PairedTTest,
    /** **pauleMandelMethod**

Paule-Mandel method. Used for Paule-Mandel method of tau estimation, no additional elements needed */
    PauleMandelMethod,
    /** **pearsonCorrelation**

Pearson correlation. Used for Pearson correlation, no additional elements needed */
    PearsonCorrelation,
    /** **petoMethod**

Peto method. Used for Peto method of meta-analysis, no additional elements needed */
    PetoMethod,
    /** **poissonRegression**

Poisson Regression. Used for Poisson Regression, no additional elements needed */
    PoissonRegression,
    /** **polynomialRegression**

Polynomial Regression. Used for Polynomial regression method of analysis, no additional elements needed */
    PolynomialRegression,
    /** **poolGeneralizedLinearMixedModel**

Generalized linear mixed model (GLMM). Generalized linear mixed model (GLMM) method for pooling in meta-analysis */
    PoolGeneralizedLinearMixedModel,
    /** **poolInverseVariance**

Inverse variance method. Inverse variance method for pooling in meta-analysis */
    PoolInverseVariance,
    /** **poolMantelHaenzsel**

Mantel-Haenszel method. Mantel-Haenszel method for pooling in meta-analysis */
    PoolMantelHaenzsel,
    /** **poolPeto**

Peto method. Peto method for pooling in meta-analysis */
    PoolPeto,
    /** **restrictedLikelihood**

Restricted Maximum Likelihood method. Used for Restricted Maximum Likelihood method of tau estimation, no additional elements needed */
    RestrictedLikelihood,
    /** **sidikJonkman**

Sidik-Jonkman method. Used for Sidik-Jonkman method of tau estimation, no additional elements needed */
    SidikJonkman,
    /** **signTest**

sign test. Used for sign test, no additional elements needed */
    SignTest,
    /** **spearmanCorrelation**

Spearman correlation. Used for Spearman correlation, no additional elements needed */
    SpearmanCorrelation,
    /** **tauDersimonianLaird**

Dersimonian-Laird method. Dersimonian-Laird method for tau squared */
    TauDersimonianLaird,
    /** **tauEmpiricalBayes**

Empirical Bayes method. Empirical Bayes method for tau squared */
    TauEmpiricalBayes,
    /** **tauHedges**

Hedges method. Hedges method for tau squared */
    TauHedges,
    /** **tauHunterSchmidt**

Hunter-Schmidt method. Hunter-Schmidt method for tau squared */
    TauHunterSchmidt,
    /** **tauMaximumLikelihood**

Maximum Likelihood method. Maximum Likelihood method for tau squared */
    TauMaximumLikelihood,
    /** **tauPauleMandel**

Paule-Mandel method. Paule-Mandel method for tau squared */
    TauPauleMandel,
    /** **tauRestrictedMaximumLikelihood**

Restricted Maximum Likelihood method. Restricted Maximum Likelihood method for tau squared */
    TauRestrictedMaximumLikelihood,
    /** **tauSidikJonkman**

Sidik-Jonkman method. Sidik-Jonkman method for tau squared */
    TauSidikJonkman,
    /** **twoSampleTTest**

2-sample t-test. Used for 2-sample t-test, may be paired with "value" to express degrees of freedom */
    TwoSampleTTest,
    /** **twoTailedTest**

two-tailed test (2 thresholds). Used for two-tailed test (2 threshold), no additional elements needed */
    TwoTailedTest,
    /** **wilcoxonRankSumTest**

Wilcoxon rank-sum test. Used for Wilcoxon rank-sum test, no additional elements needed */
    WilcoxonRankSumTest,
    /** **wilcoxonSignedRankTest**

Wilcoxon signed-rank test. Used for Wilcoxon signed-rank test, no additional elements needed */
    WilcoxonSignedRankTest,
    /** **zTest**

z-test. Used for z-test, no additional elements needed */
    ZTest,
    /** **zeroCellConstant**

Zero-cell adjustment with constant. Zero-cell adjustment done by adding a constant to all cells of affected studies, paired with "value" to define the constant */
    ZeroCellConstant,
    /** **zeroCellContinuityCorrection**

Zero-cell adjustment with continuity correction. Zero-cell adjustment done by treatment arm continuity correction, no additional elements needed */
    ZeroCellContinuityCorrection,
}
impl ::core::str::FromStr for StatisticModelCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "adjusted" => Ok(Self::Adjusted),
            "anova" => Ok(Self::Anova),
            "anovaOneWay" => Ok(Self::AnovaOneWay),
            "anovaThreeWay" => Ok(Self::AnovaThreeWay),
            "anovaTwoWay" => Ok(Self::AnovaTwoWay),
            "anovaTwoWayReplication" => Ok(Self::AnovaTwoWayReplication),
            "binomialDistributionRegression" => Ok(Self::BinomialDistributionRegression),
            "chiSquareTest" => Ok(Self::ChiSquareTest),
            "chiSquareTestHomogeneity" => Ok(Self::ChiSquareTestHomogeneity),
            "chiSquareTestTrend" => Ok(Self::ChiSquareTestTrend),
            "coxProportionalHazards" => Ok(Self::CoxProportionalHazards),
            "dersimonianLairdMethod" => Ok(Self::DersimonianLairdMethod),
            "effectsFixed" => Ok(Self::EffectsFixed),
            "effectsRandom" => Ok(Self::EffectsRandom),
            "empiricalBayes" => Ok(Self::EmpiricalBayes),
            "fishersExactTest" => Ok(Self::FishersExactTest),
            "friedmanTest" => Ok(Self::FriedmanTest),
            "glm" => Ok(Self::Glm),
            "glmGeneralizedLogit" => Ok(Self::GlmGeneralizedLogit),
            "glmIdentity" => Ok(Self::GlmIdentity),
            "glmLog" => Ok(Self::GlmLog),
            "glmLogit" => Ok(Self::GlmLogit),
            "glmProbit" => Ok(Self::GlmProbit),
            "glmm" => Ok(Self::Glmm),
            "glmmGeneralizedLogit" => Ok(Self::GlmmGeneralizedLogit),
            "glmmIdentity" => Ok(Self::GlmmIdentity),
            "glmmLog" => Ok(Self::GlmmLog),
            "glmmLogit" => Ok(Self::GlmmLogit),
            "glmmProbit" => Ok(Self::GlmmProbit),
            "goodmanKruskasGamma" => Ok(Self::GoodmanKruskasGamma),
            "hartungKnapp" => Ok(Self::HartungKnapp),
            "hedgesMethod" => Ok(Self::HedgesMethod),
            "hunterSchmidt" => Ok(Self::HunterSchmidt),
            "interactionTerm" => Ok(Self::InteractionTerm),
            "inverseVariance" => Ok(Self::InverseVariance),
            "kendallCorrelation" => Ok(Self::KendallCorrelation),
            "kruskalWallisTest" => Ok(Self::KruskalWallisTest),
            "linearRegression" => Ok(Self::LinearRegression),
            "logisticRegression" => Ok(Self::LogisticRegression),
            "mannWhitneyUTest" => Ok(Self::MannWhitneyUTest),
            "manova" => Ok(Self::Manova),
            "manteHaenszelMethod" => Ok(Self::ManteHaenszelMethod),
            "maximumLikelihood" => Ok(Self::MaximumLikelihood),
            "mcnemarsTest" => Ok(Self::McnemarsTest),
            "metaAnalysis" => Ok(Self::MetaAnalysis),
            "modifiedHartungKnapp" => Ok(Self::ModifiedHartungKnapp),
            "multinomialDistributionRegression" => {
                Ok(Self::MultinomialDistributionRegression)
            }
            "negativeBinomialRegression" => Ok(Self::NegativeBinomialRegression),
            "oneSampleTTest" => Ok(Self::OneSampleTTest),
            "oneTailedTest" => Ok(Self::OneTailedTest),
            "pairedTTest" => Ok(Self::PairedTTest),
            "pauleMandelMethod" => Ok(Self::PauleMandelMethod),
            "pearsonCorrelation" => Ok(Self::PearsonCorrelation),
            "petoMethod" => Ok(Self::PetoMethod),
            "poissonRegression" => Ok(Self::PoissonRegression),
            "polynomialRegression" => Ok(Self::PolynomialRegression),
            "poolGeneralizedLinearMixedModel" => {
                Ok(Self::PoolGeneralizedLinearMixedModel)
            }
            "poolInverseVariance" => Ok(Self::PoolInverseVariance),
            "poolMantelHaenzsel" => Ok(Self::PoolMantelHaenzsel),
            "poolPeto" => Ok(Self::PoolPeto),
            "restrictedLikelihood" => Ok(Self::RestrictedLikelihood),
            "sidikJonkman" => Ok(Self::SidikJonkman),
            "signTest" => Ok(Self::SignTest),
            "spearmanCorrelation" => Ok(Self::SpearmanCorrelation),
            "tauDersimonianLaird" => Ok(Self::TauDersimonianLaird),
            "tauEmpiricalBayes" => Ok(Self::TauEmpiricalBayes),
            "tauHedges" => Ok(Self::TauHedges),
            "tauHunterSchmidt" => Ok(Self::TauHunterSchmidt),
            "tauMaximumLikelihood" => Ok(Self::TauMaximumLikelihood),
            "tauPauleMandel" => Ok(Self::TauPauleMandel),
            "tauRestrictedMaximumLikelihood" => Ok(Self::TauRestrictedMaximumLikelihood),
            "tauSidikJonkman" => Ok(Self::TauSidikJonkman),
            "twoSampleTTest" => Ok(Self::TwoSampleTTest),
            "twoTailedTest" => Ok(Self::TwoTailedTest),
            "wilcoxonRankSumTest" => Ok(Self::WilcoxonRankSumTest),
            "wilcoxonSignedRankTest" => Ok(Self::WilcoxonSignedRankTest),
            "zTest" => Ok(Self::ZTest),
            "zeroCellConstant" => Ok(Self::ZeroCellConstant),
            "zeroCellContinuityCorrection" => Ok(Self::ZeroCellContinuityCorrection),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StatisticModelCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Adjusted => "adjusted",
            Self::Anova => "anova",
            Self::AnovaOneWay => "anovaOneWay",
            Self::AnovaThreeWay => "anovaThreeWay",
            Self::AnovaTwoWay => "anovaTwoWay",
            Self::AnovaTwoWayReplication => "anovaTwoWayReplication",
            Self::BinomialDistributionRegression => "binomialDistributionRegression",
            Self::ChiSquareTest => "chiSquareTest",
            Self::ChiSquareTestHomogeneity => "chiSquareTestHomogeneity",
            Self::ChiSquareTestTrend => "chiSquareTestTrend",
            Self::CoxProportionalHazards => "coxProportionalHazards",
            Self::DersimonianLairdMethod => "dersimonianLairdMethod",
            Self::EffectsFixed => "effectsFixed",
            Self::EffectsRandom => "effectsRandom",
            Self::EmpiricalBayes => "empiricalBayes",
            Self::FishersExactTest => "fishersExactTest",
            Self::FriedmanTest => "friedmanTest",
            Self::Glm => "glm",
            Self::GlmGeneralizedLogit => "glmGeneralizedLogit",
            Self::GlmIdentity => "glmIdentity",
            Self::GlmLog => "glmLog",
            Self::GlmLogit => "glmLogit",
            Self::GlmProbit => "glmProbit",
            Self::Glmm => "glmm",
            Self::GlmmGeneralizedLogit => "glmmGeneralizedLogit",
            Self::GlmmIdentity => "glmmIdentity",
            Self::GlmmLog => "glmmLog",
            Self::GlmmLogit => "glmmLogit",
            Self::GlmmProbit => "glmmProbit",
            Self::GoodmanKruskasGamma => "goodmanKruskasGamma",
            Self::HartungKnapp => "hartungKnapp",
            Self::HedgesMethod => "hedgesMethod",
            Self::HunterSchmidt => "hunterSchmidt",
            Self::InteractionTerm => "interactionTerm",
            Self::InverseVariance => "inverseVariance",
            Self::KendallCorrelation => "kendallCorrelation",
            Self::KruskalWallisTest => "kruskalWallisTest",
            Self::LinearRegression => "linearRegression",
            Self::LogisticRegression => "logisticRegression",
            Self::MannWhitneyUTest => "mannWhitneyUTest",
            Self::Manova => "manova",
            Self::ManteHaenszelMethod => "manteHaenszelMethod",
            Self::MaximumLikelihood => "maximumLikelihood",
            Self::McnemarsTest => "mcnemarsTest",
            Self::MetaAnalysis => "metaAnalysis",
            Self::ModifiedHartungKnapp => "modifiedHartungKnapp",
            Self::MultinomialDistributionRegression => {
                "multinomialDistributionRegression"
            }
            Self::NegativeBinomialRegression => "negativeBinomialRegression",
            Self::OneSampleTTest => "oneSampleTTest",
            Self::OneTailedTest => "oneTailedTest",
            Self::PairedTTest => "pairedTTest",
            Self::PauleMandelMethod => "pauleMandelMethod",
            Self::PearsonCorrelation => "pearsonCorrelation",
            Self::PetoMethod => "petoMethod",
            Self::PoissonRegression => "poissonRegression",
            Self::PolynomialRegression => "polynomialRegression",
            Self::PoolGeneralizedLinearMixedModel => "poolGeneralizedLinearMixedModel",
            Self::PoolInverseVariance => "poolInverseVariance",
            Self::PoolMantelHaenzsel => "poolMantelHaenzsel",
            Self::PoolPeto => "poolPeto",
            Self::RestrictedLikelihood => "restrictedLikelihood",
            Self::SidikJonkman => "sidikJonkman",
            Self::SignTest => "signTest",
            Self::SpearmanCorrelation => "spearmanCorrelation",
            Self::TauDersimonianLaird => "tauDersimonianLaird",
            Self::TauEmpiricalBayes => "tauEmpiricalBayes",
            Self::TauHedges => "tauHedges",
            Self::TauHunterSchmidt => "tauHunterSchmidt",
            Self::TauMaximumLikelihood => "tauMaximumLikelihood",
            Self::TauPauleMandel => "tauPauleMandel",
            Self::TauRestrictedMaximumLikelihood => "tauRestrictedMaximumLikelihood",
            Self::TauSidikJonkman => "tauSidikJonkman",
            Self::TwoSampleTTest => "twoSampleTTest",
            Self::TwoTailedTest => "twoTailedTest",
            Self::WilcoxonRankSumTest => "wilcoxonRankSumTest",
            Self::WilcoxonSignedRankTest => "wilcoxonSignedRankTest",
            Self::ZTest => "zTest",
            Self::ZeroCellConstant => "zeroCellConstant",
            Self::ZeroCellContinuityCorrection => "zeroCellContinuityCorrection",
        }
    }
}
impl ::std::fmt::Debug for StatisticModelCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StatisticModelCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StatisticModelCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StatisticModelCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StatisticModelCode> for Coding {
    fn from(code: StatisticModelCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/statistic-model-code".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StatisticModelCode> for CodeableConcept {
    fn from(code: StatisticModelCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StatisticsCode](http://hl7.org/fhir/ValueSet/observation-statistics)**. The statistical operation parameter -\"statistic\" codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StatisticsCode {
    /** **20-percent**

20th Percentile. The 20th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period. */
    N20Percent,
    /** **4-dev**

Quartile Deviation. The difference between the upper and lower [Quartiles](https://en.wikipedia.org/wiki/Quartile) is called the Interquartile range. (IQR = Q3-Q1) Quartile deviation or Semi-interquartile range is one-half the difference between the first and the third quartiles. */
    N4Dev,
    /** **4-lower**

Lower Quartile. The lower [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period. */
    N4Lower,
    /** **4-upper**

Upper Quartile. The upper [Quartile](https://en.wikipedia.org/wiki/Quartile) Boundary of N measurements over the stated period. */
    N4Upper,
    /** **5-1**

1st Quintile. The lowest of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population. */
    N51,
    /** **5-2**

2nd Quintile. The second of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population. */
    N52,
    /** **5-3**

3rd Quintile. The third of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population. */
    N53,
    /** **5-4**

4th Quintile. The fourth of four values that divide the N measurements into a frequency distribution of five classes with each containing one fifth of the total population. */
    N54,
    /** **80-percent**

80th Percentile. The 80th [Percentile](https://en.wikipedia.org/wiki/Percentile) of N measurements over the stated period. */
    N80Percent,
    /** **average**

Average. The [mean](https://en.wikipedia.org/wiki/Arithmetic_mean) of N measurements over the stated period. */
    Average,
    /** **count**

Count. The [number] of valid measurements over the stated period that contributed to the other statistical outputs. */
    Count,
    /** **kurtosis**

Kurtosis. Kurtosis  is a measure of the "tailedness" of the probability distribution of a real-valued random variable.   Source: [Wikipedia](https://en.wikipedia.org/wiki/Kurtosis). */
    Kurtosis,
    /** **maximum**

Maximum. The [maximum](https://en.wikipedia.org/wiki/Maximal_element) value of N measurements over the stated period. */
    Maximum,
    /** **median**

Median. The [median](https://en.wikipedia.org/wiki/Median) of N measurements over the stated period. */
    Median,
    /** **minimum**

Minimum. The [minimum](https://en.wikipedia.org/wiki/Minimal_element) value of N measurements over the stated period. */
    Minimum,
    /** **regression**

Regression. Linear regression is an approach for modeling two-dimensional sample points with one independent variable and one dependent variable (conventionally, the x and y coordinates in a Cartesian coordinate system) and finds a linear function (a non-vertical straight line) that, as accurately as possible, predicts the dependent variable values as a function of the independent variables. Source: [Wikipedia](https://en.wikipedia.org/wiki/Simple_linear_regression)  This Statistic code will return both a gradient and an intercept value. */
    Regression,
    /** **skew**

Skew. Skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or even undefined.  Source: [Wikipedia](https://en.wikipedia.org/wiki/Skewness). */
    Skew,
    /** **std-dev**

Standard Deviation. The [standard deviation](https://en.wikipedia.org/wiki/Standard_deviation) of N measurements over the stated period. */
    StdDev,
    /** **sum**

Sum. The [sum](https://en.wikipedia.org/wiki/Summation) of N measurements over the stated period. */
    Sum,
    /** **total-count**

Total Count. The total [number] of valid measurements over the stated period, including observations that were ignored because they did not contain valid result values. */
    TotalCount,
    /** **variance**

Variance. The [variance](https://en.wikipedia.org/wiki/Variance) of N measurements over the stated period. */
    Variance,
}
impl ::core::str::FromStr for StatisticsCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "20-percent" => Ok(Self::N20Percent),
            "4-dev" => Ok(Self::N4Dev),
            "4-lower" => Ok(Self::N4Lower),
            "4-upper" => Ok(Self::N4Upper),
            "5-1" => Ok(Self::N51),
            "5-2" => Ok(Self::N52),
            "5-3" => Ok(Self::N53),
            "5-4" => Ok(Self::N54),
            "80-percent" => Ok(Self::N80Percent),
            "average" => Ok(Self::Average),
            "count" => Ok(Self::Count),
            "kurtosis" => Ok(Self::Kurtosis),
            "maximum" => Ok(Self::Maximum),
            "median" => Ok(Self::Median),
            "minimum" => Ok(Self::Minimum),
            "regression" => Ok(Self::Regression),
            "skew" => Ok(Self::Skew),
            "std-dev" => Ok(Self::StdDev),
            "sum" => Ok(Self::Sum),
            "total-count" => Ok(Self::TotalCount),
            "variance" => Ok(Self::Variance),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StatisticsCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::N20Percent => "20-percent",
            Self::N4Dev => "4-dev",
            Self::N4Lower => "4-lower",
            Self::N4Upper => "4-upper",
            Self::N51 => "5-1",
            Self::N52 => "5-2",
            Self::N53 => "5-3",
            Self::N54 => "5-4",
            Self::N80Percent => "80-percent",
            Self::Average => "average",
            Self::Count => "count",
            Self::Kurtosis => "kurtosis",
            Self::Maximum => "maximum",
            Self::Median => "median",
            Self::Minimum => "minimum",
            Self::Regression => "regression",
            Self::Skew => "skew",
            Self::StdDev => "std-dev",
            Self::Sum => "sum",
            Self::TotalCount => "total-count",
            Self::Variance => "variance",
        }
    }
}
impl ::std::fmt::Debug for StatisticsCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StatisticsCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StatisticsCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StatisticsCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StatisticsCode> for Coding {
    fn from(code: StatisticsCode) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/observation-statistics".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StatisticsCode> for CodeableConcept {
    fn from(code: StatisticsCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[Status](http://hl7.org/fhir/ValueSet/status)**. The validation status of the target\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum Status {
    /** **attested**

Attested. ***TODO*** */
    Attested,
    /** **entered-in-error**

Entered in Error. The VerificationResult record was created erroneously and is not appropriated for use. */
    EnteredInError,
    /** **in-process**

In process. ***TODO*** */
    InProcess,
    /** **req-revalid**

Requires revalidation. ***TODO*** */
    ReqRevalid,
    /** **reval-fail**

Re-Validation failed. ***TODO*** */
    RevalFail,
    /** **val-fail**

Validation failed. ***TODO*** */
    ValFail,
    /** **validated**

Validated. ***TODO*** */
    Validated,
}
impl ::core::str::FromStr for Status {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "attested" => Ok(Self::Attested),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-process" => Ok(Self::InProcess),
            "req-revalid" => Ok(Self::ReqRevalid),
            "reval-fail" => Ok(Self::RevalFail),
            "val-fail" => Ok(Self::ValFail),
            "validated" => Ok(Self::Validated),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for Status {
    fn as_ref(&self) -> &str {
        match self {
            Self::Attested => "attested",
            Self::EnteredInError => "entered-in-error",
            Self::InProcess => "in-process",
            Self::ReqRevalid => "req-revalid",
            Self::RevalFail => "reval-fail",
            Self::ValFail => "val-fail",
            Self::Validated => "validated",
        }
    }
}
impl ::std::fmt::Debug for Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for Status {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for Status {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for Status {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<Status> for Coding {
    fn from(code: Status) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<Status> for CodeableConcept {
    fn from(code: Status) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StrandType](http://hl7.org/fhir/ValueSet/strand-type)**. Type for strand.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StrandType {
    /** **crick**

Crick strand of starting sequence. Crick strand of starting sequence. */
    Crick,
    /** **watson**

Watson strand of starting sequence. Watson strand of starting sequence. */
    Watson,
}
impl ::core::str::FromStr for StrandType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "crick" => Ok(Self::Crick),
            "watson" => Ok(Self::Watson),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StrandType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Crick => "crick",
            Self::Watson => "watson",
        }
    }
}
impl ::std::fmt::Debug for StrandType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StrandType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StrandType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StrandType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StrandType> for Coding {
    fn from(code: StrandType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/strand-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StrandType> for CodeableConcept {
    fn from(code: StrandType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureDefinitionKind](http://hl7.org/fhir/ValueSet/structure-definition-kind)**. Defines the type of structure that a definition is describing.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureDefinitionKind {
    /** **complex-type**

Complex Data Type. A  complex structure that defines a set of data elements that is suitable for use in 'resources'. The base specification defines a number of complex types, and other specifications can define additional types. These structures do not have a maintained identity. */
    ComplexType,
    /** **logical**

Logical. A pattern or a template that is not intended to be a real resource or complex type. */
    Logical,
    /** **primitive-type**

Primitive Data Type. A primitive type that has a value and an extension. These can be used throughout complex datatype, Resource and extension definitions. Only the base specification can define primitive types. */
    PrimitiveType,
    /** **resource**

Resource. A 'resource' - a directed acyclic graph of elements that aggregrates other types into an identifiable entity. The base FHIR resources are defined by the FHIR specification itself but other 'resources' can be defined in additional specifications (though these will not be recognized as 'resources' by the FHIR specification; i.e. they do not get end-points etc., or act as the targets of references in FHIR defined resources - though other specifications can treat them this way). */
    Resource,
}
impl ::core::str::FromStr for StructureDefinitionKind {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "complex-type" => Ok(Self::ComplexType),
            "logical" => Ok(Self::Logical),
            "primitive-type" => Ok(Self::PrimitiveType),
            "resource" => Ok(Self::Resource),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureDefinitionKind {
    fn as_ref(&self) -> &str {
        match self {
            Self::ComplexType => "complex-type",
            Self::Logical => "logical",
            Self::PrimitiveType => "primitive-type",
            Self::Resource => "resource",
        }
    }
}
impl ::std::fmt::Debug for StructureDefinitionKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureDefinitionKind {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureDefinitionKind {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureDefinitionKind {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureDefinitionKind> for Coding {
    fn from(code: StructureDefinitionKind) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/structure-definition-kind".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureDefinitionKind> for CodeableConcept {
    fn from(code: StructureDefinitionKind) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapGroupTypeMode](http://hl7.org/fhir/ValueSet/map-group-type-mode)**. If this is the default rule set to apply for the source type, or this combination of types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapGroupTypeMode {
    /** **type-and-types**

Default for type + combination. This group is a default mapping group for the specified types. */
    TypeAndTypes,
    /** **types**

Default for Type Combination. This group is a default mapping group for the specified types and for the primary source type. */
    Types,
}
impl ::core::str::FromStr for StructureMapGroupTypeMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "type-and-types" => Ok(Self::TypeAndTypes),
            "types" => Ok(Self::Types),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapGroupTypeMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::TypeAndTypes => "type-and-types",
            Self::Types => "types",
        }
    }
}
impl ::std::fmt::Debug for StructureMapGroupTypeMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapGroupTypeMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapGroupTypeMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapGroupTypeMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapGroupTypeMode> for Coding {
    fn from(code: StructureMapGroupTypeMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-group-type-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapGroupTypeMode> for CodeableConcept {
    fn from(code: StructureMapGroupTypeMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapInputMode](http://hl7.org/fhir/ValueSet/map-input-mode)**. Mode for this instance of data.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapInputMode {
    /** **source**

Source Instance. Names an input instance used a source for mapping. */
    Source,
    /** **target**

Target Instance. Names an instance that is being populated. */
    Target,
}
impl ::core::str::FromStr for StructureMapInputMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "source" => Ok(Self::Source),
            "target" => Ok(Self::Target),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapInputMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Source => "source",
            Self::Target => "target",
        }
    }
}
impl ::std::fmt::Debug for StructureMapInputMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapInputMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapInputMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapInputMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapInputMode> for Coding {
    fn from(code: StructureMapInputMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-input-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapInputMode> for CodeableConcept {
    fn from(code: StructureMapInputMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapModelMode](http://hl7.org/fhir/ValueSet/map-model-mode)**. How the referenced structure is used in this mapping.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapModelMode {
    /** **produced**

Produced Structure Definition. This structure describes an instance that the mapping engine may ask to create that is used a target of data. */
    Produced,
    /** **queried**

Queried Structure Definition. This structure describes an instance that the mapping engine may ask for that is used a source of data. */
    Queried,
    /** **source**

Source Structure Definition. This structure describes an instance passed to the mapping engine that is used a source of data. */
    Source,
    /** **target**

Target Structure Definition. This structure describes an instance passed to the mapping engine that is used a target of data. */
    Target,
}
impl ::core::str::FromStr for StructureMapModelMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "produced" => Ok(Self::Produced),
            "queried" => Ok(Self::Queried),
            "source" => Ok(Self::Source),
            "target" => Ok(Self::Target),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapModelMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Produced => "produced",
            Self::Queried => "queried",
            Self::Source => "source",
            Self::Target => "target",
        }
    }
}
impl ::std::fmt::Debug for StructureMapModelMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapModelMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapModelMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapModelMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapModelMode> for Coding {
    fn from(code: StructureMapModelMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-model-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapModelMode> for CodeableConcept {
    fn from(code: StructureMapModelMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapSourceListMode](http://hl7.org/fhir/ValueSet/map-source-list-mode)**. If field is a list, how to manage the source.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapSourceListMode {
    /** **first**

First. Only process this rule for the first in the list. */
    First,
    /** **last**

Last. Only process this rule for the last in the list. */
    Last,
    /** **not_first**

All but the first. Process this rule for all but the first. */
    NotFirst,
    /** **not_last**

All but the last. Process this rule for all but the last. */
    NotLast,
    /** **only_one**

Enforce only one. Only process this rule is there is only item. */
    OnlyOne,
}
impl ::core::str::FromStr for StructureMapSourceListMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "first" => Ok(Self::First),
            "last" => Ok(Self::Last),
            "not_first" => Ok(Self::NotFirst),
            "not_last" => Ok(Self::NotLast),
            "only_one" => Ok(Self::OnlyOne),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapSourceListMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::First => "first",
            Self::Last => "last",
            Self::NotFirst => "not_first",
            Self::NotLast => "not_last",
            Self::OnlyOne => "only_one",
        }
    }
}
impl ::std::fmt::Debug for StructureMapSourceListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapSourceListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapSourceListMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapSourceListMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapSourceListMode> for Coding {
    fn from(code: StructureMapSourceListMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-source-list-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapSourceListMode> for CodeableConcept {
    fn from(code: StructureMapSourceListMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapTargetListMode](http://hl7.org/fhir/ValueSet/map-target-list-mode)**. If field is a list, how to manage the production.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapTargetListMode {
    /** **first**

First. when the target list is being assembled, the items for this rule go first. If more than one rule defines a first item (for a given instance of mapping) then this is an error. */
    First,
    /** **last**

Last. when the target list is being assembled, the items for this rule go last. If more than one rule defines a last item (for a given instance of mapping) then this is an error. */
    Last,
    /** **share**

Share. the target instance is shared with the target instances generated by another rule (up to the first common n items, then create new ones). */
    Share,
    /** **single**

single. the target instance is shared with a number of target instances generated by another rule (up to the first common n items, then create new ones). */
    Single,
}
impl ::core::str::FromStr for StructureMapTargetListMode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "first" => Ok(Self::First),
            "last" => Ok(Self::Last),
            "share" => Ok(Self::Share),
            "single" => Ok(Self::Single),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapTargetListMode {
    fn as_ref(&self) -> &str {
        match self {
            Self::First => "first",
            Self::Last => "last",
            Self::Share => "share",
            Self::Single => "single",
        }
    }
}
impl ::std::fmt::Debug for StructureMapTargetListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapTargetListMode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapTargetListMode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapTargetListMode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapTargetListMode> for Coding {
    fn from(code: StructureMapTargetListMode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-target-list-mode".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapTargetListMode> for CodeableConcept {
    fn from(code: StructureMapTargetListMode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StructureMapTransform](http://hl7.org/fhir/ValueSet/map-transform)**. How data is copied/created.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StructureMapTransform {
    /** **append**

append. append(source...) - source is element or string. */
    Append,
    /** **c**

c. Create a Coding. Parameters = (system. Code[, display]). */
    C,
    /** **cast**

cast. cast(source, type?) - cast (convert) source from one type to another. Target type can be left as implicit if there is one and only one target type known. The default namespace for the type is 'FHIR' (see [FHIRPath type specifiers](http://hl7.org/fhirpath/N1/#is-type-specifier)) */
    Cast,
    /** **cc**

cc. Create a CodeableConcept. Parameters = (text) or (system. Code[, display]). */
    Cc,
    /** **copy**

copy. copy(source). */
    Copy,
    /** **cp**

cp. Create a contact details. Parameters = (value) or (system, value). If no system is provided, the system should be inferred from the content of the value. */
    Cp,
    /** **create**

create. create(type : string) - type is passed through to the application on the standard API, and must be known by it. */
    Create,
    /** **dateOp**

dateOp. Perform a date operation. *Parameters to be documented*. */
    DateOp,
    /** **escape**

escape. escape(source, fmt1, fmt2) - change source from one kind of escaping to another (plain, java, xml, json). note that this is for when the string itself is escaped. */
    Escape,
    /** **evaluate**

evaluate. Execute the supplied FHIRPath expression and use the value returned by that. */
    Evaluate,
    /** **id**

id. Create an identifier. Parameters = (system, value[, type]) where type is a code from the identifier type value set. */
    Id,
    /** **pointer**

pointer. Return the appropriate string to put in a reference that refers to the resource provided as a parameter. */
    Pointer,
    /** **qty**

qty. Create a quantity. Parameters = (text) or (value, unit, [system, code]) where text is the natural representation e.g. [comparator]value[space]unit. */
    Qty,
    /** **reference**

reference. reference(source : object) - return a string that references the provided tree properly. */
    Reference,
    /** **translate**

translate. translate(source, uri_of_map) - use the translate operation. */
    Translate,
    /** **truncate**

truncate. truncate(source, length) - source must be stringy type. */
    Truncate,
    /** **uuid**

uuid. Generate a random UUID (in lowercase). No Parameters. */
    Uuid,
}
impl ::core::str::FromStr for StructureMapTransform {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "append" => Ok(Self::Append),
            "c" => Ok(Self::C),
            "cast" => Ok(Self::Cast),
            "cc" => Ok(Self::Cc),
            "copy" => Ok(Self::Copy),
            "cp" => Ok(Self::Cp),
            "create" => Ok(Self::Create),
            "dateOp" => Ok(Self::DateOp),
            "escape" => Ok(Self::Escape),
            "evaluate" => Ok(Self::Evaluate),
            "id" => Ok(Self::Id),
            "pointer" => Ok(Self::Pointer),
            "qty" => Ok(Self::Qty),
            "reference" => Ok(Self::Reference),
            "translate" => Ok(Self::Translate),
            "truncate" => Ok(Self::Truncate),
            "uuid" => Ok(Self::Uuid),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StructureMapTransform {
    fn as_ref(&self) -> &str {
        match self {
            Self::Append => "append",
            Self::C => "c",
            Self::Cast => "cast",
            Self::Cc => "cc",
            Self::Copy => "copy",
            Self::Cp => "cp",
            Self::Create => "create",
            Self::DateOp => "dateOp",
            Self::Escape => "escape",
            Self::Evaluate => "evaluate",
            Self::Id => "id",
            Self::Pointer => "pointer",
            Self::Qty => "qty",
            Self::Reference => "reference",
            Self::Translate => "translate",
            Self::Truncate => "truncate",
            Self::Uuid => "uuid",
        }
    }
}
impl ::std::fmt::Debug for StructureMapTransform {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StructureMapTransform {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StructureMapTransform {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StructureMapTransform {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StructureMapTransform> for Coding {
    fn from(code: StructureMapTransform) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/map-transform".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StructureMapTransform> for CodeableConcept {
    fn from(code: StructureMapTransform) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[StudyDesign](http://hl7.org/fhir/ValueSet/study-design)**. This is a set of terms for study design characteristics.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum StudyDesign {
    /** **SEVCO:01001**

Interventional research. A study design in which an independent variable (an exposure or intervention) is prospectively assigned or modified by the investigator to evaluate a response in the dependent variable (an effect or outcome). */
    Sevco01001,
    /** **SEVCO:01002**

Observational research. A study design in which the independent variables (exposures or interventions) are not prospectively assigned or modified by the investigator.  */
    Sevco01002,
    /** **SEVCO:01003**

randomized assignment. An interventional study design in which an independent variable (an exposure or intervention) is prospectively assigned or modified by random chance to separate groups. */
    Sevco01003,
    /** **SEVCO:01004**

Quasi-Randomized assignment. An interventional study design with a method of allocation that is not limited to random chance but is intended to produce similar baseline groups for experimentation. */
    Sevco01004,
    /** **SEVCO:01005**

Non-randomized assignment. An interventional study design in which an independent variable (an exposure or intervention) is prospectively assigned or modified by methods other than random chance to separate groups. */
    Sevco01005,
    /** **SEVCO:01006**

simple randomization. A randomized assignment in which each participant has the same prespecified likelihood of being assigned to a group as all other participants, independent of the assignment of any other participant. */
    Sevco01006,
    /** **SEVCO:01007**

stratified randomization. A randomized assignment in which participants are stratified into groups based on prognostic variables and then randomized into balanced treatment groups */
    Sevco01007,
    /** **SEVCO:01008**

block randomization. A randomized assignment in which a pre-specified number of subjects is assigned to a block containing the same pre-specified ratio of group assignments in random order. */
    Sevco01008,
    /** **SEVCO:01009**

adaptive randomization. A randomized assignment in which a participant’s group assignment probability is adjusted based on any factor such that the likelihood of assignment is not the same for all participants. */
    Sevco01009,
    /** **SEVCO:01010**

Comparative study design. A study design in which two or more groups are compared. */
    Sevco01010,
    /** **SEVCO:01011**

Parallel cohort design. A comparative study design in which the groups are compared concurrently and participants are expected to remain in the groups being compared for the entire duration of participation in the study. */
    Sevco01011,
    /** **SEVCO:01012**

Crossover cohort design. A comparative study design in which participants receive two or more alternative exposures during separate periods of time. */
    Sevco01012,
    /** **SEVCO:01013**

Case control design. A comparative study design in which the groups being compared are defined by outcome presence (case) or absence (control). */
    Sevco01013,
    /** **SEVCO:01014**

Matching for comparison. A comparative study design in which individual participants in different groups being compared are paired or matched into sets based on selected attributes for within-set analysis. */
    Sevco01014,
    /** **SEVCO:01015**

Cluster as unit of allocation. A comparative study design in which participants are allocated to exposures (interventions) by their membership in groups (called clusters) rather than by individualized assignments. */
    Sevco01015,
    /** **SEVCO:01016**

Uncontrolled cohort design. A non-comparative study design in which two or more participants are evaluated in a single group (or cohort). */
    Sevco01016,
    /** **SEVCO:01017**

Case report. A non-comparative study design in which a single participant is evaluated. */
    Sevco01017,
    /** **SEVCO:01018**

Time series design. A longitudinal data collection which includes a set of time-ordered observations. */
    Sevco01018,
    /** **SEVCO:01019**

Before and after comparison. A time series design which includes comparisons of observations before and after an event or exposure. */
    Sevco01019,
    /** **SEVCO:01020**

Family study design. A matched study design in which related or non-related family members are compared. */
    Sevco01020,
    /** **SEVCO:01021**

Twin study design. A family study design in which twin siblings are compared. */
    Sevco01021,
    /** **SEVCO:01022**

Population-based design. A study design in which the unit of observation is a population or community.  */
    Sevco01022,
    /** **SEVCO:01023**

Non-comparative study design. A study design with no comparisons between groups with different exposures and no comparisons between groups with different outcomes. */
    Sevco01023,
    /** **SEVCO:01024**

Controlled crossover cohort design. A crossover cohort design in which two or more cohorts have different orders of exposures. */
    Sevco01024,
    /** **SEVCO:01025**

Single-arm crossover design. A crossover cohort design in which all participants are in a single cohort with the same order of exposures. */
    Sevco01025,
    /** **SEVCO:01026**

Real world data collection. A study design process in which the study data are obtained from a source of data collected during a routine process in the natural environment rather than using a process designed or controlled by the researcher. */
    Sevco01026,
    /** **SEVCO:01027**

Cross sectional data collection . A study design process in which data is collected at a single point in time. */
    Sevco01027,
    /** **SEVCO:01028**

Longitudinal data collection. A study design process in which data is collected at two or more points in time. */
    Sevco01028,
    /** **SEVCO:01029**

Clinical trial. Interventional research in which one or more healthcare-related actions (i.e., a diagnostic, prognostic, therapeutic, preventive or screening method or intervention) is evaluated for effects on health-related biomedical or behavioral processes and/or outcomes. */
    Sevco01029,
    /** **SEVCO:01030**

Phase 1 trial. A clinical trial to gather initial evidence in humans to support further investigation of an intervention. */
    Sevco01030,
    /** **SEVCO:01031**

Exploratory investigational new drug study. A clinical trial that is conducted early in phase 1, involves very limited human exposure, and has no therapeutic or diagnostic intent (e.g., screening studies, microdose studies).  */
    Sevco01031,
    /** **SEVCO:01032**

Phase 1/Phase 2 trial.  A clinical trial with a component meeting the definition of phase 1 trial and a component meeting the definition of phase 2 trial. */
    Sevco01032,
    /** **SEVCO:01033**

Phase 2 trial. A clinical trial to gather evidence of effectiveness and safety for an intervention in patients with the disease or condition under study, but not intended to provide an adequate basis for regulatory approval for clinical use. */
    Sevco01033,
    /** **SEVCO:01034**

Phase 2/Phase 3 trial. A clinical trial with a component meeting the definition of phase 2 trial and a component meeting the definition of phase 3 trial. */
    Sevco01034,
    /** **SEVCO:01035**

Phase 3 Trial. A clinical trial to gather the evidence of effectiveness and safety of an intervention, intended to provide an adequate basis for regulatory approval for clinical use. */
    Sevco01035,
    /** **SEVCO:01036**

Post-marketing study. A clinical trial to gather additional evidence of effectiveness and safety of an intervention for an already approved clinical use. */
    Sevco01036,
    /** **SEVCO:01037**

Post-Marketing Surveillance study. An observational study to identify adverse events related to the use of an approved clinical intervention. */
    Sevco01037,
    /** **SEVCO:01038**

Expanded Access study. A clinical trial that provides a means for obtaining an experimental drug or device for patients who are not adequately treated by existing therapy, who do not meet the eligibility criteria for enrollment, or who are otherwise unable to participate in another clinical study.  */
    Sevco01038,
    /** **SEVCO:01039**

Real world data collection from healthcare records. Real world data collection from data obtained routinely for a purpose of recording healthcare delivery in a record controlled by a healthcare professional. */
    Sevco01039,
    /** **SEVCO:01040**

Real world data collection from healthcare financing records. Real world data collection from data obtained routinely for a purpose of recording healthcare financing. */
    Sevco01040,
    /** **SEVCO:01041**

Pragmatic clinical trial. A clinical trial conducted under conditions of routine clinical practice. */
    Sevco01041,
    /** **SEVCO:01042**

Secondary data collection from a registry. A study design process in which the data are collected from a system organized to obtain and maintain uniform data for discovery and analysis, and this system is organized prior to the current study. */
    Sevco01042,
    /** **SEVCO:01043**

Multicentric. A study design feature in which two or more institutions are responsible for the conduct of the study. */
    Sevco01043,
    /** **SEVCO:01044**

Ecological design. A study design in which the unit of observation is a population or community defined by social relationships or physical surroundings.  */
    Sevco01044,
    /** **SEVCO:01045**

Primary data collection. A study design process in which the data are recorded and collected during the study for the purpose of the same study. */
    Sevco01045,
    /** **SEVCO:01046**

Real world data collection from monitoring procedures. Real world data collection from data obtained routinely for a purpose of repeated testing. */
    Sevco01046,
    /** **SEVCO:01048**

Real world data collection from testing procedures. Real world data collection from data obtained routinely for a purpose of testing, such as diagnostic testing or screening examination. */
    Sevco01048,
    /** **SEVCO:01049**

Secondary data collection from prior research. A study design process in which the data are collected from data obtained during a different study than the current study. */
    Sevco01049,
    /** **SEVCO:01050**

Real world data collection from personal health records. Real world data collection from data obtained routinely for a purpose of recording data related to personal health in a record controlled by the person, guardian, or caretaker. */
    Sevco01050,
    /** **SEVCO:01051**

Multisite data collection. A study design process in which data are collected from two or more geographic locations. */
    Sevco01051,
    /** **SEVCO:01052**

Includes patient-reported outcome. A study design feature in which one or more outcomes are reported directly from the patient without interpretation by a clinician or researcher. */
    Sevco01052,
    /** **SEVCO:01053**

Includes patient-centered outcome. A study design feature in which one or more measures are outcomes that patients directly care about, i.e. outcomes that are directly related to patients' experience of their life. */
    Sevco01053,
    /** **SEVCO:01054**

Includes disease-oriented outcome. A study design feature in which one or more measures are outcomes that relate to a health or illness condition but are not outcomes which patients directly care about. */
    Sevco01054,
    /** **SEVCO:01060**

Blinding of study participants. A study design process in which study participants are not informed of their intervention assignment. */
    Sevco01060,
    /** **SEVCO:01061**

Blinding of intervention providers. A study design process in which the people administering the intervention are not informed of the intervention assignment. */
    Sevco01061,
    /** **SEVCO:01062**

Blinding of outcome assessors. A study design process in which the people determining the outcome are not informed of the intervention assignment. */
    Sevco01062,
    /** **SEVCO:01063**

Blinding of data analysts. A study design process in which the people managing or processing the data and statistical analysis are not informed of the intervention assignment. */
    Sevco01063,
    /** **SEVCO:01064**

Allocation concealment. A study design process in which all parties influencing study enrollment and allocation to study groups are unaware of the group assignment for the study participant at the time of enrollment and allocation. */
    Sevco01064,
    /** **SEVCO:01085**

Includes process measure. A study design feature in which one or more outcomes are actions or behaviors of a healthcare professional or care team. */
    Sevco01085,
    /** **SEVCO:01086**

Quantitative analysis. A study design process in which data are analyzed with mathematical or statistical methods and formulas. */
    Sevco01086,
    /** **SEVCO:01087**

Qualitative analysis. A study design process in which data are analyzed, without primary reliance on mathematical or statistical techniques, by coding and organizing data to provide interpretation or understanding of experiences or hypotheses. */
    Sevco01087,
    /** **SEVCO:01088**

Comparison Goal. A study design feature in which the study intent is to compare two or more interventions or exposures. */
    Sevco01088,
    /** **SEVCO:01089**

Study Goal. A study design feature specifying the intent of the study. */
    Sevco01089,
    /** **SEVCO:01090**

Comparative Efficacy Goal. A study design feature in which the study intent is to compare two or more interventions with respect to effectiveness in ideal conditions. */
    Sevco01090,
    /** **SEVCO:01091**

Comparative Effectiveness Goal. A study design feature in which the study intent is to compare two or more interventions with respect to benefits and/or harms. */
    Sevco01091,
    /** **SEVCO:01092**

Comparative Safety Goal. A study design feature in which the study intent is to compare two or more interventions with respect to harms. */
    Sevco01092,
    /** **SEVCO:01093**

Equivalence Goal. A study goal with the intent to compare two or more interventions or exposures and determine that any difference in effects is within a prespecified range representing absence of a meaningful difference. */
    Sevco01093,
    /** **SEVCO:01094**

Non-inferiority Goal. A study goal with the intent to compare two or more interventions or exposures and determine that any difference in effects is below a prespecified value representing a threshold between a meaningful difference and absence of a meaningful difference. */
    Sevco01094,
    /** **SEVCO:01095**

Superiority Goal. A study goal with the intent to compare two or more interventions or exposures and detect a difference in effects. */
    Sevco01095,
    /** **SEVCO:01096**

Evaluation Goal. A study goal to assess the efficiency, effectiveness, and impact of a given program, process, person or piece of equipment. */
    Sevco01096,
    /** **SEVCO:01097**

Derivation Goal. A study goal with the intent to generate a predictive algorithm. */
    Sevco01097,
    /** **SEVCO:01098**

Validation Goal. A study goal with the intent to determine the reliability and/or performance of a procedure for a specific predictive, classification, measurement, or communication purpose. */
    Sevco01098,
}
impl ::core::str::FromStr for StudyDesign {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "SEVCO:01001" => Ok(Self::Sevco01001),
            "SEVCO:01002" => Ok(Self::Sevco01002),
            "SEVCO:01003" => Ok(Self::Sevco01003),
            "SEVCO:01004" => Ok(Self::Sevco01004),
            "SEVCO:01005" => Ok(Self::Sevco01005),
            "SEVCO:01006" => Ok(Self::Sevco01006),
            "SEVCO:01007" => Ok(Self::Sevco01007),
            "SEVCO:01008" => Ok(Self::Sevco01008),
            "SEVCO:01009" => Ok(Self::Sevco01009),
            "SEVCO:01010" => Ok(Self::Sevco01010),
            "SEVCO:01011" => Ok(Self::Sevco01011),
            "SEVCO:01012" => Ok(Self::Sevco01012),
            "SEVCO:01013" => Ok(Self::Sevco01013),
            "SEVCO:01014" => Ok(Self::Sevco01014),
            "SEVCO:01015" => Ok(Self::Sevco01015),
            "SEVCO:01016" => Ok(Self::Sevco01016),
            "SEVCO:01017" => Ok(Self::Sevco01017),
            "SEVCO:01018" => Ok(Self::Sevco01018),
            "SEVCO:01019" => Ok(Self::Sevco01019),
            "SEVCO:01020" => Ok(Self::Sevco01020),
            "SEVCO:01021" => Ok(Self::Sevco01021),
            "SEVCO:01022" => Ok(Self::Sevco01022),
            "SEVCO:01023" => Ok(Self::Sevco01023),
            "SEVCO:01024" => Ok(Self::Sevco01024),
            "SEVCO:01025" => Ok(Self::Sevco01025),
            "SEVCO:01026" => Ok(Self::Sevco01026),
            "SEVCO:01027" => Ok(Self::Sevco01027),
            "SEVCO:01028" => Ok(Self::Sevco01028),
            "SEVCO:01029" => Ok(Self::Sevco01029),
            "SEVCO:01030" => Ok(Self::Sevco01030),
            "SEVCO:01031" => Ok(Self::Sevco01031),
            "SEVCO:01032" => Ok(Self::Sevco01032),
            "SEVCO:01033" => Ok(Self::Sevco01033),
            "SEVCO:01034" => Ok(Self::Sevco01034),
            "SEVCO:01035" => Ok(Self::Sevco01035),
            "SEVCO:01036" => Ok(Self::Sevco01036),
            "SEVCO:01037" => Ok(Self::Sevco01037),
            "SEVCO:01038" => Ok(Self::Sevco01038),
            "SEVCO:01039" => Ok(Self::Sevco01039),
            "SEVCO:01040" => Ok(Self::Sevco01040),
            "SEVCO:01041" => Ok(Self::Sevco01041),
            "SEVCO:01042" => Ok(Self::Sevco01042),
            "SEVCO:01043" => Ok(Self::Sevco01043),
            "SEVCO:01044" => Ok(Self::Sevco01044),
            "SEVCO:01045" => Ok(Self::Sevco01045),
            "SEVCO:01046" => Ok(Self::Sevco01046),
            "SEVCO:01048" => Ok(Self::Sevco01048),
            "SEVCO:01049" => Ok(Self::Sevco01049),
            "SEVCO:01050" => Ok(Self::Sevco01050),
            "SEVCO:01051" => Ok(Self::Sevco01051),
            "SEVCO:01052" => Ok(Self::Sevco01052),
            "SEVCO:01053" => Ok(Self::Sevco01053),
            "SEVCO:01054" => Ok(Self::Sevco01054),
            "SEVCO:01060" => Ok(Self::Sevco01060),
            "SEVCO:01061" => Ok(Self::Sevco01061),
            "SEVCO:01062" => Ok(Self::Sevco01062),
            "SEVCO:01063" => Ok(Self::Sevco01063),
            "SEVCO:01064" => Ok(Self::Sevco01064),
            "SEVCO:01085" => Ok(Self::Sevco01085),
            "SEVCO:01086" => Ok(Self::Sevco01086),
            "SEVCO:01087" => Ok(Self::Sevco01087),
            "SEVCO:01088" => Ok(Self::Sevco01088),
            "SEVCO:01089" => Ok(Self::Sevco01089),
            "SEVCO:01090" => Ok(Self::Sevco01090),
            "SEVCO:01091" => Ok(Self::Sevco01091),
            "SEVCO:01092" => Ok(Self::Sevco01092),
            "SEVCO:01093" => Ok(Self::Sevco01093),
            "SEVCO:01094" => Ok(Self::Sevco01094),
            "SEVCO:01095" => Ok(Self::Sevco01095),
            "SEVCO:01096" => Ok(Self::Sevco01096),
            "SEVCO:01097" => Ok(Self::Sevco01097),
            "SEVCO:01098" => Ok(Self::Sevco01098),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for StudyDesign {
    fn as_ref(&self) -> &str {
        match self {
            Self::Sevco01001 => "SEVCO:01001",
            Self::Sevco01002 => "SEVCO:01002",
            Self::Sevco01003 => "SEVCO:01003",
            Self::Sevco01004 => "SEVCO:01004",
            Self::Sevco01005 => "SEVCO:01005",
            Self::Sevco01006 => "SEVCO:01006",
            Self::Sevco01007 => "SEVCO:01007",
            Self::Sevco01008 => "SEVCO:01008",
            Self::Sevco01009 => "SEVCO:01009",
            Self::Sevco01010 => "SEVCO:01010",
            Self::Sevco01011 => "SEVCO:01011",
            Self::Sevco01012 => "SEVCO:01012",
            Self::Sevco01013 => "SEVCO:01013",
            Self::Sevco01014 => "SEVCO:01014",
            Self::Sevco01015 => "SEVCO:01015",
            Self::Sevco01016 => "SEVCO:01016",
            Self::Sevco01017 => "SEVCO:01017",
            Self::Sevco01018 => "SEVCO:01018",
            Self::Sevco01019 => "SEVCO:01019",
            Self::Sevco01020 => "SEVCO:01020",
            Self::Sevco01021 => "SEVCO:01021",
            Self::Sevco01022 => "SEVCO:01022",
            Self::Sevco01023 => "SEVCO:01023",
            Self::Sevco01024 => "SEVCO:01024",
            Self::Sevco01025 => "SEVCO:01025",
            Self::Sevco01026 => "SEVCO:01026",
            Self::Sevco01027 => "SEVCO:01027",
            Self::Sevco01028 => "SEVCO:01028",
            Self::Sevco01029 => "SEVCO:01029",
            Self::Sevco01030 => "SEVCO:01030",
            Self::Sevco01031 => "SEVCO:01031",
            Self::Sevco01032 => "SEVCO:01032",
            Self::Sevco01033 => "SEVCO:01033",
            Self::Sevco01034 => "SEVCO:01034",
            Self::Sevco01035 => "SEVCO:01035",
            Self::Sevco01036 => "SEVCO:01036",
            Self::Sevco01037 => "SEVCO:01037",
            Self::Sevco01038 => "SEVCO:01038",
            Self::Sevco01039 => "SEVCO:01039",
            Self::Sevco01040 => "SEVCO:01040",
            Self::Sevco01041 => "SEVCO:01041",
            Self::Sevco01042 => "SEVCO:01042",
            Self::Sevco01043 => "SEVCO:01043",
            Self::Sevco01044 => "SEVCO:01044",
            Self::Sevco01045 => "SEVCO:01045",
            Self::Sevco01046 => "SEVCO:01046",
            Self::Sevco01048 => "SEVCO:01048",
            Self::Sevco01049 => "SEVCO:01049",
            Self::Sevco01050 => "SEVCO:01050",
            Self::Sevco01051 => "SEVCO:01051",
            Self::Sevco01052 => "SEVCO:01052",
            Self::Sevco01053 => "SEVCO:01053",
            Self::Sevco01054 => "SEVCO:01054",
            Self::Sevco01060 => "SEVCO:01060",
            Self::Sevco01061 => "SEVCO:01061",
            Self::Sevco01062 => "SEVCO:01062",
            Self::Sevco01063 => "SEVCO:01063",
            Self::Sevco01064 => "SEVCO:01064",
            Self::Sevco01085 => "SEVCO:01085",
            Self::Sevco01086 => "SEVCO:01086",
            Self::Sevco01087 => "SEVCO:01087",
            Self::Sevco01088 => "SEVCO:01088",
            Self::Sevco01089 => "SEVCO:01089",
            Self::Sevco01090 => "SEVCO:01090",
            Self::Sevco01091 => "SEVCO:01091",
            Self::Sevco01092 => "SEVCO:01092",
            Self::Sevco01093 => "SEVCO:01093",
            Self::Sevco01094 => "SEVCO:01094",
            Self::Sevco01095 => "SEVCO:01095",
            Self::Sevco01096 => "SEVCO:01096",
            Self::Sevco01097 => "SEVCO:01097",
            Self::Sevco01098 => "SEVCO:01098",
        }
    }
}
impl ::std::fmt::Debug for StudyDesign {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for StudyDesign {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for StudyDesign {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for StudyDesign {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<StudyDesign> for Coding {
    fn from(code: StudyDesign) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/study-design".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<StudyDesign> for CodeableConcept {
    fn from(code: StudyDesign) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubmitDataUpdateType](http://hl7.org/fhir/ValueSet/submit-data-update-type)**. Concepts for how a measure report consumer and receiver coordinate data exchange updates. The choices are snapshot or incremental updates\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubmitDataUpdateType {
    /** **incremental**

Incremental. In contrast to the Snapshot Update, the FHIR Parameters resource used in a Submit Data or the Collect Data scenario contains only the new and updated DEQM and QI Core Profiles since the last transaction. If the Consumer supports incremental updates, the contents of the updated payload updates the previous payload data. */
    Incremental,
    /** **snapshot**

Snapshot. In contrast to the Incremental Update, the FHIR Parameters resource used in a Submit Data or the Collect Data scenario contains all the DEQM and QI Core Profiles for each transaction.  If the Consumer supports snapshot updates, the contents of the updated payload entirely replaces the previous payload */
    Snapshot,
}
impl ::core::str::FromStr for SubmitDataUpdateType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "incremental" => Ok(Self::Incremental),
            "snapshot" => Ok(Self::Snapshot),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubmitDataUpdateType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Incremental => "incremental",
            Self::Snapshot => "snapshot",
        }
    }
}
impl ::std::fmt::Debug for SubmitDataUpdateType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubmitDataUpdateType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubmitDataUpdateType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubmitDataUpdateType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubmitDataUpdateType> for Coding {
    fn from(code: SubmitDataUpdateType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/submit-data-update-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubmitDataUpdateType> for CodeableConcept {
    fn from(code: SubmitDataUpdateType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubscriptionNotificationType](http://hl7.org/fhir/ValueSet/subscription-notification-type)**. The type of notification represented by the status message.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubscriptionNotificationType {
    /** **event-notification**

Event Notification. The status was generated for an event to the subscriber. */
    EventNotification,
    /** **handshake**

Handshake. The status was generated as part of the setup or verification of a communications channel. */
    Handshake,
    /** **heartbeat**

Heartbeat. The status was generated to perform a heartbeat notification to the subscriber. */
    Heartbeat,
    /** **query-event**

Query Event. The status was generated in response to an event query/request. */
    QueryEvent,
    /** **query-status**

Query Status. The status was generated in response to a status query/request. */
    QueryStatus,
}
impl ::core::str::FromStr for SubscriptionNotificationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "event-notification" => Ok(Self::EventNotification),
            "handshake" => Ok(Self::Handshake),
            "heartbeat" => Ok(Self::Heartbeat),
            "query-event" => Ok(Self::QueryEvent),
            "query-status" => Ok(Self::QueryStatus),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubscriptionNotificationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::EventNotification => "event-notification",
            Self::Handshake => "handshake",
            Self::Heartbeat => "heartbeat",
            Self::QueryEvent => "query-event",
            Self::QueryStatus => "query-status",
        }
    }
}
impl ::std::fmt::Debug for SubscriptionNotificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubscriptionNotificationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubscriptionNotificationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubscriptionNotificationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubscriptionNotificationType> for Coding {
    fn from(code: SubscriptionNotificationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/subscription-notification-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubscriptionNotificationType> for CodeableConcept {
    fn from(code: SubscriptionNotificationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubscriptionPayloadContent](http://hl7.org/fhir/ValueSet/subscription-payload-content)**. Codes to represent how much resource content to send in the notification payload.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubscriptionPayloadContent {
    /** **empty**

Empty. No resource content is transacted in the notification payload. */
    Empty,
    /** **full-resource**

Full-resource. The entire resource is transacted in the notification payload. */
    FullResource,
    /** **id-only**

Id-only. Only the resource id is transacted in the notification payload. */
    IdOnly,
}
impl ::core::str::FromStr for SubscriptionPayloadContent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "empty" => Ok(Self::Empty),
            "full-resource" => Ok(Self::FullResource),
            "id-only" => Ok(Self::IdOnly),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubscriptionPayloadContent {
    fn as_ref(&self) -> &str {
        match self {
            Self::Empty => "empty",
            Self::FullResource => "full-resource",
            Self::IdOnly => "id-only",
        }
    }
}
impl ::std::fmt::Debug for SubscriptionPayloadContent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubscriptionPayloadContent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubscriptionPayloadContent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubscriptionPayloadContent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubscriptionPayloadContent> for Coding {
    fn from(code: SubscriptionPayloadContent) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/subscription-payload-content".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubscriptionPayloadContent> for CodeableConcept {
    fn from(code: SubscriptionPayloadContent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubscriptionStatus](http://hl7.org/fhir/subscription-status)**. This codesystem defines a set of codes that can be used to filter Subscription triggers.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum SubscriptionStatus {
    /** **active**

Active. The subscription is active. */
    Active,
    /** **entered-in-error**

Entered in Error. This subscription has been flagged as incorrect. */
    EnteredInError,
    /** **error**

Error. The server has an error executing the notification. */
    Error,
    /** **off**

Off. Too many errors have occurred or the subscription has expired. */
    Off,
    /** **requested**

Requested. The client has requested the subscription, and the server has not yet set it up. */
    Requested,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for SubscriptionStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "entered-in-error" => Ok(Self::EnteredInError),
            "error" => Ok(Self::Error),
            "off" => Ok(Self::Off),
            "requested" => Ok(Self::Requested),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for SubscriptionStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::EnteredInError => "entered-in-error",
            Self::Error => "error",
            Self::Off => "off",
            Self::Requested => "requested",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for SubscriptionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubscriptionStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubscriptionStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubscriptionStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubscriptionStatus> for Coding {
    fn from(code: SubscriptionStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/subscription-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubscriptionStatus> for CodeableConcept {
    fn from(code: SubscriptionStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceAmountType](http://hl7.org/fhir/ValueSet/substance-amount-type)**. The type of a numeric quantity measurement.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceAmountType {
    /** **Approximately**

Approximately. */
    Approximately,
    /** **Average**

Average. */
    Average,
    /** **LessThan**

Less Than. */
    LessThan,
    /** **MoreThan**

More Than. */
    MoreThan,
}
impl ::core::str::FromStr for SubstanceAmountType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Approximately" => Ok(Self::Approximately),
            "Average" => Ok(Self::Average),
            "LessThan" => Ok(Self::LessThan),
            "MoreThan" => Ok(Self::MoreThan),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceAmountType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Approximately => "Approximately",
            Self::Average => "Average",
            Self::LessThan => "LessThan",
            Self::MoreThan => "MoreThan",
        }
    }
}
impl ::std::fmt::Debug for SubstanceAmountType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceAmountType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceAmountType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceAmountType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceAmountType> for Coding {
    fn from(code: SubstanceAmountType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-amount-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceAmountType> for CodeableConcept {
    fn from(code: SubstanceAmountType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceForm](http://hl7.org/fhir/ValueSet/substance-form)**. SubstanceForm\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceForm {
    /** **base**

Base of substance. */
    Base,
    /** **salt**

Salt of substance. */
    Salt,
}
impl ::core::str::FromStr for SubstanceForm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "base" => Ok(Self::Base),
            "salt" => Ok(Self::Salt),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceForm {
    fn as_ref(&self) -> &str {
        match self {
            Self::Base => "base",
            Self::Salt => "salt",
        }
    }
}
impl ::std::fmt::Debug for SubstanceForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceForm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceForm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceForm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceForm> for Coding {
    fn from(code: SubstanceForm) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/substance-form".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceForm> for CodeableConcept {
    fn from(code: SubstanceForm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceGrade](http://hl7.org/fhir/ValueSet/substance-grade)**. SubstanceGrade\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceGrade {
    /** **BP**

British Pharmacopoeia. */
    Bp,
    /** **CompanyStandard**

Company Standard. */
    CompanyStandard,
    /** **JP**

Japanese Pharmacopoeia. */
    Jp,
    /** **Ph.Eur**

European Pharmacopoeia. */
    PhEur,
    /** **USP-NF**

USP/NF United States Pharmacopeia (USP) and the National Formulary (NF). */
    UspNf,
}
impl ::core::str::FromStr for SubstanceGrade {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "BP" => Ok(Self::Bp),
            "CompanyStandard" => Ok(Self::CompanyStandard),
            "JP" => Ok(Self::Jp),
            "Ph.Eur" => Ok(Self::PhEur),
            "USP-NF" => Ok(Self::UspNf),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceGrade {
    fn as_ref(&self) -> &str {
        match self {
            Self::Bp => "BP",
            Self::CompanyStandard => "CompanyStandard",
            Self::Jp => "JP",
            Self::PhEur => "Ph.Eur",
            Self::UspNf => "USP-NF",
        }
    }
}
impl ::std::fmt::Debug for SubstanceGrade {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceGrade {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceGrade {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceGrade {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceGrade> for Coding {
    fn from(code: SubstanceGrade) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/substance-grade".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceGrade> for CodeableConcept {
    fn from(code: SubstanceGrade) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceNameAuthority](http://hl7.org/fhir/ValueSet/substance-name-authority)**. SubstanceNameAuthority\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceNameAuthority {
    /** **BAN**

BAN. */
    Ban,
    /** **COSING**

COSING. */
    Cosing,
    /** **FCC**

FCC. */
    Fcc,
    /** **HAB**

HAB. */
    Hab,
    /** **INCI**

INCI. */
    Inci,
    /** **INN**

INN. */
    Inn,
    /** **IUIS**

IUIS. */
    Iuis,
    /** **JAN**

JAN. */
    Jan,
    /** **JECFA**

JECFA. */
    Jecfa,
    /** **MARTINDALE**

MARTINDALE. */
    Martindale,
    /** **PHF**

PHF. */
    Phf,
    /** **Ph.Eur.**

Ph.Eur.. */
    PhEur,
    /** **PhF**

PhF (Pharmacopée française). */
    PhF,
    /** **USAN**

USAN. */
    Usan,
    /** **USP**

USP. */
    Usp,
}
impl ::core::str::FromStr for SubstanceNameAuthority {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "BAN" => Ok(Self::Ban),
            "COSING" => Ok(Self::Cosing),
            "FCC" => Ok(Self::Fcc),
            "HAB" => Ok(Self::Hab),
            "INCI" => Ok(Self::Inci),
            "INN" => Ok(Self::Inn),
            "IUIS" => Ok(Self::Iuis),
            "JAN" => Ok(Self::Jan),
            "JECFA" => Ok(Self::Jecfa),
            "MARTINDALE" => Ok(Self::Martindale),
            "PHF" => Ok(Self::Phf),
            "Ph.Eur." => Ok(Self::PhEur),
            "PhF" => Ok(Self::PhF),
            "USAN" => Ok(Self::Usan),
            "USP" => Ok(Self::Usp),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceNameAuthority {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ban => "BAN",
            Self::Cosing => "COSING",
            Self::Fcc => "FCC",
            Self::Hab => "HAB",
            Self::Inci => "INCI",
            Self::Inn => "INN",
            Self::Iuis => "IUIS",
            Self::Jan => "JAN",
            Self::Jecfa => "JECFA",
            Self::Martindale => "MARTINDALE",
            Self::Phf => "PHF",
            Self::PhEur => "Ph.Eur.",
            Self::PhF => "PhF",
            Self::Usan => "USAN",
            Self::Usp => "USP",
        }
    }
}
impl ::std::fmt::Debug for SubstanceNameAuthority {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceNameAuthority {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceNameAuthority {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceNameAuthority {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceNameAuthority> for Coding {
    fn from(code: SubstanceNameAuthority) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-name-authority".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceNameAuthority> for CodeableConcept {
    fn from(code: SubstanceNameAuthority) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceNameDomain](http://hl7.org/fhir/ValueSet/substance-name-domain)**. SubstanceNameDomain\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceNameDomain {
    /** **ActiveIngredient**

Active Ingredient. */
    ActiveIngredient,
    /** **FoodColorAdditive**

Food Color Additive. */
    FoodColorAdditive,
}
impl ::core::str::FromStr for SubstanceNameDomain {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ActiveIngredient" => Ok(Self::ActiveIngredient),
            "FoodColorAdditive" => Ok(Self::FoodColorAdditive),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceNameDomain {
    fn as_ref(&self) -> &str {
        match self {
            Self::ActiveIngredient => "ActiveIngredient",
            Self::FoodColorAdditive => "FoodColorAdditive",
        }
    }
}
impl ::std::fmt::Debug for SubstanceNameDomain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceNameDomain {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceNameDomain {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceNameDomain {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceNameDomain> for Coding {
    fn from(code: SubstanceNameDomain) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-name-domain".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceNameDomain> for CodeableConcept {
    fn from(code: SubstanceNameDomain) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceNameType](http://hl7.org/fhir/ValueSet/substance-name-type)**. SubstanceNameType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceNameType {
    /** **Brand**

brand. */
    Brand,
    /** **Scientific**

scientific. */
    Scientific,
    /** **Systematic**

systematic. */
    Systematic,
}
impl ::core::str::FromStr for SubstanceNameType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Brand" => Ok(Self::Brand),
            "Scientific" => Ok(Self::Scientific),
            "Systematic" => Ok(Self::Systematic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceNameType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Brand => "Brand",
            Self::Scientific => "Scientific",
            Self::Systematic => "Systematic",
        }
    }
}
impl ::std::fmt::Debug for SubstanceNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceNameType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceNameType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceNameType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceNameType> for Coding {
    fn from(code: SubstanceNameType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/substance-name-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceNameType> for CodeableConcept {
    fn from(code: SubstanceNameType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceOpticalActivity](http://hl7.org/fhir/ValueSet/substance-optical-activity)**. The optical rotation type of a substance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceOpticalActivity {
    /** **+**

dextrorotary. */
    Plus,
    /** **-**

levorotary. */
    Minus,
}
impl ::core::str::FromStr for SubstanceOpticalActivity {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "+" => Ok(Self::Plus),
            "-" => Ok(Self::Minus),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceOpticalActivity {
    fn as_ref(&self) -> &str {
        match self {
            Self::Plus => "+",
            Self::Minus => "-",
        }
    }
}
impl ::std::fmt::Debug for SubstanceOpticalActivity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceOpticalActivity {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceOpticalActivity {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceOpticalActivity {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceOpticalActivity> for Coding {
    fn from(code: SubstanceOpticalActivity) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-optical-activity".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceOpticalActivity> for CodeableConcept {
    fn from(code: SubstanceOpticalActivity) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceRelationshipType](http://hl7.org/fhir/ValueSet/substance-relationship-type)**. The relationship between two substance types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceRelationshipType {
    /** **ActiveMoiety**

Active moiety. */
    ActiveMoiety,
    /** **Impurity**

Impurity of. */
    Impurity,
    /** **Polymorph**

Polymorph of. */
    Polymorph,
    /** **Salt**

Salt to parent. */
    Salt,
    /** **StartingMaterial**

Starting material for. */
    StartingMaterial,
}
impl ::core::str::FromStr for SubstanceRelationshipType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ActiveMoiety" => Ok(Self::ActiveMoiety),
            "Impurity" => Ok(Self::Impurity),
            "Polymorph" => Ok(Self::Polymorph),
            "Salt" => Ok(Self::Salt),
            "StartingMaterial" => Ok(Self::StartingMaterial),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceRelationshipType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ActiveMoiety => "ActiveMoiety",
            Self::Impurity => "Impurity",
            Self::Polymorph => "Polymorph",
            Self::Salt => "Salt",
            Self::StartingMaterial => "StartingMaterial",
        }
    }
}
impl ::std::fmt::Debug for SubstanceRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceRelationshipType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceRelationshipType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceRelationshipType> for Coding {
    fn from(code: SubstanceRelationshipType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-relationship-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceRelationshipType> for CodeableConcept {
    fn from(code: SubstanceRelationshipType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceRepresentationFormat](http://hl7.org/fhir/ValueSet/substance-representation-format)**. SubstanceRepresentationFormat\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceRepresentationFormat {
    /** **CDX**

CDX. */
    Cdx,
    /** **InChI**

InChI. */
    InChI,
    /** **MOLFILE**

MOLFILE. */
    Molfile,
    /** **PDB**

PDB. */
    Pdb,
    /** **SDF**

SDF. */
    Sdf,
    /** **SMILES**

SMILES. */
    Smiles,
    /** **mmCIF**

mmCIF. */
    MmCif,
}
impl ::core::str::FromStr for SubstanceRepresentationFormat {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "CDX" => Ok(Self::Cdx),
            "InChI" => Ok(Self::InChI),
            "MOLFILE" => Ok(Self::Molfile),
            "PDB" => Ok(Self::Pdb),
            "SDF" => Ok(Self::Sdf),
            "SMILES" => Ok(Self::Smiles),
            "mmCIF" => Ok(Self::MmCif),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceRepresentationFormat {
    fn as_ref(&self) -> &str {
        match self {
            Self::Cdx => "CDX",
            Self::InChI => "InChI",
            Self::Molfile => "MOLFILE",
            Self::Pdb => "PDB",
            Self::Sdf => "SDF",
            Self::Smiles => "SMILES",
            Self::MmCif => "mmCIF",
        }
    }
}
impl ::std::fmt::Debug for SubstanceRepresentationFormat {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceRepresentationFormat {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceRepresentationFormat {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceRepresentationFormat {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceRepresentationFormat> for Coding {
    fn from(code: SubstanceRepresentationFormat) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-representation-format".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceRepresentationFormat> for CodeableConcept {
    fn from(code: SubstanceRepresentationFormat) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceRepresentationType](http://hl7.org/fhir/ValueSet/substance-representation-type)**. SubstanceRepresentationType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceRepresentationType {
    /** **Brand**

brand. */
    Brand,
    /** **Scientific**

scientific. */
    Scientific,
    /** **Systematic**

systematic. */
    Systematic,
}
impl ::core::str::FromStr for SubstanceRepresentationType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Brand" => Ok(Self::Brand),
            "Scientific" => Ok(Self::Scientific),
            "Systematic" => Ok(Self::Systematic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceRepresentationType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Brand => "Brand",
            Self::Scientific => "Scientific",
            Self::Systematic => "Systematic",
        }
    }
}
impl ::std::fmt::Debug for SubstanceRepresentationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceRepresentationType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceRepresentationType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceRepresentationType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceRepresentationType> for Coding {
    fn from(code: SubstanceRepresentationType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-representation-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceRepresentationType> for CodeableConcept {
    fn from(code: SubstanceRepresentationType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceSourceMaterialGenus](http://hl7.org/fhir/ValueSet/substance-source-material-genus)**. SubstanceSourceMaterialGenus\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceSourceMaterialGenus {
    /** **Ginkgo**

Ginkgo. */
    Ginkgo,
    /** **InfluenzavirusA**

Influenza A virus. */
    InfluenzavirusA,
    /** **Mycobacterium**

Mycobacterium. */
    Mycobacterium,
}
impl ::core::str::FromStr for SubstanceSourceMaterialGenus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Ginkgo" => Ok(Self::Ginkgo),
            "InfluenzavirusA" => Ok(Self::InfluenzavirusA),
            "Mycobacterium" => Ok(Self::Mycobacterium),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceSourceMaterialGenus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Ginkgo => "Ginkgo",
            Self::InfluenzavirusA => "InfluenzavirusA",
            Self::Mycobacterium => "Mycobacterium",
        }
    }
}
impl ::std::fmt::Debug for SubstanceSourceMaterialGenus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceSourceMaterialGenus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceSourceMaterialGenus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceSourceMaterialGenus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceSourceMaterialGenus> for Coding {
    fn from(code: SubstanceSourceMaterialGenus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-source-material-genus".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceSourceMaterialGenus> for CodeableConcept {
    fn from(code: SubstanceSourceMaterialGenus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceSourceMaterialPart](http://hl7.org/fhir/ValueSet/substance-source-material-part)**. SubstanceSourceMaterialPart\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceSourceMaterialPart {
    /** **Animal**

animal. */
    Animal,
    /** **Mineral**

mineral. */
    Mineral,
    /** **Plant**

plant. */
    Plant,
}
impl ::core::str::FromStr for SubstanceSourceMaterialPart {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Animal" => Ok(Self::Animal),
            "Mineral" => Ok(Self::Mineral),
            "Plant" => Ok(Self::Plant),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceSourceMaterialPart {
    fn as_ref(&self) -> &str {
        match self {
            Self::Animal => "Animal",
            Self::Mineral => "Mineral",
            Self::Plant => "Plant",
        }
    }
}
impl ::std::fmt::Debug for SubstanceSourceMaterialPart {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceSourceMaterialPart {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceSourceMaterialPart {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceSourceMaterialPart {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceSourceMaterialPart> for Coding {
    fn from(code: SubstanceSourceMaterialPart) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-source-material-part".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceSourceMaterialPart> for CodeableConcept {
    fn from(code: SubstanceSourceMaterialPart) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceSourceMaterialSpecies](http://hl7.org/fhir/ValueSet/substance-source-material-species)**. SubstanceSourceMaterialSpecies\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceSourceMaterialSpecies {
    /** **GinkgoBiloba**

Ginkgo biloba. */
    GinkgoBiloba,
    /** **OleaEuropaea**

Olea europaea. */
    OleaEuropaea,
}
impl ::core::str::FromStr for SubstanceSourceMaterialSpecies {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "GinkgoBiloba" => Ok(Self::GinkgoBiloba),
            "OleaEuropaea" => Ok(Self::OleaEuropaea),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceSourceMaterialSpecies {
    fn as_ref(&self) -> &str {
        match self {
            Self::GinkgoBiloba => "GinkgoBiloba",
            Self::OleaEuropaea => "OleaEuropaea",
        }
    }
}
impl ::std::fmt::Debug for SubstanceSourceMaterialSpecies {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceSourceMaterialSpecies {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceSourceMaterialSpecies {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceSourceMaterialSpecies {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceSourceMaterialSpecies> for Coding {
    fn from(code: SubstanceSourceMaterialSpecies) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-source-material-species"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceSourceMaterialSpecies> for CodeableConcept {
    fn from(code: SubstanceSourceMaterialSpecies) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceSourceMaterialType](http://hl7.org/fhir/ValueSet/substance-source-material-type)**. SubstanceSourceMaterialType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceSourceMaterialType {
    /** **Animal**

animal. */
    Animal,
    /** **Mineral**

mineral. */
    Mineral,
    /** **Plant**

plant. */
    Plant,
}
impl ::core::str::FromStr for SubstanceSourceMaterialType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Animal" => Ok(Self::Animal),
            "Mineral" => Ok(Self::Mineral),
            "Plant" => Ok(Self::Plant),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceSourceMaterialType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Animal => "Animal",
            Self::Mineral => "Mineral",
            Self::Plant => "Plant",
        }
    }
}
impl ::std::fmt::Debug for SubstanceSourceMaterialType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceSourceMaterialType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceSourceMaterialType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceSourceMaterialType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceSourceMaterialType> for Coding {
    fn from(code: SubstanceSourceMaterialType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-source-material-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceSourceMaterialType> for CodeableConcept {
    fn from(code: SubstanceSourceMaterialType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceStereochemistry](http://hl7.org/fhir/ValueSet/substance-stereochemistry)**. The stereochemistry type of a substance.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceStereochemistry {
    /** **ConstitutionalIsomer**

constitutional isomer. */
    ConstitutionalIsomer,
    /** **Enantiomer**

enantiomer. */
    Enantiomer,
    /** **Stereoisomer**

stereoisomer. */
    Stereoisomer,
}
impl ::core::str::FromStr for SubstanceStereochemistry {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ConstitutionalIsomer" => Ok(Self::ConstitutionalIsomer),
            "Enantiomer" => Ok(Self::Enantiomer),
            "Stereoisomer" => Ok(Self::Stereoisomer),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceStereochemistry {
    fn as_ref(&self) -> &str {
        match self {
            Self::ConstitutionalIsomer => "ConstitutionalIsomer",
            Self::Enantiomer => "Enantiomer",
            Self::Stereoisomer => "Stereoisomer",
        }
    }
}
impl ::std::fmt::Debug for SubstanceStereochemistry {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceStereochemistry {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceStereochemistry {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceStereochemistry {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceStereochemistry> for Coding {
    fn from(code: SubstanceStereochemistry) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-stereochemistry".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceStereochemistry> for CodeableConcept {
    fn from(code: SubstanceStereochemistry) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceStructureTechnique](http://hl7.org/fhir/ValueSet/substance-structure-technique)**. SubstanceStructureTechnique\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceStructureTechnique {
    /** **HPLC**

HPLC. */
    Hplc,
    /** **LigandBindingAssay**

Ligand binding assay. */
    LigandBindingAssay,
    /** **NMR**

NMR. */
    Nmr,
    /** **PeptideMapping**

Peptide mapping. */
    PeptideMapping,
    /** **X-Ray**

X-ray. */
    XRay,
}
impl ::core::str::FromStr for SubstanceStructureTechnique {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "HPLC" => Ok(Self::Hplc),
            "LigandBindingAssay" => Ok(Self::LigandBindingAssay),
            "NMR" => Ok(Self::Nmr),
            "PeptideMapping" => Ok(Self::PeptideMapping),
            "X-Ray" => Ok(Self::XRay),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceStructureTechnique {
    fn as_ref(&self) -> &str {
        match self {
            Self::Hplc => "HPLC",
            Self::LigandBindingAssay => "LigandBindingAssay",
            Self::Nmr => "NMR",
            Self::PeptideMapping => "PeptideMapping",
            Self::XRay => "X-Ray",
        }
    }
}
impl ::std::fmt::Debug for SubstanceStructureTechnique {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceStructureTechnique {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceStructureTechnique {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceStructureTechnique {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceStructureTechnique> for Coding {
    fn from(code: SubstanceStructureTechnique) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-structure-technique".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceStructureTechnique> for CodeableConcept {
    fn from(code: SubstanceStructureTechnique) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceWeightMethod](http://hl7.org/fhir/ValueSet/substance-weight-method)**. SubstanceWeightMethod\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceWeightMethod {
    /** **Calculated**

calculated. */
    Calculated,
    /** **End-groupAnalysis**

End-group analysis. */
    EndGroupAnalysis,
    /** **End-groupTitration**

End-group titration. */
    EndGroupTitration,
    /** **GelPermeationCentrifugation**

gel permeation centrifugation. */
    GelPermeationCentrifugation,
    /** **LighScattering**

light scattering. */
    LighScattering,
    /** **SDS-PAGE**

SDS-PAGE (sodium dodecyl sulfate-polyacrylamide gel electrophoresis). */
    SdsPage,
    /** **Size-ExclusionChromatography**

Size-exclusion chromatography. */
    SizeExclusionChromatography,
    /** **Viscosity**

viscosity. */
    Viscosity,
}
impl ::core::str::FromStr for SubstanceWeightMethod {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Calculated" => Ok(Self::Calculated),
            "End-groupAnalysis" => Ok(Self::EndGroupAnalysis),
            "End-groupTitration" => Ok(Self::EndGroupTitration),
            "GelPermeationCentrifugation" => Ok(Self::GelPermeationCentrifugation),
            "LighScattering" => Ok(Self::LighScattering),
            "SDS-PAGE" => Ok(Self::SdsPage),
            "Size-ExclusionChromatography" => Ok(Self::SizeExclusionChromatography),
            "Viscosity" => Ok(Self::Viscosity),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceWeightMethod {
    fn as_ref(&self) -> &str {
        match self {
            Self::Calculated => "Calculated",
            Self::EndGroupAnalysis => "End-groupAnalysis",
            Self::EndGroupTitration => "End-groupTitration",
            Self::GelPermeationCentrifugation => "GelPermeationCentrifugation",
            Self::LighScattering => "LighScattering",
            Self::SdsPage => "SDS-PAGE",
            Self::SizeExclusionChromatography => "Size-ExclusionChromatography",
            Self::Viscosity => "Viscosity",
        }
    }
}
impl ::std::fmt::Debug for SubstanceWeightMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceWeightMethod {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceWeightMethod {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceWeightMethod {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceWeightMethod> for Coding {
    fn from(code: SubstanceWeightMethod) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-weight-method".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceWeightMethod> for CodeableConcept {
    fn from(code: SubstanceWeightMethod) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SubstanceWeightType](http://hl7.org/fhir/ValueSet/substance-weight-type)**. SubstanceWeightType\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SubstanceWeightType {
    /** **Average**

number average. */
    Average,
    /** **Exact**

exact. */
    Exact,
    /** **WeightAverage**

weight average. */
    WeightAverage,
}
impl ::core::str::FromStr for SubstanceWeightType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Average" => Ok(Self::Average),
            "Exact" => Ok(Self::Exact),
            "WeightAverage" => Ok(Self::WeightAverage),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SubstanceWeightType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Average => "Average",
            Self::Exact => "Exact",
            Self::WeightAverage => "WeightAverage",
        }
    }
}
impl ::std::fmt::Debug for SubstanceWeightType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SubstanceWeightType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SubstanceWeightType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SubstanceWeightType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SubstanceWeightType> for Coding {
    fn from(code: SubstanceWeightType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/substance-weight-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SubstanceWeightType> for CodeableConcept {
    fn from(code: SubstanceWeightType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SupplyDeliveryStatus](http://hl7.org/fhir/ValueSet/supplydelivery-status)**. Status of the supply delivery.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SupplyDeliveryStatus {
    /** **abandoned**

Abandoned. Delivery was not completed. */
    Abandoned,
    /** **completed**

Delivered. Supply has been delivered ("completed"). */
    Completed,
    /** **entered-in-error**

Entered In Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "abandoned" rather than "entered-in-error".). */
    EnteredInError,
    /** **in-progress**

In Progress. Supply has been requested, but not delivered. */
    InProgress,
}
impl ::core::str::FromStr for SupplyDeliveryStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abandoned" => Ok(Self::Abandoned),
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SupplyDeliveryStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abandoned => "abandoned",
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
        }
    }
}
impl ::std::fmt::Debug for SupplyDeliveryStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SupplyDeliveryStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SupplyDeliveryStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SupplyDeliveryStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SupplyDeliveryStatus> for Coding {
    fn from(code: SupplyDeliveryStatus) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/supplydelivery-status".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SupplyDeliveryStatus> for CodeableConcept {
    fn from(code: SupplyDeliveryStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SupplyDeliverySupplyItemType](http://hl7.org/fhir/ValueSet/supplydelivery-supplyitemtype)**. Status of the supply delivery.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SupplyDeliverySupplyItemType {
    /** **biologicallyderivedproduct**

Biologically Derived Product. Supply is a kind of biologically derived product. */
    Biologicallyderivedproduct,
    /** **device**

Device. What is supplied (or requested) is a device. */
    Device,
    /** **medication**

Medication. Supply is a kind of medication. */
    Medication,
}
impl ::core::str::FromStr for SupplyDeliverySupplyItemType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "biologicallyderivedproduct" => Ok(Self::Biologicallyderivedproduct),
            "device" => Ok(Self::Device),
            "medication" => Ok(Self::Medication),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SupplyDeliverySupplyItemType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Biologicallyderivedproduct => "biologicallyderivedproduct",
            Self::Device => "device",
            Self::Medication => "medication",
        }
    }
}
impl ::std::fmt::Debug for SupplyDeliverySupplyItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SupplyDeliverySupplyItemType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SupplyDeliverySupplyItemType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SupplyDeliverySupplyItemType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SupplyDeliverySupplyItemType> for Coding {
    fn from(code: SupplyDeliverySupplyItemType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/supplydelivery-supplyitemtype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SupplyDeliverySupplyItemType> for CodeableConcept {
    fn from(code: SupplyDeliverySupplyItemType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[SupplyRequestStatus](http://hl7.org/fhir/ValueSet/supplyrequest-status)**. Status of the supply request.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum SupplyRequestStatus {
    /** **active**

Active. The request is ready to be acted upon. */
    Active,
    /** **cancelled**

Cancelled. The authorization/request to act has been terminated prior to the full completion of the intended actions.  No further activity should occur. */
    Cancelled,
    /** **completed**

Completed. Activity against the request has been sufficiently completed to the satisfaction of the requester. */
    Completed,
    /** **draft**

Draft. The request has been created but is not yet complete or ready for action. */
    Draft,
    /** **entered-in-error**

Entered in Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it.  (If real-world activity has occurred, the status should be "cancelled" rather than "entered-in-error".). */
    EnteredInError,
    /** **suspended**

Suspended. The authorization/request to act has been temporarily withdrawn but is expected to resume in the future. */
    Suspended,
    /** **unknown**

Unknown. The authoring/source system does not know which of the status values currently applies for this observation. Note: This concept is not to be used for "other" - one of the listed statuses is presumed to apply, but the authoring/source system does not know which. */
    Unknown,
}
impl ::core::str::FromStr for SupplyRequestStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "suspended" => Ok(Self::Suspended),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for SupplyRequestStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Suspended => "suspended",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for SupplyRequestStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for SupplyRequestStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for SupplyRequestStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for SupplyRequestStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<SupplyRequestStatus> for Coding {
    fn from(code: SupplyRequestStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/supplyrequest-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<SupplyRequestStatus> for CodeableConcept {
    fn from(code: SupplyRequestStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TargetSpecies](http://hl7.org/fhir/ValueSet/target-species)**. A species for which a medicinal product is intended.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TargetSpecies {
    /** **100000108874**

Dove. */
    N100000108874,
    /** **100000108875**

Quail. */
    N100000108875,
    /** **100000108876**

Snipe. */
    N100000108876,
    /** **100000108877**

Sparrow. */
    N100000108877,
    /** **100000108878**

Starling. */
    N100000108878,
    /** **100000108879**

Swan. */
    N100000108879,
    /** **100000108880**

Turkey hen. */
    N100000108880,
    /** **100000108881**

Turkey cock. */
    N100000108881,
    /** **100000108882**

Turkeys. */
    N100000108882,
    /** **100000108883**

Turkey for reproduction. */
    N100000108883,
    /** **100000108884**

Poult. */
    N100000108884,
    /** **100000108885**

Turtle dove. */
    N100000108885,
    /** **100000108886**

Bison. */
    N100000108886,
    /** **100000108887**

Buffalo. */
    N100000108887,
    /** **100000108888**

Cows. */
    N100000108888,
    /** **100000108889**

Cow for reproduction. */
    N100000108889,
    /** **100000108890**

Bull for reproduction. */
    N100000108890,
    /** **100000108891**

Ox. */
    N100000108891,
    /** **100000108892**

Bullock. */
    N100000108892,
    /** **100000108893**

Cattle. */
    N100000108893,
    /** **100000108894**

Beef cattle. */
    N100000108894,
    /** **100000108895**

Dairy cattle. */
    N100000108895,
    /** **100000108896**

Dry cow. */
    N100000108896,
    /** **100000108897**

Bull. */
    N100000108897,
    /** **100000108898**

Lactating cow. */
    N100000108898,
    /** **100000108899**

All other food producing species. */
    N100000108899,
    /** **100000108900**

All non-food producing species. */
    N100000108900,
    /** **100000108901**

All species  . */
    N100000108901,
    /** **100000108902**

Carnivores. */
    N100000108902,
    /** **100000108903**

Domestic animals. */
    N100000108903,
    /** **100000108904**

Fur animals. */
    N100000108904,
    /** **100000108905**

Game animals. */
    N100000108905,
    /** **100000108906**

Laboratory animals. */
    N100000108906,
    /** **100000108907**

Major species. */
    N100000108907,
    /** **100000108908**

Minor species. */
    N100000108908,
    /** **100000108909**

Ruminant. */
    N100000108909,
    /** **100000108910**

Ruminant and porcine. */
    N100000108910,
    /** **100000108911**

Small animals. */
    N100000108911,
    /** **100000108912**

Crocodile. */
    N100000108912,
    /** **100000108913**

Frog. */
    N100000108913,
    /** **100000108914**

Iguana. */
    N100000108914,
    /** **100000108915**

Lizard. */
    N100000108915,
    /** **100000108916**

Amphibians. */
    N100000108916,
    /** **100000108917**

Reptiles. */
    N100000108917,
    /** **100000108918**

Reptiles for production. */
    N100000108918,
    /** **100000108919**

Snake. */
    N100000108919,
    /** **100000108920**

Tortoise. */
    N100000108920,
    /** **100000108921**

Turtle. */
    N100000108921,
    /** **100000108922**

Honey bees. */
    N100000108922,
    /** **100000108923**

Crustacean. */
    N100000108923,
    /** **100000108924**

Spider. */
    N100000108924,
    /** **100000108925**

Indian hen. */
    N100000108925,
    /** **100000108926**

African Goshawk. */
    N100000108926,
    /** **100000108927**

Black Kite. */
    N100000108927,
    /** **100000108928**

Budgerigar. */
    N100000108928,
    /** **100000108929**

Bustard. */
    N100000108929,
    /** **100000108930**

Buzzard. */
    N100000108930,
    /** **100000108931**

Hen. */
    N100000108931,
    /** **100000108932**

Layer hen. */
    N100000108932,
    /** **100000108933**

Cock. */
    N100000108933,
    /** **100000108934**

Broiler. */
    N100000108934,
    /** **100000108935**

Chickens. */
    N100000108935,
    /** **100000108936**

Chicken embryonated eggs. */
    N100000108936,
    /** **100000108937**

Chicken for reproduction. */
    N100000108937,
    /** **100000108938**

Replacement chick. */
    N100000108938,
    /** **100000108939**

Chick. */
    N100000108939,
    /** **100000108940**

Pullet. */
    N100000108940,
    /** **100000108941**

Cockatiel. */
    N100000108941,
    /** **100000108942**

Cockatoo. */
    N100000108942,
    /** **100000108943**

Common canary. */
    N100000108943,
    /** **100000108944**

Crow. */
    N100000108944,
    /** **100000108945**

Duck. */
    N100000108945,
    /** **100000108946**

Duck broiler. */
    N100000108946,
    /** **100000108947**

Duckling. */
    N100000108947,
    /** **100000108948**

Eagle. */
    N100000108948,
    /** **100000108949**

Emu. */
    N100000108949,
    /** **100000108950**

Goose. */
    N100000108950,
    /** **100000108951**

Guinea fowl. */
    N100000108951,
    /** **100000108952**

Kestrel. */
    N100000108952,
    /** **100000108953**

Kite. */
    N100000108953,
    /** **100000108954**

Macaw. */
    N100000108954,
    /** **100000108955**

Ostrich. */
    N100000108955,
    /** **100000108956**

Birds. */
    N100000108956,
    /** **100000108957**

Fowls. */
    N100000108957,
    /** **100000108958**

Finch. */
    N100000108958,
    /** **100000108959**

Galliformes. */
    N100000108959,
    /** **100000108960**

Game birds. */
    N100000108960,
    /** **100000108961**

Pekin duck. */
    N100000108961,
    /** **100000108962**

Ornamental birds. */
    N100000108962,
    /** **100000108963**

Poultry. */
    N100000108963,
    /** **100000108964**

Owl. */
    N100000108964,
    /** **100000108965**

Parakeet. */
    N100000108965,
    /** **100000108966**

Parrot. */
    N100000108966,
    /** **100000108967**

Partridge. */
    N100000108967,
    /** **100000108968**

Peregrine Falcon. */
    N100000108968,
    /** **100000108969**

Pheasants. */
    N100000108969,
    /** **100000108970**

Carrier pigeon. */
    N100000108970,
    /** **100000108971**

Newborn calves. */
    N100000108971,
    /** **100000108972**

Pregnant cow. */
    N100000108972,
    /** **100000108973**

Pregnant heifer. */
    N100000108973,
    /** **100000108974**

Pre-ruminant cattle. */
    N100000108974,
    /** **100000108975**

Ruminant cattle. */
    N100000108975,
    /** **100000108976**

Wild cattle. */
    N100000108976,
    /** **100000108977**

Calf. */
    N100000108977,
    /** **100000108978**

Heifers. */
    N100000108978,
    /** **100000108979**

Other Bovids. */
    N100000108979,
    /** **100000108980**

Alpaca. */
    N100000108980,
    /** **100000108981**

Camel. */
    N100000108981,
    /** **100000108982**

Llama. */
    N100000108982,
    /** **100000108983**

Other Camelids. */
    N100000108983,
    /** **100000108984**

Bitch. */
    N100000108984,
    /** **100000108985**

Bitch for reproduction. */
    N100000108985,
    /** **100000108986**

Adult male dog. */
    N100000108986,
    /** **100000108987**

Adult male dog for reproduction. */
    N100000108987,
    /** **100000108988**

Dogs. */
    N100000108988,
    /** **100000108989**

Lactating bitch. */
    N100000108989,
    /** **100000108990**

Large dog. */
    N100000108990,
    /** **100000108991**

Medium dog. */
    N100000108991,
    /** **100000108992**

Pregnant bitch. */
    N100000108992,
    /** **100000108993**

Small dog. */
    N100000108993,
    /** **100000108994**

Very large dog. */
    N100000108994,
    /** **100000108995**

Very small dog. */
    N100000108995,
    /** **100000108996**

Puppy. */
    N100000108996,
    /** **100000108997**

Foxes. */
    N100000108997,
    /** **100000108998**

Jackal. */
    N100000108998,
    /** **100000108999**

Other Canids. */
    N100000108999,
    /** **100000109000**

Raccoon dogs. */
    N100000109000,
    /** **100000109001**

Wolf. */
    N100000109001,
    /** **100000109002**

Chamois. */
    N100000109002,
    /** **100000109003**

Other Caprines. */
    N100000109003,
    /** **100000109004**

Adult female goat. */
    N100000109004,
    /** **100000109005**

Adult male goat. */
    N100000109005,
    /** **100000109006**

Dry adult female goat. */
    N100000109006,
    /** **100000109007**

Goats. */
    N100000109007,
    /** **100000109008**

Lactating adult female goat. */
    N100000109008,
    /** **100000109009**

Pregnant adult female goat. */
    N100000109009,
    /** **100000109010**

Pre-ruminant goat. */
    N100000109010,
    /** **100000109011**

Ruminant goat. */
    N100000109011,
    /** **100000109012**

Wild goat. */
    N100000109012,
    /** **100000109013**

Kid. */
    N100000109013,
    /** **100000109014**

Other Ovids. */
    N100000109014,
    /** **100000109015**

Ewe. */
    N100000109015,
    /** **100000109016**

Ram. */
    N100000109016,
    /** **100000109017**

Dry ewe. */
    N100000109017,
    /** **100000109018**

Lactating ewe. */
    N100000109018,
    /** **100000109019**

Pregnant ewe. */
    N100000109019,
    /** **100000109020**

Pre-ruminant sheep. */
    N100000109020,
    /** **100000109021**

Ruminant sheep. */
    N100000109021,
    /** **100000109022**

Sheep. */
    N100000109022,
    /** **100000109023**

Sheep for meat production. */
    N100000109023,
    /** **100000109024**

Dairy sheep. */
    N100000109024,
    /** **100000109025**

Wild sheep. */
    N100000109025,
    /** **100000109026**

Lamb. */
    N100000109026,
    /** **100000109027**

Elk. */
    N100000109027,
    /** **100000109028**

Fallow deer. */
    N100000109028,
    /** **100000109029**

Moose. */
    N100000109029,
    /** **100000109030**

Antelope. */
    N100000109030,
    /** **100000109031**

Cervid. */
    N100000109031,
    /** **100000109032**

Deer. */
    N100000109032,
    /** **100000109033**

Other Deer. */
    N100000109033,
    /** **100000109034**

Red deer. */
    N100000109034,
    /** **100000109035**

Reindeer. */
    N100000109035,
    /** **100000109036**

Roe deer. */
    N100000109036,
    /** **100000109037**

Donkey. */
    N100000109037,
    /** **100000109038**

Mare. */
    N100000109038,
    /** **100000109039**

Gelding. */
    N100000109039,
    /** **100000109040**

Horses. */
    N100000109040,
    /** **100000109041**

Stallion. */
    N100000109041,
    /** **100000109042**

Pony. */
    N100000109042,
    /** **100000109043**

Pregnant mare. */
    N100000109043,
    /** **100000109044**

Non food-producing horse. */
    N100000109044,
    /** **100000109045**

Suckling colt. */
    N100000109045,
    /** **100000109046**

Colt. */
    N100000109046,
    /** **100000109047**

Mule. */
    N100000109047,
    /** **100000109048**

Equid. */
    N100000109048,
    /** **100000109049**

Female equid. */
    N100000109049,
    /** **100000109050**

Other Equids. */
    N100000109050,
    /** **100000109051**

Zebra. */
    N100000109051,
    /** **100000109052**

Bobcat. */
    N100000109052,
    /** **100000109053**

Adult female cat. */
    N100000109053,
    /** **100000109054**

Adult female cat for reproduction. */
    N100000109054,
    /** **100000109055**

Adult male cat. */
    N100000109055,
    /** **100000109056**

Cats. */
    N100000109056,
    /** **100000109057**

Lactating cat. */
    N100000109057,
    /** **100000109058**

Large cat. */
    N100000109058,
    /** **100000109059**

Medium cat. */
    N100000109059,
    /** **100000109060**

Pregnant cat. */
    N100000109060,
    /** **100000109061**

Small cat. */
    N100000109061,
    /** **100000109062**

Kitten. */
    N100000109062,
    /** **100000109063**

Cougar. */
    N100000109063,
    /** **100000109064**

Jaguar. */
    N100000109064,
    /** **100000109065**

Leopard. */
    N100000109065,
    /** **100000109066**

Lion. */
    N100000109066,
    /** **100000109067**

Lynx. */
    N100000109067,
    /** **100000109068**

Other Felids. */
    N100000109068,
    /** **100000109069**

Tiger. */
    N100000109069,
    /** **100000109070**

Tsushima wild cat. */
    N100000109070,
    /** **100000109071**

Other Leporids. */
    N100000109071,
    /** **100000109072**

Hare. */
    N100000109072,
    /** **100000109073**

Female rabbit for reproduction. */
    N100000109073,
}
impl ::core::str::FromStr for TargetSpecies {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "100000108874" => Ok(Self::N100000108874),
            "100000108875" => Ok(Self::N100000108875),
            "100000108876" => Ok(Self::N100000108876),
            "100000108877" => Ok(Self::N100000108877),
            "100000108878" => Ok(Self::N100000108878),
            "100000108879" => Ok(Self::N100000108879),
            "100000108880" => Ok(Self::N100000108880),
            "100000108881" => Ok(Self::N100000108881),
            "100000108882" => Ok(Self::N100000108882),
            "100000108883" => Ok(Self::N100000108883),
            "100000108884" => Ok(Self::N100000108884),
            "100000108885" => Ok(Self::N100000108885),
            "100000108886" => Ok(Self::N100000108886),
            "100000108887" => Ok(Self::N100000108887),
            "100000108888" => Ok(Self::N100000108888),
            "100000108889" => Ok(Self::N100000108889),
            "100000108890" => Ok(Self::N100000108890),
            "100000108891" => Ok(Self::N100000108891),
            "100000108892" => Ok(Self::N100000108892),
            "100000108893" => Ok(Self::N100000108893),
            "100000108894" => Ok(Self::N100000108894),
            "100000108895" => Ok(Self::N100000108895),
            "100000108896" => Ok(Self::N100000108896),
            "100000108897" => Ok(Self::N100000108897),
            "100000108898" => Ok(Self::N100000108898),
            "100000108899" => Ok(Self::N100000108899),
            "100000108900" => Ok(Self::N100000108900),
            "100000108901" => Ok(Self::N100000108901),
            "100000108902" => Ok(Self::N100000108902),
            "100000108903" => Ok(Self::N100000108903),
            "100000108904" => Ok(Self::N100000108904),
            "100000108905" => Ok(Self::N100000108905),
            "100000108906" => Ok(Self::N100000108906),
            "100000108907" => Ok(Self::N100000108907),
            "100000108908" => Ok(Self::N100000108908),
            "100000108909" => Ok(Self::N100000108909),
            "100000108910" => Ok(Self::N100000108910),
            "100000108911" => Ok(Self::N100000108911),
            "100000108912" => Ok(Self::N100000108912),
            "100000108913" => Ok(Self::N100000108913),
            "100000108914" => Ok(Self::N100000108914),
            "100000108915" => Ok(Self::N100000108915),
            "100000108916" => Ok(Self::N100000108916),
            "100000108917" => Ok(Self::N100000108917),
            "100000108918" => Ok(Self::N100000108918),
            "100000108919" => Ok(Self::N100000108919),
            "100000108920" => Ok(Self::N100000108920),
            "100000108921" => Ok(Self::N100000108921),
            "100000108922" => Ok(Self::N100000108922),
            "100000108923" => Ok(Self::N100000108923),
            "100000108924" => Ok(Self::N100000108924),
            "100000108925" => Ok(Self::N100000108925),
            "100000108926" => Ok(Self::N100000108926),
            "100000108927" => Ok(Self::N100000108927),
            "100000108928" => Ok(Self::N100000108928),
            "100000108929" => Ok(Self::N100000108929),
            "100000108930" => Ok(Self::N100000108930),
            "100000108931" => Ok(Self::N100000108931),
            "100000108932" => Ok(Self::N100000108932),
            "100000108933" => Ok(Self::N100000108933),
            "100000108934" => Ok(Self::N100000108934),
            "100000108935" => Ok(Self::N100000108935),
            "100000108936" => Ok(Self::N100000108936),
            "100000108937" => Ok(Self::N100000108937),
            "100000108938" => Ok(Self::N100000108938),
            "100000108939" => Ok(Self::N100000108939),
            "100000108940" => Ok(Self::N100000108940),
            "100000108941" => Ok(Self::N100000108941),
            "100000108942" => Ok(Self::N100000108942),
            "100000108943" => Ok(Self::N100000108943),
            "100000108944" => Ok(Self::N100000108944),
            "100000108945" => Ok(Self::N100000108945),
            "100000108946" => Ok(Self::N100000108946),
            "100000108947" => Ok(Self::N100000108947),
            "100000108948" => Ok(Self::N100000108948),
            "100000108949" => Ok(Self::N100000108949),
            "100000108950" => Ok(Self::N100000108950),
            "100000108951" => Ok(Self::N100000108951),
            "100000108952" => Ok(Self::N100000108952),
            "100000108953" => Ok(Self::N100000108953),
            "100000108954" => Ok(Self::N100000108954),
            "100000108955" => Ok(Self::N100000108955),
            "100000108956" => Ok(Self::N100000108956),
            "100000108957" => Ok(Self::N100000108957),
            "100000108958" => Ok(Self::N100000108958),
            "100000108959" => Ok(Self::N100000108959),
            "100000108960" => Ok(Self::N100000108960),
            "100000108961" => Ok(Self::N100000108961),
            "100000108962" => Ok(Self::N100000108962),
            "100000108963" => Ok(Self::N100000108963),
            "100000108964" => Ok(Self::N100000108964),
            "100000108965" => Ok(Self::N100000108965),
            "100000108966" => Ok(Self::N100000108966),
            "100000108967" => Ok(Self::N100000108967),
            "100000108968" => Ok(Self::N100000108968),
            "100000108969" => Ok(Self::N100000108969),
            "100000108970" => Ok(Self::N100000108970),
            "100000108971" => Ok(Self::N100000108971),
            "100000108972" => Ok(Self::N100000108972),
            "100000108973" => Ok(Self::N100000108973),
            "100000108974" => Ok(Self::N100000108974),
            "100000108975" => Ok(Self::N100000108975),
            "100000108976" => Ok(Self::N100000108976),
            "100000108977" => Ok(Self::N100000108977),
            "100000108978" => Ok(Self::N100000108978),
            "100000108979" => Ok(Self::N100000108979),
            "100000108980" => Ok(Self::N100000108980),
            "100000108981" => Ok(Self::N100000108981),
            "100000108982" => Ok(Self::N100000108982),
            "100000108983" => Ok(Self::N100000108983),
            "100000108984" => Ok(Self::N100000108984),
            "100000108985" => Ok(Self::N100000108985),
            "100000108986" => Ok(Self::N100000108986),
            "100000108987" => Ok(Self::N100000108987),
            "100000108988" => Ok(Self::N100000108988),
            "100000108989" => Ok(Self::N100000108989),
            "100000108990" => Ok(Self::N100000108990),
            "100000108991" => Ok(Self::N100000108991),
            "100000108992" => Ok(Self::N100000108992),
            "100000108993" => Ok(Self::N100000108993),
            "100000108994" => Ok(Self::N100000108994),
            "100000108995" => Ok(Self::N100000108995),
            "100000108996" => Ok(Self::N100000108996),
            "100000108997" => Ok(Self::N100000108997),
            "100000108998" => Ok(Self::N100000108998),
            "100000108999" => Ok(Self::N100000108999),
            "100000109000" => Ok(Self::N100000109000),
            "100000109001" => Ok(Self::N100000109001),
            "100000109002" => Ok(Self::N100000109002),
            "100000109003" => Ok(Self::N100000109003),
            "100000109004" => Ok(Self::N100000109004),
            "100000109005" => Ok(Self::N100000109005),
            "100000109006" => Ok(Self::N100000109006),
            "100000109007" => Ok(Self::N100000109007),
            "100000109008" => Ok(Self::N100000109008),
            "100000109009" => Ok(Self::N100000109009),
            "100000109010" => Ok(Self::N100000109010),
            "100000109011" => Ok(Self::N100000109011),
            "100000109012" => Ok(Self::N100000109012),
            "100000109013" => Ok(Self::N100000109013),
            "100000109014" => Ok(Self::N100000109014),
            "100000109015" => Ok(Self::N100000109015),
            "100000109016" => Ok(Self::N100000109016),
            "100000109017" => Ok(Self::N100000109017),
            "100000109018" => Ok(Self::N100000109018),
            "100000109019" => Ok(Self::N100000109019),
            "100000109020" => Ok(Self::N100000109020),
            "100000109021" => Ok(Self::N100000109021),
            "100000109022" => Ok(Self::N100000109022),
            "100000109023" => Ok(Self::N100000109023),
            "100000109024" => Ok(Self::N100000109024),
            "100000109025" => Ok(Self::N100000109025),
            "100000109026" => Ok(Self::N100000109026),
            "100000109027" => Ok(Self::N100000109027),
            "100000109028" => Ok(Self::N100000109028),
            "100000109029" => Ok(Self::N100000109029),
            "100000109030" => Ok(Self::N100000109030),
            "100000109031" => Ok(Self::N100000109031),
            "100000109032" => Ok(Self::N100000109032),
            "100000109033" => Ok(Self::N100000109033),
            "100000109034" => Ok(Self::N100000109034),
            "100000109035" => Ok(Self::N100000109035),
            "100000109036" => Ok(Self::N100000109036),
            "100000109037" => Ok(Self::N100000109037),
            "100000109038" => Ok(Self::N100000109038),
            "100000109039" => Ok(Self::N100000109039),
            "100000109040" => Ok(Self::N100000109040),
            "100000109041" => Ok(Self::N100000109041),
            "100000109042" => Ok(Self::N100000109042),
            "100000109043" => Ok(Self::N100000109043),
            "100000109044" => Ok(Self::N100000109044),
            "100000109045" => Ok(Self::N100000109045),
            "100000109046" => Ok(Self::N100000109046),
            "100000109047" => Ok(Self::N100000109047),
            "100000109048" => Ok(Self::N100000109048),
            "100000109049" => Ok(Self::N100000109049),
            "100000109050" => Ok(Self::N100000109050),
            "100000109051" => Ok(Self::N100000109051),
            "100000109052" => Ok(Self::N100000109052),
            "100000109053" => Ok(Self::N100000109053),
            "100000109054" => Ok(Self::N100000109054),
            "100000109055" => Ok(Self::N100000109055),
            "100000109056" => Ok(Self::N100000109056),
            "100000109057" => Ok(Self::N100000109057),
            "100000109058" => Ok(Self::N100000109058),
            "100000109059" => Ok(Self::N100000109059),
            "100000109060" => Ok(Self::N100000109060),
            "100000109061" => Ok(Self::N100000109061),
            "100000109062" => Ok(Self::N100000109062),
            "100000109063" => Ok(Self::N100000109063),
            "100000109064" => Ok(Self::N100000109064),
            "100000109065" => Ok(Self::N100000109065),
            "100000109066" => Ok(Self::N100000109066),
            "100000109067" => Ok(Self::N100000109067),
            "100000109068" => Ok(Self::N100000109068),
            "100000109069" => Ok(Self::N100000109069),
            "100000109070" => Ok(Self::N100000109070),
            "100000109071" => Ok(Self::N100000109071),
            "100000109072" => Ok(Self::N100000109072),
            "100000109073" => Ok(Self::N100000109073),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TargetSpecies {
    fn as_ref(&self) -> &str {
        match self {
            Self::N100000108874 => "100000108874",
            Self::N100000108875 => "100000108875",
            Self::N100000108876 => "100000108876",
            Self::N100000108877 => "100000108877",
            Self::N100000108878 => "100000108878",
            Self::N100000108879 => "100000108879",
            Self::N100000108880 => "100000108880",
            Self::N100000108881 => "100000108881",
            Self::N100000108882 => "100000108882",
            Self::N100000108883 => "100000108883",
            Self::N100000108884 => "100000108884",
            Self::N100000108885 => "100000108885",
            Self::N100000108886 => "100000108886",
            Self::N100000108887 => "100000108887",
            Self::N100000108888 => "100000108888",
            Self::N100000108889 => "100000108889",
            Self::N100000108890 => "100000108890",
            Self::N100000108891 => "100000108891",
            Self::N100000108892 => "100000108892",
            Self::N100000108893 => "100000108893",
            Self::N100000108894 => "100000108894",
            Self::N100000108895 => "100000108895",
            Self::N100000108896 => "100000108896",
            Self::N100000108897 => "100000108897",
            Self::N100000108898 => "100000108898",
            Self::N100000108899 => "100000108899",
            Self::N100000108900 => "100000108900",
            Self::N100000108901 => "100000108901",
            Self::N100000108902 => "100000108902",
            Self::N100000108903 => "100000108903",
            Self::N100000108904 => "100000108904",
            Self::N100000108905 => "100000108905",
            Self::N100000108906 => "100000108906",
            Self::N100000108907 => "100000108907",
            Self::N100000108908 => "100000108908",
            Self::N100000108909 => "100000108909",
            Self::N100000108910 => "100000108910",
            Self::N100000108911 => "100000108911",
            Self::N100000108912 => "100000108912",
            Self::N100000108913 => "100000108913",
            Self::N100000108914 => "100000108914",
            Self::N100000108915 => "100000108915",
            Self::N100000108916 => "100000108916",
            Self::N100000108917 => "100000108917",
            Self::N100000108918 => "100000108918",
            Self::N100000108919 => "100000108919",
            Self::N100000108920 => "100000108920",
            Self::N100000108921 => "100000108921",
            Self::N100000108922 => "100000108922",
            Self::N100000108923 => "100000108923",
            Self::N100000108924 => "100000108924",
            Self::N100000108925 => "100000108925",
            Self::N100000108926 => "100000108926",
            Self::N100000108927 => "100000108927",
            Self::N100000108928 => "100000108928",
            Self::N100000108929 => "100000108929",
            Self::N100000108930 => "100000108930",
            Self::N100000108931 => "100000108931",
            Self::N100000108932 => "100000108932",
            Self::N100000108933 => "100000108933",
            Self::N100000108934 => "100000108934",
            Self::N100000108935 => "100000108935",
            Self::N100000108936 => "100000108936",
            Self::N100000108937 => "100000108937",
            Self::N100000108938 => "100000108938",
            Self::N100000108939 => "100000108939",
            Self::N100000108940 => "100000108940",
            Self::N100000108941 => "100000108941",
            Self::N100000108942 => "100000108942",
            Self::N100000108943 => "100000108943",
            Self::N100000108944 => "100000108944",
            Self::N100000108945 => "100000108945",
            Self::N100000108946 => "100000108946",
            Self::N100000108947 => "100000108947",
            Self::N100000108948 => "100000108948",
            Self::N100000108949 => "100000108949",
            Self::N100000108950 => "100000108950",
            Self::N100000108951 => "100000108951",
            Self::N100000108952 => "100000108952",
            Self::N100000108953 => "100000108953",
            Self::N100000108954 => "100000108954",
            Self::N100000108955 => "100000108955",
            Self::N100000108956 => "100000108956",
            Self::N100000108957 => "100000108957",
            Self::N100000108958 => "100000108958",
            Self::N100000108959 => "100000108959",
            Self::N100000108960 => "100000108960",
            Self::N100000108961 => "100000108961",
            Self::N100000108962 => "100000108962",
            Self::N100000108963 => "100000108963",
            Self::N100000108964 => "100000108964",
            Self::N100000108965 => "100000108965",
            Self::N100000108966 => "100000108966",
            Self::N100000108967 => "100000108967",
            Self::N100000108968 => "100000108968",
            Self::N100000108969 => "100000108969",
            Self::N100000108970 => "100000108970",
            Self::N100000108971 => "100000108971",
            Self::N100000108972 => "100000108972",
            Self::N100000108973 => "100000108973",
            Self::N100000108974 => "100000108974",
            Self::N100000108975 => "100000108975",
            Self::N100000108976 => "100000108976",
            Self::N100000108977 => "100000108977",
            Self::N100000108978 => "100000108978",
            Self::N100000108979 => "100000108979",
            Self::N100000108980 => "100000108980",
            Self::N100000108981 => "100000108981",
            Self::N100000108982 => "100000108982",
            Self::N100000108983 => "100000108983",
            Self::N100000108984 => "100000108984",
            Self::N100000108985 => "100000108985",
            Self::N100000108986 => "100000108986",
            Self::N100000108987 => "100000108987",
            Self::N100000108988 => "100000108988",
            Self::N100000108989 => "100000108989",
            Self::N100000108990 => "100000108990",
            Self::N100000108991 => "100000108991",
            Self::N100000108992 => "100000108992",
            Self::N100000108993 => "100000108993",
            Self::N100000108994 => "100000108994",
            Self::N100000108995 => "100000108995",
            Self::N100000108996 => "100000108996",
            Self::N100000108997 => "100000108997",
            Self::N100000108998 => "100000108998",
            Self::N100000108999 => "100000108999",
            Self::N100000109000 => "100000109000",
            Self::N100000109001 => "100000109001",
            Self::N100000109002 => "100000109002",
            Self::N100000109003 => "100000109003",
            Self::N100000109004 => "100000109004",
            Self::N100000109005 => "100000109005",
            Self::N100000109006 => "100000109006",
            Self::N100000109007 => "100000109007",
            Self::N100000109008 => "100000109008",
            Self::N100000109009 => "100000109009",
            Self::N100000109010 => "100000109010",
            Self::N100000109011 => "100000109011",
            Self::N100000109012 => "100000109012",
            Self::N100000109013 => "100000109013",
            Self::N100000109014 => "100000109014",
            Self::N100000109015 => "100000109015",
            Self::N100000109016 => "100000109016",
            Self::N100000109017 => "100000109017",
            Self::N100000109018 => "100000109018",
            Self::N100000109019 => "100000109019",
            Self::N100000109020 => "100000109020",
            Self::N100000109021 => "100000109021",
            Self::N100000109022 => "100000109022",
            Self::N100000109023 => "100000109023",
            Self::N100000109024 => "100000109024",
            Self::N100000109025 => "100000109025",
            Self::N100000109026 => "100000109026",
            Self::N100000109027 => "100000109027",
            Self::N100000109028 => "100000109028",
            Self::N100000109029 => "100000109029",
            Self::N100000109030 => "100000109030",
            Self::N100000109031 => "100000109031",
            Self::N100000109032 => "100000109032",
            Self::N100000109033 => "100000109033",
            Self::N100000109034 => "100000109034",
            Self::N100000109035 => "100000109035",
            Self::N100000109036 => "100000109036",
            Self::N100000109037 => "100000109037",
            Self::N100000109038 => "100000109038",
            Self::N100000109039 => "100000109039",
            Self::N100000109040 => "100000109040",
            Self::N100000109041 => "100000109041",
            Self::N100000109042 => "100000109042",
            Self::N100000109043 => "100000109043",
            Self::N100000109044 => "100000109044",
            Self::N100000109045 => "100000109045",
            Self::N100000109046 => "100000109046",
            Self::N100000109047 => "100000109047",
            Self::N100000109048 => "100000109048",
            Self::N100000109049 => "100000109049",
            Self::N100000109050 => "100000109050",
            Self::N100000109051 => "100000109051",
            Self::N100000109052 => "100000109052",
            Self::N100000109053 => "100000109053",
            Self::N100000109054 => "100000109054",
            Self::N100000109055 => "100000109055",
            Self::N100000109056 => "100000109056",
            Self::N100000109057 => "100000109057",
            Self::N100000109058 => "100000109058",
            Self::N100000109059 => "100000109059",
            Self::N100000109060 => "100000109060",
            Self::N100000109061 => "100000109061",
            Self::N100000109062 => "100000109062",
            Self::N100000109063 => "100000109063",
            Self::N100000109064 => "100000109064",
            Self::N100000109065 => "100000109065",
            Self::N100000109066 => "100000109066",
            Self::N100000109067 => "100000109067",
            Self::N100000109068 => "100000109068",
            Self::N100000109069 => "100000109069",
            Self::N100000109070 => "100000109070",
            Self::N100000109071 => "100000109071",
            Self::N100000109072 => "100000109072",
            Self::N100000109073 => "100000109073",
        }
    }
}
impl ::std::fmt::Debug for TargetSpecies {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TargetSpecies {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TargetSpecies {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TargetSpecies {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TargetSpecies> for Coding {
    fn from(code: TargetSpecies) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/target-species".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TargetSpecies> for CodeableConcept {
    fn from(code: TargetSpecies) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TaskCode](http://hl7.org/fhir/ValueSet/task-code.html)**. Codes indicating the type of action that is expected to be performed\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TaskCode {
    /** **abort**

Mark the focal resource as no longer active. Abort, cancel or withdraw the focal resource, as appropriate for the type of resource. */
    Abort,
    /** **approve**

Activate/approve the focal resource. Take what actions are needed to transition the focus resource from 'draft' to 'active' or 'in-progress', as appropriate for the resource type.  This may involve additing additional content, approval, validation, etc. */
    Approve,
    /** **change**

Change the focal resource. Update the focal resource of the owning system to reflect the content specified as the Task.focus */
    Change,
    /** **fulfill**

Fulfill the focal request. Act to perform the actions described in the focus request.  This might result in a 'more assertive' request (order for a plan or proposal, filler order for a placer order), but is intend to eventually result in events.  The degree of fulfillment requested might be limited by Task.restriction. */
    Fulfill,
    /** **instantiate**

Instantiate the focal definition. Act to perform the actions defined in the focus definition resource (ActivityDefinition, PlanDefinition, Questionnaire, etc.)  For PlanDefinition or ActivityDefinition, this might result in a 'more assertive' request (order for a plan or proposal, filler order for a placer order), but is intend to eventually result in events.  For Questionnaire, this would result in a QuestionnaireResponse - and possibly resources constructed using data extracted from the response.  The degree of fulfillment requested might be limited by Task.restriction. */
    Instantiate,
    /** **replace**

Replace the focal resource with the input resource. Replace the focal resource with the specified input resource */
    Replace,
    /** **resume**

Re-activate the focal resource. Transition the focal resource from 'suspended' to 'active' or 'in-progress' as appropriate for the resource type. */
    Resume,
    /** **suspend**

Suspend the focal resource. Transition the focal resource from 'active' or 'in-progress' to 'suspended' */
    Suspend,
}
impl ::core::str::FromStr for TaskCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abort" => Ok(Self::Abort),
            "approve" => Ok(Self::Approve),
            "change" => Ok(Self::Change),
            "fulfill" => Ok(Self::Fulfill),
            "instantiate" => Ok(Self::Instantiate),
            "replace" => Ok(Self::Replace),
            "resume" => Ok(Self::Resume),
            "suspend" => Ok(Self::Suspend),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TaskCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abort => "abort",
            Self::Approve => "approve",
            Self::Change => "change",
            Self::Fulfill => "fulfill",
            Self::Instantiate => "instantiate",
            Self::Replace => "replace",
            Self::Resume => "resume",
            Self::Suspend => "suspend",
        }
    }
}
impl ::std::fmt::Debug for TaskCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TaskCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TaskCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TaskCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TaskCode> for Coding {
    fn from(code: TaskCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/task-code.html".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TaskCode> for CodeableConcept {
    fn from(code: TaskCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TaskIntent](http://hl7.org/fhir/task-intent)**. Distinguishes whether the task is a proposal, plan or full order.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum TaskIntent {
    /** **unknown**

Unknown. The intent is not known.  When dealing with Task, it's not always known (or relevant) how the task was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously. */
    Unknown,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for TaskIntent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "unknown" => Ok(Self::Unknown),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for TaskIntent {
    fn as_ref(&self) -> &str {
        match self {
            Self::Unknown => "unknown",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for TaskIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TaskIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TaskIntent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TaskIntent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TaskIntent> for Coding {
    fn from(code: TaskIntent) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/task-intent".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TaskIntent> for CodeableConcept {
    fn from(code: TaskIntent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TaskStatus](http://hl7.org/fhir/ValueSet/task-status)**. The current status of the task.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TaskStatus {
    /** **accepted**

Accepted. The potential performer has agreed to execute the task but has not yet started work. */
    Accepted,
    /** **cancelled**

Cancelled. The task was not completed. */
    Cancelled,
    /** **completed**

Completed. The task has been completed. */
    Completed,
    /** **draft**

Draft. The task is not yet ready to be acted upon. */
    Draft,
    /** **entered-in-error**

Entered in Error. The task should never have existed and is retained only because of the possibility it may have used. */
    EnteredInError,
    /** **failed**

Failed. The task was attempted but could not be completed due to some error. */
    Failed,
    /** **in-progress**

In Progress. The task has been started but is not yet complete. */
    InProgress,
    /** **on-hold**

On Hold. The task has been started but work has been paused. */
    OnHold,
    /** **ready**

Ready. The task is ready to be performed, but no action has yet been taken.  Used in place of requested/received/accepted/rejected when request assignment and acceptance is a given. */
    Ready,
    /** **received**

Received. A potential performer has claimed ownership of the task and is evaluating whether to perform it. */
    Received,
    /** **rejected**

Rejected. The potential performer who claimed ownership of the task has decided not to execute it prior to performing any action. */
    Rejected,
    /** **requested**

Requested. The task is ready to be acted upon and action is sought. */
    Requested,
}
impl ::core::str::FromStr for TaskStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "accepted" => Ok(Self::Accepted),
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "draft" => Ok(Self::Draft),
            "entered-in-error" => Ok(Self::EnteredInError),
            "failed" => Ok(Self::Failed),
            "in-progress" => Ok(Self::InProgress),
            "on-hold" => Ok(Self::OnHold),
            "ready" => Ok(Self::Ready),
            "received" => Ok(Self::Received),
            "rejected" => Ok(Self::Rejected),
            "requested" => Ok(Self::Requested),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TaskStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Accepted => "accepted",
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::Draft => "draft",
            Self::EnteredInError => "entered-in-error",
            Self::Failed => "failed",
            Self::InProgress => "in-progress",
            Self::OnHold => "on-hold",
            Self::Ready => "ready",
            Self::Received => "received",
            Self::Rejected => "rejected",
            Self::Requested => "requested",
        }
    }
}
impl ::std::fmt::Debug for TaskStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TaskStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TaskStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TaskStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TaskStatus> for Coding {
    fn from(code: TaskStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/task-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TaskStatus> for CodeableConcept {
    fn from(code: TaskStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TaskStatusReason](http://hl7.org/fhir/ValueSet/task-status-reason)**. The current status reason of the task.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TaskStatusReason {
    /** **environmental-issue**

Environmental-issue. Something in the environment is preventing task completion. */
    EnvironmentalIssue,
    /** **equipment-issue**

Equipment-issue. A piece of equipment necessary for completion of the task is malfunctioning. */
    EquipmentIssue,
    /** **misidentified**

Misidentified. Something related to the task was misidentified. */
    Misidentified,
    /** **missing**

Missing. An item nessary for task completion is missing. */
    Missing,
    /** **personnel-issue**

Personnel-issue. Key personnel necessary for task completion are not present. */
    PersonnelIssue,
}
impl ::core::str::FromStr for TaskStatusReason {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "environmental-issue" => Ok(Self::EnvironmentalIssue),
            "equipment-issue" => Ok(Self::EquipmentIssue),
            "misidentified" => Ok(Self::Misidentified),
            "missing" => Ok(Self::Missing),
            "personnel-issue" => Ok(Self::PersonnelIssue),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TaskStatusReason {
    fn as_ref(&self) -> &str {
        match self {
            Self::EnvironmentalIssue => "environmental-issue",
            Self::EquipmentIssue => "equipment-issue",
            Self::Misidentified => "misidentified",
            Self::Missing => "missing",
            Self::PersonnelIssue => "personnel-issue",
        }
    }
}
impl ::std::fmt::Debug for TaskStatusReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TaskStatusReason {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TaskStatusReason {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TaskStatusReason {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TaskStatusReason> for Coding {
    fn from(code: TaskStatusReason) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/task-status-reason".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TaskStatusReason> for CodeableConcept {
    fn from(code: TaskStatusReason) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TemplateStatusCodeLifeCycle](urn:oid:2.16.840.1.113883.3.1937.98.11.8)**. Life cycle of the Status Code of a Template Design (Version)\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TemplateStatusCodeLifeCycle {
    /** **active**

active. Design has been deemed fit for the intended purpose and is published by the governance group. */
    Active,
    /** **cancelled**

Cancelled. A drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published in an active state. */
    Cancelled,
    /** **draft**

Draft. Design is under development (nascent). */
    Draft,
    /** **pending**

Under pre-publication review. Design is completed and is being reviewed. */
    Pending,
    /** **rejected**

Rejected. A previously drafted design is determined to be erroneous or not fit for intended purpose and is discontinued before ever being published for consideration in a pending state. */
    Rejected,
    /** **retired**

retired. A previously active design is discontinued from use. It should no longer be used for future designs, but for historical purposes may be used to process data previously recorded using this design. A newer design may or may not exist. The design is published in the retired state. */
    Retired,
    /** **review**

In Review. Design is active, but is under review. The review may result in a change to the design. The change may necessitate a new version to be created. This in turn may result in the prior version of the template to be retired. Alternatively, the review may result in a change to the design that does not require a new version to be created, or it may result in no change to the design at all. */
    Review,
    /** **terminated**

Terminated. A design is determined to be erroneous or not fit for the intended purpose and should no longer be used, even for historical purposes. No new designs can be developed for this template. The associated template no longer needs to be published, but if published, is shown in the terminated state. */
    Terminated,
}
impl ::core::str::FromStr for TemplateStatusCodeLifeCycle {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "active" => Ok(Self::Active),
            "cancelled" => Ok(Self::Cancelled),
            "draft" => Ok(Self::Draft),
            "pending" => Ok(Self::Pending),
            "rejected" => Ok(Self::Rejected),
            "retired" => Ok(Self::Retired),
            "review" => Ok(Self::Review),
            "terminated" => Ok(Self::Terminated),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TemplateStatusCodeLifeCycle {
    fn as_ref(&self) -> &str {
        match self {
            Self::Active => "active",
            Self::Cancelled => "cancelled",
            Self::Draft => "draft",
            Self::Pending => "pending",
            Self::Rejected => "rejected",
            Self::Retired => "retired",
            Self::Review => "review",
            Self::Terminated => "terminated",
        }
    }
}
impl ::std::fmt::Debug for TemplateStatusCodeLifeCycle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TemplateStatusCodeLifeCycle {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TemplateStatusCodeLifeCycle {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TemplateStatusCodeLifeCycle {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TemplateStatusCodeLifeCycle> for Coding {
    fn from(code: TemplateStatusCodeLifeCycle) -> Self {
        CodingInner {
            system: Some("urn:oid:2.16.840.1.113883.3.1937.98.11.8".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TemplateStatusCodeLifeCycle> for CodeableConcept {
    fn from(code: TemplateStatusCodeLifeCycle) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestReportActionResult](http://hl7.org/fhir/ValueSet/report-action-result-codes)**. The results of executing an action.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestReportActionResult {
    /** **error**

Error. The action encountered a fatal error and the engine was unable to process. */
    Error,
    /** **fail**

Fail. The action failed. */
    Fail,
    /** **pass**

Pass. The action was successful. */
    Pass,
    /** **skip**

Skip. The action was skipped. */
    Skip,
    /** **warning**

Warning. The action passed but with warnings. */
    Warning,
}
impl ::core::str::FromStr for TestReportActionResult {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "error" => Ok(Self::Error),
            "fail" => Ok(Self::Fail),
            "pass" => Ok(Self::Pass),
            "skip" => Ok(Self::Skip),
            "warning" => Ok(Self::Warning),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestReportActionResult {
    fn as_ref(&self) -> &str {
        match self {
            Self::Error => "error",
            Self::Fail => "fail",
            Self::Pass => "pass",
            Self::Skip => "skip",
            Self::Warning => "warning",
        }
    }
}
impl ::std::fmt::Debug for TestReportActionResult {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestReportActionResult {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestReportActionResult {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestReportActionResult {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestReportActionResult> for Coding {
    fn from(code: TestReportActionResult) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/report-action-result-codes".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestReportActionResult> for CodeableConcept {
    fn from(code: TestReportActionResult) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestReportParticipantType](http://hl7.org/fhir/ValueSet/report-participant-type)**. The type of participant.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestReportParticipantType {
    /** **client**

Client. A FHIR Client. */
    Client,
    /** **server**

Server. A FHIR Server. */
    Server,
    /** **test-engine**

Test Engine. The test execution engine. */
    TestEngine,
}
impl ::core::str::FromStr for TestReportParticipantType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "client" => Ok(Self::Client),
            "server" => Ok(Self::Server),
            "test-engine" => Ok(Self::TestEngine),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestReportParticipantType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Client => "client",
            Self::Server => "server",
            Self::TestEngine => "test-engine",
        }
    }
}
impl ::std::fmt::Debug for TestReportParticipantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestReportParticipantType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestReportParticipantType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestReportParticipantType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestReportParticipantType> for Coding {
    fn from(code: TestReportParticipantType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/report-participant-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestReportParticipantType> for CodeableConcept {
    fn from(code: TestReportParticipantType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestReportResult](http://hl7.org/fhir/ValueSet/report-result-codes)**. The reported execution result.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestReportResult {
    /** **fail**

Fail. One or more test operations failed one or more asserts. */
    Fail,
    /** **pass**

Pass. All test operations successfully passed all asserts. */
    Pass,
    /** **pending**

Pending. One or more test operations is pending execution completion. */
    Pending,
}
impl ::core::str::FromStr for TestReportResult {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "fail" => Ok(Self::Fail),
            "pass" => Ok(Self::Pass),
            "pending" => Ok(Self::Pending),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestReportResult {
    fn as_ref(&self) -> &str {
        match self {
            Self::Fail => "fail",
            Self::Pass => "pass",
            Self::Pending => "pending",
        }
    }
}
impl ::std::fmt::Debug for TestReportResult {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestReportResult {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestReportResult {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestReportResult {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestReportResult> for Coding {
    fn from(code: TestReportResult) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/report-result-codes".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestReportResult> for CodeableConcept {
    fn from(code: TestReportResult) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestReportStatus](http://hl7.org/fhir/ValueSet/report-status-codes)**. The current status of the test report.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestReportStatus {
    /** **completed**

Completed. All test operations have completed. */
    Completed,
    /** **entered-in-error**

Entered In Error. This test report was entered or created in error. */
    EnteredInError,
    /** **in-progress**

In Progress. A test operations is currently executing. */
    InProgress,
    /** **stopped**

Stopped. The test script execution was manually stopped. */
    Stopped,
    /** **waiting**

Waiting. A test operation is waiting for an external client request. */
    Waiting,
}
impl ::core::str::FromStr for TestReportStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "stopped" => Ok(Self::Stopped),
            "waiting" => Ok(Self::Waiting),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestReportStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::Stopped => "stopped",
            Self::Waiting => "waiting",
        }
    }
}
impl ::std::fmt::Debug for TestReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestReportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestReportStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestReportStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestReportStatus> for Coding {
    fn from(code: TestReportStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/report-status-codes".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestReportStatus> for CodeableConcept {
    fn from(code: TestReportStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestScriptRequestMethodCode](http://hl7.org/fhir/ValueSet/http-operations)**. The allowable request method or HTTP operation codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestScriptRequestMethodCode {
    /** **delete**

DELETE. HTTP DELETE operation. */
    Delete,
    /** **get**

GET. HTTP GET operation. */
    Get,
    /** **head**

HEAD. HTTP HEAD operation. */
    Head,
    /** **options**

OPTIONS. HTTP OPTIONS operation. */
    Options,
    /** **patch**

PATCH. HTTP PATCH operation. */
    Patch,
    /** **post**

POST. HTTP POST operation. */
    Post,
    /** **put**

PUT. HTTP PUT operation. */
    Put,
}
impl ::core::str::FromStr for TestScriptRequestMethodCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "delete" => Ok(Self::Delete),
            "get" => Ok(Self::Get),
            "head" => Ok(Self::Head),
            "options" => Ok(Self::Options),
            "patch" => Ok(Self::Patch),
            "post" => Ok(Self::Post),
            "put" => Ok(Self::Put),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestScriptRequestMethodCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Delete => "delete",
            Self::Get => "get",
            Self::Head => "head",
            Self::Options => "options",
            Self::Patch => "patch",
            Self::Post => "post",
            Self::Put => "put",
        }
    }
}
impl ::std::fmt::Debug for TestScriptRequestMethodCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestScriptRequestMethodCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestScriptRequestMethodCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestScriptRequestMethodCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestScriptRequestMethodCode> for Coding {
    fn from(code: TestScriptRequestMethodCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/http-operations".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestScriptRequestMethodCode> for CodeableConcept {
    fn from(code: TestScriptRequestMethodCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestScriptScopeConformanceType](http://hl7.org/fhir/ValueSet/testscript-scope-conformance-codes)**. The expectation of whether the test must pass for the system to be considered conformant with the artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestScriptScopeConformanceType {
    /** **optional**

Optional. All tests are expected to pass but non-pass statuses may be allowed. */
    Optional,
    /** **required**

Required. All tests are expected to pass. Warning statuses are permitted. This is the default value. */
    Required,
    /** **strict**

Strict. All tests are expected to pass. Warnings are treated as a failure. */
    Strict,
}
impl ::core::str::FromStr for TestScriptScopeConformanceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "optional" => Ok(Self::Optional),
            "required" => Ok(Self::Required),
            "strict" => Ok(Self::Strict),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestScriptScopeConformanceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Optional => "optional",
            Self::Required => "required",
            Self::Strict => "strict",
        }
    }
}
impl ::std::fmt::Debug for TestScriptScopeConformanceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestScriptScopeConformanceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestScriptScopeConformanceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestScriptScopeConformanceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestScriptScopeConformanceType> for Coding {
    fn from(code: TestScriptScopeConformanceType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/testscript-scope-conformance-codes"
                    .to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestScriptScopeConformanceType> for CodeableConcept {
    fn from(code: TestScriptScopeConformanceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TestScriptScopePhaseType](http://hl7.org/fhir/ValueSet/testscript-scope-phase-codes)**. The phase of testing for this artifact.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TestScriptScopePhaseType {
    /** **integration**

Integration. The internal system to system phase. */
    Integration,
    /** **production**

Production. The live system to system phase (Note, this may involve pii/phi data). */
    Production,
    /** **unit**

Unit. The development or implementation phase. */
    Unit,
}
impl ::core::str::FromStr for TestScriptScopePhaseType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "integration" => Ok(Self::Integration),
            "production" => Ok(Self::Production),
            "unit" => Ok(Self::Unit),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TestScriptScopePhaseType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Integration => "integration",
            Self::Production => "production",
            Self::Unit => "unit",
        }
    }
}
impl ::std::fmt::Debug for TestScriptScopePhaseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TestScriptScopePhaseType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TestScriptScopePhaseType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TestScriptScopePhaseType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TestScriptScopePhaseType> for Coding {
    fn from(code: TestScriptScopePhaseType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/testscript-scope-phase-codes".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TestScriptScopePhaseType> for CodeableConcept {
    fn from(code: TestScriptScopePhaseType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TherapyRelationshipType](http://hl7.org/fhir/ValueSet/therapy-relationship-type)**. Classification of relationship between a therapy and a contraindication or an indication.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TherapyRelationshipType {
    /** **contraindicated-except-with**

Contraindicated unless the other therapy is given. Contraindicated unless the other therapy is given */
    ContraindicatedExceptWith,
    /** **contraindicated-only-with**

Only contraindicated if the other therapy is given. Only contraindicated if the other therapy is given */
    ContraindicatedOnlyWith,
    /** **indicated-except-with**

Indicated except when the other therapy is given. Indicated except when the other therapy is given */
    IndicatedExceptWith,
    /** **indicated-only-after**

Indicated only if the other therapy is planned to be given afterwards (prep). Indicated only if the other therapy is planned to be given afterwards (prep) */
    IndicatedOnlyAfter,
    /** **indicated-only-before**

Indicated only if the other therapy was given before (follow-up). Indicated only if the other therapy was given before (follow-up) */
    IndicatedOnlyBefore,
    /** **indicated-only-with**

Indicated only when the other therapy is given (co-occurrent). Indicated only when the other therapy is given (co-occurrent) */
    IndicatedOnlyWith,
    /** **replace-other-therapy**

Indicated to replace the other therapy. Indicated to replace the other therapy */
    ReplaceOtherTherapy,
    /** **replace-other-therapy-contraindicated**

Indicated to replace the other contraindicated therapy. Indicated to replace the other contraindicated therapy. */
    ReplaceOtherTherapyContraindicated,
    /** **replace-other-therapy-not-effective**

Indicated to replace the other therapy not effective on patient. Indicated to replace the other therapy not effective on patient */
    ReplaceOtherTherapyNotEffective,
    /** **replace-other-therapy-not-tolerated**

Indicated to replace the other therapy not well tolerated by patient. Indicated to replace the other therapy not well tolerated by patient */
    ReplaceOtherTherapyNotTolerated,
}
impl ::core::str::FromStr for TherapyRelationshipType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "contraindicated-except-with" => Ok(Self::ContraindicatedExceptWith),
            "contraindicated-only-with" => Ok(Self::ContraindicatedOnlyWith),
            "indicated-except-with" => Ok(Self::IndicatedExceptWith),
            "indicated-only-after" => Ok(Self::IndicatedOnlyAfter),
            "indicated-only-before" => Ok(Self::IndicatedOnlyBefore),
            "indicated-only-with" => Ok(Self::IndicatedOnlyWith),
            "replace-other-therapy" => Ok(Self::ReplaceOtherTherapy),
            "replace-other-therapy-contraindicated" => {
                Ok(Self::ReplaceOtherTherapyContraindicated)
            }
            "replace-other-therapy-not-effective" => {
                Ok(Self::ReplaceOtherTherapyNotEffective)
            }
            "replace-other-therapy-not-tolerated" => {
                Ok(Self::ReplaceOtherTherapyNotTolerated)
            }
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TherapyRelationshipType {
    fn as_ref(&self) -> &str {
        match self {
            Self::ContraindicatedExceptWith => "contraindicated-except-with",
            Self::ContraindicatedOnlyWith => "contraindicated-only-with",
            Self::IndicatedExceptWith => "indicated-except-with",
            Self::IndicatedOnlyAfter => "indicated-only-after",
            Self::IndicatedOnlyBefore => "indicated-only-before",
            Self::IndicatedOnlyWith => "indicated-only-with",
            Self::ReplaceOtherTherapy => "replace-other-therapy",
            Self::ReplaceOtherTherapyContraindicated => {
                "replace-other-therapy-contraindicated"
            }
            Self::ReplaceOtherTherapyNotEffective => {
                "replace-other-therapy-not-effective"
            }
            Self::ReplaceOtherTherapyNotTolerated => {
                "replace-other-therapy-not-tolerated"
            }
        }
    }
}
impl ::std::fmt::Debug for TherapyRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TherapyRelationshipType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TherapyRelationshipType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TherapyRelationshipType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TherapyRelationshipType> for Coding {
    fn from(code: TherapyRelationshipType) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/therapy-relationship-type".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TherapyRelationshipType> for CodeableConcept {
    fn from(code: TherapyRelationshipType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TimingAbbreviation](http://terminology.hl7.org/CodeSystem/timing-abbreviation)**. Code for a known / defined timing pattern.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum TimingAbbreviation {
    /** **C**

Continuous (frequency). Service is provided continuously between start time and stop time. */
    C,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for TimingAbbreviation {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "C" => Ok(Self::C),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for TimingAbbreviation {
    fn as_ref(&self) -> &str {
        match self {
            Self::C => "C",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for TimingAbbreviation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TimingAbbreviation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TimingAbbreviation {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TimingAbbreviation {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TimingAbbreviation> for Coding {
    fn from(code: TimingAbbreviation) -> Self {
        CodingInner {
            system: Some(
                "http://terminology.hl7.org/CodeSystem/timing-abbreviation".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TimingAbbreviation> for CodeableConcept {
    fn from(code: TimingAbbreviation) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TitleType](http://hl7.org/fhir/ValueSet/title-type)**. Used to express the reason and specific aspect for the variant title, such as language and specific language.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TitleType {
    /** **acronym**

Acronym. Abbreviation used as title */
    Acronym,
    /** **autotranslated**

Different language derived from autotranslation. Machine translated form of title in a different language, language element codes the language into which it was translated by machine. */
    Autotranslated,
    /** **duplicate-uid**

Different text for the same object with a different identifier. An alternative form of the title in two or more entries, e.g. in multiple medline entries */
    DuplicateUid,
    /** **earlier-title**

Different text in an earlier version. Alternative form of title in an earlier version such as epub ahead of print. */
    EarlierTitle,
    /** **human-use**

Human use. Human-friendly title */
    HumanUse,
    /** **language**

Different language. Additional form of title in a different language. */
    Language,
    /** **machine-use**

Machine use. Machine-friendly title */
    MachineUse,
    /** **official**

Official title. The official or authoritative title. */
    Official,
    /** **plain-language**

Plain language title. Title using language common to lay public discourse. */
    PlainLanguage,
    /** **primary**

Primary title. Main title for common use. The primary title used for representation if multiple titles exist. */
    Primary,
    /** **scientific**

Scientific title. Title using scientific terminology. */
    Scientific,
    /** **short-title**

Short title. Brief title (e.g. 'running title' or title used in page headers) */
    ShortTitle,
    /** **subtitle**

Subtitle. Subtitle or secondary title. */
    Subtitle,
}
impl ::core::str::FromStr for TitleType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "acronym" => Ok(Self::Acronym),
            "autotranslated" => Ok(Self::Autotranslated),
            "duplicate-uid" => Ok(Self::DuplicateUid),
            "earlier-title" => Ok(Self::EarlierTitle),
            "human-use" => Ok(Self::HumanUse),
            "language" => Ok(Self::Language),
            "machine-use" => Ok(Self::MachineUse),
            "official" => Ok(Self::Official),
            "plain-language" => Ok(Self::PlainLanguage),
            "primary" => Ok(Self::Primary),
            "scientific" => Ok(Self::Scientific),
            "short-title" => Ok(Self::ShortTitle),
            "subtitle" => Ok(Self::Subtitle),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TitleType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Acronym => "acronym",
            Self::Autotranslated => "autotranslated",
            Self::DuplicateUid => "duplicate-uid",
            Self::EarlierTitle => "earlier-title",
            Self::HumanUse => "human-use",
            Self::Language => "language",
            Self::MachineUse => "machine-use",
            Self::Official => "official",
            Self::PlainLanguage => "plain-language",
            Self::Primary => "primary",
            Self::Scientific => "scientific",
            Self::ShortTitle => "short-title",
            Self::Subtitle => "subtitle",
        }
    }
}
impl ::std::fmt::Debug for TitleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TitleType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TitleType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TitleType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TitleType> for Coding {
    fn from(code: TitleType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/title-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TitleType> for CodeableConcept {
    fn from(code: TitleType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TransportCode](http://hl7.org/fhir/ValueSet/transport-code.html)**. Codes indicating the type of action that is expected to be performed\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TransportCode {
    /** **abort**

Mark the focal resource as no longer active. Abort, cancel or withdraw the focal resource, as appropriate for the type of resource. */
    Abort,
    /** **approve**

Activate/approve the focal resource. Take what actions are needed to transition the focus resource from 'draft' to 'active' or 'in-progress', as appropriate for the resource type.  This may involve additing additional content, approval, validation, etc. */
    Approve,
    /** **change**

Change the focal resource. Update the focal resource of the owning system to reflect the content specified as the Task.focus */
    Change,
    /** **fulfill**

Fulfill the focal request. Act to perform the actions described in the focus request.  This might result in a 'more assertive' request (order for a plan or proposal, filler order for a placer order), but is intend to eventually result in events.  The degree of fulfillment requested might be limited by Task.restriction. */
    Fulfill,
    /** **instantiate**

Instantiate the focal definition. Act to perform the actions defined in the focus definition resource (ActivityDefinition, PlanDefinition, Questionnaire, etc.)  For PlanDefinition or ActivityDefinition, this might result in a 'more assertive' request (order for a plan or proposal, filler order for a placer order), but is intend to eventually result in events.  For Questionnaire, this would result in a QuestionnaireResponse - and possibly resources constructed using data extracted from the response.  The degree of fulfillment requested might be limited by Task.restriction. */
    Instantiate,
    /** **replace**

Replace the focal resource with the input resource. Replace the focal resource with the specified input resource */
    Replace,
    /** **resume**

Re-activate the focal resource. Transition the focal resource from 'suspended' to 'active' or 'in-progress' as appropriate for the resource type. */
    Resume,
    /** **suspend**

Suspend the focal resource. Transition the focal resource from 'active' or 'in-progress' to 'suspended' */
    Suspend,
}
impl ::core::str::FromStr for TransportCode {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abort" => Ok(Self::Abort),
            "approve" => Ok(Self::Approve),
            "change" => Ok(Self::Change),
            "fulfill" => Ok(Self::Fulfill),
            "instantiate" => Ok(Self::Instantiate),
            "replace" => Ok(Self::Replace),
            "resume" => Ok(Self::Resume),
            "suspend" => Ok(Self::Suspend),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TransportCode {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abort => "abort",
            Self::Approve => "approve",
            Self::Change => "change",
            Self::Fulfill => "fulfill",
            Self::Instantiate => "instantiate",
            Self::Replace => "replace",
            Self::Resume => "resume",
            Self::Suspend => "suspend",
        }
    }
}
impl ::std::fmt::Debug for TransportCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TransportCode {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TransportCode {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TransportCode {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TransportCode> for Coding {
    fn from(code: TransportCode) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/transport-code.html".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TransportCode> for CodeableConcept {
    fn from(code: TransportCode) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TransportIntent](http://hl7.org/fhir/transport-intent)**. Distinguishes whether the transport is a proposal, plan or full order.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum TransportIntent {
    /** **unknown**

Unknown. The intent is not known.  When dealing with Transport, it's not always known (or relevant) how the transport was initiated - i.e. whether it was proposed, planned, ordered or just done spontaneously. */
    Unknown,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for TransportIntent {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "unknown" => Ok(Self::Unknown),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for TransportIntent {
    fn as_ref(&self) -> &str {
        match self {
            Self::Unknown => "unknown",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for TransportIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TransportIntent {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TransportIntent {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TransportIntent {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TransportIntent> for Coding {
    fn from(code: TransportIntent) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/transport-intent".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TransportIntent> for CodeableConcept {
    fn from(code: TransportIntent) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TransportStatus](http://hl7.org/fhir/ValueSet/transport-status)**. Status of transport.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TransportStatus {
    /** **abandoned**

Abandoned. Transport was started but not completed. */
    Abandoned,
    /** **cancelled**

Cancelled. Transport was cancelled before started. */
    Cancelled,
    /** **completed**

Completed. Transport has been completed. */
    Completed,
    /** **entered-in-error**

Entered In Error. This electronic record should never have existed, though it is possible that real-world decisions were based on it. (If real-world activity has occurred, the status should be "abandoned" rather than "entered-in-error".). */
    EnteredInError,
    /** **in-progress**

In Progress. Transport has started but not completed. */
    InProgress,
    /** **planned**

Planned. Planned transport that is not yet requested. */
    Planned,
}
impl ::core::str::FromStr for TransportStatus {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "abandoned" => Ok(Self::Abandoned),
            "cancelled" => Ok(Self::Cancelled),
            "completed" => Ok(Self::Completed),
            "entered-in-error" => Ok(Self::EnteredInError),
            "in-progress" => Ok(Self::InProgress),
            "planned" => Ok(Self::Planned),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TransportStatus {
    fn as_ref(&self) -> &str {
        match self {
            Self::Abandoned => "abandoned",
            Self::Cancelled => "cancelled",
            Self::Completed => "completed",
            Self::EnteredInError => "entered-in-error",
            Self::InProgress => "in-progress",
            Self::Planned => "planned",
        }
    }
}
impl ::std::fmt::Debug for TransportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TransportStatus {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TransportStatus {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TransportStatus {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TransportStatus> for Coding {
    fn from(code: TransportStatus) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/transport-status".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TransportStatus> for CodeableConcept {
    fn from(code: TransportStatus) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TriggerType](http://hl7.org/fhir/ValueSet/trigger-type)**. The type of trigger.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TriggerType {
    /** **data-access-ended**

Data Access Ended. The trigger occurs whenever access to data of a particular type is completed. */
    DataAccessEnded,
    /** **data-accessed**

Data Accessed. The trigger occurs whenever data of a particular type is accessed. */
    DataAccessed,
    /** **data-added**

Data Added. The trigger occurs whenever data of a particular type is added. */
    DataAdded,
    /** **data-changed**

Data Changed. The trigger occurs whenever data of a particular type is changed in any way, either added, modified, or removed. */
    DataChanged,
    /** **data-modified**

Data Updated. The trigger occurs whenever data of a particular type is modified. */
    DataModified,
    /** **data-removed**

Data Removed. The trigger occurs whenever data of a particular type is removed. */
    DataRemoved,
    /** **named-event**

Named Event. The trigger occurs in response to a specific named event, and no other information about the trigger is specified. Named events are completely pre-coordinated, and the formal semantics of the trigger are not provided. */
    NamedEvent,
    /** **periodic**

Periodic. The trigger occurs at a specific time or periodically as described by a timing or schedule. A periodic event cannot have any data elements, but may have a name assigned as a shorthand for the event. */
    Periodic,
}
impl ::core::str::FromStr for TriggerType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "data-access-ended" => Ok(Self::DataAccessEnded),
            "data-accessed" => Ok(Self::DataAccessed),
            "data-added" => Ok(Self::DataAdded),
            "data-changed" => Ok(Self::DataChanged),
            "data-modified" => Ok(Self::DataModified),
            "data-removed" => Ok(Self::DataRemoved),
            "named-event" => Ok(Self::NamedEvent),
            "periodic" => Ok(Self::Periodic),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TriggerType {
    fn as_ref(&self) -> &str {
        match self {
            Self::DataAccessEnded => "data-access-ended",
            Self::DataAccessed => "data-accessed",
            Self::DataAdded => "data-added",
            Self::DataChanged => "data-changed",
            Self::DataModified => "data-modified",
            Self::DataRemoved => "data-removed",
            Self::NamedEvent => "named-event",
            Self::Periodic => "periodic",
        }
    }
}
impl ::std::fmt::Debug for TriggerType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TriggerType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TriggerType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TriggerType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TriggerType> for Coding {
    fn from(code: TriggerType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/trigger-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TriggerType> for CodeableConcept {
    fn from(code: TriggerType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TriggeredBytype](http://hl7.org/fhir/ValueSet/observation-triggeredbytype)**. Codes providing the triggeredBy type of observation.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TriggeredBytype {
    /** **re-run**

Re-run (per policy). Performance of the same test but with different parameters/settings/solution. */
    ReRun,
    /** **reflex**

Reflex. Performance of one or more other tests depending on the results of the initial test.  This may include collection of additional specimen. While a new ServiceRequest is not required to perform the additional test, where it is still needed (e.g., requesting another laboratory to perform the reflex test), the Observation.basedOn would reference the new ServiceRequest that requested the additional test to be performed as well as the original ServiceRequest to reflect the one that provided the authorization. */
    Reflex,
    /** **repeat**

Repeat (per policy). Performance of the same test again with the same parameters/settings/solution. */
    Repeat,
}
impl ::core::str::FromStr for TriggeredBytype {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "re-run" => Ok(Self::ReRun),
            "reflex" => Ok(Self::Reflex),
            "repeat" => Ok(Self::Repeat),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TriggeredBytype {
    fn as_ref(&self) -> &str {
        match self {
            Self::ReRun => "re-run",
            Self::Reflex => "reflex",
            Self::Repeat => "repeat",
        }
    }
}
impl ::std::fmt::Debug for TriggeredBytype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TriggeredBytype {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TriggeredBytype {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TriggeredBytype {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TriggeredBytype> for Coding {
    fn from(code: TriggeredBytype) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/observation-triggeredbytype".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TriggeredBytype> for CodeableConcept {
    fn from(code: TriggeredBytype) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[TypeDerivationRule](http://hl7.org/fhir/ValueSet/type-derivation-rule)**. How a type relates to its baseDefinition.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum TypeDerivationRule {
    /** **constraint**

Constraint. This definition adds additional rules to an existing concrete type. */
    Constraint,
    /** **specialization**

Specialization. This definition defines a new type that adds additional elements and optionally additional rules to the base type. */
    Specialization,
}
impl ::core::str::FromStr for TypeDerivationRule {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "constraint" => Ok(Self::Constraint),
            "specialization" => Ok(Self::Specialization),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for TypeDerivationRule {
    fn as_ref(&self) -> &str {
        match self {
            Self::Constraint => "constraint",
            Self::Specialization => "specialization",
        }
    }
}
impl ::std::fmt::Debug for TypeDerivationRule {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for TypeDerivationRule {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for TypeDerivationRule {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for TypeDerivationRule {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<TypeDerivationRule> for Coding {
    fn from(code: TypeDerivationRule) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/type-derivation-rule".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<TypeDerivationRule> for CodeableConcept {
    fn from(code: TypeDerivationRule) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[UDIEntryType](http://hl7.org/fhir/ValueSet/udi-entry-type)**. Codes to identify how UDI data was entered.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum UDIEntryType {
    /** **barcode**

Barcode. a barcodescanner captured the data from the device label. */
    Barcode,
    /** **card**

Card. The data originated from a patient's implant card and was read by an operator. */
    Card,
    /** **electronic-transmission**

Electronic Transmission. The UDI information was received electronically from the device through a communication protocol, such as the IEEE 11073 20601 version 4 exchange protocol over Bluetooth or USB. */
    ElectronicTransmission,
    /** **manual**

Manual. The data was read from the label by a person and manually entered. (e.g.  via a keyboard). */
    Manual,
    /** **rfid**

RFID. An RFID chip reader captured the data from the device label. */
    Rfid,
    /** **self-reported**

Self Reported. The data originated from a patient source and was not directly scanned or read from a label or card. */
    SelfReported,
    /** **unknown**

Unknown. The method of data capture has not been determined. */
    Unknown,
}
impl ::core::str::FromStr for UDIEntryType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "barcode" => Ok(Self::Barcode),
            "card" => Ok(Self::Card),
            "electronic-transmission" => Ok(Self::ElectronicTransmission),
            "manual" => Ok(Self::Manual),
            "rfid" => Ok(Self::Rfid),
            "self-reported" => Ok(Self::SelfReported),
            "unknown" => Ok(Self::Unknown),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for UDIEntryType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Barcode => "barcode",
            Self::Card => "card",
            Self::ElectronicTransmission => "electronic-transmission",
            Self::Manual => "manual",
            Self::Rfid => "rfid",
            Self::SelfReported => "self-reported",
            Self::Unknown => "unknown",
        }
    }
}
impl ::std::fmt::Debug for UDIEntryType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for UDIEntryType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for UDIEntryType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for UDIEntryType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<UDIEntryType> for Coding {
    fn from(code: UDIEntryType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/udi-entry-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<UDIEntryType> for CodeableConcept {
    fn from(code: UDIEntryType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[UndesirablEffectFrequency](http://hl7.org/fhir/ValueSet/undesirable-effect-frequency)**. A categorisation for a frequency of occurence of an undesirable effect.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum UndesirablEffectFrequency {
    /** **Common**

Common. */
    Common,
    /** **Rare**

Rare. */
    Rare,
    /** **Uncommon**

Uncommon. */
    Uncommon,
}
impl ::core::str::FromStr for UndesirablEffectFrequency {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Common" => Ok(Self::Common),
            "Rare" => Ok(Self::Rare),
            "Uncommon" => Ok(Self::Uncommon),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for UndesirablEffectFrequency {
    fn as_ref(&self) -> &str {
        match self {
            Self::Common => "Common",
            Self::Rare => "Rare",
            Self::Uncommon => "Uncommon",
        }
    }
}
impl ::std::fmt::Debug for UndesirablEffectFrequency {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for UndesirablEffectFrequency {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for UndesirablEffectFrequency {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for UndesirablEffectFrequency {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<UndesirablEffectFrequency> for Coding {
    fn from(code: UndesirablEffectFrequency) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/undesirable-effect-frequency".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<UndesirablEffectFrequency> for CodeableConcept {
    fn from(code: UndesirablEffectFrequency) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[UnitOfPresentation](http://hl7.org/fhir/ValueSet/unit-of-presentation)**. The presentation type in which an administrable medicinal product is given to a patient.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum UnitOfPresentation {
    /** **200000002108**

Barrel. */
    N200000002108,
    /** **200000002109**

Blister. */
    N200000002109,
    /** **200000002110**

Block. */
    N200000002110,
    /** **200000002111**

Bottle. */
    N200000002111,
    /** **200000002112**

Cachet. */
    N200000002112,
    /** **200000002113**

Capsule. */
    N200000002113,
    /** **200000002114**

Cartridge. */
    N200000002114,
    /** **200000002115**

Collar. */
    N200000002115,
    /** **200000002116**

Container. */
    N200000002116,
    /** **200000002117**

Cup. */
    N200000002117,
    /** **200000002118**

Cylinder. */
    N200000002118,
    /** **200000002119**

Dart. */
    N200000002119,
    /** **200000002120**

Dressing. */
    N200000002120,
    /** **200000002121**

Drop. */
    N200000002121,
    /** **200000002122**

Film. */
    N200000002122,
    /** **200000002123**

Chewing gum. */
    N200000002123,
    /** **200000002124**

Implant. */
    N200000002124,
    /** **200000002125**

Inhaler. */
    N200000002125,
    /** **200000002126**

Insert. */
    N200000002126,
    /** **200000002127**

Jar. */
    N200000002127,
    /** **200000002128**

Lozenge. */
    N200000002128,
    /** **200000002129**

Lyophilisate. */
    N200000002129,
    /** **200000002130**

Matrix. */
    N200000002130,
    /** **200000002131**

Pad. */
    N200000002131,
    /** **200000002132**

Paper. */
    N200000002132,
    /** **200000002133**

Pastille. */
    N200000002133,
    /** **200000002134**

Patch. */
    N200000002134,
    /** **200000002135**

Pen. */
    N200000002135,
    /** **200000002136**

Pendant. */
    N200000002136,
    /** **200000002137**

Pessary. */
    N200000002137,
    /** **200000002138**

Pillule. */
    N200000002138,
    /** **200000002139**

Pipette. */
    N200000002139,
    /** **200000002140**

Plaster. */
    N200000002140,
    /** **200000002141**

Plug. */
    N200000002141,
    /** **200000002142**

Pouch. */
    N200000002142,
    /** **200000002143**

Sachet. */
    N200000002143,
    /** **200000002144**

Sponge. */
    N200000002144,
    /** **200000002145**

Spoonful. */
    N200000002145,
    /** **200000002146**

Stick. */
    N200000002146,
    /** **200000002147**

Straw. */
    N200000002147,
    /** **200000002148**

Strip. */
    N200000002148,
    /** **200000002149**

Suppository. */
    N200000002149,
    /** **200000002150**

Syringe. */
    N200000002150,
    /** **200000002151**

System. */
    N200000002151,
    /** **200000002152**

Tablet. */
    N200000002152,
    /** **200000002153**

Tag. */
    N200000002153,
    /** **200000002154**

Tampon. */
    N200000002154,
    /** **200000002155**

Thread. */
    N200000002155,
    /** **200000002156**

Tube. */
    N200000002156,
    /** **200000002157**

Vessel. */
    N200000002157,
    /** **200000002158**

Vial. */
    N200000002158,
    /** **200000002159**

Puff. */
    N200000002159,
    /** **200000002163**

Actuation. */
    N200000002163,
    /** **200000002164**

Ampoule. */
    N200000002164,
    /** **200000002165**

Applicator. */
    N200000002165,
    /** **200000002166**

Bag. */
    N200000002166,
}
impl ::core::str::FromStr for UnitOfPresentation {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "200000002108" => Ok(Self::N200000002108),
            "200000002109" => Ok(Self::N200000002109),
            "200000002110" => Ok(Self::N200000002110),
            "200000002111" => Ok(Self::N200000002111),
            "200000002112" => Ok(Self::N200000002112),
            "200000002113" => Ok(Self::N200000002113),
            "200000002114" => Ok(Self::N200000002114),
            "200000002115" => Ok(Self::N200000002115),
            "200000002116" => Ok(Self::N200000002116),
            "200000002117" => Ok(Self::N200000002117),
            "200000002118" => Ok(Self::N200000002118),
            "200000002119" => Ok(Self::N200000002119),
            "200000002120" => Ok(Self::N200000002120),
            "200000002121" => Ok(Self::N200000002121),
            "200000002122" => Ok(Self::N200000002122),
            "200000002123" => Ok(Self::N200000002123),
            "200000002124" => Ok(Self::N200000002124),
            "200000002125" => Ok(Self::N200000002125),
            "200000002126" => Ok(Self::N200000002126),
            "200000002127" => Ok(Self::N200000002127),
            "200000002128" => Ok(Self::N200000002128),
            "200000002129" => Ok(Self::N200000002129),
            "200000002130" => Ok(Self::N200000002130),
            "200000002131" => Ok(Self::N200000002131),
            "200000002132" => Ok(Self::N200000002132),
            "200000002133" => Ok(Self::N200000002133),
            "200000002134" => Ok(Self::N200000002134),
            "200000002135" => Ok(Self::N200000002135),
            "200000002136" => Ok(Self::N200000002136),
            "200000002137" => Ok(Self::N200000002137),
            "200000002138" => Ok(Self::N200000002138),
            "200000002139" => Ok(Self::N200000002139),
            "200000002140" => Ok(Self::N200000002140),
            "200000002141" => Ok(Self::N200000002141),
            "200000002142" => Ok(Self::N200000002142),
            "200000002143" => Ok(Self::N200000002143),
            "200000002144" => Ok(Self::N200000002144),
            "200000002145" => Ok(Self::N200000002145),
            "200000002146" => Ok(Self::N200000002146),
            "200000002147" => Ok(Self::N200000002147),
            "200000002148" => Ok(Self::N200000002148),
            "200000002149" => Ok(Self::N200000002149),
            "200000002150" => Ok(Self::N200000002150),
            "200000002151" => Ok(Self::N200000002151),
            "200000002152" => Ok(Self::N200000002152),
            "200000002153" => Ok(Self::N200000002153),
            "200000002154" => Ok(Self::N200000002154),
            "200000002155" => Ok(Self::N200000002155),
            "200000002156" => Ok(Self::N200000002156),
            "200000002157" => Ok(Self::N200000002157),
            "200000002158" => Ok(Self::N200000002158),
            "200000002159" => Ok(Self::N200000002159),
            "200000002163" => Ok(Self::N200000002163),
            "200000002164" => Ok(Self::N200000002164),
            "200000002165" => Ok(Self::N200000002165),
            "200000002166" => Ok(Self::N200000002166),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for UnitOfPresentation {
    fn as_ref(&self) -> &str {
        match self {
            Self::N200000002108 => "200000002108",
            Self::N200000002109 => "200000002109",
            Self::N200000002110 => "200000002110",
            Self::N200000002111 => "200000002111",
            Self::N200000002112 => "200000002112",
            Self::N200000002113 => "200000002113",
            Self::N200000002114 => "200000002114",
            Self::N200000002115 => "200000002115",
            Self::N200000002116 => "200000002116",
            Self::N200000002117 => "200000002117",
            Self::N200000002118 => "200000002118",
            Self::N200000002119 => "200000002119",
            Self::N200000002120 => "200000002120",
            Self::N200000002121 => "200000002121",
            Self::N200000002122 => "200000002122",
            Self::N200000002123 => "200000002123",
            Self::N200000002124 => "200000002124",
            Self::N200000002125 => "200000002125",
            Self::N200000002126 => "200000002126",
            Self::N200000002127 => "200000002127",
            Self::N200000002128 => "200000002128",
            Self::N200000002129 => "200000002129",
            Self::N200000002130 => "200000002130",
            Self::N200000002131 => "200000002131",
            Self::N200000002132 => "200000002132",
            Self::N200000002133 => "200000002133",
            Self::N200000002134 => "200000002134",
            Self::N200000002135 => "200000002135",
            Self::N200000002136 => "200000002136",
            Self::N200000002137 => "200000002137",
            Self::N200000002138 => "200000002138",
            Self::N200000002139 => "200000002139",
            Self::N200000002140 => "200000002140",
            Self::N200000002141 => "200000002141",
            Self::N200000002142 => "200000002142",
            Self::N200000002143 => "200000002143",
            Self::N200000002144 => "200000002144",
            Self::N200000002145 => "200000002145",
            Self::N200000002146 => "200000002146",
            Self::N200000002147 => "200000002147",
            Self::N200000002148 => "200000002148",
            Self::N200000002149 => "200000002149",
            Self::N200000002150 => "200000002150",
            Self::N200000002151 => "200000002151",
            Self::N200000002152 => "200000002152",
            Self::N200000002153 => "200000002153",
            Self::N200000002154 => "200000002154",
            Self::N200000002155 => "200000002155",
            Self::N200000002156 => "200000002156",
            Self::N200000002157 => "200000002157",
            Self::N200000002158 => "200000002158",
            Self::N200000002159 => "200000002159",
            Self::N200000002163 => "200000002163",
            Self::N200000002164 => "200000002164",
            Self::N200000002165 => "200000002165",
            Self::N200000002166 => "200000002166",
        }
    }
}
impl ::std::fmt::Debug for UnitOfPresentation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for UnitOfPresentation {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for UnitOfPresentation {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for UnitOfPresentation {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<UnitOfPresentation> for Coding {
    fn from(code: UnitOfPresentation) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/unit-of-presentation".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<UnitOfPresentation> for CodeableConcept {
    fn from(code: UnitOfPresentation) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[UsageContextAgreementScope](http://hl7.org/fhir/ValueSet/usage-context-agreement-scope)**. This codesystem defines codes describing the type of agreement represented by an artifact, for example for use in CanonicalResource.usageContext.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum UsageContextAgreementScope {
    /** **community**

Community. Sets contractual or business expectations for systems participating in a particular exchange community. */
    Community,
    /** **domain**

Domain. Defines use-case-specific requirements for a specific business or health domain.  May vary in jurisdictional scope from international to small region and in business scope from broad to narrow. */
    Domain,
    /** **knowledge**

Knowledge. Defines use-case-specific information or guidance that is relevant to a specific business or health domain but is not mandated for particular use. */
    Knowledge,
    /** **realm-base**

Realm Base. Defines use-case independent foundational expectations for exchange within a particular country or jurisdiction.  Should be accompanied by a jurisdiction.  Commonly used as a 'base' for more restrictive artifacts. */
    RealmBase,
    /** **system-design**

System Design. Documents the specific capabilities of a single system as 'available' for purchase or use.  May have some variability reflecting options that can be configured. */
    SystemDesign,
    /** **system-implementation**

System Implementation. Documents the specific points of a single production system or endpoint.  This may be time-specific - i.e. reflecting the system 'as it is now' or 'as it was at some point in the past'. */
    SystemImplementation,
}
impl ::core::str::FromStr for UsageContextAgreementScope {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "community" => Ok(Self::Community),
            "domain" => Ok(Self::Domain),
            "knowledge" => Ok(Self::Knowledge),
            "realm-base" => Ok(Self::RealmBase),
            "system-design" => Ok(Self::SystemDesign),
            "system-implementation" => Ok(Self::SystemImplementation),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for UsageContextAgreementScope {
    fn as_ref(&self) -> &str {
        match self {
            Self::Community => "community",
            Self::Domain => "domain",
            Self::Knowledge => "knowledge",
            Self::RealmBase => "realm-base",
            Self::SystemDesign => "system-design",
            Self::SystemImplementation => "system-implementation",
        }
    }
}
impl ::std::fmt::Debug for UsageContextAgreementScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for UsageContextAgreementScope {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for UsageContextAgreementScope {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for UsageContextAgreementScope {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<UsageContextAgreementScope> for Coding {
    fn from(code: UsageContextAgreementScope) -> Self {
        CodingInner {
            system: Some(
                "http://hl7.org/fhir/ValueSet/usage-context-agreement-scope".to_owned(),
            ),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<UsageContextAgreementScope> for CodeableConcept {
    fn from(code: UsageContextAgreementScope) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[Use](http://hl7.org/fhir/ValueSet/claim-use)**. The purpose of the Claim: predetermination, preauthorization, claim.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum Use {
    /** **claim**

Claim. The treatment is complete and this represents a Claim for the services. */
    Claim,
    /** **preauthorization**

Preauthorization. The treatment is proposed and this represents a Pre-authorization for the services. */
    Preauthorization,
    /** **predetermination**

Predetermination. The treatment is proposed and this represents a Pre-determination for the services. */
    Predetermination,
}
impl ::core::str::FromStr for Use {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "claim" => Ok(Self::Claim),
            "preauthorization" => Ok(Self::Preauthorization),
            "predetermination" => Ok(Self::Predetermination),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for Use {
    fn as_ref(&self) -> &str {
        match self {
            Self::Claim => "claim",
            Self::Preauthorization => "preauthorization",
            Self::Predetermination => "predetermination",
        }
    }
}
impl ::std::fmt::Debug for Use {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for Use {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for Use {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for Use {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<Use> for Coding {
    fn from(code: Use) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/claim-use".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<Use> for CodeableConcept {
    fn from(code: Use) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[VersionAlgorithm](http://hl7.org/fhir/ValueSet/version-algorithm)**. Indicates the mechanism used to compare versions to determine which is more current.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum VersionAlgorithm {
    /** **alpha**

Alphabetical. Simple alphabetic sort on a case-insensitive and accent-insensitive basis.  (Sorting of different cases or accented versions of a character is indeterminate) */
    Alpha,
    /** **date**

Date. Versions are expressed as an ISO date/time syntax (including syntaxes with only portions of a date) */
    Date,
    /** **integer**

Integer. Versions are integers and ordered numerically */
    Integer,
    /** **natural**

Natural. Sorted according to the algorithm defined here: [naturalordersort.org](http://www.naturalordersort.org/) */
    Natural,
    /** **semver**

SemVer. Uses the semantic versioning scheme as defined in [semver.org](http://semver.org). */
    Semver,
}
impl ::core::str::FromStr for VersionAlgorithm {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "alpha" => Ok(Self::Alpha),
            "date" => Ok(Self::Date),
            "integer" => Ok(Self::Integer),
            "natural" => Ok(Self::Natural),
            "semver" => Ok(Self::Semver),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for VersionAlgorithm {
    fn as_ref(&self) -> &str {
        match self {
            Self::Alpha => "alpha",
            Self::Date => "date",
            Self::Integer => "integer",
            Self::Natural => "natural",
            Self::Semver => "semver",
        }
    }
}
impl ::std::fmt::Debug for VersionAlgorithm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for VersionAlgorithm {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for VersionAlgorithm {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for VersionAlgorithm {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<VersionAlgorithm> for Coding {
    fn from(code: VersionAlgorithm) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/version-algorithm".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<VersionAlgorithm> for CodeableConcept {
    fn from(code: VersionAlgorithm) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[VirtualServiceType](http://hl7.org/fhir/ValueSet/virtual-service-type)**. Example codes for possible virtual service connection types.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum VirtualServiceType {
    /** **ms-teams**

Microsoft Teams. Microsoft Teams web conferencing meeting */
    MsTeams,
    /** **whatsapp**

WhatsApp conference call. A conference call using the WhatsApp conference call service */
    Whatsapp,
    /** **zoom**

Zoom web conferencing. the amount is the base price used for calculating the total price before applying surcharges, discount or taxes. */
    Zoom,
}
impl ::core::str::FromStr for VirtualServiceType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "ms-teams" => Ok(Self::MsTeams),
            "whatsapp" => Ok(Self::Whatsapp),
            "zoom" => Ok(Self::Zoom),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for VirtualServiceType {
    fn as_ref(&self) -> &str {
        match self {
            Self::MsTeams => "ms-teams",
            Self::Whatsapp => "whatsapp",
            Self::Zoom => "zoom",
        }
    }
}
impl ::std::fmt::Debug for VirtualServiceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for VirtualServiceType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for VirtualServiceType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for VirtualServiceType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<VirtualServiceType> for Coding {
    fn from(code: VirtualServiceType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/virtual-service-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<VirtualServiceType> for CodeableConcept {
    fn from(code: VirtualServiceType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[VisionBase](http://hl7.org/fhir/ValueSet/vision-base-codes)**. A coded concept listing the base codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum VisionBase {
    /** **down**

Down. bottom. */
    Down,
    /** **in**

In. inner edge. */
    In,
    /** **out**

Out. outer edge. */
    Out,
    /** **up**

Up. top. */
    Up,
}
impl ::core::str::FromStr for VisionBase {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "down" => Ok(Self::Down),
            "in" => Ok(Self::In),
            "out" => Ok(Self::Out),
            "up" => Ok(Self::Up),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for VisionBase {
    fn as_ref(&self) -> &str {
        match self {
            Self::Down => "down",
            Self::In => "in",
            Self::Out => "out",
            Self::Up => "up",
        }
    }
}
impl ::std::fmt::Debug for VisionBase {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for VisionBase {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for VisionBase {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for VisionBase {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<VisionBase> for Coding {
    fn from(code: VisionBase) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/vision-base-codes".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<VisionBase> for CodeableConcept {
    fn from(code: VisionBase) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[VisionEyes](http://hl7.org/fhir/ValueSet/vision-eye-codes)**. A coded concept listing the eye codes.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum VisionEyes {
    /** **left**

Left Eye. Left Eye. */
    Left,
    /** **right**

Right Eye. Right Eye. */
    Right,
}
impl ::core::str::FromStr for VisionEyes {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "left" => Ok(Self::Left),
            "right" => Ok(Self::Right),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for VisionEyes {
    fn as_ref(&self) -> &str {
        match self {
            Self::Left => "left",
            Self::Right => "right",
        }
    }
}
impl ::std::fmt::Debug for VisionEyes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for VisionEyes {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for VisionEyes {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for VisionEyes {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<VisionEyes> for Coding {
    fn from(code: VisionEyes) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/vision-eye-codes".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<VisionEyes> for CodeableConcept {
    fn from(code: VisionEyes) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[W3cProvenanceActivityType](http://hl7.org/fhir/w3c-provenance-activity-type)**. This value set includes W3C PROV Data Model Activity concepts, which are treated as codes in this valueset.  Some adaptations were made to make these concepts suitable values for the Provenance.activity element. Coded concepts are from PROV-DM and the display names are their counterparts in PROV-N (human readable notation syntax specification).[code system OID: http://www.w3.org/TR/2013/REC-prov-dm-20130430/ and http://www.w3.org/TR/2013/REC-prov-n-20130430/]\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
pub enum W3cProvenanceActivityType {
    /** **Attribution**

wasAttributedTo. Ascribing of an entity (object/document) to an agent. */
    Attribution,
    /** **Collection**

isCollectionOf.  An aggregating activity that results in composition of an entity, which provides a structure to some constituents that must themselves be entities. These constituents are said to be member of the collections. */
    Collection,
    /** **Communication**

wasInformedBy. The exchange of some unspecified entity by two activities, one activity using some entity generated by the other. A communication implies that activity a2 is dependent on another activity, a1, by way of some unspecified entity that is generated by a1 and used by a2. */
    Communication,
    /** **Derivation**

wasDerivedFrom. A transformation of an entity into another, an update of an entity resulting in a new one, or the construction of a new entity based on a pre-existing entity. For an entity to be transformed from, created from, or resulting from an update to another, there must be some underpinning activity or activities performing the necessary action(s) resulting in such a derivation. A derivation can be described at various levels of precision. In its simplest form, derivation relates two entities. Optionally, attributes can be added to represent further information about the derivation. If the derivation is the result of a single known activity, then this activity can also be optionally expressed. To provide a completely accurate description of the derivation, the generation and usage of the generated and used entities, respectively, can be provided, so as to make the derivation path, through usage, activity, and generation, explicit. Optional information such as activity, generation, and usage can be linked to derivations to aid analysis of provenance and to facilitate provenance-based reproducibility. */
    Derivation,
    /** **End**

wasEndedBy. When an activity is deemed to have been ended by an entity, known as trigger. The activity no longer exists after its end. Any usage, generation, or invalidation involving an activity precedes the activity's end. An end may refer to a trigger entity that terminated the activity, or to an activity, known as ender that generated the trigger. */
    End,
    /** **Generation**

wasGeneratedBy. The completion of production of a new entity by an activity. This entity did not exist before generation and becomes available for usage after this generation. Given that a generation is the completion of production of an entity, it is instantaneous. */
    Generation,
    /** **Invalidation**

wasInvalidatedBy. The start of the destruction, cessation, or expiry of an existing entity by an activity. The entity is no longer available for use (or further invalidation) after invalidation. Any generation or usage of an entity precedes its invalidation. Given that an invalidation is the start of destruction, cessation, or expiry, it is instantaneous. */
    Invalidation,
    /** **Primary-Source**

wasPrimarySourceOf. Refers to something produced by some agent with direct experience and knowledge about the topic, at the time of the topic's study, without benefit from hindsight. Because of the directness of primary sources, they 'speak for themselves' in ways that cannot be captured through the filter of secondary sources. As such, it is important for secondary sources to reference those primary sources from which they were derived, so that their reliability can be investigated. It is also important to note that a given entity might be a primary source for one entity but not another. It is the reason why Primary Source is defined as a relation as opposed to a subtype of Entity. */
    PrimarySource,
    /** **Quotation**

wasQuotedFrom. The repeat of (some or all of) an entity, such as text or image, by someone who might or might not be its original author. A quotation relation is a kind of derivation relation, for which an entity was derived from a preceding entity by copying, or 'quoting', some or all of it. */
    Quotation,
    /** **Revision**

wasRevisionOf. A derivation for which the resulting entity is a revised version of some original. The implication here is that the resulting entity contains substantial content from the original. A revision relation is a kind of derivation relation from a revised entity to a preceding entity. */
    Revision,
    /** **Start**

wasStartedBy. When an activity is deemed to have been started by an entity, known as trigger. The activity did not exist before its start. Any usage, generation, or invalidation involving an activity follows the activity's start. A start may refer to a trigger entity that set off the activity, or to an activity, known as starter, that generated the trigger. Given that a start is when an activity is deemed to have started, it is instantaneous. */
    Start,
    /** **Usage**

used. the beginning of utilizing an entity by an activity. Before usage, the activity had not begun to utilize this entity and could not have been affected by the entity.  (Note: This definition is formulated for a given usage; it is permitted for an activity to have used a same entity multiple times.) Given that a usage is the beginning of utilizing an entity, it is instantaneous. */
    Usage,
    /// Custom code value.
    _Custom(String),
}
impl ::core::str::FromStr for W3cProvenanceActivityType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "Attribution" => Ok(Self::Attribution),
            "Collection" => Ok(Self::Collection),
            "Communication" => Ok(Self::Communication),
            "Derivation" => Ok(Self::Derivation),
            "End" => Ok(Self::End),
            "Generation" => Ok(Self::Generation),
            "Invalidation" => Ok(Self::Invalidation),
            "Primary-Source" => Ok(Self::PrimarySource),
            "Quotation" => Ok(Self::Quotation),
            "Revision" => Ok(Self::Revision),
            "Start" => Ok(Self::Start),
            "Usage" => Ok(Self::Usage),
            _ => Ok(Self::_Custom(s.to_owned())),
        }
    }
}
impl AsRef<str> for W3cProvenanceActivityType {
    fn as_ref(&self) -> &str {
        match self {
            Self::Attribution => "Attribution",
            Self::Collection => "Collection",
            Self::Communication => "Communication",
            Self::Derivation => "Derivation",
            Self::End => "End",
            Self::Generation => "Generation",
            Self::Invalidation => "Invalidation",
            Self::PrimarySource => "Primary-Source",
            Self::Quotation => "Quotation",
            Self::Revision => "Revision",
            Self::Start => "Start",
            Self::Usage => "Usage",
            Self::_Custom(s) => s.as_str(),
        }
    }
}
impl ::std::fmt::Debug for W3cProvenanceActivityType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for W3cProvenanceActivityType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for W3cProvenanceActivityType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for W3cProvenanceActivityType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<W3cProvenanceActivityType> for Coding {
    fn from(code: W3cProvenanceActivityType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/w3c-provenance-activity-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<W3cProvenanceActivityType> for CodeableConcept {
    fn from(code: W3cProvenanceActivityType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[WarningType](http://hl7.org/fhir/ValueSet/warning-type)**. Classification of warning type.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum WarningType {
    /** **P313**

Get medical advice/attention.. Get medical advice/attention. */
    P313,
    /** **P314**

Get medical advice/attention if you feel unwell.. Get medical advice/attention if you feel unwell. */
    P314,
    /** **P315**

Get immediate medical advice/attention.. Get immediate medical advice/attention. */
    P315,
    /** **P320**

Specific treatment is urgent (see ... on this label).. Specific treatment is urgent (see ... on this label). */
    P320,
    /** **P321**

Specific treatment (see ... on this label).. Specific treatment (see ... on this label). */
    P321,
    /** **P322**

Specific measures (see ... on this label).. Specific measures (see ... on this label). */
    P322,
    /** **P330**

Rinse mouth.. Rinse mouth. */
    P330,
    /** **P331**

Do NOT induce vomiting.. Do NOT induce vomiting. */
    P331,
    /** **P361**

Remove/Take off immediately all contaminated clothing.. Remove/Take off immediately all contaminated clothing. */
    P361,
    /** **P363**

Wash contaminated clothing before reuse... Wash contaminated clothing before reuse. */
    P363,
}
impl ::core::str::FromStr for WarningType {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "P313" => Ok(Self::P313),
            "P314" => Ok(Self::P314),
            "P315" => Ok(Self::P315),
            "P320" => Ok(Self::P320),
            "P321" => Ok(Self::P321),
            "P322" => Ok(Self::P322),
            "P330" => Ok(Self::P330),
            "P331" => Ok(Self::P331),
            "P361" => Ok(Self::P361),
            "P363" => Ok(Self::P363),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for WarningType {
    fn as_ref(&self) -> &str {
        match self {
            Self::P313 => "P313",
            Self::P314 => "P314",
            Self::P315 => "P315",
            Self::P320 => "P320",
            Self::P321 => "P321",
            Self::P322 => "P322",
            Self::P330 => "P330",
            Self::P331 => "P331",
            Self::P361 => "P361",
            Self::P363 => "P363",
        }
    }
}
impl ::std::fmt::Debug for WarningType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for WarningType {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for WarningType {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for WarningType {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<WarningType> for Coding {
    fn from(code: WarningType) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/warning-type".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<WarningType> for CodeableConcept {
    fn from(code: WarningType) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
#[doc = "**[WeekOfMonth](http://hl7.org/fhir/ValueSet/week-of-month)**. The set of weeks with in a month.\n\nFHIR version: 5.0.0."]
#[derive(PartialEq, Eq, Clone, Hash)]
#[derive(Copy)]
pub enum WeekOfMonth {
    /** **first**

First. First week of the month. */
    First,
    /** **fourth**

Fourth. Fourth week of the month. */
    Fourth,
    /** **last**

Last. Last week of the month. */
    Last,
    /** **second**

Second. Second week of the month. */
    Second,
    /** **third**

Third. Third week of the month. */
    Third,
}
impl ::core::str::FromStr for WeekOfMonth {
    type Err = String;
    #[allow(
        clippy::match_single_binding,
        reason = "Generated code; unknown number of variants"
    )]
    fn from_str(s: &str) -> ::core::result::Result<Self, Self::Err> {
        match s {
            "first" => Ok(Self::First),
            "fourth" => Ok(Self::Fourth),
            "last" => Ok(Self::Last),
            "second" => Ok(Self::Second),
            "third" => Ok(Self::Third),
            _ => Err(format!("Unknown value: {s}")),
        }
    }
}
impl AsRef<str> for WeekOfMonth {
    fn as_ref(&self) -> &str {
        match self {
            Self::First => "first",
            Self::Fourth => "fourth",
            Self::Last => "last",
            Self::Second => "second",
            Self::Third => "third",
        }
    }
}
impl ::std::fmt::Debug for WeekOfMonth {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl ::std::fmt::Display for WeekOfMonth {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        f.write_str(self.as_ref())
    }
}
impl<'de> Deserialize<'de> for WeekOfMonth {
    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
    where
        D: serde::Deserializer<'de>,
    {
        use serde::de::Error;
        let string = String::deserialize(deserializer)?;
        string.parse().map_err(D::Error::custom)
    }
}
impl Serialize for WeekOfMonth {
    fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
    where
        S: serde::Serializer,
    {
        self.as_ref().serialize(serializer)
    }
}
impl From<WeekOfMonth> for Coding {
    fn from(code: WeekOfMonth) -> Self {
        CodingInner {
            system: Some("http://hl7.org/fhir/ValueSet/week-of-month".to_owned()),
            code: Some(code.as_ref().to_owned()),
            display: Some(format!("{code}")),
            id: None,
            extension: Vec::new(),
            system_ext: None,
            version: None,
            version_ext: None,
            code_ext: None,
            display_ext: None,
            user_selected: None,
            user_selected_ext: None,
        }
            .into()
    }
}
impl From<WeekOfMonth> for CodeableConcept {
    fn from(code: WeekOfMonth) -> Self {
        let text = format!("{code}");
        let coding = Coding::from(code);
        CodeableConceptInner {
            coding: vec![Some(coding)],
            text: Some(text),
            id: None,
            extension: Vec::new(),
            coding_ext: Vec::new(),
            text_ext: None,
        }
            .into()
    }
}
