-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Abdm Facility fetch services changes * facility save after carecontext and patientcarecontextx update * FacilityId save in mongo db and Variable declaration correction * Mongo carecontext save query logic changes * ABHA Creation M1 V3 API changes * Abha V3 changes * removed unused code --------- Co-authored-by: KA40094929 <[email protected]> Co-authored-by: KA40094929 <KA40094929@APL-5CD1394ZJT> Co-authored-by: Karyamsetty Helen Grace <[email protected]>
- Loading branch information
1 parent
2f45084
commit b01167d
Showing
26 changed files
with
1,110 additions
and
10 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 |
---|---|---|
|
@@ -82,7 +82,15 @@ [email protected]_HEALTH_ID_BASE_URL@/api/v1/auth/confirmWithAadha | |
abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile | ||
|
||
##ABDM Facility services | ||
getAbdmFacilityServicies= @env.ABDM_HEALTH_ID_BASE_URL@/devservice/v1/bridges/getServices | ||
getAbdmFacilityServicies= @env.ABDM_BASE_URL@/devservice/v1/bridges/getServices | ||
|
||
##ABDM V3 APIs | ||
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 | ||
|
||
|
||
abhaMode=sbx | ||
|
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 |
---|---|---|
|
@@ -84,6 +84,13 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile | |
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
##ABDM V3 APIs | ||
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 | ||
|
||
abhaMode=sbx | ||
|
||
|
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 |
---|---|---|
|
@@ -84,6 +84,14 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile | |
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
##ABDM V3 APIs | ||
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 | ||
|
||
|
||
abhaMode=sbx | ||
|
||
|
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 |
---|---|---|
|
@@ -84,6 +84,14 @@ [email protected]_Account_ID_BASE_URL@/api/v1/account/profile | |
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
##ABDM V3 APIs | ||
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 | ||
|
||
|
||
abhaMode=sbx | ||
|
||
|
110 changes: 110 additions & 0 deletions
110
src/main/java/com/wipro/fhir/controller/v3/abha/CreateAbhaV3Controller.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,110 @@ | ||
package com.wipro.fhir.controller.v3.abha; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.CrossOrigin; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.wipro.fhir.service.ndhm.GenerateHealthID_CardServiceImpl; | ||
import com.wipro.fhir.service.v3.abha.CreateAbhaV3Service; | ||
import com.wipro.fhir.utils.exception.FHIRException; | ||
import com.wipro.fhir.utils.response.OutputResponse; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
|
||
@CrossOrigin | ||
@RestController | ||
@RequestMapping(value = "/abhaCreation", headers = "Authorization") | ||
public class CreateAbhaV3Controller { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
||
@Autowired | ||
private CreateAbhaV3Service createAbhaV3Service; | ||
|
||
@CrossOrigin | ||
@Operation(summary = "Generate OTP for ABHA enrollment") | ||
@PostMapping(value = { "/requestOtpForAbhaEnrollment" }) | ||
public String requestOtpForEnrollment(@RequestBody String request) { | ||
logger.info("Generate OTP for ABHA enrollment API request " + request); | ||
OutputResponse response = new OutputResponse(); | ||
try { | ||
if (request != null) { | ||
String s = createAbhaV3Service.getOtpForEnrollment(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 response " + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
@CrossOrigin | ||
@Operation(summary = "ABHA enrollment by Aadhaar") | ||
@PostMapping(value = { "/abhaEnrollmentByAadhaar" }) | ||
public String abhaEnrollmentByAadhaar(@RequestBody String request) { | ||
logger.info("ABHA enrollment BY Aadhaar API request " + request); | ||
OutputResponse response = new OutputResponse(); | ||
String res = null; | ||
try { | ||
if (request != null) { | ||
res = createAbhaV3Service.enrollmentByAadhaar(request); | ||
response.setResponse(res); | ||
} 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 response " + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
@CrossOrigin | ||
@Operation(summary = "Verify Mobile OTP for ABHA enrollment") | ||
@PostMapping(value = { "/verifyAuthByMobile" }) | ||
public String verifyMobileForAuth(@RequestBody String request) { | ||
logger.info("Verify Mobile OTP for ABHA enrollment " + request); | ||
OutputResponse response = new OutputResponse(); | ||
try { | ||
if (request != null) { | ||
String s = createAbhaV3Service.verifyAuthByMobile(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 response " + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
@CrossOrigin | ||
@Operation(summary = "Print Abha card") | ||
@PostMapping(value = { "/printAbhaCard" }) | ||
public String printAbhaCard(@RequestBody String request) { | ||
OutputResponse response = new OutputResponse(); | ||
try { | ||
if (request != null) { | ||
String s = createAbhaV3Service.getAbhaCardPrinted(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(); | ||
} | ||
|
||
|
||
} |
68 changes: 68 additions & 0 deletions
68
src/main/java/com/wipro/fhir/controller/v3/abha/LoginAbhaV3Controller.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,68 @@ | ||
package com.wipro.fhir.controller.v3.abha; | ||
|
||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.web.bind.annotation.CrossOrigin; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.wipro.fhir.service.v3.abha.LoginAbhaV3Service; | ||
import com.wipro.fhir.utils.exception.FHIRException; | ||
import com.wipro.fhir.utils.response.OutputResponse; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
|
||
@CrossOrigin | ||
@RestController | ||
@RequestMapping(value = "/abhaLogin", headers = "Authorization") | ||
public class LoginAbhaV3Controller { | ||
|
||
private final Logger logger = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
||
@Autowired | ||
private LoginAbhaV3Service loginAbhaV3Service; | ||
|
||
@CrossOrigin | ||
@Operation(summary = "Request OTP for Abha LOgin") | ||
@PostMapping(value = { "/abhaLoginRequestOtp" }) | ||
public String requestOtpForAbhaLogin(@RequestBody String request) { | ||
logger.info("Generate OTP for ABHA Login API request " + request); | ||
OutputResponse response = new OutputResponse(); | ||
try { | ||
if (request != null) { | ||
String s = loginAbhaV3Service.requestOtpForAbhaLogin(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 login API response " + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
@CrossOrigin | ||
@Operation(summary = "verify OTP for Abha LOgin") | ||
@PostMapping(value = { "/verifyAbhaLogin" }) | ||
public String verifyAbhaLogin(@RequestBody String request) { | ||
logger.info("verify OTP for ABHA Login API request " + request); | ||
OutputResponse response = new OutputResponse(); | ||
try { | ||
if (request != null) { | ||
String s = loginAbhaV3Service.verifyAbhaLogin(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 Verify abha login API response " + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
} |
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
14 changes: 14 additions & 0 deletions
14
src/main/java/com/wipro/fhir/data/v3/abhaCard/BioRequest.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,14 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class BioRequest { | ||
|
||
private String timestamp; | ||
private String txnId; | ||
private String aadhaar; | ||
private Object fingerPrintAuthPid; | ||
private String mobile; | ||
|
||
} |
10 changes: 10 additions & 0 deletions
10
src/main/java/com/wipro/fhir/data/v3/abhaCard/ConsentRequest.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,10 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class ConsentRequest { | ||
|
||
private String code; | ||
private String version; | ||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/wipro/fhir/data/v3/abhaCard/EnrollByAadhaar.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,14 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
import java.util.Map; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class EnrollByAadhaar{ | ||
public Map<String, Object> authData; | ||
public ConsentRequest consent; | ||
} | ||
|
12 changes: 12 additions & 0 deletions
12
src/main/java/com/wipro/fhir/data/v3/abhaCard/LoginAbhaRequest.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,12 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class LoginAbhaRequest { | ||
|
||
private String loginId; | ||
private String loginMethod; | ||
private String loginHint; | ||
|
||
} |
16 changes: 16 additions & 0 deletions
16
src/main/java/com/wipro/fhir/data/v3/abhaCard/LoginMethod.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,16 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class LoginMethod { | ||
|
||
private String loginId; | ||
private String loginMethod; | ||
private String pId; | ||
private String tnxId; | ||
private String mobileNumber; | ||
private String createdBy; | ||
private int providerServiceMapId; | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/com/wipro/fhir/data/v3/abhaCard/OtpRequest.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,15 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import java.sql.Timestamp; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class OtpRequest { | ||
|
||
private String timestamp; | ||
private String txnId; | ||
private String otpValue; | ||
private String mobile; | ||
|
||
} |
14 changes: 14 additions & 0 deletions
14
src/main/java/com/wipro/fhir/data/v3/abhaCard/RequestOTPEnrollment.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,14 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class RequestOTPEnrollment { | ||
|
||
String tnxId; | ||
String[] scope; | ||
String loginHint; | ||
String loginId; | ||
String otpSystem; | ||
|
||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/com/wipro/fhir/data/v3/abhaCard/VerifyAbhaLogin.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,13 @@ | ||
package com.wipro.fhir.data.v3.abhaCard; | ||
|
||
import java.util.Map; | ||
|
||
import lombok.Data; | ||
|
||
@Data | ||
public class VerifyAbhaLogin { | ||
|
||
public String[] scope; | ||
public Map<String, Object> authData; | ||
|
||
} |
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
Oops, something went wrong.