PLAN_010 Base64 encoded images are accepted
Description​
This test verifies that the REST API can handle images encoded in Base64 format properly. It checks that the software can process these images without any data corruption and that it returns images encoded in Base64 format in its responses, also without data corruption.
System requirements​
This test can be executed with standard hardware, and it is not necessary to use any specific software. Any commonly available system should be sufficient for the task.
Preconditions​
- The entire system (including the reverse proxy, REST API, and all upstream services) is deployed, operational, and accessible online.
Input data​
Download this sample image, convert it to Base64 and save the encoded image to clipboard or a text file. Then, replace the placeholder text <Paste-the-encoded-image-here>
with the encoded image in the following JSON payloads:
- Request body for diagnosis support service.
{
"subject": {
"reference": "fake-patient-id"
},
"media": [
{
"contentType": "image/jpeg",
"data": <Paste-the-encoded-image-here>,
}
]
}
- Request body for severity assessment service.
{
"subject": {
"reference": "fake-patient-id"
},
"media": {
"contentType": "image/jpeg",
"data": <Paste-the-encoded-image-here>
},
"known_condition": {
"conclusion": {
"code": "EA80",
"display": "Atopic dermatitis",
"system_alias": "ICD-11"
}
},
"body_site": "arm_left",
"scoring_systems": [
"ascorad"
],
"questionnaire_response": [
{
"questionnaire": "ascorad",
"item": [
{"code": "surface", "answer": [{"value": 40}]},
{"code": "itchiness", "answer": [{"value": 3}]},
{"code": "sleeplessness", "answer": [{"value": 2}]},
],
},
],
}
Steps​
- Send a POST request to the
/diagnosis-support
endpoint, including the Base64 encoded image from "Input data" in the JSON payload for the diagnosis support service. - Send a POST request to the
/severity-assessment
endpoint, including the Base64 encoded image from "Input data" in the JSON payload for the severity assessment service.
Expected outcome​
- Both endpoints successfully handle their respective requests containing the Base64 image and generate a well-structured preliminary report.
- The response from the
/severity-assessment
endpoint includes any image data in Base64 format. If everything worked correctly, you can find the image results in the response at the JSON path:patientEvolution.ascorad.media.attachments[0].data
.
Verifies software requirements​
- REQ_005
Risk control for​
-
- Data transmission failure from care provider's system
-
- Data input failure
Signature meaning
The signatures for the approval process of this document can be found in the verified commits at the repository for the QMS. As a reference, the team members who are expected to participate in this document and their roles in the approval process, as defined in Annex I Responsibility Matrix
of the GP-001
, are:
- Tester: JD-017, JD-009, JD-004
- Approver: JD-005