public string ToString(char separator) { var ns = NextSeparator(separator); return ($"{ID}{separator}{CheckDigit}{separator}{CheckDigitScheme?.BestValue}{separator}" + $"{AssigningAuthority?.ToString(ns)}{separator}{IdentifierTypeCode?.BestValue}{separator}" + $"{AssigningFacility?.ToString(ns)}{EffectiveDate?.AsDTLocal()}{separator}{ExpirationDate?.AsDTLocal()}" .TrimEnd(separator)); }
public override string ToString(char separator) { var ns = NextSeparator(separator); return ($"{ID}{separator}{FamilyName}{separator}{GivenName}{separator}{SecondGivenNamesOrInitials}" + $"{separator}{Suffix}{separator}{Prefix}{separator}{Degree}{separator}" + $"{SourceTable}{separator}{AssigningAuthority?.ToString(ns)}{separator}" + $"{NameTypeCode}{separator}{IdentifierCheckDigit}{separator}{CheckDigitScheme}{separator}" + $"{IdentifierTypeCode}{separator}{AssigningFacility?.ToString(ns)}{separator}" + $"{NameRepresentationCode}{separator}{NameContext?.ToString(ns)}{separator}" + $"{NameValidityRange?.ToString(ns)}{separator}{NameAssemblyOrder}" .TrimEnd(separator)); }