概述

LEADTOOLS存储服务管理器DICOM侦听服务通过一个或多个C-FIND Reponses来响应收到的C-FIND请求。 C-FIND Reponses包含请求中指定的DICOM属性。

要使用自定义数据库模式,必须定义配置文件,以便DICOM侦听服务使用适当的属性填充C-FIND Reponses,并使用数据库中的相应数据设置属性值。

LEAD Storage Server Manager附带的默认配置文件名为QueryIOD.xml。 默认配置定义为返回数据库的属性和属性序列。 对于教程数据库,我们不返回项目序列。

QueryIOD.xml的结构如下。 它由<patientLevel>,<studyLevel>,<seriesLevel>和<imageLevel>元素组成,每个元素都包含一个或多个<element>元素。

<query> 
<patientLevel> 
<element>...</element> 
<element>...</element> 
... 
</patientLevel> 

<studyLevel> 
<element>...</element> 
<element>...</element> 
... 
</ studyLevel > 

< seriesLevel > 
<element>...</element> 
<element>...</element> 
... 
</ seriesLevel > 

<imageLevel> 
<element>...</element> 
<element>...</element> 
... 
</ imageLevel > 
</query>

每个<element>元素对应于C-FIND请求中的属性,并提供数据库中相应值的映射。

以下是教程数据库的示例<element>。 它将DICOM元素PatientID(0010,0010)映射到相应的表名(MyPatientTable)和列(PatientName)。

<element tag="(0010,0010)" 
     tagName="PatientName" 
    vr="PN" 
    minVM="1" 
    maxVM="1" 
    vmDivider="1" 
    keyType="Required" 
    matchingType="WildCard" 
    tableName="MyPatientTable"  
    matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
    columnsName="PatientName" />

MyQueryIOD.xml的全部内容如下:

<?xml version="1.0" encoding="utf-8" ?> 
<query> 
   <patientLevel> 
      <element tag="(0010,0010)" 
                tagName="PatientName" 
                vr="PN" 
                minVM="1" 
                maxVM="1" 
                vmDivider="1" 
                keyType="Required" 
                matchingType="WildCard" 
                tableName="MyPatientTable" 
                matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
                columnsName="PatientName" /> 
      <element tag="(0010,0020)" 
               tagName="PatientID" 
               vr="LO" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Unique" 
               matchingType="SingleValue" 
               tableName="MyPatientTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
               columnsName="PatientIdentification" /> 
      <element tag="(0010,0030)" 
               tagName="PatientBirthDate" 
               vr="DA" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="Range" 
               tableName="MyPatientTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
               columnsName="PatientBirthday" /> 
      <element tag="(0010,0040)" 
               tagName="PatientSex" 
               vr="CS" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="SingleValue" 
               tableName="MyPatientTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
               columnsName="PatientSex" /> 
      <element tag="(0010,4000)" 
               tagName="PatientComments" 
               vr="LT" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="NotApplicable" 
               tableName="MyPatientTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyPatient,My.Medical.Storage.DataAccessLayer" 
               columnsName="PatientComments" /> 
   </patientLevel> 
   <studyLevel> 
      <element tag="(0008,0020)" 
               tagName="StudyDate" 
               vr="DA" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="Range" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyStudyDate" /> 
      <element tag="(0008,0050)" 
               tagName="AccessionNumber" 
               vr="SH" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="SingleValue" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyAccessionNumber" /> 
      <element tag="(0008,0061)" 
               tagName="ModalitiesInStudy" 
               vr="CS" 
               minVM="1" 
               maxVM="-1" 
               vmDivider="1" 
               vmDistinct="true" 
               keyType="Optional" 
               matchingType="SingleValue" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesModality" /> 
      <element tag="(0008,0062)" 
               tagName="SOPClassesInStudy" 
               vr="UI" 
               minVM="1" 
               maxVM="-1" 
               vmDivider="1" 
               vmDistinct="true" 
               keyType="Optional" 
               matchingType="ListOfUID" 
               tableName="MyInstanceTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.MatchingParameters.Image,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageUniqueSOPClassUID" /> 
      <element tag="(0008,0090)" 
               tagName="ReferringPhysiciansName" 
               vr="PN" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="SingleValue" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyReferringPhysiciansName" /> 
      <element tag="(0008,1030)" 
               tagName="StudyDescription" 
               vr="LO" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="NotApplicable" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyStudyDescription" /> 
     <element tag="(0020,0010)" 
               tagName="StudyID" 
               vr="SH" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="SingleValue" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyStudyId" /> 
      <element tag="(0020,000D)" 
               tagName="StudyInstanceUID" 
               vr="UI" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Unique" 
               matchingType="ListOfUID" 
               tableName="MyStudyTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyStudy,My.Medical.Storage.DataAccessLayer" 
               columnsName="StudyStudyInstanceUID" /> 
   </studyLevel> 
   <seriesLevel> 
      <element tag="(0008,0060)" 
               tagName="Modality" 
               vr="CS" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="SingleValue" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesModality" /> 
      <element tag="(0008,103E)" 
               tagName="SeriesDescription" 
               vr="LO" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="SingleValue" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesSeriesDescription" /> 
      <element tag="(0008,0021)" 
               tagName="SeriesDate" 
               vr="DA" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="Range" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesSeriesDate" /> 
      <element tag="(0018,0015)" 
               tagName="BodyPartExamined" 
               vr="CS" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="Range" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesBodyPartExamined" /> 
      <element tag="(0020,0011)" 
               tagName="SeriesNumber" 
               vr="IS" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="SingleValue" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesSeriesNumber" /> 
      <element tag="(0020,000E)" 
               tagName="SeriesInstanceUID" 
               vr="UI" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="ListOfUID" 
               tableName="MySeriesTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MySeries,My.Medical.Storage.DataAccessLayer" 
               columnsName="SeriesSeriesInstanceUID" /> 
   </seriesLevel> 
   <imageLevel> 
      <element tag="(0020,0013)" 
               tagName="InstanceNumber" 
               vr="IS" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="SingleValue" 
               tableName="MyInstanceTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageImageNumber" /> 
      <element tag="(0008,0016)" 
               tagName="SOPClassUID" 
               vr="UI" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="ListOfUID" 
               tableName="MyInstanceTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageUniqueSOPClassUID" /> 
      <element tag="(0008,0018)" 
               tagName="SOPInstanceUID" 
               vr="UI" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Required" 
               matchingType="ListOfUID" 
               tableName="MyInstanceTable" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.Entities.MyInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="SOPInstanceUID" /> 
      <element tag="(0028,0010)" 
               tagName="Rows" 
               vr="US" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="NotApplicable" 
               tableName="ImageInstance" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.MatchingParameters.ImageInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageRows" /> 
      <element tag="(0028,0011)" 
               tagName="Columns" 
               vr="US" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="NotApplicable" 
               tableName="ImageInstance" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.MatchingParameters.ImageInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageColumns" /> 
      <element tag="(0028,0100)" 
               tagName="BitsAllocated" 
               vr="US" 
               minVM="1" 
               maxVM="1" 
               vmDivider="1" 
               keyType="Optional" 
               matchingType="NotApplicable" 
               tableName="ImageInstance" 
               matchingEntity="My.Medical.Storage.DataAccessLayer.MatchingParameters.ImageInstance,My.Medical.Storage.DataAccessLayer" 
               columnsName="ImageBitsAllocated" /> 
   </imageLevel> 
</query>

了解更多

这是本系列的第九篇文章,本文介绍了LEAD医学存储服务器数据库如何指定C FIND Rsp DICOM元素,我们将在《LEAD医疗存储服务器自定义数据库系列教程 – DICOM侦听服务》系列的第十篇文章中,着重介绍LEAD医用存储服务器数据库如何创建DICOM侦听服务。

系列文章


LeadTools | 下载试用

LeadTools 是 .NET,Win API,WinRT,Linux,iOS,OS X,Android & HTML5 平台下领先世界的图像处理开发工具包,在医疗、DICOM、PACS、栅格、矢量和多媒体图像处理技术都处于世界领先的地位。

您对LeadTools产品的任何技术问题,都有技术支持工程师提供1对1专业解答,点击此处即可发帖提问>>技术支持论坛