Sha256: b98b0be19860bea553d5b18f8ed24297136b1c1a5e16721cb2ae222eae809a69

Contents?: true

Size: 806 Bytes

Versions: 6

Compression:

Stored size: 806 Bytes

Contents

const mongoose = require('mongoose');
const Concept = require('./Concept.js');

const [mString, Mixed, ObjectId] = [
  mongoose.Schema.Types.String,
  mongoose.Schema.Types.Mixed,
  mongoose.Schema.Types.ObjectId,
];

const ValueSetSchema = mongoose.Schema(
  {
    oid: mString,
    display_name: mString,
    version: mString,
    categories: Mixed,

    concepts: [Concept.ConceptSchema],

    user: { type: ObjectId, ref: 'User', index: true }, // Bonnie-specific
    bundle: { type: ObjectId, ref: 'Bundle' }, // Cypress-specific
    measures: [{ type: ObjectId, ref: 'Measure' }],
  },
  // Options
  {
    timestamps: { createdAt: 'created_at', updatedAt: 'updated_at' },
  }
);

module.exports.ValueSetSchema = ValueSetSchema;
module.exports.ValueSet = mongoose.model('value_set', ValueSetSchema);

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cqm-models-0.7.7 app/assets/javascripts/ValueSet.js
cqm-models-0.7.6 app/assets/javascripts/ValueSet.js
cqm-models-0.7.5 app/assets/javascripts/ValueSet.js
cqm-models-0.7.4 app/assets/javascripts/ValueSet.js
cqm-models-0.7.3 app/assets/javascripts/ValueSet.js
cqm-models-0.7.2 app/assets/javascripts/ValueSet.js