canonical: https://jentic.com/apis/nirvartech.com/nirvartech

# Nirvartech Patient API

The Nirvartech Patient API powers the patient side of the Nirvartech health app: phone-number registration with OTP verification, login, and profile details such as blood group, height, and weight. Patients organise prescriptions and test reports into folders, upload PDF or image files, search them, and generate temporary signed URLs to share a folder or file with a doctor. The API also records blood pressure and blood sugar readings and returns today's values plus seven-day, weekly, and monthly averages, along with patient notifications and a list of doctor specialities.

## For AI agents

Manage a Nirvartech patient's medical record folders and files, share them through signed URLs, log blood pressure and blood sugar readings, and read daily, weekly, and monthly health averages.

## Scope

Does not book appointments, issue prescriptions, or connect to hospital EHR systems. Use for a patient's own Nirvartech records, file sharing, and home blood pressure and blood sugar logs only.

## Capabilities

- Register a patient by phone number, verify the OTP, and log in to obtain a bearer token
- Organise prescriptions and test reports into folders and upload PDF, JPEG, PNG, GIF, or HEIC files with type prescription or test_report
- Search a patient's folders and files by a search_data term
- Generate a temporary signed URL to share a folder or a single file with a care provider
- Record blood pressure readings with systolic and diastolic values and blood sugar with blood_sugar_level
- Read today's readings and seven-day, weekly, and monthly averages for blood pressure and blood sugar
- List patient notifications and mark one as read

## Use cases

### Health log assistant through Jentic

A personal health agent records home readings without the patient opening the app. It searches Jentic for 'store a blood pressure reading', receives the operation schema, and posts systolic and diastolic values, then reads the past-seven-days endpoint to report the trend. The spec limits each reading type to two submissions per 24-hour period, so the agent checks today's readings first.

Example prompt: Call GET `/patient/blood-pressure/today`, and if fewer than two readings exist call POST `/patient/blood-pressure/store` with systolic=125 and diastolic=82, then call GET `/patient/blood-pressure/past-seven-days` and summarise the trend

### Sharing records before a doctor visit

Before an appointment, a patient can send the relevant prescriptions and test reports in one link. GET `/patient/folders` lists folders, GET `/patient/files/{id}` lists the files inside one, and GET `/patient/folders/{folder}/share` returns a temporary signed URL that gives outside access to that folder for a limited time.

Example prompt: Call GET `/patient/folders`, find the folder named 'Cardiology', then call GET `/patient/folders/{folder}/share` with its id and return the signed URL

### Digitising paper prescriptions and reports

Patients often hold their records as photos and scans. POST `/patient/file/upload` accepts a multipart file with folder_id, file_name, and a type of prescription or test_report, and POST `/patient/search` finds files and folders later by a search term, so a patient's history stays in one organised place.

Example prompt: Call POST `/patient/folder/create` with name='Lab Results 2026', then POST `/patient/file/upload` with that folder_id, file_name='CBC March', type='test_report', and the scanned PDF

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/patient/login` | Patient login |
| GET | `/patient/folders` | List the patient's folders |
| POST | `/patient/file/upload` | Upload a file to a folder |
| GET | `/patient/folders/{folder}/share` | Generate a signed URL to share a folder |
| POST | `/patient/blood-pressure/store` | Store a blood pressure reading |
| GET | `/patient/blood-pressure/past-seven-days` | Get seven-day blood pressure averages |
| POST | `/patient/diabetes/store` | Store a blood sugar reading |

## Key resources

- **Authentication** — Phone-number registration with OTP, login, logout, and password reset or change
- **Patient profile** — Complete, read, and update profile details such as blood group, height, and weight; search folders and files
- **Folders and files** — Create, rename, and delete folders; upload, rename, download, and delete files
- **File sharing** — Generate temporary signed URLs for a folder or file
- **Health data** — Store and read blood pressure and blood sugar readings with daily, seven-day, weekly, and monthly views
- **Notifications** — List notifications and mark them as read

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 45 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 49 / 100
  - Developer Experience & Jentic Compatibility: 67 / 100
  - AI-Readiness & Agent Experience: 22 / 100
  - Agent Usability: 94 / 100
  - Security: 60 / 100
  - AI Discoverability: 78 / 100
- **View full report:** https://jentic.com/apis/nirvartech.com/nirvartech/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring Nirvartech by hand means running the phone-number OTP and login flow, keeping the Passport bearer token, and handling an API that reports errors inside 200 responses. Through Jentic you install once, import Nirvartech from the API Directory, store the token once, and your agent calls it.
- **Permission scoping:** Several Nirvartech paths carry the folder or file id (`/patient/files/{id}`, `/patient/folders/{folder}/share`), so a rule can limit those calls to one folder, but deletes are also GET operations. You choose the operations it may call, so destructive or sharing ones like `/patient/folder/delete/{id}` or the share-link operations are not included unless you add them.
- **Credential handling:** The patient's Nirvartech bearer token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'store a blood pressure reading' or 'share a medical folder', and Jentic returns the matching Nirvartech operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **DrChrono API** — Provider-side EHR with patients, appointments, and clinical notes
- **Fitbit Web API** — Wearable activity, heart rate, and sleep data
- **PatientView** — Patient portal API for observations, diagnoses, and user details

## FAQ

### What authentication does the Nirvartech Patient API use?

Per its OpenAPI spec, the Nirvartech Patient API declares a bearer token in Passport format, sent in the Authorization header. The patient obtains it from POST `/patient/login` with their phone number and password. Signed share URLs served from `/image/{fileId}` and `/file/{filename}` carry their own temporary signature. Through Jentic, the token is stored encrypted by your own Jentic One instance and injected at call time.

### Can I share medical records with a doctor using the Nirvartech Patient API?

Yes. GET `/patient/folders/{folder}/share` returns a temporary signed URL for a whole folder, and GET `/patient/file/{fileId}` returns one for a single file. Both links grant outside access for a limited time without sharing the patient's login.

### What are the rate limits for the Nirvartech Patient API?

The OpenAPI spec does not specify a general request limit. It does limit POST `/patient/blood-pressure/store` and POST `/patient/diabetes/store` to two submissions per 24-hour period each. Check https://nirvartech.com for other limits.

### How do I log a blood sugar reading with the Nirvartech Patient API through Jentic?

Install Jentic One with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, add Nirvartech from the Jentic API Directory, and store the patient's bearer token. Your agent searches for 'store a blood sugar reading' and calls POST `/patient/diabetes/store` with blood_sugar_level, then GET `/patient/diabetes/today` to confirm. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the Nirvartech Patient API?

Yes, and here it matters which operations you name rather than which methods. Folder and file deletion use GET (`/patient/folder/delete/{id}` and `/patient/file/delete/{id}`), so a rule that allows the health-data reads and the two store operations, and nothing else, lets the agent log and review readings without being able to delete records or create share links.

### Is there a Nirvartech MCP server?

You don't need an MCP server to give your agent the Nirvartech Patient API. Jentic connects it directly from the API Directory: import it, store the bearer token once, and your agent calls it.

### What file types can I upload with the Nirvartech Patient API?

POST `/patient/file/upload` accepts PDF, JPEG, PNG, JPG, GIF, and HEIC files up to 111MB as multipart form data, with folder_id, file_name, and a type of prescription or test_report.
