hqmf2js 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (40) hide show
  1. checksums.yaml +5 -13
  2. data/.travis.yml +1 -1
  3. data/Gemfile +1 -25
  4. data/Gemfile.lock +170 -146
  5. data/app/assets/javascripts/crosswalk.js.coffee +17 -19
  6. data/app/assets/javascripts/custom_calculations.js.coffee +44 -17
  7. data/app/assets/javascripts/hqmf_util.js.coffee +559 -161
  8. data/app/assets/javascripts/logging_utils.js.coffee +6 -4
  9. data/app/assets/javascripts/patient_api_extension.js.coffee +41 -9
  10. data/app/assets/javascripts/specifics.js.coffee +163 -69
  11. data/hqmf2js.gemspec +7 -12
  12. data/lib/assets/javascripts/libraries/map_reduce_utils.js +151 -64
  13. data/lib/generator/characteristic.js.erb +23 -12
  14. data/lib/generator/codes_to_json.rb +1 -1
  15. data/lib/generator/data_criteria.js.erb +15 -3
  16. data/lib/generator/derived_data.js.erb +5 -0
  17. data/lib/generator/execution.rb +41 -11
  18. data/lib/generator/js.rb +74 -41
  19. data/lib/generator/patient_data.js.erb +1 -1
  20. data/lib/hqmf2js.rb +0 -1
  21. data/lib/hquery/engine.rb +3 -1
  22. data/lib/tasks/convert.rake +20 -12
  23. data/test/fixtures/NQF59New.json +1423 -0
  24. data/test/fixtures/fulfills.xml +917 -0
  25. data/test/fixtures/patients/larry_vanderman.json +573 -654
  26. data/test/{simplecov.rb → simplecov_init.rb} +0 -0
  27. data/test/test_helper.rb +2 -3
  28. data/test/unit/cmd_test.rb +145 -19
  29. data/test/unit/codes_to_json_test.rb +12 -12
  30. data/test/unit/custom_calculations_test.rb +2 -6
  31. data/test/unit/effective_date_test.rb +3 -4
  32. data/test/unit/erb_context_test.rb +12 -12
  33. data/test/unit/filter_by_reference_test.rb +39 -0
  34. data/test/unit/hqmf_from_json_javascript_test.rb +2 -1
  35. data/test/unit/hqmf_javascript_test.rb +12 -13
  36. data/test/unit/js_object_test.rb +2 -2
  37. data/test/unit/library_function_test.rb +210 -42
  38. data/test/unit/specifics_test.rb +402 -321
  39. metadata +57 -15
  40. data/config/warble.rb +0 -144
metadata CHANGED
@@ -1,17 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hqmf2js
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
- - Marc Hadley
8
- - Andre Quina
9
- - Andy Gregorowicz
7
+ - The MITRE Corporation
10
8
  autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2014-03-25 00:00:00.000000000 Z
14
- dependencies: []
11
+ date: 2017-11-16 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.2'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.2'
27
+ - !ruby/object:Gem::Dependency
28
+ name: health-data-standards
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '4.0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '4.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: hquery-patient-api
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.1'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.1'
15
55
  description: A library for converting HQMF files to executable JavaScript suitable
16
56
  for use with the hQuery Gateway
17
57
  email: hquery-talk@googlegroups.com
@@ -19,8 +59,8 @@ executables: []
19
59
  extensions: []
20
60
  extra_rdoc_files: []
21
61
  files:
22
- - .gitignore
23
- - .travis.yml
62
+ - ".gitignore"
63
+ - ".travis.yml"
24
64
  - Gemfile
25
65
  - Gemfile.lock
26
66
  - README.md
@@ -34,7 +74,6 @@ files:
34
74
  - app/assets/javascripts/specifics.js.coffee
35
75
  - app/assets/javascripts/underscore.js
36
76
  - bin/hqmf2js.rb
37
- - config/warble.rb
38
77
  - hqmf2js.gemspec
39
78
  - lib/assets/javascripts/libraries/map_reduce_utils.js
40
79
  - lib/config/codes.xml
@@ -55,10 +94,12 @@ files:
55
94
  - lib/tasks/codes.rake
56
95
  - lib/tasks/coffee.rake
57
96
  - lib/tasks/convert.rake
97
+ - test/fixtures/NQF59New.json
58
98
  - test/fixtures/NQF59New.xml
59
99
  - test/fixtures/codes/codes.json
60
100
  - test/fixtures/codes/codes.xls
61
101
  - test/fixtures/codes/codes.xml
102
+ - test/fixtures/fulfills.xml
62
103
  - test/fixtures/i2b2.xml
63
104
  - test/fixtures/invalid/missing_id.xml
64
105
  - test/fixtures/invalid/unknown_criteria_type.xml
@@ -77,20 +118,22 @@ files:
77
118
  - test/fixtures/json/data_criteria/temporals_with_anynonnull.json
78
119
  - test/fixtures/patients/francis_drake.json
79
120
  - test/fixtures/patients/larry_vanderman.json
80
- - test/simplecov.rb
121
+ - test/simplecov_init.rb
81
122
  - test/test_helper.rb
82
123
  - test/unit/cmd_test.rb
83
124
  - test/unit/codes_to_json_test.rb
84
125
  - test/unit/custom_calculations_test.rb
85
126
  - test/unit/effective_date_test.rb
86
127
  - test/unit/erb_context_test.rb
128
+ - test/unit/filter_by_reference_test.rb
87
129
  - test/unit/hqmf_from_json_javascript_test.rb
88
130
  - test/unit/hqmf_javascript_test.rb
89
131
  - test/unit/js_object_test.rb
90
132
  - test/unit/library_function_test.rb
91
133
  - test/unit/specifics_test.rb
92
134
  homepage: http://github.com/hquery/hqmf2js
93
- licenses: []
135
+ licenses:
136
+ - Apache-2.0
94
137
  metadata: {}
95
138
  post_install_message:
96
139
  rdoc_options: []
@@ -98,19 +141,18 @@ require_paths:
98
141
  - lib
99
142
  required_ruby_version: !ruby/object:Gem::Requirement
100
143
  requirements:
101
- - - ! '>='
144
+ - - ">="
102
145
  - !ruby/object:Gem::Version
103
146
  version: '0'
104
147
  required_rubygems_version: !ruby/object:Gem::Requirement
105
148
  requirements:
106
- - - ! '>='
149
+ - - ">="
107
150
  - !ruby/object:Gem::Version
108
151
  version: '0'
109
152
  requirements: []
110
153
  rubyforge_project:
111
- rubygems_version: 2.2.2
154
+ rubygems_version: 2.6.14
112
155
  signing_key:
113
156
  specification_version: 4
114
157
  summary: A library for converting HQMF files to JavaScript
115
158
  test_files: []
116
- has_rdoc:
@@ -1,144 +0,0 @@
1
- # Disable Rake-environment-task framework detection by uncommenting/setting to false
2
- # Warbler.framework_detection = false
3
-
4
- # Warbler web application assembly configuration file
5
- Warbler::Config.new do |config|
6
- # Features: additional options controlling how the jar is built.
7
- # Currently the following features are supported:
8
- # - gemjar: package the gem repository in a jar file in WEB-INF/lib
9
- # - executable: embed a web server and make the war executable
10
- # - compiled: compile .rb files to .class files
11
- # config.features = %w(gemjar)
12
-
13
- # Application directories to be included in the webapp.
14
- config.dirs = %w(app bin config lib)
15
-
16
- # Additional files/directories to include, above those in config.dirs
17
- # config.includes = FileList["db"]
18
-
19
- # Additional files/directories to exclude
20
- config.excludes = FileList["lib/tasks/*"]
21
-
22
- # Additional Java .jar files to include. Note that if .jar files are placed
23
- # in lib (and not otherwise excluded) then they need not be mentioned here.
24
- # JRuby and JRuby-Rack are pre-loaded in this list. Be sure to include your
25
- # own versions if you directly set the value
26
- # config.java_libs += FileList["lib/java/*.jar"]
27
-
28
- # Loose Java classes and miscellaneous files to be included.
29
- # config.java_classes = FileList["target/classes/**.*"]
30
-
31
- # One or more pathmaps defining how the java classes should be copied into
32
- # the archive. The example pathmap below accompanies the java_classes
33
- # configuration above. See http://rake.rubyforge.org/classes/String.html#M000017
34
- # for details of how to specify a pathmap.
35
- # config.pathmaps.java_classes << "%{target/classes/,}p"
36
-
37
- # Bundler support is built-in. If Warbler finds a Gemfile in the
38
- # project directory, it will be used to collect the gems to bundle
39
- # in your application. If you wish to explicitly disable this
40
- # functionality, uncomment here.
41
- # config.bundler = false
42
-
43
- # An array of Bundler groups to avoid including in the war file.
44
- # Defaults to ["development", "test"].
45
- # config.bundle_without = []
46
-
47
- # Other gems to be included. If you don't use Bundler or a gemspec
48
- # file, you need to tell Warbler which gems your application needs
49
- # so that they can be packaged in the archive.
50
- # For Rails applications, the Rails gems are included by default
51
- # unless the vendor/rails directory is present.
52
- # config.gems += ["activerecord-jdbcmysql-adapter", "jruby-openssl"]
53
- # config.gems << "tzinfo"
54
-
55
- # Uncomment this if you don't want to package rails gem.
56
- # config.gems -= ["rails"]
57
-
58
- # The most recent versions of gems are used.
59
- # You can specify versions of gems by using a hash assignment:
60
- # config.gems["rails"] = "2.3.10"
61
-
62
- # You can also use regexps or Gem::Dependency objects for flexibility or
63
- # finer-grained control.
64
- # config.gems << /^merb-/
65
- # config.gems << Gem::Dependency.new("merb-core", "= 0.9.3")
66
-
67
- # Include gem dependencies not mentioned specifically. Default is
68
- # true, uncomment to turn off.
69
- # config.gem_dependencies = false
70
-
71
- # Array of regular expressions matching relative paths in gems to be
72
- # excluded from the war. Defaults to empty, but you can set it like
73
- # below, which excludes test files.
74
- # config.gem_excludes = [/^(test|spec)\//]
75
-
76
- # Pathmaps for controlling how application files are copied into the archive
77
- # config.pathmaps.application = ["WEB-INF/%p"]
78
-
79
- # Name of the archive (without the extension). Defaults to the basename
80
- # of the project directory.
81
- config.jar_name = "hqmf2js"
82
-
83
- # Name of the MANIFEST.MF template for the war file. Defaults to a simple
84
- # MANIFEST.MF that contains the version of Warbler used to create the war file.
85
- # config.manifest_file = "config/MANIFEST.MF"
86
-
87
- # When using the 'compiled' feature and specified, only these Ruby
88
- # files will be compiled. Default is to compile all \.rb files in
89
- # the application.
90
- # config.compiled_ruby_files = FileList['app/**/*.rb']
91
-
92
- # === War files only below here ===
93
-
94
- # Path to the pre-bundled gem directory inside the war file. Default
95
- # is 'WEB-INF/gems'. Specify path if gems are already bundled
96
- # before running Warbler. This also sets 'gem.path' inside web.xml.
97
- # config.gem_path = "WEB-INF/vendor/bundler_gems"
98
-
99
- # Files for WEB-INF directory (next to web.xml). This contains
100
- # web.xml by default. If there is an .erb-File it will be processed
101
- # with webxml-config. You may want to exclude this file via
102
- # config.excludes.
103
- # config.webinf_files += FileList["jboss-web.xml"]
104
-
105
- # Files to be included in the root of the webapp. Note that files in public
106
- # will have the leading 'public/' part of the path stripped during staging.
107
- # config.public_html = FileList["public/**/*", "doc/**/*"]
108
-
109
- # Pathmaps for controlling how public HTML files are copied into the .war
110
- # config.pathmaps.public_html = ["%{public/,}p"]
111
-
112
- # Value of RAILS_ENV for the webapp -- default as shown below
113
- # config.webxml.rails.env = ENV['RAILS_ENV'] || 'production'
114
-
115
- # Application booter to use, one of :rack, :rails, or :merb (autodetected by default)
116
- # config.webxml.booter = :rails
117
-
118
- # Set JRuby to run in 1.9 mode.
119
- # config.webxml.jruby.compat.version = "1.9"
120
-
121
- # When using the :rack booter, "Rackup" script to use.
122
- # - For 'rackup.path', the value points to the location of the rackup
123
- # script in the web archive file. You need to make sure this file
124
- # gets included in the war, possibly by adding it to config.includes
125
- # or config.webinf_files above.
126
- # - For 'rackup', the rackup script you provide as an inline string
127
- # is simply embedded in web.xml.
128
- # The script is evaluated in a Rack::Builder to load the application.
129
- # Examples:
130
- # config.webxml.rackup.path = 'WEB-INF/hello.ru'
131
- # config.webxml.rackup = %{require './lib/demo'; run Rack::Adapter::Camping.new(Demo)}
132
- # config.webxml.rackup = require 'cgi' && CGI::escapeHTML(File.read("config.ru"))
133
-
134
- # Control the pool of Rails runtimes. Leaving unspecified means
135
- # the pool will grow as needed to service requests. It is recommended
136
- # that you fix these values when running a production server!
137
- # If you're using threadsafe! mode, you probably don't want to set these values,
138
- # since 1 runtime(default for threadsafe mode) will be enough.
139
- # config.webxml.jruby.min.runtimes = 2
140
- # config.webxml.jruby.max.runtimes = 4
141
-
142
- # JNDI data source name
143
- # config.webxml.jndi = 'jdbc/rails'
144
- end