Feature #829
openUpdate Image Upload & Retrieval Logic Using Patient GUID–Based Storage
0%
Description
THIS DOES NOT REQUIRE THE AUTH VERIFICATION FROM SERVER APIS AS THE IMAGES WLL BE UPLOADED DIRECTLY TO S3 BUCKET¶
We need to refactor the existing image upload and retrieval logic to align with the new patient GUID–based approach and simplify API usage by consolidating logic into the config screen.
This work involves two major changes:
1. Update Image Upload Logic¶
Scope
Refactor the upload flow by removing legacy dependencies and resolving patients via a unified API before storing images.
Changes Required
-
Combine APIs in Config Screen
- Update the upload logic so all three APIs are combined and handled from the config screen.
-
Remove Unused Dependencies
- Remove usage of:
- mediabase
-
patients (legacy logic)
- Remove usage of:
-
Image Source
- Upload logic should retrieve images directly from pdata .
-
Patient Folder Processing
- Read patient folders in the format:
P_0000{SidexisPatientId}

- From patient Table:
- Read all rows mapping to SidexisPatientId
- Extract the list of Card IDs
- Ignore Patients who have the CardId Empty.
-
Patient Resolution
- For each Card ID, call the resolver API:
https://apistg.dentpal.aumtech.org/api/app/patient-pms-resolver/resolve
- Retrieve a mapping of:
patientGuid ↔ cardId

- Image Storage
- Use the resolved patientGuid to store images in the following format:
images/{patientGuid}/
Please don't use this logic as the service which uploads images doesn't have the current tenant info if you need any unique parameter you can use clinicId

-
Image Name Resolution
- Fetch image names from the mediabase table by mapping:
imageId → imageName

- Image ID corresponds to the file name inside pdata :
0000_{imageId}.dcm

2. Update Image Retrieval Logic¶
Scope
Refactor image retrieval to align with the new patient GUID–based storage structure.
Changes Required
- Retrieve images only using patientGuid
This should not be used as tenant info will not be used
- Update retrieval path to:
images/{patientGuid}/
- Remove any dependency on:
- Card ID–based lookup
- Legacy patient or mediabase paths
Files