From f881f595f18b1a26b6afee49463478aaa0b6a35b Mon Sep 17 00:00:00 2001 From: Paul Bui-Quang Date: Thu, 30 Nov 2023 16:36:39 +0100 Subject: [PATCH] chore: add explicit only-root param to valueset api call --- src/services/aphp/callApi.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/services/aphp/callApi.ts b/src/services/aphp/callApi.ts index 926158397..0920b4813 100644 --- a/src/services/aphp/callApi.ts +++ b/src/services/aphp/callApi.ts @@ -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>(`/ValueSet?reference=${codeSystem}${searchParam}`) + const res = await apiFhir.get>( + `/ValueSet?only-roots=true&reference=${codeSystem}${searchParam}` + ) const valueSetBundle = getApiResponseResourcesOrThrow(res) return valueSetBundle.length > 0 ? valueSetBundle