Skip to main content

Anonymous Diagnostic Reports

Post an anonymous diagnostic report

We provide an endpoint to create an anonymous diagnostic report. This kind of request allows to run our AI algorithms over an image without creating a patient. That is to say, you can send an image to our system and get the result, but this report will not be linked to any patient in our system.

To post an anonymous diagnostic report, you must use the endpoint createAnonymousDiagnosticReport.

This endpoint allows to kind of requests:

Diagnose support

If you only want to get the list of possible conclusions and preliminary findings of a skin lesion, you can send a request that includes two properties:

  • the image
  • and the body site in which the lession is located.
{
"bodySite": "ARM_LEFT",
"image": {
"x": 57.91903409090901,
"y": 0,
"width": 1258.261855332168,
"height": 729.0723905723905,
"image": "data:image/jpeg;base64,/9j"
}
}

In this case, you will get a JSON with the following shape:

{
"success": true,
"message": "Diagnostic report created",
"data": {
"id": "01898d7a-92d2-7dd1-a2bb-f585f16da0a3",
"originalMedia": {
"focusScore": null,
"type": "Image",
"modality": "Clinical",
"diqaScore": 86.0,
"pxToCm": null,
"annotations": [],
"url": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/xxx.jpg",
"thumbnailUrl": null
},
"bodySite": {
"id": 3,
"code": "ARM_LEFT",
"name": "Arm left"
},
"createdAt": "2023-07-25T14:36:05+00:00",
"result": {
"id": "01898d7a-92d2-7dd1-a2bb-f585f1d1b1d2",
"explainabilityMedia": {
"focusScore": null,
"type": null,
"modality": null,
"diqaScore": null,
"pxToCm": null,
"annotations": [],
"url": null,
"thumbnailUrl": null
},
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53
},
"preliminaryFindings": {
"hasConditionSuspicion": 100.0,
"isPreMalignantSuspicion": 0.0,
"isMalignantSuspicion": 0.0,
"needsBiopsySuspicion": 0.0,
"needsSpecialistsAttention": 100.0,
"adjustedIsPreMalignantSuspicion": null,
"adjustedIsMalignantSuspicion": null,
"isPreMalignantSuspicionOverThreshold": false,
"isMalignantSuspicionOverThreshold": false
},
"iaSeconds": 0.5766849517822266,
"conclusions": [
{
"probability": 100.0,
"pathology": {
"id": 237,
"name": "Psoriasis",
"code": "Psoriasis"
}
}
],
"scoringSystems": []
},
"pathology": null
},
"errorCode": null
}

Severity measurement

You can also perform a severity measurement if you know the pathology that the lesion shows. In this case, you must send the image and body site, but also the pathology and the related scoring systems that allows to measure the severity.

{
"bodySite": "ARM_LEFT",
"image": {
"x": 57.91903409090901,
"y": 0,
"width": 1258.261855332168,
"height": 729.0723905723905,
"image": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/",
"orientation": -1
},
"scoringSystems": [
{
"scoringSystem": "2",
"scoringSystemFacets": [
{
"scoringSystemFacet": "8",
"value": "139"
}
]
},
{
"scoringSystem": "8",
"scoringSystemFacets": [
{
"scoringSystemFacet": "19",
"value": "73"
},
{
"scoringSystemFacet": "20",
"value": "77"
},
{
"scoringSystemFacet": "21",
"value": "81"
},
{
"scoringSystemFacet": "22",
"value": "85"
},
{
"scoringSystemFacet": "23",
"value": "89"
},
{
"scoringSystemFacet": "24",
"value": "93"
},
{
"scoringSystemFacet": "25",
"value": "97"
},
{
"scoringSystemFacet": "26",
"value": "101"
},
{
"scoringSystemFacet": "27",
"value": "105"
},
{
"scoringSystemFacet": "28",
"value": "110"
}
]
},
{
"scoringSystem": "16",
"scoringSystemFacets": [
{
"scoringSystemFacet": "72",
"value": "331"
},
{
"scoringSystemFacet": "73",
"value": "333"
},
{
"scoringSystemFacet": "74",
"value": "335"
},
{
"scoringSystemFacet": "75",
"value": "337"
}
]
}
],
"pathology": "Psoriasis",
"extraData": null,
"patientIdentifier": "A1"
}

In this case, you will get a JSON with the following shape:

{
"success": true,
"message": "Diagnostic report created",
"data": {
"id": "01898ce9-c246-72fb-b2cf-337629cd7bd0",
"originalMedia": {
"focusScore": null,
"type": "Image",
"modality": "Clinical",
"diqaScore": 86.0,
"pxToCm": null,
"annotations": [],
"url": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/xxx.jpg"
"thumbnailUrl": null
},
"bodySite": {
"id": 3,
"code": "ARM_LEFT",
"name": "Arm left"
},
"createdAt": "2023-07-25T11:57:54+00:00",
"result": {
"id": "01898ce9-c246-72fb-b2cf-33762a9b2e98",
"explainabilityMedia": {
"type": null,
"modality": null,
"diqaScore": null,
"url": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/yyy.jpg",
"thumbnailUrl": null
},
"metrics": {
"sensitivity": 83.31,
"specificity": 99.53
},
"preliminaryFindings": {
"hasConditionSuspicion": 100.0,
"isPreMalignantSuspicion": 0.0,
"isMalignantSuspicion": 0.0,
"needsBiopsySuspicion": 0.0,
"needsSpecialistsAttention": 100.0,
"isPreMalignantSuspicionOverThreshold": false,
"isMalignantSuspicionOverThreshold": false
},
"iaSeconds": 0.7282395362854004,
"conclusions": [
{
"probability": 100.0,
"pathology": {
"id": 237,
"name": "Psoriasis",
"code": "Psoriasis"
}
}
],
"scoringSystems": [
{
"scoringSystem": 2,
"score": 4.200000000000001,
"scoreCategory": "Severe",
"scoreCategorySeverity": 3,
"resultScoringSystemFacets": [
{
"facet": {
"id": 4,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Desquamation",
"description": "This value corresponds to the shedding intensity of the outermost layer of skin of the affected zone"
},
"valueToDisplay": "Moderate (2)"
},
{
"facet": {
"id": 1,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Redness",
"description": "This value corresponds to the redness intensity of the lesion"
},
"valueToDisplay": "Severe (3)"
},
{
"facet": {
"id": 3,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Induration",
"description": "This value corresponds to the hardening intensity of the lesion"
},
"valueToDisplay": "Moderate (2)"
},
{
"facet": {
"id": 26,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Affected area",
"description": "This value corresponds to the percentage of involvement of the specific area of the body you are reporting"
},
"valueToDisplay": "50% (3)"
}
],
"reduction": null,
"explainabilityMediaUrl": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/ps4q5JKDNHLejFjfbhGVVRtKNYCVRNoN4fi17gijUWNVypJ4JLBapASPeMbsRN7Y.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA52A2ZCZF32OWDLDS%2F20230725%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20230725T143807Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1800&X-Amz-Signature=eec91bccdbbe8bcab1230e230bbc66d610518cca4ad610a5270b5e1ccddb9896"
},
{
"scoringSystem": 16,
"score": 0.0,
"scoreCategory": "No apparent symptoms",
"scoreCategorySeverity": 1,
"resultScoringSystemFacets": [
{
"facet": {
"id": 68,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Have you ever had a globally swollen and painful finger or toe?",
"description": ""
},
"valueToDisplay": "No (0)"
},
{
"facet": {
"id": 69,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Have you ever had heel pain as soon as you stand up in the morning?",
"description": ""
},
"valueToDisplay": "No (0)"
},
{
"facet": {
"id": 70,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Have you ever had left and right buttock pain, at the same time or not?",
"description": ""
},
"valueToDisplay": "No (0)"
},
{
"facet": {
"id": 71,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Have you ever had a swollen and painful joint? (hands, feet, knees, or ankles, for example)",
"description": ""
},
"valueToDisplay": "No (0)"
}
],
"reduction": null,
"explainabilityMediaUrl": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/ps4q5JKDNHLejFjfbhGVVRtKNYCVRNoN4fi17gijUWNVypJ4JLBapASPeMbsRN7Y.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA52A2ZCZF32OWDLDS%2F20230725%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20230725T143807Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1800&X-Amz-Signature=eec91bccdbbe8bcab1230e230bbc66d610518cca4ad610a5270b5e1ccddb9896"
},
{
"scoringSystem": 8,
"score": 1.0,
"scoreCategory": "No effect at all on patient's life",
"scoreCategorySeverity": 1,
"resultScoringSystemFacets": [
{
"facet": {
"id": 16,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how itchy, sore, painful or stinging has your skin been?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 25,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much of a problem has the treatment for your skin been, for example by making your home messy, or by taking up time?",
"description": ""
},
"valueToDisplay": "A little (1)"
},
{
"facet": {
"id": 17,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how embarrassed or self conscious have you been because of your skin?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 18,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin interfered with you going shopping or looking after your home or garden? ",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 19,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin influenced the clothes you wear?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 20,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin affected any social or leisure activities?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 21,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin made it difficult for you to do any sport?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 22,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin prevented you from working or studying?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 23,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin created problems with your partner or any of your close friends or relatives?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
},
{
"facet": {
"id": 24,
"inputAdornment": null,
"allowsInputFromUser": false,
"name": "Over the last week, how much has your skin caused any sexual difficulties?",
"description": ""
},
"valueToDisplay": "Not at all (0)"
}
],
"reduction": null,
"explainabilityMediaUrl": "https://legit-app-pre.s3.eu-west-3.amazonaws.com/diagnostic-report-medias/ps4q5JKDNHLejFjfbhGVVRtKNYCVRNoN4fi17gijUWNVypJ4JLBapASPeMbsRN7Y.jpg?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA52A2ZCZF32OWDLDS%2F20230725%2Feu-west-3%2Fs3%2Faws4_request&X-Amz-Date=20230725T143807Z&X-Amz-SignedHeaders=host&X-Amz-Expires=1800&X-Amz-Signature=eec91bccdbbe8bcab1230e230bbc66d610518cca4ad610a5270b5e1ccddb9896"
}
]
},
"pathology": "Psoriasis"
},
"errorCode": null
}

Request data

You can also send two params in the body to set meta information about the request:

  • patientIdentifier, a string with the patient's identifier in your system.
  • extraData, a string with any extra information you want to be associated with the request.

Both properties will be saved and related to the diagnostic report.

{
"bodySite": "ARM_LEFT",
"image": {
"x": 57.91903409090901,
"y": 0,
"width": 1258.261855332168,
"height": 729.0723905723905,
"image": "data:image/jpeg;base64,/9j"
},
"patientIdentifier": "XYZ",
"extraData": "a base64 encoded string"
}

How to send a scoring system

To submit a scoring system, you need to provide the corresponding system identifier in our database, along with an array of values for each facet that the scoring system requires:

{
"scoringSystem": "2",
"scoringSystemFacets": [
{
"scoringSystemFacet": "8", // scoring system facet id
"value": "139"
}
]
}

To obtain a comprehensive list of scoring systems along with their identifiers and facets, please download the appropriate file from the following locations:

As an example, our scoring system APASI_LOCAL includes four facets: surface, erythema, induration, and desquamation. However, according to our scoring system definition, the user is only required to provide information for the surface facet; the values of the remaining three facets, which have isAskedInQuestionnaire property set to false, are calculated by our AI. Here's an example of a facet that is not required:

{
"id": 9,
"isAskedInQuestionnaire": false,
"code": "erythema"
}

To solicit the surface facet information from the user, prompt the user to select a range from the provided options, and then record the id of the chosen range for future submission to the endpoint. For instance, if the user selects 10-30%, you should record the identifier for that range, which is 138.

The surface facet in our system looks like this:

{
"id": 8,
"isAskedInQuestionnaire": true,
"code": "surface",
"allowsInputFromUser": false,
"name": {
"en": "Affected area",
"es": "Area afectada"
},
"description": {
"en": "This value corresponds to the percentage of involvement of the specific area of the body you are reporting",
"es": "Este valor corresponde al porcentaje de afectación de la zona concreta del cuerpo que estás reportando"
},
"ranges": [
{
"id": 29,
"label": {
"en": "0",
"es": "0"
},
"min": 0,
"max": 0,
"code": "0",
"value": "0"
},
{
"id": 137,
"label": {
"en": "0-10%",
"es": "0-10%"
},
"min": 1,
"max": 1,
"code": "0-10%",
"value": "1"
},
{
"id": 138,
"label": {
"en": "10-30%",
"es": "10-30%"
},
"min": 2,
"max": 2,
"code": "10-30%",
"value": "2"
},
{
"id": 139,
"label": {
"en": "30-50%",
"es": "30-50%"
},
"min": 3,
"max": 3,
"code": "30-50%",
"value": "3"
},
{
"id": 140,
"label": {
"en": "50-70%",
"es": "50-70%"
},
"min": 4,
"max": 4,
"code": "50-70%",
"value": "4"
},
{
"id": 141,
"label": {
"en": "70-90%",
"es": "70-90%"
},
"min": 5,
"max": 5,
"code": "70-90%",
"value": "5"
},
{
"id": 142,
"label": {
"en": "90-100%",
"es": "90-100%"
},
"min": 6,
"max": 6,
"code": "90-100%",
"value": "6"
}
]
}

Each range option is defined with an id, a label (with English and Spanish options), a code, and a value. The user should choose from the available options, and the corresponding id should be sent to the endpoint. For example, the 10-30% range is defined as follows:

{
"id": 138,
"label": {
"en": "10-30%",
"es": "10-30%"
},
"min": 2,
"max": 2,
"code": "10-30%",
"value": "2"
}

Certain facets, such as surfaceValue of ASCORAD_LOCAL, have their allowsInputFromUser property set to true. This implies that instead of predefined ranges, users should be provided with a text input field where they can input a number.

In the case of the surfaceValue facet, users are required to input the percentage of the specific body area involved or affected. The submitted JSON to the API, therefore, could be as follows:

{
"scoringSystem": "1",
"scoringSystemFacets": [
{
"scoringSystemFacet": "85",
"value": "83"
}
// Include additional facets as needed
]
}

In this example, the user has reported that 83% of the specific body area is involved or affected, as denoted by the value of 83.

Each scoring system includes a set of categories that enable you to determine the severity based on the calculated score. The details of these categories are housed within the scoreCategories property for each scoring system:

{
"scoreCategories": [
{
"code": "Mild",
"min": 0,
"max": 20,
"severity": 1,
"bodySite": "GENITAL"
}
// other categories
]
}

Note that certain categories are dependent on the specific body site where the photo was taken. Thus, when you wish to determine the severity, use the score returned by the endpoint in combination with the bodySite.

For instance, if ASCORAD_LOCAL returns a score of 22 for a photo taken of the ARM_RIGHT, the severity would be determined as follows:

{
"code": "Moderate",
"min": 21,
"max": 49,
"severity": 2,
"bodySite": "ARM_RIGHT"
}

However, for the scoring system AUAS_LOCAL, the body site is irrelevant:

{
"scoreCategories": [
{
"code": "None",
"min": 0,
"max": 0,
"severity": 1,
"bodySite": null
},
{
"code": "Mild",
"min": 0,
"max": 2,
"severity": 1,
"bodySite": null
},
{
"code": "Moderate",
"min": 2,
"max": 4,
"severity": 2,
"bodySite": null
},
{
"code": "Severe",
"min": 4,
"max": 6,
"severity": 3,
"bodySite": null
}
]
}

In this scenario, regardless of the body site, severity is determined purely based on the score obtained.