Skip to main content

Get an Anonymous Diagnostic Report

Besides getting the DiagnosticReports linked to patients between your system and our, you can also fetch the AnonymousDiagnosticReports that you had sent, ie, those which are not linked to any patient.

We provide an endpoint to fetch an anonymous diagnostic report already present in the system. You only need the encrypted id of the diagnostic report in Legit.Health. This identifier is received from the message posted by our iFrame to your app.

To get a diagnostic report, you must use the endpoint getAnonymousDiagnosticReport.

A Anonymous Diagnostic Report contains all the information related to an image uploaded for a not-linked patient and the corresponding result data generated by our AI algorithms.

Status: Preliminary

Please note that the status of the report is labelled as preliminary, as defined by the FHIR standard.

JSON Structure​

The typical JSON structure we will send to your servers is the following:

{
"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",
"patientIdentifier": "patient identifier",
"visitIdentifier": "visit identifier",
"anamnesisQuestions": [
{
"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"
},
"bodySite": {
"code": "HEAD_FRONT",
"name": "Face and neck"
},
"createdAt": "2023-08-03T12:38:10+02:00",
"supportingInfo": [
{
"type": "DiagnosticReport",
"subtype": "DiagnosisSupport",
"reference": {
"id": "018cceda-771d-7b9d-918a-f1171443fd6c",
"observations": [
{
"originalMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/foo.jpg",
"type": "Image",
"modality": "Clinical",
"diqaScore": 85.0
},
"explainabilityMedia": null
},
{
"originalMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bar.jpg",
"type": "Image",
"modality": "Clinical",
"diqaScore": 89.0
},
"explainabilityMedia": null
}
]
}
}
],
"result": {
"id": "0189bafa-0610-7349-a0ab-eb536a2185f6",
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53
},
"preliminaryFindings": {
"hasConditionSuspicion": 100,
"isPreMalignantSuspicion": 0.02,
"isMalignantSuspicion": 0,
"needsBiopsySuspicion": 0,
"needsSpecialistsAttention": 100
},
"iaSeconds": 0.88273024559021,
"observations": [
{
"originalMedia": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bbb.png"
},
"explainabilityMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/ccc.png"
}
},
{
"originalMedia": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bbb.png"
},
"explainabilityMedia": null
}
],
"conclusions": [
{
"probability": 99.65,
"pathology": {
"name": "Acne",
"code": "Acne"
}
},
{
"probability": 0.06,
"pathology": {
"name": "Varicella",
"code": "Varicella"
}
},
{
"probability": 0.05,
"pathology": {
"name": "Impetigo",
"code": "Impetigo"
}
},
{
"probability": 0.03,
"pathology": {
"name": "Rosacea",
"code": "Rosacea"
}
},
{
"probability": 0.02,
"pathology": {
"name": "Dermatitis",
"code": "Dermatitis"
}
}
],
"scoringSystems": [
{
"scoringSystem": {
"name": "Acne lesion estimation grading index",
"code": "ALEGI"
},
"score": 8,
"scoreCategorySeverity": 1,
"scoreCategories": [
{
"code": "None",
"category": "None",
"min": 0.0,
"max": 0.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 1",
"category": "Grade 1",
"min": 0.0,
"max": 10.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 2",
"category": "Grade 2",
"min": 10.0,
"max": 20.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 3",
"category": "Grade 3",
"min": 20.0,
"max": 30.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 4",
"category": "Grade 4",
"min": 30.0,
"max": 40.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 4",
"category": "Grade 4",
"min": 40.0,
"max": 50.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 5",
"category": "Grade 5",
"min": 50.0,
"max": 60.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 6",
"category": "Grade 6",
"min": 60.0,
"max": 70.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 7",
"category": "Grade 7",
"min": 70.0,
"max": 80.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 8",
"category": "Grade 8",
"min": 80.0,
"max": 90.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 9",
"category": "Grade 9",
"min": 90.0,
"max": 100.0,
"severity": 3,
"severityAsString": "high"
}
],
"resultScoringSystemFacets": [
{
"facet": {
"name": "Acne lesion density",
"description": ""
},
"valueToDisplay": "None (0)",
"rawValue": 0
},
{
"facet": {
"name": "Number of lesions",
"description": ""
},
"valueToDisplay": "Mild (0-10)",
"rawValue": 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.
  • patientIdentifier: A user identifier in your system, passed as a query parameter when you loaded the iFrame.
  • createdAt: Timestamp indicating the time of creation for this diagnostic report.

Supporting info​

In our iFrame integration, the application can initiate two types of requests:

  1. Diagnosis Support Request: This request utilizes multiple images to estimate the most probable pathology.

  2. Severity Assessment Request: This request involves the use of the most representative image from the previous set if the confidence of the Diagnosis Support Request surpasses a specific threshold.

For the callback related to the Severity Assessment, we provide a set of images used in the Diagnosis Support Request under the property SupportingInfo. The type and subtype of the object indicate that it is associated with the diagnostic report generated to calculate the most likely pathology.

"supportingInfo": [
{
"type": "DiagnosticReport",
"subtype": "DiagnosisSupport",
"reference": {
"id": "018cceda-771d-7b9d-918a-f1171443fd6c",
"observations": [
{
"originalMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/foo.jpg",
"type": "Image",
"modality": "Clinical",
"diqaScore": 85.0
},
"explainabilityMedia": null
},
{
"originalMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bar.jpg",
"type": "Image",
"modality": "Clinical",
"diqaScore": 89.0
},
"explainabilityMedia": null
}
]
}
}
]

For a comprehensive understanding of the callback flow, please refer to this link: iFrame's callback mechanism.

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"
}

Anamnesis questions​

The anamnesisQuestions 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:

"anamnesisQuestions": [
{
"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"
}
]

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
}
  • preliminaryFindings: An array of preliminary suspicions and their likelihoods, including the probability of malignancy and the requirement for a biopsy.
"preliminaryFindings": {
"hasConditionSuspicion": 100,
"isPreMalignantSuspicion": 0.02,
"isMalignantSuspicion": 0,
"needsBiopsySuspicion": 0,
"needsSpecialistsAttention": 100
}
  • iaSeconds: The processing time consumed by the AI for image analysis.

Observations​

The observations field is an array of medias, each containing two fields: originalMedia and explainabilityMedia.

originalMedia: 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.

explainabilityMedia: the processed image highlighting the area of the lesion analyzed by the AI. Like the original image, this is also a time-limited S3 URL, so remember to download it within 30 minutes if needed. The explainabilityMedia contains either null or the URL of an image that demonstrates what their severity estimation algorithms have "seen". Here's a detailed explanation:

  • If there's no conclusive diagnosis for the analyzed image, this field is set to null.
  • If there is a conclusive diagnosis for the analyzed image, but it belongs to a group of pathologies for which severity is not yet measured, this field is again null.
  • Finally, if there is a conclusive diagnosis for the analyzed image and a trained algorithm to measure severity, this field contains the URL to an image that shows the analyzed signs.
"observations": [
{
"originalMedia": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bbb.png"
},
"explainabilityMedia": {
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/ccc.png"
}
},
{
"originalMedia": {
"type": "Image",
"modality": "Clinical",
"diqaScore": 86,
"url": "https://legit-dev.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/bbb.png"
},
"explainabilityMedia": null
}
]

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"
}
},
{
"probability": 0.06,
"pathology": {
"name": "Varicella",
"code": "Varicella"
}
},
{
"probability": 0.05,
"pathology": {
"name": "Impetigo",
"code": "Impetigo"
}
},
{
"probability": 0.03,
"pathology": {
"name": "Rosacea",
"code": "Rosacea"
}
},
{
"probability": 0.02,
"pathology": {
"name": "Dermatitis",
"code": "Dermatitis"
}
}
]

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.

"scoringSystems": [
{
"scoringSystem": {
"name": "Acne lesion estimation grading index",
"code": "ALEGI"
},
"score": 8,
"scoreCategorySeverity": 1,
"scoreCategories": [
{
"code": "None",
"category": "None",
"min": 0.0,
"max": 0.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 1",
"category": "Grade 1",
"min": 0.0,
"max": 10.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 2",
"category": "Grade 2",
"min": 10.0,
"max": 20.0,
"severity": 1,
"severityAsString": "low"
},
{
"code": "Grade 3",
"category": "Grade 3",
"min": 20.0,
"max": 30.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 4",
"category": "Grade 4",
"min": 30.0,
"max": 40.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 4",
"category": "Grade 4",
"min": 40.0,
"max": 50.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 5",
"category": "Grade 5",
"min": 50.0,
"max": 60.0,
"severity": 2,
"severityAsString": "moderate"
},
{
"code": "Grade 6",
"category": "Grade 6",
"min": 60.0,
"max": 70.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 7",
"category": "Grade 7",
"min": 70.0,
"max": 80.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 8",
"category": "Grade 8",
"min": 80.0,
"max": 90.0,
"severity": 3,
"severityAsString": "high"
},
{
"code": "Grade 9",
"category": "Grade 9",
"min": 90.0,
"max": 100.0,
"severity": 3,
"severityAsString": "high"
}
],
"resultScoringSystemFacets": [
{
"facet": {
"name": "Acne lesion density",
"description": ""
},
"valueToDisplay": "None (0)",
"rawValue": 0
},
{
"facet": {
"id": 108,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Number of lesions",
"description": ""
},
"valueToDisplay": "Mild (0-10)",
"rawValue": 5
}
]
}
]

In each scoring system:

  • scoringSystem includes the name and code of the scoring methodology.
  • score indicates the calculated score according to the system's rules.
  • scoreCategorySeverity signifies the severity associated with the computed score. It has three possible values:
    • 1: low
    • 2: moderate
    • 3: high
  • resultScoringSystemFacets 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:

Obtaining a PDF​

You can generate a PDF with the contents of anonymous diagnostic report by calling the endpoint getAnonymousDiagnosticReport with the query param format=pdf:

/anonymous-diagnostic-reports/{encryptedId}?format=pdf