Download the PHP package banguncode/php-ihs without Composer

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

php-ihs

PHP client for the SATUSEHAT (Indonesia Health Services) FHIR R4 API of the Indonesian Ministry of Health.

Requirements

PHP 5.5 or newer with the curl and json extensions.

Installation

Configuration

Option Description
client_id, client_secret Required. Credentials from the SATUSEHAT portal.
environment development (default), staging or production.
organization_id Organization id of the facility, used to build identifier systems.
auth_url, base_url, api_url, kptl_url Override the URLs derived from environment. api_url is the gateway root used by master data, KFA, the national medical record and DICOM Router downloads.
dicom_router_url FHIR base URL of the on premise DICOM Router.
http CurlHttpClient options: timeout, connect_timeout, verify, proxy, curl.

Config::fromEnvironment() reads the same options from SATUSEHAT_ENV, SATUSEHAT_CLIENT_ID, SATUSEHAT_CLIENT_SECRET, SATUSEHAT_ORGANIZATION_ID, SATUSEHAT_AUTH_URL, SATUSEHAT_BASE_URL, SATUSEHAT_API_URL, SATUSEHAT_KPTL_URL and SATUSEHAT_DICOM_ROUTER_URL.

SATUSEHAT penalises every failed token request with a one minute wait, so share tokens between processes with FileTokenStorage or your own TokenStorageInterface. An expired token is renewed and the request is retried once.

Usage

Each resource type has an accessor named after it, such as encounter(), observation() or medicationRequest(). Payloads may be arrays, JSON strings copied from the SATUSEHAT Postman collections, or JsonSerializable objects. Results are associative arrays.

Every endpoint provides create, read, update, patch, search, searchAll, searchByIdentifier and operation. Clinical resources add findBySubject($patientId, $encounterId) and findByEncounter($encounterId). Other lookups from the SATUSEHAT Postman collections have dedicated helpers:

Resource Helpers
Patient findByNik, findByMotherNik, findByNameNik, findByNameBirthDateNik, findByNameBirthDateGender
Practitioner findByNik, findByNameNik, findByNameBirthDateGender
Organization findByName, findByPartOf
Location findByIdentifier, findByName, findByOrganization, setBedStatus
Observation findByBasedOn
DiagnosticReport findBySpecimen
ServiceRequest findByAccessionNumber, findByReferralNumber
Specimen findByRequest, findBySubjectAndCollector, findBySubjectAndCollectedDate, findByAccessionNumber
MedicationRequest findByPrescriptionNumber
MedicationDispense findByEncounter, findByPrescription
DocumentReference findByPrescriptionNumber
ImagingStudy findByAccessionNumber
AllergyIntolerance, Immunization findByPatient
QuestionnaireResponse findByEncounter
EpisodeOfCare findByCareManager
RelatedPerson findByNik
Coverage findByPatient
CoverageEligibilityRequest findByIdentifier, everything
CoverageEligibilityResponse findByRequest
ChargeItem findByAccount
Claim findBySepNumber
PaymentReconciliation, PaymentNotice findByClaim

Use $client->resource('Basic') for resource types without an accessor. See examples for complete flows.

Transaction Bundle

create() returns the entry fullUrl (urn:uuid:...) for references between entries.

DICOM Router

downloadDicomRouter() fetches the docker-compose package (docker) or the binary installer (installer).

Master Data, KFA and KPTL

These APIs answer with their own JSON shapes, returned as decoded arrays.

National Medical Record

The patient approves access through verificationUrl in SATUSEHAT Mobile; until then open() throws ConsentException with error code CONSENT_REQUIRED.

Error Handling

All exceptions implement BangunCode\Ihs\Exception\IhsException.

Exception Raised when
ValidationException HTTP 400 or 422: invalid JSON, profile rule violation, missing reference, id mismatch, duplicate resource, rejected parameters.
ConsentException The patient has not given consent: HTTP 400 forbidden, HTTP 200 suppressed, or CONSENT_REQUIRED from the national medical record.
AuthenticationException HTTP 401: invalid client, invalid or expired token, wrong environment or missing API role.
ForbiddenException HTTP 403 from the gateway.
NotFoundException HTTP 404: wrong URL or a referenced record that does not exist.
ServerException HTTP 5xx.
ApiException Parent of the exceptions above, used for any other status.
TransportException No response: DNS, TLS or timeout failure.
InvalidArgumentException Input rejected before the request is sent.

Development

License

MIT. See LICENSE.


All versions of php-ihs with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-curl Version *
ext-json Version *
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 banguncode/php-ihs contains the following files

Loading the files please wait ...