protected override void ProcessMessage(PipeMessageEnvelope message) { try { var analyticProject = new AnalyticsProject(); var projectDocumentCollection = (ProjectDocumentCollection)message.Body; projectDocumentCollection.ShouldNotBe(null); projectDocumentCollection.Documents.ShouldNotBe(null); var documentIds = projectDocumentCollection.Documents.Select(p => p.DocId).ToList(); var documentResult = analyticProject.BulkGetDocumentsByDocIds(_jobParameter.MatterId, _dataset.CollectionId, documentIds); var projectDocuments = new List <AnalysisSetDocumentInfo>(); foreach (var document in projectDocumentCollection.Documents) { var projectDocument = new AnalysisSetDocumentInfo { DocumentId = (int)document.DocId, PredictedCategory = document.PredictedCategory, DocumentScore = (decimal)document.DocumentScore }; var result = documentResult.FirstOrDefault(d => d.Id == document.DocId); if (result == null) { continue; } projectDocument.DocumentReferenceId = result.DocumentID; projectDocuments.Add(projectDocument); } analyticProject.UpdateFieldsForCategorizeDocuments(_jobParameter.MatterId, _projectInfo, _dataset.CollectionId, WorkAssignment.JobId, projectDocuments); IncreaseProcessedDocumentsCount(projectDocumentCollection.Documents.Count()); //Progress Status } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }
protected override void ProcessMessage(PipeMessageEnvelope message) { try { var analyticProject = new AnalyticsProject(); var projectDocumentCollection = (ProjectDocumentCollection) message.Body; projectDocumentCollection.ShouldNotBe(null); projectDocumentCollection.Documents.ShouldNotBe(null); var documentIds = projectDocumentCollection.Documents.Select(p => p.DocId).ToList(); var documentResult = analyticProject.BulkGetDocumentsByDocIds(_jobParameter.MatterId, _dataset.CollectionId, documentIds); var projectDocuments = new List<AnalysisSetDocumentInfo>(); foreach (var document in projectDocumentCollection.Documents) { var projectDocument = new AnalysisSetDocumentInfo { DocumentId = (int) document.DocId, PredictedCategory = document.PredictedCategory, DocumentScore = (decimal) document.DocumentScore }; var result = documentResult.FirstOrDefault(d => d.Id == document.DocId); if (result == null) continue; projectDocument.DocumentReferenceId = result.DocumentID; projectDocuments.Add(projectDocument); } analyticProject.UpdateFieldsForCategorizeDocuments(_jobParameter.MatterId, _projectInfo, _dataset.CollectionId, WorkAssignment.JobId, projectDocuments); IncreaseProcessedDocumentsCount(projectDocumentCollection.Documents.Count()); //Progress Status } catch (Exception ex) { ex.Trace().Swallow(); ReportToDirector(ex); } }
public AnalysisSetDocumentInfo GetUncodedDocument(long orgId, long matterId, long dataSetId, long projectId, string documentRefId, DocumentQueryContext searchContext) { var result = new AnalysisSetDocumentInfo(); var docList = new DocumentList(); if(searchContext.AnalysisSet.Type == AnalysisSetType.ControlSet) { docList.Documents = mockDocuments.Documents.Where(d => d.Fields[ControlDocumentIndex].Value == "1").ToList(); docList.Total = docList.Documents.Count; } if (searchContext.AnalysisSet.Type == AnalysisSetType.TrainingSet) { docList.Documents = mockDocuments.Documents.Where(d => d.Fields[TrainingDocumentIndex].Name == searchContext.AnalysisSet.Name).ToList(); docList.Total = docList.Documents.Count; } if (searchContext.AnalysisSet.Type == AnalysisSetType.QcSet) { docList.Documents = mockDocuments.Documents.Where(d => d.Fields[QualityDocumentIndex].Name == searchContext.AnalysisSet.Name).ToList(); docList.Total = docList.Documents.Count; } result.TotalDocumentCount = docList.Documents.Count; var doc = docList.Documents.Find( d => d.Fields.Exists(f => (f.DisplayName == "Reviewer Category" && f.Value == NotCoded))); if (doc != null) { result.DocumentReferenceId = doc.ReferenceId; result.ProjectName = "Predictive Coding Project"; result.DocumentText = "Mock Document " + doc.Id + " - Concordance® Evolution feeds your need for speed during document review. Litigation support professionals and document reviewers told us what they need most in an e-discovery review engine: outstanding speed, capacity and ease of use. Get it all with LexisNexis® Concordance® Evolution. Concordance® puts you in the driver’s seat, maintaining control and accelerating the review process to enhance client service and improve efficiency."; result.DocumentIndexId = Convert.ToInt32(doc.Id); result.ReviewerCategory = NotCoded; var dcnField = doc.Fields.Find(f => (f.DisplayName == "DCN")); if (dcnField != null) { result.DocumentDcn = dcnField.Value; } } var reviewStatus = doc != null ? Status.Inprogress : Status.Completed; MockWorkflowState.SetReviewStatus(searchContext.AnalysisSet.Type, reviewStatus); return result; }
public AnalysisSetDocumentInfo GetDocumentByRefId(long orgId, long matterId, long dataSetId, long projectId, string analysisset, string documentRefId) { AnalysisSetDocumentInfo result = new AnalysisSetDocumentInfo(); var doc = mockDocuments.Documents.Find(d => documentRefId == d.ReferenceId); if (doc != null) { result.DocumentReferenceId = doc.ReferenceId; result.ProjectName = "Predictive Coding Project"; result.DocumentText = "Mock Document " + doc.Id + " - Concordance® Evolution feeds your need for speed during document review. Litigation support professionals and document reviewers told us what they need most in an e-discovery review engine: outstanding speed, capacity and ease of use. Get it all with LexisNexis® Concordance® Evolution. Concordance® puts you in the driver’s seat, maintaining control and accelerating the review process to enhance client service and improve efficiency."; var field = doc.Fields.Find(f => f.DisplayName == "Reviewer Category"); var dcnField = doc.Fields.Find(f => f.DisplayName == "DCN"); if (field != null) { result.ReviewerCategory = field.Value; } if (dcnField != null) { result.DocumentDcn = dcnField.Value; } } return result; }