Download the PHP package clinically/laravel-halaxy without Composer

On this page you can find all versions of the php package clinically/laravel-halaxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-halaxy

clinically/laravel-halaxy

A Laravel SDK for the Halaxy FHIR R4B healthcare API.

[!IMPORTANT] This is an independent, unofficial project. It is not affiliated with, endorsed by, or supported by Halaxy. Halaxy is a trademark of its respective owner.

Features

Requirements

Installation

Publish the configuration:

Set your credentials in .env (created per practice in Halaxy's developer settings):

Usage

Patients

Query Builder

Appointments

Booking uses Halaxy's $book operation, which expects a FHIR Parameters resource (not a bare Appointment) and creates related resources (invoice, clinical note) as part of the booking:

Appointments have no writable status field. Cancellation is done by patching the patient participant's modifierExtension:

Referrals

Halaxy referrals use Halaxy-specific property names rather than the generic FHIR ServiceRequest names. A Coverage record must already exist. Use the typed payload to produce coverage, created, active, comment, and attachments:

Halaxy's referral PATCH endpoint only appends attachments. It does not update or replace other referral properties:

Schedules and Slots

Region Switching

Multi-Tenant Usage

Each tenant (e.g. clinic) can use its own Halaxy credentials with isolated OAuth token caching:

Direct Client Access

Available Resources

Group Method Operations
People patients() find, list, create, update, replace, exportIds
People practitioners() find, list, create
People practitionerRoles() find, list, create
People organizations() find, list, create
Scheduling appointments() find, list, book/create, update, findAvailable
Scheduling schedules() find, list, create, generateSlots
Scheduling slots() find, list
Scheduling healthcareServices() find, list
Financial chargeItemDefinitions() find, list
Financial coverages() find, list, create, update
Financial invoices() find, list
Financial invoiceLines() find, list
Financial paymentTransactions() find, list
Financial referrals() find, list, create, addAttachments
Financial referralDefinitions() find, list
Clinical documentReferences() create
Foundations capabilities() get
Foundations searchParameters() list

The SDK deliberately exposes only the operations Halaxy documents — there is no delete() anywhere because the Halaxy API has no delete endpoint, and replace() (PUT) exists only on patients.

Halaxy API Quirks

Verified against the live API — worth knowing before you integrate:

Webhooks

The SDK integrates spatie/laravel-webhook-client to receive Halaxy webhooks. Webhook handling is disabled by default and must be explicitly enabled with a signing secret. Requests fail closed if the secret is missing.

Halaxy webhook payloads identify which resource changed but not what happened to it, so each event type gets its own endpoint. When creating each webhook in Halaxy (Settings > Integrations > Webhooks), point it at the URL matching its event:

Halaxy event Endpoint
Patient Create https://your-app/webhooks/halaxy/patient-created
Patient Update https://your-app/webhooks/halaxy/patient-updated
Appointment Create https://your-app/webhooks/halaxy/appointment-created
Appointment Update https://your-app/webhooks/halaxy/appointment-updated
Appointment Delete https://your-app/webhooks/halaxy/appointment-deleted
Invoice Create https://your-app/webhooks/halaxy/invoice-created
Invoice Update https://your-app/webhooks/halaxy/invoice-updated
Invoice Delete https://your-app/webhooks/halaxy/invoice-deleted

Set the webhook's "Authentication Header" in Halaxy to your HALAXY_WEBHOOK_SECRET value.

[!WARNING] HALAXY_WEBHOOKS_ENABLED=true without HALAXY_WEBHOOK_SECRET rejects every webhook request. Configure the same secret as the webhook's Authentication Header in Halaxy before enabling the endpoints.

Exclude the webhook routes from CSRF verification in bootstrap/app.php:

Run the spatie migration to create the webhook_calls table:

Each endpoint dispatches its typed event — PatientCreated, PatientUpdated, AppointmentCreated, AppointmentUpdated, AppointmentDeleted, InvoiceCreated, InvoiceUpdated, InvoiceDeleted — exposing resourceReference, timestamp, webhookCall, and an ID accessor (e.g. patientId()). Requests to the base path dispatch the generic HalaxyWebhookReceived.

Multi-tenant hosts

Disable auto-registration and register the routes inside your own tenant-scoped group:

Point each Halaxy webhook at the tenant URL, e.g. https://your-app/app/{tenant}/webhooks/halaxy/appointment-created.

For per-tenant secrets, substitute your own validator (and any other component) in config/halaxy.php:

Entries named halaxy/halaxy-* in a host's published webhook-client.php are superseded by the package's entries — put overrides in config/halaxy.php's webhooks block instead.

Error Handling

Every exception extends HalaxyException and carries the status, request method, request URL and parsed OperationOutcome. Persist $e->getOperationOutcome() when logging a failure — the one-line message is often too little to diagnose from later.

isRetryable() says whether repeating the identical request could plausibly succeed. A 4xx is a verdict on the request, so retrying one only burns attempts and multiplies noise in your error tracker; 408, 429 and 5xx (bar 501) are worth another go. Use it to fail a queued job fast:

Testing

Integration tests (live API)

The Integration suite exercises the real Halaxy API and is excluded from composer test. To run it, copy .env.example to .env, add credentials for a practice with curated test patients, and pin their IDs:

Tests skip cleanly when credentials are absent. Write tests are gated behind HALAXY_ALLOW_WRITES, only ever touch the pinned test patients, and clean up after themselves where the API allows (booked appointments are cancelled); endpoints that would create undeletable records in the practice are skipped by design — see tests/Integration/UnexercisedWriteEndpointsTest.php.

License

MIT License. See LICENSE for details.


All versions of laravel-halaxy with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
illuminate/cache Version ^13.0
illuminate/contracts Version ^13.0
illuminate/http Version ^13.0
illuminate/support Version ^13.0
spatie/laravel-webhook-client Version ^3.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package clinically/laravel-halaxy contains the following files

Loading the files please wait ...