Skip to content
This repository has been archived by the owner on Jun 28, 2024. It is now read-only.

Commit

Permalink
MAT-2214 Sort Bonnie Dropdown's Alphabetically (#1765)
Browse files Browse the repository at this point in the history
* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically

* MAT-2214 Sort Bonnie Dropdown's Alphabetically
  • Loading branch information
Serhii Ilin authored Feb 9, 2021
1 parent 5850893 commit cf08a91
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@

@getAttributes: (dataElement) ->
resourceType = dataElement.fhir_resource?.resourceType
attributes = @DATA_ELEMENT_ATTRIBUTES[resourceType]
attributes = @DATA_ELEMENT_ATTRIBUTES[resourceType]?.sort( (a, b) -> a.path.localeCompare(b.path) )
return attributes || []

@getAttribute: (dataElement, path) ->
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/models/measure.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class Thorax.Models.Measure extends Thorax.Model

# TODO: migrate to thoraxMeasure.cqmValueSets = thoraxMeasure.cqmMeasure.value_sets
if attrs.value_sets?
thoraxMeasure.cqmValueSets = attrs.value_sets
thoraxMeasure.cqmValueSets = attrs.value_sets?.sort( (a, b) -> a.name?.localeCompare(b.name) )
else
thoraxMeasure.cqmValueSets = []

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ class Thorax.Views.DataCriteriaAttributeEditorView extends Thorax.Views.BonnieVi
@attributeList.push(
name: attr.path
title: attr.title
types: attr.types
types: attr.types?.sort()
valueSets: attr.valueSets?()
referenceTypes: attr.referenceTypes
referenceTypes: attr.referenceTypes?.sort()
)
# TODO FHIR attributes
# @dataElement.schema.eachPath (path, info) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,11 @@ class Thorax.Views.InputCodeView extends Thorax.Views.BonnieView

# Helper that builds up the custom code system dropdown based on all code systems in the measure.
_populateCustomCodeSystemDropdown: ->
@allCodeSystems = [{system: '', name: 'Custom'}]
@allCodeSystems = []
for system, name of @codeSystems
@allCodeSystems.push {system: system, name: name}
@allCodeSystems.sort( (a, b) -> a.name?.localeCompare(b.name) )
@allCodeSystems.splice(0, 0, {system: '', name: 'Custom'})

# wipeout code system selection and replace options
codeSystemSelect = @$('select[name="custom_codesystem_select"]').empty()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,11 @@ class Thorax.Views.InputCodingView extends Thorax.Views.BonnieView

# Helper that builds up the custom code system dropdown based on all code systems in the measure.
_populateCustomCodeSystemDropdown: ->
@allCodeSystems = [{system: '', name: 'Custom'}]
@allCodeSystems = []
for system, name of @codeSystems
@allCodeSystems.push {system: system, name: name}
@allCodeSystems.sort( (a, b) -> a.name?.localeCompare(b.name) )
@allCodeSystems.splice(0, 0, {system: '', name: 'Custom'})

# wipeout code system selection and replace options
codeSystemSelect = @$('select[name="custom_codesystem_select"]').empty()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
describe 'PatientBuilderView', ->

beforeEach (done) ->
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;
jasmine.DEFAULT_TIMEOUT_INTERVAL = 20000;
jasmine.getJSONFixtures().clearCache()
@measure = loadFhirMeasure 'fhir_measure_data/CMS104_eoc.json'
@patients = new Thorax.Collections.Patients [getJSONFixture('fhir_patients/CMS104_eoc/mickey_mouse.json')], parse: true
Expand Down
4 changes: 2 additions & 2 deletions spec/teaspoon_env.rb
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
class Selenium::WebDriver::Remote::Http::Default
def initialize(open_timeout: nil, read_timeout: nil)
@open_timeout = open_timeout
@read_timeout = 360
@read_timeout = 500
end
end

Expand Down Expand Up @@ -182,7 +182,7 @@ def run_specs(runner, url)
# Specify the timeout for the driver. Specs are expected to complete within
# this time frame or the run will be considered a failure. This is to avoid
# issues that can arise where tests stall.
config.driver_timeout = 800
config.driver_timeout = 200000

# Specify a server to use with Rack (e.g. thin, mongrel). If nil is provided
# Rack::Server is used.
Expand Down

0 comments on commit cf08a91

Please sign in to comment.