Exemple #1
0
 public Boolean updateAddOnVerificationRequests(String callerName, String changeRequestType, String testsAddOnVerify, String eMail, String labLocation, String specialInstructions, String UserID, String UserLab, String ReasonForReq, String PathologistRequested, String OriginalPathalogist, String CheckTubeType)
 {
     String[] arr = DL_Accession.updateAddOnVerificationRequests(this.AccessionNumber, callerName, changeRequestType, testsAddOnVerify, eMail, labLocation, specialInstructions, this.ClientMnemonic, UserID, UserLab, ReasonForReq, PathologistRequested, OriginalPathalogist, CheckTubeType).Split('^');
     if (arr.Length == 4)
     {
         DataRow dr = this.Requests.NewRow();
         dr["ConfirmationNumber"] = arr[0];
         dr["CallerName"]         = callerName;
         dr["RequestDate"]        = arr[1];
         dr["RequestTime"]        = arr[2];
         dr["RequestType"]        = changeRequestType;
         dr["Email"] = eMail;
         dr["SpecialInstructions"] = specialInstructions;
         dr["Tests"]                = testsAddOnVerify;
         dr["LabID"]                = labLocation;
         dr["LabLocation"]          = arr[3];
         dr["ReasonForReq"]         = ReasonForReq;
         dr["PathalogistRequested"] = PathologistRequested;
         dr["OriginalPathalogist"]  = OriginalPathalogist;
         dr["CheckTubeType"]        = CheckTubeType;
         this.Requests.Rows.InsertAt(dr, 0);
         this.Requests.AcceptChanges();
         return(true);
     }
     return(false);
 }
Exemple #2
0
    public AccessionExtended(String accessionNumber)
    {
        this._accessionNumber = accessionNumber;
        Int32 accessionCount = DL_Accession.AccessionCount(accessionNumber);

        this.IsValid = (accessionCount == 1) ? true : false;
    }
Exemple #3
0
    //AM Issue#32875 03/26/2008 Build Number 1.0.0.9
    public static DataTable getAccessionDetails(string AccessionNumber)
    {
        DataTable       returnDataTable = new DataTable();
        DL_TestDeletion testDeletion    = new DL_TestDeletion();

        //returnDataTable = testDeletion.getAccessionDetails(AccessionNumber);
        returnDataTable = DL_Accession.getUnitsOrderedByAccession(AccessionNumber); //AM Issue#32876 09/22/2008 Build Number 1.0.14.0
        return(returnDataTable);
    }
Exemple #4
0
    public Boolean printClientReport(String printerName, String userName)
    {
        String message = DL_Accession.printClientReport(this.AccessionNumber, printerName, userName);

        if (message.Length > 0)
        {
            return(true);
        }
        return(false);
    }
Exemple #5
0
    public Boolean sendAutoDialFax(String userName)
    {
        String message = DL_Accession.sendAutoDialFax(this.AccessionNumber, this.ClientMnemonic, this.AutoDial, userName);

        if (message.Length > 0)
        {
            return(true);
        }
        return(false);
    }
Exemple #6
0
 public static Boolean updateTransitRequest(String confirmationNumber, String callerName, String changeRequestType, String testsAddOnVerify, String eMail, String labLocation, String specialInstructions, String userID)
 {
     if (DL_Accession.updateAddOnVerificationRequests(confirmationNumber, callerName, changeRequestType, eMail, labLocation, specialInstructions, testsAddOnVerify, userID, "", "", "", "", true) > 0)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #7
0
    public DataTable GetRequests(String accessionNumber)
    {
        DataTable requests = DL_Accession.getRequests(this.AccessionNumber);

        //Formating the data (handling newline which is ; in Antrim).
        for (int intCnt = 0; intCnt < requests.Rows.Count; intCnt++)
        {
            requests.Rows[intCnt]["SpecialInstructions"] = requests.Rows[intCnt]["SpecialInstructions"].ToString().Replace("|", "\n\r").Replace(";", "\n\r");
        }
        return(requests);
    }
Exemple #8
0
 public Boolean updateAddOnVerificationRequests(String confirmationNumber, String callerName, String changeRequestType, String testsAddOnVerify, String eMail, String labLocation, String specialInstructions, String userID, String ReasonForReq, String PathologistRequested, String OriginalPathalogist, String CheckTubeType, bool isModify)
 {
     if (DL_Accession.updateAddOnVerificationRequests(confirmationNumber, callerName, changeRequestType, eMail, labLocation, specialInstructions, testsAddOnVerify, userID, ReasonForReq, PathologistRequested, OriginalPathalogist, CheckTubeType, isModify) > 0)
     {
         this.Requests = GetRequests(this.AccessionNumber);
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #9
0
 public Boolean updateInquiryNotes(DateTime noteEntryDateTime, String userInitials, String note)
 {
     if (DL_Accession.addInquiryNote(this.AccessionNumber, userInitials, note) > 0)
     {
         this.InquiryNotes    = GetInquiryNotes(this.AccessionNumber);
         this.HasInquiryNotes = true;
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemple #10
0
 public static string saveTransitRequest(String ClientMnemonic, String callerName, String changeRequestType, String testsAddOnVerify, String eMail, String labLocation, String specialInstructions, String UserID, String UserLab)
 {
     String[] arr = DL_Accession.updateAddOnVerificationRequests("", callerName, changeRequestType, testsAddOnVerify, eMail, labLocation, specialInstructions, ClientMnemonic, UserID, UserLab, "", "", "", "").Split('^');
     return(arr[0]);
 }
Exemple #11
0
    public Accession(string accessionNumber)
    {
        this._accessionNumber = accessionNumber;
        DataTable accessionDetail = DL_Accession.getAccessionDetails(accessionNumber);

        if (accessionDetail == null)
        {
            this.IsValid = false;
        }
        else if (accessionDetail.Rows.Count < 1)
        {
            this.IsValid = false;
        }
        else if (accessionDetail.Rows.Count > 1)
        {
            this.IsValid = false;
        }
        else
        {
            this.IsValid = true;

            DataRow dr = accessionDetail.Rows[0];
            this.CollectedDateTime = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["CollectionDateText"].ToString(), dr["CollectionTimeText"].ToString());
            ///<Commented aagrawal 5/17/2008>
            //this.IsCritical = (dr["IsCritical"].ToString() == "N") ? false : true;
            ///</Commented aagrawal 5/17/2008>
            ///<Added aagrawal 5/17/2008>
            this.CriticalInfo = dr["CriticalInfo"].ToString();
            ///</Added aagrawal 5/17/2008>
            this.ChartNumber    = dr["ChartNumber"].ToString();
            this.AutoDial       = dr["AutoDial"].ToString();
            this.PetName        = dr["PetName"].ToString();
            this.ClientID       = dr["ClientNumber"].ToString();
            this.ClientName     = dr["ClientName"].ToString();
            this.ClientMnemonic = dr["ClientMnemonic"].ToString();
            this.OwnerName      = dr["OwnerName"].ToString();
            this.OwnerLastName  = dr["OwnerLastName"].ToString();
            this.Sex            = dr["Sex"].ToString();
            this.Species        = dr["Species"].ToString();
            this.Breed          = dr["Breed"].ToString();
            this.Age            = dr["Age"].ToString();
            this.Doctor         = dr["Doctor"].ToString();
            this.DoctorPhone    = dr["DoctorPhone"].ToString();
            this.Requisition    = dr["RequisitionNumber"].ToString();
            this.BillTo         = dr["BillTo"].ToString();
            this.RecheckNumber  = dr["RecheckNumber"].ToString();

            ///<Commented aagrawal 5/17/2008>
            //this.ZoaReq = (dr["ZoasisRequest"].ToString() == "N") ? false : true;
            ///</Commented aagrawal 5/17/2008>

            ///<Added aagrawal 5/17/2008>
            this.ZoasisRequest = dr["ZoasisRequest"].ToString();
            ///</Added aagrawal 5/17/2008>

            this.OrderedDateTime = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["MiniLogDate"].ToString(), dr["MiniLogTime"].ToString());
            this.TestsOrdered    = dr["TestsOrdered"].ToString();

            ///<Added aagrawal 5/17/2008>
            this.SpecimenSubmitted = dr["SpecimenSubmitted"].ToString();
            ///</Added aagrawal 5/17/2008>

            ///<Commented aagrawal 5/17/2008>
            //this.SpecimenSubmittedInformation = dr["SpecimenSubmittedInformation"].ToString();
            //this.SpecimenSubmittedVolume = dr["SpecimenSubmittedVolume"].ToString();
            ///</Commented aagrawal 5/17/2008>

            this.LabMessage      = dr["LabMessage"].ToString();
            this.ReportNotes     = dr["ReportNotes"].ToString();
            this.HasInquiryNotes = (dr["HasInquiryNotes"].ToString().ToUpper() == "NO" || dr["HasInquiryNotes"].ToString().ToUpper() == "N") ? false : true;
        }
    }
Exemple #12
0
 /// <summary>
 /// Get Inquiry Notes for the accession
 /// </summary>
 /// <param name="accessionNumber"></param>
 /// <returns>Formated inquiry note</returns>
 public static string GetInquiryNotes(string accessionNumber)
 {
     return(DL_Accession.getInquiries(accessionNumber).Replace("\n\r", Environment.NewLine));
 }
Exemple #13
0
 public static void logAccessionDetailsView(String accountNumber, String userID, String lab, String accessionNumber)
 {
     DL_Accession.logAccessionDetailsView(accountNumber, userID, lab, accessionNumber);
 }
Exemple #14
0
 public static String getSpecimenLocation(String accessionNumber)
 {
     return(AccessionExtended.getSpecimenLocation(DL_Accession.getSpecimenLocation(accessionNumber)));
 }
Exemple #15
0
 public String sendAltFax(String autoDial, String fax, String userName)
 {
     return(DL_Accession.sendAltFax(this.AccessionNumber, this.ClientMnemonic, autoDial, fax, userName));
 }
Exemple #16
0
    public void loadDetails()
    {
        dateTimeFormat = AtlasIndia.AntechCSM.functions.getDateTimeFormat();
        if (this.IsValid)
        {
            DataTable accessionDetail = DL_Accession.getExtendedAccessionDetails(this.AccessionNumber);
            DataRow   dr = accessionDetail.Rows[0];

            this.MiniLogDateTime    = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["MiniLogDate"].ToString(), dr["MiniLogTime"].ToString());
            this.MiniLogger         = dr["MiniLoggerInitial"].ToString();
            this.MiniLoggerDispName = dr["MiniLoggerInitialDispName"].ToString();
            this.MaxiLogDateTime    = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["MaxiLogDate"].ToString(), dr["MaxiLogTime"].ToString());
            this.MaxiLogger         = dr["MaxiLoggerInitials"].ToString();
            this.MaxiLoggerDispName = dr["MaxiLoggerInitialsDispName"].ToString();
            this.CollectedDateTime  = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["CollectionDateText"].ToString(), dr["CollectionTimeText"].ToString());
            this.ReceivedDateTime   = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(dr["ReceivedDate"].ToString(), dr["ReceivedTime"].ToString());
            this.InternalNotes      = dr["LabMessage"].ToString();
            this.ExternalNotes      = dr["ReportNotes"].ToString();

            ///<Commented aagrawal 5/17/2008>
            //this.IsCritical = (dr["IsCritical"].ToString() == "N") ? false : true;
            ///</Commented aagrawal 5/17/2008>

            ///<Added aagrawal 5/17/2008>
            this.CriticalInfo = dr["CriticalInfo"].ToString();
            ///</Added aagrawal 5/17/2008>

            this.ChartNumber    = dr["ChartNumber"].ToString();
            this.AutoDial       = dr["AutoDial"].ToString();
            this.PetName        = dr["PetName"].ToString();
            this.ClientID       = dr["ClientNumber"].ToString();
            this.ClientName     = dr["ClientName"].ToString();
            this.ClientMnemonic = dr["ClientMnemonic"].ToString();
            this.OwnerName      = dr["OwnerName"].ToString();
            this.Sex            = dr["Sex"].ToString();
            this.Species        = dr["Species"].ToString();
            this.Breed          = dr["Breed"].ToString();
            this.Age            = dr["Age"].ToString();
            this.Doctor         = dr["Doctor"].ToString();
            this.DoctorPhone    = dr["DoctorPhone"].ToString();
            this.Requisition    = dr["RequisitionNumber"].ToString();
            this.BillTo         = dr["BillTo"].ToString();
            this.RecheckNumber  = dr["RecheckNumber"].ToString();

            ///<Commented aagrawal 5/17/2008>
            //this.ZoaReq = (dr["ZoasisRequest"].ToString() == "N") ? false : true;
            ///</Commented aagrawal 5/17/2008>

            ///<Added aagrawal 5/17/2008>
            this.ZoasisRequest = dr["ZoasisRequest"].ToString();
            ///</Added aagrawal 5/17/2008>

            ///<Commented aagrawal 5/17/2008>
            //this.OrderedDateTime = AtlasIndia.AntechCSM.functions.AddTimeToDate(dr["OrderedDate"].ToString(), dr["OrderedTime"].ToString());
            ///</Commented aagrawal 5/17/2008>

            ///<Added aagrawal 5/17/2008>
            this.OrderedDateTime = this.MaxiLogDateTime;
            ///</Added aagrawal 5/17/2008>

            this.TestsOrdered = dr["TestsOrdered"].ToString();

            ///<Added aagrawal 5/17/2008>
            this.SpecimenSubmitted = dr["SpecimenSubmitted"].ToString();
            ///</Added aagrawal 5/17/2008>

            ///<Commented aagrawal 5/17/2008>
            //this.SpecimenSubmittedInformation = dr["SpecimenSubmittedInformation"].ToString();
            //this.SpecimenSubmittedVolume = dr["SpecimenSubmittedVolume"].ToString();
            ///</Commented aagrawal 5/17/2008>

            this.LabMessage  = dr["LabMessage"].ToString();
            this.ReportNotes = dr["ReportNotes"].ToString();

            this.InquiryNotes    = GetInquiryNotes(this.AccessionNumber);
            this.HasInquiryNotes = (this.InquiryNotes.Length > 0 ? true : false);
            this.ClientTimeZone  = dr["ClientTimeZone"].ToString(); //SSM 20/10/2011 #114978 AntechCSM 2B - Assigning ClientTimeZone value from Database

            this.Requests = GetRequests(this.AccessionNumber);

            if (Int32.TryParse(dr["SpecimenAge"].ToString(), out _specimenAge))
            {
                // TO DO: Value is hard coded, that need to be moved to global config file and the access method also need to be placed in a class.
                Int32 SPECIMEN_VALIDITY_PERIOD = 7;
                if (this.SpecimenAge >= SPECIMEN_VALIDITY_PERIOD)
                {
                    this.NewRequestAlertMessage = "The Specimen is " + this.SpecimenAge + " Days old. New Add-on/Verification request cannot be taken.";
                }
                else
                {
                    this.NewRequestAlertMessage = "The Specimen is " + this.SpecimenAge + " Days old. New Add-on/Verification request can be taken.";
                }
            }
            else
            {
                this.NewRequestAlertMessage = "The specimen age is not specified. New Add-on/Verification request can be taken.";
            }

            this.SpecimenLocationList = DL_Accession.getSpecimenLocation(this.AccessionNumber);
            this.SpecimenLocation     = AccessionExtended.getSpecimenLocation(this.SpecimenLocationList);

            #region Moved in getSpecimenLocation()
            //System.Text.StringBuilder specimenLocationInformationBuilder = new System.Text.StringBuilder();
            //string previousLabLocation = string.Empty;
            //foreach (DataRow tmpRow in this.SpecimenLocationList.Rows)
            //{
            //    string currentLabLocation = tmpRow["LabName"].ToString();
            //    if (String.Compare(currentLabLocation, previousLabLocation) != 0)
            //    {
            //        previousLabLocation = currentLabLocation;
            //        specimenLocationInformationBuilder.AppendLine();
            //        specimenLocationInformationBuilder.Append("Tube assigned to Location: ");
            //        specimenLocationInformationBuilder.AppendLine(currentLabLocation);
            //    }
            //    specimenLocationInformationBuilder.Append("Date: ");
            //    DateTime tmpLocationDate;
            //    if (DateTime.TryParse(tmpRow["LocationDate"].ToString(), out tmpLocationDate))
            //    {
            //        specimenLocationInformationBuilder.Append(tmpLocationDate.ToString("MM/dd/yyyy"));
            //    }
            //    specimenLocationInformationBuilder.Append("\t");
            //    specimenLocationInformationBuilder.Append(" Rack: ");
            //    specimenLocationInformationBuilder.Append(tmpRow["LocationRack"].ToString());
            //    specimenLocationInformationBuilder.Append("\t");
            //    specimenLocationInformationBuilder.Append(" Position: ");
            //    specimenLocationInformationBuilder.Append(tmpRow["LocationPosition"].ToString());
            //    specimenLocationInformationBuilder.Append("\t");
            //    specimenLocationInformationBuilder.Append(" Scanned By: ");
            //    specimenLocationInformationBuilder.AppendLine(tmpRow["User"].ToString());
            //}
            //if (specimenLocationInformationBuilder.Length > 1)
            //{
            //    specimenLocationInformationBuilder.Remove(0, 2);
            //}
            //this.SpecimenLocation = specimenLocationInformationBuilder.ToString();
            #endregion Moved in getSpecimenLocation()


            this.UnitsOrdered            = DL_Accession.getUnitsOrdered(this.AccessionNumber);
            this.AccessionOrderUnitsList = new System.Collections.Generic.List <Unit_ScaledDown>();
            foreach (DataRow unitRow in this.UnitsOrdered.Rows)
            {
                this.AccessionOrderUnitsList.Add(new Unit_ScaledDown(this.AccessionNumber, this.Species, this.Sex, unitRow, false));
            }

            this.SatelliteTable = DL_Accession.getSatelliteInformation(this.AccessionNumber);

            System.Collections.Generic.Dictionary <string, string> labFilter  = new System.Collections.Generic.Dictionary <string, string>();
            System.Collections.Generic.Dictionary <string, string> userFilter = new System.Collections.Generic.Dictionary <string, string>();

            System.Text.StringBuilder satelliteInformationBuilder = new System.Text.StringBuilder();
            System.Text.StringBuilder labListBuilder  = new System.Text.StringBuilder();
            System.Text.StringBuilder userListBuilder = new System.Text.StringBuilder();

            satelliteInformationBuilder.Append("Unit Code");
            satelliteInformationBuilder.Append("\t");
            satelliteInformationBuilder.AppendLine("Reporting Title");
            satelliteInformationBuilder.AppendLine("-----------------------------------");

            foreach (DataRow satelliteRow in this.SatelliteTable.Rows)
            {
                satelliteInformationBuilder.Append(satelliteRow["UnitCode"].ToString());
                satelliteInformationBuilder.Append("\t");

                ///<Commented aagrawal 5/17/2008>
                //satelliteInformationBuilder.AppendLine(satelliteRow["UnitTitle"].ToString());
                ///</Commented aagrawal 5/17/2008>

                ///<Added aagrawal 5/17/2008>
                satelliteInformationBuilder.Append(satelliteRow["UnitTitle"].ToString());
                satelliteInformationBuilder.Append(" (");
                satelliteInformationBuilder.Append(satelliteRow["UnitSpecimenType"].ToString());
                satelliteInformationBuilder.AppendLine(")");
                ///</Added aagrawal 5/17/2008>

                satelliteInformationBuilder.Append("\t");

                ///<Commented aagrawal 5/20/2008>
                //DateTime receivedDateTime;
                //receivedDateTime = AtlasIndia.AntechCSM.functions.AddTimeToDate(satelliteRow["ReceivedDate"].ToString(), satelliteRow["ReceivedTime"].ToString());
                //satelliteInformationBuilder.Append(receivedDateTime.ToString("MM/dd/yyyy HH:mm"));
                ///</Commented aagrawal 5/20/2008>

                ///<Added aagrawal 5/20/2008>
                DateTime?receivedDateTime = AtlasIndia.AntechCSM.functions.AddTimeToDateNullable(satelliteRow["ReceivedDate"].ToString(), satelliteRow["ReceivedTime"].ToString());
                satelliteInformationBuilder.Append((receivedDateTime.HasValue) ? receivedDateTime.Value.ToString(dateTimeFormat) : String.Empty);
                ///</Added aagrawal 5/20/2008>

                satelliteInformationBuilder.Append("\t");
                satelliteInformationBuilder.Append(satelliteRow["ReceivedMode"].ToString());
                satelliteInformationBuilder.Append(" at ");
                satelliteInformationBuilder.Append(satelliteRow["LabID"].ToString());
                satelliteInformationBuilder.Append("\t by ");
                satelliteInformationBuilder.AppendLine(satelliteRow["UserID"].ToString());
                satelliteInformationBuilder.AppendLine();

                if (!labFilter.ContainsKey(satelliteRow["LabID"].ToString()))
                {
                    labFilter.Add(satelliteRow["LabID"].ToString(), satelliteRow["LabName"].ToString());
                    labListBuilder.AppendLine("\t" + satelliteRow["LabID"].ToString() + " = " + satelliteRow["LabName"].ToString());
                }
                if (!userFilter.ContainsKey(satelliteRow["UserID"].ToString()))
                {
                    userFilter.Add(satelliteRow["UserID"].ToString(), satelliteRow["UserFirstLastName"].ToString());
                    userListBuilder.AppendLine("\t" + satelliteRow["UserID"].ToString() + " = " + satelliteRow["UserFirstLastName"].ToString());
                }
            }
            satelliteInformationBuilder.AppendLine("Company Key:");
            satelliteInformationBuilder.AppendLine(labListBuilder.ToString());

            satelliteInformationBuilder.AppendLine("Username Key:");
            satelliteInformationBuilder.AppendLine(userListBuilder.ToString());

            this.SatelliteInformation = satelliteInformationBuilder.ToString();
        }
    }