Skip to content

Commit 21d39ef

Browse files
committed
Add Extensions Search utility with fixed comparison language
1 parent 5656305 commit 21d39ef

3 files changed

Lines changed: 28 additions & 7 deletions

File tree

src/app/extensions-search/extensions-search.component.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ interface ExportEditionConcepts {
2626
standalone: false
2727
})
2828
export class ExtensionsSearchComponent implements OnInit, OnDestroy {
29+
private readonly COMPARISON_LANGUAGE = 'en,es';
2930
eclInput = '';
3031
latestEditions: any[] = [];
3132
editionsWithResults: EditionWithResult[] = [];
@@ -203,7 +204,8 @@ export class ExtensionsSearchComponent implements OnInit, OnDestroy {
203204
eclWithModule,
204205
'',
205206
0,
206-
this.resultsPageSize
207+
this.resultsPageSize,
208+
this.COMPARISON_LANGUAGE
207209
).pipe(
208210
concatMap((res: any) => {
209211
const total = res?.expansion?.total ?? 0;
@@ -286,7 +288,8 @@ export class ExtensionsSearchComponent implements OnInit, OnDestroy {
286288
eclWithModule,
287289
'',
288290
0,
289-
this.resultsPageSize
291+
this.resultsPageSize,
292+
this.COMPARISON_LANGUAGE
290293
).subscribe({
291294
next: (res: any) => {
292295
const total = res?.expansion?.total ?? 0;
@@ -320,7 +323,8 @@ export class ExtensionsSearchComponent implements OnInit, OnDestroy {
320323
eclWithModule,
321324
this.resultsFilter,
322325
this.resultsOffset,
323-
this.resultsPageSize
326+
this.resultsPageSize,
327+
this.COMPARISON_LANGUAGE
324328
).subscribe({
325329
next: (res: any) => {
326330
this.rightPanelResults = res?.expansion?.contains ?? [];
@@ -356,7 +360,8 @@ export class ExtensionsSearchComponent implements OnInit, OnDestroy {
356360
eclWithModule,
357361
'',
358362
offset,
359-
this.resultsPageSize
363+
this.resultsPageSize,
364+
this.COMPARISON_LANGUAGE
360365
).subscribe({
361366
next: (res: any) => {
362367
const newResults = res?.expansion?.contains ?? [];
@@ -536,7 +541,8 @@ export class ExtensionsSearchComponent implements OnInit, OnDestroy {
536541
eclWithModule,
537542
'',
538543
0,
539-
this.EXPORT_COUNT
544+
this.EXPORT_COUNT,
545+
this.COMPARISON_LANGUAGE
540546
).pipe(
541547
concatMap((res: any) => {
542548
const contains = res?.expansion?.contains ?? [];

src/app/services/menu.service.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,13 @@ export class MenuService {
146146
url: "/valueset-translator",
147147
description: "An utility for transforming SNOMED CT value sets from non-standard formats (Excel, CSV, Snap2SNOMED maps) into standards-compliant FHIR ValueSet resources and packages."
148148
},
149+
{
150+
name: "Extensions Search Utility",
151+
subtitle: "Tool",
152+
type: "internal",
153+
url: "/extensions-search",
154+
description: "A utility for running ECL searches across the latest SNOMED CT extensions and comparing concept matches by edition."
155+
},
149156
{
150157
name: "Analytics with Snolytical",
151158
subtitle: "Analytics demo",

src/app/services/terminology.service.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -512,7 +512,15 @@ export class TerminologyService {
512512
);
513513
}
514514

515-
expandValueSetFromServer(fhirBase: string, fhirUrl: string, ecl: string, terms: string, offset?: number, count?:number): Observable<any> {
515+
expandValueSetFromServer(
516+
fhirBase: string,
517+
fhirUrl: string,
518+
ecl: string,
519+
terms: string,
520+
offset?: number,
521+
count?:number,
522+
languageOverride?: string
523+
): Observable<any> {
516524
if (!offset) offset = 0;
517525
if (!count) count = 20;
518526
if (!fhirBase) fhirBase = this.snowstormFhirBase;
@@ -521,7 +529,7 @@ export class TerminologyService {
521529
terms = '';
522530
}
523531
// Calculate language context on-the-fly based on the edition being queried
524-
let langParam = this.computedLanguageContextForUri(fhirUrl);
532+
let langParam = languageOverride || this.computedLanguageContextForUri(fhirUrl);
525533
// For LOINC SNOMED server, use simpler language parameter (just 'en' instead of language refset)
526534
const isLoincSnomedServer = fhirBase.includes('loincsnomed');
527535
const languageParam = isLoincSnomedServer ? 'en' : langParam;

0 commit comments

Comments
 (0)