Skip to content

Commit

Permalink
Updated certificate API changes (#62)
Browse files Browse the repository at this point in the history
* Modified tnxId keyword to txnId

* Abha-address search API changes

* added validation for multiple phraddress

* Abha-address search response changes

* Save facility id variable change chnages

* Added check to avoid multiple save of single care-context

* removed unused variables

* Updated public key certificate API

* Integrated Abha session v3 APIs and Profile login user verify APIs

* committed coderabitai suggested

---------

Co-authored-by: KA40094929 <KA40094929@APL-5CD1394ZJT>
Co-authored-by: Karyamsetty Helen Grace <[email protected]>
Co-authored-by: KA40094929 <[email protected]>
Co-authored-by: KA40094929 <[email protected]>
  • Loading branch information
5 people authored Feb 26, 2025
1 parent 5e16b7d commit b47be0f
Show file tree
Hide file tree
Showing 16 changed files with 413 additions and 276 deletions.
6 changes: 5 additions & 1 deletion src/main/environment/common_ci.properties
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,21 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile
getAbdmFacilityServicies= @env.ABDM_BASE_URL@/devservice/v1/bridges/getServices

##ABDM V3 APIs
abdmV3UserAuthenticate = @env.ABDM_BASE_URL@/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = @env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/cert
requestOtpForEnrollment = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/request/otp
abhaEnrollByAadhaar = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/enrol/byAadhaar
printAbhaCard = @env.ABDM_BASE_URL@/abha/api/v3/profile/account/abha-card
abhaLoginRequestOtp = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/request/otp
verifyAbhaLogin = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/verify
abhaProfileLoginVerifyUser = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/verify/user
requestAuthByAbdm = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/auth/byAbdm
webLoginAbhaRequestOtp = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/request/otp
webLoginAbhaVerify = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/verify
webLoginAbhaVerify = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/verify
webLoginPhrCard = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/profile/abha/phr-card


x-CM-ID= sbx
abhaMode=sbx

#logging.pattern.level=DEBUG
Expand Down
4 changes: 4 additions & 0 deletions src/main/environment/common_dev.properties
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,20 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices

##ABDM V3 APIs
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
webLoginAbhaRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card

x-CM-ID= sbx
abhaMode=sbx

#logging.pattern.level=DEBUG
Expand Down
7 changes: 6 additions & 1 deletion src/main/environment/common_example.properties
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,19 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices

##ABDM V3 APIs
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card


x-CM-ID= sbx
abhaMode=sbx

#logging.pattern.level=DEBUG
Expand Down
5 changes: 5 additions & 0 deletions src/main/environment/common_test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,21 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices

##ABDM V3 APIs
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
webLoginAbhaRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card

x-CM-ID= sbx
abhaMode=sbx

#logging.pattern.level=DEBUG
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,4 @@ public String printAbhaCard(@RequestBody String request) {
return response.toString();
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,24 @@ public String verifyAbhaLogin(@RequestBody String request) {
logger.info("NDHM_FHIR Verify abha login API response " + response.toString());
return response.toString();
}

@CrossOrigin
@Operation(summary = "Print PHR card - abha address web login")
@PostMapping(value = { "/printWebLoginPhrCard" })
public String printWebLoginPhrCard(@RequestBody String request) {
OutputResponse response = new OutputResponse();
try {
if (request != null) {
String s = loginAbhaV3Service.getWebLoginPhrCard(request);
response.setResponse(s);
} else
throw new FHIRException("NDHM_FHIR Empty request object");
} catch (FHIRException e) {
response.setError(5000, e.getMessage());
logger.error(e.toString());
}
logger.info("NDHM_FHIR generate OTP for ABHA card API respponse " + response.toString());
return response.toString();
}

}
16 changes: 4 additions & 12 deletions src/main/java/com/wipro/fhir/data/healthID/Authorize.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,11 @@
*/
package com.wipro.fhir.data.healthID;

import lombok.Data;

@Data
public class Authorize {
String clientId;
String clientSecret;
public String getClientId() {
return clientId;
}
public void setClientId(String clientId) {
this.clientId = clientId;
}
public String getClientSecret() {
return clientSecret;
}
public void setClientSecret(String clientSecret) {
this.clientSecret = clientSecret;
}
String grantType;
}
192 changes: 5 additions & 187 deletions src/main/java/com/wipro/fhir/data/healthID/HealthIDResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import jakarta.persistence.Transient;
import lombok.Data;

import com.google.gson.annotations.Expose;


@Data
@Entity
@Table(name = "t_healthid")
public class HealthIDResponse {
Expand Down Expand Up @@ -125,194 +127,10 @@ public class HealthIDResponse {
private String modifiedBy;
@Column(name = "LastModDate", insertable = false, updatable = false)
private Timestamp lastModDate;

@Column(name = "isNewAbha")
private Boolean isNewAbha;

@Expose
@Column(name = "TxnID")
String txnId;

public String getHealthId() {
return healthId;
}
public void setHealthId(String healthId) {
this.healthId = healthId;
}
public String getHealthIdNumber() {
return healthIdNumber;
}
public void setHealthIdNumber(String healthIdNumber) {
this.healthIdNumber = healthIdNumber;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getGender() {
return gender;
}
public void setGender(String gender) {
this.gender = gender;
}
public String getYearOfBirth() {
return yearOfBirth;
}
public void setYearOfBirth(String yearOfBirth) {
this.yearOfBirth = yearOfBirth;
}
public String getMonthOfBirth() {
return monthOfBirth;
}
public void setMonthOfBirth(String monthOfBirth) {
this.monthOfBirth = monthOfBirth;
}
public String getDayOfBirth() {
return dayOfBirth;
}
public void setDayOfBirth(String dayOfBirth) {
this.dayOfBirth = dayOfBirth;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getMiddleName() {
return middleName;
}
public void setMiddleName(String middleName) {
this.middleName = middleName;
}
public String getStateCode() {
return stateCode;
}
public void setStateCode(String stateCode) {
this.stateCode = stateCode;
}
public String getDistrictCode() {
return districtCode;
}
public void setDistrictCode(String districtCode) {
this.districtCode = districtCode;
}
public String getStateName() {
return stateName;
}
public void setStateName(String stateName) {
this.stateName = stateName;
}
public String getDistrictName() {
return districtName;
}
public void setDistrictName(String districtName) {
this.districtName = districtName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public String getKycPhoto() {
return kycPhoto;
}
public void setKycPhoto(String kycPhoto) {
this.kycPhoto = kycPhoto;
}
public String getMobile() {
return mobile;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}

public Integer getProviderServiceMapID() {
return providerServiceMapID;
}
public void setProviderServiceMapID(Integer providerServiceMapID) {
this.providerServiceMapID = providerServiceMapID;
}

public List<String> getAuthMethods() {
return authMethods;
}
public void setAuthMethods(List<String> authMethods) {
this.authMethods = authMethods;
}
public Integer gethID() {
return hID;
}
public void sethID(Integer hID) {
this.hID = hID;
}
public Long getBeneficiaryRegId() {
return beneficiaryRegId;
}
public void setBeneficiaryRegId(Long beneficiaryRegId) {
this.beneficiaryRegId = beneficiaryRegId;
}
public String getAuthMethod() {
return authMethod;
}
public void setAuthMethod(String authMethod) {
this.authMethod = authMethod;
}
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public String getProcessed() {
return processed;
}
public void setProcessed(String processed) {
this.processed = processed;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Timestamp getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Timestamp createdDate) {
this.createdDate = createdDate;
}
public String getModifiedBy() {
return modifiedBy;
}
public void setModifiedBy(String modifiedBy) {
this.modifiedBy = modifiedBy;
}
public Timestamp getLastModDate() {
return lastModDate;
}
public void setLastModDate(Timestamp lastModDate) {
this.lastModDate = lastModDate;
}
public String getTxnId() {
return txnId;
}
public void setTxnId(String txnId) {
this.txnId = txnId;
}
public String getAuthenticationMode() {
return authenticationMode;
}
public void setAuthenticationMode(String authenticationMode) {
this.authenticationMode = authenticationMode;
}


String txnId;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package com.wipro.fhir.data.v3.abhaCard;

import lombok.Data;

@Data
public class VerifyProfileUserLogin {

private String ABHANumber;
private String txnId;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@

public interface CertificateKeyService {

public String getCertPublicKey() throws FHIRException;
public String getCertPublicKey(String ndhmAuthToken) throws FHIRException;

}
Loading

0 comments on commit b47be0f

Please sign in to comment.