Search in sources :

Example 6 with Relation

use of se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation in project kie-wb-common by kiegroup.

the class AddRelationRowCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.row = new List();
    this.uiModelRow = new DMNGridRow();
    this.uiModel = new BaseGridData();
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
    makeCommand(0);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 7 with Relation

use of se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation in project kie-wb-common by kiegroup.

the class DeleteRelationRowCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.relation.getRow().add(new List());
    this.uiModel = new BaseGridData();
    this.uiModel.appendRow(new DMNGridRow());
    this.uiModel.appendColumn(uiRowNumberColumn);
    this.uiModelMapper = new RelationUIModelMapper(() -> uiModel, () -> Optional.of(relation), listSelector);
    makeCommand(0);
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn).getIndex();
}
Also used : RelationUIModelMapper(org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper) Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridRow(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow) List(org.kie.workbench.common.dmn.api.definition.v1_1.List) BaseGridData(org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData) Before(org.junit.Before)

Example 8 with Relation

use of se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation in project kie-wb-common by kiegroup.

the class MoveColumnsCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.uiModel = new DMNGridData();
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn1).getIndex();
    doReturn(2).when(uiModelColumn2).getIndex();
    addRelationColumn(II1);
    addRelationColumn(II2);
    addRelationRow(II1);
    addRelationRow(II2);
    addUiModelColumn(uiRowNumberColumn);
    addUiModelColumn(uiModelColumn1);
    addUiModelColumn(uiModelColumn2);
    addUiModelRow(0);
    addUiModelRow(1);
}
Also used : Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) Before(org.junit.Before)

Example 9 with Relation

use of se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation in project kie-wb-common by kiegroup.

the class MoveRowsCommandTest method setup.

@Before
public void setup() {
    this.relation = new Relation();
    this.uiModel = new DMNGridData();
    doReturn(ruleManager).when(handler).getRuleManager();
    doReturn(0).when(uiRowNumberColumn).getIndex();
    doReturn(1).when(uiModelColumn1).getIndex();
    addRelationColumn(II1);
    addRelationColumn(II2);
    addRelationRow(II1);
    addRelationRow(II2);
    addUiModelColumn(uiRowNumberColumn);
    addUiModelColumn(uiModelColumn1);
    addUiModelRow(0);
    addUiModelRow(1);
}
Also used : Relation(org.kie.workbench.common.dmn.api.definition.v1_1.Relation) DMNGridData(org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData) Before(org.junit.Before)

Example 10 with Relation

use of se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation in project webcert by sklintyg.

the class IntygRelationHelperImplTest method buildRelation.

private Relation buildRelation(String fromIntygId, String toIntygId) {
    Relation r = new Relation();
    IntygId from = new IntygId();
    from.setExtension(fromIntygId);
    IntygId to = new IntygId();
    to.setExtension(toIntygId);
    r.setFranIntygsId(from);
    r.setTillIntygsId(to);
    TypAvRelation typ = new TypAvRelation();
    typ.setCode(RelationKod.ERSATT.value());
    r.setTyp(typ);
    r.setSkapad(LocalDateTime.now());
    return r;
}
Also used : WebcertCertificateRelation(se.inera.intyg.webcert.common.model.WebcertCertificateRelation) TypAvRelation(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvRelation) Relation(se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation) TypAvRelation(se.riv.clinicalprocess.healthcond.certificate.types.v3.TypAvRelation) IntygId(se.riv.clinicalprocess.healthcond.certificate.types.v3.IntygId)

Aggregations

Relation (org.kie.workbench.common.dmn.api.definition.v1_1.Relation)12 Before (org.junit.Before)7 InformationItem (org.kie.workbench.common.dmn.api.definition.v1_1.InformationItem)6 List (org.kie.workbench.common.dmn.api.definition.v1_1.List)4 RelationUIModelMapper (org.kie.workbench.common.dmn.client.editors.expressions.types.relation.RelationUIModelMapper)4 BaseGridData (org.uberfire.ext.wires.core.grids.client.model.impl.BaseGridData)4 WebcertCertificateRelation (se.inera.intyg.webcert.common.model.WebcertCertificateRelation)4 DMNGridData (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridData)3 DMNGridRow (org.kie.workbench.common.dmn.client.widgets.grid.model.DMNGridRow)3 IntygRelations (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.IntygRelations)3 Relation (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.Relation)3 Relations (se.inera.intyg.webcert.web.web.controller.api.dto.Relations)3 ArrayList (java.util.ArrayList)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 InformationItem (org.kie.dmn.model.v1_1.InformationItem)2 Relation (org.kie.dmn.model.v1_1.Relation)2 LiteralExpression (org.kie.workbench.common.dmn.api.definition.v1_1.LiteralExpression)2 ListRelationsForCertificateResponseType (se.inera.intyg.clinicalprocess.healthcond.certificate.listrelationsforcertificate.v1.ListRelationsForCertificateResponseType)2 ListIntygEntry (se.inera.intyg.webcert.web.web.controller.api.dto.ListIntygEntry)2