The second step to creating an external store add-in is to create a custom Crud class that implements the ICrud interface.
This is called Crud because is an acronym for Create, Read Update and Delete, and these are the operations that you must define for your customer external store add-in.
The ICrud interface is shown below:
Copy Code
public interface ICrud
{
// Gets a boolean value indicating whether the external store addin is to store to the local store (true) or directly to the external store (false)
bool StoreLocal
{
get;
}
// Gets a string representing the GUID (globally unique identifier) associated with this external store add-in
string ExternalStoreGuid
{
get;
}
// Gets the friendly name for this external store add-in
string FriendlyName
{
get;
}
// Called by the PACSFramework so that external store add-in can perform any required initialization
void Initialize();
// Called by the PACSFramework when the external store settings change for any external store addin through the CSStorageServerManager UI
// This is used to notify the external store addins to re-read the external store settings
void SettingsChanged();
// Called by the PACSFramework so that the external store addin can store the local file 'filename' to the external store
// if 'overwrite' is true, then overwrite any existing file that exists in the external store; otherwise, do nothing and return null.
// Return null if successful; otherwise return an appropriate exception.
Exception Store(string filename, bool overwrite, out string token);
// Called by the PACSFramework so that the external store addin can store 'dataset' to the external store
Exception StoreDicom(string filename, DicomDataSet dataset, DicomDataSetSaveFlags saveFlags, bool overwrite, out string token);
// Called by the PACSFramework so that the external store addin can update 'dataset' on the external store
Exception UpdateDicom(DataRow row, DicomDataSet dataset, DicomDataSetSaveFlags saveFlags);
// Called by the PACSFramework to retrieve the file specified by 'row' from the external store to the local store
Exception RetrieveFile(DataRow row, string outFile);
// Called by the PACSFramework to retrieve the DicomDataSet specified by 'row' from the external store to the local store
Exception RetrieveDicom(DataRow row, DicomDataSetLoadFlags loadFlags, out DicomDataSet dataset);
// Called by the PACSFramework to delete the DicomDataSet from the external store that corresponds to 'token'
Exception Delete(string token);
// Called by the PACSFramework to delete the DicomDataSet specified by 'row' from the external store
Exception DeleteDicom(DataRow row);
// Called by the PACSFramework to determine if the file that corresponds to 'token' exists on the external store
Exception Exists(string token, out bool exists);
// Called by the PACSFramework to determine if the DicomDataSet specified by 'row' exists on the external store
Exception ExistsDicom(DataRow row, out bool exists);
}
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET