Skip to content

Commit

Permalink
encounterParticipant is missing from parser under encompassingEncounter
Browse files Browse the repository at this point in the history
  • Loading branch information
v-anagarwal committed Nov 18, 2015
1 parent 0604ae4 commit afca54f
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 1 deletion.
19 changes: 18 additions & 1 deletion lib/parsers/ccda/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,17 @@ Parsers.CCDA.document = function (ccda) {
});
}

el = doc.tag('encompassingEncounter').tag('location');
el = doc.tag('encompassingEncounter');
var encounterParticipant_name_dict = null;
var encounterParticipant_phone = null;
var encounterParticipant_addr = null;
var encounterParticipant = el.tag('encounterParticipant');
if (!encounterParticipant.isEmpty()) {
var encounterParticipant_name_dict = parseName(encounterParticipant);
var encounterParticipant_phone = encounterParticipant.tag('telecom').attr('value');
var encounterParticipant_addr = parseAddress(encounterParticipant.tag('addr'));
}
el=el.tag('location');
var location_name = Core.stripWhitespace(el.tag('name').val());
var location_addr_dict = parseAddress(el.tag('addr'));

Expand All @@ -61,6 +71,13 @@ Parsers.CCDA.document = function (ccda) {
}
},
documentation_of: documentation_of_list,
encounterParticipant: {
name: encounterParticipant_name_dict,
phone: {
work: encounterParticipant_phone
},
address: encounterParticipant_addr
},
location: {
name: location_name,
address: location_addr_dict,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@
}
}
],
"encounterParticipant": {
"name" : null,
"phone" : {
"work" : null
},
"address" : null
},
"location": {
"name": null,
"address": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
}
}
],
"encounterParticipant": {
"name" : null,
"phone" : {
"work" : null
},
"address" : null
},
"location": {
"name": null,
"address": {
Expand Down
7 changes: 7 additions & 0 deletions spec/javascripts/fixtures/json/epic_ccda_expected_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,13 @@
}
}
],
"encounterParticipant": {
"name" : null,
"phone" : {
"work" : null
},
"address" : null
},
"location": {
"name": null,
"address": {
Expand Down
7 changes: 7 additions & 0 deletions spec/javascripts/fixtures/json/hl7_ccda_expected_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@
}
}
],
"encounterParticipant": {
"name" : null,
"phone" : {
"work" : null
},
"address" : null
},
"location": {
"name": null,
"address": {
Expand Down
7 changes: 7 additions & 0 deletions spec/javascripts/fixtures/json/nist_ccda_expected_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@
}
}
],
"encounterParticipant": {
"name" : null,
"phone" : {
"work" : null
},
"address" : null
},
"location": {
"name": null,
"address": {
Expand Down

0 comments on commit afca54f

Please sign in to comment.