Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Abstract

This page mainly covers the design of the new data models of the Dashboard under Mongoose. This new model should provide a more extendable data storage for the OpenMRS ID.

The goals for this data model is in-line with the Dashboard, that is to provide a one-site service.

For now they're only the most basic one that could cover the old data.

Will Be Updated

User

I'll just paste my code here.

Code Block
languagejs
linenumberstrue
var userSchema = new Schema({
  username: String, // unique username

  firstName: String,
  lastName: String,
  displayName: String, // firstName + ' ' + lastName by default

  primaryEmail: String, // Used for notifications
  displayEmail: String, // Used for displaying
  emailList: [String], // All the users' Emails

  password: String,  //hashed password
});