Severity assessment automatic local
POST /severity-assessment/automatic/local scores the severity of a known condition on a single body site. Most sub-scores are derived from the image by the AI; the request also carries any clinical inputs that the image cannot provide (patient age, patient-reported symptoms, region body-surface-area percentage). The set of those inputs is fixed per scoring system and is listed in the request-fields table below.
Request
- Python
- JavaScript
- cURL
import requests
import base64
base_url = "<base_url>"
url = f"{base_url}/severity-assessment/automatic/local"
image_path = "<path_to_image>"
with open(image_path, "rb") as f:
image_data = base64.b64encode(f.read()).decode("utf-8")
# bodySite, scoringSystem code, and questionnaireResponse.item are discovered from
# helper endpoints at integration time see "Shared schema".
json_payload = {
"payload": {
"contentAttachment": {
"data": image_data,
"contentType": "image/jpeg"
}
},
"bodySite": "<body_site_code>",
"knownCondition": {
"conclusion": { "text": "<plain-text condition>" }
},
"scoringSystem": {
"<scoring_system_code>": {
"questionnaireResponse": {
"item": { "<item_code>": "<answer_value>" }
}
}
}
}
headers = {
"Content-Type": "application/json",
"Authorization": "Bearer <access_token>"
}
response = requests.post(url, json=json_payload, headers=headers)
result = response.json()
const fs = require("fs");
const baseUrl = "<base_url>";
const imagePath = "<path_to_image>";
const imageData = fs.readFileSync(imagePath).toString("base64");
// bodySite, scoringSystem code, and questionnaireResponse.item are discovered from
// helper endpoints at integration time see "Shared schema".
const json_payload = {
payload: {
contentAttachment: { data: imageData, contentType: "image/jpeg" },
},
bodySite: "<body_site_code>",
knownCondition: { conclusion: { text: "<plain-text condition>" } },
scoringSystem: {
"<scoring_system_code>": {
questionnaireResponse: {
item: { "<item_code>": "<answer_value>" },
},
},
},
};
const response = await fetch(`${baseUrl}/severity-assessment/automatic/local`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <access_token>",
},
body: JSON.stringify(json_payload),
});
const result = await response.json();
# Replace placeholders with values discovered from the helper endpoints
# (see "Shared schema" for body-site, scoring-system, and item).
curl -X POST "<base_url>/severity-assessment/automatic/local" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <access_token>" \
-d '{
"payload": { "contentAttachment": { "data": "<base64_encoded_image_data>" } },
"bodySite": "<body_site_code>",
"knownCondition": { "conclusion": { "text": "<plain-text condition>" } },
"scoringSystem": {
"<scoring_system_code>": {
"questionnaireResponse": {
"item": { "<item_code>": "<answer_value>" }
}
}
}
}'
Request fields
payload.contentAttachment(required) image envelope; see Image attachment.bodySite(required) see Body site.knownCondition.conclusion.text(required) see Known condition.scoringSystem.<code>(required) and.questionnaireResponse.itemsee Scoring system (scoringSystemandquestionnaireResponse).
The Authorization header is the standard bearer token; see Authentication header.
Response
{
"resourceType": "DiagnosticReport",
"identifier": {
"use": "official",
"value": "f426f15d-fcea-4bd0-942e-7528bf163c5d"
},
"status": "preliminary",
"issued": "2026-01-29T13:16:38.666795",
"analysisDuration": 0.19751,
"mediaValidity": { /* see the "Image quality assessment" common building block */ },
"patientEvolution": {
// Only the scoring system you requested is populated; the keys for all
// other supported scorers are present with a `null` value.
"<scoring_system_code>": {
"score": {
"value": 1.6,
"interpretation": {
"category": "Mild",
"intensity": 1
},
"additionalData": {
"globalScoreContribution": { "value": 1.6 }
}
},
"item": {
// The set of components varies by scoring system; their full definitions
// are returned by GET /questionnaires?code=<scoring_system_code>.
"<component_code>": {
"code": { "text": "<human-readable component name>" },
"value": 2,
"additionalData": { "aiConfidence": { "value": 95.4 } }
}
},
"media": {
"attachment": {
"maskRaw": { /* raw probability mask, base64-encoded image */ },
"maskBinary": { /* binarised mask */ },
"segmentation": { /* coloured segmentation overlay */ }
}
}
}
}
}
Top-level fields
The top-level FHIR fields follow the shared FHIR response envelope, and the mediaValidity block follows the shared Image quality assessment section.
patientEvolutionobject keyed by scoring-system code. Only the scoring system you requested is populated; all others arenull.
patientEvolution.<scoringSystem>.score
"score": {
"value": 1.6,
"interpretation": {
"category": "Mild",
"intensity": 1
},
"additionalData": {
"globalScoreContribution": { "value": 1.6 }
}
}
score.valuenumeric severity score, scale-specific to the scoring system.score.interpretation.categorycategorical label (e.g.None,Mild,Moderate,Severe).score.interpretation.intensitycategorical intensity code:1(low),2(moderate),3(high).score.additionalData.globalScoreContribution.valuethe contribution of this body site to the global (whole-body) score. Useful when you later combine multipleautomatic/localcalls into a single overall severity.
patientEvolution.<scoringSystem>.item
Each item.<component> is one sub-score that contributed to score.value. The set of components varies by scoring system and is returned by GET /questionnaires?code=<scoring_system_code>.
item.<component>.code.texthuman-readable name of the component.item.<component>.valuenumeric sub-score, in the range defined by the scoring system (typically 0–4).item.<component>.additionalData.aiConfidence.valueAI confidence (0–100) in the sub-score. Components that you supplied as clinical inputs in the request do not carry anaiConfidencefield, because the value came from your input rather than from the model.
patientEvolution.<scoringSystem>.media.attachment
Image masks for visualisation; do not use them for clinical decisions on their own.
maskRawBase64-encoded probability mask. Pixel intensity corresponds to the model's confidence that the pixel belongs to the lesion.maskBinaryBase64-encoded binary mask (lesion vs. background) obtained by thresholdingmaskRaw.segmentationBase64-encoded coloured overlay on the original image, suitable for direct display in your UI.
maskRaw | maskBinary | segmentation |
|---|---|---|
![]() | ![]() | ![]() |


