public List <DictionaryVmodel> UpdateDirectlyMonthReportDetail(string rpts, string info, string strMonthReportID) { List <DictionaryVmodel> ListObj = new List <DictionaryVmodel>(); ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); MonthReportSummaryViewModel mrsvm = JsonHelper.Deserialize <MonthReportSummaryViewModel>(info); MonthlyReportDetail mrd = rpt.ReportDetails.Find(p => p.ID == mrsvm.MonthlyDetailID); if (mrd != null) { MonthlyReportDetail tempMRD = mrd; tempMRD.NActualAmmount = (decimal)mrsvm.NActualAmmount; B_MonthlyReportDetail B_detail = CalculationEvaluationEngine.CalculationEvaluationService.Calculation(tempMRD.ToBModel(), ""); B_MonthlyreportdetailOperator.Instance.UpdateMonthlyreportdetail(B_detail); rpt.ReportDetails.Remove(mrd); rpt.ReportDetails.Add(B_detail.ToVModel()); } ListObj.Add(new DictionaryVmodel("ReportInstance", rpt)); ListObj.Add(new DictionaryVmodel("MonthDetail", GetTargetDetailList(rpt, "", false))); ListObj.Add(new DictionaryVmodel("Misstarget", GetMissTargetList(rpt, strMonthReportID, true))); ListObj.Add(new DictionaryVmodel("MonthReportDescription", GetMonthTRptDescription(rpt))); ListObj.Add(new DictionaryVmodel("CurrentMissTargetList", GetCurrentMissTargetList(rpt, strMonthReportID.ToString(), true))); SaveJsonData(strMonthReportID.ToGuid(), rpt, ListObj); return(ListObj); }
public List <DictionaryVmodel> UpdateMonthReportDetail(string rpts, string strMonthReportOrderType, string info, bool IncludeHaveDetail, string strMonthReportID) { List <DictionaryVmodel> ListObj = new List <DictionaryVmodel>(); MonthlyReportDetail detail = JsonHelper.Deserialize <MonthlyReportDetail>(info); B_MonthlyReportDetail B_detail = CalculationEvaluationEngine.CalculationEvaluationService.Calculation(detail.ToBModel(), ""); B_MonthlyreportdetailOperator.Instance.UpdateMonthlyreportdetail(B_detail); ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); rpt.ReportDetails.Remove(rpt.ReportDetails.Find(p => p.ID == detail.ID)); rpt.ReportDetails.Add(B_detail.ToVModel()); ListObj.Add(new DictionaryVmodel("ReportInstance", rpt)); ListObj.Add(new DictionaryVmodel("MonthDetail", GetTargetDetailList(rpt, strMonthReportOrderType, IncludeHaveDetail))); ListObj.Add(new DictionaryVmodel("Misstarget", GetMissTargetList(rpt, strMonthReportID, true))); ListObj.Add(new DictionaryVmodel("MonthReportDescription", GetMonthTRptDescription(rpt))); ListObj.Add(new DictionaryVmodel("CurrentMissTargetList", GetCurrentMissTargetList(rpt, strMonthReportID.ToString(), true))); SaveJsonData(strMonthReportID.ToGuid(), rpt, ListObj); return(ListObj); }
public List <DictionaryVmodel> ModifyMissTarget(string rpts) { ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); List <DictionaryVmodel> RptDictList = ReportInstanceMissTargetEngine.ReportInstanceMissTargetService.GetMissTargetRptDataSource(rpt); return(RptDictList); }
public List <DictionaryVmodel> GetMissTargetList(string rpts, string monthRptID, bool UploadStr) { //根据角色获取相关的系统ID List <DictionaryVmodel> RptDictList = null; if (UploadStr) //判断是否上传 { Guid _monthRptID = Guid.Empty; if (!string.IsNullOrEmpty(monthRptID)) { _monthRptID = Guid.Parse(monthRptID); } ReportInstance rpt = new ReportInstance(_monthRptID, true); RptDictList = ReportInstanceMissTargetEngine.ReportInstanceMissTargetService.GetMissTargetRptDataSource(rpt); } else { if (!string.IsNullOrEmpty(rpts)) { ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); Guid _monthRptID = Guid.Empty; if (!string.IsNullOrEmpty(monthRptID)) { _monthRptID = Guid.Parse(monthRptID); } RptDictList = ReportInstanceMissTargetEngine.ReportInstanceMissTargetService.GetMissTargetRptDataSource(rpt); } } return(RptDictList); }
internal static List <Declaration> GetChunkDeclarations() { if (m_ChunkDeclarations == null) { return(new List <Declaration>(21) { ScopeInstance.GetDeclaration(), ReportInstance.GetDeclaration(), DataSetInstance.GetDeclaration(), DataRegionInstance.GetDeclaration(), DataRegionMemberInstance.GetDeclaration(), DataCellInstance.GetDeclaration(), DataAggregateObjResult.GetDeclaration(), SubReportInstance.GetDeclaration(), GroupTreePartition.GetDeclaration(), ReportSnapshot.GetDeclaration(), ParametersImplWrapper.GetDeclaration(), ParameterImplWrapper.GetDeclaration(), SubReportInfo.GetDeclaration(), ParameterInfo.GetNewDeclaration(), ParameterInfoCollection.GetDeclaration(), ParameterBase.GetNewDeclaration(), ValidValue.GetNewDeclaration(), FieldInfo.GetDeclaration(), TreePartitionManager.GetDeclaration(), LookupObjResult.GetDeclaration(), DataCellInstanceList.GetDeclaration() }); } return(m_ChunkDeclarations); }
private void PrepareUnconfirmedMenuItems(HtmlGenericControl ul, ReportInstance reportInstance, ActivityInstance currentActivityInstance) { HyperLink hyp; HtmlGenericControl li; var confirmExecutionStatus = UnitOfWork.Repository <Activity>().Queryable().Single(a => a.QualifiedName == currentActivityInstance.QualifiedName && a.WorkFlow.Id == reportInstance.WorkFlow.Id).ExecutionStatuses.Single(es => es.Description == "CONFIRMED"); li = new HtmlGenericControl("li"); hyp = new HyperLink() { NavigateUrl = "/Activity/AddActivity?activityInstanceId=" + currentActivityInstance.Id.ToString() + "&activityExecutionStatusId=" + confirmExecutionStatus.Id.ToString(), Text = "Confirm Report" }; li.Controls.Add(hyp); ul.Controls.Add(li); var deleteExecutionStatus = UnitOfWork.Repository <Activity>().Queryable().Single(a => a.QualifiedName == currentActivityInstance.QualifiedName && a.WorkFlow.Id == reportInstance.WorkFlow.Id).ExecutionStatuses.Single(es => es.Description == "DELETED"); li = new HtmlGenericControl("li"); hyp = new HyperLink() { NavigateUrl = "/Activity/AddActivity?activityInstanceId=" + currentActivityInstance.Id.ToString() + "&activityExecutionStatusId=" + deleteExecutionStatus.Id.ToString(), Text = "Delete Report" }; li.Controls.Add(hyp); ul.Controls.Add(li); li = new HtmlGenericControl("li"); li.Attributes.Add("class", "divider"); ul.Controls.Add(li); }
public ActivityExecutionStatus GetExecutionStatusForActivity(ReportInstance reportInstance, string getStatus) { var activityInstance = reportInstance.Activities.Single(a => a.Current == true); var activity = _unitOfWork.Repository <Activity>().Queryable().Single(a => a.QualifiedName == activityInstance.QualifiedName && a.WorkFlow.Id == reportInstance.WorkFlow.Id); return(_unitOfWork.Repository <ActivityExecutionStatus>().Queryable().Single(aes => aes.Activity.Id == activity.Id && aes.Description == getStatus)); }
public void DeleteMedicationsFromWorkFlowInstance(Guid contextGuid, List <ReportInstanceMedicationListItem> medications) { Check.IsNotNull(contextGuid, "contextGuid may not be null"); Check.IsNotNull(medications, "medications may not be null"); if (medications.Count == 0) { return; } ; ReportInstance reportInstance = _unitOfWork.Repository <ReportInstance>().Queryable().Single(ri => ri.ContextGuid == contextGuid); // Full managements of medications list for report instance ArrayList deleteCollection = new ArrayList(); foreach (ReportInstanceMedication medication in reportInstance.Medications) { var exists = medications.Any(m => m.ReportInstanceMedicationGuid == medication.ReportInstanceMedicationGuid); if (exists) { deleteCollection.Add(medication); } ; } foreach (ReportInstanceMedication medication in deleteCollection) { reportInstance.Medications.Remove(medication); _unitOfWork.Repository <ReportInstanceMedication>().Delete(medication); } _unitOfWork.Repository <ReportInstance>().Update(reportInstance); }
public Report(AspNetCore.ReportingServices.ReportProcessing.Report reportDef, ReportInstance reportInstance, RenderingContext renderingContext, string reportName, string description, CultureInfo defaultLanguage) { this.m_reportDef = reportDef; this.m_reportInstance = reportInstance; this.m_renderingContext = renderingContext; this.m_reportBody = null; this.m_pageHeader = null; this.m_pageFooter = null; this.m_reportPagination = null; this.m_name = reportName; this.m_description = description; this.m_reportUrl = null; this.m_documentMapRoot = null; this.m_reportParameters = null; if (reportDef.Language != null) { if (reportDef.Language.Type == ExpressionInfo.Types.Constant) { this.m_reportLanguage = reportDef.Language.Value; } else if (reportInstance != null) { this.m_reportLanguage = reportInstance.Language; } } if (this.m_reportLanguage == null && defaultLanguage != null) { this.m_reportLanguage = defaultLanguage.Name; } this.AdjustBodyWhitespace(); }
private async Task CreatePatientSummaryAndLinkToExecutionEventAsync(ReportInstance reportInstance, ActivityExecutionStatusEvent executionEvent) { if (reportInstance is null) { throw new ArgumentNullException(nameof(reportInstance)); } if (executionEvent is null) { throw new ArgumentNullException(nameof(executionEvent)); } var artefactModel = reportInstance.WorkFlow.Description == "New Active Surveilliance Report" ? await _artefactService.CreatePatientSummaryForActiveReportAsync(reportInstance.ContextGuid) : await _artefactService.CreatePatientSummaryForSpontaneousReportAsync(reportInstance.ContextGuid); using (var tempFile = File.OpenRead(artefactModel.FullPath)) { if (tempFile.Length > 0) { BinaryReader rdr = new BinaryReader(tempFile); executionEvent.AddAttachment(Path.GetFileName(artefactModel.FileName), await _attachmentTypeRepository.GetAsync(at => at.Key == "docx"), tempFile.Length, rdr.ReadBytes((int)tempFile.Length), "PatientSummary"); } } }
public void StartSection(ReportInstance firstSection, ReportInstance secondSection, ReportInstance thirdSection) { m_rootGO.SetActive(true); PullExercises(firstSection, secondSection, thirdSection); ShowPanel(); m_exitSectionButton.gameObject.SetActive(true); }
protected void Page_Init(object sender, EventArgs e) { _context = formContext.View; divCausality.Visible = false; if (Request.QueryString["rid"] != null) { _rid = Convert.ToInt32(Request.QueryString["rid"]); if (_rid > 0) { _reportInstance = UnitOfWork.Repository <ReportInstance>().Queryable().SingleOrDefault(ri => ri.Id == _rid); if (_reportInstance.WorkFlow.Description == "New Active Surveilliance Report") { _formMode = FormMode.ActiveMode; _clinicalEvent = UnitOfWork.Repository <PatientClinicalEvent>().Queryable().Include(pce => pce.Patient).SingleOrDefault(pce => pce.PatientClinicalEventGuid == _reportInstance.ContextGuid); HandleActiveInit(); } else { _formMode = FormMode.SpontaneousMode; _instance = UnitOfWork.Repository <DatasetInstance>().Queryable().SingleOrDefault(di => di.DatasetInstanceGuid == _reportInstance.ContextGuid); HandleSpontaneousInit(); } } else { throw new Exception("rid parameter not passed"); } } }
public static List <Declaration> GetChunkDeclarations() { if (OnDemandProcessingManager.m_ChunkDeclarations == null) { List <Declaration> list = new List <Declaration>(21); list.Add(ScopeInstance.GetDeclaration()); list.Add(ReportInstance.GetDeclaration()); list.Add(DataSetInstance.GetDeclaration()); list.Add(DataRegionInstance.GetDeclaration()); list.Add(DataRegionMemberInstance.GetDeclaration()); list.Add(DataCellInstance.GetDeclaration()); list.Add(DataAggregateObjResult.GetDeclaration()); list.Add(SubReportInstance.GetDeclaration()); list.Add(GroupTreePartition.GetDeclaration()); list.Add(ReportSnapshot.GetDeclaration()); list.Add(ParametersImplWrapper.GetDeclaration()); list.Add(ParameterImplWrapper.GetDeclaration()); list.Add(SubReportInfo.GetDeclaration()); list.Add(ParameterInfo.GetNewDeclaration()); list.Add(ParameterInfoCollection.GetDeclaration()); list.Add(ParameterBase.GetNewDeclaration()); list.Add(ValidValue.GetNewDeclaration()); list.Add(FieldInfo.GetDeclaration()); list.Add(TreePartitionManager.GetDeclaration()); list.Add(LookupObjResult.GetDeclaration()); list.Add(DataCellInstanceList.GetDeclaration()); return(list); } return(OnDemandProcessingManager.m_ChunkDeclarations); }
public void CreateWorkFlowInstance(string workFlowName, Guid contextGuid, string patientIdentifier, string sourceIdentifier) { Check.IsEmpty(workFlowName, "workFlow may not be empty"); Check.IsNotNull(contextGuid, "contextGuid may not be null"); // Ensure instance does not exist for this context var workFlow = _unitOfWork.Repository <WorkFlow>().Queryable().SingleOrDefault(wf => wf.Description == workFlowName); Check.IsNotNull(workFlow, "contextGuid may not be null"); var currentUser = UserContext.CurrentUser != null?_unitOfWork.Repository <User>().Queryable().SingleOrDefault(u => u.Id == UserContext.CurrentUser.Id) : null; ReportInstance reportInstance = _unitOfWork.Repository <ReportInstance>().Queryable().SingleOrDefault(ri => ri.ContextGuid == contextGuid); if (reportInstance == null) { reportInstance = new ReportInstance(workFlow, currentUser) { ContextGuid = contextGuid, PatientIdentifier = patientIdentifier, SourceIdentifier = sourceIdentifier }; _unitOfWork.Repository <ReportInstance>().Save(reportInstance); reportInstance.SetIdentifier(); _unitOfWork.Repository <ReportInstance>().Update(reportInstance); _unitOfWork.Complete(); } }
private void PrepareE2BSubmissionMenuItems(HtmlGenericControl ul, ReportInstance reportInstance) { HyperLink hyp; HtmlGenericControl li; var e2bSubExecutionStatus = UnitOfWork.Repository <Activity>().Queryable().Single(a => a.QualifiedName == reportInstance.CurrentActivity.QualifiedName && a.WorkFlow.Id == reportInstance.WorkFlow.Id).ExecutionStatuses.Single(es => es.Description == "E2BSUBMITTED"); li = new HtmlGenericControl("li"); hyp = new HyperLink() { NavigateUrl = "/Activity/AddActivity?activityInstanceId=" + reportInstance.CurrentActivity.Id.ToString() + "&activityExecutionStatusId=" + e2bSubExecutionStatus.Id.ToString(), Text = "Confirm E2B Submission" }; li.Controls.Add(hyp); ul.Controls.Add(li); li = new HtmlGenericControl("li"); var e2batt = reportInstance.CurrentActivity.ExecutionEvents.OrderByDescending(ee => ee.EventDateTime).First(ee => ee.ExecutionStatus.Description == "E2BGENERATED").Attachments.SingleOrDefault(att => att.Description == "E2b"); if (e2batt != null) { hyp = new HyperLink() { NavigateUrl = "/FileDownload/DownloadSingleAttachment?attid=" + e2batt.Id, Text = "Download XML" }; li.Controls.Add(hyp); ul.Controls.Add(li); } li = new HtmlGenericControl("li"); li.Attributes.Add("class", "divider"); ul.Controls.Add(li); }
private async Task CreateLinksForTerminologyStepAsync(ReportInstance reportInstanceFromRepo, ReportInstanceDetailDto mappedReportInstance) { var config = await _configRepository.GetAsync(c => c.ConfigType == ConfigType.AssessmentScale); if (config == null) { return; } ; mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceTerminology", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, mappedReportInstance.Id), "setmeddra", "PUT")); if (reportInstanceFromRepo.CurrentActivity.CurrentStatus.Description != "NOTSET") { // ConfigType.AssessmentScale if (config.ConfigValue == "Both Scales" || config.ConfigValue == "WHO Scale") { mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceStatus", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, reportInstanceFromRepo.Id), "whocausalityset", "PUT")); } if (config.ConfigValue == "Both Scales" || config.ConfigValue == "Naranjo Scale") { mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceStatus", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, reportInstanceFromRepo.Id), "naranjocausalityset", "PUT")); } mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceStatus", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, reportInstanceFromRepo.Id), "causalityset", "PUT")); } }
public List <DictionaryVmodel> GetDetailRptDataSource(string rpts, string strCompanyProperty, string strMonthReportOrderType, bool IncludeHaveDetail) { ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); List <DictionaryVmodel> AllData = new List <DictionaryVmodel>(); if (rpt._MonthReportID != Guid.Empty) { //B_MonthlyReportJsonData B_JsonData = new B_MonthlyReportJsonData(); //try //{ // B_JsonData = B_MonthlyReportJsonDataOperator.Instance.GetMonthlyReportJsonData(rpt._MonthReportID); //} //catch (Exception) //{ // B_JsonData = null; //} ////获取 表中的JSon数据 //if (B_JsonData != null && !string.IsNullOrEmpty(B_JsonData.QuerryDetaileJsonData) && strMonthReportOrderType == "Detail") //{ // AllData = JsonHelper.Deserialize<List<DictionaryVmodel>>(B_JsonData.QuerryDetaileJsonData); //} //else //{ AllData = ReportInstanceDetailEngine.ReportInstanceDetailService.GetDetailRptDataSource(rpt, strCompanyProperty, strMonthReportOrderType, IncludeHaveDetail); //} } return(AllData); }
public List <DictionaryVmodel> GetMissTargetList(string rpts) { ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); List <DictionaryVmodel> MissTargetData = new List <DictionaryVmodel>(); if (rpt._MonthReportID != Guid.Empty) { B_MonthlyReportJsonData B_JsonData = new B_MonthlyReportJsonData(); try { B_JsonData = B_MonthlyReportJsonDataOperator.Instance.GetMonthlyReportJsonData(rpt._MonthReportID); } catch (Exception) { B_JsonData = null; } //获取 表中的JSon数据 if (B_JsonData != null && !string.IsNullOrEmpty(B_JsonData.QuerryMissJsonData)) { MissTargetData = JsonHelper.Deserialize <List <DictionaryVmodel> >(B_JsonData.QuerryMissJsonData); } else { MissTargetData = ReportInstanceMissTargetEngine.ReportInstanceMissTargetService.GetMissTargetRptDataSource(rpt); } } return(MissTargetData); }
public List <DictionaryVmodel> GetProReportInstance(string strMonthReportID, string strProType, string strSystemID, string strBusinessID) { ReportInstance rpt = null; if (string.IsNullOrEmpty(strProType)) { rpt = new ReportInstance(strMonthReportID.ToGuid(), true); } else { B_SystemBatch _BatchModel = B_SystemBatchOperator.Instance.GetSystemBatch(strBusinessID.ToGuid()); if (_BatchModel != null) { List <V_SubReport> rptList = JsonHelper.Deserialize <List <V_SubReport> >(_BatchModel.SubReport); V_SubReport rptModel = rptList.Find(p => p.SystemID == strSystemID.ToGuid()); rpt = new ReportInstance(rptModel.ReportID, true); } } List <DictionaryVmodel> listSRDS = ReportInstanceSummaryEngine.ReportInstanceSummaryService.GetSummaryRptDataSource(rpt, false); return(listSRDS); }
public List <DictionaryVmodel> GetReportInstance(string strMonthReportID, string strBacthID, string strProType) { ReportInstance rpt = null; if (string.IsNullOrEmpty(strProType)) { rpt = new ReportInstance(strMonthReportID.ToGuid(), null, false); } else { rpt = new ReportInstance(null, strBacthID.ToGuid(), true); } List <DictionaryVmodel> listSRDS = new List <DictionaryVmodel>(); //B_MonthlyReportJsonData B_JsonData = new B_MonthlyReportJsonData(); //listSRDS = GetJsonData(strMonthReportID.ToGuid()); //if (listSRDS != null) //{ // return listSRDS; //} //else //{ // rpt = new ReportInstance(strMonthReportID.ToGuid(), true); listSRDS = ReportInstanceSummaryEngine.ReportInstanceSummaryService.GetSummaryRptDataSource(rpt, false); return(listSRDS); //} }
private async Task CreateE2BExtractAndLinkToExecutionEventAsync(ReportInstance reportInstance, ActivityExecutionStatusEvent executionEvent) { if (reportInstance is null) { throw new ArgumentNullException(nameof(reportInstance)); } if (executionEvent is null) { throw new ArgumentNullException(nameof(executionEvent)); } var e2bInstance = await GetDatasetInstance(reportInstance); if (e2bInstance == null) { throw new KeyNotFoundException($"Unable to locate E2B dataset for report {reportInstance.Id} for XML generation"); } var artefactModel = await _xmlDocumentService.CreateE2BDocumentAsync(e2bInstance); using (var tempFile = File.OpenRead(artefactModel.FullPath)) { if (tempFile.Length > 0) { BinaryReader rdr = new BinaryReader(tempFile); executionEvent.AddAttachment(Path.GetFileName(artefactModel.FileName), _unitOfWork.Repository <AttachmentType>().Queryable().Single(at => at.Key == "xml"), tempFile.Length, rdr.ReadBytes((int)tempFile.Length), "E2b"); } } }
private async Task CustomReportInstanceMedicationMapAsync(ReportInstance reportInstanceFromRepo, ReportInstanceMedicationDetailDto dto) { if (reportInstanceFromRepo.WorkFlow.Description == "New Spontaneous Surveilliance Report") { var datasetInstanceFromRepo = await _datasetInstanceRepository.GetAsync(di => di.DatasetInstanceGuid == reportInstanceFromRepo.ContextGuid); if (datasetInstanceFromRepo != null) { var drugItemValues = datasetInstanceFromRepo.GetInstanceSubValues("Product Information", dto.ReportInstanceMedicationGuid); var drugName = drugItemValues.SingleOrDefault(div => div.DatasetElementSub.ElementName == "Product")?.InstanceValue; DateTime tempdt; var startElement = drugItemValues.SingleOrDefault(div => div.DatasetElementSub.ElementName == "Drug Start Date"); var stopElement = drugItemValues.SingleOrDefault(div => div.DatasetElementSub.ElementName == "Drug End Date"); dto.StartDate = startElement != null?DateTime.TryParse(startElement.InstanceValue, out tempdt) ? Convert.ToDateTime(startElement.InstanceValue).ToString("yyyy-MM-dd") : "" : ""; dto.EndDate = stopElement != null?DateTime.TryParse(stopElement.InstanceValue, out tempdt) ? Convert.ToDateTime(stopElement.InstanceValue).ToString("yyyy-MM-dd") : "" : ""; } } else { var medication = await _patientMedicationRepository.GetAsync(p => p.PatientMedicationGuid == dto.ReportInstanceMedicationGuid); if (medication == null) { return; } dto.StartDate = medication.StartDate.ToString("yyyy-MM-dd"); dto.EndDate = medication.EndDate.HasValue ? medication.EndDate.Value.ToString("yyyy-MM-dd") : ""; } }
private async Task MapIdsForReportInstanceAsync(ReportInstance reportInstanceFromRepo, ReportInstanceDetailDto dto) { var patientClinicalEvent = await _patientClinicalEventRepository.GetAsync(p => p.PatientClinicalEventGuid == reportInstanceFromRepo.ContextGuid, new string[] { "Patient" }); dto.PatientId = patientClinicalEvent != null ? patientClinicalEvent.Patient.Id : 0; dto.PatientClinicalEventId = patientClinicalEvent != null ? patientClinicalEvent.Id : 0; }
public void Initialize(ReportInstance reportInstance, Action <ReportInstance> onReportElementClick) { m_reportInstance = reportInstance; m_callback = onReportElementClick; m_reportSectionTextMesh.text = reportInstance.SectionType.ToString(); m_reportTakenAtTextMesh.text = reportInstance.TakenAt; }
public List <DictionaryVmodel> GetTargetDetailList(ReportInstance rpts, string strMonthReportOrderType, bool IncludeHaveDetail) { //根据角色获取相关的系统ID List <DictionaryVmodel> RptDictList = null; //这里的“Reported” 是为了在引擎,调用的时候容易判断是在上报,还是在查询的时候调用 RptDictList = ReportInstanceDetailEngine.ReportInstanceDetailService.GetDetailRptDataSource(rpts, "Reported", strMonthReportOrderType, IncludeHaveDetail); return(RptDictList); }
private void CreateLinksForConfirmationStep(ReportInstance reportInstanceFromRepo, ReportInstanceDetailDto mappedReportInstance) { if (reportInstanceFromRepo.CurrentActivity.CurrentStatus.Description == "UNCONFIRMED") { mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceStatus", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, mappedReportInstance.Id), "confirm", "PUT")); mappedReportInstance.Links.Add(new LinkDto(_linkGeneratorService.CreateResourceUriForReportInstance("UpdateReportInstanceStatus", reportInstanceFromRepo.WorkFlow.WorkFlowGuid, mappedReportInstance.Id), "delete", "PUT")); } }
private async Task PrepareMedicationsForActiveReportAsync(ReportInstance reportInstance) { var i = 0; foreach (ReportInstanceMedication reportMedication in reportInstance.Medications) { var patientMedication = await _patientMedicationRepository.GetAsync(pm => pm.PatientMedicationGuid == reportMedication.ReportInstanceMedicationGuid); if (patientMedication != null) { i += 1; List <string[]> rows = new(); List <string> cells = new(); cells.Add("Drug"); cells.Add("Start Date (yyyy-mm-dd)"); cells.Add("End Date (yyyy-mm-dd)"); cells.Add("Dose"); cells.Add("Route"); cells.Add("Causality"); rows.Add(cells.ToArray()); cells = new(); IExtendable extendable = patientMedication; cells.Add(patientMedication.DisplayName); cells.Add(patientMedication.StartDate.ToString("yyyy-MM-dd")); cells.Add(patientMedication.EndDate.HasValue ? patientMedication.EndDate.Value.ToString("yyyy-MM-dd") : ""); cells.Add($"{patientMedication.Dose} {patientMedication.DoseUnit}"); cells.Add(await _attributeService.GetCustomAttributeValueAsync("PatientMedication", "Route", extendable)); cells.Add($"{reportMedication.WhoCausality} {reportMedication.NaranjoCausality}"); rows.Add(cells.ToArray()); _wordDocumentService.AddRowTable(rows, new int[] { 2500, 1250, 1250, 1250, 1250, 3852 }); _wordDocumentService.AddTableHeader("D.1 CLINICIAN ACTION TAKEN WITH REGARD TO MEDICINE"); _wordDocumentService.AddOneColumnTable(new List <string>() { "" }); _wordDocumentService.AddTableHeader("D.2 EFFECT OF DECHALLENGE/RECHALLENGE"); _wordDocumentService.AddOneColumnTable(new List <string>() { "" }); _wordDocumentService.AddTableHeader("D.3 NOTES"); _wordDocumentService.AddOneColumnTable(new List <string>() { "" }); } } }
public List <DictionaryVmodel> GetTargetDetailList(string rpts, string strMonthReportOrderType, bool IncludeHaveDetail) { //根据角色获取相关的系统ID List <DictionaryVmodel> RptDictList = null; if (!string.IsNullOrEmpty(rpts)) { ReportInstance rpt = JsonHelper.Deserialize <ReportInstance>(rpts); //这里的“Reported” 是为了在引擎,调用的时候容易判断是在上报,还是在查询的时候调用 RptDictList = ReportInstanceDetailEngine.ReportInstanceDetailService.GetDetailRptDataSource(rpt, "Reported", strMonthReportOrderType, IncludeHaveDetail); } return(RptDictList); }
private void PrepareCausalityMenuItems(HtmlGenericControl ul, ReportInstance reportInstance, ActivityInstance currentActivityInstance) { HyperLink hyp; HtmlGenericControl li; if (_configValue == "Both Scales" || _configValue == "WHO Scale") { li = new HtmlGenericControl("li"); hyp = new HyperLink() { CssClass = "LoadWaitingScreen", NavigateUrl = "CausalityWHO.aspx?rid=" + reportInstance.Id.ToString(), Text = "WHO Causality" }; li.Controls.Add(hyp); ul.Controls.Add(li); } if (_configValue == "Both Scales" || _configValue == "Naranjo Scale") { li = new HtmlGenericControl("li"); hyp = new HyperLink() { CssClass = "LoadWaitingScreen", NavigateUrl = "CausalityNaranjo.aspx?rid=" + reportInstance.Id.ToString(), Text = "Naranjo Causality" }; li.Controls.Add(hyp); ul.Controls.Add(li); } li = new HtmlGenericControl("li"); li.Attributes.Add("class", "divider"); ul.Controls.Add(li); var causalityExecutionStatus = UnitOfWork.Repository <Activity>().Queryable().Single(a => a.QualifiedName == currentActivityInstance.QualifiedName && a.WorkFlow.Id == reportInstance.WorkFlow.Id).ExecutionStatuses.Single(es => es.Description == "CAUSALITYSET"); li = new HtmlGenericControl("li"); hyp = new HyperLink() { CssClass = "LoadWaitingScreen", NavigateUrl = "/Activity/AddActivity?activityInstanceId=" + currentActivityInstance.Id.ToString() + "&activityExecutionStatusId=" + causalityExecutionStatus.Id.ToString(), Text = "Confirm Causality Set" }; li.Controls.Add(hyp); ul.Controls.Add(li); li = new HtmlGenericControl("li"); li.Attributes.Add("class", "divider"); ul.Controls.Add(li); }
private void MapE2BAttachmentForReportInstance(ReportInstance reportInstanceFromRepo, ReportInstanceDetailDto dto) { var latestE2BGeneratedExecutionEvent = reportInstanceFromRepo.CurrentActivity.GetLatestE2BGeneratedEvent(); if (latestE2BGeneratedExecutionEvent != null) { var e2bAttachment = latestE2BGeneratedExecutionEvent.Attachments.SingleOrDefault(att => att.Description == "E2b"); if (e2bAttachment != null) { dto.ActivityExecutionStatusEventId = latestE2BGeneratedExecutionEvent.Id; dto.AttachmentId = e2bAttachment.Id; } } }