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

Story/672/marshal results into fhir #755

Merged
merged 21 commits into from
Jan 9, 2024

Conversation

jcrichlake
Copy link
Contributor

#672

Marshaling our stored data into a FHIR object

Issue

Add a link to the issue here. Consider using
672

Checklist

  • I have added tests to cover my changes
  • I have added logging where useful (with appropriate log level)
  • I have added JavaDocs where required
  • I have updated the documentation accordingly

Note: You may remove items that are not applicable

@jcrichlake jcrichlake marked this pull request as ready for review January 8, 2024 21:12
Copy link
Contributor

@basiliskus basiliskus left a comment

Choose a reason for hiding this comment

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

Left some comments but otherwise the marshaling changes look good to me

@@ -25,6 +25,15 @@ public PartnerMetadata(
this(receivedSubmissionId, null, sender, null, timeReceived, hash);
}

public PartnerMetadata(
Copy link
Contributor

Choose a reason for hiding this comment

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

Will this be removed?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes in the PR to add Submission received id

Copy link
Contributor

Choose a reason for hiding this comment

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

So it will be added in this PR, and then removed in the other one? Is that necessary?

@@ -120,6 +123,7 @@ public synchronized PartnerMetadata fetchMetadata(String receivedSubmissionId)

return new PartnerMetadata(
result.getString("message_id"),
result.getString("sender"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this change going to be in the other PR that will add the sentSubmissionId handling?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes

Timestamp timestampForMock = Timestamp.from(Instant.parse("2024-01-03T15:45:33.30Z"))
Instant timeReceived = timestampForMock.toInstant()
def hash = receiver.hashCode().toString()
def expected = new PartnerMetadata(messageId, receiver, timeReceived, hash)
def hash = sender.hashCode().toString()
Copy link
Contributor

Choose a reason for hiding this comment

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

Should the changes to the DB implementation in this PR be in the other PR given is not directly related to the marshaling of the response?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The above changes are fixing a bug I had from previous PRs, because of how I was retrieving results, one column from the db was never being populated. So I updated the above test after fixing the results retrieval as the test started to fail.

@jcrichlake jcrichlake requested a review from basiliskus January 8, 2024 21:41
Copy link
Member

@halprin halprin left a comment

Choose a reason for hiding this comment

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

Success!

Copy link

sonarqubecloud bot commented Jan 9, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
55.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@jcrichlake jcrichlake merged commit 921f82a into main Jan 9, 2024
16 checks passed
@jcrichlake jcrichlake deleted the story/672/marshal-results-into-fhir branch January 9, 2024 17:58
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.

3 participants