diff --git a/src/app/modules/rup/components/elementos/rupers/select-base.component.ts b/src/app/modules/rup/components/elementos/rupers/select-base.component.ts index 448d23cf9f..e39f1ddbe9 100644 --- a/src/app/modules/rup/components/elementos/rupers/select-base.component.ts +++ b/src/app/modules/rup/components/elementos/rupers/select-base.component.ts @@ -3,6 +3,7 @@ import { RUPComponent } from '../../core/rup.component'; import { Unsubscribe } from '@andes/shared'; import { Observable, of } from 'rxjs'; import { RupElement } from '..'; +import { ISnomedConcept } from '../../../interfaces/snomed-concept.interface'; /** * Params: @@ -103,6 +104,10 @@ export class SelectBaseComponent extends RUPComponent implements OnInit, AfterVi if (!this.otherEnabled) { if (this.itemSelected) { this.registro.valor = this.itemSelected; + if (this.params.addRegister) { + // se agrega un registro por concepto seleccionado + this.addConcepto(this.itemSelected); + } } else { this.registro.valor = null; } @@ -117,6 +122,10 @@ export class SelectBaseComponent extends RUPComponent implements OnInit, AfterVi } + addConcepto(concepto: ISnomedConcept) { + this.ejecucionService.agregarConcepto(concepto); + } + @Unsubscribe() loadDatos(event) { if (!event) {