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.

User

I'll just paste my code here.

Oops... the wiki's markup seems rather inadequate :/

 
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

});