private void button6_Click(object sender, EventArgs e) { flashTreeView.Nodes.Clear(); string patient = patientJson.Items[0].ToString(); List<string> prescr = new List<string>(); foreach( DataGridViewRow row in dataGridView1.Rows){ if (row.Cells[2].Value != null) { prescr.Add((string)row.Cells[2].Value); } } VidalAPI.Domain.DrugSummarizedAlertCoupleList flash = vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().GetSummarizedAlert(patient,prescr); TreeNode PrescrAlert = new TreeNode(); if (flash != null) { foreach (VidalAPI.Domain.DrugSummarizedAlertCouple couple in flash) { TreeNode Alert = new TreeNode(); Alert.Text = couple.SummarizedDrug.Id.ToString(); TreeNode allergyAlert = new TreeNode(); allergyAlert.Text = "Allergie : " + couple.SummarizedAlert.AllergiesAlert; Alert.Nodes.Add(allergyAlert); TreeNode iamAlert = new TreeNode(); iamAlert.Text = "Alertes IAM : " + couple.SummarizedAlert.InteractionsAlert; Alert.Nodes.Add(iamAlert); TreeNode ciAlert = new TreeNode(); ciAlert.Text = "Alertes CI : " + couple.SummarizedAlert.ContraIndicationsAlert; Alert.Nodes.Add(ciAlert); TreeNode peAlert = new TreeNode(); peAlert.Text = "Alertes PE : " + couple.SummarizedAlert.PrecautionsAlert; Alert.Nodes.Add(peAlert); TreeNode redundantAlert = new TreeNode(); redundantAlert.Text = "Alertes redondances : " + couple.SummarizedAlert.RedundantInteractionsAlert; Alert.Nodes.Add(redundantAlert); TreeNode posoAlert = new TreeNode(); posoAlert.Text = "Alertes posos : " + couple.SummarizedAlert.PosologyAlert; Alert.Nodes.Add(posoAlert); TreeNode physicoAlert = new TreeNode(); physicoAlert.Text = "Alertes physicoChimique : " + couple.SummarizedAlert.PhysicoChemicalAlert; Alert.Nodes.Add(physicoAlert); PrescrAlert.Nodes.Add(Alert); } } flashTreeView.Nodes.Add(PrescrAlert); AnalyseForm analyse = new AnalyseForm(vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().GetAlertsAsHTML(patient,prescr)); analyse.Show(); VidalAPI.Domain.PrescriptionCostAnalysis prices = vidalProduct.GetService<VidalAPI.Services.DrugPrescriptionAnalysisService>().GetPrescriptionCostAnalysis(prescr); for(int i=0;i< prices.PrescriptionLineCostList.Count;i++){ if(prices.PrescriptionLineCostList[i].PriceRange != null){ dataGridView1[0,i].Value = prices.PrescriptionLineCostList[i].PriceRange.MinPrice; } else{ dataGridView1[0,i].Value = "NC"; } } //MessageBox.Show("Prix estimatif : " + prices.MinPrice); }
private void button6_Click(object sender, EventArgs e) { flashTreeView.Nodes.Clear(); string patient = patientControl2.getPatientJson(); List<string> prescr = new List<string>(); foreach( DataGridViewRow row in dataGridView1.Rows){ if (row.Cells[GRID_NAME].Value != null) { prescr.Add((string)row.Cells[GRID_NAME].ToolTipText); } } List<DrugSummarizedAlertCoupleDto> flash = helper.AnalysisService_getSummarizedAlert(patient,prescr); TreeNode PrescrAlert = new TreeNode(); if (flash != null) { foreach ( DrugSummarizedAlertCoupleDto couple in flash) { TreeNode Alert = new TreeNode(); Alert.Text = couple.SummarizedDrug.Id.ToString(); TreeNode allergyAlert = new TreeNode(); allergyAlert.Text = "Allergie : " + couple.SummarizedAlert.AllergiesAlert; Alert.Nodes.Add(allergyAlert); TreeNode iamAlert = new TreeNode(); iamAlert.Text = "Alertes IAM : " + couple.SummarizedAlert.InteractionsAlert; Alert.Nodes.Add(iamAlert); TreeNode ciAlert = new TreeNode(); ciAlert.Text = "Alertes CI : " + couple.SummarizedAlert.ContraIndicationsAlert; Alert.Nodes.Add(ciAlert); TreeNode peAlert = new TreeNode(); peAlert.Text = "Alertes PE : " + couple.SummarizedAlert.PrecautionsAlert; Alert.Nodes.Add(peAlert); TreeNode redundantAlert = new TreeNode(); redundantAlert.Text = "Alertes redondances : " + couple.SummarizedAlert.RedundantInteractionsAlert; Alert.Nodes.Add(redundantAlert); TreeNode posoAlert = new TreeNode(); posoAlert.Text = "Alertes posos : " + couple.SummarizedAlert.PosologyAlert; Alert.Nodes.Add(posoAlert); TreeNode physicoAlert = new TreeNode(); physicoAlert.Text = "Alertes physicoChimique : " + couple.SummarizedAlert.PhysicoChemicalAlert; Alert.Nodes.Add(physicoAlert); PrescrAlert.Nodes.Add(Alert); } } flashTreeView.Nodes.Add(PrescrAlert); AnalyseForm analyse = new AnalyseForm(helper.AnalysisService_getAlertsAsHTML(patient,prescr)); analyse.Show(); /* ServiceAnalysis.prescriptionCostAnalysis prices = AnalysisService_getPrescriptionCostAnalysis(prescr); for(int i=0;i< prices.prescriptionLineCostList.Count;i++){ if(prices.prescriptionLineCostList[i].priceRange != null){ dataGridView1[GRID_COST,i].Value = prices.prescriptionLineCostList[i].priceRange.minPrice; } else{ dataGridView1[GRID_COST,i].Value = "NC"; } }*/ //MessageBox.Show("Prix estimatif : " + prices.MinPrice); }