Skip to content

Commit

Permalink
chore: add explicit only-root param to valueset api call
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-buiquang committed Nov 30, 2023
1 parent f5c8757 commit f881f59
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/services/aphp/callApi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,9 @@ const getCodeList = async (
: `&only-roots=false&_text=${encodeURIComponent(search.trim().replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, '\\$&'))}*` //eslint-disable-line
}
// TODO test if it returns all the codes without specifying the count
const res = await apiFhir.get<FHIR_Bundle_Response<ValueSet>>(`/ValueSet?reference=${codeSystem}${searchParam}`)
const res = await apiFhir.get<FHIR_Bundle_Response<ValueSet>>(
`/ValueSet?only-roots=true&reference=${codeSystem}${searchParam}`
)
const valueSetBundle = getApiResponseResourcesOrThrow(res)
return valueSetBundle.length > 0
? valueSetBundle
Expand Down

0 comments on commit f881f59

Please sign in to comment.