internal static VidalAPI.Domain.DurationType dtoToNative(DurationTypeDto? breast)
 {
     switch (breast)
     {
         case DurationTypeDto.DAY: return VidalAPI.Domain.DurationType.DURATIONTYPE_DAY;
         case DurationTypeDto.HOUR: return VidalAPI.Domain.DurationType.DURATIONTYPE_HOUR;
         case DurationTypeDto.WEEK: return VidalAPI.Domain.DurationType.DURATIONTYPE_WEEK;
         case DurationTypeDto.YEAR: return VidalAPI.Domain.DurationType.DURATIONTYPE_YEAR;
         case DurationTypeDto.MINUTE: return VidalAPI.Domain.DurationType.DURATIONTYPE_MINUTE;
         case DurationTypeDto.MONTH: return VidalAPI.Domain.DurationType.DURATIONTYPE_MONTH;
        }
     return VidalAPI.Domain.DurationType.DURATIONTYPE_JNULL;
 }
        internal static ServiceAnalysis.DurationType? dtoToAnalysisService(DurationTypeDto? breast)
        {
            switch (breast)
            {

                case DurationTypeDto.DAY: return ServiceAnalysis.DurationType.DAY;
                case DurationTypeDto.HOUR: return ServiceAnalysis.DurationType.HOUR;
                case DurationTypeDto.WEEK: return ServiceAnalysis.DurationType.WEEK;
                case DurationTypeDto.YEAR: return ServiceAnalysis.DurationType.YEAR;
                case DurationTypeDto.MINUTE: return ServiceAnalysis.DurationType.MINUTE;
                case DurationTypeDto.MONTH: return ServiceAnalysis.DurationType.MONTH;
            }
            return null;
        }
 public string AnalysisService_prescriptionLineInActivePrincipleDosesFromObjToJson(double dose, DoseUnitDto doseUnit, PosologyFrequencyTypeDto freq, List<int>indicationsI, List<int> routesI, int id, DrugTypeDto type, int p, DurationTypeDto durationType)
 {
     ServiceAnalysis.ArrayOfInt indications = new ServiceAnalysis.ArrayOfInt();
     foreach (int i in indicationsI)
     {
         indications.Add(i);
     }
     ServiceAnalysis.ArrayOfInt routes = new ServiceAnalysis.ArrayOfInt();
     foreach (int i in routesI)
     {
         routes.Add(i);
     }
     return analysisService.prescriptionLineInActivePrincipleDosesFromObjToJson(dose, DoseUnitDtoHelper.dtoToAnalysisService(doseUnit), PosologyFrequencyTypeDtoHelper.dtoToAnalysisService(freq), indications, routes, id, DrugTypeDtoHelper.dtoToAnalysisService(type), p, DurationTypeDtoHelper.dtoToAnalysisService(durationType));
 }
        public string AnalysisService_prescriptionLineInDosesFromObjToJson(double dose, int unit,PosologyFrequencyTypeDto freq, List<int> indicationsI, List<int> routesI, int id, DrugTypeDto type, int p, DurationTypeDto durationType)
        {
            ServiceAnalysis.ArrayOfInt indications = new ServiceAnalysis.ArrayOfInt();
            foreach (int i in indicationsI)
            {
                indications.Add(i);
            }
            ServiceAnalysis.ArrayOfInt routes = new ServiceAnalysis.ArrayOfInt();
            foreach (int i in routesI)
            {
                routes.Add(i);
            }

               return analysisService.prescriptionLineInDosesFromObjToJson(dose, unit, PosologyFrequencyTypeDtoHelper.dtoToAnalysisService(freq), indications, routes, id, DrugTypeDtoHelper.dtoToAnalysisService(type), p, DurationTypeDtoHelper.dtoToAnalysisService(durationType));
               // return analysisService.prescriptionLineInDosesFromObjToJson(dose, unit,ServiceAnalysis.PosologyFrequencyType.PER_DAY, indications, routes, id, ServiceAnalysis.DrugType.PRODUCT, p, ServiceAnalysis.DurationType.DAY);
        }
 public string AnalysisService_prescriptionLineInDosesFromObjToJson(double dose, int unit,PosologyFrequencyTypeDto freq, List<int> indications, List<int> routes, int id, DrugTypeDto type, int p, DurationTypeDto durationType)
 {
     VidalAPI.Domain.PosologyFrequencyType dtoFreq = PosologyFrequencyTypeDtoHelper.dtoToNative(freq);
        string result = vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().PrescriptionLineInDosesFromObjToJson(dose, unit, dtoFreq, indications, routes, id, DrugTypeDtoHelper.dtoToNative(type), p, DurationTypeDtoHelper.dtoToNative(durationType));
     return result;
 }
 public string AnalysisService_prescriptionLineInActivePrincipleDosesFromObjToJson(double dose, DoseUnitDto doseUnit, PosologyFrequencyTypeDto freq, List<int>indications, List<int> routes, int id, DrugTypeDto type, int p, DurationTypeDto durationType)
 {
     return vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().PrescriptionLineInActivePrincipleDosesFromObjToJson(dose, DoseUnitDtoHelper.dtoToNative(doseUnit), PosologyFrequencyTypeDtoHelper.dtoToNative(freq), indications, routes, id, DrugTypeDtoHelper.dtoToNative(type), p, DurationTypeDtoHelper.dtoToNative(durationType));
 }