use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType in project webcert by sklintyg.
the class ConvertToFKTypesTest method testToLakarUtlatandeIntygsReferensNull.
@Test
public void testToLakarUtlatandeIntygsReferensNull() {
LakarutlatandeEnkelType res = ConvertToFKTypes.toLakarUtlatande(null);
assertNull(res);
}
use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType in project webcert by sklintyg.
the class IntygConverterUtil method buildSendTypeFromUtlatande.
public static SendType buildSendTypeFromUtlatande(Utlatande utlatande) {
LakarutlatandeEnkelType utlatandeType = ModelConverter.toLakarutlatandeEnkelType(utlatande);
VardAdresseringsType vardAdressType = ModelConverter.toVardAdresseringsType(utlatande.getGrundData());
SendType sendType = new SendType();
sendType.setLakarutlatande(utlatandeType);
sendType.setAdressVard(vardAdressType);
sendType.setVardReferensId(buildVardReferensId(utlatande.getId()));
sendType.setAvsantTidpunkt(LocalDateTime.now());
return sendType;
}
use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType 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;
}
use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType 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;
}
use of se.inera.ifv.insuranceprocess.healthreporting.medcertqa.v1.LakarutlatandeEnkelType in project webcert by sklintyg.
the class ConvertToFKTypes method toLakarUtlatande.
public static LakarutlatandeEnkelType toLakarUtlatande(IntygsReferens ir) {
if (ir == null) {
return null;
}
LakarutlatandeEnkelType lu = new LakarutlatandeEnkelType();
lu.setLakarutlatandeId(ir.getIntygsId());
PatientType pt = new PatientType();
String root = PERSON_ID_OID;
if (SamordningsnummerValidator.isSamordningsNummer(Optional.ofNullable(ir.getPatientId()))) {
root = SAMORDNING_ID_OID;
}
pt.setPersonId(toII(root, ir.getPatientId().getPersonnummerWithDash()));
lu.setPatient(pt);
lu.setSigneringsTidpunkt(ir.getSigneringsDatum());
return lu;
}
Aggregations