コード例 #1
0
ファイル: Allergy.cs プロジェクト: ligengrong/VSTOAddin
        /// <summary>
        /// Returns an Allergy Reaction ID from a text description
        /// </summary>
        /// <param name="reaction">An Allergy Reaction description</param>
        /// <returns>An Allergy Reaction ID</returns>
        public static AllergyReaction AllergyReactionIDFromDescription(string reaction)
        {
            AllergyReaction id = AllergyReaction.NotKnown;

            switch (reaction.ToLower())
            {
            case "not known":
                id = AllergyReaction.NotKnown;
                break;

            case "allergy":
                id = AllergyReaction.Allergy;
                break;

            case "intolerance":
                id = AllergyReaction.Intolerance;
                break;

            case "adverse effect":
                id = AllergyReaction.AdverseEffect;
                break;
            }

            return(id);
        }
コード例 #2
0
ファイル: Allergy.cs プロジェクト: ligengrong/VSTOAddin
        /// <summary>
        /// Returns a text description for an Allergy Reaction
        /// </summary>
        /// <param name="reaction">An Allergy Reaction</param>
        /// <returns>A string description for an Allergy Reaction</returns>
        public static string AllergyReactionDescriptionFromID(AllergyReaction reaction)
        {
            string description = "Not Known";

            switch (reaction)
            {
            case AllergyReaction.NotKnown:
                description = "Not Known";
                break;

            case AllergyReaction.Allergy:
                description = "Allergy";
                break;

            case AllergyReaction.Intolerance:
                description = "Intolerance";
                break;

            case AllergyReaction.AdverseEffect:
                description = "Adverse Effect";
                break;
            }

            return(description);
        }