Search in sources :

Example 1 with KompletteringType

use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.KompletteringType in project webcert by sklintyg.

the class FKAnswerConverter method convert.

public static AnswerToFkType convert(FragaSvar fs) {
    AnswerToFkType fkAnswer = new AnswerToFkType();
    fkAnswer.setAmne(ConvertToFKTypes.toAmneTyp(fs.getAmne()));
    fkAnswer.setAdressVard(ConvertToFKTypes.toVardAdresseringsType(fs.getVardperson()));
    fkAnswer.setAvsantTidpunkt(fs.getFrageSkickadDatum());
    if (fs.getMeddelandeRubrik() != null) {
        fkAnswer.setFkMeddelanderubrik(fs.getMeddelandeRubrik());
    }
    fkAnswer.setFkReferensId(fs.getExternReferens());
    fkAnswer.setVardReferensId(fs.getInternReferens().toString());
    if (fs.getSistaDatumForSvar() != null) {
        fkAnswer.setFkSistaDatumForSvar(fs.getSistaDatumForSvar());
    }
    fkAnswer.setFraga(ConvertToFKTypes.toInnehallType(fs.getFrageText(), fs.getFrageSigneringsDatum()));
    fkAnswer.setSvar(ConvertToFKTypes.toInnehallType(fs.getSvarsText(), fs.getSvarSigneringsDatum()));
    fkAnswer.setLakarutlatande(ConvertToFKTypes.toLakarUtlatande(fs.getIntygsReferens()));
    if (fs.getKompletteringar() != null) {
        for (Komplettering komplettering : fs.getKompletteringar()) {
            KompletteringType kt = new KompletteringType();
            kt.setFalt(komplettering.getFalt());
            kt.setText(komplettering.getText());
            fkAnswer.getFkKomplettering().add(kt);
        }
    }
    return fkAnswer;
}
Also used : KompletteringType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.KompletteringType) AnswerToFkType(se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificateanswerresponder.v1.AnswerToFkType) Komplettering(se.inera.intyg.webcert.persistence.fragasvar.model.Komplettering)

Example 2 with KompletteringType

use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.KompletteringType in project webcert by sklintyg.

the class FragaSvarConverter method convertKompletteringar.

private Set<Komplettering> convertKompletteringar(List<KompletteringType> source) {
    List<Komplettering> kompletteringar = new ArrayList<>();
    for (KompletteringType kompletteringType : source) {
        Komplettering komplettering = new Komplettering();
        komplettering.setFalt(kompletteringType.getFalt());
        komplettering.setText(kompletteringType.getText());
        kompletteringar.add(komplettering);
    }
    return ImmutableSet.copyOf(kompletteringar);
}
Also used : KompletteringType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.KompletteringType) ArrayList(java.util.ArrayList)

Aggregations

KompletteringType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.KompletteringType)2 ArrayList (java.util.ArrayList)1 AnswerToFkType (se.inera.ifv.insuranceprocess.healthreporting.sendmedicalcertificateanswerresponder.v1.AnswerToFkType)1 Komplettering (se.inera.intyg.webcert.persistence.fragasvar.model.Komplettering)1