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

Bg 3362 Adds null check to cliaForOutOfStateTesting code in HL7 serializer #3388

Merged
merged 12 commits into from
Dec 10, 2021

Conversation

brick-green
Copy link
Collaborator

@brick-green brick-green commented Dec 9, 2021

This PR fixes a bug with the code checking for cliaForOutOfStateTesting in the hl7serializer. The originState variable was nullable but a null check was not in place allowing for a null pointer exception. A null check was added as well as a unit test in HL&SerializerIntegrationTests. The test checks for the three possible values: blank provider state, blank facility state, and both values blank.

Test Steps:

  1. set cliaForOutOfStateTesting property on a receiver
  2. curl a file with blank values for ordering_provider_state and testing_lab_state
  3. Check that the output file was created and that the MSH-4.2 value was not chan

Changes

  • Added null check for originState with stateCode retrieval inside the if statement
  • added unit test

Checklist

Testing

  • Tested locally?
  • Ran ./prime test or ./gradlew testSmoke against local Docker ReportStream container?
  • Added test cliaForOutOfStateTesting

Fixes

Pull reviewers stats

Stats for the last 30 days:

User Total reviews Median time to review Total comments
cwinters-usds 31 1h 54m 18
MauriceReeves-usds 26 14h 59m 6
kevinhaube 23 48m 10
sean-usds 22 1h 21m 6
carlosfelix2 19 15h 31m 54
jimduff-usds 18 1d 1h 24m 8
RickHawesUSDS 14 4h 51m 5
whytheplatypus 10 17h 22m 19
TomNUSDS 10 31m 2
clediggins-usds 10 2h 51m 24
jbiskie 5 1h 26m 1
ahay-agile6 2 1d 9h 28m 0
jorg3lopez 2 9d 21h 37m 0
brick-green-agile6 2 14m 0
JosiahSiegel 1 5d 2h 55m 2
MikeC-A6 1 7h 7m 3
rhood23699 1 14h 10m 0
sethdarragile6 1 2h 17m 0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

Unit Test Results

  41 files  ±0    41 suites  ±0   28s ⏱️ -9s
309 tests ±0  305 ✔️ ±0  4 💤 ±0  0 ±0 

Results for commit dda7ee1. ± Comparison against base commit e72a8b1.

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

Integration Test Results

11 files  ±0  11 suites  ±0   1m 46s ⏱️ -18s
83 tests +1  83 ✔️ +1  0 💤 ±0  0 ±0 

Results for commit dda7ee1. ± Comparison against base commit e72a8b1.

♻️ This comment has been updated with latest results.

Copy link
Contributor

@jorg3lopez jorg3lopez left a comment

Choose a reason for hiding this comment

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

Looks good.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 4 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@brick-green brick-green merged commit 6eaffdc into master Dec 10, 2021
@brick-green brick-green deleted the bg-3362-nullcheckincliaForOutofState branch December 10, 2021 16:21
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