Widget:SandboxNew: Difference between revisions

Jump to navigation Jump to search
Matt Pijoan (talk | contribs)
No edit summary
Matt Pijoan (talk | contribs)
No edit summary
Line 159: Line 159:


function questionCount(exam, main, sub) {
function questionCount(exam, main, sub) {
var queryString = "[[ ExamType :: " + exam + " ]] [[ MainCategory :: ";
var queryString = "[[ExamType::" + exam + "]][[MainCategory::";
for (var j = 0; j < main.length; j++) {
for (var j = 0; j < main.length; j++) {
queryString += main[j];
queryString += main[j];
if (j != main.length - 1) {
if (j != main.length - 1) {
queryString += " &#124;&#124; ";
queryString += "&#124;&#124;";
}
}
}
}
queryString += " ]] [[ SubCategory :: ";
queryString += "]][[SubCategory::";
for (var i = 0; i < sub.length; i++) {
for (var i = 0; i < sub.length; i++) {
queryString += sub[i];
queryString += sub[i];
if (i != sub.length - 1) {
if (i != sub.length - 1) {
queryString += " &#124;&#124; ";
queryString += "&#124;&#124;";
}
}
}
}
queryString += " ]]";
queryString += "]]";
var api = new mw.Api();
var api = new mw.Api();
api.get({
api.get({
Line 242: Line 242:
} else if (exam === "USMLE Step 2 CK") {
} else if (exam === "USMLE Step 2 CK") {
categories['main'] = new Array("Internal medicine", "Surgery", "OB/GYN", "Pediatrics", "Psychiatry");
categories['main'] = new Array("Internal medicine", "Surgery", "OB/GYN", "Pediatrics", "Psychiatry");
categories['sub'] = new Array("Allergy/Immunology", "Cardiovascular", "Dermatology", "Endocrine", "Gastrointestinal", "Hepatology", "Genitourinary", "Head and Neck", "Hematology", "Infectious Disease", "Musculoskeletal/Rheumatology", "Neurology", "Obstetrics and Gynecology", "Oncology", "Ophthalmology", "Pediatrics", "Poisoning", "Preventive Medicine", "Psychiatry", "Respiratory", "Surgery", "Biostatistics/ Epidemiology", "Ethics", "Electrolytes", "Genetics", "Miscellaneous");
categories['sub'] = new Array("Allergy/Immunology", "Cardiovascular", "Dermatology", "Endocrine", "Gastrointestinal", "Hepatology", "Genitourinary", "Head and Neck", "Hematology", "Infectious Disease", "Musculoskeletal/Rheumatology", "Neurology", "Obstetrics and Gynecology", "Oncology", "Ophthalmology", "Pediatrics", "Poisoning", "Preventive Medicine", "Psychiatry", "Respiratory", "Surgery", "Biostatistics/Epidemiology", "Ethics", "Electrolytes", "Genetics", "Miscellaneous");
} else if (exam === "USMLE Step 3") {
} else if (exam === "USMLE Step 3") {
categories['main'] = new Array("Community Medical Health Center", "Primary Care Office", "Inpatient Facilities", "Emergency Room");
categories['main'] = new Array("Community Medical Health Center", "Primary Care Office", "Inpatient Facilities", "Emergency Room");

Revision as of 14:57, 19 June 2013