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

[TA] Implementation to support FHIR #28809

Merged
merged 5 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
don't touch legacy code
  • Loading branch information
maririos committed May 17, 2022
commit 882a2f837f219607ca0eae745a0d61bfa7047fd5
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,24 @@ internal AnalyzeHealthcareEntitiesResult(string id, TextDocumentStatistics stati
IList<HealthcareEntityRelation> entityRelations,
IList<TextAnalyticsWarning> warnings,
IDictionary<string, object> fhirBundle)
: this(id, statistics, healthcareEntities, entityRelations, warnings)
{
FhirBundle = new ReadOnlyDictionary<string, object>(fhirBundle);
}

/// <summary>
/// Initializes a new instance of the <see cref="AnalyzeHealthcareEntitiesResult"/>.
/// </summary>
internal AnalyzeHealthcareEntitiesResult(string id, TextDocumentStatistics statistics,
IList<HealthcareEntity> healthcareEntities,
IList<HealthcareEntityRelation> entityRelations,
IList<TextAnalyticsWarning> warnings)
: base(id, statistics)
{
_entities = new ReadOnlyCollection<HealthcareEntity>(healthcareEntities);
Warnings = new ReadOnlyCollection<TextAnalyticsWarning>(warnings);
EntityRelations = new ReadOnlyCollection<HealthcareEntityRelation>(entityRelations);

if (fhirBundle == null)
{
FhirBundle = new Dictionary<string, object>();
}
else
{
FhirBundle = new ReadOnlyDictionary<string, object>(fhirBundle);
}
FhirBundle = new Dictionary<string, object>();
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1398,7 +1398,7 @@ public static AnalyzeHealthcareEntitiesResult AnalyzeHealthcareEntitiesResult(
IEnumerable<HealthcareEntityRelation> entityRelations,
IEnumerable<TextAnalyticsWarning> warnings)
{
return new AnalyzeHealthcareEntitiesResult(id, statistics, healthcareEntities.ToList(), entityRelations.ToList(), warnings.ToList(), default);
return new AnalyzeHealthcareEntitiesResult(id, statistics, healthcareEntities.ToList(), entityRelations.ToList(), warnings.ToList());
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,7 @@ internal static AnalyzeHealthcareEntitiesResultCollection ConvertToAnalyzeHealth
ConvertToDocumentStatistics(documentHealthcareEntities.Statistics),
ConvertToHealthcareEntityCollection(documentHealthcareEntities.Entities),
ConvertToHealthcareEntityRelationsCollection(documentHealthcareEntities.Entities, documentHealthcareEntities.Relations),
ConvertToWarnings(documentHealthcareEntities.Warnings),
default));
ConvertToWarnings(documentHealthcareEntities.Warnings)));
}

healthcareEntititesResults = healthcareEntititesResults.OrderBy(result => idToIndexMap[result.Id]).ToList();
Expand Down