user-settings docs there is sometimes a field called
known. If the field exists, the value is always
true. What is the purpose of this field?
Here’s the documentation on
This file has been truncated.
# Database schema conventions
CouchDB (and PouchDB in the browser) is a JSON-based NoSQL datastore that we use to store our data. While unlike SQL databases there is no enforced schema, code still follows conventions, and this document aims to describe the schema as defined by how our code operates.
In this document "record" means a JSON object that resides in CouchDB or PouchDB.
## General record data structure
|`_id`|CouchDB's unique identifier of the record|all records|
|`_rev`|CouchDB's revision marker|all records|
|`type`|The general type of the document, see below|all user-created* documents|
|`reported_date`|Numerical timestamp of when the document is first created|all user-created documents|
* User-created documents here generally means contactables and reports, but may extend further.
## Contactables (Persons and Places)
Contactables are either places (e.g. clinic), groupings (e.g. family) or people (e.g. a patient or CHW).
known field is used to record if this is the first time the user has logged in. Users are created with
known: false and when they first log in, we show them the tour popup, and then set
known: true so they’re not nagged to take the tour next time.
Is there a way to set
known: true with
medic-conf ... csv-to-docs upload-docs? This would be handy in cases where it is not desired to show the tour, or where users already have seen the tour in a training app. IIRC,
csv-to-docs even creates json docs with the field, but this then gets “lost” during
As far as I can tell
csv-to-docs won’t ignore any fields. You will need to ensure that the field value is
bool:true so it gets parsed as a boolean not a string. Other than that it should work.
If you’re using the
create-users function it will ignore the
Please raise an issue in
medic-conf if this isn’t working as expected!