-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add KontaktMedPasientDTO to SykemeldingDTO Introduce the KontaktMedPasientDTO class to capture patient contact details such as contact date and reasons for no contact. This addition allows for enhanced tracking of patient interaction in the sykemelding domain. * Add KontaktMedPasient mapping to sykemelding #deploy-test-sykemelding-api This update introduces a new class for handling KontaktMedPasient data, enriching the sykemelding model with contact information details. The changes ensure that KontaktMedPasient details are correctly included in the mapping strategy and are validated through updated test cases. * Add test for handling null KontaktDato #deploy-test-sykemelding-api This commit introduces a new test case to verify the correct handling of null values for KontaktDato in the Sykemelding mapping logic. Additionally, it refactors the KontaktMedPasient constructor by removing the redundant start date parameter, streamlining object creation. These changes enhance the reliability and clarity of the codebase with regard to contact date management in health certificates. * Handle null DTO in KontaktMedPasient constructor #deploy-test-sykemelding-api Ensure that the KontaktMedPasient constructor checks for a null DTO before creating a new XMLHelseOpplysningerArbeidsuforhet.KontaktMedPasient instance. This change prevents potential null pointer exceptions and improves the robustness of the code.
- Loading branch information
Showing
4 changed files
with
59 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
...ing-api/src/main/java/no/nav/registre/testnorge/sykemelding/domain/KontaktMedPasient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package no.nav.registre.testnorge.sykemelding.domain; | ||
|
||
import no.nav.registre.testnorge.sykemelding.external.xmlstds.helseopplysningerarbeidsuforhet._2013_10_01.XMLHelseOpplysningerArbeidsuforhet; | ||
import no.nav.testnav.libs.dto.sykemelding.v1.KontaktMedPasientDTO; | ||
|
||
import static java.util.Objects.nonNull; | ||
|
||
class KontaktMedPasient { | ||
|
||
private final XMLHelseOpplysningerArbeidsuforhet.KontaktMedPasient xmlKontaktMedPasient; | ||
|
||
KontaktMedPasient(KontaktMedPasientDTO dto) { | ||
|
||
xmlKontaktMedPasient = nonNull(dto) ? new XMLHelseOpplysningerArbeidsuforhet.KontaktMedPasient() | ||
.withKontaktDato(dto.getKontaktDato()) | ||
.withBegrunnIkkeKontakt(dto.getBegrunnelseIkkeKontakt()) : null; | ||
} | ||
|
||
XMLHelseOpplysningerArbeidsuforhet.KontaktMedPasient getXmlObject() { | ||
return xmlKontaktMedPasient; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters