Skip to content

Commit

Permalink
Merge pull request #244 from amida-tech/js-medication-instructions
Browse files Browse the repository at this point in the history
Js medication instructions
  • Loading branch information
jsachs committed Nov 24, 2015
2 parents 9cb91ff + d209390 commit 24354cd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
15 changes: 8 additions & 7 deletions lib/parser/ccda/sections/medications.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ var exportMedicationsSection = function (version) {
["organization", "0..1", "h:assignedAuthor/h:representedOrganization", shared.Organization]
]);

var MedicationInstructions = component.define("MedicationInstructions")
.fields([
["code", "0..1", "h:code", shared.ConceptDescriptor]
//["freeText", "0..1", "h:text", shared.TextWithReference]
]);

// below entries differ between ccda-r1.1 and ccda-r1.0
// ***************************************************************************
// * ccda-r1.1 (LATEST VERSION) *
Expand Down Expand Up @@ -101,8 +107,8 @@ var exportMedicationsSection = function (version) {
["repeatNumber", "0..1", "h:repeatNumber/@value"],
["quantity", "0..1", "h:quantity/@value"],
["status", "0..1", "h:status/@code"],
["author", "0..1", "h:author", author] //, instructions use references, which are not supported (also samples don't have good data for it)
//["instructions", "0..1", "h:entryRelationship[@typeCode='SUBJ']/h:act", MedicationInstructions]
["author", "0..1", "h:author", author],
["instructions", "0..1", "h:entryRelationship[@typeCode='SUBJ']/h:act", MedicationInstructions]
]);

var MedicationPerformer = component.define("MedicationPerformer")
Expand All @@ -119,11 +125,6 @@ var exportMedicationsSection = function (version) {
["playingEntity", "0..1", "h:playingEntity/h:code", shared.ConceptDescriptor]
]).cleanupStep(cleanup.extractAllFields(["drug_vehicle"]));
*/
var MedicationInstructions = component.define("MedicationInstructions")
.fields([
["code", "0..1", "../h:code", shared.ConceptDescriptor],
["freeText", "0..1", "../h:text", shared.TextWithReference]
]);

var MedicationDispense = component.define("MedicationDispense")
.templateRoot("2.16.840.1.113883.10.20.22.4.18")
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blue-button",
"version": "1.8.0-beta.5",
"version": "1.8.0-beta.6",
"description": "Blue Button (CCDA, C32, CMS) to JSON Parser.",
"main": "./index.js",
"directories": {
Expand Down Expand Up @@ -32,7 +32,7 @@
"dependencies": {
"blue-button-cms": "~1.5.0",
"blue-button-meta": "~1.5.0",
"blue-button-model": "~1.8.0-beta.2",
"blue-button-model": "1.8.0-beta.8",
"blue-button-xml": "^1.6.0-beta",
"lodash": "^3.10.0",
"winston": "~1.0.0"
Expand Down

0 comments on commit 24354cd

Please sign in to comment.