Treatment Function Timeline

by adamtsiopani

HTML

<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>

<h2>
  Pathway Activity Across Treatment Functions
</h2>
<div id="chart_div"></div>
<div id="table_div"></div>

JavaScript

google.charts.load('current', {
        'packages': ['timeline', 'table']
      });
      google.charts.setOnLoadCallback(drawChart);

      function drawChart() {
        var data = new google.visualization.DataTable();
        data.addColumn('string', 'Treatment Function');
        data.addColumn('string', 'Activity Type');
        data.addColumn('string', 'Lead Clinician');
        data.addColumn('date', 'Start Date');
        data.addColumn('date', 'End Date');

        data.addRows([
          ['Dermatology', 'OP Appt', 'John Smith', new Date(2016, 3, 4), new Date(2016, 3, 5)],
          ['ENT', 'Referral', 'Jane Does', new Date(2016, 3, 15), new Date(2016, 3, 16)],
          ['ENT', 'OP Appt',  'Jane Does', new Date(2016, 5, 15), new Date(2016, 5, 16)],
          ['ENT', '30  First Treatment',  'Jane Does', new Date(2016, 5, 15), new Date(2016, 5, 16)],
          ['Dermatology', 'IP Wait List', 'John Smith', new Date(2016, 3, 4), new Date(2016, 5, 25)],
          ['Dermatology', 'OP Appt',  'Jane Does', new Date(2016, 5, 24), new Date(2016, 5, 25)],
          ['Ophthalmology', 'Referral', 'John Smith', new Date(2016, 1, 4), new Date(2016, 1, 5)],
          ['General Medicine', 'Referral', 'John Smith', new Date(2016, 7, 17), new Date(2016, 7, 18)],
          ['Ophthalmology', 'OP Appt',  'Jane Does', new Date(2016, 2, 3), new Date(2016, 2, 4)],
          ['Ophthalmology', '30  First Treatment','John Smith',  new Date(2016, 2, 3), new Date(2016, 2, 4)],
          ['Ophthalmology', 'IP Wait List', 'John Smith', new Date(2016, 2, 3), new Date(2016, 5, 4)],
          ['Ophthalmology', 'IP Appt',  'Jane Does',  new Date(2016, 5, 4), new Date(2016, 5, 8)],
          ['Ophthalmology', 'OP Appt', 'John Smith', new Date(2016, 6, 4), new Date(2016, 6, 5)],
          ['Ophthalmology', 'Discharge',  'Jane Does', new Date(2016, 6, 4), new Date(2016, 6, 5)]
        ]);

        var options = {
          height: 450,
          timeline: {
            groupByRowLabel:...