> ## Documentation Index
> Fetch the complete documentation index at: https://docs.clinikapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Introduction

> Healthcare infrastructure for developers. Build clinical apps without FHIR complexity.

# Welcome to ClinikAPI

ClinikAPI is a managed healthcare infrastructure platform that lets you build clinical applications through a simple REST API and SDK — without dealing with FHIR R4 complexity, HIPAA compliance infrastructure, or cloud provisioning.

## What ClinikAPI Does

You send simplified JSON. We handle the rest:

* **FHIR R4 transformation** — your payloads are automatically converted to strict FHIR R4 resources
* **Tenant isolation** — every resource is tagged and filtered by your organization
* **Secure storage** — data lives in an encrypted, HIPAA-compliant FHIR R4 data store
* **Compliance** — BAA-ready infrastructure with audit logging on every request

```ts theme={null}
import { Clinik } from '@clinikapi/sdk';

const clinik = new Clinik(process.env.CLINIKAPI_SECRET_KEY);

// Create a patient — ClinikAPI handles FHIR transformation + storage
const { data: patient } = await clinik.patients.create({
  firstName: 'Jane',
  lastName: 'Doe',
  email: 'jane@example.com',
  gender: 'female',
  birthDate: '1990-03-15',
});

console.log(patient.id); // "pt_abc123"
```

## 62 FHIR R4 Resources

Full CRUD + search + pagination out of the box, organized by FHIR domain:

### Individuals

| Resource           | FHIR Type           | SDK Namespace              |
| ------------------ | ------------------- | -------------------------- |
| Patients           | Patient             | `clinik.patients`          |
| Practitioners      | Practitioner        | `clinik.practitioners`     |
| Practitioner Roles | PractitionerRole    | `clinik.practitionerRoles` |
| Persons            | Person              | `clinik.persons`           |
| Family History     | FamilyMemberHistory | `clinik.familyHistory`     |

### Entities

| Resource            | FHIR Type         | SDK Namespace               |
| ------------------- | ----------------- | --------------------------- |
| Organizations       | Organization      | `clinik.organizations`      |
| Locations           | Location          | `clinik.locations`          |
| Healthcare Services | HealthcareService | `clinik.healthcareServices` |
| Devices             | Device            | `clinik.devices`            |

### Clinical — Summary

| Resource       | FHIR Type           | SDK Namespace          |
| -------------- | ------------------- | ---------------------- |
| Conditions     | Condition           | `clinik.conditions`    |
| Allergies      | AllergyIntolerance  | `clinik.allergies`     |
| Assessments    | ClinicalImpression  | `clinik.assessments`   |
| Family History | FamilyMemberHistory | `clinik.familyHistory` |

### Clinical — Diagnostics

| Resource         | FHIR Type        | SDK Namespace            |
| ---------------- | ---------------- | ------------------------ |
| Observations     | Observation      | `clinik.observations`    |
| Labs             | DiagnosticReport | `clinik.labs`            |
| Specimens        | Specimen         | `clinik.specimens`       |
| Imaging Studies  | ImagingStudy     | `clinik.imagingStudies`  |
| Media            | Media            | `clinik.media`           |
| Risk Assessments | RiskAssessment   | `clinik.riskAssessments` |

### Clinical — Medications

| Resource                     | FHIR Type                  | SDK Namespace                        |
| ---------------------------- | -------------------------- | ------------------------------------ |
| Medications                  | Medication                 | `clinik.medications`                 |
| Prescriptions                | MedicationRequest          | `clinik.prescriptions`               |
| Medication Dispenses         | MedicationDispense         | `clinik.medicationDispenses`         |
| Medication Statements        | MedicationStatement        | `clinik.medicationStatements`        |
| Medication Knowledge         | MedicationKnowledge        | `clinik.medicationKnowledge`         |
| Immunizations                | Immunization               | `clinik.immunizations`               |
| Immunization Evaluations     | ImmunizationEvaluation     | `clinik.immunizationEvaluations`     |
| Immunization Recommendations | ImmunizationRecommendation | `clinik.immunizationRecommendations` |
| Nutrition Orders             | NutritionOrder             | `clinik.nutritionOrders`             |
| Vision Prescriptions         | VisionPrescription         | `clinik.visionPrescriptions`         |

### Clinical — Care Provision

| Resource              | FHIR Type          | SDK Namespace                |
| --------------------- | ------------------ | ---------------------------- |
| Encounters            | Encounter          | `clinik.encounters`          |
| Care Plans            | CarePlan           | `clinik.carePlans`           |
| Care Teams            | CareTeam           | `clinik.careTeams`           |
| Goals                 | Goal               | `clinik.goals`               |
| Service Requests      | ServiceRequest     | `clinik.serviceRequests`     |
| Device Requests       | DeviceRequest      | `clinik.deviceRequests`      |
| Device Use Statements | DeviceUseStatement | `clinik.deviceUseStatements` |
| Consents              | Consent            | `clinik.consents`            |

### Clinical — Documents and Forms

| Resource  | FHIR Type             | SDK Namespace      |
| --------- | --------------------- | ------------------ |
| Notes     | DocumentReference     | `clinik.notes`     |
| Documents | Composition           | `clinik.documents` |
| Intakes   | QuestionnaireResponse | `clinik.intakes`   |

### Scheduling

| Resource              | FHIR Type           | SDK Namespace                 |
| --------------------- | ------------------- | ----------------------------- |
| Appointments          | Appointment         | `clinik.appointments`         |
| Appointment Responses | AppointmentResponse | `clinik.appointmentResponses` |
| Schedules             | Schedule            | `clinik.schedules`            |
| Slots                 | Slot                | `clinik.slots`                |

### Workflow

| Resource             | FHIR Type          | SDK Namespace                |
| -------------------- | ------------------ | ---------------------------- |
| Tasks                | Task               | `clinik.tasks`               |
| Activity Definitions | ActivityDefinition | `clinik.activityDefinitions` |
| Plan Definitions     | PlanDefinition     | `clinik.planDefinitions`     |

### Financial — Billing

| Resource     | FHIR Type  | SDK Namespace        |
| ------------ | ---------- | -------------------- |
| Accounts     | Account    | `clinik.accounts`    |
| Charge Items | ChargeItem | `clinik.chargeItems` |
| Invoices     | Invoice    | `clinik.invoices`    |

### Financial — Claims and Reimbursement

| Resource                | FHIR Type             | SDK Namespace                   |
| ----------------------- | --------------------- | ------------------------------- |
| Claims                  | Claim                 | `clinik.claims`                 |
| Claim Responses         | ClaimResponse         | `clinik.claimResponses`         |
| Explanation of Benefits | ExplanationOfBenefit  | `clinik.eobs`                   |
| Payment Notices         | PaymentNotice         | `clinik.paymentNotices`         |
| Payment Reconciliations | PaymentReconciliation | `clinik.paymentReconciliations` |

### Financial — Insurance

| Resource              | FHIR Type                   | SDK Namespace                 |
| --------------------- | --------------------------- | ----------------------------- |
| Coverages             | Coverage                    | `clinik.coverages`            |
| Eligibility Requests  | CoverageEligibilityRequest  | `clinik.eligibilityRequests`  |
| Eligibility Responses | CoverageEligibilityResponse | `clinik.eligibilityResponses` |
| Enrollment Requests   | EnrollmentRequest           | `clinik.enrollmentRequests`   |
| Enrollment Responses  | EnrollmentResponse          | `clinik.enrollmentResponses`  |

### Quality and Audit

| Resource        | FHIR Type     | SDK Namespace           |
| --------------- | ------------- | ----------------------- |
| Measures        | Measure       | `clinik.measures`       |
| Measure Reports | MeasureReport | `clinik.measureReports` |
| Audit Events    | AuditEvent    | `clinik.auditEvents`    |

## Architecture

ClinikAPI is a **data API** — you bring your own auth (Clerk, Auth0, Firebase, etc.).

```
Your App → Your Backend → ClinikAPI SDK → ClinikAPI REST API → FHIR R4 Data Store
```

* The SDK runs **server-side only** with a secret API key
* React widgets use a **proxy pattern** — they talk to your backend, not directly to ClinikAPI
* Test keys route to a shared test datastore; live keys route to production

## Next Steps

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get your first patient created in under 5 minutes.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Learn how API keys and tenant isolation work.
  </Card>

  <Card title="SDK Reference" icon="code" href="/sdk/installation">
    Full TypeScript SDK documentation.
  </Card>

  <Card title="React Components" icon="react" href="/components/overview">
    Drop-in clinical UI widgets for your frontend.
  </Card>
</CardGroup>
