Beispiel #1
0
        private void asociarEstructuras()
        {
            bool existeArchivoPar      = File.Exists(nombreArchivoParEstructura(paciente, planSeleccionado()));
            List <parEstructura> lista = new List <parEstructura>();

            if (existeArchivoPar)
            {
                lista = leerArchivoParEstructura(nombreArchivoParEstructura(paciente, planSeleccionado()));
            }
            for (int i = 0; i < DGV_Estructuras.Rows.Count; i++)
            {
                Structure estructura = Estructura.asociarConLista(plantilla.estructuras()[i].nombresPosibles, Estructura.listaEstructuras(planSeleccionado()));
                if (estructura != null)
                {
                    (DGV_Estructuras.Rows[i].Cells[1]).Value = estructura.Id;
                }
                else
                {
                    if (existeArchivoPar)
                    {
                        DGV_Estructuras.Rows[i].Cells[1].Value = structureDeEstructura(DGV_Estructuras.Rows[i].Cells[0].Value.ToString(), lista);
                    }
                    else
                    {
                        (DGV_Estructuras.Rows[i].Cells[1]).Value = "";
                    }
                }
            }
        }
Beispiel #2
0
 private void asociarEstructuras()
 {
     for (int i = 0; i < DGV_Estructuras.Rows.Count; i++)
     {
         Structure estructura = Estructura.asociarConLista(plantilla.estructuras()[i].nombresPosibles, Estructura.listaEstructuras(planSeleccionado()));
         if (estructura != null)
         {
             (DGV_Estructuras.Rows[i].Cells[1]).Value = estructura.Id;
         }
         else
         {
             (DGV_Estructuras.Rows[i].Cells[1]).Value = "";
         }
     }
 }
Beispiel #3
0
 public static void aplicarPlantilla(Caso caso)
 {
     foreach (IRestriccion restriccion in caso.plantilla.listaRestricciones)
     {
         Structure estructuraEc = Estructura.asociarConLista(restriccion.estructura.nombresPosibles, Estructura.listaEstructuras(caso.plan));
         if (restriccion.dosisEstaEnPorcentaje())
         {
             restriccion.prescripcionEstructura = caso.plan.TotalPrescribedDose.Dose;
         }
         if (estructuraEc != null)
         {
             restriccion.analizarPlanEstructura(caso.plan, estructuraEc);
         }
     }
 }