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 10, 2015
1 parent 0604ae4 commit 3d01927
Show file tree
Hide file tree
Showing 6 changed files with 117 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: performer_name_dict,
phone: {
work: performer_phone
},
address: performer_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,27 @@
}
}
],
"encounterParticipant": {
"name": {
"prefix": null,
"given": [
"Nancy"
],
"family": "Nightingale"
},
"phone": {
"work": "tel:+1-(555)551-1122"
},
"address": {
"street": [
"1002 Healthcare Drive"
],
"city": "Portland",
"state": "OR",
"zip": "97005",
"country": "US"
}
},
"location": {
"name": null,
"address": {
Expand Down
21 changes: 21 additions & 0 deletions spec/javascripts/fixtures/json/emerge_ccda_expected_output.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@
}
}
],
"encounterParticipant": {
"name": {
"prefix": null,
"given": [
"Henry"
],
"family": "Seven"
},
"phone": {
"work": "tel:+1-555-555-5000"
},
"address": {
"street": [
"1001 Village Avenue"
],
"city": "Portland",
"state": "OR",
"zip": "99123",
"country": "US"
}
},
"location": {
"name": null,
"address": {
Expand Down
17 changes: 17 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,23 @@
}
}
],
"encounterParticipant": {
"name": {
"prefix": null,
"given": [],
"family": null
},
"phone": {
"work": null
},
"address": {
"street": [],
"city": null,
"state": null,
"zip": null,
"country": null
}
},
"location": {
"name": null,
"address": {
Expand Down
19 changes: 19 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,25 @@
}
}
],
"encounterParticipant": {
"name": {
"prefix": "Dr.",
"given": [
"Pseudo"
],
"family": "Physician-3"
},
"phone": {
"work": "tel:+1-301-975-3251"
},
"address": {
"street": [],
"city": null,
"state": null,
"zip": null,
"country": null
}
},
"location": {
"name": null,
"address": {
Expand Down
21 changes: 21 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,27 @@
}
}
],
"encounterParticipant": {
"name": {
"prefix": "Dr.",
"given": [
"Henry"
],
"family": "Seven"
},
"phone": {
"work": "tel:+1-555-555-5000"
},
"address": {
"street": [
"1002 Healthcare Dr"
],
"city": "Portland",
"state": "OR",
"zip": "97266",
"country": "US"
}
},
"location": {
"name": null,
"address": {
Expand Down

0 comments on commit 3d01927

Please sign in to comment.