Skip to content
Open
Changes from all commits
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
6 changes: 2 additions & 4 deletions src/services/aphp/serviceValueSets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,16 +184,14 @@ export const getChildrenFromCodes = async (

const batchResults = await Promise.all(batchPromises)

const combinedResults = batchResults.reduce(
return batchResults.reduce(
(acc, batch) => {
acc.results.push(...batch.results)
acc.count += batch.count
return acc
},
{ results: [] as Hierarchy<FhirItem>[], count: 0 }
)

return combinedResults
}

/**
Expand Down Expand Up @@ -278,7 +276,7 @@ export const searchInValueSets = async (
const searchValue = search || HIERARCHY_ROOT
try {
const res = await apiFhir.get<FHIR_API_Response<ValueSet>>(
`/ValueSet/$expand?url=${codeSystems.join(',')}&filter=${encodeURIComponent(
`/ValueSet/$expand?activeOnly=true&url=${codeSystems.join(',')}&filter=${encodeURIComponent(
searchValue
)}&excludeNested=false&_tag=text-search-rank&_tag=${LOW_TOLERANCE_TAG}${options}`,
{ signal }
Expand Down
Loading