// Task: PROF-53 | VIP-19, croja022 (add patent feature)
// Initial file creation with initial implementation.
// Task: PROF-33 | VIP-19, jesco088 (view success stories)
//	Added Initial full implementation.
(function () {
    'use strict';

    angular
        .module('patent')
        .controller('patentSuccessStoriesController', patentSuccessStoriesController);
        patentSuccessStoriesController.$inject = ['DTOptionsBuilder', 'DTColumnBuilder','$sce', '$location', '$state', '$scope', '$stateParams', 'User', '$window'];

        function patentSuccessStoriesController(DTOptionsBuilder, DTColumnBuilder, $sce, $location, $state, $scope, $stateParams, User, $window) {
            var vm = this;
            vm.done = false;
            vm.title = "Success Stories of Patents in FIU"
            vm.stories = [
                {
                    header: "Dr. Shuliang Jiao Granted Patent for Device Assisting Visually Impaired Patients",
                    faculty: "Faculty Achievement, News, Patents",
                    image: "https://bme.fiu.edu/wp-content/uploads/2018/04/Screen-Shot-2018-04-30-at-10.32.54-AM.png",
                    story: "On April 24, 2018, Dr. Shuliang Jiao was granted a new patent. Patent #US9952434B2 is a device for assisting visually impaired patients.",
                    summary :"The invention pertains to devices and methods that allow a subject having a diseased retina to see a more complete image of the subject’s field-of-view. The invention provides a device compromising one or more windows comprising a plurality of optical components that redirect the light transmitting through the regions of the windows corresponding to the non-functional areas of the retina onto the functional areas of the retina in a manner such that the subject perceives a more complete field-of-view through the functional areas of the retina. The invention also provides a device comprising one or more cameras, a microprocessor, and one or more display screens, wherein the microprocessor, and one or more display screens, wherein the microprocessor comprises an algorithm programmed to remove portions of the image corresponding to non-functional areas of the subject’s retina and compressing the portions so removed into the areas of the image corresponding to the functional areas of the subject’s retina."
                },
                {
                    header: "Dr. Ranu Jung Granted New Patent for Technology Promoting Adaptive Pacing of the Diaphragm",
                    faculty: "Faculty Achievement, News, Patents, Women in BME",
                    image: "https://bme.fiu.edu/wp-content/uploads/2018/02/Screen-Shot-2018-02-09-at-9.41.34-AM.png",
                    story: "On January 23, 2018, Dr. Ranu Jung, BME Chair, was granted a new patent for technology that promotes adaptive pacing of the diaphragm. Patent #US9872989, titled “System and Method for Neuromorphic Controlled Adaptive Pacing of Respiratory Muscles and Nerves”, has been an ongoing project of Dr. Jung’s for several years.",
                    summary: "Adaptive systems and methods for automatically determining and continuously updating stimulation parameters for adjusting ventilation to accommodate a patient’s specific physiology, metabolic needs, and muscle state are disclosed herein. Having a closed loop implementation, the system may comprise a controller including a neuromorphic controlled adaptive feed-forward Pattern Generator/Pattern Shaper (PG/PS) assembly, which controls respiratory muscle movement using electrical stimulation. This PG/PS assembly comprises a biomimetic design where the pattern generator includes a neural network mimicking the simplified connectivity pattern of respiratory related neurons in the brain stem to produce a rhythmic breathing pattern frequency and the pattern shaper includes a neural network mimicking the simplified connectivity pattern of neurons to produce a stimulus control signal. This biomimetic design for the controller automatically customizes and continually updates stimulation parameters to achieve a desired breathing pattern and, thereby, slow the development of muscle fatigue."
                },
                {
                    header: "Ranu Jung receives two U.S. patents",
                    faculty: "Faculty Achievement, News, Patents",
                    image: "https://bme.fiu.edu/wp-content/uploads/2016/09/Dean-Ranu-Jung-brown-background-400x600.jpg",
                    story: "August 30, 2016 – Ranu Jung, interim dean of FIU’s College of Engineering and Computing, and colleagues were granted two U.S. patents this month for newly-developed neurotechnology. One patent is for a modular multi-channel inline connector system for connecting implanted electrodes within parts of the human body with an externally located device, or one already implanted within the body, and the other is for technology that enables efficient handling of multiple leads in a multi-electrode system.",
                    summary : "Neurotechnology is a rapidly growing segment of the medical device market. This technology refers to devices that connect electronics to the nervous system in the body in order to monitor neural activity or to stimulate neurons on demand. Some notable neuro-stimulation systems include cochlear implants for hearing restoration, deep brain stimulation systems to treat Parkinson’s disease, spinal cord stimulation systems to treat chronic pain, and gastric pacemakers to treat gastroparesis among others. Most often, the neurostimulators have a single lead that targets a single stimulation site. Sometimes, the lead has multiple electrodes arranged linearly at fixed distances from each other. This precludes stimulating multiple nerve sites distributed over a larger area. Sometimes, the implanted lead is routed across the skin to connect to an external stimulator in order to test the efficacy of the system before the stimulator is implanted."
                },
                {
                    header: "Dr. Jorge Riera-Diaz receives U.S. patent for electroencephalogram electrode unit for small animals and measurement system",
                    faculty: "News, Patents",
                    image: "https://bme.fiu.edu/wp-content/uploads/2013/08/riera.jpg",
                    story: "January 7, 2016- Department of Biomedical Engineering Associate Professor, Jorge Riera-Diaz, was granted a U.S. patent for the development of an electroencephalogram electrode unit for small animals and measurement system. The device, known as “The Riera High-Density Non-Invasive EEG Mini-Cap,” is capable of performing electroencephalogram measurement, fMRI, and other forms of measurement simultaneously. Unlike other devices, this new technology provides researchers for the first time the needed flexibility for studying brain functions in small animals. The measurement system allows researchers to detect as many EEG signals as possible from the limited brain surface space of small animals.",
                    summary : "In addition to its application for general neuroscience research, the electrode unit also has the ability to be used to measure the impacts of certain drugs and their impact on brain function. The patent states that the device can be used as an “innovative drug evaluation system not only in basic research field of brain neuroscience but also in the pharmaceutical industry.” With a wide variety of potential applications, Dr. Riera’s device has the potential to make significant change in the way neuroscience research is conducted. Riera’s technology is available for sale through Cortech Solutions, a company that sells research tools for advanced brain research to neuroscientists."
                },

            ]
            vm.done = true;
            vm.search = search;
            
            function search() {
 
                var name = document.getElementById("searchForm").elements["searchItem"].value;
                var pattern = name.toLowerCase();
                var targetId = "";
              
                var divs = document.getElementsByClassName("col-md-2");
                for (var i = 0; i < divs.length; i++) {
                   var para = divs[i].getElementsByTagName("p");
                   var index = para[0].innerText.toLowerCase().indexOf(pattern);
                   if (index != -1) {
                      targetId = divs[i].parentNode.id;
                      document.getElementById(targetId).scrollIntoView();
                      break;
                   }
                
                    }
                }
            }
            
    })();