-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Abdm Facility fetch services changes * facility save after carecontext and patientcarecontextx update * FacilityId save in mongo db and Variable declaration correction * revert mistake changes HTTPRequestInterceptor.java * Updating logger for src/main/java/com/wipro/fhir/service/common/CommonServiceImpl.java Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * Update common_ci.properties --------- Co-authored-by: KA40094929 <[email protected]> Co-authored-by: KA40094929 <KA40094929@APL-5CD1394ZJT> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
- Loading branch information
1 parent
031a3d7
commit a53760b
Showing
46 changed files
with
528 additions
and
865 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 |
---|---|---|
|
@@ -36,7 +36,11 @@ eAushadhiDummy=yes | |
##NDHM ABHA API | ||
clientID=@env.NDHM_ABHA_CLIENT_ID@ | ||
clientSecret=@env.NDHM_ABHA_CLIENT_SECRET_KEY@ | ||
ndhmuserAuthenticate=@env.ABDM_BASE_URL@/gateway/v1/sessions | ||
|
||
##Default ABDM Facility ID | ||
abdmFacilityId= @env.ABDM_FACILITY_ID@ | ||
|
||
ndhmuserAuthenticate=@env.ABDM_BASE_URL@/gateway/v0.5/sessions | ||
ndhmGenerateOTP=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/registration/mobile/generateOtp | ||
ndhmVerifyOTP=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/registration/mobile/verifyOtp | ||
ndhmCreateHealthID=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/registration/mobile/createHealthId | ||
|
@@ -53,9 +57,9 @@ abdmcreateHealthIdWithPreVerified= @env.ABDM_HEALTH_ID_BASE_URL@/api/v1/registra | |
|
||
|
||
##CareContext Creation API | ||
generateOTPForCareContext=@env.ABDM_BASE_URL@/gateway/v1/users/auth/init | ||
addCareContext = @env.ABDM_BASE_URL@/gateway/v1/links/link/add-contexts | ||
validateOTPForCareContext=@env.ABDM_BASE_URL@/gateway/v1/users/auth/confirm | ||
generateOTPForCareContext=@env.ABDM_BASE_URL@/gateway/v0.5/users/auth/init | ||
addCareContext = @env.ABDM_BASE_URL@/gateway/v0.5/links/link/add-contexts | ||
validateOTPForCareContext=@env.ABDM_BASE_URL@/gateway/v0.5/users/auth/confirm | ||
|
||
##ABHA Card API | ||
## Auth init - aadhar / mobile | ||
|
@@ -77,6 +81,10 @@ [email protected]_HEALTH_ID_BASE_URL@/api/v1/registration/aadhaar/ | |
abdmConfirmAadhaarBio=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/confirmWithAadhaarBio | ||
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 | ||
|
||
|
||
abhaMode=sbx | ||
|
||
#logging.pattern.level=DEBUG | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,11 @@ eAushadhiDummy=yes | |
##NDHM ABHA API | ||
clientID=<Enter client ID> | ||
clientSecret=<Enter client secret key> | ||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v1/sessions | ||
|
||
##Default ABDM Facility ID | ||
abdmFacilityId= <Enter ABDM Facility ID> | ||
|
||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v0.5/sessions | ||
ndhmGenerateOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/generateOtp | ||
ndhmVerifyOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/verifyOtp | ||
ndhmCreateHealthID=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/createHealthId | ||
|
@@ -53,9 +57,9 @@ abdmcreateHealthIdWithPreVerified= https://healthidsbx.abdm.gov.in/api/v1/regist | |
|
||
|
||
##CareContext Creation API | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v1/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/confirm | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v0.5/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/confirm | ||
|
||
##ABHA Card API | ||
## Auth init - aadhar / mobile | ||
|
@@ -77,6 +81,10 @@ [email protected]_HEALTH_ID_BASE_URL@/api/v1/registration/aadhaar/ | |
abdmConfirmAadhaarBio=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/confirmWithAadhaarBio | ||
abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile | ||
|
||
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
|
||
abhaMode=sbx | ||
|
||
#logging.pattern.level=DEBUG | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,11 @@ eAushadhiDummy=yes | |
##NDHM ABHA API | ||
clientID=<Enter client ID> | ||
clientSecret=<Enter client secret key> | ||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v1/sessions | ||
|
||
##Default ABDM Facility ID | ||
abdmFacilityId= <Enter ABDM Facility ID> | ||
|
||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v0.5/sessions | ||
ndhmGenerateOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/generateOtp | ||
ndhmVerifyOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/verifyOtp | ||
ndhmCreateHealthID=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/createHealthId | ||
|
@@ -53,9 +57,9 @@ abdmcreateHealthIdWithPreVerified= https://healthidsbx.abdm.gov.in/api/v1/regist | |
|
||
|
||
##CareContext Creation API | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v1/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/confirm | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v0.5/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/confirm | ||
|
||
##ABHA Card API | ||
## Auth init - aadhar / mobile | ||
|
@@ -77,6 +81,10 @@ [email protected]_HEALTH_ID_BASE_URL@/api/v1/registration/aadhaar/ | |
abdmConfirmAadhaarBio=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/confirmWithAadhaarBio | ||
abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile | ||
|
||
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
|
||
abhaMode=sbx | ||
|
||
#logging.pattern.level=DEBUG | ||
|
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 |
---|---|---|
|
@@ -36,7 +36,11 @@ eAushadhiDummy=yes | |
##NDHM ABHA API | ||
clientID=<Enter client ID> | ||
clientSecret=<Enter client secret key> | ||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v1/sessions | ||
|
||
##Default ABDM Facility ID | ||
abdmFacilityId= <Enter ABDM Facility ID> | ||
|
||
ndhmuserAuthenticate=https://dev.abdm.gov.in/gateway/v0.5/sessions | ||
ndhmGenerateOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/generateOtp | ||
ndhmVerifyOTP=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/verifyOtp | ||
ndhmCreateHealthID=https://healthidsbx.abdm.gov.in/api/v1/registration/mobile/createHealthId | ||
|
@@ -53,9 +57,9 @@ abdmcreateHealthIdWithPreVerified= https://healthidsbx.abdm.gov.in/api/v1/regist | |
|
||
|
||
##CareContext Creation API | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v1/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v1/users/auth/confirm | ||
generateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/init | ||
addCareContext = https://dev.abdm.gov.in/gateway/v0.5/links/link/add-contexts | ||
validateOTPForCareContext=https://dev.abdm.gov.in/gateway/v0.5/users/auth/confirm | ||
|
||
##ABHA Card API | ||
## Auth init - aadhar / mobile | ||
|
@@ -77,6 +81,10 @@ [email protected]_HEALTH_ID_BASE_URL@/api/v1/registration/aadhaar/ | |
abdmConfirmAadhaarBio=@env.ABDM_HEALTH_ID_BASE_URL@/api/v1/auth/confirmWithAadhaarBio | ||
abdmAccountProfile=@env.ABDM_Account_ID_BASE_URL@/api/v1/account/profile | ||
|
||
##ABDM Facility services | ||
getAbdmFacilityServicies= https://dev.abdm.gov.in/devservice/v1/bridges/getServices | ||
|
||
|
||
abhaMode=sbx | ||
|
||
#logging.pattern.level=DEBUG | ||
|
33 changes: 0 additions & 33 deletions
33
src/main/java/com/wipro/fhir/config/BlockingHttpMethodInterceptor.java
This file was deleted.
Oops, something went wrong.
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
78 changes: 78 additions & 0 deletions
78
src/main/java/com/wipro/fhir/controller/facility/FacilityController.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,78 @@ | ||
package com.wipro.fhir.controller.facility; | ||
|
||
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.GetMapping; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestHeader; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RequestParam; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import com.wipro.fhir.data.request_handler.ResourceRequestHandler; | ||
import com.wipro.fhir.service.facility.FacilityService; | ||
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 = "/facility", headers = "Authorization") | ||
public class FacilityController { | ||
|
||
|
||
@Autowired | ||
private FacilityService facilityService; | ||
|
||
Logger logger = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
||
@CrossOrigin | ||
@Operation(summary = "Get ABDM Registered Facilities") | ||
@GetMapping(value = { "/getAbdmRegisteredFacilities" }) | ||
public String getAbdmRegisteredFacilities(@RequestHeader(value = "Authorization") String Authorization) { | ||
|
||
OutputResponse response = new OutputResponse(); | ||
|
||
try { | ||
|
||
String resp = facilityService.fetchRegisteredFacilities(); | ||
|
||
response.setResponse(resp); | ||
|
||
} catch (FHIRException e) { | ||
|
||
response.setError(5000, e.getMessage()); | ||
logger.error(e.getMessage()); | ||
} | ||
logger.info("Get ABDM Registered facilities API response" + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
|
||
@CrossOrigin | ||
@Operation(summary = "Get ABDM Registered Facilities") | ||
@PostMapping(value = { "/saveAbdmFacilityId" }) | ||
public String saveAbdmFacilityForVisit(@RequestHeader(value = "Authorization") String Authorization, @RequestBody() String reqObj) { | ||
|
||
OutputResponse response = new OutputResponse(); | ||
|
||
try { | ||
|
||
String resp = facilityService.saveAbdmFacilityId(reqObj); | ||
|
||
response.setResponse(resp); | ||
} catch (FHIRException e) { | ||
|
||
response.setError(5000, e.getMessage()); | ||
logger.error(e.getMessage()); | ||
} | ||
logger.info("ABDM save Facility ID response" + response.toString()); | ||
return response.toString(); | ||
} | ||
|
||
} |
Oops, something went wrong.