openchs-models 1.33.32 → 1.33.33

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.
Files changed (2) hide show
  1. package/dist/ReportCard.js +11 -0
  2. package/package.json +1 -1
@@ -232,7 +232,18 @@ class ReportCard extends _BaseEntity.default {
232
232
  isFullyCustom() {
233
233
  return !_lodash.default.isNil(this.customCardConfig);
234
234
  }
235
+ static deriveCardType(card) {
236
+ if (card.customCardConfig) return ReportCard.cardTypes.fullyCustom;
237
+ if (card.standardReportCardType) return ReportCard.cardTypes.standard;
238
+ return card.nested ? ReportCard.cardTypes.nested : ReportCard.cardTypes.customData;
239
+ }
235
240
  }
241
+ _defineProperty(ReportCard, "cardTypes", {
242
+ standard: "standard",
243
+ nested: "nested",
244
+ customData: "customData",
245
+ fullyCustom: "fullyCustom"
246
+ });
236
247
  _defineProperty(ReportCard, "actionTypes", {
237
248
  ViewSubjectProfile: "ViewSubjectProfile",
238
249
  DoVisit: "DoVisit"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "openchs-models",
3
3
  "description": "OpenCHS data model to be used by front end clients",
4
- "version": "1.33.32",
4
+ "version": "1.33.33",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",