-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HCMPRE-1635 Microplanning v0.1 master merge (#1271)
- Loading branch information
1 parent
c9f5d73
commit fd9a00f
Showing
282 changed files
with
15,144 additions
and
1,363 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Changelog | ||
All notable changes to this module will be documented in this file. | ||
|
||
## 1.0.0 - 2024-11-28 | ||
#### Census Service | ||
The Census Service introduces core functionalities for managing census data: | ||
|
||
1. Validation of Census: Ensures data integrity by validating all census requests before processing. | ||
2. Census Create: Creates new census records after validation and enrichment, publishing request to the designated Kafka topic to handle the creation process asynchronously. | ||
3. Census Update: Updates existing records post-validation and enrichment by sending request to the designated Kafka update topic. | ||
4. Census Bulk Update: Updates multiple census records in one operation after successful validation. | ||
5. Census Search: Enables searching for census records with the provided search criteria. | ||
6. Plan Facility Consumer: Listens to Plan Facility Update topic to assign facility to a boundary in census. |
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,18 @@ | ||
# Swagger generated server | ||
|
||
Spring Boot Server | ||
|
||
|
||
## Overview | ||
This server was generated by the [swagger-codegen](https://github.com/swagger-api/swagger-codegen) project. | ||
By using the [OpenAPI-Spec](https://github.com/swagger-api/swagger-core), you can easily generate a server stub. | ||
This is an example of building a swagger-enabled server in Java using the SpringBoot framework. | ||
|
||
The underlying library integrating swagger to SpringBoot is [springfox](https://github.com/springfox/springfox) | ||
|
||
Start your server as an simple java application | ||
|
||
You can view the api documentation in swagger-ui by pointing to | ||
http://localhost:8080/ | ||
|
||
Change default port value in application.properties |
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,141 @@ | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.egov</groupId> | ||
<artifactId>census-service</artifactId> | ||
<packaging>jar</packaging> | ||
<name>census-service</name> | ||
<version>1.0.0</version> | ||
<properties> | ||
<java.version>17</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.2.2</version> | ||
</parent> | ||
<build> | ||
<sourceDirectory>src/main/java</sourceDirectory> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<goals> | ||
<goal>repackage</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.egov.common</groupId> | ||
<artifactId>health-services-models</artifactId> | ||
<version>1.0.21-SNAPSHOT</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-jdbc</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.flywaydb</groupId> | ||
<artifactId>flyway-core</artifactId> | ||
<version>9.22.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.postgresql</groupId> | ||
<artifactId>postgresql</artifactId> | ||
<version>42.7.1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>io.swagger</groupId> | ||
<artifactId>swagger-core</artifactId> | ||
<version>1.5.18</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger.core.v3</groupId> | ||
<artifactId>swagger-annotations</artifactId> | ||
<version>2.2.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>net.minidev</groupId> | ||
<artifactId>json-smart</artifactId> | ||
<version>2.5.0</version> | ||
</dependency> | ||
<!-- Egov dependencies --> | ||
<dependency> | ||
<groupId>org.egov.services</groupId> | ||
<artifactId>tracer</artifactId> | ||
<version>2.9.0-SNAPSHOT</version> | ||
</dependency> | ||
<!-- <dependency>--> | ||
<!-- <groupId>org.egov.services</groupId>--> | ||
<!-- <artifactId>digit-models</artifactId>--> | ||
<!-- <version>1.0.0-SNAPSHOT</version>--> | ||
<!-- </dependency>--> | ||
<dependency> | ||
<groupId>org.egov</groupId> | ||
<artifactId>mdms-client</artifactId> | ||
<version>2.9.0-SNAPSHOT</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<optional>true</optional> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.fasterxml.jackson.datatype</groupId> | ||
<artifactId>jackson-datatype-jsr310</artifactId> | ||
</dependency> | ||
<!-- Bean Validation API support --> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-validation</artifactId> | ||
</dependency> | ||
</dependencies> | ||
<repositories> | ||
<repository> | ||
<id>repo.egovernments.org</id> | ||
<name>eGov ERP Releases Repository</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/repositories/releases/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.egovernments.org.snapshots</id> | ||
<name>eGov ERP Releases Repository</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.egovernments.org.public</id> | ||
<name>eGov Public Repository Group</name> | ||
<url>https://nexus-repo.egovernments.org/nexus/content/groups/public/</url> | ||
</repository> | ||
<repository> | ||
<id>repo.digit.org</id> | ||
<name>eGov DIGIT Releases Repository</name> | ||
<url>https://nexus-repo.digit.org/nexus/content/repositories/snapshots/</url> | ||
</repository> | ||
</repositories> | ||
</project> |
20 changes: 20 additions & 0 deletions
20
health-services/census-service/src/main/java/digit/Main.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,20 @@ | ||
package digit; | ||
|
||
|
||
import org.egov.tracer.config.TracerConfiguration; | ||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Import; | ||
|
||
@Import({ TracerConfiguration.class }) | ||
@SpringBootApplication | ||
@ComponentScan(basePackages = { "digit", "digit.web.controllers" , "digit.config"}) | ||
public class Main { | ||
|
||
|
||
public static void main(String[] args) throws Exception { | ||
SpringApplication.run(Main.class, args); | ||
} | ||
|
||
} |
86 changes: 86 additions & 0 deletions
86
health-services/census-service/src/main/java/digit/config/Configuration.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,86 @@ | ||
package digit.config; | ||
|
||
import lombok.*; | ||
import org.egov.tracer.config.TracerConfiguration; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.stereotype.Component; | ||
|
||
import java.util.List; | ||
|
||
@Component | ||
@Data | ||
@Import({TracerConfiguration.class}) | ||
@NoArgsConstructor | ||
@AllArgsConstructor | ||
@Setter | ||
@Getter | ||
public class Configuration { | ||
|
||
// Allowed roles for census | ||
@Value("#{${allowed.census.roles}}") | ||
private List<String> allowedCensusRoles; | ||
|
||
@Value("#{${workflow.restricted.roles}}") | ||
private List<String> workflowRestrictedRoles; | ||
|
||
// Persister Topic | ||
@Value("${census.create.topic}") | ||
private String censusCreateTopic; | ||
|
||
@Value("${census.update.topic}") | ||
private String censusUpdateTopic; | ||
|
||
@Value("${census.bulk.update.topic}") | ||
private String censusBulkUpdateTopic; | ||
|
||
@Value("${plan.facility.update.topic}") | ||
private String planFcailityUpdateTopic; | ||
|
||
// Boundary Service | ||
@Value("${egov.boundary.service.host}") | ||
private String boundaryServiceHost; | ||
|
||
@Value("${egov.boundary.relationship.search.endpoint}") | ||
private String boundaryRelationshipSearchEndpoint; | ||
|
||
@Value("${egov.boundary.hierarchy.search.endpoint}") | ||
private String boundaryHierarchySearchEndpoint; | ||
|
||
// Plan Service | ||
@Value("${egov.plan.service.host}") | ||
private String planServiceHost; | ||
|
||
@Value("${egov.plan.employee.assignment.search.endpoint}") | ||
private String planEmployeeAssignmentSearchEndpoint; | ||
|
||
//Workflow | ||
@Value("${egov.workflow.host}") | ||
private String wfHost; | ||
|
||
@Value("${egov.workflow.transition.path}") | ||
private String wfTransitionPath; | ||
|
||
@Value("${egov.business.service.search.endpoint}") | ||
private String businessServiceSearchEndpoint; | ||
|
||
@Value("${workflow.initiate.action}") | ||
private List<String> wfInitiateActions; | ||
|
||
@Value("${workflow.intermediate.action}") | ||
private List<String> wfIntermediateActions; | ||
|
||
@Value("${workflow.send.back.actions}") | ||
private List<String> wfSendBackActions; | ||
|
||
//SMSNotification | ||
@Value("${egov.sms.notification.topic}") | ||
private String smsNotificationTopic; | ||
|
||
//Pagination | ||
@Value("${census.default.offset}") | ||
private Integer defaultOffset; | ||
|
||
@Value("${census.default.limit}") | ||
private Integer defaultLimit; | ||
} |
41 changes: 41 additions & 0 deletions
41
health-services/census-service/src/main/java/digit/config/MainConfiguration.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,41 @@ | ||
package digit.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Import; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.http.MediaType; | ||
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; | ||
|
||
import java.util.TimeZone; | ||
|
||
import jakarta.annotation.PostConstruct; | ||
import com.fasterxml.jackson.databind.DeserializationFeature; | ||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import org.egov.tracer.config.TracerConfiguration; | ||
|
||
|
||
@Import({TracerConfiguration.class}) | ||
public class MainConfiguration { | ||
|
||
@Value("${app.timezone}") | ||
private String timeZone; | ||
|
||
@PostConstruct | ||
public void initialize() { | ||
TimeZone.setDefault(TimeZone.getTimeZone(timeZone)); | ||
} | ||
|
||
@Bean | ||
public ObjectMapper objectMapper() { | ||
return new ObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES).setTimeZone(TimeZone.getTimeZone(timeZone)); | ||
} | ||
|
||
@Bean | ||
@Autowired | ||
public MappingJackson2HttpMessageConverter jacksonConverter(ObjectMapper objectMapper) { | ||
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter(); | ||
converter.setObjectMapper(objectMapper); | ||
return converter; | ||
} | ||
} |
Oops, something went wrong.