Skip to content

Commit

Permalink
Merge pull request #185 from gnott/feature-affiliation-institution
Browse files Browse the repository at this point in the history
Parse affiliation institution in two possible formats.
  • Loading branch information
Michael Aufreiter authored Aug 13, 2016
2 parents c807f2c + b29ea97 commit b249598
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions converter/lens_converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,16 @@ NlmToLensConverter.Prototype = function() {
this.affiliation = function(state, aff) {
var doc = state.doc;

var institution = aff.querySelector("institution");
var department = aff.querySelector("institution[content-type=dept]");
if (department) {
var institution = aff.querySelector("institution:not([content-type=dept])");
} else {
var department = aff.querySelector("addr-line named-content[content-type=department]");
var institution = aff.querySelector("institution");
}
var country = aff.querySelector("country");
var label = aff.querySelector("label");
var department = aff.querySelector("addr-line named-content[content-type=department]");

var city = aff.querySelector("addr-line named-content[content-type=city]");
// TODO: there are a lot more elements which can have this.
var specific_use = aff.getAttribute('specific-use');
Expand Down

0 comments on commit b249598

Please sign in to comment.