Skip to main content

πŸͺ† Iframe

Compatible with

Apple iOSAndroidMicrosoft
ChromeSafariFirefoxFirefoxEdge

Introduction​

"Iframe integration" refers to embedding a pre-designed, minimal interface within a customer's application. This interface allows users to upload images and view outputs from Legit.Health's diagnostic device. It is designed for simplicity and ease of implementation.

This document provides a step-by-step guide to integrate our iframe into various software environments, including native iOS applications, progressive web apps (PWA), and Wordpress sites.

How to use​

To embed the Legit.Health iframe into your application, use the base URL https://iframe.legit.health and append it with the necessary parameters to meet your integration needs.

Customize your iframe​

Enhance the functionality and appearance of your iframe by appending parameters to the base URL. Below is a detailed explanation of each parameter and a link to our iframe generator for visual previews and URL generation.

Iframe generator​

Utilize our interactive iframe generator below to customize and preview your iframe. Adjust the settings as needed, and use the generated URL for embedding.

#
#

Identifier replacement

Ensure to replace the default company identifier with your specific company identifier to ensure functionality in a production environment.

Parameters description​

The iframe URL supports several parameters to tailor its functionality and design:

  • company: Your unique company identifier provided by Legit.Health.
  • companyCallbackUrl: Overrides the default callback URL to which the diagnostic report will be sent.
  • extraData: A string that includes additional data for the report, such as patient identifiers, which remain hidden from users.
  • primary and secondary: Hexadecimal color codes to customize the interface colors.
  • fontFamily: Specifies the font family used within the iframe. Supported options: Roboto, Montserrat.
  • isResultEnabled: Toggles the display of diagnostic results to the user.
  • isForPatient: Simplifies the text in the questionnaires so that inexperienced users can understand.
  • locale: Sets the application's language. Available options: en (English), es (Spanish).
  • showQuestionnaireTitle: Controls the visibility of the questionnaire title, defaulting to visible (1).
  • disableCallbackOnConclusive: Prevents sending a callback when the diagnostic is conclusive, only sending a combined diagnosis and severity assessment.
  • enableAnamnesis: Shows or hides the anamnesis form, hidden by default (0).
  • You can also adjust camera access settings:
    • enableCamera: Activates the camera, which is off by default (0).
    • enableCameraForAndroid: Enables camera use specifically on Android devices, also off by default (0).

How to obtain a company identifier​

To generate a company-specific application key with an expiration date, access the following endpoint from our Deep Link API:

Generate here: https://deep-link-spec.legit.health

Output​

For a complete understanding of the output of our artificial intelligence, you can visit the sections of our documentation where we explain the values we compute depending on the use case: diagnostic support or severity measurement.

Further reading

Please read the Output section of the Instructions For Use for more info.

Depending whether or not you add the key knownConditionForThisImage, the output from the device will be different, following this logic:

The information we will send from our server to yours can be found at the following link:

Link: deep-link/receive/diagnostic-report

Patient input​

In most cases, users interacting with the iframe are required to submit only two pieces of information: the specific body area affected and the images of the lesion. Optionally, an anamnesis questionnaire can be included, to gather more detailed patient history.

If our artificial intelligence identifies a condition with high probability, the iframe will automatically display a clinical questionnaire related to that condition. For instance, if there is a 98% probability that a lesion is psoriasis, the patient will be prompted to complete the PASI questionnaire. Completing this questionnaire provides additional details necessary for assessing the severity of the condition.

Detailed description of parameters​

Patient use​

When the primary users of the iframe are patients, you can utilize the isForPatient=1 parameter within the URL. Activating this option will modify the text within the questionnaires to make them more understandable. This may be a good idea because some clinical questionnaire use language that is too technical.

For instance, instead of displaying the basic label Itchiness for the itchiness question, the text will be transformed into a more straightforward query: How would you describe how itchy you feel?. This enhancement aims to improve the questionnaire's accessibility and ease of completion for patients.

Visibility of the results​

The results can be shown or hidden to users depending on the param isResultEnabled. The default behaviour is showing the results to the user after he or she has uploaded the photo, but you can pass isResultEnabled=0 to show only a message.

Colors and font family​

Primary and secondary colours can be customized using the params primary and secondary in the URL.

You can also select which font family you want to use. Currently, we support Roboto and Montserrat. Feel free to request aditional fonts and we will do our best to include them in the iframe.

Language​

The language of the iframe can be customized using the param locale and providing the values es or en. If you require another language, please reach out to us and we will arrange it.

Extra data​

Given that you have available the extraData field that accepts any string, you can pass any additional value you need to be attached to the report. For example, if you need to pass patient and insurance provider information, you would do it as follows:

const data = toBase64(
JSON.stringify({ patient: "XXX", insuranceProvider: "YYY" })
);

Anamnesis questionnaire​

The parameter enableAnamnesis allows to show or hide the anamnesis form. The default value is 0 so you need to pass enableAnamnesis=1 to show the anamnesis form.

The anamnesis questionnaire is a set of questions that are asked to the patient to gather information about the patient's medical history:

  1. What is the reason for the consultation? How did the problem start? Describe the origin.
  2. Do you have any allergies, especially to medications? If yes, list allergies.
  3. Are you taking any medication or treatment? If yes, explain what treatment you are taking.
  4. Do you have any major illness? Have you had anything operated on?
  5. Is there a history of any major illness in your family?

Questionnaires​

The parameter showQuestionnaireTitle allows to show or hide the title above the questionnaires. You can identify these questionnaire under the title "Medical questionnaire".

Enable camera component​

Enable camera component​

Frameworks like Ionic play a crucial role in developing cross-platform mobile and web applications. However, they often limit hardware access, particularly to the camera, when using iframe. This restriction is notably problematic in applications that require immediate camera access, as Ionic and similar frameworks typically block camera usage through a file type input element within an iframe.

info

Our findings indicate that this issue mainly affects Android devices running Ionic-developed applications displaying our solution in an iframe. You may need to enable the enableCameraForAndroid parameter specifically for these devices.

To overcome these restrictions, we have developed a bespoke component that allows camera access directly within the iframe. Activate this feature by appending the following parameters to your URL:

  • enableCamera=1: This parameter enables the camera within the iframe. It is set to off by default (enableCamera=0), as a standard "file" type input is adequate for most use cases.
  • enableCameraForAndroid=1: This parameter is specifically designed for Android devices, activating the camera where it is otherwise disabled by default (enableCameraForAndroid=0).

Implementing these parameters ensures our solution is adaptable and meets the diverse needs of different devices and operating systems, effectively bypassing the typical iframe limitations in platforms like Ionic.

Messages posted from iframe​

Integration instructions​

iOS​

The iframe will send messages via the webkit bridge. You can listen for these messages to close the iframe or direct the user elsewhere in your application.

Below is the corresponding Swift code that allows you to display the iframe in your app and respond to the events posted.

struct WebView: UIViewRepresentable {
@Binding var path: NavigationPath

class Coordinator: NSObject, WKNavigationDelegate, WKScriptMessageHandler {
var webView: WKWebView?
var onMessageReceived: (Any) -> Void

required init(onMessageReceived: @escaping (Any) -> Void) {
self.onMessageReceived = onMessageReceived
super.init()
}

func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
self.webView = webView
}

// Receive message from WKWebView
func userContentController(
_ userContentController: WKUserContentController,
didReceive message: WKScriptMessage
) {
print(message.body)
self.onMessageReceived(message.body)
}
}

func onMessageReceived(body: Any) -> Void {
DispatchQueue.main.async {
path.append(body as! String)
}
}

func makeCoordinator() -> Coordinator {
return Coordinator(onMessageReceived: onMessageReceived)
}

func makeUIView(context: Context) -> WKWebView {
let coordinator = makeCoordinator()
let userContentController = WKUserContentController()
userContentController.add(coordinator, name: "bridge")

let configuration = WKWebViewConfiguration()
configuration.userContentController = userContentController

let _wkwebview = WKWebView(frame: .zero, configuration: configuration)
_wkwebview.navigationDelegate = coordinator

return _wkwebview
}

func updateUIView(_ webView: WKWebView, context: Context) {
let companyIdentifier = AppConfig.companyIdentifier
let request = URLRequest(url: URL(string: "https://iframe.legit.health/?company=" + companyIdentifier)!)

webView.load(request)
}
}

This Swift code creates a WebView struct that conforms to UIViewRepresentable, allowing for communication between your web content and native app through the bridge message handler. The WebView's Coordinator class listens for events from the iframe and responds to them accordingly.

Android​

In case you are developing an Android application, you should pass an object called legitHealthJsObject to our iframe using WebViewCompat

Analysis Completed Message​

When the analysis of the image has been completed and the result is available, the iframe will post a message through three different channels depending on the type of integration.

The posted message contains the anonymousDiagnosticReportId, which is the identifier of the generated diagnostic report. You can use it to retrieve the complete report by consuming the endpoint described here: getting an Anonymous Diagnostic Report.

Web​

In case you are embedding our iframe in a web-based application, the iframe will send a message via the postMessage after the image is processed.

window.parent.postMessage(
{
message: "analysis_completed",
id: "anonymousDiagnosticReportId",
},
"*"
);

You can listen for this message with a regular event listener:

window.addEventListener("message", function (event) {
if (event.data.message !== "analysis_completed") {
return;
}
console.log(event.data.id);
});

iOS​

The iframe will send a message via the webkit bridge after the image is processed.

if (window.webkit?.messageHandlers?.bridge) {
window.webkit.messageHandlers.bridge.postMessage(
JSON.stringify({
message: "analysis_completed",
id: "anonymousDiagnosticReportId",
})
);
}

Android​

The iframe will send a message via the legitHealthJsObject after the image is processed.

if (window.legitHealthJsObject) {
window.legitHealthJsObject.postMessage(
JSON.stringify({
message: "analysis_completed",
id: diagnosticReportId,
})
);
}

Invalid Company Key​

When the iframe cannot be loaded because of an invalid company key, the iframe will post a message through three different channels depending on the type of integration.

Web​

In case you are embedding our iframe in a web-based application, the iframe will send a message via the postMessage if the company key is invalid.

window.parent.postMessage(
{
message: "invalid_company_key",
id: companyKey,
},
"*"
);

iOS​

The iframe will send a message via the webkit bridge if the company key is invalid.

if (window.webkit?.messageHandlers?.bridge) {
window.webkit.messageHandlers.bridge.postMessage(
JSON.stringify({
message: "invalid_company_key",
id: companyKey,
})
);
}

Android​

The iframe will send a message via the legitHealthJsObject if the company key is invalid.

if (window.legitHealthJsObject) {
window.legitHealthJsObject.postMessage(
JSON.stringify({
message: "invalid_company_key",
id: companyKey,
})
);
}

Callbacks​

Callback URL​

Upon the successful processing of each uploaded image, our server dispatches a JSON payload containing detailed information about the diagnostic process to the configured endpoint. This JSON payload encapsulates multiple layers of diagnostic data and metrics. Here's an example of what you can expect:

{
"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 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:

Overwriting callback URL​

During the configuration process, the integrator must provide a callback URL to which to send the diagnostic reports. This URL can be customized at the iframe level through the parameter companyCallbackUrl, for example:

https://iframe.legit.health/?company=XXX&companyCallbackUrl=http://someserver.dev

Disable Callback On Conclusive​

This is the iframe workflow:

  • Initial Request: Upon receiving a set of images from the user, our system initiates a diagnostic support request, processed by our AI algorithms.
  • Confidence Assessment: If the confidence level of the AI analysis exceeds a predetermined threshold, the iframe triggers a second request. This request is specifically for conducting a severity assessment, focusing on the most suitable image from the provided set.
  • Report Finalization: In scenarios where the AI's confidence does not meet the threshold, the diagnostic process is considered complete at this stage.

Two-Stage Diagnostic Reporting​

Our system generates two types of diagnostic reports based on the AI's confidence assessment:

  1. Intermediate Report: This includes the initial diagnostic support result. It is generated when the AI's confidence is below the threshold or when the severity assessment is pending.
  2. Final Report: This comprehensive report encompasses both the initial diagnostic support and the severity assessment results. It is produced when the AI's confidence is high enough to proceed with the severity assessment.

Callback Mechanism​

Both diagnostic reports are sent to the callback URL provided by you. This ensures you receive all relevant analysis data. However, there may be scenarios where receiving only the final report is more beneficial, especially to avoid processing intermediate results.

disableCallbackOnConclusive parameter​

This is where the disableCallbackOnConclusive parameter becomes crucial:

  • Parameter Value 0 (Default): The callback mechanism operates in its default mode, sending both the intermediate and final diagnostic reports to your specified callback URL.
  • Parameter Value 1: Activating this mode (disableCallbackOnConclusive=1) modifies the callback behavior. In this scenario, if the initial set of images results in a conclusive diagnosis (i.e., high AI confidence), the intermediate diagnostic report is not sent to your callback. Instead, only the final report, inclusive of both diagnostic support and severity assessment, is transmitted.
Purpose of disableCallbackOnConclusive​

This parameter provides a crucial customization option, enabling you to streamline the diagnostic reporting process. By setting disableCallbackOnConclusive=1, you effectively reduce the data processing load, focusing only on the comprehensive final reports, which might be more pertinent for conclusive diagnostic scenarios.

Implementation Guidance​

  • URL Integration: Ensure that the disableCallbackOnConclusive parameter is correctly embedded in the URL used for the iframe request.
  • Testing: It's important to test both settings of the parameter (0 and 1) to confirm that the callback behaviour aligns with your operational preferences and requirements.

This parameter is designed to offer you flexibility and control over the diagnostic information flow, ensuring that you receive the data most relevant to your needs.

PDF Generation​

For details on how to generate a PDF report, please refer to the following endpoint: Get Anonymous Diagnostic Report.

Link: deep-link/receive/anonymous-diagnostic-report