Skip to content

Commit

Permalink
Dev master conflict fix (#562)
Browse files Browse the repository at this point in the history
* HLM-3069: updated build.config.yml

* HLM-3069: updated build-config.yml renamed adrm to referralmanagement

* HLM-3372: increased stock version from 1.1.0 to 1.1.1-beta and project version from 1.1.0 to 1.1.1-beta

* referralmanagement version 1.0.0-beta, added changelog, localsetup

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* Update CHANGELOG.md

* HLM-3069: null project beneficiary validation error fix

* HLM-3069: added comments and splitted validation condition

* Dev to master (#550)

* HLM-3376: review comments commit

* HLM-3069: side effect code comments, code refactor

* HLM-3376: code review comments and code refactoring

* updated the common-models version to 1.0.10, and updated in dependent service

* HLM-3376 : Added additional field in side effect, referral.

* HLM-3376: missing column fix

* HLM-3372: constants type changed

* HLM-3376: removed not used validators

* code refactor and code comments

* hlm-3376: added test cases

* hlm-3376: referralmanagement context in test cases

* hlm-3376: changed parameters for find by id

* HLM-3372: typo fix

* hlm-3376: persister changes, removed invalid parameters

* hlm-3372: added changes as per code review, removed unused properties

* hlm-3376: recipient validator for faciliy not working fix

* HLM-3376: throwing exception on invalid recipient type

* HLM-4062: added count api changes for household

* HLM-4062: Updated findbyid references

* HLM-4062: Updated pom.xml of household

* Hlm 3376 reviewcomments (#524)

* HLM-3376: review comments commit

* HLM-3069: side effect code comments, code refactor

* HLM-3376: code review comments and code refactoring

* updated the common-models version to 1.0.10, and updated in dependent service

* HLM-3376 : Added additional field in side effect, referral.

* HLM-3376: missing column fix

* HLM-3372: constants type changed

* HLM-3376: removed not used validators

* code refactor and code comments

* hlm-3376: added test cases

* hlm-3376: referralmanagement context in test cases

* hlm-3376: changed parameters for find by id

* HLM-3372: typo fix

* hlm-3376: persister changes, removed invalid parameters

* hlm-3372: added changes as per code review, removed unused properties

* hlm-3376: recipient validator for faciliy not working fix

* HLM-3376: throwing exception on invalid recipient type

* HLM-3376: added comments as per review comments

* HLM-3376 : added changes as per code review comments, each column's name included in query

* HLM-3376: query column names

* Hlm 4062 count api (#547)

* hlm-4062: updated household

* HLM-4062: added  count api support using cte for household

* HLM-4062: updated HouseholdRepository.java

* updated householdrowmapper.java

* HLM-4062:code refactor, removed useCTE parameter

---------

Co-authored-by: kavi_elrey@1993 <[email protected]>

---------

Co-authored-by: kanishq-egov <[email protected]>
Co-authored-by: kanishq-egov <[email protected]>
  • Loading branch information
3 people authored Nov 9, 2023
1 parent 3832dfd commit aefcf01
Show file tree
Hide file tree
Showing 11 changed files with 63 additions and 12 deletions.
1 change: 0 additions & 1 deletion health-services/libraries/health-services-models/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<groupId>org.egov.common</groupId>
<artifactId>health-services-models</artifactId>
<version>1.0.11-SNAPSHOT</version>

<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
Expand Down
9 changes: 7 additions & 2 deletions health-services/project/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
All notable changes to this module will be documented in this file.

## 1.1.1-beta 19-10-2023
- Added support for multi round, Added new validator for project task.

## 1.1.0
- models library version update

## 1.0.0
- Base version

- Base version

## 1.1.0
2 changes: 1 addition & 1 deletion health-services/project/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>project</artifactId>
<packaging>jar</packaging>
<name>project</name>
<version>1.1.0</version>
<version>1.1.1-beta</version>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand Down
6 changes: 6 additions & 0 deletions health-services/referralmanagement/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Changelog
All notable changes to this module will be documented in this file.

## 1.0.0-beta
- Base version
- Added functionility for Side-Effects and Refferal management
31 changes: 31 additions & 0 deletions health-services/referralmanagement/LOCALSETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Local Setup

To setup the Project service in your local system, clone the [Health campaign services](https://github.com/egovernments/health-campaign-services).

## Dependencies

### Infra Dependency

- [X] Postgres DB
- [X] Redis
- [X] Elasticsearch
- [X] Kafka
- [X] Consumer
- [X] Producer


## Running Locally

You can use docker-compose file to get started with these dependencies. Download docker-compose.yml from [here](../libraries/docker-compose.yml)

Use the following command to start containers

```
cd path/to/docker-compose.yml file
docker-compose up -d
```

To run it locally this service require port forwarding for idgen service, facility service and project service.

Directly run the application.
2 changes: 0 additions & 2 deletions health-services/referralmanagement/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.egov</groupId>
<artifactId>referralmanagement</artifactId>
<packaging>jar</packaging>
Expand Down Expand Up @@ -77,7 +76,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>

<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ protected ReferralRepository(Producer producer, NamedParameterJdbcTemplate named

public List<Referral> find(ReferralSearch searchObject, Integer limit, Integer offset, String tenantId,
Long lastChangedSince, Boolean includeDeleted) {

String query = "SELECT r.id, r.clientreferenceid, r.tenantid, r.projectbeneficiaryid, r.projectbeneficiaryclientreferenceid, r.referrerid, r.recipientid, r.recipienttype, r.reasons, r.sideeffectid, r.sideeffectclientreferenceid, r.createdby, r.createdtime, r.lastmodifiedby, r.lastmodifiedtime, r.clientcreatedby, r.clientcreatedtime, r.clientlastmodifiedby, r.clientlastmodifiedtime, r.rowversion, r.isdeleted, r.additionaldetails, se.id sId, se.clientreferenceid sClientReferenceId, se.tenantid sTenantId, se.taskid sTaskId, se.taskclientreferenceid sTaskClientReferenceId, se.projectbeneficiaryId sProjectBeneficiaryId, se.projectBeneficiaryClientReferenceId sProjectBeneficiaryClientReferenceId, se.symptoms sSymptoms, se.additionalDetails sAdditionalDetails, se.createdby sCreatedBy, se.createdtime sCreatedTime, se.lastmodifiedby sLastModifiedBy, se.lastmodifiedtime sLastModifiedTime, se.clientCreatedBy sClientCreatedBy, se.clientcreatedtime sClientCreatedTime, se.clientlastmodifiedby sClientLastModifiedBy, se.clientlastmodifiedtime sClientLastModifiedTime, se.rowversion sRowVersion, se.isdeleted sIsDeleted FROM referral r left join side_effect se on r.sideEffectClientReferenceid = se.clientreferenceid";
Map<String, Object> paramsMap = new HashMap<>();
List<String> whereFields = GenericQueryBuilder.getFieldsWithCondition(searchObject,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.egov.referralmanagement.service;


import static org.egov.common.utils.CommonUtils.getIdFieldName;
import static org.egov.common.utils.CommonUtils.getIdMethod;
import static org.egov.common.utils.CommonUtils.handleErrors;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,15 @@ public Map<SideEffect, List<Error>> validate(SideEffectBulkRequest request) {
existingProjectBeneficiaryIds.add(projectBeneficiary.getId());
existingProjectBeneficiaryClientReferenceIds.add(projectBeneficiary.getClientReferenceId());
});
/**
* for all the entities that do not have any error in previous validations
* checking whether the project beneficiary client reference id is not null and exist in the db
*/
List<SideEffect> invalidEntities = entities.stream().filter(notHavingErrors()).filter(entity ->
!existingProjectBeneficiaryClientReferenceIds.contains(entity.getProjectBeneficiaryClientReferenceId())
&& !existingProjectBeneficiaryIds.contains(entity.getProjectBeneficiaryId())
( Objects.nonNull(entity.getProjectBeneficiaryClientReferenceId())
&& !existingProjectBeneficiaryClientReferenceIds.contains(entity.getProjectBeneficiaryClientReferenceId()) )
|| ( Objects.nonNull(entity.getProjectBeneficiaryId())
&& !existingProjectBeneficiaryIds.contains(entity.getProjectBeneficiaryId()) )
).collect(Collectors.toList());
invalidEntities.forEach(sideEffect -> {
Error error = getErrorForNonExistentEntity();
Expand Down
10 changes: 7 additions & 3 deletions health-services/stock/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
All notable changes to this module will be documented in this file.

## 1.0.0
## 1.1.1-beta
- Enhanced Inventory flow for last mile delivery

## 1.1.0
- Models library version update

- Base version
## 1.0.0
- Base version

## 1.1.0
2 changes: 1 addition & 1 deletion health-services/stock/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>stock</artifactId>
<packaging>jar</packaging>
<name>stock</name>
<version>1.1.0</version>
<version>1.1.1-beta</version>
<properties>
<java.version>1.8</java.version>
<maven.compiler.source>${java.version}</maven.compiler.source>
Expand Down

0 comments on commit aefcf01

Please sign in to comment.