Search in sources :

Example 1 with HosPersonalType

use of se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType in project webcert by sklintyg.

the class QuestionAnswerValidator method validate.

public static List<String> validate(ReceiveMedicalCertificateQuestionType request) {
    List<String> messages = new ArrayList<>();
    if (request.getQuestion().getFraga() == null) {
        messages.add("Missing fraga element.");
    }
    validateAmne(messages, request.getQuestion().getAmne());
    LakarutlatandeEnkelType lakarutlatande = request.getQuestion().getLakarutlatande();
    validateLakarutlatande(messages, lakarutlatande);
    HosPersonalType hosPersonal = request.getQuestion().getAdressVard().getHosPersonal();
    validateHosPersonal(messages, hosPersonal);
    validateEnhet(messages, hosPersonal);
    validateVardgivare(messages, hosPersonal);
    PatientType patient = lakarutlatande.getPatient();
    validatePatient(messages, patient);
    return messages;
}
Also used : PatientType(se.inera.ifv.insuranceprocess.healthreporting.v2.PatientType) ArrayList(java.util.ArrayList) HosPersonalType(se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType) LakarutlatandeEnkelType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType)

Example 2 with HosPersonalType

use of se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType in project webcert by sklintyg.

the class QuestionAnswerValidator method validate.

public static List<String> validate(ReceiveMedicalCertificateAnswerType request) {
    List<String> messages = new ArrayList<>();
    if (request.getAnswer().getSvar() == null) {
        messages.add("Missing svar element.");
    }
    validateAmne(messages, request.getAnswer().getAmne());
    LakarutlatandeEnkelType lakarutlatande = request.getAnswer().getLakarutlatande();
    validateLakarutlatande(messages, lakarutlatande);
    HosPersonalType hosPersonal = request.getAnswer().getAdressVard().getHosPersonal();
    validateHosPersonal(messages, hosPersonal);
    validateEnhet(messages, hosPersonal);
    validateVardgivare(messages, hosPersonal);
    PatientType patient = lakarutlatande.getPatient();
    validatePatient(messages, patient);
    return messages;
}
Also used : PatientType(se.inera.ifv.insuranceprocess.healthreporting.v2.PatientType) ArrayList(java.util.ArrayList) HosPersonalType(se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType) LakarutlatandeEnkelType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType)

Example 3 with HosPersonalType

use of se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType in project webcert by sklintyg.

the class ConvertToFKTypes method toVardAdresseringsType.

public static VardAdresseringsType toVardAdresseringsType(Vardperson vp) {
    if (vp == null) {
        return null;
    }
    VardAdresseringsType vat = new VardAdresseringsType();
    HosPersonalType hos = new HosPersonalType();
    hos.setForskrivarkod(vp.getForskrivarKod());
    hos.setFullstandigtNamn(vp.getNamn());
    hos.setPersonalId(toII(HSA_ID_OID, vp.getHsaId()));
    hos.setEnhet(toEnhetType(vp));
    vat.setHosPersonal(hos);
    return vat;
}
Also used : HosPersonalType(se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType) VardAdresseringsType(se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.VardAdresseringsType)

Aggregations

HosPersonalType (se.inera.ifv.insuranceprocess.healthreporting.v2.HosPersonalType)3 ArrayList (java.util.ArrayList)2 LakarutlatandeEnkelType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType)2 PatientType (se.inera.ifv.insuranceprocess.healthreporting.v2.PatientType)2 VardAdresseringsType (se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.VardAdresseringsType)1