Download the PHP package legit-health/dapi-sdk-php without Composer

On this page you can find all versions of the php package legit-health/dapi-sdk-php. 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 dapi-sdk-php

PHP SDK for integrate with the Dermatology API offered by Legit.Health

Official SDK for integrate with the Dermatology API offered by Legit.Health 🩺🤖

Instructions

If you want to start sending requests to Legit.Health's Dermatology API, you have to create an instance of the class LegitHealth\Dapi\MediaAnalyzer. It requires two arguments:

The class MediaAnalyzer exposes two methods:

Diagnosis support requests

The diagnosisSupport method of our MediaAnalyzer class receives one argument of the class LegitHealth\Dapi\MediaAnalyzerArguments\DiagnosisSupportArguments. The constructor of this class receives an object of the class LegitHealth\Dapi\MediaAnalyzerArguments\DiagnosisSupportData, in which you can specify the image itself and information about the patient or the body site:

Once you've created a DiagnosisSupportData object, you can send the request in this way:

The response object contains several properties with the information returned by the API about the analyzed image:

Severity assessment requests

The severityAssessment method of our MediaAnalyzer class receives one argument of the class LegitHealth\Dapi\MediaAnalyzerArguments\SeverityAssessmentArguments. The constructor of this class receives an object of the class LegitHealth\Dapi\MediaAnalyzerArguments\SeverityAssessmentData, in which can specify the image itself and information about a well known condition.

Example. Severity assessment request for psoriasis

Let's see how to send a severity assessment request for a patient diagnosed with psoriasis.

Firstly, we will create the different objects that represents the questionnaires used to track the evolution of psoriasis:

Then, we will create an object of the class LegitHealth\Dapi\MediaAnalyzerArguments\SeverityAssessmentData:

Unlike diagnostic support requests, severity assessment requests supports the following additional arguments:

Once you've created a SeverityAssessmentData object, you can send the request in this way:

The response object contains several properties with the information returned by the API about the analyzed image:

Besides, it contains two extra properties:

The ScoringSystemValues object

The ScoringSystemValues contains all the information about a scoring system, for example, APASI_LOCAL.

You can access to the value of one scoring system using the method getScoringSystemValues:

Once you have one object of the class ScoringSystemValues, you can access to the value of each facet using the method getFacetCalculatedValue(string $facetCode).

By invoking the method getFacets you will get an array of facets. Each element in this list is an array with three keys:

Finally, you can access to the score of the scoring system through its property score. It is an object with three properties:

Full example:

Detecting faces

In some cases, you may want to enable the feature of the algorithm capable of detecting faces. In this case, a metric called pxToCm is returned allowing to get the ratio of conversion from pixels to centimeters. This feature works for both diagnosis support and severity assessment requests.

For example, if you are working with a DiagnosisSupportData object, you can send the request in this way:

If the algorithm detects a face and can calculate the ratio from pixels to centimeters, the property metrics of the explainabilityMedia will get a value different of null


All versions of dapi-sdk-php with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
symfony/http-client Version ^7.2
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 legit-health/dapi-sdk-php contains the following files

Loading the files please wait ....