-
Notifications
You must be signed in to change notification settings - Fork 180
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
Add a new filter - splitDataBySegments #344
Add a new filter - splitDataBySegments #344
Conversation
src/Microsoft.Health.Fhir.Liquid.Converter/Utilities/Hl7v2DataUtility.cs
Outdated
Show resolved
Hide resolved
var result = new Hl7v2Data(); | ||
var segmentIds = segmentIdSeparators.Split(@"|", StringSplitOptions.RemoveEmptyEntries); | ||
|
||
if (segmentIdSeparators == string.Empty || segmentIds.Intersect(hl7v2Data.Meta).ToList().Count == 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use .any() instead of .count==0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it.
|
||
for (var i = 0; i < hl7v2Data.Meta.Count; ++i) | ||
{ | ||
if (segmentIds.Contains(hl7v2Data.Meta[i])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
try to use hashset instead of array of string?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated it. It would be better.
No description provided.