# multiple AE title on client side

**URL:** https://discourse.orthanc-server.org/t/multiple-ae-title-on-client-side/2986
**Category:** Google Groups archive
**Created:** [July 11, 2022, 12:14am UTC](https://discourse.orthanc-server.org/t/multiple-ae-title-on-client-side/2986 "2022-07-11T00:14:08Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![emil](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/e/f4b2a3/32.png) [@emil](https://discourse.orthanc-server.org/u/emil)
#### Post date: [July 11, 2022, 12:14am UTC](https://discourse.orthanc-server.org/t/multiple-ae-title-on-client-side/2986/1 "2022-07-11T00:14:08Z")

</div>

Hello,  
currently I have one EA title on the client side and OnStableStudy function in Lua on Orthanc side that will export to c:\Patients\patientID and execute a powershell A.ps1 on the data exported.  
How can I have multiple EA titles on the client and OnStableStudy to execute different powershell files based on the called EA title?  
Ex: if client has 4 EA titles, EA\_A, EA\_B, EA\_C and EA\_D on same IP and port, Orthanc can listen to those EA titles and execute powershell A.ps1, B.ps1, C.ps1 or D.ps1 accordingly.  
Thank you.

---

<div class="post-metadata">

### Author: ![Alain\_Mazy1](https://discourse.orthanc-server.org/letter_avatar_proxy/v4/letter/a/839c29/32.png) [@Alain\_Mazy1](https://discourse.orthanc-server.org/u/Alain_Mazy1)
#### Post date: [July 11, 2022, 10:50am UTC](https://discourse.orthanc-server.org/t/multiple-ae-title-on-client-side/2986/2 "2022-07-11T10:50:17Z")

</div>

Hi,

If it is possible to configure your client to have 4 AETs and use a specific one for each type of transfer, go ahead. Note that it might be easier to declare Orthanc 4 times in the client with 4 AETs, each one for a specific use case.

In any case, in Orthanc, you can use the [origin](https://book.orthanc-server.com/users/lua.html#origin-of-the-instances) argument of OnStoredInstance and save this info in a custom metadata at study level. Then, you can retrieve the metadata in the OnStableStudy callback. You can either use “RemoteAET”, the AET of the client or “CalledAET”, the AET of Orthanc that was used to push the instance.

In order to support multiple for Orthanc, you can simply configure Orthanc no to check the CalledAET:

```auto
  // Check whether the called AET corresponds to the AET of Orthanc[](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Configuration.json#l135)
  // during an incoming DICOM SCU request[](https://hg.orthanc-server.com/orthanc/file/tip/OrthancServer/Resources/Configuration.json#l136)
  "DicomCheckCalledAet" : false,

```

HTH

Alain
