<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="FRVICH_PATIENT_RELATIVE" 
Description="Родственник пациента РВИЧ" 
PrimaryKey="FrvichPatientRelativeID">
  <Fields>
    <Attribute Name="FrvichPatientRelativeID" Type="guid" Description="Идентификатор" />
    <Attribute Name="FirstName" Type="string" Description="Имя" CharacterMaximumLength="100" Required="1" />
    <Attribute Name="LastName" Type="string" Description="Фамилия" CharacterMaximumLength="100" Required="1" />
    <Attribute Name="Patronymic" Type="string" Description="Отчество" CharacterMaximumLength="100" />
    <Attribute Name="Phone" Type="string" Description="Номер телефона" CharacterMaximumLength="12" />
    <Parent Name="FrvichPatient" Type="AKUZ.FRVICH_PATIENT" Description="Пациент РВИЧ" />
    <Attribute Name="PrevFirstName" Type="string" Description="Предыдущее имя" CharacterMaximumLength="100" />
    <Attribute Name="PrevLastName" Type="string" Description="Предыдущая фамилия" CharacterMaximumLength="100" />
    <Attribute Name="PrevPatronymic" Type="string" Description="Предыдущее отчество" CharacterMaximumLength="100" />
    <Link Name="Address" Type="AKUZ.FRVICH_ADDRESS_PATIENT_RELATIVE" Description="Адрес родственника пациента РВИЧ" LinkAttribute="FrvichPatientRelative" Required="1" />
    <Link Name="FrvichIi" Type="AKUZ.FRVICH_PATIENT_RELATIVE_II" Description="Сведения об интеграции с ФРВИЧ" LinkAttribute="FrvichPatientRelative" />
    <Choice Name="KinshipType" Description="Вид родства">
      <Item Name="мать" Index="0" />
      <Item Name="отец" Index="1" />
      <Item Name="супруг" Index="2" />
      <Item Name="дочь" Index="3" />
      <Item Name="сын" Index="4" />
      <Item Name="бабушка" Index="5" />
      <Item Name="дедушка" Index="6" />
      <Item Name="внук" Index="7" />
      <Item Name="внучка" Index="8" />
      <Item Name="сестра" Index="9" />
      <Item Name="брат" Index="10" />
    </Choice>
    <Attribute Name="KinshipPeriodWith" Type="date" Description="Период родства с" />
    <Attribute Name="KinshipPeriodBy" Type="date" Description="Период родства по" />
  </Fields>
  <DbMapping>
    <Table name="T_FRVICH_PATIENT_RELATIVE">
      <Map Name="FrvichPatientRelativeID" Column="FrvichPatientRelativeID" />
      <Map Name="FirstName" Column="FirstName" />
      <Map Name="LastName" Column="LastName" />
      <Map Name="Patronymic" Column="Patronymic" />
      <Map Name="Phone" Column="Phone" />
      <Map Name="FrvichPatient" Column="FrvichPatient" />
      <Map Name="PrevFirstName" Column="PrevFirstName" />
      <Map Name="PrevLastName" Column="PrevLastName" />
      <Map Name="PrevPatronymic" Column="PrevPatronymic" />
      <Map Name="KinshipType" Column="KinshipType" />
      <Map Name="KinshipPeriodWith" Column="KinshipPeriodWith" />
      <Map Name="KinshipPeriodBy" Column="KinshipPeriodBy" />
    </Table>
  </DbMapping>
</Entity>