var mongoose = require('mongoose');

var GoalSchema = new mongoose.Schema({
    identifier: [{
        use: String,
        label: String,
        system: String,
        value: String
    }],
    subject: {
    },
    startDate: Date,
    startCodeableConcept: {
        coding: [{
            system: String,
            code: String,
            display: String
        }]
    },
    targetDate: Date,
    targetDuration: {
    },
    category: [{
        coding: [{
            system: String,
            code: String,
            display: String
        }]
    }],
    description: String,
    status: String,
    statusDate: Date,
    statusReason: {
        coding: [{
            system: String,
            code: String,
            display: String
        }]
    },
    author: {
    },
    priority: {
        coding: [{
            system: String,
            code: String,
            display: String
        }]
    },
    addresses: [{
    }],
    note: [{
    }],
    outcome: [{
        resultCodeableConcept: {
            coding: [{
                system: String,
                code: String,
                display: String
            }]
        },
        resultReference: {
        }
    }]
});

mongoose.model('Goal', GoalSchema);
