---
title: "ABDM API — Doctor"
description: "Nice HMS ABDM doctor endpoints: create_doctor, edit_doctor, and the doctor patient lists (get_doctor_opd_patients_by_date / get_doctor_ipd_patients_by_date)."
date: 2026-08-26
lastModified: 2026-08-26
category: "developer"
author: "Dr. Umesh Bilagi"
beta: true
---

Doctor endpoints are **POST** and authenticated (`Authorization: Bearer <idToken>`).

---

## `/create_doctor` — POST (auth)

Creates a doctor (a Practitioner in the FHIR store + a MySQL user).

### Request fields

| Name | Type | Required | Description |
|---|---|---|---|
| `user.email` | string | Yes | Valid email. |
| `user.firstName` | string | Yes | Non-empty. |
| `user.lastName` | string | Yes | Non-empty. |
| `user.mobile` | string | Yes | 10 digits. |
| `doctorPrintName` | string | Yes | Non-empty. |
| `medicalLicenseNumber` | string | Yes | Non-empty. |
| `specialty` | string | Yes | Non-empty. |
| `qualification` | string | Yes | Non-empty. |
| `gender` | string | Yes | `"Male"` \| `"Female"` \| `"Other"`. |
| `abdmProfessionalId` | string | No | Optional. |

### Example request

```json
{
  "user": {
    "email": "doctor@example.com",
    "firstName": "Umesh",
    "lastName": "Bilagi",
    "mobile": "9233235620"
  },
  "doctorPrintName": "Dr Umesh Bilagi",
  "medicalLicenseNumber": "KMC-12345",
  "specialty": "General Medicine",
  "qualification": "MBBS, MD",
  "gender": "Male"
}
```

### Example response

```json
{
  "name": "Dr Umesh Bilagi",
  "orgId": 1,
  "gcpFhirId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14",
  "qualification": "MBBS, MD",
  "ndhmProfessionalId": "",
  "registration": "",
  "gender": "Male",
  "speciality": "General Medicine",
  "type": "Practitioner",
  "userId": 12,
  "id": 12
}
```

### Error codes

- `VALIDATION_ERROR` (400)
- `INVALID_EMAIL_FORMAT` (400) — backstop for malformed email.
- `EMAIL_ALREADY_EXISTS` (409) — email already registered.
- shared codes

---

## `/edit_doctor` — POST (auth)

Updates an existing doctor's Practitioner resource.

### Request fields

| Name | Type | Required | Description |
|---|---|---|---|
| `doctorGcpFhirId` | string | Yes | The existing Practitioner FHIR id. |
| `doctorPrintName` | string | Yes | Non-empty. |
| `medicalLicenseNumber` | string | Yes | Non-empty. |
| `specialty` | string | Yes | Non-empty. |
| `qualification` | string | Yes | Non-empty. |
| `gender` | string | Yes | `"Male"` \| `"Female"` \| `"Other"`. |
| `abdmProfessionalId` | string | No | Optional. |

### Example request

```json
{
  "doctorGcpFhirId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14",
  "doctorPrintName": "Dr Umesh Bilagi",
  "medicalLicenseNumber": "KMC-12345",
  "specialty": "General Medicine",
  "qualification": "MBBS, MD",
  "gender": "Male"
}
```

### Example response

```json
{
  "mes": "successfully edited the doctor's information"
}
```

### Error codes

- `VALIDATION_ERROR` (400)
- `DOCTOR_NOT_FOUND` (404) — `doctorGcpFhirId` does not exist in the FHIR store.
- shared codes

---

## `/get_doctor_opd_patients_by_date` — POST (auth)

Lists a doctor's OPD patients for a given date. The doctor must be an active user.

### Request fields

| Name | Type | Required | Description |
|---|---|---|---|
| `date` | string | Yes | The date (`YYYY-MM-DD`). Timezone conversion to IST is applied. |
| `doctorGcpId` | string | Yes | The GCP FHIR id of the doctor. |
| `orgId` | number | No | **Ignored** — the organization is taken from the auth token. |

### Example request

```json
{
  "date": "2025-02-02",
  "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14"
}
```

### Example response

Returns an array of OPD registrations:

```json
[
  {
    "token": "some-token-value",
    "opdId": 123,
    "orgId": 1,
    "date": "2025-02-02T00:00:00+05:30",
    "patientId": 456,
    "doctorId": 789,
    "prefix": "Mr",
    "firstName": "John",
    "middleName": "A.",
    "lastName": "Doe",
    "gender": "Male",
    "dob": "1990-01-01",
    "abhaAddress": "john@sbx",
    "abhaNumber": "ABHA1234567890",
    "mobile": "+911234567890",
    "status": "in-progress"
  }
]
```

### Error codes

Shared codes only.

---

## `/get_doctor_ipd_patients_by_date` — POST (auth)

Lists a doctor's IPD (in-patient) patients. The doctor must be an active user.

### Request fields

| Name | Type | Required | Description |
|---|---|---|---|
| `doctorGcpId` | string | Yes | The GCP FHIR id of the doctor. |
| `date` | string | No | Optional (no-op). |
| `orgId` | number | No | **Ignored** — the organization is taken from the auth token. |

### Example request

```json
{
  "doctorGcpId": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14"
}
```

### Example response

Returns an array of IPD patients:

```json
[
  {
    "patientId": 131,
    "name": "Bhargav Chandrashekhar Hede",
    "gender": "male",
    "mobile": "8554901073",
    "doa": "2025-03-07T18:14:26.556Z",
    "doctors": [
      { "id": "cf4a6ab1-3f32-4b92-adc5-89489da6ca14", "name": "Dr U R Bilagi" }
    ],
    "dob": "1999-11-12",
    "ipNo": 65
  }
]
```

### Error codes

Shared codes only.
