From efb462842df94b246eeed9e0e2dd39daa26c41c6 Mon Sep 17 00:00:00 2001 From: Alex Lipovka Date: Mon, 9 Dec 2024 21:16:32 +0400 Subject: [PATCH 1/2] Add search param to search for active q's to create documents NOTE: used when constructing list of questionnaires on Patient's documents page and in Encounter Shows only questionnaires with status='active' --- .../DocumentsList/ChooseDocumentToCreateModal/index.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx b/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx index 1e3057de..0c79065f 100644 --- a/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx +++ b/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx @@ -34,6 +34,7 @@ export const ChooseDocumentToCreateModal = (props: Props) => { 'subject-type': subjectType ? [subjectType] : [], _sort: 'title', ...(context ? { context } : {}), + status: 'active', }), (bundle) => extractBundleResources(bundle).Questionnaire, ), From 3ac831f0d8abdb124db7f96304444ce994b113c6 Mon Sep 17 00:00:00 2001 From: Alex Lipovka Date: Tue, 10 Dec 2024 10:07:07 +0400 Subject: [PATCH 2/2] Put status into correct order inside query --- .../DocumentsList/ChooseDocumentToCreateModal/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx b/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx index 0c79065f..e0bdecbe 100644 --- a/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx +++ b/src/containers/DocumentsList/ChooseDocumentToCreateModal/index.tsx @@ -33,8 +33,8 @@ export const ChooseDocumentToCreateModal = (props: Props) => { await getFHIRResources('Questionnaire', { 'subject-type': subjectType ? [subjectType] : [], _sort: 'title', - ...(context ? { context } : {}), status: 'active', + ...(context ? { context } : {}), }), (bundle) => extractBundleResources(bundle).Questionnaire, ),