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

Feature/funksjonalitet for doedsmedling og foedselsmelding #3433

Merged

Conversation

krharum
Copy link
Contributor

@krharum krharum commented Mar 6, 2024

No description provided.

krharum added 2 commits March 1, 2024 08:29
A new service, PersonHistorikkService, has been added to the PersonController. This service allows retrieval of a person's history. A new data transfer object, PersonhistorikkDTO, has also been introduced to facilitate this functionality. This enhancement allows users to fetch a more comprehensive set of data pertaining to an individual.
Introduced multiple utility functions for parsing and manipulating identifiers, dates, and addresses. Created services for generating Foedselsmelding and Doedsmelding messages as well as appending addresses. In addition, existing class structures were improved with added fields.
@krharum krharum requested a review from a team as a code owner March 6, 2024 07:46
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 added 26 commits March 6, 2024 13:15
Reorganized some classes, removed the TpsServiceRutine class, added the new TpsRequest interface and multiple classes implementing this. Also updated XmlMapper usage to adapt to the new structure. The changes aim to improve modularity and adaptability of the messaging service functions and related data structures.
…s-messaging-service

Removed bootstrap.yaml and re-structured application.yaml and application-prod.yaml to better manage configuration across environments. The code for handling TPS response status was improved by creating the ResponseStatus class, which deciphers the status and extracts error details if necessary. These changes aim to increase clarity and maintainability of YAML configurations and status handling.
This commit updates the kildesystem name to "testnav-oppsummeringsdokument-service" in Oppsummeringsdokument. Similarly, the application name in the aareg-synt-services-proxy configuration file has been modified to "testnav-oppsummeringsdokument-service". These changes reflect the new service naming convention being adopted.
This update improves the handling of null values and empty 'miljoer' lists across multiple services and controllers. Any null value passed into the server will now be handled correctly, avoiding NullPointerExceptions. In case of miljoer lists being empty, the system now defaults to fetching available environments from the TestmiljoerServiceConsumer to ensure functionality.
…-tps-messaging-service

The TpsServicerutineM201Response class has been simplified by removing the TpsPersonData inner class and moving its variables up a level. The XmlType, XmlRootElement, and JacksonXmlProperty annotations have been added for XML conversion. Meanwhile, the IdentService class now uses an XmlMapper instead of an ObjectMapper for parsing XML responses.
…orikk

#deploy-tps-messaging-service

MapperFacadeConfig has been updated to check and register multiple MappingStrategy and CustomConverter instances. PersonhistorikkService and PersonhistorikkDTO have been renamed to AdressehistorikkService and AdressehistorikkDTO respectively to reflect the changed functionality. Additionally, a new custom converter for LocalDates has been implemented and LocalDateTimeCustomMapping has been updated.
…saging-service

Capitalization in the "get" method name inside SkdMeldingTrans1 class has been changed. Previously, StringUtils.uncapitalize was used, now it's been replaced with StringUtils.capitalize in order to match the method name capitalization style.
…-messaging-service

Added method that appends SKD messaging headers to constructed SKD messages in Døds-, Foedsels- and Annulleringsmelding services. A utility class, SkdMeldingsheader, has been introduced to handle the generation of these headers. These changes ensure that the SKD messages have all necessary headers - providing additional context to the messages sent.
Added a logging function to track sent statuses in DoedsmeldingService. With the help of @slf4j annotation, all sent statuses for each environment are logged for better tracking and debugging. This allows a clearer understanding of the state of death notifications. Additionally, a refactor has been made in the SkdMeldingsheader class to simplify the construction of message header strings.
…tps-messaging-service

Removed the SkdMelding interface as it was no longer needed in the tpsmessagingservice app. Also replaced explicit object type declarations with 'var' keyword for SkdMeldingTrans1 instances and some string variables for more concise code. Lastly, cleaned up exception handling in TpsMeldingCommand class by removing redundant JmqiException.
#deploy-tps-messaging-service

Redesigned endpoints for personhistorikk and doedsmelding to receive request body instead of path variables. Also introduced a new utility class LandkodeEncoder to manage land code. Additionally, several import statements were adjusted to suit the current system configuration.
Updated the HTTP method from GET to POST for the /adressehistorikk endpoint in the PersonController, allowing it to accept a request body. This new approach is more aligned with REST principles for resources that create or modify data. The 'Mapping' import statement was also added to facilitate this change.
Removed the TranslittereringUtil file and added several new classes to handle mapping and service consumption functionality. New logic is distributed over twelve newly introduced files, which include the FoedselsmeldingRequestMapper and KjoennFraIdentUtility. Additionally, several configuration adjustments were made in application-dev.yml and Consumers.java.
…messaging-service

The gate address handling in the AdresseAppenderService's "if" branch has been moved to an "else" branch. This ensures that the gate address mappings only occur after the address type has been identified as neither null nor MATR (matrix address type). The change simplifies and streamlines the conditional address handling logic.
The definition of address types for gate and matrix addresses has been moved from AdresseMappingStrategy to their respective DTO classes. This refactor improves code maintainability by centralizing type definition in the relevant classes. It also modifies the order of address typing in AdresseAppenderService for improved logic flow.
Implemented updates in the Endringsmelding service to handle the sending and cancellation of dead notifications (`Doedsmelding`). This included updating logic in FoedselsmeldingRequestMapper to check for nulls, activating previously commented out methods in SkdEndringsmeldingerController, and changing return types from Flux to Mono in TpsMessagingConsumer and DoedsmeldingService. Also added a new DTO, DoedsmeldingResponseDTO, to handle responses.
krharum added 9 commits March 13, 2024 07:32
…messaging-service

A filter has been added to DoedsmeldingService to only proceed with address data if the response is ok. In the tpsPersoner map entry condition check in AdressehistorikkService, it now checks for a non-null TpsPersonData instead of a non-null TpsSvar. A helper method 'isOk' is added in AdressehistorikkDTO to check the response status. Additionally, logging is introduced in TpsMessagingConsumer to log received address history responses. An application, 'testnav-adresse-service', is also added in the config file.
The log statement detailing SKD messages has been moved from TpsConsumer to SendSkdMeldinger to provide a more accurate log location. Additionally, service consumer 'TestmiljoerServiceConsumer' has been adjusted to include an extra environment. Changes have also been made to return the 'List' instead of 'String[]' in TestmiljoerServiceCommand's callable method.
Added a new data transfer object (DTO), `IdentMiljoeDTO`, to facilitate the handling of identification environments. Updated `FoedselsmeldingRequestMapper` and `FoedselsmeldingService` to enhance their logic for sending birth notifications. Modified various DTOs for better string representation and object checking. Introduced a `GetEksistererPersonCommand` to check if a person exists in the system.
…s-messaging-service

Updated methods in the `TpsMessagingConsumer` class to include logs capturing the status of the cancellation and sending of the death report.  Additionally, transitions in the handling of death reports in `DoedsmeldingService` are amended to return-response based on existence of a person and enhanced error handling. Also added `IdentMiljoeDTO` to enrich `FoedselsmeldingService` for checking existence of a person.
#deploy-endringmelding-service

Implemented checks and corresponding error messages for missing identifications and death dates in DoedsmeldingService, and updated FoedselsmeldingService to accommodate these changes. Also improved handling of person existence checks and enriched FoedselsmeldingService with IdentMiljoeDTO for better person existence verification.
Implemented a new method, mapPostBoadresse(), in AdressehistorikkMapper.java to transform person data into a PostadresseDTO object. This post address is integrated within FoedselsmeldingRequestMapper and FoedselsmeldingService. The existing mapping procedure got modified to include the new post address. Additionally, made some enhancements to the AdresseDTO model to avoid probable data inconsistencies.
@krharum krharum merged commit 0ca4ef6 into master Mar 14, 2024
7 of 8 checks passed
@krharum krharum deleted the feature/funksjonalitet-for-doedsmedling-og-foedselsmelding branch March 14, 2024 08:29
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