Download the PHP package keenops/php-nhiftz without Composer

On this page you can find all versions of the php package keenops/php-nhiftz. 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 php-nhiftz

PHP NHIF Tanzania API Wrapper

A framework-agnostic PHP 8.2+ library for integrating with NHIF Tanzania's ServiceHub and OCS (Online Claims Submission) APIs.

Features

Requirements

Installation

Quick Start

Basic Usage

Card Verification with Biometrics

Patient Admission

Claim Submission

Laravel Integration

Service Provider Registration

Add the service provider to your config/app.php (Laravel < 11) or it will be auto-discovered:

Publish Configuration

Environment Variables

Add to your .env file:

Username Resolver

The NHIF API requires a username for token authentication. Instead of calling setUsername() before every request, you can configure a username resolver that dynamically resolves the username (e.g., from the authenticated user).

Option 1: Class-based resolver (recommended, config-cache safe)

Create an invokable class:

Then set it in config/nhif.php:

Option 2: Closure in AppServiceProvider

Option 3: Manual (per-request)

Usage with Facade

Usage with Dependency Injection

Symfony Integration

Register the Bundle

Configuration

Username Resolver

Register your resolver as a service, then reference it in the config:

Usage

Comprehensive Documentation

For detailed API documentation including all endpoints, parameters, payloads, and expected responses, see:

Available Services

ServiceHub API

Service Description Endpoints
verification() Card verification, member details, biometrics 18
admissions() Patient admission, discharge, transfer 15
approvals() Service authorization and approval requests 31
attendance() Practitioner login/logout 2
history() Patient visit history and medical records 3
issues() Claim issues management 7
preApprovals() Pre-approval service requests 6
reference() Reference data (facilities, visit types, etc.) 4
referrals() Service and treatment referrals 7

OCS API

Service Description Endpoints
claims() Folio submission, signing, claim retrieval 9
facilities() Facility listing 1
packages() Price packages, benefit schemes, services 16
reference() Disease codes, cache management 2

Error Handling

Custom HTTP Client

You can provide your own PSR-18 compatible HTTP client:

Token Caching

Provide a PSR-16 compatible cache to persist tokens:

Testing

License

The MIT License (MIT). Please see License File for more information.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.


All versions of php-nhiftz with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.0
psr/simple-cache Version ^3.0
psr/http-client Version ^1.0
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 keenops/php-nhiftz contains the following files

Loading the files please wait ...