@kno2/bluebutton 0.0.0 → 0.6.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.
package/.jshintrc CHANGED
@@ -1,35 +1,35 @@
1
- {
2
- "bitwise": true,
3
- "browser": true,
4
- "browser": true,
5
- "devel": true,
6
- "eqeqeq": true,
7
- "forin": true,
8
- "freeze": true,
9
- "immed": true,
10
- "latedef": true,
11
- "maxlen": 100,
12
- "newcap": true,
13
- "noarg": true,
14
- "node": true,
15
- "noempty": true,
16
- "nonew": true,
17
- "regexp": true,
18
- "trailing": true,
19
- "undef": true,
20
- "unused": true,
21
- "globals": {
22
- "ActiveXObject": false,
23
- "BlueButton": true,
24
- "Codes": true,
25
- "Core": true,
26
- "Documents": true,
27
- "ejs": true,
28
- "Generators": true,
29
- "Parsers": true,
30
- "Renderers": true,
31
- "describe": true,
32
- "it": true,
33
- "expect": true
34
- }
35
- }
1
+ {
2
+ "bitwise": true,
3
+ "browser": true,
4
+ "browser": true,
5
+ "devel": true,
6
+ "eqeqeq": true,
7
+ "forin": true,
8
+ "freeze": true,
9
+ "immed": true,
10
+ "latedef": true,
11
+ "maxlen": 100,
12
+ "newcap": true,
13
+ "noarg": true,
14
+ "node": true,
15
+ "noempty": true,
16
+ "nonew": true,
17
+ "regexp": true,
18
+ "trailing": true,
19
+ "undef": true,
20
+ "unused": true,
21
+ "globals": {
22
+ "ActiveXObject": false,
23
+ "BlueButton": true,
24
+ "Codes": true,
25
+ "Core": true,
26
+ "Documents": true,
27
+ "ejs": true,
28
+ "Generators": true,
29
+ "Parsers": true,
30
+ "Renderers": true,
31
+ "describe": true,
32
+ "it": true,
33
+ "expect": true
34
+ }
35
+ }
package/.travis.yml CHANGED
@@ -1,5 +1,5 @@
1
- language: node_js
2
- node_js:
3
- - 14
4
- before_script:
5
- - npm install -g grunt-cli
1
+ language: node_js
2
+ node_js:
3
+ - 14
4
+ before_script:
5
+ - npm install -g grunt-cli
package/LICENSE.md CHANGED
@@ -1,11 +1,11 @@
1
- # BlueButton.js License
2
-
3
- [The MIT License (MIT)](http://opensource.org/licenses/MIT)
4
-
5
- Copyright (c) 2014 [Tom Black](http://www.blacktm.com) and [contributors](https://github.com/blue-button?tab=members)
6
-
7
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
-
9
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
-
11
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ # BlueButton.js License
2
+
3
+ [The MIT License (MIT)](http://opensource.org/licenses/MIT)
4
+
5
+ Copyright (c) 2014 [Tom Black](http://www.blacktm.com) and [contributors](https://github.com/blue-button?tab=members)
6
+
7
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,47 +1,47 @@
1
- > This repository is an internal fork of [bluebutton.js](https://github.com/blue-button/bluebutton.js)
2
-
3
- BlueButton.js helps developers parse and generate complex health data formats like C-CDA with ease, so you can empower patients with access to their health records.
4
-
5
- ## Quick Start
6
-
7
- BlueButton.js supports a few different health data types, like C32 and CCDA. To parse a health document, pass the source data to `BlueButton`:
8
-
9
- ```JavaScript
10
- var myRecord = BlueButton(xml);
11
- ```
12
-
13
- BlueButton.js will detect the document type and choose the appropriate parser. The returned object has the following properties:
14
-
15
- ```JavaScript
16
- myRecord.type // The document type
17
- myRecord.source // The parsed source data with added querying methods
18
- myRecord.data // The final parsed document data
19
- ```
20
-
21
- ## Detailed Documentation
22
-
23
- [View the documentation](http://blue-button.github.io/bluebutton.js/docs) for an explanation of the data sections, much more detailed sample code, instructions on how to generate a build, etc.
24
-
25
- ## Kno2 Updates
26
-
27
- There are a number of pre parsed sections for CCDA and C32 documents. In the orignal bluebutton.js the section name was a key off of
28
- the data object containing an array of entries. Those sections now contain an object vs an array with the following properties.
29
-
30
- ```
31
- {
32
- displayName: "friendly display name",
33
- templateId: "",
34
- text: "<div>Some HTML for section</div>",
35
- entries: []
36
- }
37
- ```
38
-
39
- 1. **displayName** - Friendly name to display in viewer.
40
- 2. **templateId** - The HL7 templateId for the section. This currently isn't filled for the pre parsed sections such as allergies, medications, etc. For any generically created section, there will be a template id.
41
- 3. **text** - the narrative text (generally HTML) for each section. All the objects on data outside of demographics, document and smoking status should have this value set. We can default to displaying this HTML if there is no custom section display.
42
- 4. **entries** - the original array of entries
43
-
44
- ### Generic sections
45
-
46
- We've also modified BlueButton.js to include generic sections. These are sections where a specific templateId isn't present in section mapping function for c32, ccd, etc. Generic sections only parse out narrative text, displayName and templateId.
47
- this gave us the ability to still display and filter on a section that wasn't explicitly added in the BlueButton library.
1
+ > This repository is an internal fork of [bluebutton.js](https://github.com/blue-button/bluebutton.js)
2
+
3
+ BlueButton.js helps developers parse and generate complex health data formats like C-CDA with ease, so you can empower patients with access to their health records.
4
+
5
+ ## Quick Start
6
+
7
+ BlueButton.js supports a few different health data types, like C32 and CCDA. To parse a health document, pass the source data to `BlueButton`:
8
+
9
+ ```JavaScript
10
+ var myRecord = BlueButton(xml);
11
+ ```
12
+
13
+ BlueButton.js will detect the document type and choose the appropriate parser. The returned object has the following properties:
14
+
15
+ ```JavaScript
16
+ myRecord.type // The document type
17
+ myRecord.source // The parsed source data with added querying methods
18
+ myRecord.data // The final parsed document data
19
+ ```
20
+
21
+ ## Detailed Documentation
22
+
23
+ [View the documentation](http://blue-button.github.io/bluebutton.js/docs) for an explanation of the data sections, much more detailed sample code, instructions on how to generate a build, etc.
24
+
25
+ ## Kno2 Updates
26
+
27
+ There are a number of pre parsed sections for CCDA and C32 documents. In the orignal bluebutton.js the section name was a key off of
28
+ the data object containing an array of entries. Those sections now contain an object vs an array with the following properties.
29
+
30
+ ```
31
+ {
32
+ displayName: "friendly display name",
33
+ templateId: "",
34
+ text: "<div>Some HTML for section</div>",
35
+ entries: []
36
+ }
37
+ ```
38
+
39
+ 1. **displayName** - Friendly name to display in viewer.
40
+ 2. **templateId** - The HL7 templateId for the section. This currently isn't filled for the pre parsed sections such as allergies, medications, etc. For any generically created section, there will be a template id.
41
+ 3. **text** - the narrative text (generally HTML) for each section. All the objects on data outside of demographics, document and smoking status should have this value set. We can default to displaying this HTML if there is no custom section display.
42
+ 4. **entries** - the original array of entries
43
+
44
+ ### Generic sections
45
+
46
+ We've also modified BlueButton.js to include generic sections. These are sections where a specific templateId isn't present in section mapping function for c32, ccd, etc. Generic sections only parse out narrative text, displayName and templateId.
47
+ this gave us the ability to still display and filter on a section that wasn't explicitly added in the BlueButton library.
package/karma.conf.js CHANGED
@@ -1,69 +1,69 @@
1
- // Karma configuration
2
- // Generated on Thu May 19 2016 15:19:05 GMT-0600 (Mountain Daylight Time)
3
-
4
- module.exports = function(config) {
5
- config.set({
6
-
7
- // base path that will be used to resolve all patterns (eg. files, exclude)
8
- basePath: '',
9
-
10
-
11
- // frameworks to use
12
- // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13
- frameworks: ['jasmine'],
14
-
15
-
16
- // list of files / patterns to load in the browser
17
- files: [
18
- 'spec/javascripts/browser_specs/*_spec.js'
19
- ],
20
-
21
-
22
- // list of files to exclude
23
- exclude: [
24
- ],
25
-
26
-
27
- // preprocess matching files before serving them to the browser
28
- // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
29
- preprocessors: {
30
- },
31
-
32
-
33
- // test results reporter to use
34
- // possible values: 'dots', 'progress'
35
- // available reporters: https://npmjs.org/browse/keyword/karma-reporter
36
- reporters: ['progress'],
37
-
38
-
39
- // web server port
40
- port: 9876,
41
-
42
-
43
- // enable / disable colors in the output (reporters and logs)
44
- colors: true,
45
-
46
-
47
- // level of logging
48
- // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
49
- logLevel: config.LOG_INFO,
50
-
51
-
52
- // enable / disable watching file and executing tests whenever any file changes
53
- autoWatch: true,
54
-
55
-
56
- // start these browsers
57
- // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
58
- browsers: ['ChromeCanary'],
59
-
60
-
61
- // Continuous Integration mode
62
- // if true, Karma captures browsers, runs the tests and exits
63
- singleRun: false,
64
-
65
- // Concurrency level
66
- // how many browser should be started simultaneous
67
- concurrency: Infinity
68
- })
69
- }
1
+ // Karma configuration
2
+ // Generated on Thu May 19 2016 15:19:05 GMT-0600 (Mountain Daylight Time)
3
+
4
+ module.exports = function(config) {
5
+ config.set({
6
+
7
+ // base path that will be used to resolve all patterns (eg. files, exclude)
8
+ basePath: '',
9
+
10
+
11
+ // frameworks to use
12
+ // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
13
+ frameworks: ['jasmine'],
14
+
15
+
16
+ // list of files / patterns to load in the browser
17
+ files: [
18
+ 'spec/javascripts/browser_specs/*_spec.js'
19
+ ],
20
+
21
+
22
+ // list of files to exclude
23
+ exclude: [
24
+ ],
25
+
26
+
27
+ // preprocess matching files before serving them to the browser
28
+ // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
29
+ preprocessors: {
30
+ },
31
+
32
+
33
+ // test results reporter to use
34
+ // possible values: 'dots', 'progress'
35
+ // available reporters: https://npmjs.org/browse/keyword/karma-reporter
36
+ reporters: ['progress'],
37
+
38
+
39
+ // web server port
40
+ port: 9876,
41
+
42
+
43
+ // enable / disable colors in the output (reporters and logs)
44
+ colors: true,
45
+
46
+
47
+ // level of logging
48
+ // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
49
+ logLevel: config.LOG_INFO,
50
+
51
+
52
+ // enable / disable watching file and executing tests whenever any file changes
53
+ autoWatch: true,
54
+
55
+
56
+ // start these browsers
57
+ // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
58
+ browsers: ['ChromeCanary'],
59
+
60
+
61
+ // Continuous Integration mode
62
+ // if true, Karma captures browsers, runs the tests and exits
63
+ singleRun: false,
64
+
65
+ // Concurrency level
66
+ // how many browser should be started simultaneous
67
+ concurrency: Infinity
68
+ })
69
+ }
package/package.json CHANGED
@@ -1,32 +1,32 @@
1
- {
2
- "name": "@kno2/bluebutton",
3
- "version": "0.0.0",
4
- "description": "BlueButton.js helps developers navigate complex health data with ease.",
5
- "author": "Kno2, LLC",
6
- "main": "build/bluebutton.js",
7
- "repository": {
8
- "type": "git",
9
- "url": "git://github.com/Kno2/bluebutton.js.git"
10
- },
11
- "scripts": {
12
- "build": "webpack",
13
- "test": "grunt test"
14
- },
15
- "dependencies": {
16
- "lodash": "^4.17.21",
17
- "xmldom": "^0.5.0"
18
- },
19
- "devDependencies": {
20
- "@babel/core": "^7.13.15",
21
- "@babel/preset-env": "^7.13.15",
22
- "babel-loader": "^8.2.2",
23
- "webpack": "^5.33.2",
24
- "webpack-cli": "^4.6.0",
25
- "webpack-fix-default-import-plugin": "^1.0.3",
26
- "webpack-node-externals": "^2.5.2"
27
- },
28
- "engines": {
29
- "node": ">=14.15.1"
30
- },
31
- "license": "MIT"
32
- }
1
+ {
2
+ "name": "@kno2/bluebutton",
3
+ "version": "0.6.0",
4
+ "description": "BlueButton.js helps developers navigate complex health data with ease.",
5
+ "author": "Kno2, LLC",
6
+ "main": "build/bluebutton.js",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git://github.com/Kno2/bluebutton.js.git"
10
+ },
11
+ "scripts": {
12
+ "build": "webpack",
13
+ "test": "grunt test"
14
+ },
15
+ "dependencies": {
16
+ "lodash": "^4.17.21",
17
+ "xmldom": "^0.5.0"
18
+ },
19
+ "devDependencies": {
20
+ "@babel/core": "^7.13.15",
21
+ "@babel/preset-env": "^7.13.15",
22
+ "babel-loader": "^8.2.2",
23
+ "webpack": "^5.33.2",
24
+ "webpack-cli": "^4.6.0",
25
+ "webpack-fix-default-import-plugin": "^1.0.3",
26
+ "webpack-node-externals": "^2.5.2"
27
+ },
28
+ "engines": {
29
+ "node": ">=14.15.1"
30
+ },
31
+ "license": "MIT"
32
+ }
package/webpack.config.js CHANGED
@@ -1,37 +1,37 @@
1
- var path = require('path');
2
- var nodeExternals = require('webpack-node-externals');
3
-
4
- module.exports = {
5
- mode: 'production',
6
- entry: {
7
- 'bluebutton': "./lib/bluebutton.js"
8
- },
9
- devtool: 'source-map',
10
- externals: [nodeExternals()],
11
- output: {
12
- path: path.resolve(__dirname, "build"),
13
- filename: "[name].js",
14
- library: "bluebutton",
15
- libraryTarget: "umd"
16
- },
17
- optimization: {
18
- minimize: false
19
- },
20
- resolve: {
21
- extensions: ['.js']
22
- },
23
- module: {
24
- rules: [
25
- {
26
- test: /\.js$/,
27
- exclude: /node_modules/,
28
- loader: 'babel-loader',
29
- options: {
30
- presets: [
31
- ['@babel/preset-env', { "modules": false }]
32
- ]
33
- }
34
- }
35
- ]
36
- }
37
- }
1
+ var path = require('path');
2
+ var nodeExternals = require('webpack-node-externals');
3
+
4
+ module.exports = {
5
+ mode: 'production',
6
+ entry: {
7
+ 'bluebutton': "./lib/bluebutton.js"
8
+ },
9
+ devtool: 'source-map',
10
+ externals: [nodeExternals()],
11
+ output: {
12
+ path: path.resolve(__dirname, "build"),
13
+ filename: "[name].js",
14
+ library: "bluebutton",
15
+ libraryTarget: "umd"
16
+ },
17
+ optimization: {
18
+ minimize: false
19
+ },
20
+ resolve: {
21
+ extensions: ['.js']
22
+ },
23
+ module: {
24
+ rules: [
25
+ {
26
+ test: /\.js$/,
27
+ exclude: /node_modules/,
28
+ loader: 'babel-loader',
29
+ options: {
30
+ presets: [
31
+ ['@babel/preset-env', { "modules": false }]
32
+ ]
33
+ }
34
+ }
35
+ ]
36
+ }
37
+ }