# How to differentiate between custom fields in documents and fields used by the CHT

**URL:** <https://forum.communityhealthtoolkit.org/t/how-to-differentiate-between-custom-fields-in-documents-and-fields-used-by-the-cht/4547>\
**Category:** Development\
**Created:** [January 8, 2025, 7:15pm UTC](https://forum.communityhealthtoolkit.org/t/how-to-differentiate-between-custom-fields-in-documents-and-fields-used-by-the-cht/4547 "2025-01-08T19:15:56Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![jkuester](https://communityhealthtoolkit.b-cdn.net/user_avatar/forum.communityhealthtoolkit.org/jkuester/32/806_2.png) [@jkuester](https://forum.communityhealthtoolkit.org/u/jkuester)\
**Post date:** [January 8, 2025, 7:15pm UTC](https://forum.communityhealthtoolkit.org/t/how-to-differentiate-between-custom-fields-in-documents-and-fields-used-by-the-cht/4547/1 "2025-01-08T19:15:56Z")

</div>

Couch stores JSON docs without any schema. The CHT allows for writing custom fields for reports/contacts via the open-ended form configuration.

At the same time, the CHT system relies on a certain amount of expected structure to exist on this docs (e.g. `type`, `name`, `date_of_birth`, etc.). The question that has come up (in the context of a [separate discussion](https://github.com/medic/cht-core/issues/9601)) is how devs (both ones working on cht-core and devs making app configurations) are supposed to know what these special fields are (without memorizing the entire docs site).

AFIK we don’t have a list of “reserved fields” documented anywhere. Even if we did, as a core developer, how could I go about _adding_ fields to that list without worrying about collisions with existing custom fields?

In the above-linked issue thread, we have been discussing the possibility of some kind of standard prefix for fields like this. So instead of `is_canonical`, we would call the field something like `cht_is_canonical` or `_is_canonical`. Some kind of prefix indicator for the field names seems useful because:

- App developers can know not to use the prefix for any custom fields when writing form configuration.
- Core developers can know that fields with that prefix should be safe from collisions with custom fields.

Throwing this thread out here to see if anyone has more thoughts/ideas/opinions on how to handle this! Thanks!

---

_[View the full topic](https://forum.communityhealthtoolkit.org/t/how-to-differentiate-between-custom-fields-in-documents-and-fields-used-by-the-cht/4547)._
