<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="DIRECTION_BASE" 
Description="Направление" 
PrimaryKey="DirectionID" 
DNAttributes="{Director/Name};{DirectionDate};{Perpose/Name}" 
DisplayName="{0} от {1} / {2}">
  <Fields>
    <Attribute Name="DirectionID" Index="5230001" Type="guid" Description="Идентификатор" />
    <Attribute Name="DirectionDate" Index="5230002" Type="date" Description="Дата направления" Required="1" />
    <Attribute Name="PreHospitalDate" Index="5230006" Type="date" Description="Предварительная дата госпитализации" />
    <Attribute Name="DirectionDoctorCode" Index="5230015" Type="string" Description="Код направившего врача" CharacterMaximumLength="50" />
    <Attribute Name="Diagnosis" Index="5410002" Type="string" Description="Диагноз" CharacterMaximumLength="4096" />
    <Attribute Name="Mkb" Index="5410003" Type="string" Description="Код МКБ" CharacterMaximumLength="8" />
    <Attribute Name="DirectionDoctor" Index="5410006" Type="string" Description="Направивший врач" CharacterMaximumLength="150" />
    <Attribute Name="DirectionNumber" Index="5410007" Type="string" Description="Номер направления" />
    <Attribute Name="MoreInfo" Index="5410012" Type="string" Description="Особые отметки" CharacterMaximumLength="2048" />
    <Attribute Name="Descr" Index="5410013" Type="string" Description="Дополнительное поле" />
    <Parent Name="Director" Index="5230003" Type="VCLib.ENUMS" Description="Направитель" EnumType="Director" />
    <Parent Name="Perpose" Index="5230004" Type="VCLib.ENUMS" Description="Цель направления" EnumType="DirectionPerpose" Required="1" />
    <Parent Name="Lpu" Index="5230005" Type="AKUZ.LPU_MAIN" Description="МО" Required="1" />
    <Parent Name="DirectorLpu" Index="5410001" Type="AKUZ.LPU_MAIN" Description="Направившая МО" />
    <Parent Name="FirstDirectorLpu" Index="5410008" Type="AKUZ.LPU_MAIN" Description="Первоначально направившая МО" />
    <Parent Name="Division" Type="AKUZ.DIVISION" Description="Направление в отделение" />
    <Parent Name="StructureBed" Type="AKUZ.STRUCTURE_BED" Description="Направление на профиль койки " />
    <Attribute Name="IsOnkoSuspicion" Type="bool" Description="Подозрение на ЗНО" Required="1" />
    <Child Name="VmpTypeDirectionLinks" Type="AKUZ.VMP_TYPE_DIRECTION_LINK" Description="Связка между видом ВМП и направлением" ChildAttribute="DirectionBase" />
    <Parent Name="V028ReferralType" Type="AKUZ.V028_REFERRAL_TYPE" Description="Вид направления" />
  </Fields>
  <DbMapping>
    <Table name="T_DIRECTION_BASE">
      <Map Name="DirectionID" Column="DirectionID" />
      <Map Name="DirectionDate" Column="DirectionDate" />
      <Map Name="PreHospitalDate" Column="PreHospitalDate" />
      <Map Name="DirectionDoctorCode" Column="DirectionDoctorCode" />
      <Map Name="Diagnosis" Column="Diagnosis" />
      <Map Name="Mkb" Column="Mkb" />
      <Map Name="DirectionDoctor" Column="DirectionDoctor" />
      <Map Name="DirectionNumber" Column="DirectionNumber" />
      <Map Name="MoreInfo" Column="MoreInfo" />
      <Map Name="Descr" Column="Descr" />
      <Map Name="Director" Column="Director" />
      <Map Name="Perpose" Column="Perpose" />
      <Map Name="Lpu" Column="Lpu" />
      <Map Name="DirectorLpu" Column="DirectorLpu" />
      <Map Name="FirstDirectorLpu" Column="FirstDirectorLpu" />
      <Map Name="Division" Column="Division" />
      <Map Name="StructureBed" Column="StructureBed" />
      <Map Name="IsOnkoSuspicion" Column="IsOnkoSuspicion" />
      <Map Name="V028ReferralType" Column="V028ReferralType" />
    </Table>
  </DbMapping>
</Entity>