Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valideringsendepunkt tilpasset format #3682

Merged
merged 54 commits into from
Dec 10, 2024

Conversation

krharum
Copy link
Contributor

@krharum krharum commented Nov 29, 2024

…emelding-api

Introduced a new consumer, SyfosmreglerConsumer, to enable validation of sykemeldings using the sykemelding proxy service. This addition includes necessary DTOs and configurations, allowing the system to validate submitted sykemeldings and return validation results. Additionally, the SykemeldingService and SykemeldingController have been updated to incorporate the validation functionality.

krharum and others added 30 commits November 29, 2024 08:35
…emelding-api

Introduced a new consumer, `SyfosmreglerConsumer`, to enable validation of sykemeldings using the sykemelding proxy service. This addition includes necessary DTOs and configurations, allowing the system to validate submitted sykemeldings and return validation results. Additionally, the `SykemeldingService` and `SykemeldingController` have been updated to incorporate the validation functionality.
The endpoint change in SykemeldingController aligns with its purpose of validating a sykemelding. This update enhances clarity and better represents the action being performed by this method.
…melding-api

Added Orika MapperFacade to support sykemelding validation process by mapping Sykemelding to ReceivedSykemeldingDTO. Created new mapping strategy interface and configuration class to define mapping strategy and register mappers and converters. Removed unnecessary Swagger dependency from build.gradle.
#deploy-test-sykemelding-api

Introduced MapperTestUtils and SykemeldingValidateMappingStrategyTest to establish a testing framework for Orika-based mapping strategies in sykemelding validation. Updated SykemeldingConsumer to improve logging by utilizing Json.pretty for detailed request logging.
…emelding-api

Include the JAVA_OPTS environment variable to grant unnamed module access to java.lang in the Dockerfile. This change ensures compatibility with reflective operations or frameworks needing internal JDK classes, enhancing runtime flexibility.
#deploy-proxy-sykemelding

Included `testnav-sykemelding-api-dev` and `testnav-sykemelding-api` in the sykemelding-proxy configuration to ensure proper routing and access. This update supports the deployment of new sykemelding API environments.
#deploy-test-sykemelding-api

Added error handling in SyfosmreglerPostValidateCommand to capture and log errors, assigning relevant HTTP status and message to ValidationResultDTO. This improves reliability and debuggability by providing more information about the error state during the sykemelding validation process. Additionally, updated ValidationResultDTO and included a new import in test cases for consistency.
#deploy-test-sykemelding-api

Enhanced the SyfosmreglerPostValidateCommand with logging capability using SLF4J, allowing more detailed insights into the data being sent for validation. This update includes utilizing the pretty print feature of Json to format the logged sykemelding data, ensuring clarity for debugging purposes.
…lding-api

Implemented a comprehensive mapping strategy in SykemeldingValidateMappingStrategy to transform Sykemelding to ReceivedSykemeldingDTO. Introduced application-local.yml for local development configuration with default dummy values for IBM MQ connection and sykemelding-proxy consumer. Revised associated data structures and test cases to support new mapping functionalities.
…lding-api

Introduce new classes and methods to handle UtdypendeOpplysninger in Sykemelding. The changes include the addition of a new domain and DTO for UtdypendeOpplysninger, updates to mapper logic, and adjustment in tests to ensure proper validation.
…ploy-test-sykemelding-api

Correct the restriction value calculation to align with the ordinal index of enum members by removing the unnecessary increment. This ensures the restriction values are accurately mapped and prevents potential data inconsistencies.
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
stigus and others added 23 commits December 5, 2024 09:43
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
# Conflicts:
#	apps/sykemelding-api/src/main/resources/application-dev.yml
#	apps/sykemelding-api/src/main/resources/application-local.yml
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
#deploy-test-sykemelding-api
…ykemelding-api

Introduced the andreTiltak field in DetaljerDTO to capture additional work measures. Updated SykemeldingValidateMappingStrategy and accompanying tests to handle mapping of biDiagnoser and andreTiltak, ensuring complete DTO representations. Modified domain classes to align with new DTO structure.
#deploy-test-sykemelding-api

Replaced @value, @Getter, and @Setter with @DaTa for simplicity and consistency across all DTO classes. Removed the forced argument requirement from @NoArgsConstructor where it was previously applied. Additionally, adjusted null handling in the "Arbeidsgiver" domain class to manage DTO presence better.
#deploy-test-sykemelding-api

Introduced the method `mapHarArbeidsgiver` to handle mapping of arbeidsgiver types based on XML input, supporting cases for "EN_ARBEIDSGIVER", "FLERE_ARBEIDSGIVERE", and "INGEN_ARBEIDSGIVER". Removed the direct call to `SykemeldingRequestValidator.validate` in `SykemeldingController`, and added a test in `SykemeldingValidateMappingStrategyTest` for validation when no arbeidsgiver data is presented.
…lding-api

The SykemeldingRequestValidator class has been deleted to streamline validation processes. Validation logic has now been moved directly into relevant classes, such as within the Aktivitet constructor, enhancing maintainability and reducing duplication. Tests have been updated to ensure validation errors are correctly handled, confirming that a missing "perioder" now throws a proper exception.
@krharum krharum marked this pull request as ready for review December 10, 2024 08:08
@krharum krharum requested a review from a team as a code owner December 10, 2024 08:08
Copy link
Contributor

@stigus stigus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ser supert ut 🤩

@krharum krharum merged commit fd3cc5b into master Dec 10, 2024
28 checks passed
@krharum krharum deleted the feature/validering-endepunkt-tilpasset-format branch December 10, 2024 09:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants