-
Notifications
You must be signed in to change notification settings - Fork 31
Abdm v3 #128
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Abdm v3 #128
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
f501ca7
Abdm v3 (#112)
helenKaryamsetty efa413b
Update pom.xml
helenKaryamsetty 2275422
mongo query change fetch to linktoken (#113)
helenKaryamsetty 4809e07
Abdm v3 (#114)
helenKaryamsetty f55c90e
ABDM Abdm HiTypes addition in linktoken (#115)
helenKaryamsetty d417c96
Minor fixes (#116)
helenKaryamsetty 84427db
response correction (#117)
helenKaryamsetty c0312c4
generate token logic change (#120)
helenKaryamsetty b5b9995
hiType correction and modification in error message format (#121)
helenKaryamsetty 6dadda6
Modified error message display (#122)
helenKaryamsetty 955ec3f
M2 FHIR bundles creation (#123)
helenKaryamsetty 32ba209
added missed variable change (#124)
helenKaryamsetty 81dda6d
Modified the constructor for better handling (#125)
helenKaryamsetty 1128ffa
medication statement correction (#126)
helenKaryamsetty 7bf1e45
Bundle model fixes (#127)
helenKaryamsetty ba2c133
Merge branch 'release-3.6.1' into abdmV3
helenKaryamsetty 1578ade
Update jboss-web.xml
helenKaryamsetty b3a6b11
Update common_docker.properties
helenKaryamsetty 179b34d
Delete src/main/environment/common_test.properties
helenKaryamsetty cd22115
Delete src/main/environment/common_dev.properties
helenKaryamsetty 534d757
taken coderabbit comments (#129)
helenKaryamsetty 8b16580
Update CareContextRepo.java
helenKaryamsetty File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <factorypath> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.36/lombok-1.18.36.jar" enabled="true" runInBatchMode="false"/> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/projectlombok/lombok/1.18.30/lombok-1.18.30.jar" enabled="true" runInBatchMode="false"/> | ||
| <factorypathentry kind="VARJAR" id="M2_REPO/org/mapstruct/mapstruct-processor/1.2.0.Final/mapstruct-processor-1.2.0.Final.jar" enabled="true" runInBatchMode="false"/> | ||
| </factorypath> |
This file contains hidden or 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
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -98,6 +98,10 @@ webLoginAbhaRequestOtp = @env.ABDM_PHR_URL@/login/abha/request/otp | |
| webLoginAbhaVerify = @env.ABDM_PHR_URL@/login/abha/verify | ||
| webLoginPhrCard = @env.ABDM_PHR_URL@/login/profile/abha/phr-card | ||
|
|
||
| ## ABDM V3 M2 APIs | ||
| generateTokenForLinkCareContext = @env.ABDM_HIECM_BASE_URL@/api/hiecm/v3/token/generate-token | ||
| linkCareContext = @env.ABDM_HIECM_BASE_URL@/api/hiecm/hip/v3/link/carecontext | ||
|
|
||
| [email protected]_CM_ID@ | ||
| [email protected]_MODE@ | ||
|
|
||
|
|
@@ -120,3 +124,5 @@ [email protected]_DOC_ENABLED@ | |
| [email protected]_HOST@ | ||
|
|
||
| [email protected]_ALLOWED_ORIGINS@ | ||
|
|
||
| hipSystemUrl= @env.HIP_SYSTEM_URL@ | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
63 changes: 63 additions & 0 deletions
63
src/main/java/com/wipro/fhir/controller/v3/careContext/CareContextLinkingController.java
This file contains hidden or 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,63 @@ | ||
| package com.wipro.fhir.controller.v3.careContext; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.slf4j.LoggerFactory; | ||
| import org.springframework.beans.factory.annotation.Autowired; | ||
| 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.careContext.CareContextLinkingService; | ||
| import com.wipro.fhir.utils.exception.FHIRException; | ||
| import com.wipro.fhir.utils.response.OutputResponse; | ||
|
|
||
| import io.swagger.v3.oas.annotations.Operation; | ||
|
|
||
| @RestController | ||
| @RequestMapping(value = "/careContext", headers = "Authorization") | ||
| public class CareContextLinkingController { | ||
|
|
||
| @Autowired | ||
| private CareContextLinkingService careContextLinkingService; | ||
|
|
||
| private final Logger logger = LoggerFactory.getLogger(this.getClass().getName()); | ||
|
|
||
| @Operation(summary = "Generate token for care context linking") | ||
| @PostMapping(value = { "/generateCareContextToken" }) | ||
| public String requestOtpForEnrollment(@RequestBody String request) { | ||
| logger.info("Generate token for care context API request " + request); | ||
| OutputResponse response = new OutputResponse(); | ||
| try { | ||
| if (request != null) { | ||
| String s = careContextLinkingService.generateTokenForCareContext(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 token for care context API response " + response.toString()); | ||
| return response.toString(); | ||
| } | ||
|
|
||
| @Operation(summary = "link care context") | ||
| @PostMapping(value = { "/linkCareContext" }) | ||
| public String add(@RequestBody String request) { | ||
| logger.info("link care context API request " + request); | ||
| OutputResponse response = new OutputResponse(); | ||
| try { | ||
| if (request != null) { | ||
| String s = careContextLinkingService.linkCareContext(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("link care context API response " + response.toString()); | ||
| return response.toString(); | ||
| } | ||
| } |
39 changes: 39 additions & 0 deletions
39
src/main/java/com/wipro/fhir/data/mongo/care_context/GenerateTokenAbdmResponses.java
This file contains hidden or 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,39 @@ | ||
| package com.wipro.fhir.data.mongo.care_context; | ||
|
|
||
| import java.time.LocalDateTime; | ||
| import java.util.Date; | ||
|
|
||
| import org.springframework.data.annotation.Id; | ||
| import org.springframework.data.mongodb.core.mapping.Document; | ||
| import org.springframework.data.mongodb.core.mapping.Field; | ||
|
|
||
| import com.google.gson.annotations.Expose; | ||
|
|
||
| import lombok.Data; | ||
|
|
||
| @Data | ||
| @Document(collection = "GenerateTokenAbdmResponses") | ||
| public class GenerateTokenAbdmResponses { | ||
|
|
||
| @Id | ||
| @Expose | ||
| @Field(value = "id") | ||
| private String id; | ||
|
|
||
| @Expose | ||
| @Field(value = "abhaAddress") | ||
| private String abhaAddress; | ||
|
|
||
| @Expose | ||
| @Field(value = "requestId") | ||
| private String requestId; | ||
|
|
||
| @Expose | ||
| @Field(value = "response") | ||
| private String response; | ||
|
|
||
| @Expose | ||
| @Field(value = "createdDate") | ||
| private Date createdDate; | ||
|
|
||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.