openchs-models 1.19.0 → 1.20.0

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.
package/dist/Schema.js CHANGED
@@ -174,7 +174,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
174
174
  var _default = {
175
175
  //order is important, should be arranged according to the dependency
176
176
  schema: [_LocaleMapping.default, _Settings.default, _Concept.ConceptAnswer, _Concept.default, _EncounterType.default, _Gender.default, _UserDefinedIndividualProperty.default, _AddressLevel.LocationMapping, _AddressLevel.default, _KeyValue.default, _Form.default, _FormMapping.default, _FormElementGroup.default, _FormElement.default, _SubjectType.default, _Individual.default, _ProgramOutcome.default, _Program.default, _ProgramEnrolment.default, _Observation.default, _ProgramEncounter.default, _Encounter.default, _EntitySyncStatus.default, _EntityQueue.default, _ConfigFile.default, _Checklist.default, _ChecklistItem.default, _Format.default, _UserInfo.default, _StringKeyNumericValue.default, _VisitScheduleInterval.default, _VisitScheduleConfig.default, _ProgramConfig.default, _Family.default, _IndividualRelation.default, _IndividualRelationGenderMapping.default, _IndividualRelationshipType.default, _IndividualRelationship.default, _RuleDependency.default, _Rule.default, _ChecklistItemStatus.default, _ChecklistDetail.default, _ChecklistItemDetail.default, _VideoTelemetric.default, _Video.default, _MediaQueue.default, _Point.default, _SyncTelemetry.default, _IdentifierSource.default, _IdentifierAssignment.default, _RuleFailureTelemetry.default, _BeneficiaryModePin.default, _OrganisationConfig.default, _PlatformTranslation.default, _Translation.default, _Groups.default, _MyGroups.default, _GroupPrivileges.default, _Privilege.default, _GroupRole.default, _GroupSubject.default, _DashboardCache.default, _LocationHierarchy.default, _ReportCard.default, _Dashboard.default, _DashboardSectionCardMapping.default, _DraftSubject.default, _StandardReportCardType.default, _ApprovalStatus.default, _EntityApprovalStatus.default, _GroupDashboard.default, _DashboardSection.default, _News.default, _Comment.default, _CommentThread.default, _Extension.default, _SubjectMigration.default, _ResetSync.default, _Documentation.default, _DocumentationItem.default],
177
- schemaVersion: 155,
177
+ schemaVersion: 156,
178
178
  migration: function (oldDB, newDB) {
179
179
  if (oldDB.schemaVersion < 10) {
180
180
  var oldObjects = oldDB.objects("DecisionConfig");
@@ -50,7 +50,7 @@ class Form {
50
50
  this.deleteOutOfSyncDrafts(entityService, resource.uuid);
51
51
  }
52
52
 
53
- return _General.default.assignFields(resource, new Form(), ["uuid", "name", "formType", "decisionRule", "visitScheduleRule", "validationRule", "checklistsRule"]);
53
+ return _General.default.assignFields(resource, new Form(), ["uuid", "name", "formType", "decisionRule", "visitScheduleRule", "validationRule", "checklistsRule", "timed"]);
54
54
  }
55
55
 
56
56
  static deleteOutOfSyncDrafts(entityService, formUUID) {
@@ -267,6 +267,10 @@ _defineProperty(Form, "schema", {
267
267
  checklistsRule: {
268
268
  type: "string",
269
269
  optional: true
270
+ },
271
+ timed: {
272
+ type: "bool",
273
+ default: false
270
274
  }
271
275
  }
272
276
  });
@@ -27,7 +27,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
27
27
 
28
28
  class FormElementGroup {
29
29
  static fromResource(resource, entityService) {
30
- const formElementGroup = _General.default.assignFields(resource, new FormElementGroup(), ["uuid", "name", "displayOrder", "display", "voided", "rule"]);
30
+ const formElementGroup = _General.default.assignFields(resource, new FormElementGroup(), ["uuid", "name", "displayOrder", "display", "voided", "rule", "startTime", "stayTime"]);
31
31
 
32
32
  formElementGroup.form = entityService.findByKey("uuid", _ResourceUtil.default.getUUIDFor(resource, "formUUID"), _Form.default.schema.name);
33
33
  return formElementGroup;
@@ -166,7 +166,9 @@ class FormElementGroup {
166
166
  displayOrder: this.displayOrder,
167
167
  display: this.display,
168
168
  formElements: this.formElements,
169
- formUUID: this.form.uuid
169
+ formUUID: this.form.uuid,
170
+ startTime: this.startTime,
171
+ stayTime: this.stayTime
170
172
  };
171
173
  }
172
174
 
@@ -195,6 +197,14 @@ _defineProperty(FormElementGroup, "schema", {
195
197
  rule: {
196
198
  type: "string",
197
199
  optional: true
200
+ },
201
+ startTime: {
202
+ type: 'int',
203
+ optional: true
204
+ },
205
+ stayTime: {
206
+ type: 'int',
207
+ optional: true
198
208
  }
199
209
  }
200
210
  });
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.19.0",
4
+ "version": "1.20.0",
5
5
  "private": false,
6
6
  "repository": {
7
7
  "type": "git",