import {Component,OnInit, ElementRef, NgZone, ViewChild} from '@angular/core';
import { trigger, transition, animate, style } from '@angular/animations';

@Component({
  selector: 'app-screenings',
  templateUrl: './screenings.page.html',
  styleUrls: ['./screenings.page.scss'],
})
export class ScreeningsPage implements OnInit {
  shownGroup = null;
  scoliosis_screenings_data:any
  vision_screenings_data:any

  constructor() {
    this.shownGroup = 0;
    this.get_screeningsData();
   }

  ngOnInit() {
  }
  isGroupShown(group) {
    return this.shownGroup === group;
    }
    toggleGroup(group) {
      if (this.isGroupShown(group)) {
      this.shownGroup = null;
      } else {
      this.shownGroup = group;
      }
      }
      get_screeningsData()
      {
         var scoliosis_screenings= {
          
            data :[
            {
            "student_number":"33393",
            "date":"12/06/2019",
            "outcome":"Doctor Intervention Required"
            },
            {
            "student_number":"33393",
            "date":"05/21/2019",
            "outcome":"Doctor Intervention Required"
            
            }
            ]};
            this.scoliosis_screenings_data= scoliosis_screenings.data;
            var vision_screenings =
              {
                "data":[
                {
                "student_number":"33393",
                "vison":"Yes",
                "left_eye_result":"pass",
                "right_eye_result":"No",
                "outcome":"Spectacled Needed"
                
                },
                {
                "student_number":"33393",
                "vison":"No",
                "left_eye_result":"pass",
                "right_eye_result":"pass",
                "outcome":"No Concerns"
                
                },
                ]
                
                
            };
            this.vision_screenings_data = vision_screenings.data;
         
      }
}
