From 57fb3d854d9cec37a6a959ad9dbab9159cb4c2f8 Mon Sep 17 00:00:00 2001 From: Sabbir Siddiqui Date: Mon, 22 Jun 2015 00:21:21 -0400 Subject: [PATCH] format numbers for patient results --- .../javascripts/views/query_view.js.coffee | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/views/query_view.js.coffee b/app/assets/javascripts/views/query_view.js.coffee index 4d8899306..62634dbb2 100644 --- a/app/assets/javascripts/views/query_view.js.coffee +++ b/app/assets/javascripts/views/query_view.js.coffee @@ -11,8 +11,8 @@ class QueryHeadingView extends Thorax.View @popChart = PopHealth.viz.populationChart().width(125).height(25).maximumValue(PopHealth.patientCount) shouldDisplayPercentageVisual: -> !@model.isContinuous() and PopHealth.currentUser.shouldDisplayPercentageVisual() resultValue: -> if @model.isContinuous() then @model.observation() else @model.performanceRate() - fractionTop: -> if @model.isContinuous() then @model.measurePopulation() else @model.numerator() - fractionBottom: -> if @model.isContinuous() then @model.ipp() else @model.performanceDenominator() + fractionTop: -> if @model.isContinuous() then @model.measurePopulation() else PopHealth.Helpers.formatNumber(@model.numerator()) + fractionBottom: -> if @model.isContinuous() then @model.ipp() else PopHealth.Helpers.formatNumber(@model.performanceDenominator()) episodeOfCare: -> @model.parent.get('episode_of_care') unit: -> if @model.isContinuous() and @model.parent.get('cms_id') isnt 'CMS179v2' then 'min' else '%' @@ -32,16 +32,16 @@ class QueryButtonsView extends Thorax.View initialize: -> @currentPopulation ?= 'IPP' ipp: -> @model.ipp() - numerator: -> @model.numerator() - denominator: -> @model.denominator() + numerator: -> PopHealth.Helpers.formatNumber(@model.numerator()) + denominator: -> PopHealth.Helpers.formatNumber(@model.denominator()) hasExceptions: -> @model.hasExceptions() - exceptions: -> @model.exceptions() + exceptions: -> PopHealth.Helpers.formatNumber(@model.exceptions()) hasExclusions: -> @model.hasExclusions() - exclusions: -> @model.exclusions() + exclusions: -> PopHealth.Helpers.formatNumber(@model.exclusions()) hasOutliers: -> @model.hasOutliers() - outliers: -> @model.outliers() + outliers: -> PopHealth.Helpers.formatNumber(@model.outliers()) performanceRate: -> @model.performanceRate() - performanceDenominator: -> @model.performanceDenominator() + performanceDenominator: -> PopHealth.Helpers.formatNumber(@model.performanceDenominator()) ippIsActive: -> @isActive and @currentPopulation is 'IPP' numeratorIsActive: -> @isActive and @currentPopulation is 'NUMER'