UNPKG

consumerportal

Version:

mydna Custimised for you

49 lines (38 loc) 1.25 kB
/// <reference path="../../includes.ts" /> module resultsProfileCtrl { import IPatientService = services.IPatientService; import IPatientGenoType = services.IPatientGenoType; interface IResultsProfileController{ } interface IResultsProfileScope extends angular.IScope { $sce: angular.ISCEService; } class MedsResultsController implements IResultsProfileController { static $inject = [ '$scope', 'mydnaApis', '$sce', 'patientService' ]; PatientGenoTypes: IPatientGenoType[]; Disclaimer: string; genoLoaded = false; constructor( private $scope: IResultsProfileScope, private mydnaApis: ImyDNAApis, private $sce: angular.ISCEService, private patientService: IPatientService ){ let vm = this; $scope.$sce = $sce; vm.Disclaimer = ''; this.patientService.genotypes().then((values: IPatientGenoType[]) => { this.PatientGenoTypes = values; this.$scope.$emit("disable-on-save-off"); this.Disclaimer = this.mydnaApis.MedsDisclaimer; this.genoLoaded = true; }); } } angular.module('app').controller('medsResultsCtrl', MedsResultsController); }