Giter VIP home page Giter VIP logo

hl7-javascript-parsing's Introduction

HL7-Javascript-Parsing

Making HL7 look pretty and more organized using jQuery and nothing else.

Instructions

Place the js file in your directory and link to it:

<script type="text/javascript" src="js/hl7.js"></script>

Then add your table somewhere and make sure it has an id:

<table id="content"></table>

Then once you have your raw HL7, pass the string and the element id you want the result placed inside to the function like this:

var hl7 = "MSH|^~\&|SENDING_APPLICATION|SENDING_FACILITY|RECEIVING_APPLICATION|RECEIVING_FACILITY|20110613061611||SIU^S12|24916560|P|2.3||||||"

parseHL7(hl7, '#content')

And you'll have a table that breaks down your HL7 into something human readable.

Limitations

Many common HL7 categories are supported, but some are not. They will be added as the need arises.

Development

You can do some cool things once the HL7 is parsed out. For example, the demo included in this repo demonstrates how to make the table collapsible according to each HL7 header by adding this to your javascript:

$('#content').on('click', 'tr.header', function (e) {
  $(this).nextUntil('tr.header').css('display', function(i,v) {
      return this.style.display === 'table-row' ? 'none' : 'table-row';
  });
});

You're responsible for the styling of the resulting table, and for the HL7 being properly formatted. HL7 is just a pattern, so if anything is off slightly it simply won't be predictable.

hl7-javascript-parsing's People

Contributors

davealdon avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

khileshchauhan

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.