Skip to content

kvsjsm/C-CDA_Viewer

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HL7 C-CDA Viewer

You can cite this repository in your articles using this reference: DOI

Synopsis

Easy to use rendering of complex C-CDA documents directly in any web browser. Responsive document layout automatically adjusts to make optimum use of the available screen space. Users can hide, collapse and move any section of a CDA document.

Document sections can be manipulated directly via button clicks, drag and drop or via a document Table Of Contents (TOC).

All user preferences are saved and automatically applied to subsequent CDA documents opened.

Ability to detect and hide/show duplicates.

The result is an intuitive and easy to use document layout that users can control directly.

All this using simple deployment via a local fileset or web server (and its very pretty).

Sample documents are included in the deployment. Any C-CDA document can be rendered via cut and paste of the document text.

Winner of the HL7 C-CDA Tooling Challenge

Platform

  • Runs in any modern browser (tested on FF 46.0, IE11 and Chrome 49, Safari). PC, tablet or mobile.
  • Will run as a standalone local fileset (not in Chrome, due to security issues)
  • Load onto any web file server to run on Chrome

Demonstration

A demonstration version is deployed here: http://brynlewis.org/challenge/index.htm

Features

  • Users can control document layout via Section hide/show, collapse/expand and re-ordering.
  • As user makes changes, the layout adjusts to make best use of available screen space.
  • All changes are saved as preferences that will apply across documents (ie open a new document and the same order/visibility preferences are applied against all sections).
    • Sections are identified via coding applied across documents.
    • eg. If 'Procedures' has been moved to the top of the document, then 'Procedures' will be at the top of the next document opened.
    Sample documents are available, or you can cut and paste the xml of a C-CDA document into the text box, then click 'View'.
  • Duplicate entries in tables are detected. The user can decide whether these are hidden or shown.

Move and Re-Ordering

  • Drag and Drop a section where you want it to go.
  • Move a section up to the top of the list by clicking on the double-up arrow.
  • Move a section down one by clicking on the single-down arrow.

Show/Hide Sections

  • Hide sections by clicking on the cross, or from the Table Of Contents (TOC)

Collapse/Expand sections

  • Click the collapse/expand icon on any section.
  • Collapse/Expand all section with the Collapse/Expand all button.

TOC (Table Of Contents)

  • Use the TOC to see all available sections in the document, and to show/hide or move sections.
  • Reset all preferences to defaults.

Deployment

Local Deployment

Download the fileset. Open 'index.htm' in a web browser.

Web Deployment

Download the fileset and save to a public directory (eg. C-CDA_Viewer). The viewer is then available at:

http://yoururl/[C-CDA_Viewer_path]/index.htm

Enjoy.

Implementation

core.js: C-CDA specific processing is carried out in core.js.

xslt.js: a javascript library that performs xsl transformations in the browser. A transformation requires two input strings, an xml and xsl string. Both must be well formed xml.

The xslt.js library was updated as it would not work in IE11.

The transformation is carred out in core.js: new Transformation().setXml(cdaxml).setXslt('cda.xsl').transform("viewcda");

cdaxml: xml string that is set in the script. cda.xsl: local xsl file. viewcda: target div

XSL: cda.xsl is an extension of ANSI/HL7 CDAR2, v.3 (cda.xsl), which provides provision of narrative content. The extensions allow the dynamic layout functionality.

Layout: packery javascript library. http://packery.metafizzy.co/

Icons: font-awesome standard icon set. https://fortawesome.github.io/Font-Awesome/icons/

Background css: purecss.io

Copyright

Copyright (c) 2016 Bryn Lewis ()

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.

About

HL7 Tooling Challenge C-CDA Viewer

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • XSLT 69.7%
  • JavaScript 17.4%
  • CSS 8.8%
  • HTML 4.1%