Skip to main content

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

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()

Request fields

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.

  • patientEvolution object keyed by scoring-system code. Only the scoring system you requested is populated; all others are null.

patientEvolution.<scoringSystem>.score

"score": {
"value": 1.6,
"interpretation": {
"category": "Mild",
"intensity": 1
},
"additionalData": {
"globalScoreContribution": { "value": 1.6 }
}
}
  • score.value numeric severity score, scale-specific to the scoring system.
  • score.interpretation.category categorical label (e.g. None, Mild, Moderate, Severe).
  • score.interpretation.intensity categorical intensity code: 1 (low), 2 (moderate), 3 (high).
  • score.additionalData.globalScoreContribution.value the contribution of this body site to the global (whole-body) score. Useful when you later combine multiple automatic/local calls 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.text human-readable name of the component.
  • item.<component>.value numeric sub-score, in the range defined by the scoring system (typically 0–4).
  • item.<component>.additionalData.aiConfidence.value AI confidence (0–100) in the sub-score. Components that you supplied as clinical inputs in the request do not carry an aiConfidence field, 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.

  • maskRaw Base64-encoded probability mask. Pixel intensity corresponds to the model's confidence that the pixel belongs to the lesion.
  • maskBinary Base64-encoded binary mask (lesion vs. background) obtained by thresholding maskRaw.
  • segmentation Base64-encoded coloured overlay on the original image, suitable for direct display in your UI.
maskRawmaskBinarysegmentation
Decoded probability maskDecoded binary maskDecoded coloured segmentation overlay on the original image