function(doc) {
    if (doc.type === "SonositeUpload") {
        emit([doc.domain, doc.case_id], doc._id);
    }
}

function(doc) {
    if (doc.type === "SonositeUpload" || doc.type === "VscanUpload") {
        emit([doc.domain, doc.type, doc.case_id], doc._id);
    }
}

Add vscan uploads to the couch view
Add vscan uploads to the couch view
