private void getFrequencyCTRLs() { var SHL = new SocialHistoryLogic(); LookupLogic lookUp = new LookupLogic(); List <LookupItemView> questionsList = lookUp.getQuestions("SocialHistoryQuestions"); foreach (var value in questionsList) { screenTypeId = value.MasterId; PHCageFrequency.Controls.Add(new LiteralControl("<div class='col-md-4 text-left'>")); PHCageFrequency.Controls.Add(new LiteralControl("<label><span class='text-primary'>" + value.ItemDisplayName + "" + "</span></label>")); PHCageFrequency.Controls.Add(new LiteralControl("<div class=''>")); RadioButtonList rbList = new RadioButtonList(); rbList.ID = "cage" + value.ItemId.ToString(); rbList.RepeatColumns = 1; rbList.ClientIDMode = System.Web.UI.ClientIDMode.Static; if (value.ItemDisplayName.Contains("smoke")) { rbList.CssClass = "cagerbList smokerb"; } else { rbList.CssClass = "cagerbList alcoholrb"; } lookUp.populateRBL(rbList, value.ItemName); PHCageFrequency.Controls.Add(rbList); PHCageFrequency.Controls.Add(new LiteralControl("</div>")); PHCageFrequency.Controls.Add(new LiteralControl("</div>")); } }
private void getNotesCTRLS() { var SHL = new SocialHistoryLogic(); LookupLogic lookUp = new LookupLogic(); string jsonObject = "[]"; jsonObject = LookupLogic.GetLookupItemByName("SocialHistory"); JavaScriptSerializer ser = new JavaScriptSerializer(); List <LookupItemView> lookupList = ser.Deserialize <List <LookupItemView> >(jsonObject); foreach (var value in lookupList) { if (value.ItemName == "SocialNotes") { NotesId = value.ItemId; notesTb = new TextBox(); notesTb.TextMode = TextBoxMode.MultiLine; notesTb.CssClass = "form-control input-sm"; notesTb.ClientIDMode = System.Web.UI.ClientIDMode.Static; notesTb.ID = "cage" + value.ItemId.ToString(); notesTb.Rows = 3; PHCageNotes.Controls.Add(notesTb); } } }
private void populateCtrls() { var SHL = new SocialHistoryLogic(); LookupLogic lookUp = new LookupLogic(); string jsonObject = "[]"; jsonObject = LookupLogic.GetLookupItemByName("SocialHistory"); JavaScriptSerializer ser = new JavaScriptSerializer(); List <LookupItemView> lookupList = ser.Deserialize <List <LookupItemView> >(jsonObject); foreach (var value in lookupList) { if (value.ItemName == "SocialRecord") { recordId = value.MasterId; PHSocialHistory.Controls.Add(new LiteralControl("<label class='control-label pull-left text-primary'>" + value.ItemDisplayName + "</label>")); rbList = new RadioButtonList(); rbList.ID = value.ItemId.ToString(); rbList.RepeatColumns = 2; rbList.ClientIDMode = System.Web.UI.ClientIDMode.Static; rbList.CssClass = "rbList"; lookUp.populateRBL(rbList, "GeneralYesNo"); PHSocialHistory.Controls.Add(rbList); RadioButtonList rbl = (RadioButtonList)PHSocialHistory.FindControl(value.ItemId.ToString()); rbl.SelectedValue = LookupLogic.GetLookupItemId("No"); } if (value.ItemName == "SocialNotes") { PHSocialHistoryNotes.Controls.Add(new LiteralControl("<label class='control-label pull-left text-primary'>" + value.ItemDisplayName + "</label>")); NotesId = value.ItemId; notesTb = new TextBox(); notesTb.TextMode = TextBoxMode.MultiLine; notesTb.CssClass = "form-control input-sm"; notesTb.ID = value.ItemId.ToString(); notesTb.Rows = 3; PHSocialHistoryNotes.Controls.Add(notesTb); } } List <LookupItemView> questionsList = lookUp.getQuestions("SocialHistoryQuestions"); foreach (var value in questionsList) { screenTypeId = value.MasterId; PlaceHolder1.Controls.Add(new LiteralControl("<div class='col-md-4 text-left'>")); PlaceHolder1.Controls.Add(new LiteralControl("<label><span class='text-primary'>" + value.ItemDisplayName + "" + "</span></label>")); PlaceHolder1.Controls.Add(new LiteralControl("<div class=''>")); RadioButtonList rbList = new RadioButtonList(); rbList.ID = value.ItemId.ToString(); rbList.RepeatColumns = 1; rbList.ClientIDMode = System.Web.UI.ClientIDMode.Static; rbList.CssClass = "rbList"; lookUp.populateRBL(rbList, value.ItemName); PlaceHolder1.Controls.Add(rbList); PlaceHolder1.Controls.Add(new LiteralControl("</div>")); PlaceHolder1.Controls.Add(new LiteralControl("</div>")); } }
public string updateSocialHistory(int patientId, int patientMasterVisitId, int createdBy, int DrinkAlcohol, int Smoke, int UseDrugs, string SocialHistoryNotes, int SocialHistoryId, int RecordSocialHistory) { try { var SH = new SocialHistoryLogic(); Result = SH.updateSocialHistory(patientId, patientMasterVisitId, createdBy, DrinkAlcohol, Smoke, UseDrugs, SocialHistoryNotes, SocialHistoryId, RecordSocialHistory); if (Result > 0) { Msg = "Social History Updated Successfully"; } } catch (Exception e) { Msg = e.Message; } return(Msg); }
public string addSocialHistory(int patientId, int patientMasterVisitId, int screeningType, int screeningCategory, int screeningValue, int userId) { try { var SM = new SocialHistoryLogic(); Result = SM.addSocialHistory(patientId, patientMasterVisitId, screeningType, screeningCategory, screeningValue, userId); //Result = SM.addSocialHistory(patientId,patientMasterVisitId,createdBy,DrinkAlcohol,Smoke,UseDrugs,SocialHistoryNotes,RecordSocialHistory); if (Result > 0) { Msg = "Social History Added Successfully"; } } catch (Exception e) { Msg = e.Message; } return(Msg); }