Hi
I have enabled DicomModalitiesInDatabase to true after enabling mysql plugin
But it is not clear in which table of the mysql database the modality details will be stored.
Even after restarting the server no changes happening in my database tables.
Can someone guide me how to add modalities in the database? to which table the details to be added?
Thanks in advance
Regards
Santhosh
Hi Santosh,
Rather than direct database access, which should be avoided, you can use the REST api to manage remote modalities. You can find an example here. https://book.orthanc-server.com/users/rest.html?highlight=modalities#id2
James

James Manners • Director
Suite 3, Level 2, 10 Queens Road, Melbourne, Victoria 3004, Australia
T: 03 9017 5230 M: 0422 973 235 E: james@binary.com.au W: binary.com.au
Thank you James for the reply
I have done as per the example , but nothing happening in database
I have used a php curl request to add modality
when i call it , nothing return and nothing happening
can you please tell me which database is get updated, so that I can ensure that the request being updated
my code is as below
$handle = curl_init();
$url=“http://orthancIP:8042/modalities/sample”;
$username=“username”;
$password=“password”;
$postData =‘{“AET” : “ORTHANCC”, “Host”: “127.0.0.1”, “Port”: 2002}’;
curl_setopt($handle, CURLOPT_URL, $url);
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_USERPWD, “$username:$password”);
curl_setopt($handle, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
curl_setopt($handle, CURLOPT_CUSTOMREQUEST, “PUT”);
curl_setopt($handle, CURLOPT_POSTFIELDS, $postData);
$output = curl_exec($handle);
curl_close($handle);
$json = json_decode($output , true);
print_r($json);
Thanks
Santosh
Hi Santosh,
You can use a get request to /modalities to return all know modulators. This will tell you if your request worked.
James

James Manners • Director
Suite 3, Level 2, 10 Queens Road, Melbourne, Victoria 3004, Australia
T: 03 9017 5230 M: 0422 973 235 E: james@binary.com.au W: binary.com.au