<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="DOCTOR_VISIT" 
Description="Посещение врача" 
Inherits="AKUZ.VISIT">
  <Fields>
    <Parent Name="VisitPurpose" Index="5800004" Type="AKUZ.VISIT_PURPOSE" Description="Цель обращения" />
    <Parent Name="MedicalExamination" Index="5800005" Type="AKUZ.MEDICAL_EXAMINATION" Description="Медицинский осмотр" />
    <Child Name="Prescriptions" Index="5800002" Type="AKUZ.PRESCRIPTION" Description="Назначения" ChildAttribute="DoctorVisit" />
    <Child Name="SchetSluchs" Type="AKUZ.SCHET_SLUCH" Description="Элементы реестра счетов" ChildAttribute="Event" />
  </Fields>
  <DbMapping>
    <Table name="T_VISIT">
      <Map Name="VisitPurpose" Column="VisitPurpose" />
      <Map Name="MedicalExamination" Column="MedicalExamination" />
    </Table>
  </DbMapping>
  <CalculatingAttributes>
    <Child Name="RouteToDoctorInspections" Index="5800006" Type="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" Description="Назначенные консультации" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="RouteToDiagnostics" Index="5800007" Type="AKUZ.ROUTE_TO_DIAGNOSTICS" Description="Назначения на диагностику" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.ROUTE_TO_DIAGNOSTICS}" />
    <Child Name="ProcedureTreatmentRecords" Index="5800008" Type="AKUZ.PROCEDURE_TREATMENT_RECORD" Description="Назначенное немедикаментозное лечение" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.TREATMENT_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="Recipes" Index="5800009" Type="AKUZ.RECIPE" Description="Назначенные льготные медикаменты" RequiredAttributes="{Post};{VisitDate};{AmbulanceEvent/Recipes/RecipeDate};{AmbulanceEvent/Recipes/Post}" PathAttributes="{AmbulanceEvent/Recipes}" />
    <Child Name="RouteRecords" Index="5800010" Type="AKUZ.ROUTE_RECORD" Description="Направления" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.ROUTE_RECORD}" />
    <Child Name="Refferals" Index="5800012" Type="AKUZ.REFERRAL" Description="Направления в другие МО" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.REFERRAL/ReferralDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="RouteToVaccination" Index="5800013" Type="AKUZ.ROUTE_TO_VACCINATION" Description="Направления на вакцинацию" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="RepeatedToRouteDoctorInspections" Index="5800014" Type="AKUZ.REPEATED_PRESCRIPTION_RECORD" Description="Назначения на повторный прием" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{VisitDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="EventServices" Index="5800015" Type="AKUZ.EVENT_SERVICE" Description="Оказанные услуги" RequiredAttributes="{Post};{VisitDate};{AmbulanceEvent / EventServices /EventServiceResult / Post};{AmbulanceEvent / EventServices /EventServiceResult / Date}" PathAttributes="{AmbulanceEvent / EventServices}" />
    <Child Name="DoctorVisitServices" Index="5800016" Type="AKUZ.AMBULANCE_SURGICAL_OPERATION" Description="Хирургические вмешательства" RequiredAttributes="{Post};{VisitDate};{VisitTime};{AmbulanceEvent/AmbulanceSurgicalOperations/Post};{AmbulanceEvent/AmbulanceSurgicalOperations/OperationDate};{AmbulanceEvent/AmbulanceSurgicalOperations/OperationTime}" PathAttributes="{AmbulanceEvent/AmbulanceSurgicalOperations}" />
  </CalculatingAttributes>
</Entity>