Saltar al contenido principal

Standard

Once the iframe finishes processing an upload and emits the analysis_completed callback with the report identifier, your backend retrieves the diagnostic report on demand from the API. See the API Endpoint page for the request format.

The payload encapsulates several layers of diagnostic data and metrics.

Example payload

{
"id": "0189bafa-0610-7349-a0ab-eb53695b27fd",
"url": "https://iframe.legit.health?companyId=XXXX&diagnosticReportId=signedId",
"pdf": "https://back-{pre}.legit.health/s2s-api/v2/anonymous-diagnostic-reports/encryptedId?format=pdf",
"extraData": "some extra data",
"visitIdentifier": "visit identifier",
"anamnesisGeneral": [
{
"question": "What is the reason for the consultation? How did the problem start? Describe the origin.",
"answer": "I have acne on my face and neck. It started 2 months ago."
},
{
"question": "Do you have any allergies, especially to medications? If yes, list allergies."
"answer": "No"
},
{
"question": "Are you taking any medication or treatment? If yes, explain what treatment you are taking.",
"answer": "No"
},{

"question": "Do you have any major illness? Have you had anything operated on?",
"answer": "No"
},
{
"question": "Is there a history of any major illness in your family?",
"answer": "No"
}
],
"pathology": {
"name": "Acne",
"code": "Acne",
"icd11": "ED80"
},
"bodySite": {
"code": "HEAD_FRONT",
"name": "Face and neck"
},
"macroscopicMedia": {
"url": "https://bucket/diagnostic-report-medias/bbb.png",
"type": "Image",
"annotations": []
},
"createdAt": "2023-08-03T12:38:10+02:00",
"result": {
"id": "0189bafa-0610-7349-a0ab-eb536a2185f6",
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53,
"entropy": null
},
"preliminaryFindings": {
"hasCondition": 100,
"malignancy": 0.02,
"adjustedMalignancy": null,
"pigmentedLesion": 0,
"urgentReferral": 100,
"highPriorityReferral": 100
},
"iaSeconds": 0.88,
"observations": [
{
"media": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://bucket/diagnostic-report-medias/bbb.png"
}
}
],
"conclusions": [
{
"probability": 99.65,
"pathology": {
"name": "Acne",
"code": "Acne",
"icd11": "ED80"
}
},
{
"probability": 0.06,
"pathology": {
"name": "Varicella",
"code": "Varicella",
"icd11": "1E90"
}
}
],
"scoringSystems": [
{
"scoringSystem": {
"name": "Acne lesion estimation grading index",
"code": "ALEGI"
},
"score": {
"value": 8,
"severity": {
"value": 1,
"interpretations": [
{
"min": 0.0,
"max": 0.0,
"text": "None",
"coding": [
{
"code": 1,
"display": "low"
}
]
},
{
"min": 0.0,
"max": 2.1,
"text": "Mild",
"coding": [
{
"code": 1,
"display": "low"
}
]
},
{
"min": 2.1,
"max": 4.5,
"text": "Moderate",
"coding": [
{
"code": 2,
"display": "moderate"
}
]
},
{
"min": 4.5,
"max": 21.6,
"text": "Severe",
"coding": [
{
"code": 3,
"display": "high"
}
]
}
]
}
},
"facets": [
{
"facet": {
"name": "Acne lesion density",
"description": ""
},
"value": {
"display": "None (0)",
"raw": 0
}
},
{
"facet": {
"name": "Number of lesions",
"description": ""
},
"value": {
"display": "Mild (0-10)",
"raw": 5
}
}
]
}
]
}
}

Fundamental fields

  • id: A unique identifier of the Diagnostic Report.
  • url: link to visualize the diagnostic report inside Legit.Health's interface.
  • extraData: A string value passed as a query parameter when you loaded the iframe.
  • createdAt: Timestamp indicating the time of creation for this diagnostic report.

Body site and pathology

These fields contain information about the location (bodySite) and type (pathology) of the lesion captured in the image. These fields are populated when the likelihood of the most probable conclusion surpasses a predetermined threshold or if it was set during image submission.

"bodySite": {
"code": "HEAD_FRONT",
"name": "Face and neck"
},
"pathology": {
"name": "Acne",
"code": "Acne",
"icde11": "E90"
}

Anamnesis general

The anamnesisGeneral field is an array of questions and their corresponding answers. These questions are asked to the patient before the image is submitted for analysis and their objetive is to gather information about the patient's medical history:

"anamnesisGeneral": [
{
"question": "What is the reason for the consultation? How did the problem start? Describe the origin.",
"answer": "I have acne on my face and neck. It started 2 months ago."
},
...
]

Macroscopic media

Details an image or other media of the lesion or body part. Here, it references a resource of type "Media":

  • resourceType: Always "Media".
  • content.url: A direct URL to access the uploaded file, typically a signed URL valid for a limited time.
  • type: The type of media, often "Image".
  • annotations: An optional field; it can be null or contain relevant metadata about image findings.
"macroscopicMedia": {
"resourceType": "Media",
"content": {
"url": "https://...jpg"
},
"type": "Image",
"annotations": null
}

Diagnostic result

The result field encapsulates the comprehensive results of the diagnostic process. This includes:

  • metrics: Measures of sensitivity and specificity of the diagnostic process.
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53,
"entropy": null
}
  • preliminaryFindings: An array of preliminary suspicions and their likelihoods, including the probability of malignancy and the requirement for a biopsy.
"preliminaryFindings": {
"hasCondition": 100,
"malignancy": 0.02,
"adjustedMalignancy": null,
"pigmentedLesion": 0,
"urgentReferral": 100,
"highPriorityReferral": 100
}
  • iaSeconds: The processing time consumed by the AI for image analysis.

Observations

The observations field is an array of medias, each containing one field: media.

media: the media sent to the algorithm to be analyzed. It includes:

  • type: The format of the image.
  • modality: The context or manner of the image capture.
  • diqaScore: The Dermatology Image Quality Assessment (DIQA) score.
  • url: The direct S3 URL to the image. It is a time-limited signed URL; download it within 30 minutes of generation if you plan to use it later.
"observations": [
{
"media": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://bucket/diagnostic-report-medias/bbb.png"
}
},
...
]

Diagnostic conclusions

The conclusions field is an array of diagnostic outcomes, each containing a pathology type and its associated probability.

"conclusions": [
{
"probability": 99.65,
"pathology": {
"name": "Acne",
"code": "Acne",
"icd11": "ED80"
}
},
...
],

Scoring systems

The scoringSystems field houses one or more scoring models for the identified pathology. These models come into play when the likelihood of the most probable conclusion surpasses a certain threshold. They are used to estimate the severity of the most probable condition:

    "scoringSystems": [
{
"scoringSystem": {
"name": "Acne lesion estimation grading index",
"code": "ALEGI"
},
"score": {
"value": 8,
"severity": {
"value": 1,
"interpretations": [
{
"min": 0.0,
"max": 0.0,
"text": "None",
"coding": [
{
"code": 1,
"display": "low"
}
]
},
...
]
}
},
"facets": [
{
"facet": {
"name": "Acne lesion density",
"description": ""
},
"value": {
"display": "None (0)",
"raw": 0
}
},
...
]
}
]

In each scoring system:

  • scoringSystem includes the name and code of the scoring methodology.
  • score.value indicates the calculated score according to the system's rules.
  • score.severity signifies the severity associated with the computed score. It has three possible values:
    • 1: low
    • 2: moderate
    • 3: high
  • facets is an array of facets used in score calculation, with each object containing the facet's information and the corresponding raw and displayed values.

Comprehensive scoring systems information

For an exhaustive understanding of scoring systems, their identifiers, and facets, you can download the detailed documentation:

Examples

Two illustrative cases that contrast what the device returns when it is confident in the diagnosis versus when it is not.

Case 1: Diagnostic confidence above the threshold

Download

Download an example JSON: psoriasis (confident)

This case corresponds to three uploaded images of psoriasis on the elbow. The diagnostic-support algorithm reports psoriasis with high confidence, so the application also calculates the associated severity questionnaire (PASI).

The user uploaded three photos but the severity is calculated on one of them. Each photo can show a different perspective of the lesion (omitting or adding parts), so we choose the most representative image for the severity calculation.

The most relevant fields in the JSON are:

  • observations: the array of images uploaded by the user.
  • result.scoringSystems / result.questionnaires: the questionnaires that capture the severity of the most probable condition.

Case 2: Diagnostic confidence below the threshold

Download

Download an example JSON: inconclusive case

In this case the user uploaded three images but the diagnostic-support algorithm could not determine the type of lesion above the configured confidence threshold, so severity is not calculated.

In the example JSON, all images are returned under observations and result.scoringSystems / result.questionnaires is empty.

Further reading

Please read the Instructions For Use for the canonical reference. Note that the IFU may vary by country; reach out to us for country-specific guidance.