diff --git a/ui/src/cohortSummary.tsx b/ui/src/cohortSummary.tsx
index b03188343..9fabe4b7a 100644
--- a/ui/src/cohortSummary.tsx
+++ b/ui/src/cohortSummary.tsx
@@ -13,51 +13,64 @@ export type CohortSummaryProps = {
};
export function CohortSummary(props: CohortSummaryProps) {
+ let hasCriteria = false;
+ props.cohort?.groupSections?.forEach((gs) => {
+ gs.groups.forEach((g) => {
+ if (g.criteria.length) {
+ hasCriteria = true;
+ }
+ });
+ });
+
return (
- {props.cohort.groupSections.map((s, si) => (
-
-
- {si != 0 ? "and " : ""}
- {s.filter.excluded ? "exclude " : "include "}participants with
- {s.filter.kind === GroupSectionFilterKind.Any ? " any " : " all "}
- of the following criteria:
-
- {s.groups.map((g, gi) => (
-
-
- {getCriteriaTitleFull(g.criteria[0])}
-
- {g.criteria.length > 1 ? (
-
+ {!hasCriteria ? (
+ All participants
+ ) : (
+ props.cohort.groupSections.map((s, si) => (
+
+
+ {si != 0 ? "and " : ""}
+ {s.filter.excluded ? "exclude " : "include "}participants with
+ {s.filter.kind === GroupSectionFilterKind.Any ? " any " : " all "}
+ of the following criteria:
+
+ {s.groups.map((g, gi) => (
+
+
+ {getCriteriaTitleFull(g.criteria[0])}
+
+ {g.criteria.length > 1 ? (
+
+
+ {" where "}
+
+
+ {g.criteria
+ .slice(1)
+ .map((c) =>
+ getCriteriaTitle(c, getCriteriaPlugin(c, g.entity))
+ )
+ .join(", ")}
+
+
+ ) : null}
+ {gi != s.groups.length - 1 ? (
- {" where "}
+ {s.filter.kind === GroupSectionFilterKind.Any
+ ? " or "
+ : " and "}
-
- {g.criteria
- .slice(1)
- .map((c) =>
- getCriteriaTitle(c, getCriteriaPlugin(c, g.entity))
- )
- .join(", ")}
-
-
- ) : null}
- {gi != s.groups.length - 1 ? (
-
- {s.filter.kind === GroupSectionFilterKind.Any
- ? " or "
- : " and "}
-
- ) : null}
-
- ))}
-
- ))}
+ ) : null}
+
+ ))}
+
+ ))
+ )}
);
}
diff --git a/ui/src/export.tsx b/ui/src/export.tsx
index 549908ceb..3712dadfc 100644
--- a/ui/src/export.tsx
+++ b/ui/src/export.tsx
@@ -860,11 +860,12 @@ function ExportDialog(
{stage === ExportDialogStage.MODEL_SELECT ? (
-
+