Hi all!
I would like to use orthanc's API to:
a) dicomize a PDF file
b) upload dicomized PDF file to orthanc but attached as series under a specific study
I am not sure if this can be directly done using the process described here:
So, i want to dicomize and upload my pdf as a series, under patient's "32780" specific study with studyInstanceUID "
1.2.840.113619.2.25.4.2147483647.1584958560.152":

I am trying to find the "correct" json data string to achieve that. I have tried the following:
# create the json data
1) $params = @{Tags = @{PatientID = "32780";Modality = "MR"};Content= "data:application/pdf;base64,$fileInBase64"}
2) $params = @{Tags = @{PatientID = "32780";StudyInstanceUID = "1.2.840.113619.2.25.4.
2147483647.1584958560.152";Modality = "MR"};Content= "data:application/pdf;base64,$fileInBase64"}
3) $params = @{Tags = @{StudyInstanceUID = "1.2.840.113619.2.25.4.
2147483647.1584958560.152";Modality = "MR"};Content= "data:application/pdf;base64,$fileInBase64"}
4) $params = @{Tags = @{PatientID = "32780"; StudyID = "14168"; Modality = "MR"};Content= "data:application/pdf;base64,$fileInBase64"}
but none of them seems to work.
In cases (1), (4) the dicomized pdf is getting uploaded, under the patient with patientID = "32780" but as a "new" study (different studyInstanceUID)
In cases (2), (3) where i tried to use the studyInstanceUID to attach the dicomized PDF under the study "1.2.840.113619.2.25.4.2147483647.1584958560.152" i am getting:
Invoke-RestMethod : {
"Details" : "StudyInstanceUID",
"HttpError" : "Bad Request",
"HttpStatus" : 400,
"Message" : "Trying to override a value inherited from a parent module",
"Method" : "POST",
"OrthancError" : "Trying to override a value inherited from a parent module",
"OrthancStatus" : 2020,
"Uri" : "/tools/create-dicom"
}
At line:1 char:10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
+ FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand
So, is it possible to directly attach the dicomized pdf under specific patient & study in orthanc? If yes what am i missing on the JSON string?
Thanks!