# How to Make Patient's History Available in a App

**URL:** <https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615>\
**Category:** Users\
**Created:** [July 9, 2017, 4:49pm UTC](https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615 "2017-07-09T16:49:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![YAW\_ANTWI-ADJEI](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/y/c0e974/32.png) [@YAW\_ANTWI-ADJEI](https://forum.dimagi.com/u/YAW_ANTWI-ADJEI)\
**Post date:** [July 9, 2017, 4:49pm UTC](https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615/1 "2017-07-09T16:49:02Z")

</div>

​Dear All,  
I want to know if it is possible to display the last 5 data stored or  
captured by a case property.

For instance, when a client goes to a consulting room, the doctor would  
like to read the content of the Examination property for the last 5 visits.  
Or for the last 5 visits what medicine were prescribed during each visit.

Yaw

---

<div class="post-metadata">

**Author:** ![Clayton\_Sims](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/clayton_sims/32/496_2.png) [@Clayton\_Sims](https://forum.dimagi.com/u/Clayton_Sims)\
**Post date:** [July 21, 2017, 8:54pm UTC](https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615/2 "2017-07-21T20:54:33Z")

</div>

Hi Yaw,

There are a couple of ways to create this interaction.

If there aren't a lot of these properties, the easiest thing to do is  
create a sliding window of data ie:

property  
property\_prev\_1  
property\_prev\_2  
..  
property\_prev\_5

and in each form, load the previous property and load it in to the next, IE:

property\_prev\_1 = #case/property  
property\_prev\_2 = #case/property\_prev\_1  
...  
etc

-Clayton

> **···**
>
> On Sun, Jul 9, 2017 at 12:49 PM, YAW ANTWI-ADJEI wrote:
> 
> > ​Dear All,  
> > I want to know if it is possible to display the last 5 data stored or  
> > captured by a case property.
> > 
> > For instance, when a client goes to a consulting room, the doctor would  
> > like to read the content of the Examination property for the last 5 visits.  
> > Or for the last 5 visits what medicine were prescribed during each visit.
> > 
> > Yaw
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![YAW\_ANTWI-ADJEI](https://dimagi.b-cdn.net/letter_avatar_proxy/v4/letter/y/c0e974/32.png) [@YAW\_ANTWI-ADJEI](https://forum.dimagi.com/u/YAW_ANTWI-ADJEI)\
**Post date:** [July 21, 2017, 9:05pm UTC](https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615/3 "2017-07-21T21:05:26Z")

</div>

Hi Clayton,  
Thank you for your support. Please, what other ways can I go about it since  
there could be more. For instance, type of test requested, diagnosis,  
prescription etc.

Yaw

> **···**
>
> On 21 Jul 2017 20:54, "Clayton Sims" wrote:
> 
> > Hi Yaw,
> > 
> > There are a couple of ways to create this interaction.
> > 
> > If there aren't a lot of these properties, the easiest thing to do is  
> > create a sliding window of data ie:
> > 
> > property  
> > property\_prev\_1  
> > property\_prev\_2  
> > ..  
> > property\_prev\_5
> > 
> > and in each form, load the previous property and load it in to the next,  
> > IE:
> > 
> > property\_prev\_1 = #case/property  
> > property\_prev\_2 = #case/property\_prev\_1  
> > ...  
> > etc
> > 
> > -Clayton
> > 
> > On Sun, Jul 9, 2017 at 12:49 PM, YAW ANTWI-ADJEI [yawantwiadjei@gmail.com](mailto:yawantwiadjei@gmail.com) wrote:
> > 
> > > ​Dear All,  
> > > I want to know if it is possible to display the last 5 data stored or  
> > > captured by a case property.
> > > 
> > > For instance, when a client goes to a consulting room, the doctor would  
> > > like to read the content of the Examination property for the last 5 visits.  
> > > Or for the last 5 visits what medicine were prescribed during each visit.
> > > 
> > > Yaw
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "commcare-users" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Clayton\_Sims](https://dimagi.b-cdn.net/user_avatar/forum.dimagi.com/clayton_sims/32/496_2.png) [@Clayton\_Sims](https://forum.dimagi.com/u/Clayton_Sims)\
**Post date:** [July 21, 2017, 9:19pm UTC](https://forum.dimagi.com/t/how-to-make-patients-history-available-in-a-app/3615/4 "2017-07-21T21:19:48Z")

</div>

Hi Yaw,

The most robust way to accomplish this is to create a Child Case for each  
visit where you record these values. That would allow you to review  
historical visits from a patient and view the full record of the encounter.

-Clayton

> **···**
>
> On Fri, Jul 21, 2017 at 5:05 PM, YAW ANTWI-ADJEI wrote:
> 
> > Hi Clayton,  
> > Thank you for your support. Please, what other ways can I go about it  
> > since there could be more. For instance, type of test requested, diagnosis,  
> > prescription etc.
> > 
> > Yaw
> > 
> > On 21 Jul 2017 20:54, "Clayton Sims" [csims@dimagi.com](mailto:csims@dimagi.com) wrote:
> > 
> > > Hi Yaw,
> > > 
> > > There are a couple of ways to create this interaction.
> > > 
> > > If there aren't a lot of these properties, the easiest thing to do is  
> > > create a sliding window of data ie:
> > > 
> > > property  
> > > property\_prev\_1  
> > > property\_prev\_2  
> > > ..  
> > > property\_prev\_5
> > > 
> > > and in each form, load the previous property and load it in to the next,  
> > > IE:
> > > 
> > > property\_prev\_1 = #case/property  
> > > property\_prev\_2 = #case/property\_prev\_1  
> > > ...  
> > > etc
> > > 
> > > -Clayton
> > > 
> > > On Sun, Jul 9, 2017 at 12:49 PM, YAW ANTWI-ADJEI \<[yawantwiadjei@gmail.com](mailto:yawantwiadjei@gmail.com) wrote:
> > > 
> > > > ​Dear All,  
> > > > I want to know if it is possible to display the last 5 data stored or  
> > > > captured by a case property.
> > > > 
> > > > For instance, when a client goes to a consulting room, the doctor would  
> > > > like to read the content of the Examination property for the last 5 visits.  
> > > > Or for the last 5 visits what medicine were prescribed during each visit.
> > > > 
> > > > Yaw
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to the Google  
> > > > Groups "commcare-users" group.  
> > > > To unsubscribe from this group and stop receiving emails from it, send  
> > > > an email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to the Google Groups  
> > > "commcare-users" group.  
> > > To unsubscribe from this group and stop receiving emails from it, send an  
> > > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to the Google Groups  
> > "commcare-users" group.  
> > To unsubscribe from this group and stop receiving emails from it, send an  
> > email to [commcare-users+unsubscribe@googlegroups.com](mailto:commcare-users+unsubscribe@googlegroups.com).  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
