New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

blue-button-generate

Package Overview
Dependencies
Maintainers
5
Versions
43
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

blue-button-generate - npm Package Compare versions

Comparing version 1.4.0-beta.15 to 1.5.0-beta.1

4

bower.json
{
"name": "blue-button-generate",
"version": "1.4.1-beta.1",
"version": "1.5.0-beta.1",
"license": "Apache-2.0",
"ignore": ["**/*", "!dist/*", "!bower.json", "!package.json", "!LICENSE"],
"devDependencies": {
"blue-button": "^1.4.0"
"blue-button": "^1.5.0"
}
}

@@ -49,6 +49,4 @@ "use strict";

options = options || {};
var data = input.data ? input.data : input;
data.identifiers = input.meta && input.meta.identifiers;
options.meta = input.meta;
return generate(documentLevel.ccd, data, options);
return generate(documentLevel.ccd, input, options);
};

@@ -5,6 +5,9 @@ "use strict";

var fieldLevel = require('./fieldLevel');
var leafLevel = require('./leafLevel');
var sectionLevel = require('./sectionLevel');
var contentModifier = require("./contentModifier");
var condition = require("./condition");
var required = contentModifier.required;
var dataKey = contentModifier.dataKey;

@@ -32,4 +35,3 @@ exports.ccd = {

fieldLevel.templateId("2.16.840.1.113883.10.20.22.1.1"),
fieldLevel.templateId("2.16.840.1.113883.10.20.22.1.2"),
fieldLevel.id, {
fieldLevel.templateId("2.16.840.1.113883.10.20.22.1.2"), [fieldLevel.id, dataKey("meta.identifiers")], {
key: "code",

@@ -48,6 +50,4 @@ attributes: {

key: "confidentialityCode",
attributes: {
code: "N",
codeSystem: "2.16.840.1.113883.5.25"
}
attributes: leafLevel.codeFromName("2.16.840.1.113883.5.25"),
dataKey: "meta.confidentiality"
}, {

@@ -58,11 +58,11 @@ key: "languageCode",

}
},
/*{
key: "setId",
attributes: {
extension: "sTT988",
root: "2.16.840.1.113883.19.5.99999.19"
}
},*/
{
}, {
key: "setId",
attributes: {
root: leafLevel.inputProperty("identifier"),
extension: leafLevel.inputProperty("extension")
},
dataKey: 'meta.set_id',
existsWhen: condition.keyExists('identifier')
}, {
key: "versionNumber",

@@ -89,4 +89,3 @@ attributes: {

sectionLevel.socialHistorySection,
sectionLevel.vitalSignsSectionEntriesOptional//,
//sectionLevel.commentActivity
sectionLevel.vitalSignsSectionEntriesOptional
],

@@ -99,5 +98,6 @@ notImplemented: [

]
}
},
dataKey: 'data'
}
]
};

@@ -125,2 +125,13 @@ "use strict";

existsWhen: condition.keyExists("patient_status")
}, {
key: "entryRelationship",
attributes: {
"typeCode": "SUBJ",
"inversionInd": "true"
},
content: [
[sharedEntryLevel.severityObservation]
],
dataKey: "problem",
existsWhen: condition.keyExists("severity")
}

@@ -127,0 +138,0 @@ ],

@@ -56,3 +56,3 @@ "use strict";

existsWhen: condition.keyExists('identifier'),
required: false
required: true
};

@@ -59,0 +59,0 @@

@@ -50,13 +50,7 @@ "use strict";

attributes: leafLevel.codeFromName("2.16.840.1.113883.6.238"),
dataKey: "race_ethnicity",
existsWhen: function (input) {
return input === "Hispanic or Latino";
}
dataKey: "ethnicity"
}, {
key: "raceCode",
attributes: leafLevel.codeFromName("2.16.840.1.113883.6.238"),
dataKey: "race_ethnicity",
existsWhen: function (input) {
return input !== "Hispanic or Latino";
}
dataKey: "race"
}, {

@@ -182,3 +176,3 @@ key: "guardian",

},
dataKey: "demographics"
dataKey: "data.demographics"
};

@@ -200,3 +194,3 @@

},
dataKey: "demographics"
dataKey: "data.demographics"
};

@@ -100,4 +100,2 @@ "use strict";

if (bbuo.exists(value)) {
//trim date
value = value.substring(0, 12);
return value;

@@ -104,0 +102,0 @@ } else {

@@ -100,22 +100,2 @@ "use strict";

var problemsTextHeaders = ["Condition"];
var problemsTextRow = [
leafLevel.deepInputProperty("problem.code.name", ""),
];
var plan_of_careTextHeaders = ["Plan of Care", "Start Date"];
var plan_of_careTextRow = [
leafLevel.deepInputProperty("plan.name", ""),
leafLevel.deepInputDate("date_time.low", "")
];
var proceduresTextHeaders = ["Procedure", "Procedure Date", "Provider", "Phone #", "Status"];
var proceduresTextRow = [
leafLevel.deepInputProperty("procedure.name", ""),
leafLevel.deepInputDate("date_time.point", ""),
leafLevel.deepInputProperty("performer.0.organization.0.name.0", ""),
leafLevel.deepInputProperty("performer.0.organization.0.phone.0.number", ""),
leafLevel.deepInputProperty("status", "")
];
var medicationsTextHeaders = ["Medication Class", "# fills", "Last fill date"];

@@ -172,4 +152,3 @@ var medicationsTextRow = [ // Name, did not find class in the medication blue-button-data

fieldLevel.templateCode("ProblemSection"),
fieldLevel.templateTitle("ProblemSection"),
getText('problems', problemsTextHeaders, problemsTextRow), {
fieldLevel.templateTitle("ProblemSection"), {
key: "text",

@@ -200,4 +179,3 @@ text: ""

fieldLevel.templateCode("ProceduresSection"),
fieldLevel.templateTitle("ProceduresSection"),
getText('procedures', proceduresTextHeaders, proceduresTextRow), {
fieldLevel.templateTitle("ProceduresSection"), {
key: "text",

@@ -441,4 +419,3 @@ text: ""

fieldLevel.templateCode("PlanOfCareSection"),
fieldLevel.templateTitle("PlanOfCareSection"),
getText('plan_of_care', plan_of_careTextHeaders, plan_of_careTextRow), {
fieldLevel.templateTitle("PlanOfCareSection"), {
key: "text",

@@ -521,25 +498,1 @@ text: ""

};
exports.commentActivity = {
key: "organizer",
content: [{
key: "act",
attributes: {
classCode: "ACT",
moodCode: "ENV"
},
content: [{
key: "code",
attibutes: {
code: "48767-8",
displayName: "Annotation Comment",
codeSystemName: "LOINC",
codeSystem: "2.16.840.1.113883.6.1"
}
}, {
key: "text",
text: "",
datakey: "notes"
}]
}]
};
{
"name": "blue-button-generate",
"version": "1.4.0-beta.15",
"version": "1.5.0-beta.1",
"description": "Blue Button CCDA Generator.",

@@ -32,4 +32,4 @@ "main": "./index.js",

"dependencies": {
"blue-button-meta": "^1.3.0",
"blue-button-util": "^1.4.1",
"blue-button-meta": "~1.5.0-beta",
"blue-button-util": "~1.4.1",
"libxmljs": "~0.12.0",

@@ -40,3 +40,3 @@ "moment": "~2.8.4",

"devDependencies": {
"blue-button": "~1.4.1",
"blue-button": "~1.5.0-beta",
"brfs": "~1.2.0",

@@ -43,0 +43,0 @@ "chai": "~1.10.0",

@@ -84,4 +84,4 @@ blue-button-generate

* It is also a step in the right direction for the possible future directions
* Factoring out data model dependencies so that blue-button](https://github.com/amida-tech/blue-button) data model changes or other data models can be accomodated more easily
* Automatic generation of templates from [blue-button](https://github.com/amida-tech/blue-button) like CCDA parsers.
* Factoring out data model dependencies so that blue-button](https://github.com/amida-tech/blue-button) data model changes or other data models can be accomodated more easily
* Automatic generation of templates from [blue-button](https://github.com/amida-tech/blue-button) like CCDA parsers.

@@ -95,5 +95,5 @@ ### Template Structure

* `content`: This is an array of other templates that describe the children of the element. For a single child an object can be used.
* `dataKey`: This is the property of `input` that serves as the date for the template.
* `dataKey`: This is the property of `input` that serves as the data for the template.
* `required`: This identifies if template is required or not. If template is required and there is not value in the `input` a `nullFlavor` node is created.
* `dataTransform`: This is a function to transform the input.
* `existWhen`: This is a boolean function with `input` argument to describe it the elements should exists or not.
# blue-button-generate.js Release Notes
# v.1.5.0 - TBD
- Separate race and ethnicity from blue-button is now supported.
- Support for input data only is removed. Your input now must have both data and meta components.
- Set Identifier and Confidentiality Code are now read from CCDA JSON meta properties.
# v.1.4.0 - March 25, 2105
- Results of xsi:type ST are now supported
- Medication supply organization is now supported
- Text fields are added for results, encounters, medications, allergies
- Providers are added to the CCDA header
- Each entry can be given a unique id based on an option
# v.1.3.0 - December 12, 2014

@@ -4,0 +16,0 @@ - Seperated from blue-button repository.'

@@ -81,2 +81,12 @@ {

],
"ethnicGroupCode": [
{
"$": {
"code": "2186-5",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "Not Hispanic or Latino"
}
}
],
"guardian": [

@@ -83,0 +93,0 @@ {

@@ -55,2 +55,12 @@ {

],
"ethnicGroupCode": [
{
"$": {
"code": "2135-2",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "Hispanic or Latino"
}
}
],
"languageCommunication": [

@@ -97,2 +107,12 @@ {

}
],
"raceCode": [
{
"$": {
"code": "2106-3",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "White"
}
}
]

@@ -99,0 +119,0 @@ }

@@ -81,2 +81,12 @@ {

],
"ethnicGroupCode": [
{
"$": {
"code": "2186-5",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "Not Hispanic or Latino"
}
}
],
"guardian": [

@@ -83,0 +93,0 @@ {

@@ -55,2 +55,12 @@ {

],
"ethnicGroupCode": [
{
"$": {
"code": "2135-2",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "Hispanic or Latino"
}
}
],
"languageCommunication": [

@@ -97,2 +107,12 @@ {

}
],
"raceCode": [
{
"$": {
"code": "2106-3",
"codeSystem": "2.16.840.1.113883.6.238",
"codeSystemName": "Race and Ethnicity - CDC",
"displayName": "White"
}
}
]

@@ -99,0 +119,0 @@ }

@@ -149,3 +149,3 @@ var expect = require('chai').expect;

//convert string into JSON
//convert string into JSON
var result = JSON.parse(data);

@@ -158,4 +158,7 @@

//console.log(result.demographics);
var xml = bbg.generateCCD(result);
delete result.errors;
var input = {
data: result
};
var xml = bbg.generateCCD(input);

@@ -168,7 +171,5 @@ // parse generated ccda

delete result.errors;
delete result2.errors;
//assert.deepEqual(result2, result);
//assert.deepEqual(result2.data, result);
});
});

@@ -81,5 +81,2 @@ "use strict";

}, {
xpath: '//h:recordTarget/h:patientRole/h:patient/h:ethnicGroupCode',
action: 'removeNode'
}, {
xpath: '//h:recordTarget/h:patientRole/h:providerOrganization',

@@ -86,0 +83,0 @@ action: 'removeNode'

@@ -6,6 +6,2 @@ "use strict";

module.exports = [{
xpath: "//h:recordTarget/h:patientRole/h:patient/h:ethnicGroupCode",
action: "removeNode",
comment: "due to parser merging raceCode and ethnicGroupCode original raceCode is converted to ethnicGroupCode (#173)"
}, {
xpath: t.allergiesSection + '/.//h:effectiveTime[not(@value | h:low | h:high)]',

@@ -12,0 +8,0 @@ action: "removeNode"

@@ -22,3 +22,4 @@ "use strict";

"AdministrativeGender": "HL7 AdministrativeGender",
"MaritalStatus": "HL7 Marital Status"
"MaritalStatus": "HL7 Marital Status",
"CDC Race and Ethnicity": "Race and Ethnicity - CDC"
};

@@ -40,6 +41,2 @@

module.exports = [{
xpath: "//h:recordTarget/h:patientRole/h:patient/h:raceCode",
action: "removeNode",
comment: "due to parser merging raceCode and ethnicGroupCode this is generated as ethnicGroupCode (#173)",
}, {
xpath: "//h:name[not(h:family)][not(text())]",

@@ -46,0 +43,0 @@ action: "removeNode",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc