예제 #1
0
        /// <summary>
        /// Converts the HealthcareIdentifierType enum to the appropriate integer required for the Identifier value
        /// </summary>
        /// <param name="Type"></param>
        /// <returns></returns>
        private static string GetNumberIssuerCodeForHealthcareIdentifierType(NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType Type)
        {
            switch (Type)
            {
            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Individual:
                return("0");

            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Provider:
                return("1");

            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Orginisation:
                return("2");

            default:
                throw new Exception($"No case statement for enum item of : {Type.ToString()}");
            }
        }
예제 #2
0
        /// <summary>
        /// Convertes the HealthcareIdentifierType enum to the apropirate interger required for the Identifier value
        /// </summary>
        /// <param name="Type"></param>
        /// <returns></returns>
        private static string GetNumberIssuerCodeForHealthcareIdentifierType(NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType Type)
        {
            switch (Type)
            {
            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Individual:
                return("0");

            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Provider:
                return("1");

            case NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType.Orginisation:
                return("2");

            default:
                throw new System.ComponentModel.InvalidEnumArgumentException(Type.ToString(), (int)Type, typeof(NationalHealthcareIdentifierParser.NationalHealthcareIdentifierType));
            }
        }