Storage Catalog

The storage catalog is defined in the Leadtools.Medical.Storage.DataAccessLayer.dll assembly.  The catalog defines a mapping between the Leadtools.Medical.Storage.DataAccessLayer classes and the database schema.  The catalog contains definitions for all table names in the database schema, and all columns of each table.    The storage catalog is defined as an xml file. You will create a storage catalog for the tutorial database.

You will also need to define a class that derives from class CatalogEntity for each table in your database.  For this tutorial, we define four classes (one for each table).  The storage catalog is linked to the four classes below:

The structure of the catalog consists of one or more <Entity> elements, followed by one or more <Element> elements.  Each <Entity> element corresponds to a database table.  Each <Element> element corresponds to a database table column.

<CatalogDataSet>

<Entity>...</Entity>

<Entity>...</Entity>

...

<Element>...</Element>

<Element>...</Element>

...

</CatalogDataSet>

You must define a storage catalog for your database schema.  For the tutorial schema, there are four tables.  These are the <Entity> elements for each table:

  <Entity>

    <EntityKey>PatientTableEntityKey</EntityKey>

    <EntityName>MyPatientTable</EntityName>

    <DisplayName>MyPatientTable</DisplayName>

  </Entity>

 

  <Entity>

    <EntityKey>StudyTableEntityKey</EntityKey>

    <EntityName>MyStudyTable</EntityName>

    <DisplayName>MyStudyTable</DisplayName>

  </Entity>

 

  <Entity>

    <EntityKey>SeriesTableEntityKey</EntityKey>

    <EntityName>MySeriesTable</EntityName>

    <DisplayName>MySeriesTable</DisplayName>

  </Entity>

 

  <Entity>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <EntityName>MyInstanceTable</EntityName>

    <DisplayName>MyInstanceTable</DisplayName>

  </Entity>

The description of each element is given below:

Element

Description

<EntityKey>

·         any name that uniquely identifies the table. 

·         When defining your class MyPatient,
the CatalogKey property must return the <EntityKey> name defined here

 

<EntityName>

·         name of the database table that holds the patient information

·         For the tutorial database, the patient table is called MyPatient

 

<DisplayName>

·         not used

 

There must be an <Element> element for each table column in your database schema that can be queried. For example, in the Database Manager of the Storage Server Manager, you can query the following fields, so all must have a corresponding <Element> element in the storage catalog.

Query Field

Corresponding DataTable

Corresponding Column

Patient Last Name

MyPatientTable

PatientName

PatientFirst Name

MyPatientTable

PatientName

Patient ID

MyPatientTable

PatientIdentification

Modality

MySeriesTable

SeriesModality

Study ID

MyStudyTable

StudyStudyId

Study Accession #

MyStudyTable

StudyAccessionNumber

Referring Physician
Last Name

MyStudyTable

StudyReferringPhysiciansName

Referring Physician
Given Name

MyStudyTable

StudyReferringPhysiciansName

Studies Date From

MyStudyTable

StudyStudyDate

Studies Date To

MyStudyTable

StudyStudyDate

Storage Date

MyInstanceTable

ImageLastStoreDate

Series Description

SeriesModality

SeriesSeriesDescription

For the tutorial, the primary key of each of the four tables is an automatically generated primary key.  These are the only columns that will not have a corresponding <Element> element.

  For example, the MyPatientTable has seven columns, so there will be six <Element> elements in the catalog (because MyPatientTable.PatientId is not queried directly – so no <Element> element is defined).

<Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientIdentification</ElementKey>

      <ElementName>PatientIdentification</ElementName>

      <DisplayName>Patient ID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientName</ElementKey>

      <ElementName>PatientName</ElementName>

      <DisplayName>Family Name</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientBirthday</ElementKey>

      <ElementName>PatientBirthday</ElementName>

      <DisplayName>Birth Date</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientSex</ElementKey>

      <ElementName>PatientSex</ElementName>

      <DisplayName>Sex</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientComments</ElementKey>

      <ElementName>PatientComments</ElementName>

      <DisplayName>Comments</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

The description of each element is given below:

Element

Description

<EntityKey>

·         The table name <EntityKey> to which the element belongs

·         For the patient table, this is ‘PatientTableEntityKey’

 

<ElementKey>

 

·         The MyPatient, MyStudy, MySeries, MyInstance class properties are decorated with an [EntityElementAttribute] attribute.  The <ElementKey> value must be identical to one of these properties

 

<ElementName>

 

·         Must be a column name of the corresponding table

 

<DisplayName>

 

·         Not used

<KeyElement>

 

·         True if a primary key

·         False otherwise

For the tutorial, the name of the storage catalog is MyCatalog.xml.

The full path of the storage catalog is specified in two configuration files:

  1. CSStorageServerManagerDemo.exe.config
    This is the configuration file for the main application
  2. Leadtools.Dicom.Server.exe.config
    This is the configuration file for the listening service

This is what needs to be added to each configuration file:

  <configSections>

    <section name="xmlStorageCatalogSettings" type="Leadtools.Medical.Storage.DataAccessLayer.XmlStorageCatalogSettings, Leadtools.Medical.Storage.DataAccessLayer" />

  </configSections>

  <xmlStorageCatalogSettings catalogPath="C:\LEADTOOLS 18\Bin\Dotnet4\Win32\MyCatalog.xml"/ 

This is the contents of MyCatalog.xml:

<CatalogDataSet>

  <Entity>

    <!--A name that uniquely identifies the patient table-->

    <EntityKey>PatientTableEntityKey</EntityKey>

 

    <!--Name of database table that holds the patient information-->  

    <EntityName>MyPatientTable</EntityName

 

    <!-- Not used-->      

    <DisplayName>MyPatientTable</DisplayName>     

  </Entity>

 

  <Entity>

    <EntityKey>StudyTableEntityKey</EntityKey>

    <EntityName>MyStudyTable</EntityName>

    <DisplayName>MyStudyTable</DisplayName>

  </Entity>

 

  <Entity>

    <EntityKey>SeriesTableEntityKey</EntityKey>

    <EntityName>MySeriesTable</EntityName>

    <DisplayName>MySeriesTable</DisplayName>

  </Entity>

 

  <Entity>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <EntityName>MyInstanceTable</EntityName>

    <DisplayName>MyInstanceTable</DisplayName>

  </Entity>

 

   <Element>

<!-- Table name to which the element belongs -->

      <EntityKey>PatientTableEntityKey</EntityKey>

 

<!-- The MyPatient class properties are decorated with an [EntityElementAttribute] attribute. This must be identical to one of these properties. -->

      <ElementKey>PatientIdentification</ElementKey

 

<!-- Must be a column name of the corresponding table -->

      <ElementName>PatientIdentification</ElementName

 

<!-- Not used -->

      <DisplayName>Patient ID</DisplayName>

 

<!-- True if a primary key; false otherwise -->           

      <KeyElement>false</KeyElement>                   

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientName</ElementKey>

      <ElementName>PatientName</ElementName>

      <DisplayName>Family Name</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientBirthday</ElementKey>

      <ElementName>PatientBirthday</ElementName>

      <DisplayName>Birth Date</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientSex</ElementKey>

      <ElementName>PatientSex</ElementName>

      <DisplayName>Sex</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>PatientTableEntityKey</EntityKey>

      <ElementKey>PatientComments</ElementKey>

      <ElementName>PatientComments</ElementName>

      <DisplayName>Comments</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesSeriesInstanceUID</ElementKey>

      <ElementName>SeriesSeriesInstanceUID</ElementName>

      <DisplayName>Series Instance UID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesModality</ElementKey>

      <ElementName>SeriesModality</ElementName>

      <DisplayName>Modality</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesSeriesNumber</ElementKey>

      <ElementName>SeriesSeriesNumber</ElementName>

      <DisplayName>Series Number</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesSeriesDate</ElementKey>

      <ElementName>SeriesSeriesDate</ElementName>

      <DisplayName>Series Date</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesSeriesDescription</ElementKey>

      <ElementName>SeriesSeriesDescription</ElementName>

      <DisplayName>Series Description</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>SeriesTableEntityKey</EntityKey>

      <ElementKey>SeriesBodyPartExamined</ElementKey>

      <ElementName>SeriesBodyPartExamined</ElementName>

      <DisplayName>Body Part Examined</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>StudyTableEntityKey</EntityKey>

      <ElementKey>StudyStudyInstanceUID</ElementKey>

      <ElementName>StudyStudyInstanceUID</ElementName>

      <DisplayName>Study Instance UID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>StudyTableEntityKey</EntityKey>

      <ElementKey>StudyStudyDate</ElementKey>

      <ElementName>StudyStudyDate</ElementName>

      <DisplayName>Study Date</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>StudyTableEntityKey</EntityKey>

      <ElementKey>StudyAccessionNumber</ElementKey>

      <ElementName>StudyAccessionNumber</ElementName>

      <DisplayName>Accession Number</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>StudyTableEntityKey</EntityKey>

      <ElementKey>StudyStudyId</ElementKey>

      <ElementName>StudyStudyId</ElementName>

      <DisplayName>Study ID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

  <Element>

    <EntityKey>StudyTableEntityKey</EntityKey>

    <ElementKey>StudyReferringPhysiciansName</ElementKey>

    <ElementName>StudyReferringPhysiciansName</ElementName>

    <DisplayName>Referring Physician</DisplayName>

    <KeyElement>false</KeyElement>

  </Element>

   <Element>

      <EntityKey>StudyTableEntityKey</EntityKey>

      <ElementKey>StudyStudyDescription</ElementKey>

      <ElementName>StudyStudyDescription</ElementName>

      <DisplayName>Study Description</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>InstanceTableEntityKey</EntityKey>

      <ElementKey>SOPInstanceUID</ElementKey>

      <ElementName>SOPInstanceUID</ElementName>

      <DisplayName>SOP Instance UID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>InstanceTableEntityKey</EntityKey>

      <ElementKey>ImageImageNumber</ElementKey>

      <ElementName>ImageImageNumber</ElementName>

      <DisplayName>Instance Number</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

  <Element>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <ElementKey>ImageLastStoreDate</ElementKey>

    <ElementName>ImageLastStoreDate</ElementName>

    <DisplayName>Receive Date</DisplayName>

    <KeyElement>false</KeyElement>

  </Element>

   <Element>

      <EntityKey>InstanceTableEntityKey</EntityKey>

      <ElementKey>ImageFilename</ElementKey>

      <ElementName>ImageFilename</ElementName>

      <DisplayName>Referenced File</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

   <Element>

      <EntityKey>InstanceTableEntityKey</EntityKey>

      <ElementKey>ImageUniqueSOPClassUID</ElementKey>

      <ElementName>ImageUniqueSOPClassUID</ElementName>

      <DisplayName>SOP Class UID</DisplayName>

      <KeyElement>false</KeyElement>

   </Element>

  <Element>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <ElementKey>ImageRows</ElementKey>

    <ElementName>ImageRows</ElementName>

    <DisplayName>Rows</DisplayName>

    <KeyElement>false</KeyElement>

  </Element>

  <Element>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <ElementKey>ImageColumns</ElementKey>

    <ElementName>ImageColumns</ElementName>

    <DisplayName>Cols</DisplayName>

    <KeyElement>false</KeyElement>

  </Element>

  <Element>

    <EntityKey>InstanceTableEntityKey</EntityKey>

    <ElementKey>ImageBitsAllocated</ElementKey>

    <ElementName>ImageBitsAllocated</ElementName>

    <DisplayName>Bits Allocated</DisplayName>

    <KeyElement>false</KeyElement>

  </Element>

</CatalogDataSet>


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.