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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ehr_emulator

v1.0.5

Published

EHR Emulator for simulating embedded environments within other service platforms.

Readme

EHR Emulator package

Requirements

  • NodeJS via nvm
  • MacOs (ARM)
    • Current build of the emulator is compatible with macOS only. Windows is currently still in development.

Node Version

Make sure you are on the correct node and npm version. This project keeps an .nvmrc file in the root to help developers switch versions more easily. See this section of the nvm docs for more information on using it. The node and npm versions are also tracked in package.json in the engines field.

Note: When updating node and npm versions, we need to keep the following in sync: .nvmrc and package.json engines.

Installation

# with npm
npm install ehr_emulator
# with yarn
yarn add ehr_emulator

Usage

Once emulator package is installed follow the below directions.

Create Configuration Directory

Inside the src directory create a directory labeled emulator and create the base emulator file.

src/emulator/index.ts

// import the start command for the emulator
import {  start } from "ehr_emulator";
start()
  .then((response) => {
    // any code you would like to run once emulator is live
    // this is where you can also add additonal URLOverrides if needed
  })
  .catch((error) => {
    console.log(error);
    // handle errors as you wish for the emulator start sequence
  });

Add the following script to your package.json to start the emulator.

NOTE: This script can be altered as you wish this is just a base example.

package.json

{
  "scripts": {
    "start:emulator": "npx ts-node src/emulator/index.ts"
  }
}

Adding Url Overrides

Inside the emulator directory create an overrides.config.ts.

overrides.config.ts

// import the override class
import { UrlOverrider } from "ehr_emulator";

// register your url to be overriden
UrlOverrider.register({
  url: "/test",
  title: "Test Override",
  active_response: 0,
  response_options: [
    {
      title: "Success Test",
      status: 200,
      method: "get",
      response: {
        message: "success",
      },
    },
  ],
})

NOTE: You can place as many registers as you wish in a single file, and they can be chained as so UrlOverrider.register({}).register({})

Update emulator to use new overrides

Overrides must be sent to emulator once it has been started.

src/emulator/index.ts

// Bring in the override class
import { UrlOverrider, start } from "ehr_emulator";
// import the overrides config file
import "./overrides.config";
// NOTE: you can include as many as you wish and give them easier names to leverage
// import "./patient.overrrides.config"
start()
        .then((response) => {
          console.log("=== started app ===");
          // activate the sendToEmulator method
          UrlOverrider.sendToEmulator();
        })
        .catch((error) => {
          console.log(error);
        });