diff --git a/web/app/dashboards/MedicalDevices.js b/web/app/dashboards/MedicalDevices.js
new file mode 100644
index 00000000..c9c1a14b
--- /dev/null
+++ b/web/app/dashboards/MedicalDevices.js
@@ -0,0 +1,236 @@
+if(!bluewave) var bluewave={};
+if(!bluewave.dashboards) bluewave.dashboards={};
+
+//******************************************************************************
+//** MedicalDevices
+//******************************************************************************
+/**
+ * Panel for displaying medical device groups
+ *
+ ******************************************************************************/
+
+bluewave.dashboards.MedicalDevices = function(parent, config) {
+
+ var me = this;
+ var mainDiv;
+ var dashboardItems = [];
+ var dashboardMenu, groupMenu; //callouts
+ var waitmask;
+ var groupEditor, moveOptions; //windows
+ var windows = [];
+
+
+
+ //**************************************************************************
+ //** Constructor
+ //**************************************************************************
+ var init = function(){
+
+ if (!config.waitmask) config.waitmask = new javaxt.express.WaitMask(document.body);
+ waitmask = config.waitmask;
+
+ var div = document.createElement("div");
+ div.className = "dashboard-homepage";
+ div.style.height = "100%";
+ div.style.textAlign = "center";
+ div.style.overflowY = "auto";
+ parent.appendChild(div);
+ me.el = div;
+
+ var innerDiv = document.createElement("div");
+ innerDiv.style.height = "100%";
+ div.appendChild(innerDiv);
+ mainDiv = innerDiv;
+
+
+ };
+
+
+ //**************************************************************************
+ //** onUpdate
+ //**************************************************************************
+ this.onUpdate = function(){};
+
+
+ //**************************************************************************
+ //** onClick
+ //**************************************************************************
+ this.onClick = function(dashboard){
+
+ console.log(dashboard.data)
+ };
+
+
+ //**************************************************************************
+ //** update
+ //**************************************************************************
+ this.update = function(data){
+ clear();
+ render(data);
+ me.onUpdate();
+ };
+
+
+ //**************************************************************************
+ //** getDashboardItems
+ //**************************************************************************
+ /** Returns all the dashboard items in the view
+ */
+ this.getDashboardItems = function(){
+ return dashboardItems;
+ };
+
+
+ //**************************************************************************
+ //** clear
+ //**************************************************************************
+ var clear = function(){
+ dashboardItems = [];
+ mainDiv.innerHTML = "";
+ };
+
+ //**************************************************************************
+ //** render
+ //**************************************************************************
+ var render = function(data){
+
+ for (group in groupURLs){
+ addGroup(group, mainDiv, data);
+ }
+
+ };
+
+ //**************************************************************************
+ //** addGroup
+ //**************************************************************************
+ var addGroup = function(group, parent, data){
+
+ var rows = d3.csvParse(data);
+
+ var dashboardItem = createDashboardItem(parent, {
+ width: 360,
+ height: 230,
+ title: group,
+ // subtitle: "test",
+ // settings: true
+ });
+
+ dashboardItem.innerDiv.style.cursor = "pointer";
+ dashboardItem.innerDiv.style.textAlign = "center";
+ dashboardItem.el.addEventListener("mouseover", function(event) {
+
+ // console.log("mouseover")
+
+ });
+
+ dashboardItem.innerDiv.onclick = function () {
+ me.onClick(dashboardItem);
+ };
+
+ var icon = document.createElement("img");
+ icon.src = groupURLs[group];
+ icon.style.height = "100%";
+
+ dashboardItem.innerDiv.appendChild(icon);
+ dashboardItem.icon = icon;
+ dashboardItem.data = rows.filter(function(row){
+ var g1 = row.group.toLowerCase();
+ var g2 = group.toLowerCase();
+ var medSpec = row["n.medical_specialty_description"].toLowerCase();
+ if (g1.includes(g2) || g2.includes(g1) || g2 == medSpec) return true;
+
+ return false;
+ })
+
+ dashboardItems.push(dashboardItem)
+
+
+ };
+
+ //**************************************************************************
+ //** createMenuOption
+ //**************************************************************************
+ var createMenuOption = function(label, icon, onClick){
+ var div = document.createElement("div");
+ div.className = "dashboard-homepage-menu-item noselect";
+ if (icon && icon.length>0){
+ div.innerHTML = '' + label;
+ }
+ else{
+ div.innerHTML = label;
+ }
+ div.label = label;
+ div.onclick = function(){
+ onClick.apply(this, [label]);
+ };
+ addShowHide(div);
+ return div;
+ };
+
+
+ //**************************************************************************
+ //** createWindow
+ //**************************************************************************
+ var createWindow = function(config){
+ var win = new javaxt.dhtml.Window(document.body, config);
+ windows.push(win);
+ return win;
+ };
+
+
+ //**************************************************************************
+ //** URLs
+ //**************************************************************************
+
+ // var searchTerms = ["hyperbaric","decontamination","mask", "glove", "gown", "shoe", "swab", "shield", "thermometer", "disinfectant",
+ // "transport", "cap,","pipette", "applicator", "collection", "storage", "concentrator", "nucleic", "ventilator",
+ // "ventilation", "respirator", "vacuum", "dialysis", "prosthesis", "oxygen", "test", "reagent", "first aid"];
+ var groupURLs =
+ {
+ "Gloves": "../../images/medical_icons/ppe_gloves.svg",
+ "Masks": "../../images/medical_icons/ppe_face_mask.svg",
+ "Gowns": "../../images/medical_icons/ppe_gown.svg",
+ "Shields": "../../images/medical_icons/ppe_face_shield.svg",
+ "Shoes": "../../images/medical_icons/foot.svg",
+ "Disinfectant": "../../images/medical_icons/disinfecting_wipes.svg",
+ "Ventilators": "../../images/medical_icons/ventilator.svg",
+ "Respirators": "../../images/medical_icons/respirator.svg",
+ "Tests": "../../images/medical_icons/microscope.svg",
+ "Oxygen": "../../images/medical_icons/oxygen_tank.svg",
+ "First Aid": "../../images/medical_icons/health_alt.svg",
+ "Dental": "../../images/medical_icons/tooth.svg",
+ "Orthopedic": "../../images/medical_icons/orthopaedics.svg", //meh
+ "Radiology": "../../images/medical_icons/radiology.svg",
+ "Microbiology": "../../images/medical_icons/bacteria.svg",
+ "Physical Medicine": "../../images/medical_icons/physical_therapy.svg",
+ "General, Plastic Surgery": "../../images/medical_icons/surgical_sterilization.svg",
+ "Gastroenterology, Urology": "../../images/medical_icons/gastroenterology.svg",
+ "Obstetrics/Gynecology": "../../images/medical_icons/obstetricsmonia.svg",
+ "Ear, Nose, Throat": "../../images/medical_icons/ears_nose_and_throat.svg",
+ "Cardiovascular": "../../images/medical_icons/cardiology.svg",
+ "Clinical Chemistry": "../../images/medical_icons/biochemistry_laboratory.svg",
+ "Ophthalmic": "../../images/medical_icons/opthalmology.svg",
+ "General Hospital": "../../images/medical_icons/hospital.svg",
+ "Pathology": "../../images/medical_icons/virus-research.svg",
+ "Anesthesiology": "../../images/medical_icons/ventilator_alt.svg", //meh
+ "Hematology": "../../images/medical_icons/hematology.svg",
+ "Neurology": "../../images/medical_icons/psychology.svg",
+ "Immunology": "../../images/medical_icons/virus_lab_research_test_tube.svg", //meh
+ "Clinical Toxicology": "../../images/medical_icons/poison.svg",
+ "Medical Genetics": "../../images/medical_icons/dna.svg",
+ "Unknown": "../../images/medical_icons/question_mark.svg",
+ };
+
+
+ //**************************************************************************
+ //** Utils
+ //**************************************************************************
+ var get = bluewave.utils.get;
+ var del = javaxt.dhtml.utils.delete;
+ var post = javaxt.dhtml.utils.post;
+ var createDashboardItem = bluewave.utils.createDashboardItem;
+ var addShowHide = javaxt.dhtml.utils.addShowHide;
+ var warn = bluewave.utils.warn;
+
+ init();
+};
\ No newline at end of file
diff --git a/web/images/medical_icons/bacteria.svg b/web/images/medical_icons/bacteria.svg
new file mode 100644
index 00000000..2ac5284e
--- /dev/null
+++ b/web/images/medical_icons/bacteria.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/biochemistry_laboratory.svg b/web/images/medical_icons/biochemistry_laboratory.svg
new file mode 100644
index 00000000..e091de55
--- /dev/null
+++ b/web/images/medical_icons/biochemistry_laboratory.svg
@@ -0,0 +1,11 @@
+
diff --git a/web/images/medical_icons/cardiology.svg b/web/images/medical_icons/cardiology.svg
new file mode 100644
index 00000000..8146e584
--- /dev/null
+++ b/web/images/medical_icons/cardiology.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/disinfecting_wipes.svg b/web/images/medical_icons/disinfecting_wipes.svg
new file mode 100644
index 00000000..7de922f8
--- /dev/null
+++ b/web/images/medical_icons/disinfecting_wipes.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/dna.svg b/web/images/medical_icons/dna.svg
new file mode 100644
index 00000000..02c35636
--- /dev/null
+++ b/web/images/medical_icons/dna.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/ears_nose_and_throat.svg b/web/images/medical_icons/ears_nose_and_throat.svg
new file mode 100644
index 00000000..19d81513
--- /dev/null
+++ b/web/images/medical_icons/ears_nose_and_throat.svg
@@ -0,0 +1,6 @@
+
diff --git a/web/images/medical_icons/foot.svg b/web/images/medical_icons/foot.svg
new file mode 100644
index 00000000..a497641d
--- /dev/null
+++ b/web/images/medical_icons/foot.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/gastroenterology.svg b/web/images/medical_icons/gastroenterology.svg
new file mode 100644
index 00000000..c8106eba
--- /dev/null
+++ b/web/images/medical_icons/gastroenterology.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/health_alt.svg b/web/images/medical_icons/health_alt.svg
new file mode 100644
index 00000000..15a25bf4
--- /dev/null
+++ b/web/images/medical_icons/health_alt.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/heart.svg b/web/images/medical_icons/heart.svg
new file mode 100644
index 00000000..cd02e39f
--- /dev/null
+++ b/web/images/medical_icons/heart.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/hematology.svg b/web/images/medical_icons/hematology.svg
new file mode 100644
index 00000000..437ee82d
--- /dev/null
+++ b/web/images/medical_icons/hematology.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/hospital.svg b/web/images/medical_icons/hospital.svg
new file mode 100644
index 00000000..03e6a4b0
--- /dev/null
+++ b/web/images/medical_icons/hospital.svg
@@ -0,0 +1,25 @@
+
diff --git a/web/images/medical_icons/malaria_mixed_microscope.svg b/web/images/medical_icons/malaria_mixed_microscope.svg
new file mode 100644
index 00000000..9f4090ed
--- /dev/null
+++ b/web/images/medical_icons/malaria_mixed_microscope.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/medical_records.svg b/web/images/medical_icons/medical_records.svg
new file mode 100644
index 00000000..3186c565
--- /dev/null
+++ b/web/images/medical_icons/medical_records.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/microscope.svg b/web/images/medical_icons/microscope.svg
new file mode 100644
index 00000000..abda442b
--- /dev/null
+++ b/web/images/medical_icons/microscope.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/obstetricsmonia.svg b/web/images/medical_icons/obstetricsmonia.svg
new file mode 100644
index 00000000..932fe849
--- /dev/null
+++ b/web/images/medical_icons/obstetricsmonia.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/opthalmology.svg b/web/images/medical_icons/opthalmology.svg
new file mode 100644
index 00000000..dcc581ba
--- /dev/null
+++ b/web/images/medical_icons/opthalmology.svg
@@ -0,0 +1,6 @@
+
diff --git a/web/images/medical_icons/orthopaedics.svg b/web/images/medical_icons/orthopaedics.svg
new file mode 100644
index 00000000..7572b67f
--- /dev/null
+++ b/web/images/medical_icons/orthopaedics.svg
@@ -0,0 +1,6 @@
+
diff --git a/web/images/medical_icons/oxygen_tank.svg b/web/images/medical_icons/oxygen_tank.svg
new file mode 100644
index 00000000..a030cf02
--- /dev/null
+++ b/web/images/medical_icons/oxygen_tank.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/physical_therapy.svg b/web/images/medical_icons/physical_therapy.svg
new file mode 100644
index 00000000..db2baafd
--- /dev/null
+++ b/web/images/medical_icons/physical_therapy.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/poison.svg b/web/images/medical_icons/poison.svg
new file mode 100644
index 00000000..cf831748
--- /dev/null
+++ b/web/images/medical_icons/poison.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/ppe_face_mask.svg b/web/images/medical_icons/ppe_face_mask.svg
new file mode 100644
index 00000000..8c33a9cc
--- /dev/null
+++ b/web/images/medical_icons/ppe_face_mask.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/ppe_face_shield.svg b/web/images/medical_icons/ppe_face_shield.svg
new file mode 100644
index 00000000..3641db1c
--- /dev/null
+++ b/web/images/medical_icons/ppe_face_shield.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/ppe_gloves.svg b/web/images/medical_icons/ppe_gloves.svg
new file mode 100644
index 00000000..525f3d65
--- /dev/null
+++ b/web/images/medical_icons/ppe_gloves.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/ppe_gown.svg b/web/images/medical_icons/ppe_gown.svg
new file mode 100644
index 00000000..6c8dad48
--- /dev/null
+++ b/web/images/medical_icons/ppe_gown.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/psychology.svg b/web/images/medical_icons/psychology.svg
new file mode 100644
index 00000000..95fd0790
--- /dev/null
+++ b/web/images/medical_icons/psychology.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/question_mark.svg b/web/images/medical_icons/question_mark.svg
new file mode 100644
index 00000000..ea8d2e50
--- /dev/null
+++ b/web/images/medical_icons/question_mark.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/radiology.svg b/web/images/medical_icons/radiology.svg
new file mode 100644
index 00000000..7ba3d14a
--- /dev/null
+++ b/web/images/medical_icons/radiology.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/respirator.svg b/web/images/medical_icons/respirator.svg
new file mode 100644
index 00000000..2e893bd5
--- /dev/null
+++ b/web/images/medical_icons/respirator.svg
@@ -0,0 +1,9 @@
+
diff --git a/web/images/medical_icons/surgical_sterilization.svg b/web/images/medical_icons/surgical_sterilization.svg
new file mode 100644
index 00000000..d8793969
--- /dev/null
+++ b/web/images/medical_icons/surgical_sterilization.svg
@@ -0,0 +1,4 @@
+
diff --git a/web/images/medical_icons/syringe.svg b/web/images/medical_icons/syringe.svg
new file mode 100644
index 00000000..43dc88ca
--- /dev/null
+++ b/web/images/medical_icons/syringe.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/thermometer_digital.svg b/web/images/medical_icons/thermometer_digital.svg
new file mode 100644
index 00000000..5b455d04
--- /dev/null
+++ b/web/images/medical_icons/thermometer_digital.svg
@@ -0,0 +1,5 @@
+
diff --git a/web/images/medical_icons/tooth.svg b/web/images/medical_icons/tooth.svg
new file mode 100644
index 00000000..00793f49
--- /dev/null
+++ b/web/images/medical_icons/tooth.svg
@@ -0,0 +1,3 @@
+
diff --git a/web/images/medical_icons/ventilator.svg b/web/images/medical_icons/ventilator.svg
new file mode 100644
index 00000000..7734d051
--- /dev/null
+++ b/web/images/medical_icons/ventilator.svg
@@ -0,0 +1,8 @@
+
diff --git a/web/images/medical_icons/ventilator_alt.svg b/web/images/medical_icons/ventilator_alt.svg
new file mode 100644
index 00000000..89954310
--- /dev/null
+++ b/web/images/medical_icons/ventilator_alt.svg
@@ -0,0 +1,6 @@
+
diff --git a/web/images/medical_icons/virus-research.svg b/web/images/medical_icons/virus-research.svg
new file mode 100644
index 00000000..dc377791
--- /dev/null
+++ b/web/images/medical_icons/virus-research.svg
@@ -0,0 +1,17 @@
+
diff --git a/web/images/medical_icons/virus_lab_research_test_tube.svg b/web/images/medical_icons/virus_lab_research_test_tube.svg
new file mode 100644
index 00000000..f0393bcb
--- /dev/null
+++ b/web/images/medical_icons/virus_lab_research_test_tube.svg
@@ -0,0 +1,5 @@
+