Quickstart
In about five minutes you will run a practice version of ABDM on your computer, ask a made-up patient for consent, and receive an encrypted health record. No ABDM account is needed and nothing leaves your computer.
Before you start
Section titled “Before you start”You need Node.js 22 or later (download) and Python 3 (already on most Macs and Linux machines). Check with:
node --versionpython3 --versionRun it
Section titled “Run it”-
Get the code and build it.
Terminal window git clone https://github.com/yellowparrottech/abdm-devkit.gitcd abdm-devkitcorepack enablepnpm installpnpm build -
Start the practice ABDM. Leave this terminal open.
Terminal window node apps/cli/dist/main.js mockYou will see a local address and a one-time password (a “token”):
Mock ABDM environment (synthetic data only) at http://127.0.0.1:8787/v1ABDM_DEVKIT_TOKEN=pVIKaNteEHa6-3dC_PeRjSYn1JocDXs1Facility ID for consent requests: HIU-DEMO-01 -
In a second terminal, run the example, pasting your token:
Terminal window cd abdm-devkitABDM_DEVKIT_TOKEN=paste-your-token-here python3 examples/python/consent_and_fetch.py -
Watch the flow. Within about ten seconds you will see:
Consent request to approve:Request consent from asha.rao1@sbx for Care ManagementRecords: Prescription, DiagnosticReportWaiting for the simulated patient to respond...Granted by HIP-DEMO-01 for Prescription, DiagnosticReportFetch to approve:Fetch health records from HIP-DEMO-01 under consent mock-cr-1-artefact-1Waiting for the encrypted records...Received Prescription: Prescription (synthetic) (1691 bytes, decrypted by the DevKit)HIP-DEMO-01is the made-up hospital that holds the records, and the long ID after “under consent” identifies what the patient approved. ABDM in plain words explains both.
What just happened
Section titled “What just happened”The example asked a made-up patient for consent, the simulated patient approved, the simulated hospital encrypted a prescription for you, and the DevKit decrypted it. Consent and approvals walks through each step with a diagram.
If something goes wrong
Section titled “If something goes wrong”| You see | Fix |
|---|---|
pnpm: command not found |
Run corepack enable first, or install pnpm from pnpm.io. |
KeyError: 'ABDM_DEVKIT_TOKEN' |
Put ABDM_DEVKIT_TOKEN=... before python3, using the token from step 2. |
failed with 401 |
The token is wrong or from an earlier run. Copy the one printed by the running command. |
Connection refused |
The practice ABDM in step 2 is not running, or stopped. Start it again. |
address already in use |
Another program uses port 8787. Run node apps/cli/dist/main.js mock --port 8788 and add ABDM_DEVKIT_URL=http://127.0.0.1:8788/v1 to the example command. |
- Do the same by chatting with Claude: Claude Desktop.
- Connect your own app: REST API from any language.