Diagnostic support
Although diagnosis is a quotidian way of speaking about the output of the device, keep in mind that what the device outputs is an interpretative distribution representation of possible International Classification of Diseases (ICD) classes that might be represented in the pixel content of the image.
Indeed, healthcare practitioners and organisations may use the data outputed by the device to inform a diagnosis, but what the device itself outputs is not a diagnosis. This is appropiately signaled in the output of the device, which follows the FHIR standard when noting that the output is a DiagnosticReport
, with a status of preliminary
.
Version 2.0β
Endpointβ
https://ai.legit.health/v2/legit_health/predict
Body Requestβ
For basic image analysis to obtain probabilities of detected pathologies:
{
"requestId": "unique-request-id",
"data": {
"content": "base64 encoded image"
}
}
For enhanced accuracy, you can include additional data:
{
"requestId": "unique-request-id",
"data": {
"type": "image",
"modality": "clinical",
"operator": "Practitioner",
"bodySite": "ARM_LEFT",
"subject": {
"identifier": "subject-id",
"gender": "m",
"height": 175,
"weight": 71,
"birthdate": "1986-10-21",
"generalPractitioner": {
"identifier": "practitioner-id"
},
"managingOrganization": {
"identifier": "organization-id",
"display": "Hospital Central"
}
},
"content": "base64 encoded image"
}
}
This is the description of the relevant properties of the body request:
bodySite
is the body site code identifying the zone where the photo was taken. You can find the available list with all the admitted codes here.
Responseβ
The response provides preliminary diagnostic results including potential diseases, their associated codes, and diagnostic confidence (%).
{
"category": [
{
"coding": [
{
"code": "250171008",
"display": "Clinical history and observation finding",
"system": "http://snomed.info/sct"
}
]
}
],
"code": {
"coding": [
{
"code": "10206-1",
"display": "Physical findings of Skin Narrative",
"system": "http://loinc.org"
}
]
},
"conclusions": [
{
"code": {
"code": "DA04.5",
"codeSystem": "ICD-11"
},
"name": "Mucous cyst",
"probability": 87.77
},
{
"code": {
"code": "2F20.2",
"codeSystem": "ICD-11"
},
"name": "Congenital nevus",
"probability": 6.11
},
{
"code": {
"code": "XH4L78",
"codeSystem": "ICD-11"
},
"name": "Nevus",
"probability": 2.16
},
{
"code": {
"code": "ED63.0",
"codeSystem": "ICD-11"
},
"name": "Vitiligo",
"probability": 1.92
}
],
"detectedModality": "Clinical",
"evolution": {},
"explainabilityMedia": {
"content": "",
"modality": "Clinical",
"resourceType": "Media",
"type": "image"
},
"mediaValidity": {
"isValid": true,
"metrics": {
"hasEnoughQuality": true,
"isDermatologyDomain": true
},
"score": 66.0
},
"metrics": {
"category": "calculation",
"resourceType": "DeviceMetric",
"sensitivity": 99.56,
"specificity": 93.99
},
"preliminaryFindings": {
"hasConditionSuspicion": 99.2,
"isMalignantSuspicion": 0,
"isPreMalignantSuspicion": 0.6000000000000001,
"needsSpecialistsAttention": 3.86
},
"resourceType": "DiagnosticReport",
"status": "preliminary",
"time": 1.6485424041748047
}
Version 2.1β
You can now send multiple images of the same skin structure.
Indeed, this version supports sending multiple images for more robust results.
This should not be the same image with transformations, but different snaps of the same thing.
- Recommended: 3 images.
- Maximum: 5 images.
Endpointβ
https://ai.legit.health/v2/legit_health/diagnosis_support
Body Requestβ
{
"requestId": "unique-request-id",
"data": {
"content": ["base64 image 1", "base64 image 2", "base64 image 3"]
}
}
As you can see, the content is an array where you can send up to 5 images of the same skin structure. This should not be the same image with transformations, but different snaps of the same thing.
For enhanced accuracy, additional data can also be included, similar to V2.0.
{
"requestId": "unique-request-id",
"data": {
"type": "image",
"modality": "clinical",
"operator": "Practitioner",
"bodySite": "ARM_LEFT",
"subject": {
"identifier": "subject-id",
"gender": "m",
"height": 175,
"weight": 71,
"birthdate": "1986-10-21",
"generalPractitioner": {
"identifier": "practitioner-id"
},
"managingOrganization": {
"identifier": "organization-id",
"display": "Hospital Central"
}
},
"content": ["base64 image 1", "base64 image 2", "base64 image 3"]
}
}
Responseβ
The response in V2.1 has an additional key, imagingStudySeries, which provides individual results for each image.
{
"category": [
{
"coding": [
{
"code": "250171008",
"display": "Clinical history and observation finding",
"system": "http://snomed.info/sct"
}
]
}
],
"code": {
"coding": [
{
"code": "10206-1",
"display": "Physical findings of Skin Narrative",
"system": "http://loinc.org"
}
]
},
"conclusions": [
{
"code": {
"code": "DA04.5",
"codeSystem": "ICD-11"
},
"name": "Mucous cyst",
"probability": 87.77
},
{
"code": {
"code": "2F20.2",
"codeSystem": "ICD-11"
},
"name": "Congenital nevus",
"probability": 6.11
},
{
"code": {
"code": "XH4L78",
"codeSystem": "ICD-11"
},
"name": "Nevus",
"probability": 2.16
},
{
"code": {
"code": "ED63.0",
"codeSystem": "ICD-11"
},
"name": "Vitiligo",
"probability": 1.92
}
],
"explainabilityMedia": {
"content": "",
"modality": ["Clinical", "Clinical", "Clinical"],
"resourceType": "Media",
"type": "image"
},
"mediaValidity": {
"isValid": true,
"metrics": {
"hasEnoughQuality": true,
"isDermatologyDomain": true
},
"score": 66.0
},
"metrics": {
"category": "calculation",
"resourceType": "DeviceMetric",
"sensitivity": 99.56,
"specificity": 93.99
},
"preliminaryFindings": {
"hasConditionSuspicion": 99.2,
"isMalignantSuspicion": 0,
"isPreMalignantSuspicion": 0.6000000000000001,
"needsSpecialistsAttention": 3.86
},
"imagingStudySeries": [
{
"conclusions": [
{
"code": {
"code": "DA04.5",
"codeSystem": "ICD-11"
},
"name": "Mucous cyst",
"probability": 87.77
},
{
"code": {
"code": "2F20.2",
"codeSystem": "ICD-11"
},
"name": "Congenital nevus",
"probability": 6.11
},
{
"code": {
"code": "XH4L78",
"codeSystem": "ICD-11"
},
"name": "Nevus",
"probability": 2.16
},
{
"code": {
"code": "ED63.0",
"codeSystem": "ICD-11"
},
"name": "Vitiligo",
"probability": 1.92
}
],
"detectedModality": "Clinical",
"explainabilityMedia": {
"content": "",
"modality": "Clinical",
"resourceType": "Media",
"type": "image"
},
"mediaValidity": {
"isValid": true,
"metrics": {
"hasEnoughQuality": true,
"isDermatologyDomain": true
},
"score": 66.0
},
"metrics": {
"category": "calculation",
"resourceType": "DeviceMetric",
"sensitivity": 99.56,
"specificity": 93.99
},
"preliminaryFindings": {
"hasConditionSuspicion": 99.2,
"isMalignantSuspicion": 0,
"isPreMalignantSuspicion": 0.6000000000000001,
"needsSpecialistsAttention": 3.86
}
},
{
"conclusions": [
{
"code": {
"code": "DA04.5",
"codeSystem": "ICD-11"
},
"name": "Mucous cyst",
"probability": 87.77
},
{
"code": {
"code": "2F20.2",
"codeSystem": "ICD-11"
},
"name": "Congenital nevus",
"probability": 6.11
},
{
"code": {
"code": "XH4L78",
"codeSystem": "ICD-11"
},
"name": "Nevus",
"probability": 2.16
},
{
"code": {
"code": "ED63.0",
"codeSystem": "ICD-11"
},
"name": "Vitiligo",
"probability": 1.92
}
],
"detectedModality": "Clinical",
"explainabilityMedia": {
"content": "",
"modality": "Clinical",
"resourceType": "Media",
"type": "image"
},
"mediaValidity": {
"isValid": true,
"metrics": {
"hasEnoughQuality": true,
"isDermatologyDomain": true
},
"score": 66.0
},
"metrics": {
"category": "calculation",
"resourceType": "DeviceMetric",
"sensitivity": 99.56,
"specificity": 93.99
},
"preliminaryFindings": {
"hasConditionSuspicion": 99.2,
"isMalignantSuspicion": 0,
"isPreMalignantSuspicion": 0.6000000000000001,
"needsSpecialistsAttention": 3.86
}
},
{
"conclusions": [
{
"code": {
"code": "DA04.5",
"codeSystem": "ICD-11"
},
"name": "Mucous cyst",
"probability": 87.77
},
{
"code": {
"code": "2F20.2",
"codeSystem": "ICD-11"
},
"name": "Congenital nevus",
"probability": 6.11
},
{
"code": {
"code": "XH4L78",
"codeSystem": "ICD-11"
},
"name": "Nevus",
"probability": 2.16
},
{
"code": {
"code": "ED63.0",
"codeSystem": "ICD-11"
},
"name": "Vitiligo",
"probability": 1.92
}
],
"detectedModality": "Clinical",
"explainabilityMedia": {
"content": "",
"modality": "Clinical",
"resourceType": "Media",
"type": "image"
},
"mediaValidity": {
"isValid": true,
"metrics": {
"hasEnoughQuality": true,
"isDermatologyDomain": true
},
"score": 66.0
},
"metrics": {
"category": "calculation",
"resourceType": "DeviceMetric",
"sensitivity": 99.56,
"specificity": 93.99
},
"preliminaryFindings": {
"hasConditionSuspicion": 99.2,
"isMalignantSuspicion": 0,
"isPreMalignantSuspicion": 0.6000000000000001,
"needsSpecialistsAttention": 3.86
}
}
],
"resourceType": "DiagnosticReport",
"status": "preliminary",
"time": 1.6485424041748047
}