Skip to content

Commit

Permalink
(fix) O3-3001: Form engine shouldn't send encounterDatetime when savi…
Browse files Browse the repository at this point in the history
…ng a new form (#131)
  • Loading branch information
vasharma05 authored Apr 9, 2024
1 parent d095ba1 commit 884b8a4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class EncounterAdapter implements ValueAdapter {
if (!payload.encounterDatetime) {
this.setPayloadEncounterDate(
payload,
form.valueProcessingInfo.encounterDatetime ?? new Date().toISOString(),
form.valueProcessingInfo.encounterDatetime,
form.valueProcessingInfo.utcOffset
);
}
Expand Down Expand Up @@ -189,6 +189,10 @@ export class EncounterAdapter implements ValueAdapter {
encounterDatetime: string,
utcOffset: string
) {
if (!encounterDatetime) {
// Not sending encounter datetime from the UI if no encounter datetime is specified
return;
}
const dateValue = moment(encounterDatetime).utcOffset(utcOffset || '+0300');
payload['encounterDatetime'] = dateValue.format();
}
Expand Down

0 comments on commit 884b8a4

Please sign in to comment.