protected void TerminationDialogueButtonSet_OnClick(Object sender, EventArgs eventArgs) { if (!TerminationDialogueSetNoteTerminationDate.SelectedDate.HasValue) { TerminationDialogueSetNoteTerminationDate.SelectedDate = null; return; } long terminatedEntityNoteId = Convert.ToInt64(TerminationDialogueTerminatedEntityNoteId.Text); Client.Core.Entity.EntityNote currentEntityNote = MercuryApplication.EntityNoteGet(terminatedEntityNoteId, false); if (Convert.ToDateTime(TerminationDialogueSetNoteTerminationDate.SelectedDate) < currentEntityNote.EffectiveDate) { TerminationDialogueSetNoteTerminationDate.SelectedDate = null; return; } DateTime newTerminationDate = Convert.ToDateTime(TerminationDialogueSetNoteTerminationDate.SelectedDate); MercuryApplication.EntityNoteTerminate(currentEntityNote, newTerminationDate); EntityNoteHistoryGrid_ManualDataRebind(); return; }
public EntityNoteCompletedEventArgs(Client.Core.Entity.EntityNote forEntityNote, String forAppendContent) { appendOnly = true; entityNote = forEntityNote; appendContent = forAppendContent; return; }
public void ButtonAppend_OnClick(Object sender, EventArgs e) { // VALIDATE CONTENT if (String.IsNullOrEmpty(NoteContent.Text.Trim())) { ActionResponseLabel.Text = "** Note must contain Content (blank notes cannot be saved)."; ActionResponseLabel.Visible = true; return; } entityNote = MercuryApplication.EntityNoteGet(EntityNoteId, false); if (NoteCompleted != null) { NoteCompleted(this, new EntityNoteCompletedEventArgs(entityNote, NoteContent.Text.Trim())); } return; }
protected void Page_Load(object sender, EventArgs e) { Int64 forMemberId = 0; Int64 forEntityId = 0; if (MercuryApplication == null) { return; } if (!Page.IsPostBack) { #region Initial Page Load if (Request.QueryString["MemberId"] != null) { if (Int64.TryParse((String)Request.QueryString ["MemberId"], out forMemberId)) { Member = MercuryApplication.MemberGetDemographics(forMemberId, true); // FORCE LOAD OF ALL DEMOGRAPHICS INFORMATION DURING ONE REQUEST if (Member == null) { forMemberId = 0; } } } else if (Request.QueryString["EntityId"] != null) { if (Int64.TryParse((String)Request.QueryString["EntityId"], out forEntityId)) { Member = MercuryApplication.MemberGetDemographicsByEntityId(forEntityId, true); // FORCE LOAD OF ALL DEMOGRAPHICS INFORMATION DURING ONE REQUEST if (Member == null) { forMemberId = 0; } else { forMemberId = Member.Id; } } } if (forMemberId == 0) { Server.Transfer("/PermissionDenied.aspx"); return; } Page.Title = "Member Profile: " + Member.Name; MemberDemographicHeaderLabel.Text = Member.Name + " (" + Member.CurrentAge + " | " + Member.GenderDescription + ((Member.MostRecentEnrollment != null) ? " | " + Member.MostRecentEnrollment.ProgramMemberId : String.Empty) + ")"; #region Note Alert Icons Dictionary <Mercury.Server.Application.NoteImportance, Client.Core.Entity.EntityNote> entityNotes; entityNotes = MercuryApplication.EntityNoteGetMostRecentByAllImportances(Member.EntityId, true); Client.Core.Entity.EntityNote entityNote = null; //entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (Member.EntityId, Mercury.Server.Application.NoteImportance.Warning, false); if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Warning)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Warning]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { EntityNoteWarning.Style.Clear(); EntityNoteWarning.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); EntityNoteWarning.Visible = true; } } //entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (Member.EntityId, Mercury.Server.Application.NoteImportance.Critical, false); entityNote = null; if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Critical)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Critical]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { EntityNoteCritical.Style.Clear(); EntityNoteCritical.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); EntityNoteCritical.Visible = true; } } #endregion MemberDemographicsControl.InstanceId = SessionCachePrefix + "MemberDemographicsControl"; MemberDemographicsControl.AllowUserInteraction = true; MemberDemographicsControl.InitializeMemberDemographics(Member.Id); MemberServicesControl.InstanceId = SessionCachePrefix + "MemberServicesControl"; MemberMetricsControl.InstanceId = SessionCachePrefix + "MemberMetricsControl"; MemberAuthorizedServicesControl.InstanceId = SessionCachePrefix + "MemberAuthorizedServicesControl"; EntityContactHistoryControl.InstanceId = SessionCachePrefix + "EntityContactHistoryControl"; EntityContactHistoryControl.AllowUserInteraction = true; EntityDocumentHistoryControl.InstanceId = SessionCachePrefix + "MemberDocumentHistoryControl"; EntityDocumentHistoryControl.AllowUserInteraction = true; EntityNoteHistoryControl.InstanceId = SessionCachePrefix + "EntityNoteHistoryControl"; EntityNoteHistoryControl.AllowUserInteraction = true; MemberWorkHistoryControl.InstanceId = SessionCachePrefix + "MemberWorkHistoryControl"; MemberWorkHistoryControl.AllowUserInteraction = true; MemberClaimHistoryControl.InstanceId = SessionCachePrefix + "MemberClaimHistoryControl"; MemberAuthorizationHistoryControl.InstanceId = SessionCachePrefix + "MemberAuthorizationHistoryControl"; MemberCaseViewControl.InstanceId = SessionCachePrefix + "MemberCaseViewControl"; MemberCaseViewControl.InitializeMember(Member); InitializeToolbar(); InitializeMemberEnrollment(); InitializeMemberEnrollmentTplCob(); InitializePopulationCareManagement(); #endregion } // Initial Page Load else // Postback { Page.Title = "Member Profile: " + Member.Entity.Name; } // ApplySecurity (); return; }
public EntityNoteCompletedEventArgs(Client.Core.Entity.EntityNote forEntityNote) { entityNote = forEntityNote; return; }
public void ButtonOk_OnClick(Object sender, EventArgs e) { // NOTE SUBJECT IS REQUIRED if (String.IsNullOrEmpty(NoteSubject.Text.Trim())) { ActionResponseLabel.Text = "** Note Subject is required."; ActionResponseLabel.Visible = true; return; } // EFFECTIVE DATE IS REQUIRED WHEN IMPORATANCE IS NOT INFORMATIONAL if ((NoteImportanceSelection.SelectedValue != "1") && (!NoteEffectiveDatePicker.SelectedDate.HasValue)) { ActionResponseLabel.Text = "** Effective Date is required when importance is '" + NoteImportanceSelection.SelectedItem.Text.ToString() + "'."; ActionResponseLabel.Visible = true; return; } if (NoteTerminationDatePicker.SelectedDate.HasValue && NoteEffectiveDatePicker.SelectedDate.HasValue) { if (NoteTerminationDatePicker.SelectedDate < NoteEffectiveDatePicker.SelectedDate) { ActionResponseLabel.Text = "** Termination Date cannot be prior to the Effective Date."; ActionResponseLabel.Visible = true; return; } } if (EntityNoteId == 0) { #region If New Note if (String.IsNullOrEmpty(NoteContent.Text.Trim())) { ActionResponseLabel.Text = "** Note must contain Content (blank notes cannot be saved)."; ActionResponseLabel.Visible = true; return; } ActionResponseLabel.Text = String.Empty; ActionResponseLabel.Visible = false; // IF NEW ENTITY NOTE entityNote = new Mercury.Client.Core.Entity.EntityNote(MercuryApplication); entityNote.EntityId = Entity.Id; entityNote.Importance = (Mercury.Server.Application.NoteImportance)Convert.ToInt32(NoteImportanceSelection.SelectedValue); entityNote.Subject = NoteSubject.Text.Trim(); entityNote.NoteTypeId = (NoteSubject.SelectedValue == "") ? 0 : Convert.ToInt64(NoteSubject.SelectedValue); // IF NOTE IMPORTANCE IS INFORMATIONAL, THEN EFFECTIVE AND TERMINATION IS THE CURRENT DATE if (NoteImportanceSelection.SelectedValue == "1") { entityNote.EffectiveDate = DateTime.Now; entityNote.TerminationDate = DateTime.Now; } else { // IF NOTE IMPORTANCE IS OTHER THAN INFORMATIONAL, SET EFFECTIVE DATE AS INDICATED (IF NOT INDICATED SET TO CURRENT DATE) entityNote.EffectiveDate = (NoteEffectiveDatePicker.SelectedDate.HasValue) ? NoteEffectiveDatePicker.SelectedDate.Value : DateTime.Now; // IF NOTE IMPORTANCE IS OTHER THAN INFORMATIONAL, SET TERMINATION DATE AS INDICATED, IF NOT INDICATED SET TO 12/31/2099 entityNote.TerminationDate = (NoteTerminationDatePicker.SelectedDate.HasValue) ? NoteTerminationDatePicker.SelectedDate.Value : Convert.ToDateTime("12/31/9999"); } Mercury.Server.Application.EntityNoteContent entityNoteContent = new Mercury.Server.Application.EntityNoteContent(); entityNoteContent.Content = NoteContent.Text; entityNoteContent.EntityNoteId = entityNote.Id; entityNote.Contents.Add(entityNoteContent); if (NoteCompleted != null) { NoteCompleted(this, new EntityNoteCompletedEventArgs(entityNote)); } } #endregion // IF EXISTING ENTITY NOTE else { #region If Existing Note entityNote = MercuryApplication.EntityNoteGet(EntityNoteId, false); entityNote.Subject = NoteSubject.Text.Trim(); entityNote.Importance = (Mercury.Server.Application.NoteImportance)Convert.ToInt32(NoteImportanceSelection.SelectedValue); if (NoteImportanceSelection.SelectedValue == "1") { entityNote.EffectiveDate = DateTime.Now; entityNote.TerminationDate = DateTime.Now; } else { // IF NOTE IMPORTANCE IS OTHER THAN INFORMATIONAL, SET EFFECTIVE DATE AS INDICATED (IF NOT INDICATED SET TO CURRENT DATE) entityNote.EffectiveDate = (NoteEffectiveDatePicker.SelectedDate.HasValue) ? NoteEffectiveDatePicker.SelectedDate.Value : DateTime.Now; // IF NOTE IMPORTANCE IS OTHER THAN INFORMATIONAL, SET TERMINATION DATE AS INDICATED, IF NOT INDICATED SET TO 12/31/9999 entityNote.TerminationDate = (NoteTerminationDatePicker.SelectedDate.HasValue) ? NoteTerminationDatePicker.SelectedDate.Value : Convert.ToDateTime("12/31/9999"); } Mercury.Server.Application.EntityNoteContent entityNoteContent = new Mercury.Server.Application.EntityNoteContent(); entityNoteContent.Content = NoteContent.Text.Trim(); entityNoteContent.EntityNoteId = entityNote.Id; entityNote.Contents.Add(entityNoteContent); if (entityNote != null) { NoteCompleted(this, new EntityNoteCompletedEventArgs(entityNote)); } #endregion } return; }
private void InitializeContentGrid() { System.Data.DataTable dataTable; dataTable = new System.Data.DataTable(); dataTable.Columns.Add("EntityNoteContentId"); dataTable.Columns.Add("EntityNoteId"); dataTable.Columns.Add("Content"); dataTable.Columns.Add("CreateDate"); dataTable.Columns.Add("CreateAccountName"); dataTable.Columns.Add("ModifiedDate"); dataTable.Columns.Add("ModifiedAccountName"); List <Mercury.Server.Application.EntityNoteContent> contents = new List <Server.Application.EntityNoteContent> (); if (EntityNoteId != 0) { entityNote = new Mercury.Client.Core.Entity.EntityNote(MercuryApplication); entityNote = MercuryApplication.EntityNoteGet(EntityNoteId, false); if (NoteImportanceSelection.SelectedValue != "0") { NoteImportanceSelection.SelectedValue = Convert.ToString(NoteImportanceSelection.SelectedValue); } else { NoteImportanceSelection.SelectedValue = Convert.ToString((Int32)(Mercury.Server.Application.NoteImportance)entityNote.Importance); } NoteEffectiveDatePicker.SelectedDate = (NoteEffectiveDatePicker.SelectedDate.HasValue) ? NoteEffectiveDatePicker.SelectedDate : entityNote.EffectiveDate; if (NoteTerminationDatePicker.SelectedDate.HasValue) { NoteTerminationDatePicker.SelectedDate = NoteTerminationDatePicker.SelectedDate; } else { if (entityNote.TerminationDate.ToString("MM/dd/yyyy") != "12/31/9999") { NoteTerminationDatePicker.SelectedDate = entityNote.TerminationDate; } } //String entityNoteTerminationDate = (entityNote.TerminationDate == Convert.ToDateTime ("12/31/9999")) ? null : Convert.ToString(entityNote.TerminationDate); //NoteTerminationDatePicker.SelectedDate = (NoteTerminationDatePicker.SelectedDate.HasValue) ? NoteTerminationDatePicker.SelectedDate : Convert.ToDateTime(entityNoteTerminationDate); NoteSubject.Text = (NoteSubject.Text != "") ? NoteSubject.Text : entityNote.Subject; NoteImportanceSelection.Enabled = false; NoteEffectiveDatePicker.Enabled = false; NoteTerminationDatePicker.Enabled = false; NoteSubject.Enabled = false; contents = MercuryApplication.EntityNoteContentsGet(EntityNoteId, false); foreach (Mercury.Server.Application.EntityNoteContent currentContent in contents) { dataTable.Rows.Add( currentContent.Id, currentContent.EntityNoteId, currentContent.Content, currentContent.CreateAccountInfo.ActionDate.ToString("MM/dd/yyyy"), currentContent.CreateAccountInfo.UserAccountName, currentContent.ModifiedAccountInfo.ActionDate.ToString("MM/dd/yyyy"), currentContent.ModifiedAccountInfo.UserAccountName ); } } EntityNoteContentGrid.MasterTableView.DataSource = dataTable; EntityNoteContentGrid.MasterTableView.DataBind(); return; }
private void InitializeMemberInformation(Client.Core.Member.Member member) { MemberInformation.Style.Clear(); #region Note Alert Icons Dictionary <Mercury.Server.Application.NoteImportance, Client.Core.Entity.EntityNote> entityNotes; entityNotes = MercuryApplication.EntityNoteGetMostRecentByAllImportances(member.EntityId, true); Client.Core.Entity.EntityNote entityNote = null; // entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (member.EntityId, Mercury.Server.Application.NoteImportance.Warning, false); if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Warning)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Warning]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { MemberNoteWarning.Style.Clear(); MemberNoteWarning.Style.Add("padding-right", "4px"); MemberNoteWarning.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); MemberNoteWarning.Visible = true; } } // entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (member.EntityId, Mercury.Server.Application.NoteImportance.Critical, false); entityNote = null; if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Critical)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Critical]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { MemberNoteCritical.Style.Clear(); MemberNoteCritical.Style.Add("padding-right", "4px"); MemberNoteCritical.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); MemberNoteCritical.Visible = true; } } #endregion MemberName.Text = Web.CommonFunctions.MemberProfileAnchor(member.Id, member.Name); MemberBirthDate.Text = member.BirthDate.ToString("MM/dd/yyy"); MemberAge.Text = member.CurrentAge.ToString(); MemberGender.Text = member.GenderDescription; MemberProgram.Text = "** Not Enrolled"; MemberProgramMemberId.Text = "**Not Enrolled"; if (member.HasCurrentEnrollment) { // MemberProgram.Text = member.CurrentEnrollment.Program.Name; //String anchor = String.Empty; //anchor = "<a href=\"#\" onclick=\"javascript:MemberInformationCoverage_Toggle()\"' title=\"Toggle Coverage Information\" alt=\"Toggle Coverage Information\">" + member.CurrentEnrollment.ProgramName + "</a>"; //MemberProgram.Text = anchor; MemberProgram.Text = member.CurrentEnrollment.ProgramName; MemberProgramMemberId.Text = member.CurrentEnrollment.ProgramMemberId; if (member.CurrentEnrollment.HasCurrentCoverage) { MemberCoverageBenefitPlan.Text = member.CurrentEnrollment.CurrentCoverage.BenefitPlanName; MemberCoverageType.Text = member.CurrentEnrollment.CurrentCoverage.CoverageTypeName; MemberCoverageLevel.Text = member.CurrentEnrollment.CurrentCoverage.CoverageLevelName; MemberCoverageRateCode.Text = member.CurrentEnrollment.CurrentCoverage.RateCode; } if (member.CurrentEnrollment.HasCurrentPcp) { MemberPcpName.Text = Web.CommonFunctions.ProviderProfileAnchor( member.CurrentEnrollmentPcp.PcpProviderId, member.CurrentEnrollmentPcp.PcpProvider.Name); MemberPcpAffiliateName.Text = Web.CommonFunctions.ProviderProfileAnchor( member.CurrentEnrollmentPcp.PcpAffiliateProvider.Id, member.CurrentEnrollmentPcp.PcpAffiliateProvider.Name); } } return; }
private void InitializeProviderInformation(Int64 providerId) { Client.Core.Provider.Provider provider = MercuryApplication.ProviderGet(providerId, true); if (provider == null) { return; } WorkQueueItemInformationProvider.Style.Clear(); #region Note Alert Icons Dictionary <Mercury.Server.Application.NoteImportance, Client.Core.Entity.EntityNote> entityNotes; entityNotes = MercuryApplication.EntityNoteGetMostRecentByAllImportances(provider.EntityId, true); Client.Core.Entity.EntityNote entityNote = null; // entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (provider.EntityId, Mercury.Server.Application.NoteImportance.Warning, false); if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Warning)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Warning]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { UserInteractionEntityInformationProviderNoteWarning.Style.Clear(); UserInteractionEntityInformationProviderNoteWarning.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); UserInteractionEntityInformationProviderNoteWarning.Visible = true; } } // entityNote = MercuryApplication.EntityNoteGetMostRecentByImportance (provider.EntityId, Mercury.Server.Application.NoteImportance.Critical, false); entityNote = null; if (entityNotes.ContainsKey(Mercury.Server.Application.NoteImportance.Critical)) { entityNote = entityNotes[Mercury.Server.Application.NoteImportance.Critical]; } if (entityNote != null) { if (entityNote.TerminationDate >= DateTime.Today) { UserInteractionEntityInformationProviderNoteCritical.Style.Clear(); UserInteractionEntityInformationProviderNoteCritical.Attributes.Add("title", "[" + entityNote.NoteTypeName + "] " + entityNote.Subject); UserInteractionEntityInformationProviderNoteCritical.Visible = true; } } #endregion UserInteractionEntityInformationProviderName.Text = Web.CommonFunctions.ProviderProfileAnchor(providerId, provider.Name); UserInteractionEntityInformationProviderNpi.Text = (String.IsNullOrEmpty(provider.NationalProviderId)) ? "** Not Assigned" : provider.NationalProviderId; UserInteractionEntityInformationProviderProgram.Text = "** Not Enrolled"; UserInteractionEntityInformationProviderProgramProviderId.Text = "**Not Enrolled"; if (provider.HasCurrentEnrollment) { UserInteractionEntityInformationProviderProgram.Text = provider.CurrentEnrollment.Program.Name; UserInteractionEntityInformationProviderProgramProviderId.Text = provider.CurrentEnrollment.ProgramProviderId; } return; }