private PropertyDiff CreatePropertyDiff(PatientProfileDiscrepancy discrepancy, IList<DiscrepancyTestResult> results) { var result = CollectionUtils.SelectFirst<DiscrepancyTestResult>(results, r => r.Discrepancy == discrepancy); if (result != null) { var propDiff = new PropertyDiff(); propDiff.IsDiscrepant = result.IsDiscrepant; propDiff.AlignedLeftValue = result.Diff.AlignedLeft; propDiff.AlignedRightValue = result.Diff.AlignedRight; propDiff.DiffMask = result.Diff.DiffMask; return propDiff; } return null; }
private void AddField(string heading, PropertyDiff propertyDiff) { _fields.Add(new Field(heading, propertyDiff.IsDiscrepant, propertyDiff.AlignedLeftValue, propertyDiff.AlignedRightValue, propertyDiff.DiffMask)); }