<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="ADDITIONAL_MES" 
Description="Дополнительный КСГ" 
PrimaryKey="AdditionalMesID">
  <Fields>
    <Attribute Name="AdditionalMesID" Type="guid" Description="Идентификатор" />
    <Parent Name="Mes" Type="AKUZ.MES" Description="МЭС" Required="1" />
    <Choice Name="KSGType" Description="Тип доп.КСГ" Required="1">
      <Item Name="Дополнительный" Index="0" />
      <Item Name="Реанимационный" Index="1" />
    </Choice>
    <Parent Name="MesDrugTherapyScheme" Type="AKUZ.MES_DRUG_THERAPY_SCHEME" Description="Доп.критерий" />
    <Parent Name="MovementResult" Type="AKUZ.MOVEMENT_RESULT" Description="Выписка отделения" />
    <Attribute Name="TherapyStartDate" Type="date" Description="Дата начала терапии" />
    <Attribute Name="TherapyEndDate" Type="date" Description="Дата окончания терапии" />
  </Fields>
  <DbMapping>
    <Table name="T_ADDITIONAL_MES">
      <Map Name="AdditionalMesID" Column="AdditionalMesID" />
      <Map Name="Mes" Column="Mes" />
      <Map Name="KSGType" Column="KSGType" />
      <Map Name="MesDrugTherapyScheme" Column="MesDrugTherapyScheme" />
      <Map Name="MovementResult" Column="MovementResult" />
      <Map Name="TherapyStartDate" Column="TherapyStartDate" />
      <Map Name="TherapyEndDate" Column="TherapyEndDate" />
    </Table>
  </DbMapping>
</Entity>