protected void btnUnrelease_Click(object sender, EventArgs e) { StudyObject study = new StudyObject(); study.StudyId.Value = Request["studyId"]; study.Load(); if (study.IsLoaded) { study.StudyStatusId.Value = Constants.StudyStatusTypes.PreRelease; study.Save(); } ClientScript.RegisterStartupScript(this.GetType(), "Close", "parent.closeStudyEditWindow();parent.aspnetForm.submit();", true); }
private int UpdateStudy(int studyId, int findingId, int userId, string heading, string description, string impression, int status, bool removeAudioData) { StudyObject study = new StudyObject(); study.StudyId.Value = studyId; study.Load(); if (study.IsLoaded) { findingId = UpdateFinding(studyId, findingId, userId, heading, description, impression, false, removeAudioData); study.LatestFindingId.Value = findingId; study.StudyStatusId.Value = status; study.Save(userId); return findingId; } return findingId; }
protected void Wizard1_FinishButtonClick(object sender, WizardNavigationEventArgs e) { string status = hfStatus.Value; PatientObject patient = new PatientObject(); patient.ExternalPatientId.Value = tbPatId.Text; patient.Load(loggedInUserId); patient.DateOfBirth.Value = dcDOB.Date; patient.Name.Value = RISUtility.GetFullName(tbPatFName.Text, tbPatLName.Text); patient.Gender.Value = rblGender.SelectedValue; patient.Save(loggedInUserId); StudyObject study = new StudyObject(); study.PatientId.Value = patient.PatientId.Value; Random rand = new Random(); study.StudyInstance.Value = rand.Next().ToString(); DateTime dateTime = new DateTime(dcExamDate.Year, dcExamDate.Month, dcExamDate.Day); study.StudyDate.Value = dateTime; study.ReferringPhysicianId.Value = ddlRef.SelectedValue; study.IsManual.Value = "Y"; study.StudyStatusId.Value = hfStatus.Value; study.ModalityId.Value = ddlModality.SelectedValue; study.ProcedureId.Value = ddlProcedures.SelectedValue; if (ddlClient.SelectedIndex > 0) { study.ClientId.Value = ddlClient.SelectedValue; } if (ddlHospital.SelectedIndex > 0) { study.HospitalId.Value = ddlHospital.SelectedValue; } study.Save(loggedInUserId); study.TechComments.Value = tbTechComments.Text; study.Save(loggedInUserId); //code for logging LogObject log = new LogObject(); log.UserId.Value = loggedInUserId; log.Action.Value = Constants.LogActions.MarkedStudyForVerification; log.ActionTime.Value = DateTime.Now; log.Save(); ///// /// Get User Groups //DataTable userGroups = new DataTable(); //userGroups = RISProcedureCaller.GetUserGroupsWithDefaults(loggedInUserId); //if (userGroups.Rows.Count > 0) //{ // for (int RowCounter = 0; RowCounter <= userGroups.Rows.Count - 1; RowCounter++) // { // StudyGroupObject studygroup = new StudyGroupObject(); // studygroup.GroupId.Value = userGroups.Rows[RowCounter][0]; // studygroup.StudyId.Value = study.StudyId.Value; // studygroup.Save(loggedInUserId); // } //} StringBuilder args = new StringBuilder(); args.Append(ParameterNames.Request.ExternalPatientId); args.Append("="); args.Append(patient.ExternalPatientId.Value); args.Append("&"); args.Append(ParameterNames.Request.PatientName); args.Append("="); args.Append(patient.Name.Value); args.Append("&"); args.Append(ParameterNames.Request.ReturnPage); args.Append("="); args.Append(PagesFactory.Pages.AddStudyPage); PagesFactory.Transfer(PagesFactory.Pages.DataSavedPage,args.ToString()); }
private object SaveFinding(bool removeAudioData) { FindingObject finding = new FindingObject(); int studyId = int.Parse(lblStudyId.Value); if (lblFindingId.Value != null && lblFindingId.Value.Length > 0) { finding.GetPrimaryKey().Value = int.Parse(lblFindingId.Value); finding.Load(loggedInUserId); if (finding.IsLoaded) { if (removeAudioData) { //byte[] temp = new byte[1]; finding.AudioData.Value = null; } else if (tbTrancription.Text.Equals(finding.TextualTranscript.Value)) // no need to update in case the text is same and not to remove audio data return 0; } } finding.StudyId.Value = studyId; finding.TextualTranscript.Value = tbTrancription.Text; if (loggedInUserRoleId == Constants.Roles.Transcriptionist) { finding.TranscriptUserId.Value = loggedInUserId; } finding.TranscriptionDate.Value = DateTime.Now; finding.Save(loggedInUserId); StudyObject study = new StudyObject(); study.StudyId.Value = studyId; study.Load(loggedInUserId); if (study.IsLoaded == true && study.LatestFindingId.Value == null) { study.LatestFindingId.Value = finding.FindingId.Value; study.Save(loggedInUserId); } return finding.FindingId.Value; }
protected void UpdateStudyStatus(int statusId) { StudyObject study = new StudyObject(); study.StudyId.Value = int.Parse(lblStudyId.Value); study.Load(Constants.Database.NullUserId); if (study.IsLoaded == true) { study.StudyStatusId.Value = statusId; study.Save(loggedInUserId); LogObject log = new LogObject(); log.UserId.Value = loggedInUserId; log.StudyId.Value = study.StudyId.Value; log.PatientId.Value = study.PatientId.Value; log.ActionTime.Value = DateTime.Now; if (statusId == Constants.StudyStatusTypes.PendingVerification) log.Action.Value = Constants.LogActions.MarkedStudyForVerification; else if (statusId == Constants.StudyStatusTypes.Verified) log.Action.Value = Constants.LogActions.VerifiedStudy; log.Save(); } }
protected override RISObject GetRISObject(DICOMObject dicomObject) { SeriesObject risSeries = new SeriesObject(); DICOMSeriesObject dicomSeries = (DICOMSeriesObject)dicomObject; risSeries.SeriesInstance.Value = dicomSeries.SeriesInstance.Value; risSeries.SeriesNumber.Value = dicomSeries.SeriesNumber.Value; risSeries.SeriesDate.Value = DatabaseUtility.GetDateTime(dicomSeries.SeriesDate.Value, dicomSeries.SeriesTime.Value); risSeries.Description.Value = dicomSeries.Description.Value; risSeries.PatientPosition.Value = dicomSeries.PatientPosition.Value; risSeries.Contrast.Value = dicomSeries.ContrastBo.Value; risSeries.ProtocolName.Value = dicomSeries.ProtocolNa.Value; risSeries.FrameOfReference.Value = dicomSeries.FrameOfRef.Value; risSeries.BodyPartExamined.Value = dicomSeries.BodyPartEx.Value; ModalityObject risModality = new ModalityObject(); risModality.Name.Value = dicomSeries.Modality.Value; risModality.Load(); if (!risModality.IsLoaded) { risModality.Save(); } ModalityDetailObject modalityDetail = new ModalityDetailObject(); modalityDetail.ModalityId.Value = risModality.GetPrimaryKey().Value; modalityDetail.Manufacturer.Value = dicomSeries.Manufactur.Value; modalityDetail.ModelName.Value = dicomSeries.ModelName.Value; modalityDetail.Load(); if (!modalityDetail.IsLoaded) { modalityDetail.Save(); } risSeries.ModalityDetailId.Value = modalityDetail.GetPrimaryKey().Value; risStudy = new StudyObject(); risStudy.StudyInstance.Value = dicomSeries.StudyInsta.Value; risStudy.Load(); if (risStudy.IsLoaded) { risSeries.StudyId.Value = risStudy.StudyId.Value; if (dicomSeries.StationName.Value != null) { StationObject station = new StationObject(); station.ModalityId.Value = risModality.GetPrimaryKey().Value; station.StationName.Value = dicomSeries.StationName.Value; station.Instituition.Value = dicomSeries.Instituition.Value; station.Load(); if (!station.IsLoaded) { station.Save(); } risStudy.StationId.Value = station.GetPrimaryKey().Value; if (station.HospitalId.Value != null) { risStudy.HospitalId.Value = station.HospitalId.Value; } if (station.ClientId.Value != null) { risStudy.ClientId.Value = station.ClientId.Value; } risStudy.Save(); } } else { risSeries = null; } return risSeries; }
protected override void Page_Load_Extended(object sender, EventArgs e) { startPage = int.Parse(intStartPage.Value); endPage = startPage + WebConstants.Pages -1; if (IsPostBack == false) { FillDDL(); if (loggedInUserRoleId == Constants.Roles.Radiologist) { lblClient.Visible = true; ddlClient.Visible = true; //ddlClient.DataSource RISDatabaseAccessLayer db = new RISDatabaseAccessLayer(); string query = "select ClientId,Name from tClients"; SqlConnection con = (SqlConnection)db.GetConnection(); SqlCommand cmd = new SqlCommand(query, con); SqlDataAdapter da = new SqlDataAdapter(); DataTable dt = new DataTable(); da.SelectCommand = cmd; da.Fill(dt); //Populating Drop down list of templates if (dt.Rows.Count > 0) { ddlClient.DataSource = dt; ddlClient.DataTextField = "Name"; ddlClient.DataValueField = "ClientId"; ddlClient.DataBind(); } } } /* if (hfCarryStatus.Value.ToString() != "x") { string labels = hfCarryStatus.Value.ToString(); string[] labelsArray = labels.Split(','); foreach (string label in labelsArray) { cblStatus.Items.FindByText(label).Selected = true; } } else { cblStatus.Items.FindByText("[All]").Selected = true; statusText.Text = "[All]"; } if (hfCarryModality.Value.ToString() != "x") { string labels = hfCarryModality.Value.ToString(); string[] labelsArray = labels.Split(','); foreach (string label in labelsArray) { cblModality.Items.FindByText(label).Selected = true; } } else { cblModality.Items.FindByText("[All]").Selected = true; modalityText.Text = "[All]"; } */ if (Request["hfAction"] != null) { if (Request["hfAction"] == "release") { if (Request["releaseToRad"] != null) { string[] studyIds = Request["releaseToRad"].Split(','); foreach (string studyId in studyIds) { StudyObject study = new StudyObject(); study.StudyId.Value = studyId; study.Load(loggedInUserId); if (study.IsLoaded) { if (study.HospitalId.Value != null && study.ReferringPhysicianId.Value != null) { study.StudyStatusId.Value = Constants.StudyStatusTypes.New; study.Save(loggedInUserId); } else { SetErrorMessage("One or more exams could not be released to Radiologists as they have missing data"); } } } } } } ExecuteProcedure(); ClearData(); StringBuilder url = new StringBuilder(); url.Append("http://").Append(Request.Url.Authority); if(Request.ApplicationPath.Length > 0) url.Append(Request.ApplicationPath).Append("/"); url.Append("WebServices/"); hfWebServicesHomeURL.Value = url.ToString(); url.Append("FindingService.asmx"); hfSURL.Value = url.ToString(); hfLoggedInUserId.Value = loggedInUserId.ToString(); hfLoggedInUserName.Value = loggedInUser.Name.Value.ToString(); hfLoggedInUserRoleId.Value = loggedInUserRoleId.ToString(); }