# Question about Person Data Model

**URL:** <https://talk.openmrs.org/t/question-about-person-data-model/28589>\
**Category:** Development\
**Created:** [May 20, 2020, 5:23pm UTC](https://talk.openmrs.org/t/question-about-person-data-model/28589 "2020-05-20T17:23:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ibacher](https://talk.openmrs.org/user_avatar/talk.openmrs.org/ibacher/32/19751_2.png) [@ibacher](https://talk.openmrs.org/u/ibacher)\
**Post date:** [May 20, 2020, 5:23pm UTC](https://talk.openmrs.org/t/question-about-person-data-model/28589/1 "2020-05-20T17:23:09Z")

</div>

The Person class has what seems to be duplicative data fields. In addition to the standard creator, changer, and voider information it also collects person-specific versions of those, e.g., `personCreator,` `personDateCreated`, `personVoidedBy`.

There is [a comment in the copy constructor](https://github.com/openmrs/openmrs-core/blob/5602113b072ae1a87a1b40a9b830cfa1821a10a2/api/src/main/java/org/openmrs/Person.java#L144) for Person which seems to indicate some differentiation between a copy of the Person object (that might be shared by a Patient and User etc.) and an instance of the Person object. My best guess is that this functionality exists to allow the creation of a non-voided Patient from a voided Person using the [appropriate constructor](https://github.com/openmrs/openmrs-core/blob/5602113b072ae1a87a1b40a9b830cfa1821a10a2/api/src/main/java/org/openmrs/Patient.java#L63).

I was wondering if we need to maintain these fields to support any actual functionality or is it safe to deprecate them?

---

<div class="post-metadata">

**Author:** ![wyclif](https://talk.openmrs.org/user_avatar/talk.openmrs.org/wyclif/32/19607_2.png) [@wyclif](https://talk.openmrs.org/u/wyclif)\
**Post date:** [May 22, 2020, 6:51am UTC](https://talk.openmrs.org/t/question-about-person-data-model/28589/2 "2020-05-22T06:51:15Z")

</div>

Personally, I have hated the fact that Patient extends Person, if you can void a patient but the associated Person record remains non voided then this goes against the inheritance principle. We should be using composition instead i.e. Person should be a field on Patient in order for a Patient record to have a different lifecycle from its associated Person record, this would be a non backwards compatible change that would potentially break some existing client code.

---

<div class="post-metadata">

**Author:** ![burke](https://talk.openmrs.org/user_avatar/talk.openmrs.org/burke/32/17_2.png) [@burke](https://talk.openmrs.org/u/burke)\
**Post date:** [May 24, 2020, 7:38pm UTC](https://talk.openmrs.org/t/question-about-person-data-model/28589/3 "2020-05-24T19:38:06Z")

</div>

Anything that helps us evolve away from assuming a 1:1 relationship between patient & person sounds good to me. In other words, we should take advantage of any chance to refactor existing code that assumes a 1:1 extension of patient to person.

While it’s fine to have a single patient registration per person, it’s far more flexible to consider a “patient” as representing a person within a medical chart, where a person might have more than one chart by accident (duplicate records) or on purpose (multi-tenancy).
