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 🙏

© 2026 – Pkg Stats / Ryan Hefner

emergency-room-beds

v0.4.0

Published

Public E-Gen nearby emergency room status lookup for Korean location queries

Readme

emergency-room-beds

Nearby Korean emergency-room lookup backed by E-Gen's public emergency-room search surface.

What it can and cannot report

  • It resolves a user-provided location to coordinates, then calls E-Gen's public nearby emergency-room list endpoint.
  • It reports distance, hospital category, address, phone, update time, and operation flags such as emergency-room operation and inpatient-bed operation.
  • Operation flags are tri-state: true for upstream Y, false for upstream N, and null when E-Gen omits or changes a flag value.
  • It does not claim exact real-time remaining bed counts. The public E-Gen nearby list exposes operation flags, not per-hospital remaining bed numbers.
  • For emergencies, call 119 or the hospital directly. Public E-Gen/Kakao data can lag, fail, or be incomplete and is not medical advice.

Public surfaces

  • NEMC monitoring entry point: https://dw.nemc.or.kr/nemcMonitoring/mainmgr/Main.do
  • E-Gen emergency-room search page: https://www.e-gen.or.kr/egen/search_emergency_room.do
  • E-Gen nearby emergency-room list endpoint: https://www.e-gen.or.kr/egen/retrieve_emergency_room_list.do
  • Kakao Map mobile search: https://m.map.kakao.com/actions/searchView?q=<query>
  • Kakao Map place panel JSON: https://place-api.map.kakao.com/places/panel3/<confirmId>

Usage

const { searchNearbyEmergencyRoomsByLocationQuery } = require("emergency-room-beds");

async function main() {
  const result = await searchNearbyEmergencyRoomsByLocationQuery("광화문", {
    limit: 3,
    radius: 5
  });

  console.log(result.anchor);
  console.log(result.items);
  console.log(result.meta.bedCountLimitation);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});

Public API

  • parseCoordinateQuery(locationQuery)
  • buildEmergencyRoomListRequest(options)
  • normalizeEmergencyRoomRows(payload, origin, options)
  • searchNearbyEmergencyRoomsByCoordinates(options)
  • searchNearbyEmergencyRoomsByLocationQuery(locationQuery, options)

Result fields

Each item includes:

  • name, emergencyGrade, hospitalType
  • address, phone, latitude, longitude, distanceKm
  • bedStatus.emergencyRoomOperating
  • bedStatus.inpatientBedsOperating
  • bedStatus.traumaCenter
  • bedStatus.pediatricSpecialty
  • bedStatus.currentGeneralCareAvailable
  • updatedAt, sourceUrl, mapUrl