<?xml version="1.0" encoding="utf-8"?>
<Entity 
Schema="AKUZ" 
Name="MEDICAL_EXAMINATION" 
Description="Медицинский осмотр" 
DNAttributes="{Mkb};{Diagnosis}" 
DisplayName="{0} {1}" 
Inherits="AKUZ.AMBULANCE_RECORD">
  <Customs>
    <Custom Name="NotDisplayedInFilter" Value="EntryAmbulance;cAnamnesisMorbi;cDrugAllergy;cComplaint;cObjectiveStatus;cStatusLocale;cDiagnosisJustification;cHealing;cRecomendations" />
    <Custom Name="NotDisplayedColumns" Value="EntryAmbulance;cAnamnesisMorbi;cDrugAllergy;cComplaint;cObjectiveStatus;cStatusLocale;cDiagnosisJustification;cHealing;cRecomendations" />
    <Custom Name="NotTrackedAttributes" Value="EntryAmbulance;cAnamnesisMorbi;cDrugAllergy;cComplaint;cObjectiveStatus;cStatusLocale;cDiagnosisJustification;cHealing;cRecomendations" />
    <Custom Name="UseWordProcessor" Value="Examination" />
  </Customs>
  <Fields>
    <Attribute Name="ExaminationDate" Index="9000001" Type="date" Description="Дата осмотра" Required="1" />
    <Attribute Name="Diagnosis" Index="9000002" Type="string" Description="Диагноз" CharacterMaximumLength="4096" />
    <Attribute Name="AnamnesisMorbi" Index="9000003" Type="text" Description="Анамнез заболевания" />
    <Attribute Name="Complaint" Index="9000004" Type="text" Description="Жалобы" />
    <Attribute Name="ObjectiveStatus" Index="9000005" Type="text" Description="Объективный статус" />
    <Attribute Name="Mkb" Index="9000006" Type="string" Description="Код МКБ" CharacterMaximumLength="8" Required="1" />
    <Attribute Name="Recomendations" Index="9000007" Type="text" Description="Рекомендации" />
    <Attribute Name="Epidemiological" Index="9000022" Type="text" Description="Эпид.анамнез" />
    <Attribute Name="Gynaecological" Index="9000023" Type="text" Description="Гинекологический анамнез" />
    <Attribute Name="DrugAllergy" Index="9000024" Type="text" Description="Лекарственная аллергия" />
    <Attribute Name="FoodAllergy" Index="9000025" Type="text" Description="Пищевая аллергия" />
    <Attribute Name="PatientAnamnesis" Index="9000026" Type="text" Description="Анамнез жизни" />
    <Attribute Name="Descr" Index="9000027" Type="text" Description="Особые отметки" />
    <Attribute Name="ExaminationTime" Index="9000029" Type="datetime" DefaultFormat="{0:HH:mm}" Description="Время осмотра" />
    <Attribute Name="Patronage" Index="9000032" Type="bool" Description="Патронаж" Required="1" />
    <Attribute Name="NextVisitDate" Index="9000033" Type="date" Description="Дата следующей явки" />
    <Attribute Name="Healing" Index="9000034" Type="text" Description="Лечение" />
    <Child Name="TransferredDiseases" Index="9000030" Type="AKUZ.TRANSFERRED_DISEASE" Description="Перенесенные заболевания" ChildAttribute="MedicalExamination" />
    <Child Name="AssociatedDiseases" Index="9000035" Type="AKUZ.ASSOCIATED_DISEASE" Description="Сопутствующие заболевания" ChildAttribute="MedicalExamination" />
    <Attribute Name="ComplicationMkb" Type="string" Description="Код МКБ осложнения" CharacterMaximumLength="8" />
    <Attribute Name="ComplicationDiagnosis" Type="string" Description="Диагноз осложнения" CharacterMaximumLength="4096" />
    <Parent Name="EntryAmbulance" Type="AKUZ.ENTRY_AMBULANCE" Description="Запись на прием амбулаторно" />
    <Choice Name="Status" Description="Состояние пациента при осмотре">
      <Item Name="Удовлетворительное" Index="1" />
      <Item Name="Средней тяжести" Index="2" />
      <Item Name="Тяжелое" Index="3" />
      <Item Name="Крайне тяжелое" Index="4" />
      <Item Name="Клиническая смерть" Index="5" />
      <Item Name="Терминальное" Index="6" />
    </Choice>
    <Child Name="CouncilPosts" Type="AKUZ.COUNCIL_POST" Description="Врач участвующий в консилиуме" ChildAttribute="MedicalExamination" />
    <Parent Name="CouncilGoal" Type="AKUZ.COUNCIL_GOAL" Description="Цель проведения консилиума" />
    <Parent Name="TreatmentDisease" Type="AKUZ.TREATMENT_DISEASE" Description="Лечение заболевания" />
    <Child Name="CdaMedicalExaminationDiagnosiss" Type="AKUZ.CDA_MEDICAL_EXAMINATION_DIAGNOSIS" Description="Выявленная патология на медицинском осмотре" ChildAttribute="MedicalExamination" />
    <Attribute Name="Protocol" Type="text" Description="Протокол медицинского осмотра" />
    <Attribute Name="ArterialHighPressure" Type="int" Description="Систолическое артериальное давление" />
    <Attribute Name="ArterialLowPressure" Type="int" Description="Диастолическое артериальное давление" />
    <Attribute Name="HeartRetractionFrequence" Type="int" Description="Частота сердечных сокращений" />
    <Attribute Name="BreathFrequence" Type="int" Description="Частота дыхания" />
    <Child Name="BaseExaminationProtocols" Type="AKUZ.BASE_EXAMINATION_PROTOCOL" Description="Базовый протокол медицинского осмотра" ChildAttribute="MedicalExamination" />
    <Parent Name="V009Result" Type="AKUZ.V009_RESULT" Description="Классификатор результатов обращения за медицинской помощью" />
    <Child Name="MedicalExaminationFiles" Type="AKUZ.MEDICAL_EXAMINATION_FILE" Description="Файл медицинского осмотра" ChildAttribute="MedicalExamination" />
    <Attribute Name="StatusLocale" Type="text" Description="Локальный статус" />
    <Attribute Name="DiagnosisJustification" Type="text" Description="Обоснование диагноза" />
    <Choice Name="ProfConclusion" Description="Заключение по проф.пригодности">
      <Item Name="по профессии работать может" Index="0" />
      <Item Name="по профессии работать не может" Index="1" />
    </Choice>
    <Choice Name="MedicalExaminationType" 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" />
      <Item Name="Осмотр врача в отделении/приемном покое с заведующим отделением" Index="11" />
      <Item Name="Обоснование диагноза" Index="12" />
    </Choice>
    <Attribute Name="Examination" Type="text" Description="Осмотр больного" />
    <Choice Name="ExaminationTypesContent" IsFlag="1" Description="Учтенные разделы осмотра">
      <Item Name="Анамнез" Index="1" />
      <Item Name="Аллергия" Index="2" />
      <Item Name="Жалобы" Index="4" />
      <Item Name="Объективный статус" Index="8" />
      <Item Name="Локальный статус" Index="16" />
      <Item Name="Обоснование диагноза" Index="32" />
      <Item Name="Рекомендации" Index="64" />
      <Item Name="Лечение" Index="128" />
      <Item Name="Консилиум" Index="256" />
      <Item Name="Экспертный анамнез" Index="512" />
      <Item Name="Трансфузионный анамнез" Index="1024" />
      <Item Name="Анамнез жизни" Index="2048" />
      <Item Name="Принимаемые лекарства" Index="4096" />
      <Item Name="Перенесенные заболевания" Index="8192" />
    </Choice>
    <Attribute Name="PatientHeight" Type="int" Description="Рост пациента" />
    <Attribute Name="PatientWeight" Type="float" Description="Вес пациента" NumericPrecision="6" NumericScale="3" />
    <Attribute Name="Saturation" Type="int" Description="Сатурация" />
    <Link Name="CdaConsultationDocument" Type="AKUZ.CDA_CONSULTATION_DOCUMENT" Description="Документ консультации в формате CDA" LinkAttribute="MedicalExamination" />
    <Link Name="VIMISConsultationDocument" Type="AKUZ.VIMIS_CDA_CONSULTATION_DOCUMENT" Description="Документ консультации в формате CDA" LinkAttribute="MedicalExamination" />
    <Attribute Name="TNMS" Type="string" Description="Онкологический диагноз" />
    <Link Name="CdaTeleconsultation" Type="AKUZ.CDA_TELECONSULTATION" Description="Телеконсультация в формате CDA" LinkAttribute="MedicalExamination" />
    <Attribute Name="Temperature" Type="float" DefaultFormat="{0:F1}" Description="Температура" NumericPrecision="3" NumericScale="1" />
    <Child Name="HospitalDestination" Type="AKUZ.HOSPITAL_DESTINATION" Description="Лечебное назначение" ChildAttribute="MedicalExamination" />
    <Attribute Name="ExpertAnamnesis" Type="text" Description="Экспертный анамнез" />
    <Attribute Name="TransfusionAnamnesis" Type="text" Description="Трансфузионный анамнез" />
    <Attribute Name="TransferredDiseasesText" Type="text" Description="Перенесенные заболевания" />
    <Attribute Name="MedicationsTaken" Type="text" Description="Принимаемые лекарства" />
    <Parent Name="MedicalExaminationTypes" Type="AKUZ.MEDICAL_EXAMINATION_TYPES" Description="Тип медицинского осмотра (справочник)" />
    <Attribute Name="CreatedByNurse" Type="bool" Description="Осмотр проведен средним мед.персоналом" />
    <Attribute Name="Decision" Type="text" Description="Заключение" />
    <Link Name="TemperatureListNew" Type="AKUZ.TEMPERATURE_LIST_NEW" Description="Новый температурный лист" LinkAttribute="MedicalExamination" />
  </Fields>
  <DbMapping>
    <Table name="T_MEDICAL_EXAMINATION">
      <Map Name="ExaminationDate" Column="ExaminationDate" />
      <Map Name="Diagnosis" Column="Diagnosis" />
      <Map Name="AnamnesisMorbi" Column="AnamnesisMorbi" />
      <Map Name="Complaint" Column="Complaint" />
      <Map Name="ObjectiveStatus" Column="ObjectiveStatus" />
      <Map Name="Mkb" Column="Mkb" />
      <Map Name="Recomendations" Column="Recomendations" />
      <Map Name="Epidemiological" Column="Epidemiological" />
      <Map Name="Gynaecological" Column="Gynaecological" />
      <Map Name="DrugAllergy" Column="DrugAllergy" />
      <Map Name="FoodAllergy" Column="FoodAllergy" />
      <Map Name="PatientAnamnesis" Column="PatientAnamnesis" />
      <Map Name="Descr" Column="Descr" />
      <Map Name="ExaminationTime" Column="ExaminationTime" />
      <Map Name="Patronage" Column="Patronage" />
      <Map Name="NextVisitDate" Column="NextVisitDate" />
      <Map Name="Healing" Column="Healing" />
      <Map Name="ComplicationMkb" Column="ComplicationMkb" />
      <Map Name="ComplicationDiagnosis" Column="ComplicationDiagnosis" />
      <Map Name="Status" Column="Status" />
      <Map Name="CouncilGoal" Column="CouncilGoal" />
      <Map Name="TreatmentDisease" Column="TreatmentDisease" />
      <Map Name="Protocol" Column="Protocol" />
      <Map Name="ArterialHighPressure" Column="ArterialHighPressure" />
      <Map Name="ArterialLowPressure" Column="ArterialLowPressure" />
      <Map Name="HeartRetractionFrequence" Column="HeartRetractionFrequence" />
      <Map Name="BreathFrequence" Column="BreathFrequence" />
      <Map Name="V009Result" Column="V009Result" />
      <Map Name="StatusLocale" Column="StatusLocale" />
      <Map Name="DiagnosisJustification" Column="DiagnosisJustification" />
      <Map Name="ProfConclusion" Column="ProfConclusion" />
      <Map Name="MedicalExaminationType" Column="MedicalExaminationType" />
      <Map Name="Examination" Column="Examination" />
      <Map Name="ExaminationTypesContent" Column="ExaminationTypesContent" />
      <Map Name="PatientHeight" Column="PatientHeight" />
      <Map Name="PatientWeight" Column="PatientWeight" />
      <Map Name="Saturation" Column="Saturation" />
      <Map Name="TNMS" Column="TNMS" />
      <Map Name="Temperature" Column="Temperature" />
      <Map Name="ExpertAnamnesis" Column="ExpertAnamnesis" />
      <Map Name="TransfusionAnamnesis" Column="TransfusionAnamnesis" />
      <Map Name="TransferredDiseasesText" Column="TransferredDiseasesText" />
      <Map Name="MedicationsTaken" Column="MedicationsTaken" />
      <Map Name="MedicalExaminationTypes" Column="MedicalExaminationTypes" />
      <Map Name="CreatedByNurse" Column="CreatedByNurse" />
      <Map Name="Decision" Column="Decision" />
    </Table>
    <Lexem>
      <Map Name="cAnamnesisMorbi">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[AnamnesisMorbi]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cCompliant">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[Complaint]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cDrugAllergy">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[DrugAllergy]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cObjectiveStatus">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[ObjectiveStatus]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cStatusLocale">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[StatusLocale]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cDiagnosisJustification">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[DiagnosisJustification]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cHealing">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[Healing]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cRecomendations">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[Recomendations]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
      <Map Name="cDecision">
        <lx:Block xmlns:lx="lexem">
          <lx:LexemList>
            <lx:Variable Name="gnp" Level="0" />
          </lx:LexemList>
          <lx:LexemList>
            <lx:Assign>
              <lx:Variable Name="gnp" Level="0" />
              <lx:New Name="Process" no="false" f="false" cp="true">
                <lx:LexemList>
                  <lx:ConstOperand type="String"><![CDATA[GetMEAttributeByClassName]]></lx:ConstOperand>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepCurrent />
                  </lx:Path>
                </lx:LexemList>
              </lx:New>
            </lx:Assign>
            <lx:Assign>
              <lx:UsingOperator>
                <lx:Variable Name="gnp" Level="0" />
                <lx:Indexer>
                  <lx:Path OwnerQueryLevel="0">
                    <lx:StepString name="Parameters" />
                  </lx:Path>
                  <lx:ConstOperand type="String"><![CDATA[atribute]]></lx:ConstOperand>
                </lx:Indexer>
              </lx:UsingOperator>
              <lx:ConstOperand type="String"><![CDATA[Decision]]></lx:ConstOperand>
            </lx:Assign>
            <lx:UsingOperator>
              <lx:Variable Name="gnp" Level="0" />
              <lx:Indexer>
                <lx:Run />
                <lx:Variable Name="gnp" Level="0" />
              </lx:Indexer>
            </lx:UsingOperator>
          </lx:LexemList>
          <lx:LexemList />
        </lx:Block>
      </Map>
    </Lexem>
  </DbMapping>
  <CalculatingAttributes>
    <Parent Name="DoctorVisit" Index="9000020" Type="AKUZ.DOCTOR_VISIT" Description="Посещение" RequiredAttributes="{AmbulanceEvent / DoctorVisits /MedicalExamination}" PathAttributes="{AmbulanceEvent / DoctorVisits}" />
    <Child Name="InvoiceWriteOffOnPatient" Index="9000008" Type="AKUZ.INVOICE_WRITE_OFF_ON_PATIENT" Description="Накладные списания на пациентов" RequiredAttributes="{Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION/PatientAppointmentExecutions/InvoiceItem/StorageInvoice/ResponsiblePerson};{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION/PatientAppointmentExecutions/InvoiceItem/StorageInvoice/Date};{AmbulanceEvent/AmbulanceRecords/as AKUZ.DIAGNOSTICS_RESULTS/PatientAppointmentExecutions/InvoiceItem/StorageInvoice/ResponsiblePerson};{AmbulanceEvent/AmbulanceRecords/as AKUZ.DIAGNOSTICS_RESULTS/PatientAppointmentExecutions/InvoiceItem/StorageInvoice/Date}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION/PatientAppointmentExecutions/InvoiceItem/StorageInvoice};{AmbulanceEvent/AmbulanceRecords/as AKUZ.DIAGNOSTICS_RESULTS/PatientAppointmentExecutions/InvoiceItem/StorageInvoice}" />
    <Child Name="RouteToDoctorInspections" Index="9000010" Type="AKUZ.ROUTE_TO_DOCTOR_INSPECTION" Description="Назначенные консультации" RequiredAttributes="{Relationships/MedicalRecordLink};{Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.ROUTE_TO_DOCTOR_INSPECTION}" />
    <Child Name="RouteToDiagnostics" Index="9000011" Type="AKUZ.ROUTE_TO_DIAGNOSTICS" Description="Назначения на диагностику" RequiredAttributes="{Relationships/MedicalRecordLink};{Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.ROUTE_TO_DIAGNOSTICS}" />
    <Child Name="ProcedureTreatmentRecords" Index="9000012" Type="AKUZ.PROCEDURE_TREATMENT_RECORD" Description="Назначенное немедикаментозное лечение" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.TREATMENT_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="Recipes" Index="9000013" Type="AKUZ.RECIPE" Description="Назначенные льготные медикаменты" RequiredAttributes="{Post};{ExaminationDate};{AmbulanceEvent/Recipes/RecipeDate};{AmbulanceEvent/Recipes/Post}" PathAttributes="{AmbulanceEvent/Recipes}" />
    <Child Name="RecipeForms" Type="AKUZ.RECIPE_FORM" Description="Рецептурные бланки" RequiredAttributes="{Post};{ExaminationDate};{AmbulanceEvent/RecipeForms/RecipeDate};{AmbulanceEvent/RecipeForms/Post}" PathAttributes="{AmbulanceEvent/RecipeForms}" />
    <Child Name="RouteRecords" Index="9000014" Type="AKUZ.ROUTE_RECORD" Description="Направления" RequiredAttributes="{Relationships/MedicalRecordLink}; {Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.ROUTE_RECORD}" />
    <Child Name="Refferals" Index="9000015" Type="AKUZ.REFERRAL" Description="Направления в другие МО" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.REFERRAL/ReferralDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="RouteToVaccination" Index="9000016" Type="AKUZ.ROUTE_TO_VACCINATION" Description="Направления на вакцинацию" RequiredAttributes="{Relationships/MedicalRecordLink};{Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.ROUTE_TO_VACCINATION}" />
    <Child Name="RepeatedToRouteDoctorInspections" Index="9000017" Type="AKUZ.REPEATED_PRESCRIPTION_RECORD" Description="Назначения на повторный прием" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.PRESCRIPTION_RECORD/RouteDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords}" />
    <Child Name="EventServices" Index="9000018" Type="AKUZ.EVENT_SERVICE" Description="Оказанные услуги" RequiredAttributes="{Post};{ExaminationDate};{AmbulanceEvent / EventServices /EventServiceResult / Post};{AmbulanceEvent / EventServices /EventServiceResult / Date}" PathAttributes="{AmbulanceEvent / EventServices}" />
    <Child Name="DoctorVisitServices" Index="9000019" Type="AKUZ.AMBULANCE_SURGICAL_OPERATION" Description="Хирургические вмешательства" RequiredAttributes="{Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/Post};{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION/OperationDate};{ExaminationTime};{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION/OperationTime}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.AMBULANCE_SURGICAL_OPERATION}" />
    <Child Name="MilkRecipe" Index="9000031" Type="AKUZ.MILK_RECIPE" Description="Молочная кухня" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.MILK_RECIPE/PostingDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.MILK_RECIPE}" />
    <Child Name="Destinations" Index="9000009" Type="AKUZ.DESTINATION" Description="Назначения" RequiredAttributes="{AmbulanceEvent/ListOfDestination/Destinations/MedicalExamination}" PathAttributes="{AmbulanceEvent/ListOfDestination/Destinations}" />
    <Child Name="EntryToTeleconsultations" Type="AKUZ.ENTRY_TO_TELECONSULTATION" Description="Запись к врачу на телеконсультацию" RequiredAttributes="{AmbulanceEvent/EntryAmbulances/as AKUZ.ENTRY_TO_TELECONSULTATION}" PathAttributes="{AmbulanceEvent/EntryAmbulances/as AKUZ.ENTRY_TO_TELECONSULTATION}" />
    <Child Name="AgedQuestionnaireRecords" Type="AKUZ.AGED_QUESTIONNAIRE_RECORD" Description="Результат опроса 'Возраст не помеха'" RequiredAttributes="{Relationships/MedicalRecordLink}; {Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.AGED_QUESTIONNAIRE_RECORD}" />
    <Child Name="DirectionToMilkRecipe" Type="AKUZ.MILK_DIRECTION" Description="Направления на получение молочного питания" RequiredAttributes="{Post};{AmbulanceEvent/AmbulanceRecords/Post};{ExaminationDate};{AmbulanceEvent/AmbulanceRecords/as AKUZ.MILK_DIRECTION/PostingDate}" PathAttributes="{AmbulanceEvent/AmbulanceRecords/as AKUZ.MILK_DIRECTION}" />
    <Child Name="VaccinatedRegistryRecords" Type="AKUZ.VACCINATED_REGISTRY_RECORD" Description="Дополнительные сведения по регистру вакцинаций" RequiredAttributes="{Relationships/MedicalRecordLink}; {Relationships/RelationshipType}" PathAttributes="{Relationships/MedicalRecordLink/as AKUZ.VACCINATED_REGISTRY_RECORD}" />
    <Attribute Name="cAnamnesisMorbi" Type="string" Description="Анамнез" />
    <Attribute Name="cCompliant" Type="string" Description="Жалобы из осмотра" />
    <Attribute Name="cDrugAllergy" Type="string" Description="Аллергия" />
    <Attribute Name="cObjectiveStatus" Type="string" Description="Объективный статус" />
    <Attribute Name="cStatusLocale" Type="string" Description="Локальный статус" />
    <Attribute Name="cDiagnosisJustification" Type="string" Description="Обоснование диагноза" />
    <Attribute Name="cHealing" Type="string" Description="Лечение" />
    <Attribute Name="cRecomendations" Type="string" Description="Рекомендации" />
    <Attribute Name="cDecision" Type="string" Description="Заключение" />
    <Attribute Name="HasOnkDiagnosis" Type="bool" Description="Имеет онкологический диагноз" RequiredAttributes="{AssociatedDiseases/Mkb};{Mkb}" />
    <Attribute Name="Stnm" Type="string" Description="Онко диагноз в человекочитаемой форме" RequiredAttributes="{TNMS}" />
  </CalculatingAttributes>
</Entity>