<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="ONK_CYTOLOGY_RESULT" 
Description="Результат цитологического диагностического исследования" 
DNAttributes="{ResearchDate};{Mkb};{Diagnosis}" 
DisplayName="Результат: дата проведения {0} | {1} - {2}" 
Inherits="AKUZ.ONK_CYTOLOGY_RESULT_BASE">
  <Fields>
    <Attribute Name="GlassNumberFrom" Type="int" Description="Номера стекол с" />
    <Attribute Name="GlassNumberTo" Type="int" Description="Номера стекол по" />
    <Attribute Name="GlassesCount" Type="int" Description="Колличество стекол" />
    <Attribute Name="GlassJournal" Type="string" Description="Журнал" />
  </Fields>
  <DbMapping>
    <Table name="T_ONK_CYTOLOGY_RESULT">
      <Map Name="GlassNumberFrom" Column="GlassNumberFrom" />
      <Map Name="GlassNumberTo" Column="GlassNumberTo" />
      <Map Name="GlassJournal" Column="GlassJournal" RefTable="S_ONK_CYTOLOGY_RESULT_GlassJournal" SearchMode="DbHashCode" HashFunc="CHECKSUM({0})" />
    </Table>
    <Lexem>
      <Map Name="GlassesCount">
        <lx:MathOperator sign="+" xmlns:lx="lexem">
          <lx:MathOperator sign="-">
            <lx:Path OwnerQueryLevel="0">
              <lx:StepString name="GlassNumberTo" />
            </lx:Path>
            <lx:Path OwnerQueryLevel="0">
              <lx:StepString name="GlassNumberFrom" />
            </lx:Path>
          </lx:MathOperator>
          <lx:ConstOperand type="Int32">1</lx:ConstOperand>
        </lx:MathOperator>
      </Map>
    </Lexem>
  </DbMapping>
</Entity>