@openmrs/ngx-formentry 3.2.1-pre.210 → 3.2.1-pre.218

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.
@@ -14503,7 +14503,7 @@
14503
14503
  }
14504
14504
  };
14505
14505
  ObsAdapterHelper.prototype.setMultiselectObsNodeValue = function (node, obs) {
14506
- var e_1, _b;
14506
+ var e_1, _c;
14507
14507
  if (node && obs.length > 0) {
14508
14508
  obs = obs.sort(this.comparePath);
14509
14509
  node.initialValue = obs;
@@ -14517,7 +14517,7 @@
14517
14517
  catch (e_1_1) { e_1 = { error: e_1_1 }; }
14518
14518
  finally {
14519
14519
  try {
14520
- if (obs_1_1 && !obs_1_1.done && (_b = obs_1.return)) _b.call(obs_1);
14520
+ if (obs_1_1 && !obs_1_1.done && (_c = obs_1.return)) _c.call(obs_1);
14521
14521
  }
14522
14522
  finally { if (e_1) throw e_1.error; }
14523
14523
  }
@@ -14668,9 +14668,9 @@
14668
14668
  };
14669
14669
  // PAYLOAD GENERATION FUNCTIONS
14670
14670
  ObsAdapterHelper.prototype.addFieldNameSpaceandPath = function (node, obs) {
14671
- var _a;
14671
+ var _a, _b;
14672
14672
  obs.formFieldNamespace = this.formFieldNamespace;
14673
- obs.formFieldPath = "" + ((_a = node === null || node === void 0 ? void 0 : node.question) === null || _a === void 0 ? void 0 : _a.questionIndex) + (node === null || node === void 0 ? void 0 : node.nodeIndex) + this.obsIndex;
14673
+ obs.formFieldPath = ((_b = (_a = node === null || node === void 0 ? void 0 : node.question) === null || _a === void 0 ? void 0 : _a.extras) === null || _b === void 0 ? void 0 : _b.id) + "~" + this.obsIndex;
14674
14674
  this.obsIndex++;
14675
14675
  return obs;
14676
14676
  };
@@ -15770,6 +15770,7 @@
15770
15770
  return results;
15771
15771
  };
15772
15772
  EncounterAdapter.prototype.setNonFilledPayloadMembers = function (form, payload) {
15773
+ var _a;
15773
15774
  if (form.valueProcessingInfo.patientUuid) {
15774
15775
  this.setPayloadPatientUuid(payload, form.valueProcessingInfo.patientUuid);
15775
15776
  }
@@ -15779,6 +15780,9 @@
15779
15780
  if (form.valueProcessingInfo.encounterTypeUuid) {
15780
15781
  this.setPayloadEncounterTypeUuid(payload, form.valueProcessingInfo.encounterTypeUuid);
15781
15782
  }
15783
+ if (!payload.encounterDatetime) {
15784
+ this.setPayloadEncounterDate(payload, (_a = form.valueProcessingInfo.encounterDatetime) !== null && _a !== void 0 ? _a : new Date().toISOString(), form.valueProcessingInfo.utcOffset);
15785
+ }
15782
15786
  if (form.valueProcessingInfo.formUuid) {
15783
15787
  this.setPayloadFormUuid(payload, form.valueProcessingInfo.formUuid);
15784
15788
  }
@@ -15795,6 +15799,10 @@
15795
15799
  EncounterAdapter.prototype.setPayloadEncounterTypeUuid = function (payload, encounterTypeUuid) {
15796
15800
  payload['encounterType'] = encounterTypeUuid;
15797
15801
  };
15802
+ EncounterAdapter.prototype.setPayloadEncounterDate = function (payload, encounterDatetime, utcOffset) {
15803
+ var dateValue = moment__default["default"](encounterDatetime).utcOffset(utcOffset || '+0300');
15804
+ payload['encounterDatetime'] = dateValue.format();
15805
+ };
15798
15806
  EncounterAdapter.prototype.setPayloadFormUuid = function (payload, formUuid) {
15799
15807
  payload['form'] = formUuid;
15800
15808
  };