@openmrs/ngx-formentry 3.2.1-pre.214 → 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.
@@ -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
  };