prime-reportstream icon indicating copy to clipboard operation
prime-reportstream copied to clipboard

Engagement/jessica/15544 fhirdata api

Open JessicaWNava opened this issue 1 year ago • 4 comments

This PR adds an API that runs the fhirdata command on a message passed to it and returns the result. It will also error out and return the errors if the filters are invalid or if they filter out everything.

Test Steps:

  1. Make sure the CLI still works. A lot of the code had to be changed, so running some basic commands through here would be ideal.
  2. Make sure appropriate errors are returned when a receiver isn't found, a filter is broken, or everything is filtered out.

Changes

  • Adds an API that runs the fhirdata command on a message.
  • Adds some tests to the fhirdata stuff.

Checklist

Testing

  • [x] Tested locally?
  • [ ] Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
  • [ ] (For Changes to /frontend-react/...) Ran npm run lint:write?
  • [ ] Added tests?

Process

  • [ ] Are there licensing issues with any new dependencies introduced?
  • [ ] Includes a summary of what a code reviewer should test/verify?
  • [ ] Updated the release notes?
  • [ ] Database changes are submitted as a separate PR?
  • [ ] DevOps team has been notified if PR requires ops support?

Linked Issues

  • Fixes #issue

To Be Done

Create GitHub issues to track the work remaining, if any

  • #issue

Specific Security-related subjects a reviewer should pay specific attention to

  • Does this PR introduce new endpoints?
    • new endpoint A
    • new endpoint B
  • Does this PR include changes in authentication and/or authorization of existing endpoints?
  • Does this change introduce new dependencies that need vetting?
  • Does this change require changes to our infrastructure?
  • Does logging contain sensitive data?
  • Does this PR include or remove any sensitive information itself?

If you answered 'yes' to any of the questions above, conduct a detailed Review that addresses at least:

  • What are the potential security threats and mitigations? Please list the STRIDE threats and how they are mitigated
    • Spoofing (faking authenticity)
      • Threat T, which could be achieved by A, is mitigated by M
    • Tampering (influence or sabotage the integrity of information, data, or system)
    • Repudiation (the ability to dispute the origin or originator of an action)
    • Information disclosure (data made available to entities who should not have it)
    • Denial of service (make a resource unavailable)
    • Elevation of Privilege (reduce restrictions that apply or gain privileges one should not have)
  • Have you ensured logging does not contain sensitive data?
  • Have you received any additional approvals needed for this change?

JessicaWNava avatar Sep 19 '24 17:09 JessicaWNava

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

github-actions[bot] avatar Oct 02 '24 15:10 github-actions[bot]

Test Results

1 245 tests  +3   1 241 :white_check_mark: +3   7m 38s :stopwatch: -33s   162 suites ±0       4 :zzz: ±0    162 files   ±0       0 :x: ±0 

Results for commit ef8c5a28. ± Comparison against base commit f283cf39.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 02 '24 15:10 github-actions[bot]

Integration Test Results

 53 files  ±0   53 suites  ±0   28m 16s :stopwatch: +24s 411 tests ±0  402 :white_check_mark: ±0  9 :zzz: ±0  0 :x: ±0  414 runs  ±0  405 :white_check_mark: ±0  9 :zzz: ±0  0 :x: ±0 

Results for commit ef8c5a28. ± Comparison against base commit f283cf39.

:recycle: This comment has been updated with latest results.

github-actions[bot] avatar Oct 02 '24 15:10 github-actions[bot]

Quality Gate Failed Quality Gate failed

Failed conditions
7.4% Coverage on New Code (required ≥ 80%)
B Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

sonarqubecloud[bot] avatar Oct 16 '24 16:10 sonarqubecloud[bot]