From 234f6221b96d7b5a066aa8cc7f3d18589589242f Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Fri, 18 Sep 2026 22:42:15 +0200 Subject: [PATCH 01/11] wip --- src/schema/nodes/bibliography_element.ts | 1 - src/schema/nodes/bio.ts | 47 ++++++++++++++++++++++++ src/schema/nodes/contributor.ts | 3 +- src/schema/nodes/keywords_element.ts | 1 - 4 files changed, 48 insertions(+), 4 deletions(-) create mode 100644 src/schema/nodes/bio.ts diff --git a/src/schema/nodes/bibliography_element.ts b/src/schema/nodes/bibliography_element.ts index 2a3ae4b4..62f9088d 100644 --- a/src/schema/nodes/bibliography_element.ts +++ b/src/schema/nodes/bibliography_element.ts @@ -30,7 +30,6 @@ export const bibliographyElement: NodeSpec = { content: 'bibliography_item*', attrs: { id: { default: '' }, - contents: { default: '' }, dataTracked: { default: null }, }, selectable: false, diff --git a/src/schema/nodes/bio.ts b/src/schema/nodes/bio.ts new file mode 100644 index 00000000..3f4b902f --- /dev/null +++ b/src/schema/nodes/bio.ts @@ -0,0 +1,47 @@ +/*! + * © 2023 Atypon Systems LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { NodeSpec } from 'prosemirror-model' + +import { ManuscriptNode } from '../types' + +export interface BioAttrs { + id: string +} + +export interface BioNode extends ManuscriptNode { + attrs: BioAttrs +} + +export const bio: NodeSpec = { + content: 'image_element? paragraph', + attrs: { + id: { default: '' }, + dataTracked: { default: null }, + }, + group: 'block', + toDOM: (node) => { + const contributorNode = node as BioNode + return [ + 'div', + { + class: 'bio', + id: contributorNode.attrs.id, + }, + ] + }, +} +export const isBioNode = (node: ManuscriptNode): node is BioNode => + node.type === node.type.schema.nodes.bio diff --git a/src/schema/nodes/contributor.ts b/src/schema/nodes/contributor.ts index 7c8f0ff2..813b45ab 100644 --- a/src/schema/nodes/contributor.ts +++ b/src/schema/nodes/contributor.ts @@ -47,7 +47,7 @@ export interface ContributorNode extends ManuscriptNode { } export const contributor: NodeSpec = { - content: 'inline*', + content: 'bio?', atom: true, attrs: { id: { default: '' }, @@ -68,7 +68,6 @@ export const contributor: NodeSpec = { priority: { default: undefined }, creditRoles: { default: [] }, dataTracked: { default: null }, - contents: { default: '' }, }, group: 'block', toDOM: (node) => { diff --git a/src/schema/nodes/keywords_element.ts b/src/schema/nodes/keywords_element.ts index ba2e5e00..65b540a4 100644 --- a/src/schema/nodes/keywords_element.ts +++ b/src/schema/nodes/keywords_element.ts @@ -32,7 +32,6 @@ export const keywordsElement: NodeSpec = { content: 'keyword_group*', attrs: { id: { default: '' }, - contents: { default: '' }, dataTracked: { default: null }, }, group: 'block element', From cb57dd30ab34e529d9d4e007e75de3a2e5ee4df7 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Fri, 18 Sep 2026 22:59:51 +0200 Subject: [PATCH 02/11] wip --- src/jats/exporter/jats-exporter.ts | 16 ++++++++++++---- src/schema/index.ts | 3 +++ src/schema/types.ts | 1 + 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/jats/exporter/jats-exporter.ts b/src/jats/exporter/jats-exporter.ts index 56cac31f..fd7f5ed8 100644 --- a/src/jats/exporter/jats-exporter.ts +++ b/src/jats/exporter/jats-exporter.ts @@ -715,9 +715,17 @@ export class JATSExporter { if (extLink.href) { const extLinkElement = this.createElement('ext-link') extLinkElement.setAttribute('ext-link-type', extLink.type) - extLinkElement.setAttributeNS(XLINK_NAMESPACE, 'href', extLink.href) + extLinkElement.setAttributeNS( + XLINK_NAMESPACE, + 'href', + extLink.href + ) if (extLink.lang) { - extLinkElement.setAttributeNS(XML_NAMESPACE, 'lang', extLink.lang) + extLinkElement.setAttributeNS( + XML_NAMESPACE, + 'lang', + extLink.lang + ) } if (extLink.label) { extLinkElement.textContent = extLink.label @@ -772,6 +780,7 @@ export class JATSExporter { : ['table-wrap-foot', 0], contributor: (node) => this.buildContributorElement(node as ContributorNode), + bio: () => ['bio', 0], affiliation: (node) => this.buildAffiliationElement(node as AffiliationNode), attribution: () => ['attrib', 0], @@ -852,8 +861,7 @@ export class JATSExporter { const rid = rids[0] const labelTarget = this.labelTargets.get(rid) - const isSupplement = - labelTarget?.type === schema.nodes.supplement.name + const isSupplement = labelTarget?.type === schema.nodes.supplement.name const text = cross.attrs.label || (isSupplement diff --git a/src/schema/index.ts b/src/schema/index.ts index 04c318c2..4b614722 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -47,6 +47,7 @@ import { backmatter } from './nodes/backmatter' import { bibliographyElement } from './nodes/bibliography_element' import { bibliographyItem } from './nodes/bibliography_item' import { bibliographySection } from './nodes/bibliography_section' +import { bio } from './nodes/bio' import { blockquoteElement } from './nodes/blockquote_element' import { body } from './nodes/body' import { box_element } from './nodes/box_element' @@ -128,6 +129,7 @@ export * from './nodes/awards' export * from './nodes/bibliography_element' export * from './nodes/bibliography_item' export * from './nodes/bibliography_section' +export * from './nodes/bio' export * from './nodes/blockquote_element' export * from './nodes/box_element' export * from './nodes/caption' @@ -213,6 +215,7 @@ export const schema = new Schema({ bibliography_element: bibliographyElement, bibliography_section: bibliographySection, blockquote_element: blockquoteElement, + bio: bio, list: list, caption, caption_title: captionTitle, diff --git a/src/schema/types.ts b/src/schema/types.ts index f9888ad5..4539a812 100644 --- a/src/schema/types.ts +++ b/src/schema/types.ts @@ -54,6 +54,7 @@ export type Nodes = | 'bibliography_element' | 'bibliography_section' | 'blockquote_element' + | 'bio' | 'quote_image' | 'list' | 'caption' From 67e04fb91e075d9b1b43e20e01d5aa9241677b16 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Fri, 18 Sep 2026 23:10:04 +0200 Subject: [PATCH 03/11] removed getContents --- src/jats/importer/jats-dom-parser.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/jats/importer/jats-dom-parser.ts b/src/jats/importer/jats-dom-parser.ts index cf4a9bd8..23509296 100644 --- a/src/jats/importer/jats-dom-parser.ts +++ b/src/jats/importer/jats-dom-parser.ts @@ -572,9 +572,6 @@ export class JATSDOMParser { email: getTrimmedTextContent(element, 'email') || '', } }, - getContent: () => { - return Fragment.from(this.schema.text('_')) - }, }, { tag: 'affiliations', @@ -772,7 +769,7 @@ export class JATSDOMParser { label: getTrimmedTextContent(extLinkElement) || undefined, })) .filter((extLink) => extLink.href) // Filter out entries without href - + return { id: element.getAttribute('id'), href: element.getAttributeNS(XLINK_NAMESPACE, 'href'), From 3bd98812ef2977c8e005da5549ff6d1b8aa5d98e Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Fri, 18 Sep 2026 23:12:16 +0200 Subject: [PATCH 04/11] added nodes handling --- src/jats/importer/jats-dom-parser.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/jats/importer/jats-dom-parser.ts b/src/jats/importer/jats-dom-parser.ts index 23509296..0e535caf 100644 --- a/src/jats/importer/jats-dom-parser.ts +++ b/src/jats/importer/jats-dom-parser.ts @@ -573,6 +573,10 @@ export class JATSDOMParser { } }, }, + { + tag: 'bio', + node: 'bio', + }, { tag: 'affiliations', node: 'affiliations', From 5f90fe37bdb58c8b139bc46351b6f67f34d4d325 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 16:27:30 +0200 Subject: [PATCH 05/11] small refactoring to bring all creators to a single level --- .../__tests__/__fixtures__/jats-import.xml | 7 + .../__snapshots__/jats-importer.test.ts.snap | 423 +++++++----- .../__snapshots__/jats-roundtrip.test.ts.snap | 2 +- src/jats/__tests__/jats-importer.test.ts | 37 ++ src/jats/exporter/TreeBase.ts | 199 ++++++ src/jats/exporter/jats-exporter.ts | 609 +++++++----------- src/jats/exporter/lib.ts | 85 +++ src/jats/importer/jats-dom-parser.ts | 11 +- 8 files changed, 840 insertions(+), 533 deletions(-) create mode 100644 src/jats/exporter/TreeBase.ts create mode 100644 src/jats/exporter/lib.ts diff --git a/src/jats/__tests__/__fixtures__/jats-import.xml b/src/jats/__tests__/__fixtures__/jats-import.xml index aaa0c14d..e1c560f9 100644 --- a/src/jats/__tests__/__fixtures__/jats-import.xml +++ b/src/jats/__tests__/__fixtures__/jats-import.xml @@ -49,6 +49,13 @@ vocab-term-identifier= "http://credit.niso.org/contributor-roles/writing-original-draft/" degree-contribution="lead">writer + + + Headshot of Agnete Hviid Hornnes + +

Agnete is a Professor of Neurology at Herlev og + Gentofte Hospital, specializing in stroke research.

+
diff --git a/src/jats/__tests__/__snapshots__/jats-importer.test.ts.snap b/src/jats/__tests__/__snapshots__/jats-importer.test.ts.snap index c90858eb..f712baaa 100644 --- a/src/jats/__tests__/__snapshots__/jats-importer.test.ts.snap +++ b/src/jats/__tests__/__snapshots__/jats-importer.test.ts.snap @@ -232,6 +232,100 @@ Object { } `; +exports[`JATS importer > bio > should parse bio with graphic and paragraph into the contributor node 1`] = ` +Object { + "attrs": Object { + "dataTracked": null, + "id": "MPBio:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "extLink": "", + "id": "MPImageElement:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPFigure:test", + "src": "agnete-hornnes.png", + "type": "", + }, + "type": "figure", + }, + Object { + "attrs": Object { + "dataTracked": null, + "placeholder": "Caption...", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "text_block", + }, + ], + "type": "caption", + }, + Object { + "attrs": Object { + "id": "MPAltText:test", + }, + "content": Array [ + Object { + "text": "Headshot of Agnete Hviid Hornnes", + "type": "text", + }, + ], + "type": "alt_text", + }, + Object { + "attrs": Object { + "id": "MPLongDesc:test", + }, + "type": "long_desc", + }, + ], + "type": "image_element", + }, + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPParagraph:test", + "placeholder": "", + }, + "content": Array [ + Object { + "text": "Agnete is a ", + "type": "text", + }, + Object { + "marks": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "italic", + }, + ], + "text": "Professor of Neurology", + "type": "text", + }, + Object { + "text": " at Herlev og Gentofte Hospital, specializing in stroke research.", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "bio", +} +`; + exports[`JATS importer > comments > should parse abstract comment 1`] = ` Array [ Object { @@ -296,7 +390,6 @@ Array [ "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [ Object { @@ -324,8 +417,95 @@ Array [ }, "content": Array [ Object { - "text": "_", - "type": "text", + "attrs": Object { + "dataTracked": null, + "id": "MPBio:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "extLink": "", + "id": "MPImageElement:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPFigure:test", + "src": "agnete-hornnes.png", + "type": "", + }, + "type": "figure", + }, + Object { + "attrs": Object { + "dataTracked": null, + "placeholder": "Caption...", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "text_block", + }, + ], + "type": "caption", + }, + Object { + "attrs": Object { + "id": "MPAltText:test", + }, + "content": Array [ + Object { + "text": "Headshot of Agnete Hviid Hornnes", + "type": "text", + }, + ], + "type": "alt_text", + }, + Object { + "attrs": Object { + "id": "MPLongDesc:test", + }, + "type": "long_desc", + }, + ], + "type": "image_element", + }, + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPParagraph:test", + "placeholder": "", + }, + "content": Array [ + Object { + "text": "Agnete is a ", + "type": "text", + }, + Object { + "marks": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "italic", + }, + ], + "text": "Professor of Neurology", + "type": "text", + }, + Object { + "text": " at Herlev og Gentofte Hospital, specializing in stroke research.", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "bio", }, ], "type": "contributor", @@ -336,7 +516,6 @@ Array [ "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -359,12 +538,6 @@ Array [ "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ] @@ -481,7 +654,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [ "MPCorresp:test", ], @@ -501,12 +673,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -515,7 +681,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -533,12 +698,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -547,7 +706,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -565,12 +723,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -579,7 +731,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -597,12 +748,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -737,7 +882,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -2446,7 +2590,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, @@ -2710,7 +2853,6 @@ Object { "attrs": Object { "ORCID": undefined, "affiliationIDs": Array [], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -2728,12 +2870,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -4083,7 +4219,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, @@ -4275,7 +4410,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4293,12 +4427,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4307,7 +4435,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4325,12 +4452,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4339,7 +4460,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4357,12 +4477,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4371,7 +4485,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4389,12 +4502,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4403,7 +4510,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4421,12 +4527,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4435,7 +4535,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4453,12 +4552,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -4467,7 +4560,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -4485,12 +4577,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -4627,7 +4713,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -19642,7 +19727,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, @@ -22111,7 +22195,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -22133,12 +22216,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -22147,7 +22224,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -22170,12 +22246,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -22318,7 +22388,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -30822,7 +30891,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [ "MPCorresp:test", ], @@ -30844,12 +30912,6 @@ Object { "role": "Member, IEEE", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -31000,7 +31062,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -32476,7 +32537,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, @@ -32626,7 +32686,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [ Object { @@ -32654,8 +32713,95 @@ Object { }, "content": Array [ Object { - "text": "_", - "type": "text", + "attrs": Object { + "dataTracked": null, + "id": "MPBio:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "extLink": "", + "id": "MPImageElement:test", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPFigure:test", + "src": "agnete-hornnes.png", + "type": "", + }, + "type": "figure", + }, + Object { + "attrs": Object { + "dataTracked": null, + "placeholder": "Caption...", + }, + "content": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "text_block", + }, + ], + "type": "caption", + }, + Object { + "attrs": Object { + "id": "MPAltText:test", + }, + "content": Array [ + Object { + "text": "Headshot of Agnete Hviid Hornnes", + "type": "text", + }, + ], + "type": "alt_text", + }, + Object { + "attrs": Object { + "id": "MPLongDesc:test", + }, + "type": "long_desc", + }, + ], + "type": "image_element", + }, + Object { + "attrs": Object { + "dataTracked": null, + "id": "MPParagraph:test", + "placeholder": "", + }, + "content": Array [ + Object { + "text": "Agnete is a ", + "type": "text", + }, + Object { + "marks": Array [ + Object { + "attrs": Object { + "dataTracked": null, + }, + "type": "italic", + }, + ], + "text": "Professor of Neurology", + "type": "text", + }, + Object { + "text": " at Herlev og Gentofte Hospital, specializing in stroke research.", + "type": "text", + }, + ], + "type": "paragraph", + }, + ], + "type": "bio", }, ], "type": "contributor", @@ -32666,7 +32812,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -32689,12 +32834,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -32864,7 +33003,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -42439,7 +42577,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, @@ -44842,7 +44979,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -44860,12 +44996,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, Object { @@ -44874,7 +45004,6 @@ Object { "affiliationIDs": Array [ "MPAffiliation:test", ], - "contents": "", "correspIDs": Array [], "creditRoles": Array [], "dataTracked": null, @@ -44892,12 +45021,6 @@ Object { "role": "", "suffix": undefined, }, - "content": Array [ - Object { - "text": "_", - "type": "text", - }, - ], "type": "contributor", }, ], @@ -44979,7 +45102,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPKeywordsElement:test", }, @@ -57771,7 +57893,6 @@ Object { }, Object { "attrs": Object { - "contents": "", "dataTracked": null, "id": "MPBibliographyElement:test", }, diff --git a/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap b/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap index aa4b9646..9bf593ab 100644 --- a/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap +++ b/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap @@ -11,7 +11,7 @@ exports[`JATS roundtrip > jats-import.xml roundtrip 1`] = ` "
10.5555/BRB3-2019-12-0787Blood pressure after follow up in a stroke prevention clinicRunning title exampleShort title exampleauthorhttps://orcid.org/0000-0003-2217-5904HornnesAgnete HviidMrJr.RNMPHPhD1Writing – original draftPoulsenMai BangMDPhD12Department of Neurology, Herlev og Gentofte Hospital, Borgmester Ib Juuls Vej 1, 2730 - Herlev, Herlev, Denmark, 2730

Mai Bang Poulsen, MD, PhD
Department of Neurology
Nordsjællands Hospital
Dyrehavevej 29
3400 Hillerød
Denmark

ClinicalTrials.gov NCT03782857.

None.

final manuscript-hum-huili-dbh-suicide-20200707_figures (9)2704202009122019Objectives

In Denmark 25% of hospital admissions with stroke are recurrent strokes. With thrombolytic treatment more patients survive with only minor disability. This promising development should be followed up by intensive secondary prevention. Hypertension is the most important target. We aimed at testing the hypotheses that early follow up in a preventive clinic would result in 1) A higher proportion of patients with blood pressure at target, 2) Time to stroke recurrence, myocardial infarction and death would be longer in the intervention group compared to controls.

Materials and Methods

Eligible patients admitted to the stroke unit of Herlev Hospital were randomized shortly before discharge to intervention or control group. Of 78 included participants data from 73 was available for follow up nine months after inclusion. Patients in the intervention group were seen in the clinic within one week. In case of hypertension treatment was initiated or supplied with a new drug. We used individual targets for blood pressure according to diagnosis of stroke and patients’ comorbidity. Patients in the intervention group had a median of five visits to the preventive clinic.

Results

Jane Doe, Ph.D.

Editor

Wiley

Jane Doe, Ph.D.Jack Black

CEO

Generico

Headshot of Jack Black

In the intervention group blood pressure was treated to target in 25 patients (69%) versus 14 (38%) in the control group (p = 0.007). Median time to first event was 44 months (4–49) in the intervention group and 19 months (4–37) in controls (p = 0.316).

Conclusions

Treatment of hypertension to individual targets after stroke is feasible. It may postpone recurrent stroke and death in stroke survivors.

The is the third and last part of the volume devoted to solubility data of rare earth metal chlorides in water and in ternary and quaternary aqueous systems. Compilations of all available experimental data are introduced for each rare earth metal chloride with a corresponding critical evaluation. This part covers chlorides of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, with coverage of the literature through the middle of 2008.

Short

Il s'agit de la troisième et dernière partie du volume consacrée aux données de solubilité des chlorures de métaux des terres rares dans l'eau et dans les systèmes aqueux ternaires et quaternaires. Une compilation de toutes les données expérimentales disponibles est présentée pour chaque chlorure de métaux des terres rares, accompagnée de l'évaluation critique correspondante. Cette partie couvre les chlorures de Gd, Tb, Dy, Ho, Er, Tm, Yb et Lu, avec une couverture de la littérature jusqu'à mi-2008.

secondary preventionstroke recurrenceblood pressureblood pressure targetrandomized controlled trialNational Institutes of HealthGM18458BerkeleyNational Science FoundationDMS-0204674DMS-0244638

simple image

caption

example of alt text for graphicsexample of long desc

test paragraph

It is a far, far better thing that I do now than I have ever done.

Charles Dickens

A standard pullquote.

A half-left pullquote.

A half-right pullquote.

pullquote without content-type

blockquote

INTRODUCTION

Over the last two decades continuous development of thrombolytic treatment of acute ischemic stroke (IS) has improved safety and functional outcome in treated patients 1,2 thus increasing the possibility of survival with no or only minor disability. With this fact and the ongoing aging of populations in mind 3 the secondary prevention after stroke seems more important than ever. In 1998 the Copenhagen Stroke Study reported a recurrence rate of 23%. 4 According to the Danish Stroke Registry our national recurrence rate was 25% in 2011.5

Hypertension is an important risk factor for stroke recurrence. 4,6–8 Lowering blood pressure (BP) after stroke or transitory ischemic attack (TIA) by 10/5 mm Hg has been associated with reduced risk of stroke recurrence by 24% and myocardial infarction (MI) by 21%. 9

Observational studies have demonstrated the difficulties in lowering BP after stroke with rates of BP treated to target ranging from 28% to 73% 10–13 and interventions aimed at control of BP after stroke have not yet found a successful model. 14–19 Fahey and coworkers have reviewed the literature aimed at improving control of BP in hypertensive subjects. One large study using an organized system of regular visits to a clinic was efficient in producing a large decrease in BP and reduction of all-cause mortality compared to referral to usual primary care. This was achieved by using a stepwise escalation of treatment until target was reached. 20 Other methods had variable or no effect, only nurse or pharmacist led care seemed promising.

example of alt text for mediaexample of long descEnglish captions for Video 1Spanish captions for Video 1Aims and hypotheses

The aim of the present study was to test the hypotheses that follow up after stroke in a specialized nurse led physician supervised clinic with stepwise escalation of BP- and lipid lowering treatment would result in

Primary endpointA greater proportion of participants with BP at target

Secondary endpoints: A greater reduction of BP A greater proportion of participants with LDL-cholesterol treated to target A greater reduction of LDL-cholesterol Longer time to recurrence of stroke, MI and death in the intervention group compared to controls

BoxedText test<p/></sec></boxed-text><boxed-text id=\\"boxed-text-2\\" content-type=\\"half-left\\"><label>Box 2</label><caption><title>BoxedTextCaptionTitleKey messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

testing multiple sections inside a boxed-text element

Hello World!

Key messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

MATERIELS AND METHODS

Before the initiation of the study the authors attended a three-day course in treatment of hypertension arranged by the Danish Society of Hypertension. The recommendations of our national guidelines regarding BP targets were in line with those given by the American Stroke Association in force at the time of initiation of the study: “An absolute target BP level and reduction are uncertain and should be individualized.” 21 Following the advice given by the Danish Society of Hypertension we used the following targets: A BP < 140/90 mm Hg was considered at target in non-diabetic patients. In patients aged 80 years or more a BP of 150/90 mm Hg was acceptable if further treatment was not tolerated. In case of severe carotid stenosis or a history of ischemic heart disease BP should not be lower than 130/80 mm Hg. In patients with diabetes or hemorrhagic stroke we aimed at a BP < 130/80 mm Hg. Untreated patients without hypertension were categorized as normotensive, untreated hypertensive patients as having unknown hypertension, treated patients without hypertension as treated to target, and treated patients with hypertension as having untreated hypertension.

LDL-cholesterol should be < 2.5 mmol/l in patients with IS or TIA in non-diabetic patients and in case of diabetes < 2.0 mmol/l.

A sample size calculation showed that 24 patients in each group were needed to show a difference of 10 mm Hg in the development of systolic BP (80% power).

Study sample and setting

From June 2012 to February 2013 all patients diagnosed with a stroke or TIA at the stroke unit of Herlev Gentofte Hospital, University of Copenhagen were considered for inclusion in the study. Patients should be without cognitive deficits that would prevent their active participation and they should be discharged to their own home. The last author used computer-generated block randomization procedures with stratification by hypertension (1:1). The allocation sequence was concealed, and we aimed at equal numbers in the two groups. Shortly before discharge the first author approached eligible patients for oral and written information about the study. Where written informed consent to participation was achieved BP was measured before a concealed envelope administered by a secretary was opened revealing the allocation to either intervention or control group.

The research protocol was approved by the ethics committee of the Capital Region of Denmark (H-3-2011–152) and by the Danish Data Protection Agency (2012–41-0429). The study was conducted according to all common ethical standards including the rules given by the Declaration of Helsinki. Patients randomized to the control group had the usual treatment: one visit in the outpatient clinic of the stroke unit three months after discharge. Patients randomized to the intervention group had an appointment with the first author within one week after discharge. The first author undertook all visits in the preventive clinic.

Procedures and intervention

BP was measured at every visit after at least five minutes rest in a sitting position in an arm chair. BP was measured simultaneously in both arms followed by two measurements with 10-min intervals using the arm with the highest systolic BP. In case of hypertension the first author would suggest initiation or intensification of antihypertensive treatment. The last author would accept or suggest an alternative and do the prescription. Patients would come to the clinic for control of BP and relevant blood tests every 3–4 weeks until BP was at target. After five weeks on lipid lowering drugs treatment was intensified if needed. Patients who did not tolerate lipid lowering medication were referred to a dietitian. In motivated patients home BP measurements were performed using patients’ own monitor or by lending patients a BP monitor between visits.

Patients in the intervention group had a mean of five visits to the clinic with addition of new drugs rather than adding more of the same drug in case of hypertension. Although we used minimum doses to prevent adverse effects, many patients had unacceptable side effects necessitating change to another class of antihypertensive drug.

Patients were informed about the importance of life-long adherence with all preventive medication. Those with elevated BP or receiving antihypertensive treatment were advised in salt reduction, smokers were advised to stop smoking and all patients were informed about the benefits of 30 min of moderate physical activity daily. Likewise, information about the risk of an intake of alcohol above seven drinks per week in women and 14 drinks in men was part of the program as well as the benefits of weight reduction in overweight patients with hypertension or diabetes.

Follow up

Participants in both groups were invited to the usual follow up visit three months after discharge at the outpatient clinic of the stroke unit as well as a follow up visit in the study a median of 9 (IQR 8–11) months after inclusion.

In accordance with the protocol the final follow up visits were performed by nurses in the outpatient clinic with measurement of BP and blood-cholesterols. Patients were asked not to reveal their group allocation but blinding of the nurses was not possible. Patients were interviewed about adherence to all preventive medications as well as their present life style. For practical purposes a minority of visits were performed by the first author. To do intention to treat analyses we used last observation carried forward regarding the endpoints of the study where patients had died or did not respond to the invitation to a follow up visit. Thus, we used the last recorded values in five patients in the intervention group and in seven controls.

After a median of 65 months (IQR: 61–66) from inclusion data on vascular events and death were attained from the hospital based medical records covering all hospitals of the region.

Statistics

Data were entered into Excel and imported into SAS. Statistical analyses were performed by the first author according to a pre-established statistical analysis plan. We used Chi square test (for the primary outcome) or Fisher’s exact test as appropriate for comparison of proportions, and for change from baseline we used McNemar’s test. For continuous variables we used t-test or Mann-Whitney’s test*. Change from baseline was analyzed by the paired t-test or Wilcoxon signed rank sum test* (*where data were not normally distributed). We used SAS 9.4 for Windows and p < 0.05 was considered significant.

RESULTS

We included 78 patients in the study. Due to revision of stroke diagnoses in four participants and as one participant never turned up for the intervention, data on 73 participants were available for follow up (Figure 1). The median stay in hospital was 4 days (IQR: 3–6). As seen from Table 1 most participants had no or slight disability.

Flow chart of participants

example of alt text for graphics inside figuresexample of long desc for graphics inside figures
Baseline characteristics of 73 patientsexample of alt text for tablesexample of long desc

Characteristics

All(n = 73)

Intervention (n = 36)

Control (n = 37)

P

Sex, female

29 (40)

15 (42)

14 (38)

0.74

Age (years), mean ± SD

66 ± 12

63 ± 13

68 ± 11

0.08

Length of education< 10 years10 – 12 years> 12 years

12 (17)22 (30)38 (53)

6 (17)10 (29)19 (54)

6 (16)12 (33)19 (51)

0.95

Diagnosis of strokeIschemic StrokeTIAHemorrhagic stroke

63 (87)9 (12)1 (1)

33 (92)3 (8)

30 (81)6 (16)1 (3)

0.60a

Recurrent stroke

11 (15)

5 (14)

6 (16)

1.00a

Modified Rankin Scale score > 2

5 (6)

1 (3)

4 (11)

0.36a

Antihypertensive medication before stroke

39 (53)

15 (42)

24 (65)

0.047

Antihypertensive medication at discharge

46 (63)

20 (56)

26 (70)

0.19

Cholesterol lowering medication before stroke

25 (34)

11 (31)

14 (38)

0.51

Cholesterol lowering medication at discharge

65 (89)

35 (97)

30 (81)

0.03

Diabetes at baseline

14 (19)

5 (14)

9 (24)

0.37a

Diabetes at discharge

16 (22)

6 (17)

10 (27)

0.29

Atrial fibrillation at baseline

7 (10)

3 (8)

4 (11)

1.00a

Atrial fibrillation at discharge

12 (16)

6 (16)

6 (17)

1.00

Unhealthy dietingb

59 (82)

25 (71)

34 (92)

0.03

Current smoking

19 (26)

11 (31)

8 (22)

0.62

Alcohol above limitsc

23 (32)

12 (34)

11 (30)

0.68

Sedentary lifestyled

17 (24)

9 (26)

8 (22)

0.68

BMI ≥ 25

46 (63)

24 (67)

22 (59)

0.52

Self-rated health: fair, poor, or very poor

34 (47)

15 (43)

19 (51)

0.47

Values are expressed as frequencies (%) or as mean ± standard deviations

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Less than 20% of patients had a baseline BP treated to target (Figure 2). Twenty-eight patients (78%) in the intervention group and 29 patients (78%) in the control group had a 3-month visit in the outpatient clinic. Here 15 patients (42%) in the intervention group had their BP and blood cholesterol measured and so had 23 patients (62%) in the control group. At follow up patients in both groups reported a median of two visits including BP measurement at the general practitioner´s office since discharge from hospital.

Blood pressure and treatment of hypertension at baseline in 73 patients (%)

Primary endpoint

Follow up visits showed that 25 patients (69%) in the intervention group had a BP at target versus 14 (38%) of controls (p = 0.007). In four patients (10%) in the intervention group antihypertensive medication remained unchanged since discharge versus 23 (62%) of controls (p < 0.0001) illustrated by the differences in BP treated to target as well as untreated hypertension in Figure 3.

Blood pressure and treatment of hypertension at follow up in 73 patients (%)

Secondary endpoints

Median reduction in systolic BP was 11 mm Hg (-5-19) with 14 mm Hg (IQR: 5–21) in the intervention group and 3 mm Hg (IQR -11-17) in the control group (p = 0.045). Median reduction in diastolic BP was 2 mm Hg (-2-11) with 7 mm Hg (IQR -1-13) in the intervention group and 1 mm Hg (IQR -6-8) in the control group (p = 0.04).

There was no difference between the groups regarding LDL-cholesterol treated to target with 32 patients (89%) at target in the intervention group versus 29 patients (78%) in the control group (p = 0.21). We found significant reductions in LDL-cholesterol in both groups, but no difference between the groups: 1.6 (IQR: 0.4–2.2) mmol/l in the intervention group versus 0.8 (IQR: 0.4–1.8) mmol/l among controls (p = 0.18).

In 11 patients (31%) in the intervention group cholesterol lowering medication remained unchanged since discharge versus 29 (78%) of controls (p < 0.0001).

The combined endpoint of both BP and LDL-cholesterol at target was achieved in 22 (61%) of patients in the intervention group and in 10 patients (27%) in the control group (p = 0.003). At the end of the study 24 patients (68%) in the intervention group measured their BP at home versus 14 (38%) of controls (p = 0.03).

The only significant change in lifestyle was a reduction in current smokers by four in the control group (Table 2).

Nine months follow up of 73 patients

Characteristics

All(n = 73)

Intervention(n = 36)

Control(n = 37)

P

Systolic BP, mm Hg, mean ± SD

134 ± 21

130 ± 17

137 ± 24

0.12

Diastolic BP, mm Hg, mean ± SD

78 ± 11

78 ± 10

78 ± 12.8)

0.94

Antihypertensive medication

55 (75)

29 (81)

26 (70)

0.31

100% compliance with AHM (n = 45)

38 (84)

23 (89)

15 (79)

0.38

LDL-cholesterol, mmol/l (n = 72), mean ± SD

1.9 ± 0.8

1.9 ± 0.7

2.0 ± 0.8

0.66

Cholesterol lowering medication

64 (88)

32 (89)

32 (86)

0.76

100% compliance with CLM (n = 52)

46 (89)

24 (86)

22 (92)

0.50

Unhealthy dietingb

59 (81)

26 (72)

33 (89)

0.76

Current smoker

15 (21)

11 (31)

4 (11)

0.046a

Alcohol > limitsc

20 (27)

11 (31)

9 (24)

0.55

Sedentary lifestyled

16 (22)

7 (20)

9 (24)

0.66

BMI ≥ 25

43 (59)

21 (58)

22 (60)

0.92

Values are expressed as frequencies (%) or as mean ± standard deviations.
Abbreviations: AHM, antihypertensive medication; CLM, cholesterol lowering medication.

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Regarding vascular complications and death, we found 32 events in 22 patients after a median of 65 months. Median time to first event was 26 months (IQR: 4–49) with a median of 44 months (IQR: 11–49) in the intervention group and 19 months (IQR: 4–37) in the control group (p = 0.32). All in all, we found 11 events in nine patients in the intervention group: two recurrent strokes, three cases of TIA, and six patients died versus 21 events in 13 patients in the control group: seven recurrent strokes, five cases of TIA, one MI, and seven patients died (p = 0.49).

DISCUSSION

In this randomized clinical trial, a larger proportion of patients in the intervention group compared to controls had BP within the above-mentioned limits and the study fulfilled the aim of the primary endpoint.

A systematic review of interventions aimed at modifiable risk factor control for secondary prevention of stroke revealed improvement in achieving BP target. 22 However, as opposed to our study the review showed no significant change in systolic og diastolic BP.

In a study of integrated care with five prearranged visits to patients’ general practitioner versus usual care systolic BP at target set to 140 mm Hg was found in 75% versus 58% at 12-month follow up. 19 We set individual targets for BP according to patients’ type of stroke, comorbidities and age. This is well in line with recommendations given by European Society of Hypertension, 23 but as stated by Boan et al., not quite in accordance with international stroke guidelines. 24

In a study where patients with minor stroke were randomized to six clinic visits by a pharmacist (intervention) or by a nurse (active control) aiming at treating both BP and LDL-cholesterol to target, 43% of patients in the pharmacist-led clinic met those two targets and so did 31% in the nurse-led clinic. 25 In our study this combined endpoint was met in 22 (61%) of patients in the intervention group. Regarding BP in control 80% of patients in the pharmacist led clinic had systolic BP in control after six months versus 90% in the nurse led clinic. This is a far greater proportion than the 69% in our study. However, almost two thirds of patients had a baseline BP within the limits. The opposite was the case in our study with two thirds presenting with elevated BP. Both studies show that a dedicated follow up with stepwise escalation of preventive medication may be the way to reach the targets of the two important risk factors for recurrent stroke. In both studies five-six visits were needed, which is far beyond our usual treatment. However, despite visits to the outpatient clinic as well as to the general practitioner the proportion of patients with unchanged medication since discharge in the control group illustrate the necessity of frequent visits to a dedicated preventive facility. Considering the preventive effect of BP lowering, and - though insignificant - the difference in time to first event as well as the smaller proportion of events in the intervention group as found in our study, it may be well worth the time and resources for patients, their relatives and society.

Strengths and limitations

Our study has some limitations. Most participants had a minor stroke and patients had to be independent and without severe cognitive deficits, which is not representative of a general stroke population. With only 73 participants caution is called for in the drawing of conclusions from the results. Nonetheless, we decided to reorganize the outpatient clinic of our stroke unit as of October 2014 implementing strategies of the present study.

The strength of the study is the individual target for BP taking into account the diagnosis of stroke as well as important comorbidity as recommended by Boan et al. 24 Five-year follow up on vascular complications and death is another important advantage.

CONCLUSIONS

In conclusion, the feasibility study has demonstrated that timely follow up of stroke patients in a dedicated preventive outpatient clinic may result in BP and cholesterol treated to target in most patients. To some extent it may postpone time to stroke recurrence, MI and death.

ACKNOWLEDGMENTS

None.21

DATA AVAILABILITY

The data that support the findings of this study are not available due to national privacy or ethical restrictions.

Agnete Hviid Hornnes, Email: agnete.hviid.hornnes@regionh.dk https//orcid.org/0000-0003-2217-5904
Mai Bang Poulsen, Email: mai.bang.poulsen.02@regionh.dk

Both authors have made substantial contributions to conception and design and acquisitions and analyses and interpretation of data and have; and been involved in writing the manuscript and given final approval of the version to be published. Both authors have participated sufficiently in the work to take public responsibility for the content; and agree to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.

Wahlgren N, Ahmed N, Eriksson N, et al. Multivariable analysis of outcome predictors and adjustment Stroke. 2008;39:3316-3322. doi:https://doi.org/10.1161/STROKEAHA.107.510768Wahlgren N. Systemic thrombolysis in clinical Cerebrovascular Diseases (Basel, Switzerland). 2009;27:168-176. doi:https://doi.org/10.1159/000200456Thorvaldsen P, Davidsen M, Brønnum-Hansen H, Schroll M. Stable stroke occurrence despite Stroke. 1999;30:2529-2534. doi:https://doi.org/10.1161/01.STR.30.12.2529Jørgensen HS, Nakayama H, Reith J, Raaschou HO, Olsen TS. Stroke recurrence: Predictors, severity, and prognosis. The Neurology. 1997;48:891-895. doi:https://doi.org/10.1212/WNL.48.4.891Danish Stroke Registry. Danish Stroke + Herlev, Herlev, Denmark, 2730

Mai Bang Poulsen, MD, PhD
Department of Neurology
Nordsjællands Hospital
Dyrehavevej 29
3400 Hillerød
Denmark

ClinicalTrials.gov NCT03782857.

None.

final manuscript-hum-huili-dbh-suicide-20200707_figures (9)2704202009122019Objectives

In Denmark 25% of hospital admissions with stroke are recurrent strokes. With thrombolytic treatment more patients survive with only minor disability. This promising development should be followed up by intensive secondary prevention. Hypertension is the most important target. We aimed at testing the hypotheses that early follow up in a preventive clinic would result in 1) A higher proportion of patients with blood pressure at target, 2) Time to stroke recurrence, myocardial infarction and death would be longer in the intervention group compared to controls.

Materials and Methods

Eligible patients admitted to the stroke unit of Herlev Hospital were randomized shortly before discharge to intervention or control group. Of 78 included participants data from 73 was available for follow up nine months after inclusion. Patients in the intervention group were seen in the clinic within one week. In case of hypertension treatment was initiated or supplied with a new drug. We used individual targets for blood pressure according to diagnosis of stroke and patients’ comorbidity. Patients in the intervention group had a median of five visits to the preventive clinic.

Results

Jane Doe, Ph.D.

Editor

Wiley

Jane Doe, Ph.D.Jack Black

CEO

Generico

Headshot of Jack Black

In the intervention group blood pressure was treated to target in 25 patients (69%) versus 14 (38%) in the control group (p = 0.007). Median time to first event was 44 months (4–49) in the intervention group and 19 months (4–37) in controls (p = 0.316).

Conclusions

Treatment of hypertension to individual targets after stroke is feasible. It may postpone recurrent stroke and death in stroke survivors.

The is the third and last part of the volume devoted to solubility data of rare earth metal chlorides in water and in ternary and quaternary aqueous systems. Compilations of all available experimental data are introduced for each rare earth metal chloride with a corresponding critical evaluation. This part covers chlorides of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, with coverage of the literature through the middle of 2008.

Short

Il s'agit de la troisième et dernière partie du volume consacrée aux données de solubilité des chlorures de métaux des terres rares dans l'eau et dans les systèmes aqueux ternaires et quaternaires. Une compilation de toutes les données expérimentales disponibles est présentée pour chaque chlorure de métaux des terres rares, accompagnée de l'évaluation critique correspondante. Cette partie couvre les chlorures de Gd, Tb, Dy, Ho, Er, Tm, Yb et Lu, avec une couverture de la littérature jusqu'à mi-2008.

secondary preventionstroke recurrenceblood pressureblood pressure targetrandomized controlled trialNational Institutes of HealthGM18458BerkeleyNational Science FoundationDMS-0204674DMS-0244638

simple image

caption

example of alt text for graphicsexample of long desc

test paragraph

It is a far, far better thing that I do now than I have ever done.

Charles Dickens

A standard pullquote.

A half-left pullquote.

A half-right pullquote.

pullquote without content-type

blockquote

INTRODUCTION

Over the last two decades continuous development of thrombolytic treatment of acute ischemic stroke (IS) has improved safety and functional outcome in treated patients 1,2 thus increasing the possibility of survival with no or only minor disability. With this fact and the ongoing aging of populations in mind 3 the secondary prevention after stroke seems more important than ever. In 1998 the Copenhagen Stroke Study reported a recurrence rate of 23%. 4 According to the Danish Stroke Registry our national recurrence rate was 25% in 2011.5

Hypertension is an important risk factor for stroke recurrence. 4,6–8 Lowering blood pressure (BP) after stroke or transitory ischemic attack (TIA) by 10/5 mm Hg has been associated with reduced risk of stroke recurrence by 24% and myocardial infarction (MI) by 21%. 9

Observational studies have demonstrated the difficulties in lowering BP after stroke with rates of BP treated to target ranging from 28% to 73% 10–13 and interventions aimed at control of BP after stroke have not yet found a successful model. 14–19 Fahey and coworkers have reviewed the literature aimed at improving control of BP in hypertensive subjects. One large study using an organized system of regular visits to a clinic was efficient in producing a large decrease in BP and reduction of all-cause mortality compared to referral to usual primary care. This was achieved by using a stepwise escalation of treatment until target was reached. 20 Other methods had variable or no effect, only nurse or pharmacist led care seemed promising.

example of alt text for mediaexample of long descEnglish captions for Video 1Spanish captions for Video 1Aims and hypotheses

The aim of the present study was to test the hypotheses that follow up after stroke in a specialized nurse led physician supervised clinic with stepwise escalation of BP- and lipid lowering treatment would result in

Primary endpointA greater proportion of participants with BP at target

Secondary endpoints: A greater reduction of BP A greater proportion of participants with LDL-cholesterol treated to target A greater reduction of LDL-cholesterol Longer time to recurrence of stroke, MI and death in the intervention group compared to controls

BoxedText test<p/></sec></boxed-text><boxed-text id=\\"boxed-text-2\\" content-type=\\"half-left\\"><label>Box 2</label><caption><title>BoxedTextCaptionTitleKey messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

testing multiple sections inside a boxed-text element

Hello World!

Key messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

MATERIELS AND METHODS

Before the initiation of the study the authors attended a three-day course in treatment of hypertension arranged by the Danish Society of Hypertension. The recommendations of our national guidelines regarding BP targets were in line with those given by the American Stroke Association in force at the time of initiation of the study: “An absolute target BP level and reduction are uncertain and should be individualized.” 21 Following the advice given by the Danish Society of Hypertension we used the following targets: A BP < 140/90 mm Hg was considered at target in non-diabetic patients. In patients aged 80 years or more a BP of 150/90 mm Hg was acceptable if further treatment was not tolerated. In case of severe carotid stenosis or a history of ischemic heart disease BP should not be lower than 130/80 mm Hg. In patients with diabetes or hemorrhagic stroke we aimed at a BP < 130/80 mm Hg. Untreated patients without hypertension were categorized as normotensive, untreated hypertensive patients as having unknown hypertension, treated patients without hypertension as treated to target, and treated patients with hypertension as having untreated hypertension.

LDL-cholesterol should be < 2.5 mmol/l in patients with IS or TIA in non-diabetic patients and in case of diabetes < 2.0 mmol/l.

A sample size calculation showed that 24 patients in each group were needed to show a difference of 10 mm Hg in the development of systolic BP (80% power).

Study sample and setting

From June 2012 to February 2013 all patients diagnosed with a stroke or TIA at the stroke unit of Herlev Gentofte Hospital, University of Copenhagen were considered for inclusion in the study. Patients should be without cognitive deficits that would prevent their active participation and they should be discharged to their own home. The last author used computer-generated block randomization procedures with stratification by hypertension (1:1). The allocation sequence was concealed, and we aimed at equal numbers in the two groups. Shortly before discharge the first author approached eligible patients for oral and written information about the study. Where written informed consent to participation was achieved BP was measured before a concealed envelope administered by a secretary was opened revealing the allocation to either intervention or control group.

The research protocol was approved by the ethics committee of the Capital Region of Denmark (H-3-2011–152) and by the Danish Data Protection Agency (2012–41-0429). The study was conducted according to all common ethical standards including the rules given by the Declaration of Helsinki. Patients randomized to the control group had the usual treatment: one visit in the outpatient clinic of the stroke unit three months after discharge. Patients randomized to the intervention group had an appointment with the first author within one week after discharge. The first author undertook all visits in the preventive clinic.

Procedures and intervention

BP was measured at every visit after at least five minutes rest in a sitting position in an arm chair. BP was measured simultaneously in both arms followed by two measurements with 10-min intervals using the arm with the highest systolic BP. In case of hypertension the first author would suggest initiation or intensification of antihypertensive treatment. The last author would accept or suggest an alternative and do the prescription. Patients would come to the clinic for control of BP and relevant blood tests every 3–4 weeks until BP was at target. After five weeks on lipid lowering drugs treatment was intensified if needed. Patients who did not tolerate lipid lowering medication were referred to a dietitian. In motivated patients home BP measurements were performed using patients’ own monitor or by lending patients a BP monitor between visits.

Patients in the intervention group had a mean of five visits to the clinic with addition of new drugs rather than adding more of the same drug in case of hypertension. Although we used minimum doses to prevent adverse effects, many patients had unacceptable side effects necessitating change to another class of antihypertensive drug.

Patients were informed about the importance of life-long adherence with all preventive medication. Those with elevated BP or receiving antihypertensive treatment were advised in salt reduction, smokers were advised to stop smoking and all patients were informed about the benefits of 30 min of moderate physical activity daily. Likewise, information about the risk of an intake of alcohol above seven drinks per week in women and 14 drinks in men was part of the program as well as the benefits of weight reduction in overweight patients with hypertension or diabetes.

Follow up

Participants in both groups were invited to the usual follow up visit three months after discharge at the outpatient clinic of the stroke unit as well as a follow up visit in the study a median of 9 (IQR 8–11) months after inclusion.

In accordance with the protocol the final follow up visits were performed by nurses in the outpatient clinic with measurement of BP and blood-cholesterols. Patients were asked not to reveal their group allocation but blinding of the nurses was not possible. Patients were interviewed about adherence to all preventive medications as well as their present life style. For practical purposes a minority of visits were performed by the first author. To do intention to treat analyses we used last observation carried forward regarding the endpoints of the study where patients had died or did not respond to the invitation to a follow up visit. Thus, we used the last recorded values in five patients in the intervention group and in seven controls.

After a median of 65 months (IQR: 61–66) from inclusion data on vascular events and death were attained from the hospital based medical records covering all hospitals of the region.

Statistics

Data were entered into Excel and imported into SAS. Statistical analyses were performed by the first author according to a pre-established statistical analysis plan. We used Chi square test (for the primary outcome) or Fisher’s exact test as appropriate for comparison of proportions, and for change from baseline we used McNemar’s test. For continuous variables we used t-test or Mann-Whitney’s test*. Change from baseline was analyzed by the paired t-test or Wilcoxon signed rank sum test* (*where data were not normally distributed). We used SAS 9.4 for Windows and p < 0.05 was considered significant.

RESULTS

We included 78 patients in the study. Due to revision of stroke diagnoses in four participants and as one participant never turned up for the intervention, data on 73 participants were available for follow up (Figure 1). The median stay in hospital was 4 days (IQR: 3–6). As seen from Table 1 most participants had no or slight disability.

Flow chart of participants

example of alt text for graphics inside figuresexample of long desc for graphics inside figures
Baseline characteristics of 73 patientsexample of alt text for tablesexample of long desc

Characteristics

All(n = 73)

Intervention (n = 36)

Control (n = 37)

P

Sex, female

29 (40)

15 (42)

14 (38)

0.74

Age (years), mean ± SD

66 ± 12

63 ± 13

68 ± 11

0.08

Length of education< 10 years10 – 12 years> 12 years

12 (17)22 (30)38 (53)

6 (17)10 (29)19 (54)

6 (16)12 (33)19 (51)

0.95

Diagnosis of strokeIschemic StrokeTIAHemorrhagic stroke

63 (87)9 (12)1 (1)

33 (92)3 (8)

30 (81)6 (16)1 (3)

0.60a

Recurrent stroke

11 (15)

5 (14)

6 (16)

1.00a

Modified Rankin Scale score > 2

5 (6)

1 (3)

4 (11)

0.36a

Antihypertensive medication before stroke

39 (53)

15 (42)

24 (65)

0.047

Antihypertensive medication at discharge

46 (63)

20 (56)

26 (70)

0.19

Cholesterol lowering medication before stroke

25 (34)

11 (31)

14 (38)

0.51

Cholesterol lowering medication at discharge

65 (89)

35 (97)

30 (81)

0.03

Diabetes at baseline

14 (19)

5 (14)

9 (24)

0.37a

Diabetes at discharge

16 (22)

6 (17)

10 (27)

0.29

Atrial fibrillation at baseline

7 (10)

3 (8)

4 (11)

1.00a

Atrial fibrillation at discharge

12 (16)

6 (16)

6 (17)

1.00

Unhealthy dietingb

59 (82)

25 (71)

34 (92)

0.03

Current smoking

19 (26)

11 (31)

8 (22)

0.62

Alcohol above limitsc

23 (32)

12 (34)

11 (30)

0.68

Sedentary lifestyled

17 (24)

9 (26)

8 (22)

0.68

BMI ≥ 25

46 (63)

24 (67)

22 (59)

0.52

Self-rated health: fair, poor, or very poor

34 (47)

15 (43)

19 (51)

0.47

Values are expressed as frequencies (%) or as mean ± standard deviations

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Less than 20% of patients had a baseline BP treated to target (Figure 2). Twenty-eight patients (78%) in the intervention group and 29 patients (78%) in the control group had a 3-month visit in the outpatient clinic. Here 15 patients (42%) in the intervention group had their BP and blood cholesterol measured and so had 23 patients (62%) in the control group. At follow up patients in both groups reported a median of two visits including BP measurement at the general practitioner´s office since discharge from hospital.

Blood pressure and treatment of hypertension at baseline in 73 patients (%)

Primary endpoint

Follow up visits showed that 25 patients (69%) in the intervention group had a BP at target versus 14 (38%) of controls (p = 0.007). In four patients (10%) in the intervention group antihypertensive medication remained unchanged since discharge versus 23 (62%) of controls (p < 0.0001) illustrated by the differences in BP treated to target as well as untreated hypertension in Figure 3.

Blood pressure and treatment of hypertension at follow up in 73 patients (%)

Secondary endpoints

Median reduction in systolic BP was 11 mm Hg (-5-19) with 14 mm Hg (IQR: 5–21) in the intervention group and 3 mm Hg (IQR -11-17) in the control group (p = 0.045). Median reduction in diastolic BP was 2 mm Hg (-2-11) with 7 mm Hg (IQR -1-13) in the intervention group and 1 mm Hg (IQR -6-8) in the control group (p = 0.04).

There was no difference between the groups regarding LDL-cholesterol treated to target with 32 patients (89%) at target in the intervention group versus 29 patients (78%) in the control group (p = 0.21). We found significant reductions in LDL-cholesterol in both groups, but no difference between the groups: 1.6 (IQR: 0.4–2.2) mmol/l in the intervention group versus 0.8 (IQR: 0.4–1.8) mmol/l among controls (p = 0.18).

In 11 patients (31%) in the intervention group cholesterol lowering medication remained unchanged since discharge versus 29 (78%) of controls (p < 0.0001).

The combined endpoint of both BP and LDL-cholesterol at target was achieved in 22 (61%) of patients in the intervention group and in 10 patients (27%) in the control group (p = 0.003). At the end of the study 24 patients (68%) in the intervention group measured their BP at home versus 14 (38%) of controls (p = 0.03).

The only significant change in lifestyle was a reduction in current smokers by four in the control group (Table 2).

Nine months follow up of 73 patients

Characteristics

All(n = 73)

Intervention(n = 36)

Control(n = 37)

P

Systolic BP, mm Hg, mean ± SD

134 ± 21

130 ± 17

137 ± 24

0.12

Diastolic BP, mm Hg, mean ± SD

78 ± 11

78 ± 10

78 ± 12.8)

0.94

Antihypertensive medication

55 (75)

29 (81)

26 (70)

0.31

100% compliance with AHM (n = 45)

38 (84)

23 (89)

15 (79)

0.38

LDL-cholesterol, mmol/l (n = 72), mean ± SD

1.9 ± 0.8

1.9 ± 0.7

2.0 ± 0.8

0.66

Cholesterol lowering medication

64 (88)

32 (89)

32 (86)

0.76

100% compliance with CLM (n = 52)

46 (89)

24 (86)

22 (92)

0.50

Unhealthy dietingb

59 (81)

26 (72)

33 (89)

0.76

Current smoker

15 (21)

11 (31)

4 (11)

0.046a

Alcohol > limitsc

20 (27)

11 (31)

9 (24)

0.55

Sedentary lifestyled

16 (22)

7 (20)

9 (24)

0.66

BMI ≥ 25

43 (59)

21 (58)

22 (60)

0.92

Values are expressed as frequencies (%) or as mean ± standard deviations.
Abbreviations: AHM, antihypertensive medication; CLM, cholesterol lowering medication.

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Regarding vascular complications and death, we found 32 events in 22 patients after a median of 65 months. Median time to first event was 26 months (IQR: 4–49) with a median of 44 months (IQR: 11–49) in the intervention group and 19 months (IQR: 4–37) in the control group (p = 0.32). All in all, we found 11 events in nine patients in the intervention group: two recurrent strokes, three cases of TIA, and six patients died versus 21 events in 13 patients in the control group: seven recurrent strokes, five cases of TIA, one MI, and seven patients died (p = 0.49).

DISCUSSION

In this randomized clinical trial, a larger proportion of patients in the intervention group compared to controls had BP within the above-mentioned limits and the study fulfilled the aim of the primary endpoint.

A systematic review of interventions aimed at modifiable risk factor control for secondary prevention of stroke revealed improvement in achieving BP target. 22 However, as opposed to our study the review showed no significant change in systolic og diastolic BP.

In a study of integrated care with five prearranged visits to patients’ general practitioner versus usual care systolic BP at target set to 140 mm Hg was found in 75% versus 58% at 12-month follow up. 19 We set individual targets for BP according to patients’ type of stroke, comorbidities and age. This is well in line with recommendations given by European Society of Hypertension, 23 but as stated by Boan et al., not quite in accordance with international stroke guidelines. 24

In a study where patients with minor stroke were randomized to six clinic visits by a pharmacist (intervention) or by a nurse (active control) aiming at treating both BP and LDL-cholesterol to target, 43% of patients in the pharmacist-led clinic met those two targets and so did 31% in the nurse-led clinic. 25 In our study this combined endpoint was met in 22 (61%) of patients in the intervention group. Regarding BP in control 80% of patients in the pharmacist led clinic had systolic BP in control after six months versus 90% in the nurse led clinic. This is a far greater proportion than the 69% in our study. However, almost two thirds of patients had a baseline BP within the limits. The opposite was the case in our study with two thirds presenting with elevated BP. Both studies show that a dedicated follow up with stepwise escalation of preventive medication may be the way to reach the targets of the two important risk factors for recurrent stroke. In both studies five-six visits were needed, which is far beyond our usual treatment. However, despite visits to the outpatient clinic as well as to the general practitioner the proportion of patients with unchanged medication since discharge in the control group illustrate the necessity of frequent visits to a dedicated preventive facility. Considering the preventive effect of BP lowering, and - though insignificant - the difference in time to first event as well as the smaller proportion of events in the intervention group as found in our study, it may be well worth the time and resources for patients, their relatives and society.

Strengths and limitations

Our study has some limitations. Most participants had a minor stroke and patients had to be independent and without severe cognitive deficits, which is not representative of a general stroke population. With only 73 participants caution is called for in the drawing of conclusions from the results. Nonetheless, we decided to reorganize the outpatient clinic of our stroke unit as of October 2014 implementing strategies of the present study.

The strength of the study is the individual target for BP taking into account the diagnosis of stroke as well as important comorbidity as recommended by Boan et al. 24 Five-year follow up on vascular complications and death is another important advantage.

CONCLUSIONS

In conclusion, the feasibility study has demonstrated that timely follow up of stroke patients in a dedicated preventive outpatient clinic may result in BP and cholesterol treated to target in most patients. To some extent it may postpone time to stroke recurrence, MI and death.

ACKNOWLEDGMENTS

None.21

DATA AVAILABILITY

The data that support the findings of this study are not available due to national privacy or ethical restrictions.

Agnete Hviid Hornnes, Email: agnete.hviid.hornnes@regionh.dk https//orcid.org/0000-0003-2217-5904
Mai Bang Poulsen, Email: mai.bang.poulsen.02@regionh.dk

Both authors have made substantial contributions to conception and design and acquisitions and analyses and interpretation of data and have; and been involved in writing the manuscript and given final approval of the version to be published. Both authors have participated sufficiently in the work to take public responsibility for the content; and agree to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.

Wahlgren N, Ahmed N, Eriksson N, et al. Multivariable analysis of outcome predictors and adjustment Stroke. 2008;39:3316-3322. doi:https://doi.org/10.1161/STROKEAHA.107.510768Wahlgren N. Systemic thrombolysis in clinical Cerebrovascular Diseases (Basel, Switzerland). 2009;27:168-176. doi:https://doi.org/10.1159/000200456Thorvaldsen P, Davidsen M, Brønnum-Hansen H, Schroll M. Stable stroke occurrence despite Stroke. 1999;30:2529-2534. doi:https://doi.org/10.1161/01.STR.30.12.2529Jørgensen HS, Nakayama H, Reith J, Raaschou HO, Olsen TS. Stroke recurrence: Predictors, severity, and prognosis. The Neurology. 1997;48:891-895. doi:https://doi.org/10.1212/WNL.48.4.891Danish Stroke Registry. Danish Stroke Registry, annual report 2011. 2011. Ref Type: Generic.Friday G, Alter M, Lai SM. Control of hypertension and risk of stroke Stroke. 2002;33:2652-2657. doi:https://doi.org/10.1161/01.STR.0000033929.62136.6FLai SM, Alter M, Friday G, Sobel E. A multifactorial analysis of risk Stroke. 1994;25:958-962. doi:https://doi.org/10.1161/01.STR.25.5.958Prencipe M, Culasso F, Rasura M, et al. Long-term prognosis after a minor Stroke. 1998;29:126-132. doi:https://doi.org/10.1161/01.STR.29.1.126Rashid P, Leonardi-Bee J, Bath P. Blood pressure reduction and secondary Stroke. 2003;34:2741-2748. doi:https://doi.org/10.1161/01.STR.0000092488.40085.15Girot M, Mackowiak-Cordoliani MA, Deplanque D, Hénon H, Lucas C, Leys D. Secondary prevention after ischemic Journal of Neurology. 2005;252:14-20. doi:https://doi.org/10.1007/s00415-005-0591-8Johnson P, Rosewell M, James MA. How good is the management of vascular risk after stroke, Cerebrovascular Diseases (Basel, Switzerland). 2007;23:156-161. doi:https://doi.org/10.1159/000097053Paul SL, Thrift AG. Control of hypertension 5 years after stroke in the North Hypertension. 2006;48:260-265. doi:https://doi.org/10.1161/01.HYP.0000230610.81947.04Hornnes N, Larsen K, Boysen G. Little change of modifiable risk factors International Journal of Stroke. 2010;5:157-162. doi:https://doi.org/10.1111/j.1747-4949.2010.00424.xAdie K, James MA. Does telephone follow-up improve blood pressure after minor Age and Ageing. 2010;39:598-603. doi:https://doi.org/10.1093/ageing/afq085Chiu CC, Wu SS, Lee PY, Huang YC, Tan TY, Chang KC. Control of modifiable risk factors in ischemic stroke Journal of Clinical Pharmacy and Therapeutics. 2008;33:529-535. doi:https://doi.org/10.1111/j.1365-2710.2008.00940.xEllis G, Rodger J, McAlpine C, Langhorne P. The impact of stroke nurse specialist Age and Ageing. 2005;34:389-392. doi:https://doi.org/10.1093/ageing/afi075Hornnes N, Larsen K, Boysen G. Blood pressure 1 year after stroke: The Journal of Stroke and Cerebrovascular Diseases. 2011;20:16-23. doi:https://doi.org/10.1016/j.jstrokecerebrovasdis.2009.10.002Johnston SC, Sidney S, Hills NK, et al. Standardized discharge orders after Annals of Neurology. 2010;67:579-589. doi:https://doi.org/10.1002/ana.22019Joubert J, Reid C, Barton D, et al. Integrated care improves risk-factor Journal of Neurology, Neurosurgery, and Psychiatry. 2009;80:279-284. doi:https://doi.org/10.1136/jnnp.2008.148122Fahey T, Schroeder K, Ebrahim S. Interventions used to improve control of Cochrane Database of Systematic Reviews. 2006.Furie KL, Kasner SE, Adams RJ, et al. Guidelines for the prevention of stroke Stroke. 2011;42:227-276. doi:https://doi.org/10.1161/STR.0b013e3181f7d043Bridgwood B, Lager KE, Mistri AK, Khunti K, Wilson AD, Modi P. Interventions for improving modifiable Cochrane Database of Systematic Reviews. 2018;5.Mancia G, Fagard R, Narkiewicz K, et al. 2013 Practice guidelines for the management of arterial Journal of Hypertension. 2013;31:1925-1938. doi:https://doi.org/10.1097/HJH.0b013e328364ca4cBoan AD, Lackland DT, Ovbiagele B. Lowering of blood pressure for recurrent Stroke. 2014;45:2506-2513. doi:https://doi.org/10.1161/STROKEAHA.114.003666McAlister FA, Majumdar SR, Padwal RS, et al. Case management for blood pressure and Canadian Medical Association Journal. 2014;186:577-584. doi:https://doi.org/10.1503/cmaj.140053
example of alt text for hero-imageexample of long desc for hero image
" `; diff --git a/src/jats/__tests__/jats-importer.test.ts b/src/jats/__tests__/jats-importer.test.ts index fd2c2c7c..954ada4e 100644 --- a/src/jats/__tests__/jats-importer.test.ts +++ b/src/jats/__tests__/jats-importer.test.ts @@ -68,6 +68,43 @@ describe('JATS importer', () => { expect(contributorsNode).toHaveLength(0) }) }) + describe('bio', () => { + it('should parse bio with graphic and paragraph into the contributor node', async () => { + const jats = await readAndParseFixture('jats-import.xml') + const node = parseJATSArticle(jats, sectionCategories) + changeIDs(node) + const [contributor] = findNodesByType(node, schema.nodes.contributor) + + expect(contributor.childCount).toBe(1) + const bio = contributor.firstChild! + expect(bio.type).toBe(schema.nodes.bio) + expect(bio.childCount).toBe(2) + + const image = findNodeByType(bio, schema.nodes.image_element) + expect(findNodeByType(image, schema.nodes.figure).attrs.src).toBe( + 'agnete-hornnes.png' + ) + expect(findNodeByType(image, schema.nodes.alt_text).textContent).toBe( + 'Headshot of Agnete Hviid Hornnes' + ) + + // exact paragraph text proves name/email/xref metadata did not leak into the bio + const paragraph = bio.lastChild! + expect(paragraph.type).toBe(schema.nodes.paragraph) + expect(paragraph.textContent).toBe( + 'Agnete is a Professor of Neurology at Herlev og Gentofte Hospital, specializing in stroke research.' + ) + expect(bio).toMatchSnapshot() + }) + it('should not add bio content to contributors without a bio element', async () => { + const jats = await readAndParseFixture('jats-import.xml') + const node = parseJATSArticle(jats, sectionCategories) + const [, contributor] = findNodesByType(node, schema.nodes.contributor) + + expect(contributor.childCount).toBe(0) + expect(findNodesByType(node, schema.nodes.bio)).toHaveLength(1) + }) + }) describe('affiliations', () => { it('should correctly parse affiliation nodes', async () => { const jats = await readAndParseFixture('jats-import.xml') diff --git a/src/jats/exporter/TreeBase.ts b/src/jats/exporter/TreeBase.ts new file mode 100644 index 00000000..41d79323 --- /dev/null +++ b/src/jats/exporter/TreeBase.ts @@ -0,0 +1,199 @@ +/*! + * © 2026 Atypon Systems LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as Citeproc from 'citeproc' +import { DOMOutputSpec, DOMSerializer, type NodeType } from 'prosemirror-model' +import { findChildrenByAttr, findChildrenByType } from 'prosemirror-utils' +import serializeToXML from 'w3c-xmlserializer' + +import { buildCiteprocCitation } from '../../lib/citeproc' +import { CreditRoleUrls } from '../../lib/credit-roles' +import { generateFootnoteLabels } from '../../lib/footnotes' +import { FOOTNOTE_SECTION_CATEGORY_IDS } from '../../lib/section-categories' +import { + sanitizeXmlString, + XLINK_NAMESPACE, + XML_NAMESPACE, +} from '../../lib/xml' +import { + ActualManuscriptNode, + AffiliationNode, + AuthorNotesNode, + AwardNode, + ExtLink, + CitationNode, + ContributorNode, + CorrespNode, + CrossReferenceNode, + FootnoteNode, + isBibliographyItemNode, + isCitationNode, + isNodeOfType, + ManuscriptMark, + ManuscriptNode, + ManuscriptNodeType, + Marks, + Nodes, + ParagraphNode, + QuoteImageNode, + schema, + BioNode, +} from '../../schema' +import { isExecutableNodeType } from '../../transformer' +import { IDGenerator } from '../types' +import { initJats, jatsVariableWrapper } from './citeproc' +import { selectVersionIDs, Version } from './jats-versions' +import { buildTargets, Target } from './labels' +import { normalizeID } from './lib' + +export class TreeBase { + private nodesMap: Map = new Map() + protected manuscriptNode: ManuscriptNode + protected document: Document + protected serializer: DOMSerializer + + public isChildOfNodeType(targetID: string, type: NodeType, descend = false) { + const nodes = this.getChildrenOfType(type) + return nodes.some((node) => { + const result = findChildrenByAttr( + node, + (attrs) => attrs.id === targetID, + descend + )[0] + return !!result + }) + } + + protected populateNodesMap = () => { + this.manuscriptNode.descendants((node) => { + const type = node.type + const nodes = this.nodesMap.get(type) ?? [] + nodes.push(node) + this.nodesMap.set(type, nodes) + }) + } + + public getChildrenOfType( + type: NodeType, + node?: ManuscriptNode + ): T[] { + const nodes = node + ? findChildrenByType(node, type).map(({ node }) => node) + : this.nodesMap.get(type) + return (nodes ?? []).filter((n): n is T => isNodeOfType(n, type)) + } + + public getFirstChildOfType( + type: NodeType, + node?: ManuscriptNode + ): T | undefined { + return this.getChildrenOfType(type, node)[0] + } + + protected fillEmptyElements( + $article: Element, + selector: string, + tagName = 'p' + ) { + const $empty = Array.from($article.querySelectorAll(selector)).filter( + ($el) => !$el.innerHTML + ) + $empty.forEach(($element) => + $element.appendChild(this.createElement(tagName)) + ) + } + + protected createElement = ( + tag: string, + content?: string, + attrs?: Record + ) => { + const $element = this.document.createElement(tag) + if (content) { + $element.textContent = content + } + if (attrs) { + Object.entries(attrs).forEach(([k, v]) => { + if (v) { + $element.setAttribute(k, v) + } + }) + } + return $element + } + + protected appendElement = ( + $parent: Element, + tag: string, + content?: string, + attrs?: Record + ) => { + const $element = this.createElement(tag, content, attrs) + $parent.appendChild($element) + return $element + } + + protected changeTag = ($node: Element, tag: string) => { + const $clone = this.createElement(tag) + for (const attr of $node.attributes) { + $clone.setAttributeNS(null, attr.name, attr.value) + } + while ($node.firstChild) { + $clone.appendChild($node.firstChild) + } + $node.replaceWith($clone) + return $clone + } + + protected createElementWithID(node: ManuscriptNode, nodeName: string) { + const $element = this.createElement(nodeName) + $element.setAttribute('id', normalizeID(node.attrs.id)) + return $element + } + + protected serializeNode(node: ManuscriptNode) { + return this.serializer.serializeNode(node, { + document: this.document, + }) + } + + appendChildIfPresent($parent: Element, tagName: string, textContent: string) { + if (!textContent) { + return + } + const $element = this.createElement(tagName) + $element.textContent = textContent + $parent.appendChild($element) + } + + processChildNodes = ( + $element: Element, + node: ManuscriptNode, + contentNodeType: ManuscriptNodeType + ) => { + node.forEach((childNode) => { + if (childNode.type === contentNodeType) { + if (childNode.attrs.id) { + $element.appendChild(this.serializeNode(childNode)) + } + } else if (childNode.type === node.type.schema.nodes.paragraph) { + $element.appendChild(this.serializeNode(childNode)) + } else if (childNode.type === node.type.schema.nodes.missing_figure) { + $element.appendChild(this.serializeNode(childNode)) + } + }) + } +} diff --git a/src/jats/exporter/jats-exporter.ts b/src/jats/exporter/jats-exporter.ts index fd7f5ed8..48fd0f84 100644 --- a/src/jats/exporter/jats-exporter.ts +++ b/src/jats/exporter/jats-exporter.ts @@ -1,5 +1,5 @@ /*! - * © 2019 Atypon Systems LLC + * © 2026 Atypon Systems LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,8 @@ */ import * as Citeproc from 'citeproc' -import { DOMOutputSpec, DOMSerializer, type NodeType } from 'prosemirror-model' -import { findChildrenByAttr, findChildrenByType } from 'prosemirror-utils' +import { DOMOutputSpec, DOMSerializer } from 'prosemirror-model' +import { findChildrenByAttr } from 'prosemirror-utils' import serializeToXML from 'w3c-xmlserializer' import { buildCiteprocCitation } from '../../lib/citeproc' @@ -50,12 +50,15 @@ import { ParagraphNode, QuoteImageNode, schema, + BioNode, } from '../../schema' import { isExecutableNodeType } from '../../transformer' import { IDGenerator } from '../types' import { initJats, jatsVariableWrapper } from './citeproc' import { selectVersionIDs, Version } from './jats-versions' import { buildTargets, Target } from './labels' +import { TreeBase } from './TreeBase' +import { chooseRefType, createDefaultIDGenerator, normalizeID } from './lib' interface Attrs { [key: string]: string @@ -67,56 +70,6 @@ type MarkSpecs = { [key in Marks]: (mark: ManuscriptMark, inline: boolean) => DOMOutputSpec } -const normalizeID = (id: string) => id.replace(/:/g, '_') - -export const createCounter = () => { - const counts = new Map() - - return { - increment: (field: string) => { - const value = counts.get(field) - const newValue = value === undefined ? 1 : value + 1 - counts.set(field, newValue) - return newValue - }, - } -} - -const createDefaultIDGenerator = (): IDGenerator => { - const counter = createCounter() - - return async (element: Element) => { - const value = String(counter.increment(element.nodeName)) - - return `${element.localName}-${value}` - } -} - -const chooseRefType = (type: ManuscriptNodeType): string | undefined => { - switch (type) { - case schema.nodes.figure: - case schema.nodes.figure_element: - return 'fig' - - case schema.nodes.footnote: - return 'fn' - - case schema.nodes.table: - case schema.nodes.table_element: - return 'table' - - case schema.nodes.section: - case schema.nodes.abstract: - return 'sec' - - case schema.nodes.equation: - case schema.nodes.equation_element: - return 'disp-formula' - - case schema.nodes.supplement: - return 'supplementary-material' - } -} export type CSLOptions = { style: string locale: string @@ -126,7 +79,7 @@ export type ExportOptions = { csl: CSLOptions } -export class JATSExporter { +export class JATSExporter extends TreeBase { protected document: Document protected serializer: DOMSerializer protected labelTargets: Map @@ -134,34 +87,8 @@ export class JATSExporter { protected manuscriptNode: ActualManuscriptNode private engine: Citeproc.Engine private renderedCitations: Map - private nodesMap: Map = new Map() - private contributorLabels: Map = new Map() - private populateNodesMap = () => { - this.manuscriptNode.descendants((node) => { - const type = node.type - const nodes = this.nodesMap.get(type) ?? [] - nodes.push(node) - this.nodesMap.set(type, nodes) - }) - } - - protected getFirstChildOfType( - type: NodeType, - node?: ManuscriptNode - ): T | undefined { - return this.getChildrenOfType(type, node)[0] - } - - protected getChildrenOfType( - type: NodeType, - node?: ManuscriptNode - ): T[] { - const nodes = node - ? findChildrenByType(node, type).map(({ node }) => node) - : this.nodesMap.get(type) - return (nodes ?? []).filter((n): n is T => isNodeOfType(n, type)) - } + private contributorLabels: Map = new Map() public serializeToJATS = async ( manuscriptNode: ActualManuscriptNode, @@ -184,7 +111,6 @@ export class JATSExporter { ) const $article = this.document.documentElement - $article.setAttributeNS( 'http://www.w3.org/2000/xmlns/', 'xmlns:xlink', @@ -629,43 +555,13 @@ export class JATSExporter { return $refList } - private createElement = ( - tag: string, - content?: string, - attrs?: Record - ) => { - const $element = this.document.createElement(tag) - if (content) { - $element.textContent = content - } - if (attrs) { - Object.entries(attrs).forEach(([k, v]) => { - if (v) { - $element.setAttribute(k, v) - } - }) - } - return $element - } - - private appendElement = ( - $parent: Element, - tag: string, - content?: string, - attrs?: Record - ) => { - const $element = this.createElement(tag, content, attrs) - $parent.appendChild($element) - return $element - } - protected createSerializer = () => { const nodes: NodeSpecs = { - trans_abstract: (node) => createTransAbstract(node), - trans_graphical_abstract: (node) => createTransAbstract(node), + trans_abstract: (node) => this.createTransAbstract(node), + trans_graphical_abstract: (node) => this.createTransAbstract(node), hero_image: () => '', headshot_grid: () => ['p', { 'content-type': 'headshots' }, 0], - headshot_element: (node) => createImage(node), + headshot_element: (node) => this.createImage(node), headshot_image: () => '', alt_text: (node) => { if (node.textContent) { @@ -690,7 +586,7 @@ export class JATSExporter { return $selfUri }, attachments: () => '', - image_element: (node) => createImage(node), + image_element: (node) => this.createImage(node), embed: (node) => { const { id, href, mimetype, mimeSubtype, extLinks } = node.attrs if (!href) { @@ -706,7 +602,7 @@ export class JATSExporter { if (mimeSubtype) { $media.setAttribute('mime-subtype', node.attrs.mimeSubtype) } - appendLabels($media, node) + this.appendLabels($media, node) this.appendChildNodeOfType($media, node, schema.nodes.alt_text) this.appendChildNodeOfType($media, node, schema.nodes.long_desc) this.appendCaption($media, node) @@ -741,7 +637,7 @@ export class JATSExporter { const awardGroup = node as AwardNode const $awardGroup = this.createElement('award-group') $awardGroup.setAttribute('id', normalizeID(awardGroup.attrs.id)) - appendChildIfPresent( + this.appendChildIfPresent( $awardGroup, 'funding-source', awardGroup.attrs.source @@ -749,9 +645,9 @@ export class JATSExporter { awardGroup.attrs.code ?.split(';') .forEach((code) => - appendChildIfPresent($awardGroup, 'award-id', code) + this.appendChildIfPresent($awardGroup, 'award-id', code) ) - appendChildIfPresent( + this.appendChildIfPresent( $awardGroup, 'principal-award-recipient', awardGroup.attrs.recipient @@ -759,7 +655,7 @@ export class JATSExporter { return $awardGroup }, - box_element: (node) => createBoxElement(node), + box_element: (node) => this.createBoxElement(node), author_notes: () => '', corresp: () => '', title: () => ['article-title', 0], @@ -815,7 +711,7 @@ export class JATSExporter { 'mime-subtype', node.attrs.mimeSubType ?? '' ) - appendLabels($supplementaryMaterial, node) + this.appendLabels($supplementaryMaterial, node) this.appendCaption($supplementaryMaterial, node) return $supplementaryMaterial }, @@ -913,13 +809,13 @@ export class JATSExporter { equation_element: (node) => { const $dispFormula = this.createElement('disp-formula') $dispFormula.setAttribute('id', normalizeID(node.attrs.id)) - appendLabels($dispFormula, node) - processChildNodes($dispFormula, node, schema.nodes.equation) + this.appendLabels($dispFormula, node) + this.processChildNodes($dispFormula, node, schema.nodes.equation) return $dispFormula }, - figure: (node) => createGraphic(node), + figure: (node) => this.createGraphic(node), figure_element: (node) => - createFigureElement(node, node.type.schema.nodes.figure), + this.createFigureElement(node, node.type.schema.nodes.figure), footnote: (node) => { const attrs: Attrs = {} @@ -1012,7 +908,7 @@ export class JATSExporter { return $code }, listing_element: (node) => - createFigureElement(node, node.type.schema.nodes.listing), + this.createFigureElement(node, node.type.schema.nodes.listing), manuscript: (node) => ['article', { id: normalizeID(node.attrs.id) }, 0], missing_figure: () => { const $graphic = this.createElement('graphic') @@ -1053,11 +949,11 @@ export class JATSExporter { quote_image: (node) => { const img = node as QuoteImageNode if (img.attrs.src) { - return createGraphic(node) + return this.createGraphic(node) } return '' }, - graphical_abstract_section: (node) => createAbstract(node), + graphical_abstract_section: (node) => this.createAbstract(node), section: (node) => { const attrs: { [key: string]: string } = { id: normalizeID(node.attrs.id), @@ -1069,13 +965,13 @@ export class JATSExporter { return ['sec', attrs, 0] }, - abstract: (node) => createAbstract(node), + abstract: (node) => this.createAbstract(node), section_label: () => ['label', 0], section_title: () => ['title', 0], section_title_plain: () => ['title', 0], table: (node) => ['table', { id: normalizeID(node.attrs.id) }, 0], table_element: (node) => { - const $tableWrap = createTableElement(node) + const $tableWrap = this.createTableElement(node) $tableWrap.setAttribute('position', 'anchor') if (node.attrs.type) { $tableWrap.setAttribute('content-type', node.attrs.type) @@ -1129,259 +1025,188 @@ export class JATSExporter { } this.serializer = new DOMSerializer(nodes, marks) - const appendChildIfPresent = ( - $parent: Element, - tagName: string, - textContent: string - ) => { - if (!textContent) { - return - } - const $element = this.createElement(tagName) - $element.textContent = textContent - $parent.appendChild($element) - } - const processChildNodes = ( - $element: Element, - node: ManuscriptNode, - contentNodeType: ManuscriptNodeType - ) => { - node.forEach((childNode) => { - if (childNode.type === contentNodeType) { - if (childNode.attrs.id) { - $element.appendChild(this.serializeNode(childNode)) - } - } else if (childNode.type === node.type.schema.nodes.paragraph) { - $element.appendChild(this.serializeNode(childNode)) - } else if (childNode.type === node.type.schema.nodes.missing_figure) { - $element.appendChild(this.serializeNode(childNode)) - } - }) - } - const createElement = (node: ManuscriptNode, nodeName: string) => { - const $element = this.createElement(nodeName) - $element.setAttribute('id', normalizeID(node.attrs.id)) - return $element - } + } - const appendLabels = ($element: Element, node: ManuscriptNode) => { - if (this.labelTargets) { - const target = this.labelTargets.get(node.attrs.id) + appendLabels($element: Element, node: ManuscriptNode) { + if (this.labelTargets) { + const target = this.labelTargets.get(node.attrs.id) - if (target) { - const $label = this.createElement('label') - $label.textContent = target.label - $element.appendChild($label) - } + if (target) { + const $label = this.createElement('label') + $label.textContent = target.label + $element.appendChild($label) } } - const appendAttributions = ($element: Element, node: ManuscriptNode) => { - if (node.attrs.attribution) { - const $attrib = this.createElement('attrib') - $attrib.textContent = node.attrs.attribution.literal - $element.appendChild($attrib) - } + } + appendAttributions($element: Element, node: ManuscriptNode) { + if (node.attrs.attribution) { + const $attrib = this.createElement('attrib') + $attrib.textContent = node.attrs.attribution.literal + $element.appendChild($attrib) } + } - const appendTable = ($element: Element, node: ManuscriptNode) => { - const tableNode = this.getFirstChildOfType(schema.nodes.table, node) - const colGroupNode = this.getFirstChildOfType( - schema.nodes.table_colgroup, - node - ) - if (!tableNode) { - return - } - const $table = this.serializeNode(tableNode) - const $tbody = this.createElement('tbody') - - while ($table.firstChild) { - const $child = $table.firstChild - $table.removeChild($child) - $tbody.appendChild($child) - } - $table.appendChild($tbody) - this.normalizeTable($table) - if (colGroupNode) { - const $colGroup = this.serializeNode(colGroupNode) - $table.insertBefore($colGroup, $table.firstChild) - } + appendTable($element: Element, node: ManuscriptNode) { + const tableNode = this.getFirstChildOfType(schema.nodes.table, node) + const colGroupNode = this.getFirstChildOfType( + schema.nodes.table_colgroup, + node + ) + if (!tableNode) { + return + } + const $table = this.serializeNode(tableNode) + const $tbody = this.createElement('tbody') - $element.appendChild($table) + while ($table.firstChild) { + const $child = $table.firstChild + $table.removeChild($child) + $tbody.appendChild($child) + } + $table.appendChild($tbody) + this.normalizeTable($table) + if (colGroupNode) { + const $colGroup = this.serializeNode(colGroupNode) + $table.insertBefore($colGroup, $table.firstChild) } - const createBoxElement = (node: ManuscriptNode) => { - const $boxedText = createElement(node, 'boxed-text') - if (node.attrs.type) { - $boxedText.setAttribute('content-type', node.attrs.type) - } - appendLabels($boxedText, node) - const child = node.firstChild - if (child?.type === schema.nodes.caption_title) { - this.appendCaption($boxedText, node) - } - processChildNodes($boxedText, node, node.type.schema.nodes.section) - return $boxedText + $element.appendChild($table) + } + createBoxElement(node: ManuscriptNode) { + const $boxedText = this.createElementWithID(node, 'boxed-text') + if (node.attrs.type) { + $boxedText.setAttribute('content-type', node.attrs.type) + } + this.appendLabels($boxedText, node) + const child = node.firstChild + if (child?.type === schema.nodes.caption_title) { + this.appendCaption($boxedText, node) } - const abstractTypeAttrs = (category: string) => - category && category !== 'abstract' ? { 'abstract-type': category } : {} + this.processChildNodes($boxedText, node, node.type.schema.nodes.section) + return $boxedText + } - const createAbstract = (node: ManuscriptNode): DOMOutputSpec => [ - 'abstract', - abstractTypeAttrs(node.attrs.category), - 0, - ] + abstractTypeAttrs(category: string) { + return category && category !== 'abstract' + ? { 'abstract-type': category } + : {} + } + createAbstract(node: ManuscriptNode): DOMOutputSpec { + return ['abstract', this.abstractTypeAttrs(node.attrs.category), 0] + } - const createTransAbstract = (node: ManuscriptNode): DOMOutputSpec => [ + createTransAbstract(node: ManuscriptNode): DOMOutputSpec { + return [ 'trans-abstract', { [`${XML_NAMESPACE} lang`]: node.attrs.lang ?? '', - ...abstractTypeAttrs(node.attrs.category), + ...this.abstractTypeAttrs(node.attrs.category), }, 0, ] + } - const isChildOfNodeType = ( - targetID: string, - type: NodeType, - descend = false - ) => { - const nodes = this.getChildrenOfType(type) - return nodes.some((node) => { - const result = findChildrenByAttr( - node, - (attrs) => attrs.id === targetID, - descend - )[0] - return !!result - }) + createImage(node: ManuscriptNode) { + const graphicNode = node.content.firstChild + if (!graphicNode) { + return '' } - - const findParentHeroImage = (targetID: string) => { - const heroes = this.getChildrenOfType(schema.nodes.hero_image) - return heroes.find( - (hero) => - !!findChildrenByAttr(hero, (attrs) => attrs.id === targetID)[0] - ) + const $graphic = this.createGraphic(graphicNode) + if (node.attrs.extLink) { + const $extLink = this.appendElement($graphic, 'ext-link') + $extLink.setAttributeNS(XLINK_NAMESPACE, 'href', node.attrs.extLink) } + this.appendCaption($graphic, node) + this.appendChildNodeOfType($graphic, node, schema.nodes.alt_text) + this.appendChildNodeOfType($graphic, node, schema.nodes.long_desc) + return $graphic + } - const createImage = (node: ManuscriptNode) => { - const graphicNode = node.content.firstChild - if (!graphicNode) { - return '' - } - const $graphic = createGraphic(graphicNode) - if (node.attrs.extLink) { - const $extLink = this.appendElement($graphic, 'ext-link') - $extLink.setAttributeNS(XLINK_NAMESPACE, 'href', node.attrs.extLink) - } - this.appendCaption($graphic, node) - this.appendChildNodeOfType($graphic, node, schema.nodes.alt_text) - this.appendChildNodeOfType($graphic, node, schema.nodes.long_desc) - return $graphic - } - - const createGraphic = (node: ManuscriptNode) => { - const $graphic = this.createElement('graphic') - $graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src) - - const hero = findParentHeroImage(node.attrs.id) - if (hero) { - $graphic.setAttribute('content-type', hero.attrs.type || 'leading') - } else if ( - !isChildOfNodeType(node.attrs.id, schema.nodes.figure_element) && - node.attrs.type - ) { - $graphic.setAttribute('content-type', node.attrs.type) - } - return $graphic - } - const createFigureElement = ( - node: ManuscriptNode, - contentNodeType: ManuscriptNodeType - ) => { - const $fig = createElement(node, 'fig') - const figNode = this.getFirstChildOfType(schema.nodes.figure, node) - const figType = figNode?.attrs.type - if (figType) { - $fig.setAttribute('fig-type', figType) - } - appendLabels($fig, node) - this.appendCaption($fig, node) - this.appendChildNodeOfType($fig, node, schema.nodes.alt_text) - this.appendChildNodeOfType($fig, node, schema.nodes.long_desc) - this.appendChildNodeOfType( - $fig, - node, - node.type.schema.nodes.footnotes_element - ) - processChildNodes($fig, node, contentNodeType) - appendAttributions($fig, node) - if (isExecutableNodeType(node.type)) { - processExecutableNode(node, $fig) - } - moveAltTextAndLongDescToGraphics($fig) - return $fig + createFigureElement( + node: ManuscriptNode, + contentNodeType: ManuscriptNodeType + ) { + const $fig = this.createElementWithID(node, 'fig') + const figNode = this.getFirstChildOfType(schema.nodes.figure, node) + const figType = figNode?.attrs.type + if (figType) { + $fig.setAttribute('fig-type', figType) + } + this.appendLabels($fig, node) + this.appendCaption($fig, node) + this.appendChildNodeOfType($fig, node, schema.nodes.alt_text) + this.appendChildNodeOfType($fig, node, schema.nodes.long_desc) + this.appendChildNodeOfType( + $fig, + node, + node.type.schema.nodes.footnotes_element + ) + this.processChildNodes($fig, node, contentNodeType) + this.appendAttributions($fig, node) + if (isExecutableNodeType(node.type)) { + this.processExecutableNode(node, $fig) } + this.moveAltTextAndLongDescToGraphics($fig) + return $fig + } - const moveAltTextAndLongDescToGraphics = ($element: Element) => { - const $altText = $element.querySelector('alt-text') - const $longDesc = $element.querySelector('long-desc') - const $graphics = $element.querySelectorAll('graphic') + moveAltTextAndLongDescToGraphics($element: Element) { + const $altText = $element.querySelector('alt-text') + const $longDesc = $element.querySelector('long-desc') + const $graphics = $element.querySelectorAll('graphic') - if ($graphics.length === 0) { - return + if ($graphics.length === 0) { + return + } + + $graphics.forEach(($graphic) => { + if ($longDesc) { + $graphic.prepend($longDesc.cloneNode(true)) + } + if ($altText) { + $graphic.prepend($altText.cloneNode(true)) } + }) - $graphics.forEach(($graphic) => { - if ($longDesc) { - $graphic.prepend($longDesc.cloneNode(true)) - } - if ($altText) { - $graphic.prepend($altText.cloneNode(true)) - } - }) + $altText?.remove() + $longDesc?.remove() + } - $altText?.remove() - $longDesc?.remove() - } - - const createTableElement = (node: ManuscriptNode) => { - const nodeName = 'table-wrap' - const $tableWrap = createElement(node, nodeName) - appendLabels($tableWrap, node) - this.appendCaption($tableWrap, node) - this.appendChildNodeOfType($tableWrap, node, schema.nodes.alt_text) - this.appendChildNodeOfType($tableWrap, node, schema.nodes.long_desc) - appendTable($tableWrap, node) - this.appendChildNodeOfType( - $tableWrap, - node, - node.type.schema.nodes.table_element_footer - ) - if (isExecutableNodeType(node.type)) { - processExecutableNode(node, $tableWrap) - } - return $tableWrap + createTableElement(node: ManuscriptNode) { + const nodeName = 'table-wrap' + const $tableWrap = this.createElementWithID(node, nodeName) + this.appendLabels($tableWrap, node) + this.appendCaption($tableWrap, node) + this.appendChildNodeOfType($tableWrap, node, schema.nodes.alt_text) + this.appendChildNodeOfType($tableWrap, node, schema.nodes.long_desc) + this.appendTable($tableWrap, node) + this.appendChildNodeOfType( + $tableWrap, + node, + node.type.schema.nodes.table_element_footer + ) + if (isExecutableNodeType(node.type)) { + this.processExecutableNode(node, $tableWrap) } - const processExecutableNode = (node: ManuscriptNode, $element: Element) => { - const listingNode = this.getFirstChildOfType(schema.nodes.listing, node) + return $tableWrap + } + processExecutableNode(node: ManuscriptNode, $element: Element) { + const listingNode = this.getFirstChildOfType(schema.nodes.listing, node) - if (listingNode) { - const { contents, languageKey } = listingNode.attrs + if (listingNode) { + const { contents, languageKey } = listingNode.attrs - if (contents && languageKey) { - const $fig = this.createElement('fig') - $fig.setAttribute('specific-use', 'source') - $element.appendChild($fig) + if (contents && languageKey) { + const $fig = this.createElement('fig') + $fig.setAttribute('specific-use', 'source') + $element.appendChild($fig) - const $code = this.createElement('code') - $code.setAttribute('executable', 'true') - $code.setAttribute('language', languageKey) - $code.textContent = contents - $fig.appendChild($code) - } + const $code = this.createElement('code') + $code.setAttribute('executable', 'true') + $code.setAttribute('language', languageKey) + $code.textContent = contents + $fig.appendChild($code) } } } @@ -1407,11 +1232,6 @@ export class JATSExporter { } } - protected serializeNode = (node: ManuscriptNode) => - this.serializer.serializeNode(node, { - document: this.document, - }) - private buildContributorGroup = (contributors: ContributorNode[]) => { if (!contributors.length) { return @@ -1481,6 +1301,52 @@ export class JATSExporter { return $sup } + private buildBioElement = (bio: BioNode) => { + const $bio = this.createElement('bio') + if (!bio.firstChild) { + return null + } + bio.children.forEach((node) => { + switch (node.type) { + case schema.nodes.paragraph: { + $bio.append(this.writeParagraph(node as ParagraphNode)) + break + } + case schema.nodes.image_element: { + $bio.append(this.createGraphic(node as FootnoteNode)) + break + } + default: + return + } + }) + return $bio + } + + private createGraphic(node: ManuscriptNode) { + const $graphic = this.createElement('graphic') + $graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src) + + const findParentHeroImage = (targetID: string) => { + const heroes = this.getChildrenOfType(schema.nodes.hero_image) + return heroes.find( + (hero) => + !!findChildrenByAttr(hero, (attrs) => attrs.id === targetID)[0] + ) + } + + const hero = findParentHeroImage(node.attrs.id) + if (hero) { + $graphic.setAttribute('content-type', hero.attrs.type || 'leading') + } else if ( + !this.isChildOfNodeType(node.attrs.id, schema.nodes.figure_element) && + node.attrs.type + ) { + $graphic.setAttribute('content-type', node.attrs.type) + } + return $graphic + } + private buildContributorElement = (contributor: ContributorNode) => { const $contrib = this.createElement('contrib') $contrib.setAttribute('contrib-type', 'author') @@ -1561,6 +1427,13 @@ export class JATSExporter { }) }) + const bio = this.buildBioElement( + this.getChildrenOfType(schema.nodes.bio, contributor)[0] + ) + if (bio) { + $contrib.appendChild(bio) + } + return $contrib } @@ -1726,18 +1599,6 @@ export class JATSExporter { this.serializeNode(group) ) - private changeTag = ($node: Element, tag: string) => { - const $clone = this.createElement(tag) - for (const attr of $node.attributes) { - $clone.setAttributeNS(null, attr.name, attr.value) - } - while ($node.firstChild) { - $clone.appendChild($node.firstChild) - } - $node.replaceWith($clone) - return $clone - } - private normalizeTable = ($table: Node) => { let $tbody: Element | undefined @@ -1836,18 +1697,6 @@ export class JATSExporter { } } - private fillEmptyElements( - $article: Element, - selector: string, - tagName = 'p' - ) { - const $empty = Array.from($article.querySelectorAll(selector)).filter( - ($el) => !$el.innerHTML - ) - $empty.forEach(($element) => - $element.appendChild(this.createElement(tagName)) - ) - } private addParagraphsToSections($article: Element) { const $sections = $article.querySelectorAll('sec, abstract') const TITLE_TAGS = new Set(['title', 'label', 'sec-meta']) diff --git a/src/jats/exporter/lib.ts b/src/jats/exporter/lib.ts new file mode 100644 index 00000000..c774f321 --- /dev/null +++ b/src/jats/exporter/lib.ts @@ -0,0 +1,85 @@ +/*! + * © 2026 Atypon Systems LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/*! + * © 2026 Atypon Systems LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { ManuscriptNodeType, schema } from '../../schema' +import { IDGenerator } from '../types' + +export const normalizeID = (id: string) => id.replace(/:/g, '_') + +export const createCounter = () => { + const counts = new Map() + + return { + increment: (field: string) => { + const value = counts.get(field) + const newValue = value === undefined ? 1 : value + 1 + counts.set(field, newValue) + return newValue + }, + } +} + +export const createDefaultIDGenerator = (): IDGenerator => { + const counter = createCounter() + + return async (element: Element) => { + const value = String(counter.increment(element.nodeName)) + + return `${element.localName}-${value}` + } +} + +export const chooseRefType = (type: ManuscriptNodeType): string | undefined => { + switch (type) { + case schema.nodes.figure: + case schema.nodes.figure_element: + return 'fig' + + case schema.nodes.footnote: + return 'fn' + + case schema.nodes.table: + case schema.nodes.table_element: + return 'table' + + case schema.nodes.section: + case schema.nodes.abstract: + return 'sec' + + case schema.nodes.equation: + case schema.nodes.equation_element: + return 'disp-formula' + + case schema.nodes.supplement: + return 'supplementary-material' + } +} diff --git a/src/jats/importer/jats-dom-parser.ts b/src/jats/importer/jats-dom-parser.ts index 0e535caf..e3e31d7c 100644 --- a/src/jats/importer/jats-dom-parser.ts +++ b/src/jats/importer/jats-dom-parser.ts @@ -525,7 +525,7 @@ export class JATSDOMParser { const affiliationIDs: string[] = [] const correspIDs: string[] = [] - const xrefs = element.querySelectorAll('xref') + const xrefs = element.querySelectorAll(':scope > xref') for (const xref of xrefs) { const rid = xref.getAttribute('rid') const type = xref.getAttribute('ref-type') @@ -572,6 +572,15 @@ export class JATSDOMParser { email: getTrimmedTextContent(element, 'email') || '', } }, + getContent: (node) => { + const bio = (node as HTMLElement).querySelector('bio') + if (!bio) { + return Fragment.empty + } + return Fragment.from( + this.parse(bio, { topNode: this.schema.nodes.bio.create() }) + ) + }, }, { tag: 'bio', From 74ab58e6556ab94aa4f1a3332ee2b0d63a83de17 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 16:28:52 +0200 Subject: [PATCH 06/11] clean up --- src/jats/exporter/TreeBase.ts | 43 ++-------------------------- src/jats/importer/jats-dom-parser.ts | 2 +- src/schema/index.ts | 2 +- 3 files changed, 4 insertions(+), 43 deletions(-) diff --git a/src/jats/exporter/TreeBase.ts b/src/jats/exporter/TreeBase.ts index 41d79323..58df2cc8 100644 --- a/src/jats/exporter/TreeBase.ts +++ b/src/jats/exporter/TreeBase.ts @@ -14,49 +14,10 @@ * limitations under the License. */ -import * as Citeproc from 'citeproc' -import { DOMOutputSpec, DOMSerializer, type NodeType } from 'prosemirror-model' +import { DOMSerializer, type NodeType } from 'prosemirror-model' import { findChildrenByAttr, findChildrenByType } from 'prosemirror-utils' -import serializeToXML from 'w3c-xmlserializer' -import { buildCiteprocCitation } from '../../lib/citeproc' -import { CreditRoleUrls } from '../../lib/credit-roles' -import { generateFootnoteLabels } from '../../lib/footnotes' -import { FOOTNOTE_SECTION_CATEGORY_IDS } from '../../lib/section-categories' -import { - sanitizeXmlString, - XLINK_NAMESPACE, - XML_NAMESPACE, -} from '../../lib/xml' -import { - ActualManuscriptNode, - AffiliationNode, - AuthorNotesNode, - AwardNode, - ExtLink, - CitationNode, - ContributorNode, - CorrespNode, - CrossReferenceNode, - FootnoteNode, - isBibliographyItemNode, - isCitationNode, - isNodeOfType, - ManuscriptMark, - ManuscriptNode, - ManuscriptNodeType, - Marks, - Nodes, - ParagraphNode, - QuoteImageNode, - schema, - BioNode, -} from '../../schema' -import { isExecutableNodeType } from '../../transformer' -import { IDGenerator } from '../types' -import { initJats, jatsVariableWrapper } from './citeproc' -import { selectVersionIDs, Version } from './jats-versions' -import { buildTargets, Target } from './labels' +import { isNodeOfType, ManuscriptNode, ManuscriptNodeType } from '../../schema' import { normalizeID } from './lib' export class TreeBase { diff --git a/src/jats/importer/jats-dom-parser.ts b/src/jats/importer/jats-dom-parser.ts index e3e31d7c..f7e23403 100644 --- a/src/jats/importer/jats-dom-parser.ts +++ b/src/jats/importer/jats-dom-parser.ts @@ -1,5 +1,5 @@ /*! - * © 2020 Atypon Systems LLC + * © 2026 Atypon Systems LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/schema/index.ts b/src/schema/index.ts index 4b614722..943fe50d 100644 --- a/src/schema/index.ts +++ b/src/schema/index.ts @@ -1,5 +1,5 @@ /*! - * © 2019 Atypon Systems LLC + * © 2026 Atypon Systems LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From af1328dacb127b822448b4e50e3c5141a6d6920a Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 16:33:05 +0200 Subject: [PATCH 07/11] updates on the right tag usage --- src/jats/exporter/jats-exporter.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jats/exporter/jats-exporter.ts b/src/jats/exporter/jats-exporter.ts index 48fd0f84..ea800851 100644 --- a/src/jats/exporter/jats-exporter.ts +++ b/src/jats/exporter/jats-exporter.ts @@ -1301,9 +1301,9 @@ export class JATSExporter extends TreeBase { return $sup } - private buildBioElement = (bio: BioNode) => { + private buildBioElement = (bio?: BioNode) => { const $bio = this.createElement('bio') - if (!bio.firstChild) { + if (!bio || !bio.firstChild) { return null } bio.children.forEach((node) => { @@ -1313,7 +1313,7 @@ export class JATSExporter extends TreeBase { break } case schema.nodes.image_element: { - $bio.append(this.createGraphic(node as FootnoteNode)) + $bio.append(this.createImage(node)) break } default: @@ -1428,7 +1428,7 @@ export class JATSExporter extends TreeBase { }) const bio = this.buildBioElement( - this.getChildrenOfType(schema.nodes.bio, contributor)[0] + this.getFirstChildOfType(schema.nodes.bio, contributor) ) if (bio) { $contrib.appendChild(bio) From 0ddf8a41a336eac3cd080ad1b8c6b67bef69dd02 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 17:28:09 +0200 Subject: [PATCH 08/11] final adjustments --- .../__snapshots__/jats-roundtrip.test.ts.snap | 4 +- src/jats/__tests__/jats-exporter.test.ts | 36 ++++++ src/jats/exporter/TreeBase.ts | 8 +- src/jats/exporter/jats-exporter.ts | 114 ++++++++++-------- src/jats/exporter/lib.ts | 16 --- 5 files changed, 105 insertions(+), 73 deletions(-) diff --git a/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap b/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap index 9bf593ab..84b324e3 100644 --- a/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap +++ b/src/jats/__tests__/__snapshots__/jats-roundtrip.test.ts.snap @@ -8,10 +8,10 @@ exports[`JATS roundtrip > jats-citations.xml roundtrip 1`] = ` `; exports[`JATS roundtrip > jats-import.xml roundtrip 1`] = ` -"
10.5555/BRB3-2019-12-0787Blood pressure after follow up in a stroke prevention clinicRunning title exampleShort title exampleauthorhttps://orcid.org/0000-0003-2217-5904HornnesAgnete HviidMrJr.RNMPHPhD1Writing – original draftPoulsenMai BangMDPhD12Department of +"
10.5555/BRB3-2019-12-0787Blood pressure after follow up in a stroke prevention clinicRunning title exampleShort title exampleauthorhttps://orcid.org/0000-0003-2217-5904HornnesAgnete HviidMrJr.RNMPHPhD1Writing – original draftHeadshot of Agnete Hviid Hornnes

Agnete is a Professor of Neurology at Herlev og Gentofte Hospital, specializing in stroke research.

PoulsenMai BangMDPhD12Department of Neurology, Herlev og Gentofte Hospital, Borgmester Ib Juuls Vej 1, 2730 - Herlev, Herlev, Denmark, 2730

Mai Bang Poulsen, MD, PhD
Department of Neurology
Nordsjællands Hospital
Dyrehavevej 29
3400 Hillerød
Denmark

ClinicalTrials.gov NCT03782857.

None.

final manuscript-hum-huili-dbh-suicide-20200707_figures (9)2704202009122019Objectives

In Denmark 25% of hospital admissions with stroke are recurrent strokes. With thrombolytic treatment more patients survive with only minor disability. This promising development should be followed up by intensive secondary prevention. Hypertension is the most important target. We aimed at testing the hypotheses that early follow up in a preventive clinic would result in 1) A higher proportion of patients with blood pressure at target, 2) Time to stroke recurrence, myocardial infarction and death would be longer in the intervention group compared to controls.

Materials and Methods

Eligible patients admitted to the stroke unit of Herlev Hospital were randomized shortly before discharge to intervention or control group. Of 78 included participants data from 73 was available for follow up nine months after inclusion. Patients in the intervention group were seen in the clinic within one week. In case of hypertension treatment was initiated or supplied with a new drug. We used individual targets for blood pressure according to diagnosis of stroke and patients’ comorbidity. Patients in the intervention group had a median of five visits to the preventive clinic.

Results

Jane Doe, Ph.D.

Editor

Wiley

Jane Doe, Ph.D.Jack Black

CEO

Generico

Headshot of Jack Black

In the intervention group blood pressure was treated to target in 25 patients (69%) versus 14 (38%) in the control group (p = 0.007). Median time to first event was 44 months (4–49) in the intervention group and 19 months (4–37) in controls (p = 0.316).

Conclusions

Treatment of hypertension to individual targets after stroke is feasible. It may postpone recurrent stroke and death in stroke survivors.

The is the third and last part of the volume devoted to solubility data of rare earth metal chlorides in water and in ternary and quaternary aqueous systems. Compilations of all available experimental data are introduced for each rare earth metal chloride with a corresponding critical evaluation. This part covers chlorides of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, with coverage of the literature through the middle of 2008.

Short

Il s'agit de la troisième et dernière partie du volume consacrée aux données de solubilité des chlorures de métaux des terres rares dans l'eau et dans les systèmes aqueux ternaires et quaternaires. Une compilation de toutes les données expérimentales disponibles est présentée pour chaque chlorure de métaux des terres rares, accompagnée de l'évaluation critique correspondante. Cette partie couvre les chlorures de Gd, Tb, Dy, Ho, Er, Tm, Yb et Lu, avec une couverture de la littérature jusqu'à mi-2008.

secondary preventionstroke recurrenceblood pressureblood pressure targetrandomized controlled trialNational Institutes of HealthGM18458BerkeleyNational Science FoundationDMS-0204674DMS-0244638

simple image

caption

example of alt text for graphicsexample of long desc

test paragraph

It is a far, far better thing that I do now than I have ever done.

Charles Dickens

A standard pullquote.

A half-left pullquote.

A half-right pullquote.

pullquote without content-type

blockquote

INTRODUCTION

Over the last two decades continuous development of thrombolytic treatment of acute ischemic stroke (IS) has improved safety and functional outcome in treated patients 1,2 thus increasing the possibility of survival with no or only minor disability. With this fact and the ongoing aging of populations in mind 3 the secondary prevention after stroke seems more important than ever. In 1998 the Copenhagen Stroke Study reported a recurrence rate of 23%. 4 According to the Danish Stroke Registry our national recurrence rate was 25% in 2011.5

Hypertension is an important risk factor for stroke recurrence. 4,6–8 Lowering blood pressure (BP) after stroke or transitory ischemic attack (TIA) by 10/5 mm Hg has been associated with reduced risk of stroke recurrence by 24% and myocardial infarction (MI) by 21%. 9

Observational studies have demonstrated the difficulties in lowering BP after stroke with rates of BP treated to target ranging from 28% to 73% 10–13 and interventions aimed at control of BP after stroke have not yet found a successful model. 14–19 Fahey and coworkers have reviewed the literature aimed at improving control of BP in hypertensive subjects. One large study using an organized system of regular visits to a clinic was efficient in producing a large decrease in BP and reduction of all-cause mortality compared to referral to usual primary care. This was achieved by using a stepwise escalation of treatment until target was reached. 20 Other methods had variable or no effect, only nurse or pharmacist led care seemed promising.

example of alt text for mediaexample of long descEnglish captions for Video 1Spanish captions for Video 1Aims and hypotheses

The aim of the present study was to test the hypotheses that follow up after stroke in a specialized nurse led physician supervised clinic with stepwise escalation of BP- and lipid lowering treatment would result in

Primary endpointA greater proportion of participants with BP at target

Secondary endpoints: A greater reduction of BP A greater proportion of participants with LDL-cholesterol treated to target A greater reduction of LDL-cholesterol Longer time to recurrence of stroke, MI and death in the intervention group compared to controls

BoxedText test<p/></sec></boxed-text><boxed-text id=\\"boxed-text-2\\" content-type=\\"half-left\\"><label>Box 2</label><caption><title>BoxedTextCaptionTitleKey messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

testing multiple sections inside a boxed-text element

Hello World!

Key messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

MATERIELS AND METHODS

Before the initiation of the study the authors attended a three-day course in treatment of hypertension arranged by the Danish Society of Hypertension. The recommendations of our national guidelines regarding BP targets were in line with those given by the American Stroke Association in force at the time of initiation of the study: “An absolute target BP level and reduction are uncertain and should be individualized.” 21 Following the advice given by the Danish Society of Hypertension we used the following targets: A BP < 140/90 mm Hg was considered at target in non-diabetic patients. In patients aged 80 years or more a BP of 150/90 mm Hg was acceptable if further treatment was not tolerated. In case of severe carotid stenosis or a history of ischemic heart disease BP should not be lower than 130/80 mm Hg. In patients with diabetes or hemorrhagic stroke we aimed at a BP < 130/80 mm Hg. Untreated patients without hypertension were categorized as normotensive, untreated hypertensive patients as having unknown hypertension, treated patients without hypertension as treated to target, and treated patients with hypertension as having untreated hypertension.

LDL-cholesterol should be < 2.5 mmol/l in patients with IS or TIA in non-diabetic patients and in case of diabetes < 2.0 mmol/l.

A sample size calculation showed that 24 patients in each group were needed to show a difference of 10 mm Hg in the development of systolic BP (80% power).

Study sample and setting

From June 2012 to February 2013 all patients diagnosed with a stroke or TIA at the stroke unit of Herlev Gentofte Hospital, University of Copenhagen were considered for inclusion in the study. Patients should be without cognitive deficits that would prevent their active participation and they should be discharged to their own home. The last author used computer-generated block randomization procedures with stratification by hypertension (1:1). The allocation sequence was concealed, and we aimed at equal numbers in the two groups. Shortly before discharge the first author approached eligible patients for oral and written information about the study. Where written informed consent to participation was achieved BP was measured before a concealed envelope administered by a secretary was opened revealing the allocation to either intervention or control group.

The research protocol was approved by the ethics committee of the Capital Region of Denmark (H-3-2011–152) and by the Danish Data Protection Agency (2012–41-0429). The study was conducted according to all common ethical standards including the rules given by the Declaration of Helsinki. Patients randomized to the control group had the usual treatment: one visit in the outpatient clinic of the stroke unit three months after discharge. Patients randomized to the intervention group had an appointment with the first author within one week after discharge. The first author undertook all visits in the preventive clinic.

Procedures and intervention

BP was measured at every visit after at least five minutes rest in a sitting position in an arm chair. BP was measured simultaneously in both arms followed by two measurements with 10-min intervals using the arm with the highest systolic BP. In case of hypertension the first author would suggest initiation or intensification of antihypertensive treatment. The last author would accept or suggest an alternative and do the prescription. Patients would come to the clinic for control of BP and relevant blood tests every 3–4 weeks until BP was at target. After five weeks on lipid lowering drugs treatment was intensified if needed. Patients who did not tolerate lipid lowering medication were referred to a dietitian. In motivated patients home BP measurements were performed using patients’ own monitor or by lending patients a BP monitor between visits.

Patients in the intervention group had a mean of five visits to the clinic with addition of new drugs rather than adding more of the same drug in case of hypertension. Although we used minimum doses to prevent adverse effects, many patients had unacceptable side effects necessitating change to another class of antihypertensive drug.

Patients were informed about the importance of life-long adherence with all preventive medication. Those with elevated BP or receiving antihypertensive treatment were advised in salt reduction, smokers were advised to stop smoking and all patients were informed about the benefits of 30 min of moderate physical activity daily. Likewise, information about the risk of an intake of alcohol above seven drinks per week in women and 14 drinks in men was part of the program as well as the benefits of weight reduction in overweight patients with hypertension or diabetes.

Follow up

Participants in both groups were invited to the usual follow up visit three months after discharge at the outpatient clinic of the stroke unit as well as a follow up visit in the study a median of 9 (IQR 8–11) months after inclusion.

In accordance with the protocol the final follow up visits were performed by nurses in the outpatient clinic with measurement of BP and blood-cholesterols. Patients were asked not to reveal their group allocation but blinding of the nurses was not possible. Patients were interviewed about adherence to all preventive medications as well as their present life style. For practical purposes a minority of visits were performed by the first author. To do intention to treat analyses we used last observation carried forward regarding the endpoints of the study where patients had died or did not respond to the invitation to a follow up visit. Thus, we used the last recorded values in five patients in the intervention group and in seven controls.

After a median of 65 months (IQR: 61–66) from inclusion data on vascular events and death were attained from the hospital based medical records covering all hospitals of the region.

Statistics

Data were entered into Excel and imported into SAS. Statistical analyses were performed by the first author according to a pre-established statistical analysis plan. We used Chi square test (for the primary outcome) or Fisher’s exact test as appropriate for comparison of proportions, and for change from baseline we used McNemar’s test. For continuous variables we used t-test or Mann-Whitney’s test*. Change from baseline was analyzed by the paired t-test or Wilcoxon signed rank sum test* (*where data were not normally distributed). We used SAS 9.4 for Windows and p < 0.05 was considered significant.

RESULTS

We included 78 patients in the study. Due to revision of stroke diagnoses in four participants and as one participant never turned up for the intervention, data on 73 participants were available for follow up (Figure 1). The median stay in hospital was 4 days (IQR: 3–6). As seen from Table 1 most participants had no or slight disability.

Flow chart of participants

example of alt text for graphics inside figuresexample of long desc for graphics inside figures
Baseline characteristics of 73 patientsexample of alt text for tablesexample of long desc

Characteristics

All(n = 73)

Intervention (n = 36)

Control (n = 37)

P

Sex, female

29 (40)

15 (42)

14 (38)

0.74

Age (years), mean ± SD

66 ± 12

63 ± 13

68 ± 11

0.08

Length of education< 10 years10 – 12 years> 12 years

12 (17)22 (30)38 (53)

6 (17)10 (29)19 (54)

6 (16)12 (33)19 (51)

0.95

Diagnosis of strokeIschemic StrokeTIAHemorrhagic stroke

63 (87)9 (12)1 (1)

33 (92)3 (8)

30 (81)6 (16)1 (3)

0.60a

Recurrent stroke

11 (15)

5 (14)

6 (16)

1.00a

Modified Rankin Scale score > 2

5 (6)

1 (3)

4 (11)

0.36a

Antihypertensive medication before stroke

39 (53)

15 (42)

24 (65)

0.047

Antihypertensive medication at discharge

46 (63)

20 (56)

26 (70)

0.19

Cholesterol lowering medication before stroke

25 (34)

11 (31)

14 (38)

0.51

Cholesterol lowering medication at discharge

65 (89)

35 (97)

30 (81)

0.03

Diabetes at baseline

14 (19)

5 (14)

9 (24)

0.37a

Diabetes at discharge

16 (22)

6 (17)

10 (27)

0.29

Atrial fibrillation at baseline

7 (10)

3 (8)

4 (11)

1.00a

Atrial fibrillation at discharge

12 (16)

6 (16)

6 (17)

1.00

Unhealthy dietingb

59 (82)

25 (71)

34 (92)

0.03

Current smoking

19 (26)

11 (31)

8 (22)

0.62

Alcohol above limitsc

23 (32)

12 (34)

11 (30)

0.68

Sedentary lifestyled

17 (24)

9 (26)

8 (22)

0.68

BMI ≥ 25

46 (63)

24 (67)

22 (59)

0.52

Self-rated health: fair, poor, or very poor

34 (47)

15 (43)

19 (51)

0.47

Values are expressed as frequencies (%) or as mean ± standard deviations

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Less than 20% of patients had a baseline BP treated to target (Figure 2). Twenty-eight patients (78%) in the intervention group and 29 patients (78%) in the control group had a 3-month visit in the outpatient clinic. Here 15 patients (42%) in the intervention group had their BP and blood cholesterol measured and so had 23 patients (62%) in the control group. At follow up patients in both groups reported a median of two visits including BP measurement at the general practitioner´s office since discharge from hospital.

Blood pressure and treatment of hypertension at baseline in 73 patients (%)

Primary endpoint

Follow up visits showed that 25 patients (69%) in the intervention group had a BP at target versus 14 (38%) of controls (p = 0.007). In four patients (10%) in the intervention group antihypertensive medication remained unchanged since discharge versus 23 (62%) of controls (p < 0.0001) illustrated by the differences in BP treated to target as well as untreated hypertension in Figure 3.

Blood pressure and treatment of hypertension at follow up in 73 patients (%)

Secondary endpoints

Median reduction in systolic BP was 11 mm Hg (-5-19) with 14 mm Hg (IQR: 5–21) in the intervention group and 3 mm Hg (IQR -11-17) in the control group (p = 0.045). Median reduction in diastolic BP was 2 mm Hg (-2-11) with 7 mm Hg (IQR -1-13) in the intervention group and 1 mm Hg (IQR -6-8) in the control group (p = 0.04).

There was no difference between the groups regarding LDL-cholesterol treated to target with 32 patients (89%) at target in the intervention group versus 29 patients (78%) in the control group (p = 0.21). We found significant reductions in LDL-cholesterol in both groups, but no difference between the groups: 1.6 (IQR: 0.4–2.2) mmol/l in the intervention group versus 0.8 (IQR: 0.4–1.8) mmol/l among controls (p = 0.18).

In 11 patients (31%) in the intervention group cholesterol lowering medication remained unchanged since discharge versus 29 (78%) of controls (p < 0.0001).

The combined endpoint of both BP and LDL-cholesterol at target was achieved in 22 (61%) of patients in the intervention group and in 10 patients (27%) in the control group (p = 0.003). At the end of the study 24 patients (68%) in the intervention group measured their BP at home versus 14 (38%) of controls (p = 0.03).

The only significant change in lifestyle was a reduction in current smokers by four in the control group (Table 2).

Nine months follow up of 73 patients

Characteristics

All(n = 73)

Intervention(n = 36)

Control(n = 37)

P

Systolic BP, mm Hg, mean ± SD

134 ± 21

130 ± 17

137 ± 24

0.12

Diastolic BP, mm Hg, mean ± SD

78 ± 11

78 ± 10

78 ± 12.8)

0.94

Antihypertensive medication

55 (75)

29 (81)

26 (70)

0.31

100% compliance with AHM (n = 45)

38 (84)

23 (89)

15 (79)

0.38

LDL-cholesterol, mmol/l (n = 72), mean ± SD

1.9 ± 0.8

1.9 ± 0.7

2.0 ± 0.8

0.66

Cholesterol lowering medication

64 (88)

32 (89)

32 (86)

0.76

100% compliance with CLM (n = 52)

46 (89)

24 (86)

22 (92)

0.50

Unhealthy dietingb

59 (81)

26 (72)

33 (89)

0.76

Current smoker

15 (21)

11 (31)

4 (11)

0.046a

Alcohol > limitsc

20 (27)

11 (31)

9 (24)

0.55

Sedentary lifestyled

16 (22)

7 (20)

9 (24)

0.66

BMI ≥ 25

43 (59)

21 (58)

22 (60)

0.92

Values are expressed as frequencies (%) or as mean ± standard deviations.
Abbreviations: AHM, antihypertensive medication; CLM, cholesterol lowering medication.

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Regarding vascular complications and death, we found 32 events in 22 patients after a median of 65 months. Median time to first event was 26 months (IQR: 4–49) with a median of 44 months (IQR: 11–49) in the intervention group and 19 months (IQR: 4–37) in the control group (p = 0.32). All in all, we found 11 events in nine patients in the intervention group: two recurrent strokes, three cases of TIA, and six patients died versus 21 events in 13 patients in the control group: seven recurrent strokes, five cases of TIA, one MI, and seven patients died (p = 0.49).

DISCUSSION

In this randomized clinical trial, a larger proportion of patients in the intervention group compared to controls had BP within the above-mentioned limits and the study fulfilled the aim of the primary endpoint.

A systematic review of interventions aimed at modifiable risk factor control for secondary prevention of stroke revealed improvement in achieving BP target. 22 However, as opposed to our study the review showed no significant change in systolic og diastolic BP.

In a study of integrated care with five prearranged visits to patients’ general practitioner versus usual care systolic BP at target set to 140 mm Hg was found in 75% versus 58% at 12-month follow up. 19 We set individual targets for BP according to patients’ type of stroke, comorbidities and age. This is well in line with recommendations given by European Society of Hypertension, 23 but as stated by Boan et al., not quite in accordance with international stroke guidelines. 24

In a study where patients with minor stroke were randomized to six clinic visits by a pharmacist (intervention) or by a nurse (active control) aiming at treating both BP and LDL-cholesterol to target, 43% of patients in the pharmacist-led clinic met those two targets and so did 31% in the nurse-led clinic. 25 In our study this combined endpoint was met in 22 (61%) of patients in the intervention group. Regarding BP in control 80% of patients in the pharmacist led clinic had systolic BP in control after six months versus 90% in the nurse led clinic. This is a far greater proportion than the 69% in our study. However, almost two thirds of patients had a baseline BP within the limits. The opposite was the case in our study with two thirds presenting with elevated BP. Both studies show that a dedicated follow up with stepwise escalation of preventive medication may be the way to reach the targets of the two important risk factors for recurrent stroke. In both studies five-six visits were needed, which is far beyond our usual treatment. However, despite visits to the outpatient clinic as well as to the general practitioner the proportion of patients with unchanged medication since discharge in the control group illustrate the necessity of frequent visits to a dedicated preventive facility. Considering the preventive effect of BP lowering, and - though insignificant - the difference in time to first event as well as the smaller proportion of events in the intervention group as found in our study, it may be well worth the time and resources for patients, their relatives and society.

Strengths and limitations

Our study has some limitations. Most participants had a minor stroke and patients had to be independent and without severe cognitive deficits, which is not representative of a general stroke population. With only 73 participants caution is called for in the drawing of conclusions from the results. Nonetheless, we decided to reorganize the outpatient clinic of our stroke unit as of October 2014 implementing strategies of the present study.

The strength of the study is the individual target for BP taking into account the diagnosis of stroke as well as important comorbidity as recommended by Boan et al. 24 Five-year follow up on vascular complications and death is another important advantage.

CONCLUSIONS

In conclusion, the feasibility study has demonstrated that timely follow up of stroke patients in a dedicated preventive outpatient clinic may result in BP and cholesterol treated to target in most patients. To some extent it may postpone time to stroke recurrence, MI and death.

ACKNOWLEDGMENTS

None.21

DATA AVAILABILITY

The data that support the findings of this study are not available due to national privacy or ethical restrictions.

Agnete Hviid Hornnes, Email: agnete.hviid.hornnes@regionh.dk https//orcid.org/0000-0003-2217-5904
Mai Bang Poulsen, Email: mai.bang.poulsen.02@regionh.dk

Both authors have made substantial contributions to conception and design and acquisitions and analyses and interpretation of data and have; and been involved in writing the manuscript and given final approval of the version to be published. Both authors have participated sufficiently in the work to take public responsibility for the content; and agree to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.

Wahlgren N, Ahmed N, Eriksson N, et al. Multivariable analysis of outcome predictors and adjustment Stroke. 2008;39:3316-3322. doi:https://doi.org/10.1161/STROKEAHA.107.510768Wahlgren N. Systemic thrombolysis in clinical Cerebrovascular Diseases (Basel, Switzerland). 2009;27:168-176. doi:https://doi.org/10.1159/000200456Thorvaldsen P, Davidsen M, Brønnum-Hansen H, Schroll M. Stable stroke occurrence despite Stroke. 1999;30:2529-2534. doi:https://doi.org/10.1161/01.STR.30.12.2529Jørgensen HS, Nakayama H, Reith J, Raaschou HO, Olsen TS. Stroke recurrence: Predictors, severity, and prognosis. The Neurology. 1997;48:891-895. doi:https://doi.org/10.1212/WNL.48.4.891Danish Stroke Registry. Danish Stroke + Herlev, Herlev, Denmark, 2730

Mai Bang Poulsen, MD, PhD
Department of Neurology
Nordsjællands Hospital
Dyrehavevej 29
3400 Hillerød
Denmark

ClinicalTrials.gov NCT03782857.

None.

final manuscript-hum-huili-dbh-suicide-20200707_figures (9)2704202009122019Objectives

In Denmark 25% of hospital admissions with stroke are recurrent strokes. With thrombolytic treatment more patients survive with only minor disability. This promising development should be followed up by intensive secondary prevention. Hypertension is the most important target. We aimed at testing the hypotheses that early follow up in a preventive clinic would result in 1) A higher proportion of patients with blood pressure at target, 2) Time to stroke recurrence, myocardial infarction and death would be longer in the intervention group compared to controls.

Materials and Methods

Eligible patients admitted to the stroke unit of Herlev Hospital were randomized shortly before discharge to intervention or control group. Of 78 included participants data from 73 was available for follow up nine months after inclusion. Patients in the intervention group were seen in the clinic within one week. In case of hypertension treatment was initiated or supplied with a new drug. We used individual targets for blood pressure according to diagnosis of stroke and patients’ comorbidity. Patients in the intervention group had a median of five visits to the preventive clinic.

Results

Jane Doe, Ph.D.

Editor

Wiley

Jane Doe, Ph.D.Jack Black

CEO

Generico

Headshot of Jack Black

In the intervention group blood pressure was treated to target in 25 patients (69%) versus 14 (38%) in the control group (p = 0.007). Median time to first event was 44 months (4–49) in the intervention group and 19 months (4–37) in controls (p = 0.316).

Conclusions

Treatment of hypertension to individual targets after stroke is feasible. It may postpone recurrent stroke and death in stroke survivors.

The is the third and last part of the volume devoted to solubility data of rare earth metal chlorides in water and in ternary and quaternary aqueous systems. Compilations of all available experimental data are introduced for each rare earth metal chloride with a corresponding critical evaluation. This part covers chlorides of Gd, Tb, Dy, Ho, Er, Tm, Yb, and Lu, with coverage of the literature through the middle of 2008.

Short

Il s'agit de la troisième et dernière partie du volume consacrée aux données de solubilité des chlorures de métaux des terres rares dans l'eau et dans les systèmes aqueux ternaires et quaternaires. Une compilation de toutes les données expérimentales disponibles est présentée pour chaque chlorure de métaux des terres rares, accompagnée de l'évaluation critique correspondante. Cette partie couvre les chlorures de Gd, Tb, Dy, Ho, Er, Tm, Yb et Lu, avec une couverture de la littérature jusqu'à mi-2008.

secondary preventionstroke recurrenceblood pressureblood pressure targetrandomized controlled trialNational Institutes of HealthGM18458BerkeleyNational Science FoundationDMS-0204674DMS-0244638

simple image

caption

example of alt text for graphicsexample of long desc

test paragraph

It is a far, far better thing that I do now than I have ever done.

Charles Dickens

A standard pullquote.

A half-left pullquote.

A half-right pullquote.

pullquote without content-type

blockquote

INTRODUCTION

Over the last two decades continuous development of thrombolytic treatment of acute ischemic stroke (IS) has improved safety and functional outcome in treated patients 1,2 thus increasing the possibility of survival with no or only minor disability. With this fact and the ongoing aging of populations in mind 3 the secondary prevention after stroke seems more important than ever. In 1998 the Copenhagen Stroke Study reported a recurrence rate of 23%. 4 According to the Danish Stroke Registry our national recurrence rate was 25% in 2011.5

Hypertension is an important risk factor for stroke recurrence. 4,6–8 Lowering blood pressure (BP) after stroke or transitory ischemic attack (TIA) by 10/5 mm Hg has been associated with reduced risk of stroke recurrence by 24% and myocardial infarction (MI) by 21%. 9

Observational studies have demonstrated the difficulties in lowering BP after stroke with rates of BP treated to target ranging from 28% to 73% 10–13 and interventions aimed at control of BP after stroke have not yet found a successful model. 14–19 Fahey and coworkers have reviewed the literature aimed at improving control of BP in hypertensive subjects. One large study using an organized system of regular visits to a clinic was efficient in producing a large decrease in BP and reduction of all-cause mortality compared to referral to usual primary care. This was achieved by using a stepwise escalation of treatment until target was reached. 20 Other methods had variable or no effect, only nurse or pharmacist led care seemed promising.

example of alt text for mediaexample of long descEnglish captions for Video 1Spanish captions for Video 1Aims and hypotheses

The aim of the present study was to test the hypotheses that follow up after stroke in a specialized nurse led physician supervised clinic with stepwise escalation of BP- and lipid lowering treatment would result in

Primary endpointA greater proportion of participants with BP at target

Secondary endpoints: A greater reduction of BP A greater proportion of participants with LDL-cholesterol treated to target A greater reduction of LDL-cholesterol Longer time to recurrence of stroke, MI and death in the intervention group compared to controls

BoxedText test<p/></sec></boxed-text><boxed-text id=\\"boxed-text-2\\" content-type=\\"half-left\\"><label>Box 2</label><caption><title>BoxedTextCaptionTitleKey messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

testing multiple sections inside a boxed-text element

Hello World!

Key messages

The benefits of geriatric day hospital care have been controversial for many years.

This systematic review of 12 randomised trials comparing a variety of day hospitals with a range of alternative services found no overall advantage for day hospital care.

Day hospitals had a possible advantage over no comprehensive care in terms of death or poor outcome, disability, and use of resources.

The costs of day hospital care may be partly offset by a reduced use of hospital beds and institutional care among survivors.

MATERIELS AND METHODS

Before the initiation of the study the authors attended a three-day course in treatment of hypertension arranged by the Danish Society of Hypertension. The recommendations of our national guidelines regarding BP targets were in line with those given by the American Stroke Association in force at the time of initiation of the study: “An absolute target BP level and reduction are uncertain and should be individualized.” 21 Following the advice given by the Danish Society of Hypertension we used the following targets: A BP < 140/90 mm Hg was considered at target in non-diabetic patients. In patients aged 80 years or more a BP of 150/90 mm Hg was acceptable if further treatment was not tolerated. In case of severe carotid stenosis or a history of ischemic heart disease BP should not be lower than 130/80 mm Hg. In patients with diabetes or hemorrhagic stroke we aimed at a BP < 130/80 mm Hg. Untreated patients without hypertension were categorized as normotensive, untreated hypertensive patients as having unknown hypertension, treated patients without hypertension as treated to target, and treated patients with hypertension as having untreated hypertension.

LDL-cholesterol should be < 2.5 mmol/l in patients with IS or TIA in non-diabetic patients and in case of diabetes < 2.0 mmol/l.

A sample size calculation showed that 24 patients in each group were needed to show a difference of 10 mm Hg in the development of systolic BP (80% power).

Study sample and setting

From June 2012 to February 2013 all patients diagnosed with a stroke or TIA at the stroke unit of Herlev Gentofte Hospital, University of Copenhagen were considered for inclusion in the study. Patients should be without cognitive deficits that would prevent their active participation and they should be discharged to their own home. The last author used computer-generated block randomization procedures with stratification by hypertension (1:1). The allocation sequence was concealed, and we aimed at equal numbers in the two groups. Shortly before discharge the first author approached eligible patients for oral and written information about the study. Where written informed consent to participation was achieved BP was measured before a concealed envelope administered by a secretary was opened revealing the allocation to either intervention or control group.

The research protocol was approved by the ethics committee of the Capital Region of Denmark (H-3-2011–152) and by the Danish Data Protection Agency (2012–41-0429). The study was conducted according to all common ethical standards including the rules given by the Declaration of Helsinki. Patients randomized to the control group had the usual treatment: one visit in the outpatient clinic of the stroke unit three months after discharge. Patients randomized to the intervention group had an appointment with the first author within one week after discharge. The first author undertook all visits in the preventive clinic.

Procedures and intervention

BP was measured at every visit after at least five minutes rest in a sitting position in an arm chair. BP was measured simultaneously in both arms followed by two measurements with 10-min intervals using the arm with the highest systolic BP. In case of hypertension the first author would suggest initiation or intensification of antihypertensive treatment. The last author would accept or suggest an alternative and do the prescription. Patients would come to the clinic for control of BP and relevant blood tests every 3–4 weeks until BP was at target. After five weeks on lipid lowering drugs treatment was intensified if needed. Patients who did not tolerate lipid lowering medication were referred to a dietitian. In motivated patients home BP measurements were performed using patients’ own monitor or by lending patients a BP monitor between visits.

Patients in the intervention group had a mean of five visits to the clinic with addition of new drugs rather than adding more of the same drug in case of hypertension. Although we used minimum doses to prevent adverse effects, many patients had unacceptable side effects necessitating change to another class of antihypertensive drug.

Patients were informed about the importance of life-long adherence with all preventive medication. Those with elevated BP or receiving antihypertensive treatment were advised in salt reduction, smokers were advised to stop smoking and all patients were informed about the benefits of 30 min of moderate physical activity daily. Likewise, information about the risk of an intake of alcohol above seven drinks per week in women and 14 drinks in men was part of the program as well as the benefits of weight reduction in overweight patients with hypertension or diabetes.

Follow up

Participants in both groups were invited to the usual follow up visit three months after discharge at the outpatient clinic of the stroke unit as well as a follow up visit in the study a median of 9 (IQR 8–11) months after inclusion.

In accordance with the protocol the final follow up visits were performed by nurses in the outpatient clinic with measurement of BP and blood-cholesterols. Patients were asked not to reveal their group allocation but blinding of the nurses was not possible. Patients were interviewed about adherence to all preventive medications as well as their present life style. For practical purposes a minority of visits were performed by the first author. To do intention to treat analyses we used last observation carried forward regarding the endpoints of the study where patients had died or did not respond to the invitation to a follow up visit. Thus, we used the last recorded values in five patients in the intervention group and in seven controls.

After a median of 65 months (IQR: 61–66) from inclusion data on vascular events and death were attained from the hospital based medical records covering all hospitals of the region.

Statistics

Data were entered into Excel and imported into SAS. Statistical analyses were performed by the first author according to a pre-established statistical analysis plan. We used Chi square test (for the primary outcome) or Fisher’s exact test as appropriate for comparison of proportions, and for change from baseline we used McNemar’s test. For continuous variables we used t-test or Mann-Whitney’s test*. Change from baseline was analyzed by the paired t-test or Wilcoxon signed rank sum test* (*where data were not normally distributed). We used SAS 9.4 for Windows and p < 0.05 was considered significant.

RESULTS

We included 78 patients in the study. Due to revision of stroke diagnoses in four participants and as one participant never turned up for the intervention, data on 73 participants were available for follow up (Figure 1). The median stay in hospital was 4 days (IQR: 3–6). As seen from Table 1 most participants had no or slight disability.

Flow chart of participants

example of alt text for graphics inside figuresexample of long desc for graphics inside figures
Baseline characteristics of 73 patientsexample of alt text for tablesexample of long desc

Characteristics

All(n = 73)

Intervention (n = 36)

Control (n = 37)

P

Sex, female

29 (40)

15 (42)

14 (38)

0.74

Age (years), mean ± SD

66 ± 12

63 ± 13

68 ± 11

0.08

Length of education< 10 years10 – 12 years> 12 years

12 (17)22 (30)38 (53)

6 (17)10 (29)19 (54)

6 (16)12 (33)19 (51)

0.95

Diagnosis of strokeIschemic StrokeTIAHemorrhagic stroke

63 (87)9 (12)1 (1)

33 (92)3 (8)

30 (81)6 (16)1 (3)

0.60a

Recurrent stroke

11 (15)

5 (14)

6 (16)

1.00a

Modified Rankin Scale score > 2

5 (6)

1 (3)

4 (11)

0.36a

Antihypertensive medication before stroke

39 (53)

15 (42)

24 (65)

0.047

Antihypertensive medication at discharge

46 (63)

20 (56)

26 (70)

0.19

Cholesterol lowering medication before stroke

25 (34)

11 (31)

14 (38)

0.51

Cholesterol lowering medication at discharge

65 (89)

35 (97)

30 (81)

0.03

Diabetes at baseline

14 (19)

5 (14)

9 (24)

0.37a

Diabetes at discharge

16 (22)

6 (17)

10 (27)

0.29

Atrial fibrillation at baseline

7 (10)

3 (8)

4 (11)

1.00a

Atrial fibrillation at discharge

12 (16)

6 (16)

6 (17)

1.00

Unhealthy dietingb

59 (82)

25 (71)

34 (92)

0.03

Current smoking

19 (26)

11 (31)

8 (22)

0.62

Alcohol above limitsc

23 (32)

12 (34)

11 (30)

0.68

Sedentary lifestyled

17 (24)

9 (26)

8 (22)

0.68

BMI ≥ 25

46 (63)

24 (67)

22 (59)

0.52

Self-rated health: fair, poor, or very poor

34 (47)

15 (43)

19 (51)

0.47

Values are expressed as frequencies (%) or as mean ± standard deviations

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Less than 20% of patients had a baseline BP treated to target (Figure 2). Twenty-eight patients (78%) in the intervention group and 29 patients (78%) in the control group had a 3-month visit in the outpatient clinic. Here 15 patients (42%) in the intervention group had their BP and blood cholesterol measured and so had 23 patients (62%) in the control group. At follow up patients in both groups reported a median of two visits including BP measurement at the general practitioner´s office since discharge from hospital.

Blood pressure and treatment of hypertension at baseline in 73 patients (%)

Primary endpoint

Follow up visits showed that 25 patients (69%) in the intervention group had a BP at target versus 14 (38%) of controls (p = 0.007). In four patients (10%) in the intervention group antihypertensive medication remained unchanged since discharge versus 23 (62%) of controls (p < 0.0001) illustrated by the differences in BP treated to target as well as untreated hypertension in Figure 3.

Blood pressure and treatment of hypertension at follow up in 73 patients (%)

Secondary endpoints

Median reduction in systolic BP was 11 mm Hg (-5-19) with 14 mm Hg (IQR: 5–21) in the intervention group and 3 mm Hg (IQR -11-17) in the control group (p = 0.045). Median reduction in diastolic BP was 2 mm Hg (-2-11) with 7 mm Hg (IQR -1-13) in the intervention group and 1 mm Hg (IQR -6-8) in the control group (p = 0.04).

There was no difference between the groups regarding LDL-cholesterol treated to target with 32 patients (89%) at target in the intervention group versus 29 patients (78%) in the control group (p = 0.21). We found significant reductions in LDL-cholesterol in both groups, but no difference between the groups: 1.6 (IQR: 0.4–2.2) mmol/l in the intervention group versus 0.8 (IQR: 0.4–1.8) mmol/l among controls (p = 0.18).

In 11 patients (31%) in the intervention group cholesterol lowering medication remained unchanged since discharge versus 29 (78%) of controls (p < 0.0001).

The combined endpoint of both BP and LDL-cholesterol at target was achieved in 22 (61%) of patients in the intervention group and in 10 patients (27%) in the control group (p = 0.003). At the end of the study 24 patients (68%) in the intervention group measured their BP at home versus 14 (38%) of controls (p = 0.03).

The only significant change in lifestyle was a reduction in current smokers by four in the control group (Table 2).

Nine months follow up of 73 patients

Characteristics

All(n = 73)

Intervention(n = 36)

Control(n = 37)

P

Systolic BP, mm Hg, mean ± SD

134 ± 21

130 ± 17

137 ± 24

0.12

Diastolic BP, mm Hg, mean ± SD

78 ± 11

78 ± 10

78 ± 12.8)

0.94

Antihypertensive medication

55 (75)

29 (81)

26 (70)

0.31

100% compliance with AHM (n = 45)

38 (84)

23 (89)

15 (79)

0.38

LDL-cholesterol, mmol/l (n = 72), mean ± SD

1.9 ± 0.8

1.9 ± 0.7

2.0 ± 0.8

0.66

Cholesterol lowering medication

64 (88)

32 (89)

32 (86)

0.76

100% compliance with CLM (n = 52)

46 (89)

24 (86)

22 (92)

0.50

Unhealthy dietingb

59 (81)

26 (72)

33 (89)

0.76

Current smoker

15 (21)

11 (31)

4 (11)

0.046a

Alcohol > limitsc

20 (27)

11 (31)

9 (24)

0.55

Sedentary lifestyled

16 (22)

7 (20)

9 (24)

0.66

BMI ≥ 25

43 (59)

21 (58)

22 (60)

0.92

Values are expressed as frequencies (%) or as mean ± standard deviations.
Abbreviations: AHM, antihypertensive medication; CLM, cholesterol lowering medication.

Fisher’s exact test. b Less than 600 g of fruit and vegetables per day, fish for dinner less than twice per week. c More than 7 drinks per week in women/more than 14 drinks per week in men. d Less than 30 min of moderate physical activity per day.

Regarding vascular complications and death, we found 32 events in 22 patients after a median of 65 months. Median time to first event was 26 months (IQR: 4–49) with a median of 44 months (IQR: 11–49) in the intervention group and 19 months (IQR: 4–37) in the control group (p = 0.32). All in all, we found 11 events in nine patients in the intervention group: two recurrent strokes, three cases of TIA, and six patients died versus 21 events in 13 patients in the control group: seven recurrent strokes, five cases of TIA, one MI, and seven patients died (p = 0.49).

DISCUSSION

In this randomized clinical trial, a larger proportion of patients in the intervention group compared to controls had BP within the above-mentioned limits and the study fulfilled the aim of the primary endpoint.

A systematic review of interventions aimed at modifiable risk factor control for secondary prevention of stroke revealed improvement in achieving BP target. 22 However, as opposed to our study the review showed no significant change in systolic og diastolic BP.

In a study of integrated care with five prearranged visits to patients’ general practitioner versus usual care systolic BP at target set to 140 mm Hg was found in 75% versus 58% at 12-month follow up. 19 We set individual targets for BP according to patients’ type of stroke, comorbidities and age. This is well in line with recommendations given by European Society of Hypertension, 23 but as stated by Boan et al., not quite in accordance with international stroke guidelines. 24

In a study where patients with minor stroke were randomized to six clinic visits by a pharmacist (intervention) or by a nurse (active control) aiming at treating both BP and LDL-cholesterol to target, 43% of patients in the pharmacist-led clinic met those two targets and so did 31% in the nurse-led clinic. 25 In our study this combined endpoint was met in 22 (61%) of patients in the intervention group. Regarding BP in control 80% of patients in the pharmacist led clinic had systolic BP in control after six months versus 90% in the nurse led clinic. This is a far greater proportion than the 69% in our study. However, almost two thirds of patients had a baseline BP within the limits. The opposite was the case in our study with two thirds presenting with elevated BP. Both studies show that a dedicated follow up with stepwise escalation of preventive medication may be the way to reach the targets of the two important risk factors for recurrent stroke. In both studies five-six visits were needed, which is far beyond our usual treatment. However, despite visits to the outpatient clinic as well as to the general practitioner the proportion of patients with unchanged medication since discharge in the control group illustrate the necessity of frequent visits to a dedicated preventive facility. Considering the preventive effect of BP lowering, and - though insignificant - the difference in time to first event as well as the smaller proportion of events in the intervention group as found in our study, it may be well worth the time and resources for patients, their relatives and society.

Strengths and limitations

Our study has some limitations. Most participants had a minor stroke and patients had to be independent and without severe cognitive deficits, which is not representative of a general stroke population. With only 73 participants caution is called for in the drawing of conclusions from the results. Nonetheless, we decided to reorganize the outpatient clinic of our stroke unit as of October 2014 implementing strategies of the present study.

The strength of the study is the individual target for BP taking into account the diagnosis of stroke as well as important comorbidity as recommended by Boan et al. 24 Five-year follow up on vascular complications and death is another important advantage.

CONCLUSIONS

In conclusion, the feasibility study has demonstrated that timely follow up of stroke patients in a dedicated preventive outpatient clinic may result in BP and cholesterol treated to target in most patients. To some extent it may postpone time to stroke recurrence, MI and death.

ACKNOWLEDGMENTS

None.21

DATA AVAILABILITY

The data that support the findings of this study are not available due to national privacy or ethical restrictions.

Agnete Hviid Hornnes, Email: agnete.hviid.hornnes@regionh.dk https//orcid.org/0000-0003-2217-5904
Mai Bang Poulsen, Email: mai.bang.poulsen.02@regionh.dk

Both authors have made substantial contributions to conception and design and acquisitions and analyses and interpretation of data and have; and been involved in writing the manuscript and given final approval of the version to be published. Both authors have participated sufficiently in the work to take public responsibility for the content; and agree to be accountable for all aspects of the work in ensuring that questions related to the accuracy or integrity of any part of the work are appropriately investigated and resolved.

Wahlgren N, Ahmed N, Eriksson N, et al. Multivariable analysis of outcome predictors and adjustment Stroke. 2008;39:3316-3322. doi:https://doi.org/10.1161/STROKEAHA.107.510768Wahlgren N. Systemic thrombolysis in clinical Cerebrovascular Diseases (Basel, Switzerland). 2009;27:168-176. doi:https://doi.org/10.1159/000200456Thorvaldsen P, Davidsen M, Brønnum-Hansen H, Schroll M. Stable stroke occurrence despite Stroke. 1999;30:2529-2534. doi:https://doi.org/10.1161/01.STR.30.12.2529Jørgensen HS, Nakayama H, Reith J, Raaschou HO, Olsen TS. Stroke recurrence: Predictors, severity, and prognosis. The Neurology. 1997;48:891-895. doi:https://doi.org/10.1212/WNL.48.4.891Danish Stroke Registry. Danish Stroke Registry, annual report 2011. 2011. Ref Type: Generic.Friday G, Alter M, Lai SM. Control of hypertension and risk of stroke Stroke. 2002;33:2652-2657. doi:https://doi.org/10.1161/01.STR.0000033929.62136.6FLai SM, Alter M, Friday G, Sobel E. A multifactorial analysis of risk Stroke. 1994;25:958-962. doi:https://doi.org/10.1161/01.STR.25.5.958Prencipe M, Culasso F, Rasura M, et al. Long-term prognosis after a minor Stroke. 1998;29:126-132. doi:https://doi.org/10.1161/01.STR.29.1.126Rashid P, Leonardi-Bee J, Bath P. Blood pressure reduction and secondary Stroke. 2003;34:2741-2748. doi:https://doi.org/10.1161/01.STR.0000092488.40085.15Girot M, Mackowiak-Cordoliani MA, Deplanque D, Hénon H, Lucas C, Leys D. Secondary prevention after ischemic Journal of Neurology. 2005;252:14-20. doi:https://doi.org/10.1007/s00415-005-0591-8Johnson P, Rosewell M, James MA. How good is the management of vascular risk after stroke, Cerebrovascular Diseases (Basel, Switzerland). 2007;23:156-161. doi:https://doi.org/10.1159/000097053Paul SL, Thrift AG. Control of hypertension 5 years after stroke in the North Hypertension. 2006;48:260-265. doi:https://doi.org/10.1161/01.HYP.0000230610.81947.04Hornnes N, Larsen K, Boysen G. Little change of modifiable risk factors International Journal of Stroke. 2010;5:157-162. doi:https://doi.org/10.1111/j.1747-4949.2010.00424.xAdie K, James MA. Does telephone follow-up improve blood pressure after minor Age and Ageing. 2010;39:598-603. doi:https://doi.org/10.1093/ageing/afq085Chiu CC, Wu SS, Lee PY, Huang YC, Tan TY, Chang KC. Control of modifiable risk factors in ischemic stroke Journal of Clinical Pharmacy and Therapeutics. 2008;33:529-535. doi:https://doi.org/10.1111/j.1365-2710.2008.00940.xEllis G, Rodger J, McAlpine C, Langhorne P. The impact of stroke nurse specialist Age and Ageing. 2005;34:389-392. doi:https://doi.org/10.1093/ageing/afi075Hornnes N, Larsen K, Boysen G. Blood pressure 1 year after stroke: The Journal of Stroke and Cerebrovascular Diseases. 2011;20:16-23. doi:https://doi.org/10.1016/j.jstrokecerebrovasdis.2009.10.002Johnston SC, Sidney S, Hills NK, et al. Standardized discharge orders after Annals of Neurology. 2010;67:579-589. doi:https://doi.org/10.1002/ana.22019Joubert J, Reid C, Barton D, et al. Integrated care improves risk-factor Journal of Neurology, Neurosurgery, and Psychiatry. 2009;80:279-284. doi:https://doi.org/10.1136/jnnp.2008.148122Fahey T, Schroeder K, Ebrahim S. Interventions used to improve control of Cochrane Database of Systematic Reviews. 2006.Furie KL, Kasner SE, Adams RJ, et al. Guidelines for the prevention of stroke Stroke. 2011;42:227-276. doi:https://doi.org/10.1161/STR.0b013e3181f7d043Bridgwood B, Lager KE, Mistri AK, Khunti K, Wilson AD, Modi P. Interventions for improving modifiable Cochrane Database of Systematic Reviews. 2018;5.Mancia G, Fagard R, Narkiewicz K, et al. 2013 Practice guidelines for the management of arterial Journal of Hypertension. 2013;31:1925-1938. doi:https://doi.org/10.1097/HJH.0b013e328364ca4cBoan AD, Lackland DT, Ovbiagele B. Lowering of blood pressure for recurrent Stroke. 2014;45:2506-2513. doi:https://doi.org/10.1161/STROKEAHA.114.003666McAlister FA, Majumdar SR, Padwal RS, et al. Case management for blood pressure and Canadian Medical Association Journal. 2014;186:577-584. doi:https://doi.org/10.1503/cmaj.140053
example of alt text for hero-imageexample of long desc for hero image
" `; diff --git a/src/jats/__tests__/jats-exporter.test.ts b/src/jats/__tests__/jats-exporter.test.ts index 72ec95cd..925641cd 100644 --- a/src/jats/__tests__/jats-exporter.test.ts +++ b/src/jats/__tests__/jats-exporter.test.ts @@ -247,4 +247,40 @@ describe('JATS exporter', () => { expect(fn).not.toBeUndefined() } }) + + test('export contributor bio', async () => { + const transformer = new JATSExporter() + const input = await readAndParseFixture('jats-import.xml') + const node = parseJATSArticle(input, sectionCategories) + const xml = await transformer.serializeToJATS(node, { + csl: DEFAULT_CSL_OPTIONS, + }) + const resultDoc = parseXMLWithDTD(xml) + expect(resultDoc.errors).toHaveLength(0) + + const contribs = resultDoc.find('//contrib-group/contrib') + expect(contribs).toHaveLength(2) + expect(contribs[0].find('bio')).toHaveLength(1) + expect(contribs[1].find('bio')).toHaveLength(0) + + const graphic = resultDoc.get('//contrib/bio/graphic')! + expect(graphic).not.toBeNull() + expect(graphic.attr('href')?.value()).toBe('agnete-hornnes.png') + expect(graphic.find('caption')).toHaveLength(0) + expect( + resultDoc.get('//contrib/bio/graphic/alt-text')!.text() + ).toBe('Headshot of Agnete Hviid Hornnes') + + const paragraph = resultDoc.get('//contrib/bio/p')! + expect(paragraph.text()).toBe( + 'Agnete is a Professor of Neurology at Herlev og Gentofte Hospital, specializing in stroke research.' + ) + // Inline markup in the bio paragraph roundtrips through the DOMSerializer. + // TODO(LEAN-5987): the ticket specifies plain bio text; see the note next to + // the commented-out buildBioElement in the exporter. Flip this assertion if + // product decides bio text must be flattened on export. + expect(resultDoc.get('//contrib/bio/p/italic')?.text()).toBe( + 'Professor of Neurology' + ) + }) }) diff --git a/src/jats/exporter/TreeBase.ts b/src/jats/exporter/TreeBase.ts index 58df2cc8..914a0f40 100644 --- a/src/jats/exporter/TreeBase.ts +++ b/src/jats/exporter/TreeBase.ts @@ -131,7 +131,11 @@ export class TreeBase { }) } - appendChildIfPresent($parent: Element, tagName: string, textContent: string) { + protected appendChildIfPresent( + $parent: Element, + tagName: string, + textContent: string + ) { if (!textContent) { return } @@ -140,7 +144,7 @@ export class TreeBase { $parent.appendChild($element) } - processChildNodes = ( + protected processChildNodes = ( $element: Element, node: ManuscriptNode, contentNodeType: ManuscriptNodeType diff --git a/src/jats/exporter/jats-exporter.ts b/src/jats/exporter/jats-exporter.ts index ea800851..6b3c9a38 100644 --- a/src/jats/exporter/jats-exporter.ts +++ b/src/jats/exporter/jats-exporter.ts @@ -41,7 +41,6 @@ import { FootnoteNode, isBibliographyItemNode, isCitationNode, - isNodeOfType, ManuscriptMark, ManuscriptNode, ManuscriptNodeType, @@ -80,8 +79,6 @@ export type ExportOptions = { } export class JATSExporter extends TreeBase { - protected document: Document - protected serializer: DOMSerializer protected labelTargets: Map protected footnoteLabels: Map protected manuscriptNode: ActualManuscriptNode @@ -1072,6 +1069,7 @@ export class JATSExporter extends TreeBase { $element.appendChild($table) } + createBoxElement(node: ManuscriptNode) { const $boxedText = this.createElementWithID(node, 'boxed-text') if (node.attrs.type) { @@ -1092,6 +1090,7 @@ export class JATSExporter extends TreeBase { ? { 'abstract-type': category } : {} } + createAbstract(node: ManuscriptNode): DOMOutputSpec { return ['abstract', this.abstractTypeAttrs(node.attrs.category), 0] } @@ -1107,6 +1106,30 @@ export class JATSExporter extends TreeBase { ] } + private createGraphic(node: ManuscriptNode) { + const $graphic = this.createElement('graphic') + $graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src) + + const findParentHeroImage = (targetID: string) => { + const heroes = this.getChildrenOfType(schema.nodes.hero_image) + return heroes.find( + (hero) => + !!findChildrenByAttr(hero, (attrs) => attrs.id === targetID)[0] + ) + } + + const hero = findParentHeroImage(node.attrs.id) + if (hero) { + $graphic.setAttribute('content-type', hero.attrs.type || 'leading') + } else if ( + !this.isChildOfNodeType(node.attrs.id, schema.nodes.figure_element) && + node.attrs.type + ) { + $graphic.setAttribute('content-type', node.attrs.type) + } + return $graphic + } + createImage(node: ManuscriptNode) { const graphicNode = node.content.firstChild if (!graphicNode) { @@ -1301,51 +1324,30 @@ export class JATSExporter extends TreeBase { return $sup } - private buildBioElement = (bio?: BioNode) => { - const $bio = this.createElement('bio') - if (!bio || !bio.firstChild) { - return null - } - bio.children.forEach((node) => { - switch (node.type) { - case schema.nodes.paragraph: { - $bio.append(this.writeParagraph(node as ParagraphNode)) - break - } - case schema.nodes.image_element: { - $bio.append(this.createImage(node)) - break - } - default: - return - } - }) - return $bio - } - - private createGraphic(node: ManuscriptNode) { - const $graphic = this.createElement('graphic') - $graphic.setAttributeNS(XLINK_NAMESPACE, 'xlink:href', node.attrs.src) - - const findParentHeroImage = (targetID: string) => { - const heroes = this.getChildrenOfType(schema.nodes.hero_image) - return heroes.find( - (hero) => - !!findChildrenByAttr(hero, (attrs) => attrs.id === targetID)[0] - ) - } - - const hero = findParentHeroImage(node.attrs.id) - if (hero) { - $graphic.setAttribute('content-type', hero.attrs.type || 'leading') - } else if ( - !this.isChildOfNodeType(node.attrs.id, schema.nodes.figure_element) && - node.attrs.type - ) { - $graphic.setAttribute('content-type', node.attrs.type) - } - return $graphic - } + // This is a manual builder that is need only if we need to use this.writeParagraph() to strip rich text + // The editor will not allow rich text but if any imported - it will be stripped (can it be imported though)? + // + // private buildBioElement = (bio?: BioNode) => { + // const $bio = this.createElement('bio') + // if (!bio || !bio.firstChild) { + // return null + // } + // bio.children.forEach((node) => { + // switch (node.type) { + // case schema.nodes.paragraph: { + // $bio.append(this.writeParagraph(node as ParagraphNode)) + // break + // } + // case schema.nodes.image_element: { + // $bio.append(this.createImage(node)) + // break + // } + // default: + // return + // } + // }) + // return $bio + // } private buildContributorElement = (contributor: ContributorNode) => { const $contrib = this.createElement('contrib') @@ -1427,11 +1429,17 @@ export class JATSExporter extends TreeBase { }) }) - const bio = this.buildBioElement( - this.getFirstChildOfType(schema.nodes.bio, contributor) - ) - if (bio) { - $contrib.appendChild(bio) + // This will be used instead of this.serializeNode(bio) if paragraphs need rich-text stripping + // const bio = this.buildBioElement( + // this.getFirstChildOfType(schema.nodes.bio, contributor) + // ) + // if (bio) { + // $contrib.appendChild(bio) + // } + + const bio = this.getFirstChildOfType(schema.nodes.bio, contributor) + if (bio?.childCount) { + $contrib.appendChild(this.serializeNode(bio)) } return $contrib diff --git a/src/jats/exporter/lib.ts b/src/jats/exporter/lib.ts index c774f321..2775802f 100644 --- a/src/jats/exporter/lib.ts +++ b/src/jats/exporter/lib.ts @@ -14,22 +14,6 @@ * limitations under the License. */ -/*! - * © 2026 Atypon Systems LLC - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - import { ManuscriptNodeType, schema } from '../../schema' import { IDGenerator } from '../types' From d92edb2e9f3f409483bbfcbb399fe84bbd0b2a03 Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 17:39:31 +0200 Subject: [PATCH 09/11] final adjustments --- package.json | 2 +- .../migration/migration-scripts/4.5.8.ts | 62 +++++++++++++++++++ .../migration/migration-scripts/index.ts | 2 + src/types.ts | 2 +- 4 files changed, 66 insertions(+), 2 deletions(-) create mode 100644 src/schema/migration/migration-scripts/4.5.8.ts diff --git a/package.json b/package.json index 1b889eb9..1554886c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "@manuscripts/transform", "description": "ProseMirror transformer for Manuscripts applications", - "version": "4.5.7", + "version": "4.5.8", "repository": "github:Atypon-OpenSource/manuscripts-transform", "license": "Apache-2.0", "main": "dist/cjs", diff --git a/src/schema/migration/migration-scripts/4.5.8.ts b/src/schema/migration/migration-scripts/4.5.8.ts new file mode 100644 index 00000000..bd5edec9 --- /dev/null +++ b/src/schema/migration/migration-scripts/4.5.8.ts @@ -0,0 +1,62 @@ +/*! + * © 2026 Atypon Systems LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +import { JSONProsemirrorNode } from '../../../types' +import { MigrationScript } from '../migration-script' + +/** + * Nodes that still carried the `contents` attribute inherited from the + * json-schema era. The attribute was never read for these types and has been + * removed from their specs. + */ +const LEGACY_CONTENTS_NODES = new Set([ + 'contributor', + 'bibliography_element', + 'keywords_element', +]) + +/** + * - contributor content changed from `inline*` (holding a '_' placeholder text + * node written by the JATS importer) to `bio?`. Any non-bio content is dropped. + * - the dead `contents` attribute is removed from the nodes listed above - this won't + * invalidate the doc actually so it's added only for hygiene + */ +class Migration458 implements MigrationScript { + fromVersion = '4.5.7' + toVersion = '4.5.8' + + migrateNode(node: JSONProsemirrorNode): JSONProsemirrorNode { + if ( + LEGACY_CONTENTS_NODES.has(node.type) && + node.attrs && + 'contents' in node.attrs + ) { + const attrs = { ...node.attrs } + delete attrs.contents + node = { ...node, attrs } + } + + if (node.type === 'contributor') { + const bio = node.content?.filter((child) => child.type === 'bio') + const migrated = { ...node } + delete migrated.content + return bio?.length ? { ...migrated, content: bio } : migrated + } + + return node + } +} + +export default Migration458 diff --git a/src/schema/migration/migration-scripts/index.ts b/src/schema/migration/migration-scripts/index.ts index f3ea23b3..d5841ce6 100644 --- a/src/schema/migration/migration-scripts/index.ts +++ b/src/schema/migration/migration-scripts/index.ts @@ -31,6 +31,7 @@ import Migration4335 from './4.3.35' import Migration442 from './4.4.2' import Migration447 from './4.4.7' import Migration453 from './4.5.3' +import Migration458 from './4.5.8' const migrations = [ new Migration125(), @@ -50,6 +51,7 @@ const migrations = [ new Migration442(), new Migration447(), new Migration453(), + new Migration458(), ] export default migrations diff --git a/src/types.ts b/src/types.ts index 5c9bbf10..e6cadf9b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,5 +1,5 @@ /*! - * © 2019 Atypon Systems LLC + * © 2026 Atypon Systems LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 22149cf181835d333b6fa792b79e188f6c1ee50b Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 17:46:35 +0200 Subject: [PATCH 10/11] renamed treebase --- src/jats/exporter/{TreeBase.ts => JATSExporterBase.ts} | 2 +- src/jats/exporter/jats-exporter.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/jats/exporter/{TreeBase.ts => JATSExporterBase.ts} (99%) diff --git a/src/jats/exporter/TreeBase.ts b/src/jats/exporter/JATSExporterBase.ts similarity index 99% rename from src/jats/exporter/TreeBase.ts rename to src/jats/exporter/JATSExporterBase.ts index 914a0f40..833b009f 100644 --- a/src/jats/exporter/TreeBase.ts +++ b/src/jats/exporter/JATSExporterBase.ts @@ -20,7 +20,7 @@ import { findChildrenByAttr, findChildrenByType } from 'prosemirror-utils' import { isNodeOfType, ManuscriptNode, ManuscriptNodeType } from '../../schema' import { normalizeID } from './lib' -export class TreeBase { +export class JATSExporterBase { private nodesMap: Map = new Map() protected manuscriptNode: ManuscriptNode protected document: Document diff --git a/src/jats/exporter/jats-exporter.ts b/src/jats/exporter/jats-exporter.ts index 6b3c9a38..e7d4b6d7 100644 --- a/src/jats/exporter/jats-exporter.ts +++ b/src/jats/exporter/jats-exporter.ts @@ -56,7 +56,7 @@ import { IDGenerator } from '../types' import { initJats, jatsVariableWrapper } from './citeproc' import { selectVersionIDs, Version } from './jats-versions' import { buildTargets, Target } from './labels' -import { TreeBase } from './TreeBase' +import { JATSExporterBase } from './JATSExporterBase' import { chooseRefType, createDefaultIDGenerator, normalizeID } from './lib' interface Attrs { @@ -78,7 +78,7 @@ export type ExportOptions = { csl: CSLOptions } -export class JATSExporter extends TreeBase { +export class JATSExporter extends JATSExporterBase { protected labelTargets: Map protected footnoteLabels: Map protected manuscriptNode: ActualManuscriptNode From 6b69772ecc3e9fc81a4537a2ac00917eb163bdeb Mon Sep 17 00:00:00 2001 From: m-bartenev Date: Sun, 20 Sep 2026 18:03:01 +0200 Subject: [PATCH 11/11] minor fixes --- src/schema/nodes/bio.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/schema/nodes/bio.ts b/src/schema/nodes/bio.ts index 3f4b902f..daa51ca2 100644 --- a/src/schema/nodes/bio.ts +++ b/src/schema/nodes/bio.ts @@ -33,13 +33,14 @@ export const bio: NodeSpec = { }, group: 'block', toDOM: (node) => { - const contributorNode = node as BioNode + const bioNode = node as BioNode return [ 'div', { class: 'bio', - id: contributorNode.attrs.id, + id: bioNode.attrs.id, }, + 0, ] }, }