Providers

Providers represent healthcare professionals (doctors, nurses, specialists) registered in the MediLoop platform. Providers can be affiliated with multiple facilities and offer various medical services.

Endpoints

POST/api/v1/providers/register/Register a provider
GET/api/v1/providers/search/Search providers
GET/api/v1/providers/{provider_id}/Get provider details
POST/api/v1/providers/verify-hspa/Verify HSPA registration
POST/api/v1/affiliations/Create facility affiliation

The Provider Object

Attributes

iduuid

Unique identifier for the provider.

hspa_numberstring

Health Service Providers Authority registration number.

first_namestring

Provider's first name.

last_namestring

Provider's last name.

titlestringnullable

Professional title (Dr., Nurse, etc.).

specialtystring

Medical specialty.

qualificationstring

Professional qualification.

emailstring

Email address.

phone_numberstring

Phone number.

ninstringnullable

National ID number.

verification_statusstring

HSPA verification status.

is_activeboolean

Whether the provider is active.

facilitiesarray

List of affiliated facilities.

fhir_practitioner_idstring

FHIR Practitioner resource ID.

created_atdatetime

When the provider was registered.

RESPONSE200
{
  "id": "prov-abc-123-456",
  "hspa_number": "HSPA-2024-12345",
  "first_name": "Sarah",
  "last_name": "Nakamya",
  "title": "Dr.",
  "specialty": "General Practice",
  "qualification": "MBChB, MMed",
  "email": "sarah.nakamya@hospital.ug",
  "phone_number": "+256700123456",
  "nin": "CM12345678ABCDE",
  "verification_status": "verified",
  "is_active": true,
  "facilities": [
    {
      "id": "fac-xyz-789",
      "name": "Mulago Hospital",
      "role": "attending"
    }
  ],
  "fhir_practitioner_id": "Practitioner/fhir-123",
  "created_at": "2024-01-10T08:00:00Z"
}

Register a Provider

Registers a new healthcare provider. HSPA verification is required for production use.

POST/api/v1/providers/register/

Request Body

first_namestringrequired

Provider's first name

last_namestringrequired

Provider's last name

emailstringrequired

Email address

phone_numberstringrequired

Phone number

hspa_numberstringrequired

HSPA registration number

specialtystringrequired

Medical specialty

qualificationstringrequired

Professional qualification

titlestringoptional

Professional title

ninstringoptional

National ID number

Request
bash
curl -X POST https://api.mediloop.co/api/v1/providers/register/ \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
    "first_name": "Sarah",
    "last_name": "Nakamya",
    "email": "sarah.nakamya@hospital.ug",
    "phone_number": "+256700123456",
    "hspa_number": "HSPA-2024-12345",
    "specialty": "General Practice",
    "qualification": "MBChB, MMed",
    "title": "Dr."
  }'
RESPONSE201
{
  "id": "prov-abc-123-456",
  "hspa_number": "HSPA-2024-12345",
  "first_name": "Sarah",
  "last_name": "Nakamya",
  "specialty": "General Practice",
  "verification_status": "pending",
  "is_active": true,
  "created_at": "2024-01-10T08:00:00Z"
}

Get Provider Details

Retrieves detailed information about a specific provider.

GET/api/v1/providers/{provider_id}/
Request
bash
curl https://api.mediloop.co/api/v1/providers/prov-abc-123-456/ \
  -H "Authorization: Bearer sk_test_..."
RESPONSE200
{
  "id": "prov-abc-123-456",
  "hspa_number": "HSPA-2024-12345",
  "first_name": "Sarah",
  "last_name": "Nakamya",
  "title": "Dr.",
  "specialty": "General Practice",
  "qualification": "MBChB, MMed",
  "email": "sarah.nakamya@hospital.ug",
  "phone_number": "+256700123456",
  "verification_status": "verified",
  "is_active": true,
  "facilities": [
    {
      "id": "fac-xyz-789",
      "name": "Mulago Hospital",
      "role": "attending"
    }
  ]
}

Verification Status

Provider verification status values:

StatusDescription
pendingAwaiting HSPA verification
verifiedHSPA credentials verified
rejectedVerification failed
expiredHSPA registration expired

Common Specialties

General Practice
Internal Medicine
Pediatrics
Obstetrics & Gynecology
Surgery
Orthopedics
Cardiology
Dermatology
Psychiatry
Ophthalmology
ENT
Radiology