internal static VidalAPI.Domain.Breastfeeding dtoToNative(BreastFeedingDto? breast)
 {
     switch (breast)
     {
         case BreastFeedingDto.ALL: return VidalAPI.Domain.Breastfeeding.BREASTFEEDING_ALL;
         case BreastFeedingDto.LESS_THAN_ONE_MONTH: return VidalAPI.Domain.Breastfeeding.BREASTFEEDING_LESS_THAN_ONE_MONTH;
         case BreastFeedingDto.MORE_THAN_ONE_MONTH: return VidalAPI.Domain.Breastfeeding.BREASTFEEDING_MORE_THAN_ONE_MONTH;
         case BreastFeedingDto.NONE: return VidalAPI.Domain.Breastfeeding.BREASTFEEDING_NONE;
        }
     return VidalAPI.Domain.Breastfeeding.BREASTFEEDING_JNULL;
 }
 internal static ServiceAnalysis.Breastfeeding? dtoToAnalysisService(BreastFeedingDto? breast)
 {
     switch (breast)
     {
         case BreastFeedingDto.ALL: return ServiceAnalysis.Breastfeeding.ALL;
         case BreastFeedingDto.LESS_THAN_ONE_MONTH: return ServiceAnalysis.Breastfeeding.LESS_THAN_ONE_MONTH;
         case BreastFeedingDto.MORE_THAN_ONE_MONTH: return ServiceAnalysis.Breastfeeding.MORE_THAN_ONE_MONTH;
         case BreastFeedingDto.NONE: return ServiceAnalysis.Breastfeeding.NONE;
     }
     return null;
 }
Esempio n. 3
0
        public string AnalysisService_patientFromObjToJson(
          DateTime dateTime,
          GenderDto? gender, int weight, int height, int amen, BreastFeedingDto? breast, int creatin, HepaticInsufficiencyDto? hepatic, List<int> allergiesI, List<int> moleculesI, List<int> cimsI)
        {
            ServiceAnalysis.ArrayOfInt allergies = new ServiceAnalysis.ArrayOfInt();
            foreach(int i in allergiesI){
             allergies.Add(i);
             }
            ServiceAnalysis.ArrayOfInt molecules = new ServiceAnalysis.ArrayOfInt();
            foreach (int i in moleculesI)
            {
            molecules.Add(i);
            }
            ServiceAnalysis.ArrayOfInt cims = new ServiceAnalysis.ArrayOfInt();
            foreach (int i in cimsI)
            {
            cims.Add(i);
            }

              return analysisService.patientFromObjToJson(dateTime, GenderDtoHelper.dtoToAnalysisService(gender), weight, height, amen, BreastFeedingDtoHelper.dtoToAnalysisService(breast), creatin, HepaticDtoHelper.dtoToAnalysisService(hepatic), allergies, molecules, cims);
        }
Esempio n. 4
0
 public List<string> searchPEAlert(int p, DateTime dateOfBirth, int weight, BreastFeedingDto? breastfeeding, int weeksOfAmenorrhoea, int creatinClearance, GenderDto? gender)
 {
     return new List<string>(); //todo ;
 }
 public string AnalysisService_patientFromObjToJson(DateTime dateTime, GenderDto? gender, int weight, int height, int amen, BreastFeedingDto? breast, int creatin, HepaticInsufficiencyDto? hepatic,List<int> allergies, List<int> molecules, List<int> cims)
 {
     return vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().PatientFromObjToJson(dateTime, GenderDtoHelper.dtoToNative(gender), weight, height, amen, BreastFeedingDtoHelper.dtoToNative(breast), creatin, HepaticDtoHelper.dtoToNative(hepatic), allergies, molecules, cims);
 }
 public List<string> searchPEAlert(int p, DateTime dateOfBirth, int weight, BreastFeedingDto? breastfeeding, int weeksOfAmenorrhoea, int creatinClearance, GenderDto? gender)
 {
     IEnumerable<int> productIds = new List<int> { p };
        List<string> result = new List<string>();
        VidalAPI.Domain.ProductPrecautionEppList ciList = vidalProduct.GetService<VidalAPI.Services.PrecautionService>().SearchByProductIdsAndEpp(productIds, dateOfBirth, weight, BreastFeedingDtoHelper.dtoToNative(breastfeeding), weeksOfAmenorrhoea, creatinClearance, GenderDtoHelper.dtoToNative(gender));
        if (ciList != null && ciList.PrecautionEppCouples != null)
        {
        foreach (VidalAPI.Domain.PrecautionEPPCouple couple in ciList.PrecautionEppCouples)
        {
            result.Add(couple.Precaution.Name);
            result.Add(couple.Epp.ToString());
            result.Add(couple.Product.Name);
        }
        }
        if (ciList != null && ciList.Messages != null)
        {
        foreach (VidalAPI.Domain.Message messega in ciList.Messages)
        {
            result.Add(messega.MessageType.ToString());
            result.Add(messega.Text);
        }
        }
        return result;
 }