# encounter date\_changed not updating when an obs within the encounter is updated

**URL:** <https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373>\
**Category:** Development\
**Created:** [March 12, 2020, 7:39pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373 "2020-03-12T19:39:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![ccwhite23](https://talk.openmrs.org/letter_avatar/ccwhite23/32/5_5575768a8748004e209b776fc1b2916d.png) [@ccwhite23](https://talk.openmrs.org/u/ccwhite23)\
**Post date:** [March 12, 2020, 7:39pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/1 "2020-03-12T19:39:16Z")

</div>

@dkayiwa We have a process that pulls all updates based on the encounter date\_changed, date\_created fields. For some reason, when an observation is added or changed within an encounter, the encounter date\_changed field is not updated. Is this how it is supposed to work? Is there some configuration setting to turn this on? All of our backup replication processes key off of this field, so we really need that field updated if any part of the form is updated.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 12, 2020, 9:54pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/2 "2020-03-12T21:54:20Z")

</div>

Is there any reason why you are not getting changes/updates in OpenMRS using the atom feed module?

---

<div class="post-metadata">

**Author:** ![ccwhite23](https://talk.openmrs.org/letter_avatar/ccwhite23/32/5_5575768a8748004e209b776fc1b2916d.png) [@ccwhite23](https://talk.openmrs.org/u/ccwhite23)\
**Post date:** [March 12, 2020, 9:55pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/3 "2020-03-12T21:55:13Z")

</div>

we are using kettle transformations and only have access to the database.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [March 12, 2020, 11:10pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/4 "2020-03-12T23:10:33Z")

</div>

The atom feeds are stored in the database. Would that help?

[https://wiki.openmrs.org/display/projects/Atomfeed+for+Sync+2.0](https://wiki.openmrs.org/display/projects/Atomfeed+for+Sync+2.0)

---

<div class="post-metadata">

**Author:** ![morrisng](https://talk.openmrs.org/user_avatar/talk.openmrs.org/morrisng/32/12190_2.png) [@morrisng](https://talk.openmrs.org/u/morrisng)\
**Post date:** [May 20, 2020, 1:57pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/5 "2020-05-20T13:57:29Z")

</div>

what table is this stored?

---

<div class="post-metadata">

**Author:** ![morrisng](https://talk.openmrs.org/user_avatar/talk.openmrs.org/morrisng/32/12190_2.png) [@morrisng](https://talk.openmrs.org/u/morrisng)\
**Post date:** [May 20, 2020, 2:06pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/6 "2020-05-20T14:06:07Z")

</div>

I am facing the same issue. how can this be solved?, we need this data in the date\_change field for audit purposes. Any Help Please.

---

<div class="post-metadata">

**Author:** ![ggomez](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ggomez/32/19309_2.png) [@ggomez](https://talk.openmrs.org/u/ggomez)\
**Post date:** [May 20, 2020, 2:28pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/7 "2020-05-20T14:28:09Z")

</div>

@ccwhite23 have you been successful in this?

---

<div class="post-metadata">

**Author:** ![ggomez](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ggomez/32/19309_2.png) [@ggomez](https://talk.openmrs.org/u/ggomez)\
**Post date:** [May 20, 2020, 2:32pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/8 "2020-05-20T14:32:37Z")

</div>

Did you create a service for this? If you do attempt exploring adding an event handler with a couple of atom feed event configurations might trigger your updates

---

<div class="post-metadata">

**Author:** ![morrisng](https://talk.openmrs.org/user_avatar/talk.openmrs.org/morrisng/32/12190_2.png) [@morrisng](https://talk.openmrs.org/u/morrisng)\
**Post date:** [May 20, 2020, 2:50pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/9 "2020-05-20T14:50:23Z")

</div>

Do you any resource that you would want to point me to? Also, I just noticed why that date\_changed is not updating, I am still testing I will give a comprehensive update by tomorrow when I am done.

---

<div class="post-metadata">

**Author:** ![ccwhite23](https://talk.openmrs.org/letter_avatar/ccwhite23/32/5_5575768a8748004e209b776fc1b2916d.png) [@ccwhite23](https://talk.openmrs.org/u/ccwhite23)\
**Post date:** [September 18, 2020, 3:33am UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/10 "2020-09-18T03:33:50Z")

</div>

@morrisng @ggomez @dkayiwa do you know any embedded process that will update the encounter information when part of the form is updated?

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [September 22, 2020, 3:02pm UTC](https://talk.openmrs.org/t/encounter-date-changed-not-updating-when-an-obs-within-the-encounter-is-updated/27373/12 "2020-09-22T15:02:16Z")

</div>

Am not aware of such. Though a module can use [AOP](https://wiki.openmrs.org/display/docs/OpenMRS+AOP) or have a hibernate interceptor to do the same.
