CDCgov / trusted-intermediary

Bringing together healthcare providers by reducing the connection burden.
Apache License 2.0
11 stars 5 forks source link

Add assertion to make sure micro character is encoded correctly #1587

Closed basiliskus closed 1 week ago

basiliskus commented 1 week ago

Description

Added sample file and RS Integration test assertion to very µ gets encoded correctly

Local test steps

  1. Set the AZURE_STORAGE_CONNECTION_STRING environment variable to the value in Keybase (in service_keys/TI/staging)
  2. Run the tests with ./gradlew rs-e2e:clean rs-e2e:automatedTest

Issue

1538

github-actions[bot] commented 1 week ago

PR Reviewer Guide 🔍

Here are some key observations to aid the review process:

**🎫 Ticket compliance analysis ✅** **[1538](https://github.com/CDCgov/trusted-intermediary/issues/1538) - Fully compliant** Fully compliant requirements: - Add assertion to ensure the micro character 'µ' is encoded correctly in the system.
⏱️ Estimated effort to review: 2 🔵🔵⚪⚪⚪
🧪 PR contains tests
🔒 No security concerns identified
⚡ Recommended focus areas for review

Encoding Verification
Ensure that the encoding for the micro character "µ" is handled correctly in the assertion rule.
github-actions[bot] commented 1 week ago

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Score
Possible issue
Replace the direct Unicode micro character with its Unicode escape sequence to ensure proper encoding ___ **Ensure that the micro character 'µ' in the OBX segment is correctly encoded as
'\u00B5' to avoid issues with character encoding in systems that do not support
direct Unicode characters.** [examples/Test/Automated/008_ORU_R01_micro_character_encoding.hl7 [6]](https://github.com/CDCgov/trusted-intermediary/pull/1587/files#diff-1efcb9246b702ef396a98cb0e721851826a1744680c441c0ec395fc2b57bd3c0R6-R6) ```diff -OBX|1|NM|47633-3^Glycine [Moles/volume] in Dried blood spot^LN|1|0.5|�mol/L||N|||F|||20240212103049 +OBX|1|NM|47633-3^Glycine [Moles/volume] in Dried blood spot^LN|1|0.5|\u00B5mol/L||N|||F|||20240212103049 ```
Suggestion importance[1-10]: 8 Why: The suggestion correctly identifies a potential encoding issue with the micro character in the OBX segment and proposes using the Unicode escape sequence, which enhances compatibility across different systems. This is crucial for data integrity in medical data transmission.
8
sonarcloud[bot] commented 1 week ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud