<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="CDA_SECTION_PATIENT_ROUTTODIAG" 
Description="Сведения о пациенте" 
PrimaryKey="CdaSectionPatientRouttodiagID">
  <Fields>
    <Attribute Name="CdaSectionPatientRouttodiagID" Type="guid" Description="Идентификатор" />
    <Attribute Name="Name" Type="string" Description="Имя" Required="1" />
    <Attribute Name="Surname" Type="string" Description="Фамилия" Required="1" />
    <Attribute Name="MiddleName" Type="string" Description="Отчество" />
    <Parent Name="Sex" Type="VCLib.ENUMS" Description="Пол" EnumType="Sex" Required="1" />
    <Attribute Name="Birthday" Type="date" Description="Дата рождения" Required="1" />
    <Parent Name="AddressLiving" Type="AKUZ.PATIENT_ADDRESS" Description="Адрес проживания" />
    <Parent Name="AddressRegistry" Type="AKUZ.PATIENT_ADDRESS" Description="Адрес регистрации" />
    <Link Name="CdaRepresentativeRouttodiag" Type="AKUZ.CDA_REPRESENTATIVE_ROUTTODIAG" Description="Сведения о законном (уполномоченном) представителе пациента" LinkAttribute="CdaSectionPatientRouttodiag" />
    <Parent Name="CdaRouttodiag" Type="AKUZ.CDA_ROUTTODIAG" Description="Направление на лабораторное исследование. Направление на проведение неонатального скрининга" />
  </Fields>
  <DbMapping>
    <Table name="T_CDA_SECTION_PATIENT_ROUTTODIAG">
      <Map Name="CdaSectionPatientRouttodiagID" Column="CdaSectionPatientRouttodiagID" />
      <Map Name="Name" Column="Name" />
      <Map Name="Surname" Column="Surname" />
      <Map Name="MiddleName" Column="MiddleName" />
      <Map Name="Sex" Column="Sex" />
      <Map Name="Birthday" Column="Birthday" />
      <Map Name="AddressLiving" Column="AddressLiving" />
      <Map Name="AddressRegistry" Column="AddressRegistry" />
      <Map Name="CdaRouttodiag" Column="CdaRouttodiag" />
    </Table>
  </DbMapping>
</Entity>