Пример #1
0
        /// <summary>
        /// Returns information about the lab test
        /// </summary>
        /// <param name="ltValue"></param>
        /// <param name="cs">The code system in which the lab test has meaning</param>
        /// <param name="lang">The language in which the response should be returned</param>
        /// <param name="objAppErr">The application error object</param>
        /// <returns></returns>
        public static XElement getLabTestInfo(string ltValue, LTCodeSystem cs, Language lang)
        {
            XElement result = null;
            string   url    = MedlinePlusConnectBaseURL + "?mainSearchCriteria.v.cs=" + getLTCodeSystemValue(cs);

            url += "&mainSearchCriteria.v.c=" + HttpUtility.UrlEncode(ltValue);
            url += "&informationRecipient.languageCode.c=" + getLanguageValue(lang);

            try
            {
                result = XElement.Load(url);
            }
            catch (Exception ex)
            {
            }

            return(result);
        }
Пример #2
0
        public static string getLTCodeSystemValue(LTCodeSystem ltcv)
        {
            string LTCodeSystemValue = "";

            switch (ltcv)
            {
            case LTCodeSystem.LOINC:
                LTCodeSystemValue = "2.16.840.1.113883.6.1";
                break;

            case LTCodeSystem.Other:
                LTCodeSystemValue = "2.16.840.1.113883.11.79";
                break;

            default:
                LTCodeSystemValue = "2.16.840.1.113883.6.1";
                break;
            }


            return(LTCodeSystemValue);
        }