PostDICOM logo

Using PostDICOM Cloud API

In this article, you will learn about the PostDICOM Cloud API methods and how to integrate your existing application. We also provide PostDICOM Cloud API Reference Implementation which can be accessed from here.

prequisitesPrerequisites

To use PostDICOM Cloud API, first of all, you need to have two keys namely accountKey and apiKey. If you do not have these keys and want to integrate your application/webpage with PostDICOM, please contact us and get yours.

Details about these keys can be found below.

accountKey: This is the key assigned to your account by PostDICOM. It is unique and it is created when you register to PostDICOM and it does not change in time.

apiKey: This is the key assigned to your account when it is authorized to use PostDICOM Cloud API functionality. It is advised to change this key regularly using the "API Settings" page. A sample screenshot is given below.

cloud api settings

What functions are supported by PostDICOM Cloud API? How can I use it?

PostDICOM Cloud API is provided as a Javascript library and it is designed in a way that it provides all of the functions needed by the Medical Companies. These are uploading DICOM files, creating folders, searching, viewing and deleting patient orders. Supported features and their usage are explained in the following paragraphs.

If your company needs another functionality which is not listed below, please contact us. We can go over the request and may provide the feature.

javascript
PostDICOM Cloud API Javascript library

PostDICOM Cloud API functions are provided through a javascript library. This library can be downloaded from PostDicomCloudApi.js link below. Add this address to the "head" section of your HTML page. Example usage is as follows.

<script src="https://www.postdicom.com/cloud-api/PostDicomCloudApi.2.0.min.js" type="text/javascript"></script>

PostDICOM Cloud API Supported Functions

initializationInitialization

To use PostDICOM Cloud API service, first, call "postDicomCloudApi" method with your apiKey and accountKey. That way you will create an object. Sample usage is at below.

var myApi = new postDicomCloudApi(apiKey, accountKey);
Required Parameters Description
apiKey It is used to authenticate the request. Provide your apiKey to the method.
accountKey It is used to authenticate the request. Provide your accountKey to the method.

After the object is created, call its "Initialize" method. This method checks your accountKey with apiKey and when finished calls the callback method. Results are in jSON format, and they can be viewed in the callback method. Example usage is given below.

myApi.Initialize(callback);
Required Parameters Data Type Description
callback function Callback method.
read files
Reading DICOM files and obtaining patient and study information

PostDICOM Cloud API provides ReadDicomFiles to read DICOM files and return patient and study information to the caller. This way users can process DICOM files and show patient and study data in their user interfaces. Example usage is given below.

myApi.ReadDicomFiles(selectedFiles, callback);
Required Parameters Data Type Description
selectedFiles file list Select files from your user interface and pass them to this method.
callback function Callback method.

uploadingUploading DICOM images

To upload DICOM files, we provide four different methods. In all of these methods, during upload callback method will be invoked to provide upload progress and upload completed events. Only files in DICOM format can be uploaded. Methods and their parameters are given below.

myApi.UploadDicomFiles(userUuid, institutionUuid, selectedFiles, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuid string Provide the institution unique id which is returned from the Initialize method.
selectedFiles file list Select files from your user interface and pass them to this method.
callback function Callback method.
myApi.UploadDicomFilesIntoFolder(userUuid, institutionUuid, folderUuid, selectedFiles, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuid string Provide the institution unique id which is returned from the Initialize method.
folderUuid string Provide the folder unique id which is returned from the GetFolderList method.
selectedFiles file list Select files from your user interface and pass them to this method.
callback function Callback method.
myApi.UploadDicomFilesWithAnonymization(userUuid, institutionUuid, selectedFiles, anonymizedData, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuid string Provide the institution unique id which is returned from the Initialize method.
selectedFiles file list Select files from your user interface and pass them to this method.
anonymizedData DicomTagsEnum value list This is the anonymization data which will be used to change DICOM file tags.
Example usage:
anonymousData = [];
anonymousData.push({ Tag: myApi.DicomTagsEnum.PatientName, Value: 'John Doe' });
anonymousData.push({ Tag: myApi.DicomTagsEnum.PatientId, Value: '123' });
callback function Callback method.
myApi.UploadDicomFilesIntoFolderWithAnonymization(userUuid, institutionUuid, folderUuid, selectedFiles, anonymizedData, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuid string Provide the institution unique id which is returned from the Initialize method.
folderUuid string Provide the folder unique id which is returned from the GetFolderList method.
selectedFiles file list Select files from your user interface and pass them to this method.
anonymizedData DicomTagsEnum value list This is the anonymization data which will be used to change DICOM file tags.
Example usage:
anonymousData = [];
anonymousData.push({ Tag: myApi.DicomTagsEnum.PatientName, Value: 'John Doe' });
anonymousData.push({ Tag: myApi.DicomTagsEnum.PatientId, Value: '123' });
callback function Callback method.

search ordersSearching for Patient Orders

Using PostDICOM Cloud API, you can search patient orders in your account with different parameters. We provide three different methods for searching. These methods and their usage are given below.

myApi.GetPatientOrderList(callback, userUuid, institutionUuidList, patientName, accessionNumber, patientId, otherPatientId, modalities);
Required Parameters Data Type Description
callback function Callback method.
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuidList string array Provide the institution unique id list. Institution unique ids can be obtained from Initialize method. This is an optional parameter and can be given as empty array.
patientName string Patient name to search for. This is an optional parameter and can be given as empty string.
accessionNumber string Accession number to search for. This is an optional parameter and can be given as empty string.
patientId string Patient ID to search for. This is an optional parameter and can be given as empty string.
otherPatientId string Other patient ids to search for. This is an optional parameter and can be given as empty string.
modalities string array Modalities to search for. This is an optional parameter and can be given as empty array.
myApi.GetPatientOrderListWithDateRange(callback, userUuid, institutionUuidList, patientName, accessionNumber, patientId, otherPatientId, modalities, startDate, endDate);
Required Parameters Data Type Description
callback function Callback method.
userUuid string Provide the user unique id which is returned from the Initialize method.
institutionUuidList string array Provide the institution unique id list. Institution unique ids can be obtained from Initialize method. This is an optional parameter and can be given as empty array.
patientName string Patient name to search for. This is an optional parameter and can be given as empty string.
accessionNumber string Accession number to search for. This is an optional parameter and can be given as empty string.
patientId string Patient ID to search for. This is an optional parameter and can be given as empty string.
otherPatientId string Other patient ids to search for. This is an optional parameter and can be given as empty string.
modalities string array Modalities to search for. This is an optional parameter and can be given as empty array.
startDate date Start date to search for. This is an optional parameter and can be given as empty.
endDate date End date to search for. This is an optional parameter and can be given as empty.
myApi.GetPatientOrderListInFolder(callback, userUuid, folderUuid);
Required Parameters Data Type Description
callback function Callback method.
userUuid string Provide the user unique id which is returned from the Initialize method.
folderUuid string Provide the folder unique id which is returned from the GetFolderList method.

create folderCreate Folder

Folders can be created using the CreateFolder method. Example usage is given below. When API call is finished callback method is called.

myApi.CreateFolder(userUuid, parentFolderUuid, folderName, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
parentFolderUuid string Parent folder unique id in which the new folder will be created. If this parameter is empty, folder is created at the root folder.
folderName string Name of the folder. Subfolders can be created by proving the folder names separated by '/' character. For example when "folderA/folderB" is passed to the method, folderA will be created and then folderB will be created in folderA.
callback function Callback method.

search folderSearching for Folders

Folders can be search using GetFolderList method. Example usage is given below. When API call is finished callback method is called.

myApi.GetFolderList(userUuid, parentFolderUuid, folderName, getOrdersInFolder, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
parentFolderUuid string Parent folder unique id in which the new folder will be searched. If this parameter is empty, root folders in the root folder are searched.
folderName string Name of the folder to be searched for. If this parameter is empty, all of the folders in the parent folder are returned.
getOrdersInFolder bool If this parameter is true, orders in that folder will be returned within the result.
callback function Callback method.
view
Obtaining an access link to view orders

You can create access links for your orders in your account. After obtaining the viewer link, open it in your application or through a web browser like Google Chrome, Mozilla Firefox, Apple Safari, etc. For security reasons, IP addresses of the link request and viewer must be the same. Moreover, if you provide your domain name, we can create view links only for the requests coming from your domain.

myApi.GetViewUrl(userUuid, patientOrderUuid, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
patientOrderUuid string Patient order unique id which is returned from the GetPatientOrderList, GetPatientOrderListWithDateRange and GetPatientOrderListInFolder methods.
callback function Callback method.
deleting orders
Move orders to recycle bin

You can move patient orders to recycle bin using DeleteOrder method. Its usage and parameters are given below.

myApi.DeleteOrder(userUuid, patientOrderInstitutionUuid, patientOrderUuid, callback);
Required Parameters Data Type Description
userUuid string Provide the user unique id which is returned from the Initialize method.
patientOrderInstitutionUuid string Patient order institution unique id which is returned from the GetPatientOrderList, GetPatientOrderListWithDateRange and GetPatientOrderListInFolder methods.
patientOrderUuid string Patient order unique id which is returned from the GetPatientOrderList, GetPatientOrderListWithDateRange and GetPatientOrderListInFolder methods.
callback function Callback method.
Do you need help?

This browser is not supported by PostDICOM applications yet.


Please use one of the following browsers.