Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
013f6c2
Biometric changes
Sep 27, 2023
e57c470
Merge branch 'PSMRI:develop' into develop
AncyRiju Sep 28, 2023
dac5309
biometric device changes
Sep 28, 2023
dbf7779
Merge branch 'develop' of https://github.com/AncyRiju/Common-API into…
Sep 28, 2023
d20443f
biometric pid changes
Oct 4, 2023
285a6dc
Merge branch 'PSMRI:develop' into develop
AncyRiju Oct 5, 2023
c6b15d8
removed unused imports
Oct 5, 2023
6e922d8
Merge branch 'PSMRI:develop' into develop
AncyRiju Oct 19, 2023
8082615
Merge branch 'PSMRI:develop' into develop
AncyRiju Nov 22, 2023
243ba05
http changes
Nov 24, 2023
bd96bf0
Merge branch 'PSMRI:develop' into develop
bshivani7 Nov 28, 2023
6c9ce2a
primary db changes
Nov 28, 2023
fecd9d4
outbound call changes
Jan 17, 2024
96930c5
Merge branch 'PSMRI:develop' into develop
bshivani7 Jan 17, 2024
9003efe
Merge branch 'develop' of https://github.com/bshivani7/Common-API int…
Jan 17, 2024
9c6bfb9
czentrix outbound point (#81)
bshivani7 Jan 24, 2024
4e62605
Merge branch 'PSMRI:develop' into develop
bshivani7 Jan 25, 2024
4c777fb
1097 sms template changes
Jan 29, 2024
8f970f1
Merge pull request #83 from bshivani7/develop
devikasuresh20 Jan 30, 2024
6e55fb5
Merge branch 'PSMRI:develop' into develop
AncyRiju Feb 2, 2024
988697d
Minor modification in 1097 referral sms template (#84)
devikasuresh20 Feb 5, 2024
c1adf4f
Merge branch 'PSMRI:develop' into develop
AncyRiju Feb 6, 2024
a76c4df
Removed myapp properties (#89)
devikasuresh20 Feb 17, 2024
d5e4f91
Change in Phone No Comparison while fetching call audit details (#94)
devikasuresh20 Mar 21, 2024
d959dbe
Mapper class modified (#101)
indraniBan Apr 15, 2024
888f239
SearchUserById api logic corrected (#102)
indraniBan Apr 15, 2024
39f683b
CTI-datasync scheduler changes (#103)
devikasuresh20 Apr 23, 2024
61737a9
Merge branch 'PSMRI:develop' into develop
AncyRiju May 15, 2024
7232eef
cough file changes
May 17, 2024
3934e57
discarding biometric changes
May 23, 2024
f1e690a
Merge pull request #104 from AncyRiju/develop
devikasuresh20 May 23, 2024
77a84d5
CTI data check scheduler changes - callTypeId null issue (#105)
devikasuresh20 Jun 3, 2024
d9dd235
Abha search change (#109)
ravishanigarapu Aug 6, 2024
f6a895e
104 Application- Time to consume is not showing in Prescription SMS (…
helenKaryamsetty Aug 20, 2024
1c74b1b
Added faceEmbedding field
Thejas775 Aug 25, 2024
7ed8cc3
Merge branch 'develop' of https://github.com/Thejas775/Common-API int…
Thejas775 Aug 25, 2024
0d0cc98
Merge pull request #112 from Thejas775/develop
drtechie Aug 27, 2024
7efa678
faceEmbedding changes
ravishanigarapu Sep 12, 2024
9f3a4d9
face Embedding changes
ravishanigarapu Sep 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,6 @@
</repository>
</repositories>
<dependencies>

<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>

</dependency>
<!-- https://mvnrepository.com/artifact/xmlpull/xmlpull -->
<dependency>
<groupId>xmlpull</groupId>
<artifactId>xmlpull</artifactId>
<version>1.1.3.1</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
Expand Down
3 changes: 2 additions & 1 deletion src/main/environment/common_dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ start-email-scheduler=false
cron-scheduler-email=0 0/1 * * * ? *

###cti data sync Scheduler configurations
#Runs at every alternative days at 2AM
start-ctidatasync-scheduler=false
cron-scheduler-ctidatasync=0 00 01 * * ? *
cron-scheduler-ctidatasync=0 0 2 */2 * ?

###cti data check with call detail report Scheduler
#Runs at everyday 12:10AM
Expand Down
8 changes: 4 additions & 4 deletions src/main/environment/common_test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spring.datasource.driver-class-name=com.mysql.jdbc.Driver
secondary.datasource.username=<Enter your DB_REPORTING username>
secondary.datasource.password=<Enter your DB_REPORTING password>
secondary.datasource.url=<Enter DB_REPORTING URL here>
secondary.datasource.driver-class-name=com.mysql.jdbc.Drive

encDbUserName=zFlYsp9Z0s+lRvLM15A3g/Ba0w8VGs/1usuW7EsGF3k=
encDbPass=JGGAGn5wTlrbTLUHY+5BzfBa0w8VGs/1usuW7EsGF3k=
Expand Down Expand Up @@ -58,8 +59,10 @@ start-email-scheduler=false
cron-scheduler-email=0 0/1 * * * ? *
##-------------------------------###cti data sync Scheduler configurations------------------------------------------------------

#Runs at every alternative days at 2AM
start-ctidatasync-scheduler=false
cron-scheduler-ctidatasync=0 00 01 * * ? *
cron-scheduler-ctidatasync=0 0 2 */2 * ?


##-------------------------------###cti data check with call detail report Scheduler------------------------------------------------------

Expand Down Expand Up @@ -155,9 +158,6 @@ eSanjeevani.source: 11001
eSanjeevani.registerPatient: https://preprod.esanjeevaniopd.xyz/uat/ps/api/v1/Patient
eSanjeevani.routeUrl: https://uat.esanjeevani.in/user/signin

biometric.discover.url = http://127.0.0.1:port/
biometric.deviceInfo.url = http://127.0.0.1:port/rd/info
biometric.capture.url = http://127.0.0.1:port/rd/capture
eAusadhaUrl=https://dlc.kar.nic.in/e-services/api/DWInstituteInward

eausadhaAuthorization=<Enter eausadha authorization key>
Expand Down

This file was deleted.

17 changes: 5 additions & 12 deletions src/main/java/com/iemr/common/config/InterceptorConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,21 +29,14 @@
import com.iemr.common.utils.http.HTTPRequestInterceptor;

@Configuration
public class InterceptorConfig extends WebMvcConfigurerAdapter
{
public class InterceptorConfig extends WebMvcConfigurerAdapter {

@Autowired
HTTPRequestInterceptor requestInterceptor;

// @Override
// public void addInterceptors(InterceptorRegistry registry)
// {
// registry.addInterceptor(requestInterceptor);
// }

@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(new BlockingHttpMethodInterceptor())
.addPathPatterns("/**");
}
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(requestInterceptor);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ public String createBeneficiary(
+ "\"healthCareWorkerID\":\"Short\",\"communityID\":\"Integer\",\"districtID\":\"Integer\",\"stateID\":\"Integer\","
+ "\"pinCode\":\"String\",\"blockID\":\"Integer\",\"districtBranchID\":\"Integer\",\"createdBy\":\"String\","
+ "\"addressLine1\":\"String\"},\"benPhoneMaps\":{\"parentBenRegID\":\"Long\",\"phoneNo\":\"String\","
+ "\"phoneTypeID\":\"Integer\",\"benRelationshipID\":\"Integer\",\"deleted\":\"Boolean\",\"createdBy\":\"String\"}}") @RequestBody BeneficiaryModel beneficiaryModel,
+ "\"phoneTypeID\":\"Integer\",\"benRelationshipID\":\"Integer\",\"deleted\":\"Boolean\",\"createdBy\":\"String\"},"
+ "\"faceEmbedding\":[\"Float\"]}") @RequestBody BeneficiaryModel beneficiaryModel,
HttpServletRequest httpRequest) {
OutputResponse response = new OutputResponse();

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ public String closeCall(
+ "\"agentIPAddress\":\"Optional String - agent IP address\", "
+ "\"agentID\":\"Optional String - agentID\", \"isSelf\":\"Optional boolean\", "
+ "\"isFeedback\":\"optional Boolean true if IVRS feedback to be taken\", "
+ "\"IsOutbound\":\"Optional Boolean - for checking outboundcall status\", "
+ "\"isTransfered\":\"Boolean - transfer call or not\"" + "}") @RequestBody String request,
HttpServletRequest serverRequest) {
OutputResponse response = new OutputResponse();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

@PropertySource("classpath:myapp.properties")
@RestController
@RequestMapping(value = "/carestream")
public class CareStreamCreateOrderController {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.HashSet;
import java.util.List;
import java.util.Objects;
import java.util.Set;

import org.apache.xml.security.stax.config.ConfigurationProperties;
import org.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -17,6 +21,7 @@

import com.iemr.common.data.callhandling.BeneficiaryCall;
import com.iemr.common.data.nhm_dashboard.DetailedCallReport;
import com.iemr.common.repository.callhandling.IEMRCalltypeRepositoryImplCustom;
import com.iemr.common.repository.nhm_dashboard.DetailedCallReportRepo;
import com.iemr.common.repository.report.CallReportRepo;
import com.iemr.common.utils.config.ConfigProperties;
Expand All @@ -31,12 +36,14 @@ public class NHMDetailCallReportScheduler {
@Autowired
private CallReportRepo callReportRepo;

@Autowired
private IEMRCalltypeRepositoryImplCustom iEMRCalltypeRepositoryImplCustom;

Logger logger = LoggerFactory.getLogger(this.getClass().getName());

@Value("${start-ctidatacheck-scheduler}")
private boolean startCtiDataCheckFlag;


@Scheduled(cron = "${cron-scheduler-ctidatacheck}")
public void detailedCallReport() {
if (startCtiDataCheckFlag) {
Expand All @@ -48,7 +55,7 @@ public void detailedCallReport() {
String[] dateArr = date.toString().split("T");
endDate = dateArr[0].concat(" 23:59:59");
fromDate = dateArr[0].concat(" 00:00:01");

Timestamp fromTime = Timestamp.valueOf(fromDate);
Timestamp endTime = Timestamp.valueOf(endDate);
logger.info("Call detailed report check request - FromTime -" + fromTime + "Endtime - " + endTime);
Expand All @@ -57,19 +64,52 @@ public void detailedCallReport() {
for (DetailedCallReport detailedCallReport : findByCallStartTimeBetween) {
String phoneNo = detailedCallReport.getPHONE();
String sessionID = detailedCallReport.getSession_ID();
int existRecord = callReportRepo.getBenCallDetailsBySessionIDAndPhone(sessionID, phoneNo);
if (existRecord != 0) {
BeneficiaryCall existRecord = callReportRepo.getBenCallDetailsBySessionIDAndPhone(sessionID,phoneNo);
if (existRecord != null) {
logger.info("Record already present in t_bencall table with sessionID : " + sessionID
+ " phoneNo : " + phoneNo);
logger.info("Existing record from t_bencall: " + existRecord);
if (null != detailedCallReport.getOrientation_Type()
&& detailedCallReport.getOrientation_Type().equalsIgnoreCase("OUTBOUND")) {
callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo );

if(existRecord.getCallTypeID() == null) {
logger.info("Called Service Id: " + existRecord.getCalledServiceID());
// Fetching callTypeId
Integer callTypeId = getCallTypeId(true, existRecord.getCalledServiceID(),
detailedCallReport);

logger.info("CallTypeId after comparison: " + callTypeId);
if (callTypeId != null) {
callReportRepo.updateIsOutboundForCallWithCallType(true, sessionID, phoneNo,callTypeId);
} else {
callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo);
}
}
else {
callReportRepo.updateIsOutboundForCall(true, sessionID, phoneNo);
}
} else {
callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo );
if(existRecord.getCallTypeID() == null) {

logger.info("Called Service Id: " + existRecord.getCalledServiceID());
// Fetching callTypeId
Integer callTypeId = getCallTypeId(false, existRecord.getCalledServiceID(),
detailedCallReport);

logger.info("CallTypeId after comparison: " + callTypeId);
if (callTypeId != null) {
callReportRepo.updateIsOutboundForCallWithCallType(false, sessionID, phoneNo, callTypeId);
} else {
callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo);
}

}
else {
callReportRepo.updateIsOutboundForCall(false, sessionID, phoneNo);
}
}
} else {
logger.info("Record missed in t_bencall table with sessionID : " + sessionID + " phoneNo : "
+ phoneNo);
logger.info("Record missed in t_bencall table with sessionID : " + sessionID + " phoneNo : " + phoneNo);
BeneficiaryCall callDetail = getCallDetail(detailedCallReport);
callReportRepo.save(callDetail);
}
Expand All @@ -82,6 +122,36 @@ public void detailedCallReport() {

}

private Integer getCallTypeId(Boolean isOutbound, Integer calledServiceId, DetailedCallReport detailedCallReport) {
Set<Objects[]> callTypesArray = new HashSet<Objects[]>();

if (detailedCallReport.getAgent_Disposition_Category() != null
&& detailedCallReport.getAgent_Disposition() != null) {
if (isOutbound == true) {
callTypesArray = iEMRCalltypeRepositoryImplCustom.getOutboundCallTypes(calledServiceId, true);
} else {
callTypesArray = iEMRCalltypeRepositoryImplCustom.getInboundCallTypes(calledServiceId, true);
}

for (Object[] object : callTypesArray) {
String callGroupType = (String) object[3];
String callType = (String) object[0];
String detailedCallGroupType = detailedCallReport.getAgent_Disposition_Category().replace("_", " ");
String detailedCallType = detailedCallReport.getAgent_Disposition().replace("_", " ");
logger.info("Detailed Call - CallGroupType: " + detailedCallGroupType);
logger.info("Detailed Call - CallType: " + detailedCallType);

if (callGroupType.equalsIgnoreCase(detailedCallGroupType)
&& callType.equalsIgnoreCase(detailedCallType)) {
return (Integer) object[1];
}
}
}

return null;

}

private BeneficiaryCall getCallDetail(DetailedCallReport detailedCallReport) {
BeneficiaryCall beneficiaryCall = new BeneficiaryCall();
beneficiaryCall.setCallID(detailedCallReport.getSession_ID());
Expand All @@ -104,7 +174,8 @@ private BeneficiaryCall getCallDetail(DetailedCallReport detailedCallReport) {
beneficiaryCall.setCreatedBy("Admin");

beneficiaryCall.setCallDuration(String.valueOf(detailedCallReport.getCall_Duration()));



return beneficiaryCall;

}
Expand Down
20 changes: 20 additions & 0 deletions src/main/java/com/iemr/common/data/beneficiary/Beneficiary.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public class Beneficiary

private String titleName;

private List<Float> faceEmbedding;

@JsonIgnore

private Title m_title;
Expand Down Expand Up @@ -769,6 +771,23 @@ public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName
this.benPhoneMaps = phoneMap;
}

public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName, String MiddleName,
String LastName, Gender m_gender, Timestamp DOB, List<Float> faceEmbedding) {
this.beneficiaryRegID = BeneficiaryRegID;
this.beneficiaryID = BeneficiaryID;
this.firstName = FirstName;
this.middleName = MiddleName;
this.lastName = LastName;
this.m_gender = m_gender;
this.dOB = DOB;
if (DOB != null) {
this.age = Integer
.parseInt(formatYear.format(new Date(Calendar.getInstance().getTime().getTime() - DOB.getTime())))
- START_YEAR_1970;
}
this.faceEmbedding = faceEmbedding;
}

public Beneficiary(Long BeneficiaryRegID, String BeneficiaryID, String FirstName, String MiddleName,
String LastName, Gender m_gender, Timestamp DOB)
{
Expand Down Expand Up @@ -903,3 +922,4 @@ public Beneficiary()
// }

}

Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public class CommonIdentityDTO {
private String title;
private Integer zoneId;
private String monthlyFamilyIncome;

private List<Float> faceEmbedding;

// address
private Address currentAddress;
Expand Down
Loading