npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pediatric-immunizations-schedule

v0.3.1

Published

A small js library for displaying a pediatric immunizations schedule based on CDC recommendations.

Downloads

3

Readme

About

Demo

A small js library for displaying a pediatric immunizations schedule based on CDC recommendations.

The immunization schedule is defined in YAML format here: https://github.com/IoraHealth/pediatric-immunization-schedule/blob/master/src/immunization-schedule.yml Customizing the schedule for different organizations and patient populations is as simple as updating that file. Vaccine name matches that satisfy an immunization "dose" can also be tuned in that file. Matching on codes is currently not supported.

Install

The package can be installed with npm:

npm install pediatric-immunizations-schedule

Usage

Include the library in your app using the CommonJS style:

var ImmunizationTable = require('pediatric-immunizations-schedule/ImmunizationTable');

Or in the ES6 import style:

import {ImmunizationTable} from 'pediatric-immunizations-schedule';

You can also include the JS file via UMD:

```

To load the immunization table into your view:

immunizationTable = new ImmunizationTable([options]);
immunizationTable.append(chartContainer)

chartContainer needs to be a reference to the a dom element and options is an object. The bare minimum for the options object is an empty object {}.

Example options object:

options = {
  patientImmunizationHistory: {
    {
      "date": "05/10/2012",
      "product": {
        "name": "HepB Vaccine"
      }
    },
    {
      "date": "08/10/2012",
      "product": {
        "name": "HepB Vaccine"
      }
    },
    {
      "date": "08/10/2012",
      "product": {
        "name": "DTaP-Hib-IPV"
      }
    }
  },
  patientAgeMonths: 12
};

Passing in the patient age months will cause the table to highlight doses that the patient may have missed.

A JSON object using the BlueButton.js immunization data structure can be passed into the library to display a patient's immunization history.

See the source code of the demo for an example.

If you pass in an item in the patientImmunizationHistory object that doesn't match any of the configured immunizations (and therefore won't show up in the table), they are collected and accessible on immunizationTable.unmatchedPatientImmunizations

Development

To setup the app for development:

  1. npm install
  2. webpack-dev-server --inline (inline enables automatic restarts upon code changes)

App will then be running at localhost:8080

Testing

This library uses mocha for testing w/ the Karma runner. Right now it requires Chrome as the launcher (TODO: support phantomjs runs).

To run karma in continuous mode that re-runs tests when files change:

karma start

To run tests in single-run mode (for CI):

karma start --single-run

Build and publish a new release

  1. Create dist files: webpack --optimize-minimize
  • npm version <update_type> (See: https://docs.npmjs.com/getting-started/publishing-npm-packages#updating-the-package)
  • Push changed files to master

To update the demo in gh-pages:

  1. git checkout gh-pages
  2. git rebase master
  3. git push origin gh-pages