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

callmed-node

v1.0.0

Published

Official Node.js/TypeScript SDK for the CallMed Healthcare Rails API

Readme

@callmed/node

The official Node.js/TypeScript SDK for the CallMed Healthcare Rails API.

Build healthcare integrations in minutes. Verify practitioners, check insurance eligibility, process claims, and access FHIR health records — all with a single, type-safe client.

Installation

npm install @callmed/node

Quick Start

import { CallMed } from '@callmed/node';

const callmed = new CallMed({
  apiKey: 'cmd_live_...',        // Your API Key from the CallMed Dashboard
  // baseURL: 'http://localhost:3000' // Optional: for local development
});

Usage

Provider Rail — Verify a Doctor's License

const result = await callmed.provider.verifyLicense('MDCN/2008/45231');

console.log(result.data.practitioner.name);
// "Dr. Adewale Ogunbiyi"

console.log(result.data.practitioner.verification.status);
// "verified"

Provider Rail — Search Practitioners

const results = await callmed.provider.search({
  specialty: 'Cardiology',
  state: 'Lagos',
  verified_only: true,
});

Insurance Rail — Check Patient Eligibility

const eligibility = await callmed.insurance.checkEligibility({
  callmedId: 'CMD-DEMO01',
  procedureCode: 'GP001',
});

if (eligibility.data.is_eligible) {
  console.log(`Covered: ₦${eligibility.data.coverage.covered_amount}`);
  console.log(`Copay:   ₦${eligibility.data.coverage.patient_copay}`);
}

Insurance Rail — Submit a Claim

const claim = await callmed.insurance.submitClaim({
  callmed_id: 'CMD-DEMO01',
  procedure_codes: ['GP001'],
  diagnosis_codes: ['Z00.0'],
  total_amount: 15000,
  treatment_date: '2026-03-04',
});

console.log(claim.data.claim_id);
// "CLM-9F8K2A-XP1Z"

Identity Rail — Sign in with CallMed (OAuth 2.0)

// 1. Generate the OAuth authorization URL
const authUrl = callmed.identity.generateAuthorizationUrl(
  'your_client_id',
  {
    redirect_uri: 'https://yourapp.com/callback',
    scope: 'profile vitals insurance',
  }
);
// Redirect user to `authUrl`

// 2. Exchange the authorization code for a token
const token = await callmed.identity.exchangeToken({
  code: 'auth_code_from_callback',
  redirect_uri: 'https://yourapp.com/callback',
});

// 3. Use the token to fetch the user's CallMed profile
const profile = await callmed.identity.getProfile(token.data.access_token);
console.log(profile.data.full_name);

Data Rail — FHIR Health Records

// Fetch patient records (requires User Access Token)
const records = await callmed.data.getPatientRecords(userAccessToken, {
  resourceType: 'Observation',
  limit: 10,
});

// Write a new health record
await callmed.data.createRecord('CMD-DEMO01', {
  resourceType: 'Observation',
  status: 'final',
  code: { text: 'Blood Pressure' },
  valueQuantity: { value: 120, unit: 'mmHg' },
});

Payment Rail — Smart Health Wallets

// Get wallets
const wallets = await callmed.payment.getWallets(userAccessToken);

// Authorize a transaction
const tx = await callmed.payment.authorizeTransaction({
  wallet_id: wallets.data[0].id,
  amount: 5000,
  type: 'debit',
  description: 'Pharmacy purchase at HealthPlus',
});

Error Handling

The SDK provides structured error classes for common failure scenarios:

import { CallMedError, CallMedAuthenticationError, CallMedRateLimitError } from '@callmed/node';

try {
  await callmed.provider.verifyLicense('INVALID_LICENSE');
} catch (error) {
  if (error instanceof CallMedAuthenticationError) {
    console.error('Invalid API Key');
  } else if (error instanceof CallMedRateLimitError) {
    console.error(`Rate limited. Retry in ${error.retryAfter}ms`);
  } else if (error instanceof CallMedError) {
    console.error(`API Error [${error.code}]: ${error.message}`);
  }
}

Note: The SDK automatically retries 429 (Rate Limit) responses up to 2 times by default. You can configure this with maxRetries.

Configuration

| Option | Description | Default | | ------------ | ------------------------------------------ | ------------------------- | | apiKey | Your CallMed API Key (required) | — | | baseURL | Base URL for API requests | https://api.callmed.io | | maxRetries | Max retries on rate-limited responses | 2 |

Available Rails

| Rail | Namespace | Description | | ------------- | ---------------------- | ---------------------------------------------- | | Identity | callmed.identity | OAuth 2.0, CallMed ID, user profiles | | Provider | callmed.provider | Practitioner verification & search | | Insurance | callmed.insurance | Eligibility checks & claims management | | Data | callmed.data | FHIR R4 health records exchange | | Payment | callmed.payment | Smart health wallets & transactions |

License

MIT © CallMed Technologies