Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions ccda-explorer/explorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ function getExtension(filename) {

var DEFAULT_NS = {
"h": "urn:hl7-org:v3",
"xsi": "http://www.w3.org/2001/XMLSchema-instance"
"xsi": "http://www.w3.org/2001/XMLSchema-instance",
"sdtc": "urn:hl7-org:sdtc"
};

var root_path="./dump/";
Expand All @@ -28,7 +29,7 @@ function parse(vendor, vendor_id, file_id, filename) {
// readfile
var data = fs.readFileSync(filename).toString();

var xmlDoc = libxmljs.parseXmlString(data);
var xmlDoc = libxmljs.parseXmlString(data);
var item;
for (item in meta.templates) {
var templates = xmlDoc.get('/h:ClinicalDocument/h:templateId[@root="' + meta.templates[item]["templateId"] + '"]', DEFAULT_NS);
Expand Down Expand Up @@ -118,7 +119,7 @@ function explore(path){
//var d = bb.parseXml(r, {component:"ccda_results"}); //errors: 119

//var d = bb.parseXml(r); //errors: 346

//console.log(d);


Expand Down Expand Up @@ -234,4 +235,4 @@ function process()


console.log(meta.templates);
}
}
1 change: 1 addition & 0 deletions lib/parser/ccda/demographics.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ exports.patient = component.define("Patient")
["phone", "0..*", shared.phone.xpath(), shared.phone],
["email", "0..*", shared.email.xpath(), shared.email],
["race", "0..1", "h:patient/h:raceCode", shared.ConceptDescriptor],
["detailed_race", "0..1", "h:patient/sdtc:raceCode", shared.ConceptDescriptor],
["ethnicity", "0..1", "h:patient/h:ethnicGroupCode", shared.ConceptDescriptor],
["languages", "0..*", "h:patient/h:languageCommunication", LanguageCommunication],
["religion", "0..1", "h:patient/h:religiousAffiliationCode", shared.ConceptDescriptor],
Expand Down
2 changes: 1 addition & 1 deletion lib/parser/ccda/sections/encounters.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ var exportEncountersSection = function (version) {
var clinicalStatementsIDs = bbm.CCDA["statements" + version];

var finding = component.define("finding");
finding.templateRoot([clinicalStatementsIDs.Indication]);
finding.templateRoot([clinicalStatementsIDs.Indication, clinicalStatementsIDs.ProblemObservation]);
finding.fields([
["identifiers", "1..*", "h:id", shared.Identifier],
["value", "1..1", "h:value", shared.ConceptDescriptor],
Expand Down