WIP reorganization
This commit is contained in:
1 parent
6706dfe634
commit
054e37dfb7
266 files changed
+98
-620
No files matched your search
@@ -0,0 +1,87 @@
|
||||
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
||||
|
||||
const LocationSchema = new SimpleSchema({
|
||||
id: {
|
||||
type: String,
|
||||
label: 'Location ID'
|
||||
},
|
||||
location: {
|
||||
type: String,
|
||||
label: 'Location Name'
|
||||
},
|
||||
selected: {
|
||||
type: Boolean,
|
||||
label: 'Selected',
|
||||
defaultValue: false
|
||||
},
|
||||
isNodal: {
|
||||
type: Boolean,
|
||||
label: 'Nodal Location',
|
||||
defaultValue: false
|
||||
}
|
||||
});
|
||||
|
||||
LesionLocations = new Meteor.Collection(null);
|
||||
LesionLocations.attachSchema(LocationSchema);
|
||||
LesionLocations._debugName = 'LesionLocations';
|
||||
|
||||
var organGroups = [
|
||||
'Abdominal/Chest Wall',
|
||||
'Adrenal',
|
||||
'Bladder',
|
||||
'Bone',
|
||||
'Brain',
|
||||
'Breast',
|
||||
'Colon',
|
||||
'Esophagus',
|
||||
'Extremities',
|
||||
'Gallbladder',
|
||||
'Kidney',
|
||||
'Liver',
|
||||
'Lung',
|
||||
'Lymph Node',
|
||||
'Mediastinum/Hilum',
|
||||
'Muscle',
|
||||
'Neck',
|
||||
'Other: Soft Tissue',
|
||||
'Ovary',
|
||||
'Pancreas',
|
||||
'Pelvis',
|
||||
'Peritoneum/Omentum',
|
||||
'Prostate',
|
||||
'Retroperitoneum',
|
||||
'Small Bowel',
|
||||
'Spleen',
|
||||
'Stomach',
|
||||
'Subcutaneous'];
|
||||
|
||||
function nameToID(name) {
|
||||
// http://stackoverflow.com/questions/29258016/remove-special-symbols-and-extra-spaces-and-make-it-camel-case-javascript
|
||||
return name
|
||||
.trim() //might need polyfill if you need to support older browsers
|
||||
.toLowerCase() //lower case everything
|
||||
.replace(/([^A-Z0-9]+)(.)/ig, //match multiple non-letter/numbers followed by any character
|
||||
function(match) {
|
||||
return arguments[2].toUpperCase(); //3rd index is the character we need to transform uppercase
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
organGroups.forEach(function(organGroup) {
|
||||
const id = nameToID(organGroup);
|
||||
|
||||
// Check if the name has 'node' in it, if so, it is nodal
|
||||
let isNodal = false;
|
||||
if (id.toLowerCase().indexOf('node') > -1) {
|
||||
isNodal = true;
|
||||
}
|
||||
|
||||
LesionLocations.insert({
|
||||
id: id,
|
||||
location: organGroup,
|
||||
selected: false,
|
||||
isNodal: isNodal
|
||||
});
|
||||
});
|
||||
|
||||
export { LesionLocations };
|
||||
@@ -0,0 +1,56 @@
|
||||
import { SimpleSchema } from 'meteor/aldeed:simple-schema';
|
||||
|
||||
const ResponseSchema = new SimpleSchema({
|
||||
text: {
|
||||
type: String,
|
||||
label: 'Text'
|
||||
},
|
||||
code: {
|
||||
type: String,
|
||||
label: 'Code'
|
||||
},
|
||||
selected: {
|
||||
type: Boolean,
|
||||
label: 'Selected',
|
||||
defaultValue: false
|
||||
}
|
||||
});
|
||||
|
||||
LocationResponses = new Meteor.Collection(null);
|
||||
LocationResponses.attachSchema(ResponseSchema);
|
||||
LocationResponses._debugName = 'LocationResponses';
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Complete response',
|
||||
code: 'CR'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Progressive disease',
|
||||
code: 'PD'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Stable disease',
|
||||
code: 'SD'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Present',
|
||||
code: 'Present'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Not Evaluable',
|
||||
code: 'NE'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Non-CR/Non-PD',
|
||||
code: 'NN'
|
||||
});
|
||||
|
||||
LocationResponses.insert({
|
||||
text: 'Excluded from Assessment',
|
||||
code: 'EX'
|
||||
});
|
||||
@@ -0,0 +1,2 @@
|
||||
import './LesionLocations.js';
|
||||
import './LocationResponses.js';
|
||||
Reference in new issue
Block a user