예제 #1
0
 public static Label GetMolecularLabel(LabelFormatEnum labelFormat, string masterAccessionNo, string patientFirstName, string patientLastName, string specimenDescription, 
     YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet, bool includeTestAbbreviation)
 {
     Label result = null;
     switch (labelFormat)
     {
         case LabelFormatEnum.DYMO:
             result = new MolecularLabelDymo(masterAccessionNo, patientFirstName, patientLastName, specimenDescription, panelSet, includeTestAbbreviation);
             break;
         case LabelFormatEnum.ZEBRA:
             result = new MolecularLabelZebra(masterAccessionNo, patientFirstName, patientLastName, specimenDescription, panelSet);
             break;
     }
     return result;
 }
예제 #2
0
        public static Label GetMolecularLabel(LabelFormatEnum labelFormat, string masterAccessionNo, string patientFirstName, string patientLastName, string specimenDescription,
                                              YellowstonePathology.Business.PanelSet.Model.PanelSet panelSet, bool includeTestAbbreviation)
        {
            Label result = null;

            switch (labelFormat)
            {
            case LabelFormatEnum.DYMO:
                result = new MolecularLabelDymo(masterAccessionNo, patientFirstName, patientLastName, specimenDescription, panelSet, includeTestAbbreviation);
                break;

            case LabelFormatEnum.ZEBRA:
                result = new MolecularLabelZebra(masterAccessionNo, patientFirstName, patientLastName, specimenDescription, panelSet);
                break;
            }
            return(result);
        }
예제 #3
0
        protected RestRequest createDownloadShipmentLabel(string id, LabelFormatEnum format, LabelTypeEnum type)
        {
            RestRequest request = new RestRequest($"/v1/shipments/{id}/label?format={format.ToString()}&type={type.ToString()}", Method.GET);

            return(request);
        }
예제 #4
0
        public async Task <Result <LabelData> > DownloadShipmentLabelAsync(string shipmentId, LabelFormatEnum format = LabelFormatEnum.Pdf, LabelTypeEnum type = LabelTypeEnum.normal)
        {
            RestRequest request = createDownloadShipmentLabel(shipmentId, format, type);

            IRestResponse response = await RestClient.ExecuteTaskAsync(request);

            byte[] response2 = RestClient.DownloadData(request);

            File.WriteAllBytes(@"C:\\test.pdf", response2);

            return(new Result <LabelData>(response));
        }
예제 #5
0
        public byte[] DownloadShipmentLabel(string shipmentId, LabelFormatEnum format = LabelFormatEnum.Pdf, LabelTypeEnum type = LabelTypeEnum.normal)
        {
            RestRequest request = createDownloadShipmentLabel(shipmentId, format, type);

            return(RestClient.DownloadData(request));
        }