Esempio n. 1
0
        private string SaveData(string nodeJson, int ptn_pk, int visitPK)
        {
            string       result      = string.Empty;
            ResponseType ObjResponse = new ResponseType();

            try
            {
                HIVCE.Common.Entities.AlcoholDepressionScreeningObj adcObj = SerializerUtil.ConverToObject <HIVCE.Common.Entities.AlcoholDepressionScreeningObj>(nodeJson);
                IAlcoholDepressionScreening blObj = (IAlcoholDepressionScreening)ObjectFactory.CreateInstance("HIVCE.BusinessLayer.BLAlcoholDepressionScreening, HIVCE.BusinessLayer");
                adcObj.Ptn_pk   = ptn_pk;
                adcObj.Visit_Id = visitPK;

                bool flag = blObj.SaveUpdateAlcoholDepressionScreening(adcObj);
                if (flag)
                {
                    ObjResponse.Success = EnumUtil.GetEnumDescription(Success.True);
                }
                else
                {
                    ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False);
                }
            }
            catch (Exception ex)
            {
                ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False);
            }
            finally
            {
            }

            result = SerializerUtil.ConverToJson <ResponseType>(ObjResponse);
            return(result);
        }
Esempio n. 2
0
        private string GetAlcoholDepressionScreening(int ptn_pk, int visitPK)
        {
            string result = string.Empty;

            try
            {
                IAlcoholDepressionScreening ads = (IAlcoholDepressionScreening)ObjectFactory.CreateInstance("HIVCE.BusinessLayer.BLAlcoholDepressionScreening, HIVCE.BusinessLayer");
                HIVCE.Common.Entities.AlcoholDepressionScreeningObj objTP = ads.GetAlcoholDepressionScreening(ptn_pk, visitPK);
                result = SerializerUtil.ConverToJson <AlcoholDepressionScreeningObj>(objTP);
            }
            catch (Exception ex)
            {
                ///CLogger.WriteLog(ELogLevel.ERROR, "GetAnnouncements() exception: " + ex.ToString());
                ResponseType response = new ResponseType()
                {
                    Success = EnumUtil.GetEnumDescription(Success.False)
                };
                result = SerializerUtil.ConverToJson <ResponseType>(response);
            }
            finally
            {
            }
            return(result);
        }