Skip to content
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

PDF Generator - Demo Endpoint + Redis #143

Merged
merged 16 commits into from Jul 25, 2022
Merged

Conversation

anthonyvelazquez
Copy link
Contributor

@anthonyvelazquez anthonyvelazquez commented Jul 19, 2022

PDF Generator - Demo Endpoint + Redis

Description

What was the problem?

Incorrect API endpoint for the PDF generator

How does this fix it?

Update the previous demo endpoint to use the new fields based on #113. Added Redis instead of using S3 to store the PDF file and split the functionality into 2 endpoints, a generate and a fetch request.

How to test this PR

More details in README.md

Request Body:

    {
    "claimSubmissionId": "1",
    "diagnosticCode": "7701",
    "veteranInfo": "{\"first\": \"test\",\"middle\": \"test\", \"last\": \"test\", \"suffix\": \"test\", \"birthdate\": \"2000-10-20\"}",
    "evidence": "{\"bp_readings\":[], \"medications\":[]}"
  }

You can fill evidence with additional information as long as it matches the format in Assess Claims here: #113

@anthonyvelazquez anthonyvelazquez changed the title PDF Generator - Demo Endpoint PDF Generator - Demo Endpoint + Redis Jul 20, 2022
@anthonyvelazquez anthonyvelazquez marked this pull request as ready for review July 22, 2022 15:08
Copy link
Contributor

@jbregstone jbregstone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I tested it with postman with some sample data and it worked perfectly. On possible improvement would be to change the fetch_pdf endpoint to only require the "claimSubmissionId" field because it does not need the "evidence" to return the right pdf, but that is not absolutely necessary so I will approve.

@anthonyvelazquez anthonyvelazquez merged commit 05a5022 into develop Jul 25, 2022
@anthonyvelazquez anthonyvelazquez deleted the pdf-generator-endpoint branch July 25, 2022 14:13
@yoomlam
Copy link
Contributor

yoomlam commented Jul 25, 2022

Let's remove/rename the demo package once you've finalized the new endpoints. The demo package is meant to be temporary.

import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.util.Base64;

@Slf4j
@RestController
public class DemoController implements DemoResource {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you've modified it to be used for the new endpoints that will be called by RRD, this DemoController class should be removed/renamed and put in a different Java package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants