Skip to content

Commit b47be0f

Browse files
helenKaryamsettyKA40094929Karyamsetty Helen GraceKA40094929KA40094929
authored
Updated certificate API changes (#62)
* 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 <ka40094929@wipro.com> Co-authored-by: KA40094929 <KA40094929@192.168.0.108> Co-authored-by: KA40094929 <KA40094929@192.168.0.107>
1 parent 5e16b7d commit b47be0f

16 files changed

Lines changed: 413 additions & 276 deletions

src/main/environment/common_ci.properties

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,17 +85,21 @@ abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile
8585
getAbdmFacilityServicies= @env.ABDM_BASE_URL@/devservice/v1/bridges/getServices
8686

8787
##ABDM V3 APIs
88+
abdmV3UserAuthenticate = @env.ABDM_BASE_URL@/api/hiecm/gateway/v3/sessions
8889
getAuthCertPublicKey = @env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/cert
8990
requestOtpForEnrollment = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/request/otp
9091
abhaEnrollByAadhaar = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/enrol/byAadhaar
9192
printAbhaCard = @env.ABDM_BASE_URL@/abha/api/v3/profile/account/abha-card
9293
abhaLoginRequestOtp = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/request/otp
9394
verifyAbhaLogin = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/verify
95+
abhaProfileLoginVerifyUser = @env.ABDM_BASE_URL@/abha/api/v3/profile/login/verify/user
9496
requestAuthByAbdm = @env.ABDM_BASE_URL@/abha/api/v3/enrollment/auth/byAbdm
9597
webLoginAbhaRequestOtp = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/request/otp
9698
webLoginAbhaVerify = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/verify
99+
webLoginAbhaVerify = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/abha/verify
100+
webLoginPhrCard = @env.ABDM_BASE_URL@/abha/api/v3/phr/web/login/profile/abha/phr-card
97101

98-
102+
x-CM-ID= sbx
99103
abhaMode=sbx
100104

101105
#logging.pattern.level=DEBUG

src/main/environment/common_dev.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,20 @@ abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile
8585
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices
8686

8787
##ABDM V3 APIs
88+
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
8889
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
8990
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
9091
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
9192
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
9293
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
9394
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
95+
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
9496
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
9597
webLoginAbhaRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp
9698
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
99+
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card
97100

101+
x-CM-ID= sbx
98102
abhaMode=sbx
99103

100104
#logging.pattern.level=DEBUG

src/main/environment/common_example.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,19 @@ abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile
8888
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices
8989

9090
##ABDM V3 APIs
91+
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
9192
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
9293
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
9394
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
9495
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
9596
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
9697
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
98+
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
99+
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
100+
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
101+
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card
97102

98-
103+
x-CM-ID= sbx
99104
abhaMode=sbx
100105

101106
#logging.pattern.level=DEBUG

src/main/environment/common_test.properties

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,16 +85,21 @@ abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile
8585
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices
8686

8787
##ABDM V3 APIs
88+
abdmV3UserAuthenticate = https://dev.abdm.gov.in/api/hiecm/gateway/v3/sessions
8889
getAuthCertPublicKey = https://healthidsbx.abdm.gov.in/api/v1/auth/cert
8990
requestOtpForEnrollment = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/request/otp
9091
abhaEnrollByAadhaar = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/enrol/byAadhaar
9192
printAbhaCard = https://abhasbx.abdm.gov.in/abha/api/v3/profile/account/abha-card
9293
abhaLoginRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/request/otp
9394
verifyAbhaLogin = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify
95+
abhaProfileLoginVerifyUser = https://abhasbx.abdm.gov.in/abha/api/v3/profile/login/verify/user
9496
requestAuthByAbdm = https://abhasbx.abdm.gov.in/abha/api/v3/enrollment/auth/byAbdm
9597
webLoginAbhaRequestOtp = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/request/otp
9698
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
99+
webLoginAbhaVerify = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/abha/verify
100+
webLoginPhrCard = https://abhasbx.abdm.gov.in/abha/api/v3/phr/web/login/profile/abha/phr-card
97101

102+
x-CM-ID= sbx
98103
abhaMode=sbx
99104

100105
#logging.pattern.level=DEBUG

src/main/java/com/wipro/fhir/controller/v3/abha/CreateAbhaV3Controller.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,5 +105,4 @@ public String printAbhaCard(@RequestBody String request) {
105105
return response.toString();
106106
}
107107

108-
109108
}

src/main/java/com/wipro/fhir/controller/v3/abha/LoginAbhaV3Controller.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,5 +64,24 @@ public String verifyAbhaLogin(@RequestBody String request) {
6464
logger.info("NDHM_FHIR Verify abha login API response " + response.toString());
6565
return response.toString();
6666
}
67+
68+
@CrossOrigin
69+
@Operation(summary = "Print PHR card - abha address web login")
70+
@PostMapping(value = { "/printWebLoginPhrCard" })
71+
public String printWebLoginPhrCard(@RequestBody String request) {
72+
OutputResponse response = new OutputResponse();
73+
try {
74+
if (request != null) {
75+
String s = loginAbhaV3Service.getWebLoginPhrCard(request);
76+
response.setResponse(s);
77+
} else
78+
throw new FHIRException("NDHM_FHIR Empty request object");
79+
} catch (FHIRException e) {
80+
response.setError(5000, e.getMessage());
81+
logger.error(e.toString());
82+
}
83+
logger.info("NDHM_FHIR generate OTP for ABHA card API respponse " + response.toString());
84+
return response.toString();
85+
}
6786

6887
}

src/main/java/com/wipro/fhir/data/healthID/Authorize.java

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,11 @@
2121
*/
2222
package com.wipro.fhir.data.healthID;
2323

24+
import lombok.Data;
25+
26+
@Data
2427
public class Authorize {
2528
String clientId;
2629
String clientSecret;
27-
public String getClientId() {
28-
return clientId;
29-
}
30-
public void setClientId(String clientId) {
31-
this.clientId = clientId;
32-
}
33-
public String getClientSecret() {
34-
return clientSecret;
35-
}
36-
public void setClientSecret(String clientSecret) {
37-
this.clientSecret = clientSecret;
38-
}
30+
String grantType;
3931
}

src/main/java/com/wipro/fhir/data/healthID/HealthIDResponse.java

Lines changed: 5 additions & 187 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,12 @@
3131
import jakarta.persistence.Id;
3232
import jakarta.persistence.Table;
3333
import jakarta.persistence.Transient;
34+
import lombok.Data;
3435

3536
import com.google.gson.annotations.Expose;
3637

3738

39+
@Data
3840
@Entity
3941
@Table(name = "t_healthid")
4042
public class HealthIDResponse {
@@ -125,194 +127,10 @@ public class HealthIDResponse {
125127
private String modifiedBy;
126128
@Column(name = "LastModDate", insertable = false, updatable = false)
127129
private Timestamp lastModDate;
128-
130+
@Column(name = "isNewAbha")
131+
private Boolean isNewAbha;
129132

130133
@Expose
131134
@Column(name = "TxnID")
132-
String txnId;
133-
134-
public String getHealthId() {
135-
return healthId;
136-
}
137-
public void setHealthId(String healthId) {
138-
this.healthId = healthId;
139-
}
140-
public String getHealthIdNumber() {
141-
return healthIdNumber;
142-
}
143-
public void setHealthIdNumber(String healthIdNumber) {
144-
this.healthIdNumber = healthIdNumber;
145-
}
146-
public String getName() {
147-
return name;
148-
}
149-
public void setName(String name) {
150-
this.name = name;
151-
}
152-
public String getGender() {
153-
return gender;
154-
}
155-
public void setGender(String gender) {
156-
this.gender = gender;
157-
}
158-
public String getYearOfBirth() {
159-
return yearOfBirth;
160-
}
161-
public void setYearOfBirth(String yearOfBirth) {
162-
this.yearOfBirth = yearOfBirth;
163-
}
164-
public String getMonthOfBirth() {
165-
return monthOfBirth;
166-
}
167-
public void setMonthOfBirth(String monthOfBirth) {
168-
this.monthOfBirth = monthOfBirth;
169-
}
170-
public String getDayOfBirth() {
171-
return dayOfBirth;
172-
}
173-
public void setDayOfBirth(String dayOfBirth) {
174-
this.dayOfBirth = dayOfBirth;
175-
}
176-
public String getFirstName() {
177-
return firstName;
178-
}
179-
public void setFirstName(String firstName) {
180-
this.firstName = firstName;
181-
}
182-
public String getLastName() {
183-
return lastName;
184-
}
185-
public void setLastName(String lastName) {
186-
this.lastName = lastName;
187-
}
188-
public String getMiddleName() {
189-
return middleName;
190-
}
191-
public void setMiddleName(String middleName) {
192-
this.middleName = middleName;
193-
}
194-
public String getStateCode() {
195-
return stateCode;
196-
}
197-
public void setStateCode(String stateCode) {
198-
this.stateCode = stateCode;
199-
}
200-
public String getDistrictCode() {
201-
return districtCode;
202-
}
203-
public void setDistrictCode(String districtCode) {
204-
this.districtCode = districtCode;
205-
}
206-
public String getStateName() {
207-
return stateName;
208-
}
209-
public void setStateName(String stateName) {
210-
this.stateName = stateName;
211-
}
212-
public String getDistrictName() {
213-
return districtName;
214-
}
215-
public void setDistrictName(String districtName) {
216-
this.districtName = districtName;
217-
}
218-
public String getEmail() {
219-
return email;
220-
}
221-
public void setEmail(String email) {
222-
this.email = email;
223-
}
224-
public String getKycPhoto() {
225-
return kycPhoto;
226-
}
227-
public void setKycPhoto(String kycPhoto) {
228-
this.kycPhoto = kycPhoto;
229-
}
230-
public String getMobile() {
231-
return mobile;
232-
}
233-
public void setMobile(String mobile) {
234-
this.mobile = mobile;
235-
}
236-
237-
public Integer getProviderServiceMapID() {
238-
return providerServiceMapID;
239-
}
240-
public void setProviderServiceMapID(Integer providerServiceMapID) {
241-
this.providerServiceMapID = providerServiceMapID;
242-
}
243-
244-
public List<String> getAuthMethods() {
245-
return authMethods;
246-
}
247-
public void setAuthMethods(List<String> authMethods) {
248-
this.authMethods = authMethods;
249-
}
250-
public Integer gethID() {
251-
return hID;
252-
}
253-
public void sethID(Integer hID) {
254-
this.hID = hID;
255-
}
256-
public Long getBeneficiaryRegId() {
257-
return beneficiaryRegId;
258-
}
259-
public void setBeneficiaryRegId(Long beneficiaryRegId) {
260-
this.beneficiaryRegId = beneficiaryRegId;
261-
}
262-
public String getAuthMethod() {
263-
return authMethod;
264-
}
265-
public void setAuthMethod(String authMethod) {
266-
this.authMethod = authMethod;
267-
}
268-
public Boolean getDeleted() {
269-
return deleted;
270-
}
271-
public void setDeleted(Boolean deleted) {
272-
this.deleted = deleted;
273-
}
274-
public String getProcessed() {
275-
return processed;
276-
}
277-
public void setProcessed(String processed) {
278-
this.processed = processed;
279-
}
280-
public String getCreatedBy() {
281-
return createdBy;
282-
}
283-
public void setCreatedBy(String createdBy) {
284-
this.createdBy = createdBy;
285-
}
286-
public Timestamp getCreatedDate() {
287-
return createdDate;
288-
}
289-
public void setCreatedDate(Timestamp createdDate) {
290-
this.createdDate = createdDate;
291-
}
292-
public String getModifiedBy() {
293-
return modifiedBy;
294-
}
295-
public void setModifiedBy(String modifiedBy) {
296-
this.modifiedBy = modifiedBy;
297-
}
298-
public Timestamp getLastModDate() {
299-
return lastModDate;
300-
}
301-
public void setLastModDate(Timestamp lastModDate) {
302-
this.lastModDate = lastModDate;
303-
}
304-
public String getTxnId() {
305-
return txnId;
306-
}
307-
public void setTxnId(String txnId) {
308-
this.txnId = txnId;
309-
}
310-
public String getAuthenticationMode() {
311-
return authenticationMode;
312-
}
313-
public void setAuthenticationMode(String authenticationMode) {
314-
this.authenticationMode = authenticationMode;
315-
}
316-
317-
135+
String txnId;
318136
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package com.wipro.fhir.data.v3.abhaCard;
2+
3+
import lombok.Data;
4+
5+
@Data
6+
public class VerifyProfileUserLogin {
7+
8+
private String ABHANumber;
9+
private String txnId;
10+
}

src/main/java/com/wipro/fhir/service/v3/abha/CertificateKeyService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
public interface CertificateKeyService {
66

7-
public String getCertPublicKey() throws FHIRException;
7+
public String getCertPublicKey(String ndhmAuthToken) throws FHIRException;
88

99
}

0 commit comments

Comments
 (0)