# Create a folder according to PatientID - aws s3

**URL:** https://discourse.orthanc-server.org/t/create-a-folder-according-to-patientid-aws-s3/4357
**Category:** General
**Created:** [February 20, 2024, 7:22pm UTC](https://discourse.orthanc-server.org/t/create-a-folder-according-to-patientid-aws-s3/4357 "2024-02-20T19:22:34Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![agkairos](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/agkairos/32/1914_2.png) [@agkairos](https://discourse.orthanc-server.org/u/agkairos)
#### Post date: [February 20, 2024, 7:22pm UTC](https://discourse.orthanc-server.org/t/create-a-folder-according-to-patientid-aws-s3/4357/1 "2024-02-20T19:22:34Z")

</div>

Hello orthanc community!  
I’m using the latest version with the AwsS3Storage plugin. My question is whether it is possible to create a folder according to the PatientID? This way I will have separated the data for each patient. my orthanc.json is like this:  
…  
“AwsS3Storage” : {  
“BucketName”: “storage-dicom”,  
“RootPath”: “clinic-a/”, //$PatiendId$  
“Region”: “sa-east-1”,  
“AccessKey”: “AKI—”,  
“SecretKey”: “—”,  
“HybridMode”: “Disabled”,  
“StorageStructure”: “flat”,  
"  
}

---

<div class="post-metadata">

### Author: ![alainmazy](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/alainmazy/32/1576_2.png) [@alainmazy](https://discourse.orthanc-server.org/u/alainmazy)
#### Post date: [February 21, 2024, 7:41am UTC](https://discourse.orthanc-server.org/t/create-a-folder-according-to-patientid-aws-s3/4357/2 "2024-02-21T07:41:42Z")

</div>

Hi,

No, this is currently not possible.

FYI, I have implemented an [S3Exporter python plugin](https://github.com/orthanc-server/orthanc-setup-samples/tree/master/docker/copy-to-s3) that exports a **copy** of the image into this kind of structure

HTH,

Alain

---

<div class="post-metadata">

### Author: ![agkairos](https://discourse.orthanc-server.org/user_avatar/discourse.orthanc-server.org/agkairos/32/1914_2.png) [@agkairos](https://discourse.orthanc-server.org/u/agkairos)
#### Post date: [February 21, 2024, 5:23pm UTC](https://discourse.orthanc-server.org/t/create-a-folder-according-to-patientid-aws-s3/4357/3 "2024-02-21T17:23:57Z")

</div>

Show! tanks!
