示例#1
0
        private string GetNotes(string phy_key, string fac_key, string existingNotes)
        {
            try
            {
                var physicianNotes = _entityNotesService.GetEnityNotes(phy_key, EntityTypes.User).Where(x => x.etn_display_on_open).ToList();
                var facilityNotes  = _entityNotesService.GetEnityNotes(fac_key, EntityTypes.Facility).Where(x => x.etn_display_on_open).ToList();
                physicianNotes.AddRange(facilityNotes);


                if (existingNotes == null)
                {
                    existingNotes = string.Empty;
                }
                else
                {
                    existingNotes += "\r\n\r\n";
                }

                var notes = physicianNotes;
                if (notes != null && notes.Count() > 0)
                {
                    foreach (var note in notes)
                    {
                        existingNotes += note.etn_notes;

                        //Adding some spance to separate each note according to TCARE-482.
                        existingNotes += "\r\n\r\n";
                    }
                }

                return(existingNotes);
            }
            catch (Exception ex)
            {
                Elmah.ErrorSignal.FromCurrentContext().Raise(ex);
                throw ex;
            }
        }
        public ActionResult GetSignOutNotes(DataSourceRequest request)
        {
            var res = _entityNoteService.GetEnityNotes(request, EntityTypes.SignOutNotes);

            return(Json(res, JsonRequestBehavior.AllowGet));
        }