public static string IncrementReportNo(string reportNo, int increment) { string result = null; int number; OrderIdParser orderIdParser = new OrderIdParser(reportNo); if (orderIdParser.ReportNo != null) { if (orderIdParser.IsLegacyReportNo == true) { number = orderIdParser.ReportNoNumber.Value + increment; result = orderIdParser.ReportNoLetter + orderIdParser.ReportNoYear.Value.ToString() + "-" + number.ToString(); } else { number = orderIdParser.MasterAccessionNoNumber.Value + increment; result = orderIdParser.ReportNoYear.Value.ToString() + "-" + number.ToString() + "." + orderIdParser.ReportNoLetter; int?reportNumber = orderIdParser.ReportNoNumber; if (reportNumber != null) { result += reportNumber.Value.ToString(); } } } return(result); }
public static string GetPath(OrderIdParser orderIdParser) { if (orderIdParser.IsLegacyReportNo == true) { string legacyReportNo = GetLegacyPath(orderIdParser.ReportNo); return(legacyReportNo); } string strPath = @"/mnt/cfileserver/accessiondocuments/20" + orderIdParser.MasterAccessionNoYear.Value.ToString(); string number = orderIdParser.MasterAccessionNoNumber.Value.ToString(); int length = number.Length; switch (length) { case 5: strPath += @"/" + number.Substring(0, 2) + "000-" + number.Substring(0, 2) + @"999/"; break; case 4: strPath += @"/0" + number.Substring(0, 1) + "000-0" + number.Substring(0, 1) + @"999/"; break; default: strPath += @"/00001-00999/"; break; } strPath += orderIdParser.MasterAccessionNo + @"/"; return(strPath); }
public static string GetCaseFileNameXPS(OrderIdParser orderIdParser) { string fileName = GetPath(orderIdParser) + orderIdParser.ReportNo + ".xps"; return(fileName); }
public string GetXPSFilePath() { OrderIdParser orderIdParser = new OrderIdParser(this.m_ReportNo); return(CaseDocumentPath.GetCaseFileNameXPS(orderIdParser)); }