public string UpdateMedicalHistory(Stream message)
        {
            Conditions objInput = JSonHelper.JsonDeserialize<Conditions>(new StreamReader(message).ReadToEnd());
            if (System.Configuration.ConfigurationManager.AppSettings[objInput.Pin] == null)
            {
                return "Invalid PIN";
            }
            if (objInput.Pin != null && objInput.Pin.Length > 0)
            {
                if (objInput.PatientID > 0 && objInput.Condition.Length > 0)
                {
                    IList<GHPMedicalHistoryInfo> objcol = new List<GHPMedicalHistoryInfo>();
                    GHPMedicalHistoryInfo obj = new GHPMedicalHistoryInfo();
                    GHPMedicalHistoryBLL objbll = new GHPMedicalHistoryBLL();
                    obj.MedicalHistoryId = objInput.ConditionID;
                    obj.PatientId = objInput.PatientID;
                    obj.Condition = objInput.Condition;
                    obj.ConditionCheck = objInput.ConditionCheck;
                    obj.DateofOnset = objInput.DateOfOnset;
                    obj.ICDCode = objInput.ICDCode;
                    obj.ActionItem = "INSERT";
                    DataTransactionReturn ret = objbll.InsertGHPMedicalHistoryInfo(obj);

                    return ret.MedicalHistoryId.ToString();
                }
                else
                {

                    return "PatientID and Condition is required field";
                }
            }
            else
            {
                return "PIN is a required field";
            }
        }