gdc-common-utils-ts 2.3.9 → 2.3.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -118,9 +118,10 @@ export declare function toClinicalResourceExpandedViews(bundle: ClinicalResource
118
118
  *
119
119
  * The Composition is authoritative for grouping. Resource type is deliberately
120
120
  * not used to guess a section because Observation and supporting resources can
121
- * be referenced from several IPS sections.
121
+ * be referenced from several IPS sections. Display options are propagated to
122
+ * every generated card.
122
123
  */
123
- export declare function toClinicalSectionViews(bundle: ClinicalResourceBundleLike): ClinicalSectionView[];
124
+ export declare function toClinicalSectionViews(bundle: ClinicalResourceBundleLike, options?: ClinicalResourceDisplayOptions): ClinicalSectionView[];
124
125
  /**
125
126
  * Returns the most useful local text plus international display pair that can
126
127
  * be inferred from one FHIR-like resource and its `meta.claims`.
@@ -78,9 +78,10 @@ export function toClinicalResourceExpandedViews(bundle) {
78
78
  *
79
79
  * The Composition is authoritative for grouping. Resource type is deliberately
80
80
  * not used to guess a section because Observation and supporting resources can
81
- * be referenced from several IPS sections.
81
+ * be referenced from several IPS sections. Display options are propagated to
82
+ * every generated card.
82
83
  */
83
- export function toClinicalSectionViews(bundle) {
84
+ export function toClinicalSectionViews(bundle, options = {}) {
84
85
  const entries = readBundleEntries(bundle);
85
86
  const composition = entries.find((entry) => entry.resource?.resourceType === ResourceTypesFhirR4.Composition);
86
87
  if (!composition?.resource) {
@@ -113,7 +114,7 @@ export function toClinicalSectionViews(bundle) {
113
114
  ...(resolveCodeableConceptLabel(section.emptyReason)
114
115
  ? { emptyReason: resolveCodeableConceptLabel(section.emptyReason) }
115
116
  : {}),
116
- resources: resolvedEntries.map((entry) => toClinicalResourceCardView(entry)),
117
+ resources: resolvedEntries.map((entry) => toClinicalResourceCardView(entry, options)),
117
118
  unresolvedReferences,
118
119
  };
119
120
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdc-common-utils-ts",
3
- "version": "2.3.9",
3
+ "version": "2.3.10",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },