Schema Creation is Unsuccessful

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Schema Creation is Unsuccessful

Saeid
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi everybody! I have a multi-module project which runs properly but no schema's created! Meanwhile, I've provided no data for sample-data.xml file....Please help me what's the problem!
thanks in advance!
Saeid!

Jdk 1.6
Maven 3.2.3
Intellij IDEA 11.0

hibernate.cfg.xml
----------------
        <property name="dialect">org.hibernate.dialect.MySQL5InnoDBDialect</property>       
        <property name="connection.pool_size">10</property>
        <property name="hibernate.hbm2ddl.auto">update</property>
        <property name="hibernate.show_sql">false</property>
           ........
           ........
        <mapping class=...... />

pom.xml
-------
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

....

    <build>
        <defaultGoal>install</defaultGoal>
        <finalName>${artifactId}-${version}.r${buildNumber}</finalName>
        <plugins>         

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>appfuse-maven-plugin</artifactId>
                <version>${appfuse.version}</version>
                <configuration>
                    <genericCore>${amp.genericCore}</genericCore>
                    <fullSource>${amp.fullSource}</fullSource>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-eclipse-plugin</artifactId>
                <version>2.5.1</version>
                <configuration>
                    <additionalProjectnatures>
                        <projectnature>org.springframework.ide.eclipse.core.springnature</projectnature>
                    </additionalProjectnatures>
                    <additionalBuildcommands>
                        <buildcommand>org.springframework.ide.eclipse.core.springbuilder</buildcommand>
                    </additionalBuildcommands>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <wtpversion>1.5</wtpversion>
                </configuration>
            </plugin>

            <plugin>
                <artifactId>maven-idea-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <downloadSources>true</downloadSources>
                    <downloadJavadocs>true</downloadJavadocs>
                    <dependenciesAsLibraries>true</dependenciesAsLibraries>
                    <useFullNames>false</useFullNames>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>weblogic-maven-plugin</artifactId>
                <version>2.9.1</version>
                <configuration>
                    <warName>hospital-1.0.war</warName>
                    <verbose>true</verbose>
                    <exploded>false</exploded>
                    <remote>false</remote>
                    <adminServerHostName>localhost</adminServerHostName>
                    <adminServerPort>7001</adminServerPort>
                    <userId>weblogic</userId>
                    <password>weblogic</password>
                    <name>${project.artifactId}</name>
                    <staging>nostage</staging>
                    <targetNames>
                        <targetName>hospital</targetName>
                    </targetNames>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>com.sun</groupId>
                        <artifactId>tools</artifactId>
                        <version>1.5</version>
                        <scope>system</scope>
                        <systemPath>${java.home}/../lib/tools.jar</systemPath>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>6.1.9</version>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>3</scanIntervalSeconds>
                    <scanTargetPatterns>
                        <scanTargetPattern>
                            <directory>src/main/webapp/WEB-INF</directory>
                            <excludes>
                                <exclude>**/*.jsp</exclude>
                            </excludes>
                            <includes>
                                <include>**/*.properties</include>
                                <include>**/*.xml</include>
                            </includes>
                        </scanTargetPattern>
                    </scanTargetPatterns>
                    <webDefaultXml>src/main/resources/webdefault.xml</webDefaultXml>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>buildnumber-maven-plugin</artifactId>
                <configuration>
                    <format>{0,date,yyyyMMdd.HHmmss}</format>
                    <items>
                        <item>timestamp</item>
                    </items>
                </configuration>

                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>create</goal>
                        </goals>
                    </execution>
                </executions>


            </plugin>


            <plugin>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.0.2</version>
                <configuration>
                    <dependentWarExcludes>
                        **/jdbc.properties,**/hibernate.cfg.xml,**/sql-map-config.xml,**/web.xml,WEB-INF/classes/META-INF/**
                    </dependentWarExcludes>
                     <webappDirectory>
                         target/${artifactId}
                     </webappDirectory>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>aspectj-maven-plugin</artifactId>
                <version>1.0</version>
                <configuration>
                    <source>1.5</source>
                    <verbose>true</verbose>
                    <complianceLevel>1.5</complianceLevel>
                    <showWeaveInfo>true</showWeaveInfo>
                    <aspectLibraries>
                        <aspectLibrary>
                            <groupId>org.springframework</groupId>
                            <artifactId>spring-aspects</artifactId>
                        </aspectLibrary>
                    </aspectLibraries>
                </configuration>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjrt</artifactId>
                        <version>1.6.0</version>
                    </dependency>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjtools</artifactId>
                        <version>1.6.0</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>hibernate3-maven-plugin</artifactId>
                <version>2.1</version>
                <configuration>
                    <components>
                        <component>
                            <name>hbm2ddl</name>
                            <implementation>annotationconfiguration</implementation>
                        </component>
                    </components>
                    <componentProperties>
                        <update>false</update>
                        <create>true</create>
                        <drop>false</drop>
                        <format>true</format>
                        <jdk5>true</jdk5>
                        <export>false</export>
                        <outputfilename>sql.ddl</outputfilename>
                        <propertyfile>target/test-classes/jdbc.properties</propertyfile>
                    </componentProperties>
                </configuration>
                <executions>
                    <execution>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>hbm2ddl</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>${jdbc.groupId}</groupId>
                        <artifactId>${jdbc.artifactId}</artifactId>
                        <version>${jdbc.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>native2ascii-maven-plugin</artifactId>
                <version>1.0-alpha-1</version>
                <configuration>
                    <dest>target/classes</dest>
                    <src>src/main/resources</src>
                </configuration>
                <executions>
                    <execution>
                        <id>native2ascii-utf8</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>UTF8</encoding>
                            <includes>
                                ApplicationResources_fa.properties,
                                ApplicationResources_ko.properties,
                                ApplicationResources_no.properties,
                                ApplicationResources_tr.properties,
                                ApplicationResources_zh*.properties
                            </includes>
                        </configuration>
                    </execution>
                    <execution>
                        <id>native2ascii-8859_1</id>
                        <goals>
                            <goal>native2ascii</goal>
                        </goals>
                        <configuration>
                            <encoding>8859_1</encoding>
                            <includes>
                                ApplicationResources_fa.properties,
                                ApplicationResources_de.properties,
                                ApplicationResources_fr.properties,
                                ApplicationResources_nl.properties,
                                ApplicationResources_pt*.properties
                            </includes>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jasperreports-maven-plugin</artifactId>
                <version>1.0-beta-2</version>
                <configuration>
                    <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                </configuration>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile-reports</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>jasperreports</groupId>
                        <artifactId>jasperreports</artifactId>
                        <version>3.5.3</version>
                    </dependency>
                </dependencies>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                        <configuration>
                            <excludes>net/**</excludes>
                            <excludes>**/MANIFEST.MF</excludes>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>net.snp.core</groupId>
                                    <artifactId>snp-core</artifactId>
                                    <version>${snp-core.version}</version>
                                    <overWrite>true</overWrite>
                                    <outputDirectory>target/${artifactId}</outputDirectory>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>

                    <execution>
                        <id>copy-to-deploy</id>
                        <phase>install</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <version>${project.version}</version>
                                    <type>${project.packaging}</type>
                                    <destFileName>${deploy.name}</destFileName>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${deploy.dir}</outputDirectory>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

        </plugins>

        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>ApplicationResources_fa.properties</exclude>
                    <exclude>ApplicationResources_de.properties</exclude>
                    <exclude>ApplicationResources_fr.properties</exclude>
                    <exclude>ApplicationResources_ko.properties</exclude>
                    <exclude>ApplicationResources_nl.properties</exclude>
                    <exclude>ApplicationResources_no.properties</exclude>
                    <exclude>ApplicationResources_pt*.properties</exclude>
                    <exclude>ApplicationResources_tr.properties</exclude>
                    <exclude>ApplicationResources_zh*.properties</exclude>
                    <exclude>applicationContext-resources.xml</exclude>
                    <exclude>struts.xml</exclude>
                    <exclude>**/*.jasper</exclude>
                    <exclude>**/*.jrxml</exclude>
                    <exclude>**/*.ttf</exclude>

                </excludes>
                <filtering>true</filtering>
            </resource>

            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.jasper</include>
                    <include>**/*.ttf</include>
                </includes>
                <filtering>false</filtering>
            </resource>


            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>applicationContext-resources.xml</include>
                    <include>struts.xml</include>
                </includes>
                <filtering>false</filtering>
            </resource>
        </resources>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
            <testResource>
                <directory>src/main/webapp</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*.xml</include>
                </includes>
            </testResource>
        </testResources>
    </build>

   
    <dependencies>
        <dependency>
            <groupId>net.snp.core</groupId>
            <artifactId>snp-core</artifactId>
            <version>${snp-core.version}</version>
        </dependency>
        <dependency>
            <groupId>jasperreports</groupId>
            <artifactId>jasperreports</artifactId>
            <version>3.5.3</version>
        </dependency>
    </dependencies>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-changes-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.0</version>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-jxr-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-pmd-plugin</artifactId>
                <configuration>
                    <linkXref>true</linkXref>
                    <targetJdk>1.5</targetJdk>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
       
       
       
        <profile>
            <id>prod</id>
            <build>
                <plugins>
                   
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>dbunit-maven-plugin</artifactId>
                        <configuration>
                            <src>src/main/resources/default-data.xml</src>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

       
        <profile>
            <id>derby</id>
            <properties>
                <hibernate.dialect>org.hibernate.dialect.DerbyDialect</hibernate.dialect>
                <jdbc.groupId>org.apache.derby</jdbc.groupId>
                <jdbc.artifactId>derbyclient</jdbc.artifactId>
                <jdbc.version>10.2.2.0</jdbc.version>
                <jdbc.driverClassName>org.apache.derby.jdbc.ClientDriver</jdbc.driverClassName>
                <jdbc.url>
<![CDATA[jdbc:derby://localhost/hospital;create=true]]>
</jdbc.url>
                <jdbc.username>any</jdbc.username>
                <jdbc.password>value</jdbc.password>
            </properties>
        </profile>
        <profile>
            <id>h2</id>
            <properties>
                <dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName>
                <hibernate.dialect>org.hibernate.dialect.H2Dialect</hibernate.dialect>
                <jdbc.groupId>com.h2database</jdbc.groupId>
                <jdbc.artifactId>h2</jdbc.artifactId>
                <jdbc.version>1.0.20061217</jdbc.version>
                <jdbc.driverClassName>org.h2.Driver</jdbc.driverClassName>
                <jdbc.url>
<![CDATA[jdbc:h2:${java.io.tmpdir}/hospital]]>
</jdbc.url>
                <jdbc.username>sa</jdbc.username>
                <jdbc.password></jdbc.password>
            </properties>
        </profile>
        <profile>
            <id>hsqldb</id>
            <properties>
                <dbunit.dataTypeFactoryName>org.dbunit.ext.hsqldb.HsqldbDataTypeFactory</dbunit.dataTypeFactoryName>
                <hibernate.dialect>org.hibernate.dialect.HSQLDialect</hibernate.dialect>
                <jdbc.groupId>hsqldb</jdbc.groupId>
                <jdbc.artifactId>hsqldb</jdbc.artifactId>
                <jdbc.version>1.8.0.7</jdbc.version>
                <jdbc.driverClassName>org.hsqldb.jdbcDriver</jdbc.driverClassName>
                <jdbc.url>
<![CDATA[jdbc:hsqldb:${java.io.tmpdir}/hospital;shutdown=true]]>
</jdbc.url>
                <jdbc.username>sa</jdbc.username>
                <jdbc.password></jdbc.password>
            </properties>
        </profile>
       
        <profile>
            <id>postgresql</id>
            <properties>
                <hibernate.dialect>org.hibernate.dialect.PostgreSQLDialect</hibernate.dialect>
                <jdbc.groupId>postgresql</jdbc.groupId>
                <jdbc.artifactId>postgresql</jdbc.artifactId>
                <jdbc.version>8.1-407.jdbc3</jdbc.version>
                <jdbc.driverClassName>org.postgresql.Driver</jdbc.driverClassName>
                <jdbc.url>
<![CDATA[jdbc:postgresql://localhost/hospital]]>
</jdbc.url>
                <jdbc.username>postgres</jdbc.username>
                <jdbc.password>postgres</jdbc.password>
            </properties>
        </profile>
        <profile>
           
           
            <id>sqlserver</id>
            <properties>
                <dbunit.dataTypeFactoryName>org.dbunit.ext.mssql.MsSqlDataTypeFactory</dbunit.dataTypeFactoryName>
                <dbunit.operation.type>MSSQL_CLEAN_INSERT</dbunit.operation.type>
                <hibernate.dialect>org.hibernate.dialect.SQLServerDialect</hibernate.dialect>
                <jdbc.groupId>net.sourceforge.jtds</jdbc.groupId>
                <jdbc.artifactId>jtds</jdbc.artifactId>
                <jdbc.version>1.2</jdbc.version>
                <jdbc.driverClassName>net.sourceforge.jtds.jdbc.Driver</jdbc.driverClassName>
                <jdbc.url>
<![CDATA[jdbc:jtds:sqlserver://localhost:3683/hospital]]>
</jdbc.url>
                <jdbc.username>sa</jdbc.username>
                <jdbc.password>appfuse</jdbc.password>
            </properties>
        </profile>

       
        <profile>
            <id>jboss</id>
            <properties>
                <cargo.container>jboss4x</cargo.container>
                <cargo.container.home>${env.JBOSS_HOME}</cargo.container.home>
                <cargo.container.url>http://easynews.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.5.GA.zip
                </cargo.container.url>
            </properties>
        </profile>

       
    </profiles>

    <properties>
       
        <snp-core.version>1.0</snp-core.version>

       
        <copyright.year>2010</copyright.year>
        <dao.framework>hibernate</dao.framework>
        <web.framework>struts</web.framework>
        <amp.genericCore>true</amp.genericCore>
        <amp.fullSource>true</amp.fullSource>

       
        <appfuse.version>2.5.4</appfuse.version>

       
        <jmock.version>2.4.0</jmock.version>

       
        <webtest.version>R_1702</webtest.version>

       
        <cargo.container>tomcat5x</cargo.container>
        <cargo.container.home>${env.CATALINA_HOME}</cargo.container.home>
        <cargo.container.url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.14/bin/apache-tomcat-6.0.14.zip
        </cargo.container.url>
        <cargo.host>localhost</cargo.host>
        <cargo.port>8081</cargo.port>
        <cargo.wait>false</cargo.wait>



       
<dbunit.dataTypeFactoryName>org.dbunit.ext.mysql.MySqlDataTypeFactory</dbunit.dataTypeFactoryName>
        <dbunit.operation.type>CLEAN_INSERT</dbunit.operation.type>
        <hibernate.dialect>org.hibernate.dialect.MySQL5InnoDBDialect</hibernate.dialect>
        <jdbc.groupId>mysql</jdbc.groupId>
        <jdbc.artifactId>mysql-connector-java</jdbc.artifactId>
        <jdbc.version>5.1.27</jdbc.version>
        <jdbc.driverClassName>com.mysql.jdbc.Driver</jdbc.driverClassName>
        <jdbc.url>jdbc:mysql://localhost:3306/db_snp</jdbc.url>
        <jdbc.username>root</jdbc.username>
        <jdbc.password>abc123</jdbc.password>
        <jdbc.validationQuery>SELECT 1 + 1</jdbc.validationQuery>

    </properties>
</project>

maven Output(mvn install)
-------------
D:\Java\jdk1.6.0_27\bin\java -Dclassworlds.conf=D:\Java\apache-maven-3.2.3\bin\m2.conf -Dmaven.home=D:\Java\apache-maven-3.2.3 -Didea.launcher.port=7536 "-Didea.launcher.bin.path=D:\Java\IntelliJ IDEA 11.0\bin" -Dfile.encoding=UTF-8 -classpath "D:\Java\apache-maven-3.2.3\boot\plexus-classworlds-2.5.1.jar;D:\Java\IntelliJ IDEA 11.0\lib\idea_rt.jar" com.intellij.rt.execution.application.AppMain org.codehaus.classworlds.Launcher --no-plugin-registry --fail-fast --no-plugin-updates --strict-checksums --update-snapshots -s D:\Java\apache-maven-3.2.3\conf\settings.xml -f D:\Java\Projects\snp\his\pom.xml install
[WARNING] Command line option -npu is deprecated and will be removed in future Maven versions.
[WARNING] Command line option -npr is deprecated and will be removed in future Maven versions.
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for net.snp.hospital:snp-hospital:war:0.3.10
[WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:buildnumber-maven-plugin is missing. @ line 142, column 21
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING] The expression ${version} is deprecated. Please use ${project.version} instead.
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING] The expression ${artifactId} is deprecated. Please use ${project.artifactId} instead.
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]                                                                        
[INFO] ------------------------------------------------------------------------
[INFO] Building SNP Hospital Application 0.3.10
[INFO] ------------------------------------------------------------------------
Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/buildnumber-maven-plugin/maven-metadata.xml (573 B at 0.4 KB/sec)
[WARNING] The POM for xfire:xfire-jsr181-api:jar:1.0-M1 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO]
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ snp-hospital ---
[INFO] Storing buildNumber: 20140916.214757 at timestamp: 1410887877661
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: D:\Java\Projects\snp\his
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (unpack) @ snp-hospital ---
[INFO] Configured Artifact: net.snp.core:snp-core:1.0:jar
[INFO] Unpacking D:\Java\repository\net\snp\core\snp-core\1.0\snp-core-1.0.jar to D:\Java\Projects\snp\his\target\snp-hospital with includes "" and excludes "**/MANIFEST.MF"
[INFO]
[INFO] --- aspectj-maven-plugin:1.0:compile (default) @ snp-hospital ---
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-alpha-1:native2ascii (native2ascii-utf8) @ snp-hospital ---
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-alpha-1:native2ascii (native2ascii-8859_1) @ snp-hospital ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ snp-hospital ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 57 resources
[INFO] Copying 0 resource
[INFO] Copying 2 resources
[INFO] Copying 1041 resources
[INFO] Copying 1041 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ snp-hospital ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- jasperreports-maven-plugin:1.0-beta-2:compile-reports (default) @ snp-hospital ---
[INFO] Compiling 50 report design files.
[INFO] Compiling report file: print_reception_ghabz_subreport_units.jrxml
[INFO] Compiling report file: subExamResult.jrxml
[INFO] Compiling report file: insuranceCoveragedConsumableList_subreport.jrxml
[INFO] Compiling report file: haiReport.jrxml
[INFO] Compiling report file: print_reception_ghabz_subreport_estelaji.jrxml
[INFO] Compiling report file: medicalCenterFoodStatistic.jrxml
[INFO] Compiling report file: outpatientItemReport.jrxml
[INFO] Compiling report file: printBedridden.jrxml
[INFO] Compiling report file: cytoPatologyReport.jrxml
[INFO] Compiling report file: labWorkList.jrxml
[INFO] Compiling report file: death.jrxml
[INFO] Compiling report file: macroscopicSubExamResult.jrxml
[INFO] Compiling report file: childBirthStatisticsReport.jrxml
[INFO] Compiling report file: workList.jrxml
[INFO] Compiling report file: outOfCommtientDrugList_subReport.jrxml
[INFO] Compiling report file: inpatientInventoryInvoice.jrxml
[INFO] Compiling report file: cardex.jrxml
[INFO] Compiling report file: unitCenterFoodStatistic.jrxml
[INFO] Compiling report file: patientBill.jrxml
[INFO] Compiling report file: popsmear.jrxml
[INFO] Compiling report file: patientBillGrouped.jrxml
[INFO] Compiling report file: print_reception_ghabz.jrxml
[INFO] Compiling report file: totalCashOutput.jrxml
[INFO] Compiling report file: examResult.jrxml
[INFO] Compiling report file: examAnswer.jrxml
[INFO] Compiling report file: printWasteBedridden.jrxml
[INFO] Compiling report file: microscopicSubExamResult.jrxml
[INFO] Compiling report file: inpatientReceptionFormPrint.jrxml
[INFO] Compiling report file: insuranceCoveragedDrugList_subReport.jrxml
[INFO] Compiling report file: doctorpatientBill.jrxml
[INFO] Compiling report file: insuranceInventoryBill.jrxml
[INFO] Compiling report file: servicepatientBill.jrxml
[INFO] Compiling report file: gastric.jrxml
[INFO] Compiling report file: examResult02.jrxml
[INFO] Compiling report file: organAnswerForm.jrxml
[INFO] Compiling report file: unGroupedpatientBill.jrxml
[INFO] Compiling report file: drViewPresentByUnit.jrxml
[INFO] Compiling report file: examLabels.jrxml
[INFO] Compiling report file: 1patientBillGrouped.jrxml
[INFO] Compiling report file: immunohistochemistry.jrxml
[INFO] Compiling report file: printOrder.jrxml
[INFO] Compiling report file: Copy of examResult.jrxml
[INFO] Compiling report file: printRelapseBedridden.jrxml
[INFO] Compiling report file: CashOutputByDate.jrxml
[INFO] Compiling report file: drViewPresentByDoctor.jrxml
[INFO] Compiling report file: inpatientUnitFoodDailyReport.jrxml
[INFO] Compiling report file: pay_ghabz.jrxml
[INFO] Compiling report file: outOfCommtientConsumableList_subreport.jrxml
[INFO] Compiling report file: totalCashOutputGroupByUnits.jrxml
[INFO] Compiling report file: councilReport.jrxml
[INFO] Compiled 50 report design files.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ snp-hospital ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 1 resource
[INFO] Copying 3 resources
[INFO]
[INFO] >>> hibernate3-maven-plugin:2.1:hbm2ddl (default) > process-resources @ snp-hospital >>>
[INFO]
[INFO] --- buildnumber-maven-plugin:1.3:create (default) @ snp-hospital ---
[INFO] Storing buildNumber: 20140916.215045 at timestamp: 1410888045176
[INFO] Executing: cmd.exe /X /C "svn --non-interactive info"
[INFO] Working directory: D:\Java\Projects\snp\his
[INFO] Storing buildScmBranch: UNKNOWN_BRANCH
[INFO]
[INFO] --- maven-dependency-plugin:2.8:unpack (unpack) @ snp-hospital ---
[INFO] Configured Artifact: net.snp.core:snp-core:1.0:jar
[INFO] Unpacking D:\Java\repository\net\snp\core\snp-core\1.0\snp-core-1.0.jar to D:\Java\Projects\snp\his\target\snp-hospital with includes "" and excludes "**/MANIFEST.MF"
[INFO]
[INFO] --- aspectj-maven-plugin:1.0:compile (default) @ snp-hospital ---
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-alpha-1:native2ascii (native2ascii-utf8) @ snp-hospital ---
[INFO]
[INFO] --- native2ascii-maven-plugin:1.0-alpha-1:native2ascii (native2ascii-8859_1) @ snp-hospital ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ snp-hospital ---
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 57 resources
[INFO] Copying 0 resource
[INFO] Copying 2 resources
[INFO] Copying 1091 resources
[INFO] Copying 1091 resources
[INFO] Copying 1091 resources
[INFO] Copying 1091 resources
[INFO]
[INFO] <<< hibernate3-maven-plugin:2.1:hbm2ddl (default) < process-resources @ snp-hospital <<<
[INFO]
[INFO] --- hibernate3-maven-plugin:2.1:hbm2ddl (default) @ snp-hospital ---
[INFO] Configuration XML file loaded: file:/D:/Java/Projects/snp/his/src/main/resources/hibernate.cfg.xml
[INFO] Hibernate Annotations 3.3.0.GA
[INFO] Hibernate 3.2.5
[INFO] loaded properties from resource hibernate.properties: {hibernate.search.default.exclusive_index_use=true, hibernate.search.default.directory_provider=filesystem, hibernate.search.lucene_version=LUCENE_35, app.search.index.basedir=target/index, hibernate.bytecode.use_reflection_optimizer=false, hibernate.search.analyzer=org.apache.lucene.analysis.en.EnglishAnalyzer, hibernate.search.default.locking_strategy=simple, hibernate.search.worker.batch_size=100}
[INFO] Bytecode provider name : cglib
[INFO] using JDK 1.4 java.sql.Timestamp handling
[INFO] Configuration XML file loaded: file:/D:/Java/Projects/snp/his/src/main/resources/hibernate.cfg.xml
[INFO] configuring from url: file:/D:/Java/Projects/snp/his/src/main/resources/hibernate.cfg.xml
[INFO] Configured SessionFactory: null
[INFO] target/test-classes/jdbc.properties not found within the project. Trying absolute path.
[INFO] No hibernate properties file loaded.
[INFO] Binding entity from annotated class: net.snp.core.logging.model.MethodLog
[INFO] Bind entity net.snp.core.logging.model.MethodLog on table METHOD_LOG
[INFO] Binding entity from annotated class: net.snp.core.logging.model.MethodParameter
[INFO] Bind entity net.snp.core.logging.model.MethodParameter on table METHOD_PARAMETER
[INFO] Binding entity from annotated class: net.snp.core.security.model.User
[INFO] Bind entity net.snp.core.security.model.User on table users
[INFO] Binding entity from annotated class: net.snp.core.security.model.Role
[INFO] Binding Named query: findRoleByName => select r from Role r where r.roleName = :name
[INFO] Bind entity net.snp.core.security.model.Role on table role
[INFO] Binding entity from annotated class: net.snp.core.security.model.Task
[INFO] Bind entity net.snp.core.security.model.Task on table MB_TASK
[INFO] Binding entity from annotated class: net.snp.core.security.model.Center
[INFO] Binding named query: Center_NQ_ALL =>  from Center c  
[INFO] Binding named query: Center_NQ_ALPHABETIC => select c from Center c  where (upper(c.centerName))  like  ?  
[INFO] Binding named query: Center_NQ_NUMERIC => select c   from Center c  where (c.centerCode) like  ?  
[INFO] Binding named query: Center_NQ_CNT_ALL => select count(c) from Center c  
[INFO] Binding named query: Center_NQ_CNT_ALPHABETIC => select count(c) from Center c  where (upper(c.centerName))  like ?  
[INFO] Binding named query: Center_NQ_CNT_NUMERIC => select count(c)   from Center c  where c.centerCode like  ?  
[INFO] Bind entity net.snp.core.security.model.Center on table center
[INFO] Binding entity from annotated class: net.snp.common.model.base.BaseEntityRecord
[INFO] Binding Named query: BaseEntityRecord_NQ_ALL => from BaseEntityRecord b where b.baseEntity.entityId = ?
[INFO] Binding Named query: BaseEntityRecord_NQ_ALPHABETIC => select b from BaseEntityRecord b  where (lower(b.recordName))  like lower(?) and b.baseEntity.entityId = ?
[INFO] Binding Named query: BaseEntityRecord_NQ_NUMERIC => select b   from BaseEntityRecord b  where (b.recordCode) like  ? and b.baseEntity.entityId = ?
[INFO] Binding Named query: BaseEntityRecord_NQ_CNT_ALL => select count(b) from BaseEntityRecord b where b.baseEntity.entityId = ?
[INFO] Binding Named query: BaseEntityRecord_NQ_CNT_ALPHABETIC => select count(b) from BaseEntityRecord b  where (lower(b.recordName))  like lower(?)  and b.baseEntity.entityId = ?
[INFO] Binding Named query: BaseEntityRecord_NQ_CNT_NUMERIC => select count(b)   from BaseEntityRecord b  where b.recordCode like  ? and  b.baseEntity.entityId = ?
[INFO] Bind entity net.snp.common.model.base.BaseEntityRecord on table base_entity_record
[INFO] Binding entity from annotated class: net.snp.common.model.base.BaseEntity
[INFO] Bind entity net.snp.common.model.base.BaseEntity on table base_entity
[INFO] Binding entity from annotated class: net.snp.common.model.person.Contact
[INFO] Bind entity net.snp.common.model.person.Contact on table CB_CONTACT
[INFO] Binding entity from annotated class: net.snp.core.security.model.LoginHistory
[INFO] Bind entity net.snp.core.security.model.LoginHistory on table login_history
[INFO] Binding entity from annotated class: net.snp.common.model.person.Personnel
[INFO] Bind entity net.snp.common.model.person.Personnel on table personnel
[INFO] Binding entity from annotated class: net.snp.core.security.model.CenterUnit
[INFO] Bind entity net.snp.core.security.model.CenterUnit on table center_unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.Service
[INFO] Bind entity net.snp.hospital.model.medicalservice.Service on table Service
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.PersonnelPayRoll
[INFO] Bind entity net.snp.hospital.model.person.personnel.PersonnelPayRoll on table Personnel_PayRoll
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalcenter.MedicalCenterResponsibles
[INFO] Bind entity net.snp.hospital.model.medicalcenter.MedicalCenterResponsibles on table medical_center_responsibles
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.DrPercent
[INFO] Bind entity net.snp.hospital.model.person.personnel.DrPercent on table Dr_Percent
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.TopServiceUnit
[INFO] Bind entity net.snp.hospital.model.medicalservice.TopServiceUnit on table top_service_unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.GroupServiceUnit
[INFO] Bind entity net.snp.hospital.model.medicalservice.GroupServiceUnit on table group_service_unit
[INFO] Binding entity from annotated class: net.snp.core.security.model.ServiceManager
[INFO] Bind entity net.snp.core.security.model.ServiceManager on table service_manager
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalcenter.clinic.GroupDiseaseUnit
[INFO] Bind entity net.snp.hospital.model.medicalcenter.clinic.GroupDiseaseUnit on table Group_Disease_Unit
[INFO] Binding entity from annotated class: net.snp.core.security.model.ManagerGroup
[INFO] Bind entity net.snp.core.security.model.ManagerGroup on table manager_Group
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.ServiceUnit
[INFO] Bind entity net.snp.hospital.model.medicalservice.ServiceUnit on table service_unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.insurance.InsurancePercent
[INFO] Bind entity net.snp.hospital.model.medicalservice.insurance.InsurancePercent on table insurance_percent
[INFO] Binding entity from annotated class: net.snp.common.model.person.PersonnelUnit
[INFO] Bind entity net.snp.common.model.person.PersonnelUnit on table Personnel_Unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.Patient
[INFO] Binding Named query: Patient_NQ_ALL => from Reception
[INFO] Binding Named query: Patient_NQ_ALPHABETIC => select distinct c.reception from Cash c  where (upper(c.reception.patient.FName)||' '||upper(c.reception.patient.LName) ) like  ?
[INFO] Binding Named query: Patient_NQ_NUMERIC => select distinct c.reception from Cash c  where (c.reception.receptionNumber) like  ?
[INFO] Binding Named query: Patient_NQ_CNT_ALL => select count(*) from Patient p
[INFO] Binding Named query: Patient_NQ_CNT_ALPHABETIC => select  count(distinct c.reception) from Cash c  where (upper(c.reception.patient.FName)||' '||upper(c.reception.patient.LName) ) like   ?
[INFO] Binding Named query: Patient_NQ_CNT_NUMERIC => select  count(distinct c.reception) from Cash c  where c.reception.receptionNumber like  ?
[INFO] Bind entity net.snp.hospital.model.person.patient.Patient on table Patient
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.NajaPersonnel
[INFO] Bind entity net.snp.hospital.model.person.personnel.NajaPersonnel on table Naja_Personnel
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.Reception
[INFO] Bind entity net.snp.hospital.model.reception.Reception on table Reception
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.UnitReception
[INFO] Bind entity net.snp.hospital.model.reception.UnitReception on table Unit_Reception
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.PersonnelUnitPresent
[INFO] Bind entity net.snp.hospital.model.person.personnel.PersonnelUnitPresent on table personnel_unit_present
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.PersonnelUnitCalender
[INFO] Bind entity net.snp.hospital.model.person.personnel.PersonnelUnitCalender on table Personnel_Unit_Calender
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.ServiceInsurancePrice
[INFO] Bind entity net.snp.hospital.model.medicalservice.ServiceInsurancePrice on table Service_Insurance_Price
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.ServiceInsurancePriceProficiency
[INFO] Bind entity net.snp.hospital.model.medicalservice.ServiceInsurancePriceProficiency on table SIP_PROFICIENCY
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.UnitReceptionService
[INFO] Bind entity net.snp.hospital.model.reception.UnitReceptionService on table unit_reception_service
[INFO] Binding entity from annotated class: net.snp.hospital.model.disease.Disease
[INFO] Bind entity net.snp.hospital.model.disease.Disease on table disease
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.ReleasedInfo
[INFO] Bind entity net.snp.hospital.model.inpatient.ReleasedInfo on table Released_Info
[INFO] Binding entity from annotated class: net.snp.hospital.model.cash.Cash
[INFO] Bind entity net.snp.hospital.model.cash.Cash on table cash
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.insurance.InsurancePercentGroupService
[INFO] Bind entity net.snp.hospital.model.medicalservice.insurance.InsurancePercentGroupService on table insurance_per_grp_srv
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.insurance.InsurancePercentTopService
[INFO] Bind entity net.snp.hospital.model.medicalservice.insurance.InsurancePercentTopService on table insurance_per_top_srv
[INFO] Binding entity from annotated class: net.snp.hospital.model.reservation.Reservation
[INFO] Bind entity net.snp.hospital.model.reservation.Reservation on table reservation
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.PatientAllergy
[INFO] Bind entity net.snp.hospital.model.person.patient.PatientAllergy on table patient_allergy
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.PatientBaseDisease
[INFO] Bind entity net.snp.hospital.model.person.patient.PatientBaseDisease on table patient_base_disease
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.PatientFamilyDisease
[INFO] Bind entity net.snp.hospital.model.person.patient.PatientFamilyDisease on table patient_family_disease
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.PatientSpecialDisease
[INFO] Bind entity net.snp.hospital.model.person.patient.PatientSpecialDisease on table patient_special_disease
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.patient.PatientDrugUse
[INFO] Bind entity net.snp.hospital.model.person.patient.PatientDrugUse on table patient_drug_use
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.ServiceDetail
[INFO] Bind entity net.snp.hospital.model.medicalservice.ServiceDetail on table service_detail
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.insurance.InsurancePercentService
[INFO] Bind entity net.snp.hospital.model.medicalservice.insurance.InsurancePercentService on table insurance_percent_service
[INFO] Binding entity from annotated class: net.snp.hospital.model.disease.Answers
[INFO] Bind entity net.snp.hospital.model.disease.Answers on table answers
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.ServiceFilm
[INFO] Bind entity net.snp.hospital.model.medicalservice.ServiceFilm on table Service_Film
[INFO] Binding entity from annotated class: net.snp.hospital.model.person.personnel.ExternalDr
[INFO] Bind entity net.snp.hospital.model.person.personnel.ExternalDr on table External_Dr
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalcenter.clinic.InsuranceUnit
[INFO] Bind entity net.snp.hospital.model.medicalcenter.clinic.InsuranceUnit on table insurance_unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.ChangeUnit
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.ChangeUnit on table change_unit
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.Inventory
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.Inventory on table inventory
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryAttach
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryAttach on table inventory_attach
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryCompound
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryCompound on table inventory_compound
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryConflict
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryConflict on table inventory_conflict
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryManagement
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryManagement on table inventory_management
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventorySimilar
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventorySimilar on table inventory_similar
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.SpecialPrescription
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.SpecialPrescription on table special_prescription
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.SubGroup
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.SubGroup on table sub_group
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseRequest
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseRequest on table purchase_request
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseRequestItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseRequestItem on table purchase_request_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.RoleWarehouse
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.RoleWarehouse on table role_warehouse
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrder
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrder on table purchase_order
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrderItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrderItem on table purchase_order_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.Supplier
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.Supplier on table supplier
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseInvoice
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseInvoice on table purchase_invoice
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.purchase.PurchaseInvoiceItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.purchase.PurchaseInvoiceItem on table purchase_invoice_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryTransaction
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryTransaction on table inventory_transaction
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.inventory.InventoryTransactionDetail
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.inventory.InventoryTransactionDetail on table inventory_transaction_detail
[INFO] Binding entity from annotated class: net.snp.hospital.model.emergency.Teryaj
[INFO] Bind entity net.snp.hospital.model.emergency.Teryaj on table Teryaj
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.revoke.RevokeInvoice
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.revoke.RevokeInvoice on table revoke_invoice
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.revoke.RevokeInvoiceItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.revoke.RevokeInvoiceItem on table revoke_invoice_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.TechnicalIndicator
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.TechnicalIndicator on table technical_indicator
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.CompoundTechnicalIndicate
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.CompoundTechnicalIndicate on table compound_technical_indicate
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.Outpatient
[INFO] Bind entity net.snp.hospital.model.pharmacy.Outpatient on table outpatient
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.OutpatientItem
[INFO] Bind entity net.snp.hospital.model.pharmacy.OutpatientItem on table outpatient_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.OutpatientAccount
[INFO] Bind entity net.snp.hospital.model.pharmacy.OutpatientAccount on table outpatient_account
[INFO] Binding entity from annotated class: net.snp.hospital.model.pathology.Smear
[INFO] Bind entity net.snp.hospital.model.pathology.Smear on table Smear
[INFO] Binding entity from annotated class: net.snp.hospital.model.pathology.Cyto
[INFO] Bind entity net.snp.hospital.model.pathology.Cyto on table Cyto
[INFO] Binding entity from annotated class: net.snp.hospital.model.pathology.Immunohistochemistry
[INFO] Bind entity net.snp.hospital.model.pathology.Immunohistochemistry on table immunohistochemistry
[INFO] Binding entity from annotated class: net.snp.hospital.model.pathology.HaiReport
[INFO] Bind entity net.snp.hospital.model.pathology.HaiReport on table hai_report
[INFO] Binding entity from annotated class: net.snp.hospital.model.pathology.Gastric
[INFO] Bind entity net.snp.hospital.model.pathology.Gastric on table gastric
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.Death
[INFO] Bind entity net.snp.hospital.model.reception.Death on table Death
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.Room
[INFO] Bind entity net.snp.hospital.model.inpatient.Room on table room
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.BedInfo
[INFO] Bind entity net.snp.hospital.model.inpatient.BedInfo on table Bed_Info
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.ReceptionStatus
[INFO] Bind entity net.snp.hospital.model.reception.ReceptionStatus on table RECEPTION_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.PatientLocation
[INFO] Bind entity net.snp.hospital.model.reception.PatientLocation on table PATIENT_LOCATION
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.Insurance
[INFO] Bind entity net.snp.hospital.model.reception.Insurance on table INSURANCE
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.kit.Kit
[INFO] Bind entity net.snp.hospital.model.lab.kit.Kit on table Kit
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.exampackage.ExamPackage
[INFO] Bind entity net.snp.hospital.model.lab.exampackage.ExamPackage on table Package_Exam
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.exampackage.ServicePack
[INFO] Bind entity net.snp.hospital.model.lab.exampackage.ServicePack on table Service_Pack
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.UnitRequest
[INFO] Bind entity net.snp.hospital.model.medicalrequest.UnitRequest on table Unit_Request
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.RequestService
[INFO] Bind entity net.snp.hospital.model.medicalrequest.RequestService on table Request_Service
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.RequestStatus
[INFO] Bind entity net.snp.hospital.model.medicalrequest.RequestStatus on table REQUEST_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.RequestServiceSetting
[INFO] Bind entity net.snp.hospital.model.medicalrequest.RequestServiceSetting on table Request_Service_Setting
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.surgery.SurgeryInfo
[INFO] Bind entity net.snp.hospital.model.inpatient.surgery.SurgeryInfo on table SURGERY_INFO
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.surgery.SurgeryTeam
[INFO] Bind entity net.snp.hospital.model.inpatient.surgery.SurgeryTeam on table SURGERY_TEAM
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.surgery.TechnicianTeam
[INFO] Bind entity net.snp.hospital.model.inpatient.surgery.TechnicianTeam on table TECHNICIAN_TEAM
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.RoutineDrug
[INFO] Bind entity net.snp.hospital.model.inpatient.RoutineDrug on table Routine_Drug
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.subservice.SubService
[INFO] Bind entity net.snp.hospital.model.lab.subservice.SubService on table Sub_Service
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.exampackage.ComplementaryExamInfo
[INFO] Bind entity net.snp.hospital.model.lab.exampackage.ComplementaryExamInfo on table Complementary_Exam_Info
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.exampackage.ComplementaryParameter
[INFO] Bind entity net.snp.hospital.model.lab.exampackage.ComplementaryParameter on table Complementary_Parameter
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.UnitReceptionServiceSubService
[INFO] Bind entity net.snp.hospital.model.reception.UnitReceptionServiceSubService on table urs_sub_service
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.RequestServiceSubService
[INFO] Bind entity net.snp.hospital.model.medicalrequest.RequestServiceSubService on table requestService_subService
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.Bedridden
[INFO] Bind entity net.snp.hospital.model.pharmacy.Bedridden on table bedridden
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.BedriddenItem
[INFO] Bind entity net.snp.hospital.model.pharmacy.BedriddenItem on table bedridden_item
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.BedriddenAccount
[INFO] Bind entity net.snp.hospital.model.pharmacy.BedriddenAccount on table bedridden_account
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.KDefinition
[INFO] Bind entity net.snp.hospital.model.inpatient.KDefinition on table K_Definition
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.ChildBirthInfo
[INFO] Bind entity net.snp.hospital.model.inpatient.ChildBirthInfo on table CHILD_BIRTH_INFO
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.InfantInfo
[INFO] Bind entity net.snp.hospital.model.inpatient.InfantInfo on table INFANT_INFO
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.BirthCertification
[INFO] Bind entity net.snp.hospital.model.inpatient.BirthCertification on table BIRTH_CERTIFICATION
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.warehousetransfer.WarehouseTransfer
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.warehousetransfer.WarehouseTransfer on table Warehouse_Transfer
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.warehousetransfer.WarehouseTransferItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.warehousetransfer.WarehouseTransferItem on table Warehouse_Transfer_Item
[INFO] Binding entity from annotated class: net.snp.hospital.model.emergency.TeryajStatus
[INFO] Bind entity net.snp.hospital.model.emergency.TeryajStatus on table Teryaj_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.UnitReceptionServiceFilm
[INFO] Bind entity net.snp.hospital.model.medicalservice.UnitReceptionServiceFilm on table Unit_Reception_Service_Film
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.RequestServiceStatus
[INFO] Bind entity net.snp.hospital.model.medicalrequest.RequestServiceStatus on table REQUEST_SERVICE_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.OutpatientCompoundTechnicalIndicate
[INFO] Bind entity net.snp.hospital.model.pharmacy.OutpatientCompoundTechnicalIndicate on table outpatient_CTI
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.warehousecounting.WarehouseCounting
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.warehousecounting.WarehouseCounting on table Warehouse_Counting
[INFO] Binding entity from annotated class: net.snp.hospital.model.drugwarehouse.warehousecounting.WarehouseCountingItem
[INFO] Bind entity net.snp.hospital.model.drugwarehouse.warehousecounting.WarehouseCountingItem on table Warehouse_Counting_Item
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.UnitReceptionStatus
[INFO] Bind entity net.snp.hospital.model.reception.UnitReceptionStatus on table UNIT_RECEPTION_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.systemsetting.SystemSetting
[INFO] Bind entity net.snp.hospital.model.systemsetting.SystemSetting on table System_Setting
[INFO] Binding entity from annotated class: net.snp.hospital.model.holidaycalendar.HolidayCalendar
[INFO] Bind entity net.snp.hospital.model.holidaycalendar.HolidayCalendar on table Holiday_Calendar
[INFO] Binding entity from annotated class: net.snp.hospital.model.holidaycalendar.HolidayCalendarDate
[INFO] Bind entity net.snp.hospital.model.holidaycalendar.HolidayCalendarDate on table Holiday_Calendar_Date
[INFO] Binding entity from annotated class: net.snp.hospital.model.reception.UnitReceptionServiceStatus
[INFO] Bind entity net.snp.hospital.model.reception.UnitReceptionServiceStatus on table UNIT_RECEPTION_SERVICE_STATUS
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalrequest.SurgeryUnitRequestStatus
[INFO] Bind entity net.snp.hospital.model.medicalrequest.SurgeryUnitRequestStatus on table Surgery_UnitRequest_Status
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.exampackage.LiteralAnswer
[INFO] Bind entity net.snp.hospital.model.lab.exampackage.LiteralAnswer on table Literal_Answer
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.InfantMalformation
[INFO] Bind entity net.snp.hospital.model.inpatient.InfantMalformation on table INFANT_MALFORMATION
[INFO] Binding entity from annotated class: net.snp.hospital.model.pharmacy.OutpatientMaxDrugAmount
[INFO] Bind entity net.snp.hospital.model.pharmacy.OutpatientMaxDrugAmount on table outpatient_max_drug_amount
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.ExamReply
[INFO] Bind entity net.snp.hospital.model.lab.ExamReply on table EXAM_REPLY
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.SubExamReply
[INFO] Bind entity net.snp.hospital.model.lab.SubExamReply on table SUB_EXAM_REPLY
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.Antibiotic
[INFO] Bind entity net.snp.hospital.model.lab.Antibiotic on table ANTIBIOTIC
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.SubAntibiotic
[INFO] Bind entity net.snp.hospital.model.lab.SubAntibiotic on table SUB_ANTIBIOTIC
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.Leach
[INFO] Bind entity net.snp.hospital.model.lab.Leach on table LEACH
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.SubLeach
[INFO] Bind entity net.snp.hospital.model.lab.SubLeach on table SUB_LEACH
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.Microbe
[INFO] Bind entity net.snp.hospital.model.lab.Microbe on table MICROBE
[INFO] Binding entity from annotated class: net.snp.hospital.model.lab.SubMicrobe
[INFO] Bind entity net.snp.hospital.model.lab.SubMicrobe on table SUB_MICROBE
[INFO] Binding entity from annotated class: net.snp.hospital.model.medicalservice.insurance.diskette.InsuranceDiskette
[INFO] Bind entity net.snp.hospital.model.medicalservice.insurance.diskette.InsuranceDiskette on table insurance_diskette
[INFO] Binding entity from annotated class: net.snp.hospital.model.foodschedule.FoodSchedule
[INFO] Bind entity net.snp.hospital.model.foodschedule.FoodSchedule on table Food_Schedule
[INFO] Binding entity from annotated class: net.snp.hospital.model.foodschedule.Breakfast
[INFO] Bind entity net.snp.hospital.model.foodschedule.Breakfast on table BREAKFAST
[INFO] Binding entity from annotated class: net.snp.hospital.model.foodschedule.Launch
[INFO] Bind entity net.snp.hospital.model.foodschedule.Launch on table LAUNCH
[INFO] Binding entity from annotated class: net.snp.hospital.model.foodschedule.Dinner
[INFO] Bind entity net.snp.hospital.model.foodschedule.Dinner on table DINNER
[INFO] Binding entity from annotated class: net.snp.hospital.model.inpatient.surgery.AnesthesiaCalculationMethod
[INFO] Bind entity net.snp.hospital.model.inpatient.surgery.AnesthesiaCalculationMethod on table ANESTHESIA_CALC_METHOD
[INFO] Binding entity from annotated class: net.snp.core.security.model.CenterUnitRequestType
[INFO] Bind entity net.snp.core.security.model.CenterUnitRequestType on table CenterUnit_RequestType
[INFO] Mapping collection: net.snp.hospital.model.holidaycalendar.HolidayCalendar.holidayCalendarDates -> Holiday_Calendar_Date
[INFO] Mapping collection: net.snp.hospital.model.inpatient.InfantInfo.infantMalformations -> INFANT_MALFORMATION
[INFO] Mapping collection: net.snp.hospital.model.inpatient.ChildBirthInfo.infantInfo -> INFANT_INFO
[INFO] Mapping collection: net.snp.hospital.model.lab.exampackage.ComplementaryExamInfo.literalAnswers -> Literal_Answer
[INFO] Mapping collection: net.snp.hospital.model.lab.exampackage.ComplementaryExamInfo.complementaryParameters -> Complementary_Parameter
[INFO] Mapping collection: net.snp.hospital.model.inpatient.surgery.SurgeryInfo.unitReceptionServices -> unit_reception_service
[INFO] Mapping collection: net.snp.hospital.model.inpatient.surgery.SurgeryInfo.technicianTeams -> TECHNICIAN_TEAM
[INFO] Mapping collection: net.snp.hospital.model.medicalrequest.RequestService.requestServiceStatuses -> REQUEST_SERVICE_STATUS
[INFO] Mapping collection: net.snp.hospital.model.medicalrequest.UnitRequest.requestStatuses -> REQUEST_STATUS
[INFO] Mapping collection: net.snp.hospital.model.emergency.Teryaj.teryajStatuses -> Teryaj_STATUS
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.specialPrescriptions -> special_prescription
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReceptionService.unitReceptionServiceStatuses -> UNIT_RECEPTION_SERVICE_STATUS
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReceptionService.surgeryTeams -> SURGERY_TEAM
[INFO] Mapping collection: net.snp.hospital.model.medicalservice.ServiceInsurancePrice.serviceInsurancePriceProficiencies -> SIP_PROFICIENCY
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReception.patientLocations -> PATIENT_LOCATION
[INFO] Mapping collection: net.snp.hospital.model.reception.Reception.receptionStatuses -> RECEPTION_STATUS
[INFO] Mapping collection: net.snp.hospital.model.reception.Reception.patientLocations -> PATIENT_LOCATION
[INFO] Mapping collection: net.snp.hospital.model.person.patient.Patient.contacts -> CB_CONTACT
[INFO] Mapping collection: net.snp.common.model.base.BaseEntity.baseEntityRecords -> base_entity_record
[INFO] Mapping collection: net.snp.core.security.model.Task.serviceManagers -> service_manager
[INFO] Mapping collection: net.snp.core.logging.model.MethodLog.methodParameters -> METHOD_PARAMETER
[INFO] Mapping collection: net.snp.core.security.model.Task.subTasks -> MB_TASK
[INFO] Mapping collection: net.snp.common.model.base.BaseEntityRecord.childRecords -> base_entity_record
[INFO] Mapping collection: net.snp.common.model.base.BaseEntity.childEntities -> base_entity
[INFO] Mapping collection: net.snp.core.security.model.CenterUnit.centerUnitRequestTypeList -> CenterUnit_RequestType
[INFO] Mapping collection: net.snp.hospital.model.medicalservice.Service.complementaryExamInfoList -> Complementary_Exam_Info
[INFO] Mapping collection: net.snp.hospital.model.medicalservice.Service.subServices -> Sub_Service
[INFO] Mapping collection: net.snp.hospital.model.reception.Reception.unitReceptions -> Unit_Reception
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReception.unitReceptionServices -> unit_reception_service
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReception.unitRequests -> Unit_Request
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReceptionService.cashes -> cash
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReceptionService.unitReceptionServiceServiceFilms -> Unit_Reception_Service_Film
[INFO] Mapping collection: net.snp.hospital.model.reception.UnitReceptionService.unitReceptionServiceSubServices -> urs_sub_service
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.inventoryAttaches -> inventory_attach
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.inventoryCompounds -> inventory_compound
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.inventoryConflicts -> inventory_conflict
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.inventorySimilars -> inventory_similar
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.inventoryTransactionList -> inventory_transaction
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.multiUnit -> change_unit
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.inventory.Inventory.subGroups -> sub_group
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.SubGroup.serviceDetails -> service_detail
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.purchase.PurchaseRequest.purchaseRequestItems -> purchase_request_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrder.purchaseInvoices -> purchase_invoice
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrder.purchaseOrderItems -> purchase_order_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.purchase.PurchaseOrder.purchaseRequestItems -> purchase_request_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.purchase.PurchaseInvoice.purchaseInvoiceItems -> purchase_invoice_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.revoke.RevokeInvoice.revokeInvoiceItems -> revoke_invoice_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.CompoundTechnicalIndicate.outpatientCompoundTechnicalIndicateList -> outpatient_CTI
[INFO] Mapping collection: net.snp.hospital.model.pharmacy.Outpatient.outpatientCompoundTechnicalIndicates -> outpatient_CTI
[INFO] Mapping collection: net.snp.hospital.model.pharmacy.Outpatient.outpatientItems -> outpatient_item
[INFO] Mapping collection: net.snp.hospital.model.inpatient.Room.beds -> Bed_Info
[INFO] Mapping collection: net.snp.hospital.model.inpatient.BedInfo.patientLocations -> PATIENT_LOCATION
[INFO] Mapping collection: net.snp.hospital.model.medicalrequest.UnitRequest.requestServices -> Request_Service
[INFO] Mapping collection: net.snp.hospital.model.medicalrequest.UnitRequest.surgeryUnitRequestStatuses -> Surgery_UnitRequest_Status
[INFO] Mapping collection: net.snp.hospital.model.medicalrequest.RequestService.requestServiceSubServices -> requestService_subService
[INFO] Mapping collection: net.snp.hospital.model.lab.subservice.SubService.complementaryExamInfoList -> Complementary_Exam_Info
[INFO] Mapping collection: net.snp.hospital.model.lab.exampackage.ComplementaryExamInfo.complementaryParameterList -> Complementary_Parameter
[INFO] Mapping collection: net.snp.hospital.model.pharmacy.Bedridden.bedriddenItems -> bedridden_item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.warehousetransfer.WarehouseTransfer.warehouseTransferItems -> Warehouse_Transfer_Item
[INFO] Mapping collection: net.snp.hospital.model.drugwarehouse.warehousecounting.WarehouseCounting.warehouseCountingItems -> Warehouse_Counting_Item
[INFO] Mapping collection: net.snp.hospital.model.lab.ExamReply.antibiotics -> ANTIBIOTIC
[INFO] Mapping collection: net.snp.hospital.model.lab.ExamReply.leaches -> LEACH
[INFO] Mapping collection: net.snp.hospital.model.lab.ExamReply.microbes -> MICROBE
[INFO] Mapping collection: net.snp.hospital.model.lab.SubExamReply.subAntibiotics -> SUB_ANTIBIOTIC
[INFO] Mapping collection: net.snp.hospital.model.lab.SubExamReply.subLeaches -> SUB_LEACH
[INFO] Mapping collection: net.snp.hospital.model.lab.SubExamReply.subMicrobes -> SUB_MICROBE
[INFO] Mapping collection: net.snp.hospital.model.foodschedule.FoodSchedule.breakfasts -> BREAKFAST
[INFO] Mapping collection: net.snp.hospital.model.foodschedule.FoodSchedule.dinners -> DINNER
[INFO] Mapping collection: net.snp.hospital.model.foodschedule.FoodSchedule.launchs -> LAUNCH
[INFO] Hibernate Validator 3.0.0.GA
[INFO] Using dialect: org.hibernate.dialect.MySQL5InnoDBDialect
[INFO] Running hbm2ddl schema export
[INFO] writing generated schema to file: D:\Java\Projects\snp\his\target\hibernate3\sql\sql.ddl

    create table ANESTHESIA_CALC_METHOD (
        ANESTHESIA_CM_ID bigint not null auto_increment,
        CALCULATION_TYPE integer,
        DEFINITION_DATE datetime,
        PERCENT integer,
        K_ANESTHASIA_BER_ID bigint,
        INSURANCE_TYPE_BER_ID bigint,
        primary key (ANESTHESIA_CM_ID)
    ) ENGINE=InnoDB;

    create table ANTIBIOTIC (
        ANTIBIOTIC_ID bigint not null auto_increment,
        SENSITIVITY_TYPE integer,
        ANTIBIOTIC_ENTITY_ID bigint,
        EXAM_REPLY_ID bigint,
        primary key (ANTIBIOTIC_ID)
    ) ENGINE=InnoDB;

    create table BIRTH_CERTIFICATION (
        ID bigint not null auto_increment,
        CERTIFICATION_DATE datetime,
        CERTIFICATION_DESCRIPTION varchar(255),
        CERTIFICATION_NUMBER varchar(255),
        CERTIFICATION_TYPE integer,
        DEATH_BIRTH_DATE datetime,
        FATHER_NAME varchar(255),
        IDENTIFICATION_NUMBER varchar(255),
        INFANT_INFO_ID bigint not null,
        CERTIFICATION_ISSUER_ID bigint,
        primary key (ID),
        unique (INFANT_INFO_ID)
    ) ENGINE=InnoDB;

    create table BREAKFAST (
        BREAKFAST_ID bigint not null auto_increment,
        BER_Breakfast_ID bigint,
        food_Schedule_ID bigint,
        primary key (BREAKFAST_ID)
    ) ENGINE=InnoDB;

    create table Bed_Info (
        bed_info_id bigint not null auto_increment,
        bed_code varchar(255),
        bed_status integer,
        room_id bigint,
        primary key (bed_info_id)
    ) ENGINE=InnoDB;

    create table CB_CONTACT (
        ID bigint not null auto_increment,
        COMMENTS varchar(255),
        PRIORITY integer,
        VALUE varchar(255) not null,
        TYPE_ID bigint not null,
        PATIENT_ID bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table CHILD_BIRTH_INFO (
        ID bigint not null auto_increment,
        ABORTION_NUM integer,
        BLOOD_GROUP integer,
        CHILD_BIRTH_DATE datetime,
        CHILD_BIRTH_NUM integer,
        CHILD_BIRTH_TIME varchar(255),
        CHILD_BIRTH_TYPE integer,
        PREGNANCY_NUM integer,
        PREGNANCY_WEEK integer,
        DOCTOR_ID bigint,
        UNIT_RECEPTION_ID bigint,
        CESAREAN_CAUSE_ID bigint,
        INTERVENTION_TYPE_ID bigint,
        ANESTHESIA_TYPE_ID bigint,
        ANESTHESIOLOGIST_ID bigint,
        MIDWIFE_ID bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table CenterUnit_RequestType  (
        id bigint not null auto_increment,
        requestType integer,
        CenterUnit_Id bigint not null,
        primary key (id)
    ) ENGINE=InnoDB;

    create table Complementary_Exam_Info (
        Complementary_Exam_Info_Id bigint not null auto_increment,
        accepted_Max varchar(255),
        accepted_Min varchar(255),
        ANSWER_TYPE integer,
        exam_default varchar(255),
        max varchar(255),
        min varchar(255),
        normal varchar(255),
        REPLY_PERIOD integer,
        reply_time varchar(255),
        kitType_Id bigint,
        exam bigint,
        subExam bigint,
        unit_Id bigint,
        primary key (Complementary_Exam_Info_Id)
    ) ENGINE=InnoDB;

    create table Complementary_Parameter (
        Complementary_Param_Id bigint not null auto_increment,
        parameter varchar(255),
        parameter_range varchar(255),
        Complementary_Exam_Info_Id bigint,
        primary key (Complementary_Param_Id)
    ) ENGINE=InnoDB;

    create table Cyto (
        cyto_Id bigint not null auto_increment,
        dx varchar(255),
        report varchar(255),
        specimen varchar(255),
        unit_reception_service_id bigint,
        primary key (cyto_Id)
    ) ENGINE=InnoDB;

    create table DINNER (
        DINNER_ID bigint not null auto_increment,
        BER_dinner_ID bigint,
        food_Schedule_ID bigint,
        primary key (DINNER_ID)
    ) ENGINE=InnoDB;

    create table Death (
        Death_Id bigint not null auto_increment,
        is_DeathBefore48h bit,
        Death_Date datetime not null,
        DeathNum varchar(255) not null,
        DeathReason varchar(255) not null,
        Death_Time varchar(255),
        recovery_action varchar(255),
        is_transfer bit,
        Teryaj_Id bigint,
        personnel_id bigint,
        primary key (Death_Id)
    ) ENGINE=InnoDB;

    create table Dr_Percent (
        Dr_Percent_Id bigint not null auto_increment,
        Effective_Date datetime not null,
        Percent double precision not null,
        Record_Id bigint not null unique,
        primary key (Dr_Percent_Id)
    ) ENGINE=InnoDB;

    create table EXAM_REPLY (
        EXAM_REPLY_ID bigint not null auto_increment,
        ANSWER varchar(255),
        unit_Id bigint,
        UNIT_RECEPTION_SERVICE_ID bigint,
        kitType_Id bigint,
        primary key (EXAM_REPLY_ID),
        unique (UNIT_RECEPTION_SERVICE_ID)
    ) ENGINE=InnoDB;

    create table External_Dr (
        external_dr_id bigint not null auto_increment,
        fName varchar(255) not null,
        lName varchar(255) not null,
        medicalCouncil_num varchar(255) not null,
        proficiency_id bigint not null,
        primary key (external_dr_id),
        unique (medicalCouncil_num)
    ) ENGINE=InnoDB;

    create table Food_Schedule (
        food_Schedule_ID bigint not null auto_increment,
        breakfast_Desc varchar(255),
        confirmation_Date datetime,
        dinner_Desc varchar(255),
        launch_Desc varchar(255),
        registration_Date datetime,
        status integer,
        UnitReception_Id bigint,
        confirmationUser_Id bigint,
        registrationUser_Id bigint,
        primary key (food_Schedule_ID)
    ) ENGINE=InnoDB;

    create table Group_Disease_Unit (
        record_id bigint,
        unit_id bigint,
        primary key (record_id, unit_id)
    ) ENGINE=InnoDB;

    create table Holiday_Calendar (
        holiday_Calendar_Id bigint not null auto_increment,
        holidayCalendarYear bigint,
        calendar_Id bigint,
        primary key (holiday_Calendar_Id)
    ) ENGINE=InnoDB;

    create table Holiday_Calendar_Date (
        holiday_Calendar_Date_Id bigint not null auto_increment,
        holiday_Date datetime,
        holiday_Desc varchar(255),
        holiday_Calendar_Id bigint,
        holidayType_Id bigint,
        primary key (holiday_Calendar_Date_Id)
    ) ENGINE=InnoDB;

    create table INFANT_INFO (
        ID bigint not null auto_increment,
        B_C_G_VACCINATED bit,
        BIRTH_DATE datetime,
        BIRTH_TIME varchar(255),
        BLOOD_GROUP integer,
        CHEST_SIZE integer,
        FIFTH_MIN_APKAR integer,
        FIRST_MIN_APKAR integer,
        HEAD_SIZE integer,
        HEPATITIS_VACCINATED bit,
        INFANT_BIRTH_STATE integer,
        INFANT_HEIGHT integer,
        INFANT_SEX integer,
        INFANT_WEIGHT integer,
        INFANTILE_PARALYSIS_VACCINATED bit,
        CHILD_BIRTH_INFO_ID bigint not null,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table INFANT_MALFORMATION (
        ID bigint not null auto_increment,
        MALFORMATION_TYPE_ID bigint,
        INFANT_INFO_ID bigint not null,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table INSURANCE (
        ID bigint not null auto_increment,
        asure_LetterCode varchar(255),
        asure_LetterDate datetime,
        commitment_Amount bigint,
        franchise integer,
        Insurance_Code varchar(255),
        Insurance_Priority integer,
        valid_Date datetime,
        compInsType_rec_id bigint,
        Reception_Id bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table K_Definition (
        K_ID bigint not null auto_increment,
        CONTRACT_FACTOR integer,
        END_DATE datetime,
        PRICE integer,
        START_DATE datetime,
        K_TYPE_ID bigint,
        INSURANCE_TYPE_ID bigint,
        primary key (K_ID)
    ) ENGINE=InnoDB;

    create table Kit (
        Kit_ID integer not null auto_increment,
        End_Date datetime,
        Exam_Qty varchar(255),
        Kit_Brebity_Name varchar(255),
        Kit_Code varchar(255),
        Kit_Name varchar(255),
        Strat_Date datetime,
        Unit_Id bigint not null,
        KitType_Id bigint not null,
        primary key (Kit_ID)
    ) ENGINE=InnoDB;

    create table LAUNCH (
        LAUNCH_ID bigint not null auto_increment,
        BER_Launch_ID bigint,
        food_Schedule_ID bigint,
        primary key (LAUNCH_ID)
    ) ENGINE=InnoDB;

    create table LEACH (
        LEACH_ID bigint not null auto_increment,
        EXAM_REPLY_ID bigint,
        BER_LEACH_ID bigint,
        primary key (LEACH_ID)
    ) ENGINE=InnoDB;

    create table Literal_Answer (
        literal_Answer_Id bigint not null auto_increment,
        answer varchar(255),
        normal bit,
        Complementary_Exam_Info_Id bigint,
        primary key (literal_Answer_Id)
    ) ENGINE=InnoDB;

    create table MB_ROLE_TASK (
        ROLE_ID bigint not null,
        TASK_ID bigint not null
    ) ENGINE=InnoDB;

    create table MB_TASK (
        ID bigint not null auto_increment,
        ACTION_NAME varchar(255) not null,
        ACTION_URL varchar(255),
        CODE varchar(255) unique,
        DESCRIPTION varchar(255),
        NAME varchar(255) not null,
        RANK integer,
        parent_ID bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table METHOD_LOG (
        METHOD_LOG_ID bigint not null auto_increment,
        CENTER_ID bigint,
        CENTER_NAME varchar(255),
        METHOD_DATE datetime not null,
        DECLARING_CLASS varchar(255) not null,
        METHOD_DESC varchar(255),
        METHOD_NAME varchar(255) not null,
        METHOD_QUALIFIER varchar(255) not null,
        METHOD_TIME varchar(255) not null,
        USER_NAME varchar(255) not null,
        primary key (METHOD_LOG_ID)
    ) ENGINE=InnoDB;

    create table METHOD_PARAMETER (
        METHOD_PARAMETER_ID bigint not null auto_increment,
        PARAMETER_CLASS varchar(255) not null,
        PARAMETER_VALUE varchar(255) not null,
        METHOD_LOG_ID bigint not null,
        primary key (METHOD_PARAMETER_ID)
    ) ENGINE=InnoDB;

    create table MICROBE (
        MICROBE_ID bigint not null auto_increment,
        EXAM_REPLY_ID bigint,
        BER_MICROBE_ID bigint,
        primary key (MICROBE_ID)
    ) ENGINE=InnoDB;

    create table Naja_Personnel (
        NajaPersonnel_Id bigint not null auto_increment,
        F_Name varchar(255),
        L_Name varchar(255),
        Birth_Date datetime,
        Employ_Date datetime,
        Father_Name varchar(255),
        Insurance_Number varchar(255),
        National_Code varchar(255),
        Organ_Id bigint,
        Gender_id bigint,
        InsuranceNumber_id bigint,
        Grade_Id bigint,
        primary key (NajaPersonnel_Id)
    ) ENGINE=InnoDB;

    create table PATIENT_LOCATION (
        Patient_Location_Id bigint not null auto_increment,
        Habitat_Date datetime,
        Habitat_Type integer,
        Other_Center varchar(255),
        release_method integer,
        deathId bigint,
        BED_INFO_ID bigint,
        UNITRECEPTION_ID bigint not null,
        reception_id bigint not null,
        Naja_Center_ID bigint,
        PATIENT_STATUS_ID bigint,
        primary key (Patient_Location_Id)
    ) ENGINE=InnoDB;

    create table Package_Exam (
        Pack_ID bigint not null auto_increment,
        Pack_Code varchar(255),
        Pack_Name varchar(255),
        primary key (Pack_ID)
    ) ENGINE=InnoDB;

    create table Patient (
        Patient_Id bigint not null auto_increment,
        F_Name varchar(255) not null,
        L_Name varchar(255) not null,
        allergy integer,
        base_disease integer,
        Bastari_FileNumber varchar(255) unique,
        Birth_Date datetime,
        birth_Place varchar(255),
        Employ_Date datetime,
        family_disease integer,
        Father_Name varchar(255),
        identify_number varchar(255),
        Identify_Place varchar(255),
        Insurance_Number varchar(255),
        Mobile varchar(255),
        najaPersonnel tinyblob,
        National_Code varchar(255),
        Patient_Type bit not null,
        Personnel_Code varchar(255),
        Phone_Number varchar(255),
        Post_Code varchar(255),
        Sarpaee_FileNumber varchar(255),
        special_disease integer,
        TahteNazar_FileNumber varchar(255) unique,
        unknown_Patient bit,
        used_drug integer,
        Center_Id bigint not null,
        Job_Id bigint,
        religion_id bigint,
        marriage_status_id bigint,
        Gender_id bigint,
        subInsurance_id bigint,
        Organ_Id bigint,
        InsuranceNumber_id bigint,
        Grade_Id bigint,
        primary key (Patient_Id)
    ) ENGINE=InnoDB;

    create table Personnel_PayRoll (
        Personnel_PayRoll_id bigint not null auto_increment,
        Effective_Date datetime not null,
        Efficiency_Score double precision not null,
        Hardness_Score double precision not null,
        Karane double precision not null,
        Planning_Score double precision not null,
        Presence_Score double precision not null,
        Total_PayRoll_Score double precision not null,
        personnel_id bigint not null unique,
        primary key (Personnel_PayRoll_id)
    ) ENGINE=InnoDB;

    create table Personnel_Unit (
        PersonnelUnit_Id bigint not null auto_increment,
        Personnel_Id bigint not null,
        Unit_Id bigint not null,
        primary key (PersonnelUnit_Id)
    ) ENGINE=InnoDB;

    create table Personnel_Unit_Calender (
        personnel_calender_id bigint not null auto_increment,
        Day integer,
        personnel_reception_qty integer,
        personnel_reservation_qty integer,
        usual_reception_qty integer,
        usual_reservation_qty integer,
        valid_from_date datetime,
        personnelunit_Id bigint,
        shift_Id bigint,
        calenderType_id bigint,
        primary key (personnel_calender_id)
    ) ENGINE=InnoDB;

    create table RECEPTION_STATUS (
        ID bigint not null auto_increment,
        Status_Date datetime not null,
        status_Type integer not null,
        user_id bigint,
        reception_id bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table REQUEST_SERVICE_STATUS (
        ID bigint not null auto_increment,
        count integer,
        Status_Date datetime not null,
        status_Type integer not null,
        requestService_Id bigint,
        relapseReason_Id bigint,
        lossReason_Id bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table REQUEST_STATUS (
        ID bigint not null auto_increment,
        Status_Date datetime not null,
        status_Type integer not null,
        Request_Id bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table Reception (
        Reception_Id bigint not null auto_increment,
        file_number varchar(255),
        Insurance_Number varchar(255),
        Introduction_Date datetime,
        Introduction_Number varchar(255),
        Reception_Date datetime not null,
        Reception_Number bigint,
        Reception_Time varchar(255) not null,
        Reception_Type integer not null,
        status bit,
        Patient_Id bigint not null,
        InsuranceType_id bigint,
        Released_Info_Id bigint,
        personnel_id bigint,
        Organ_Id bigint,
        subInsurance_id bigint,
        User_Id bigint not null,
        Center_Id bigint not null,
        Death_Id bigint,
        primary key (Reception_Id),
        unique (Reception_Number)
    ) ENGINE=InnoDB;

    create table Reception_Reasons (
        Reception_Id bigint not null,
        Reason_BER_ID bigint not null,
        primary key (Reception_Id, Reason_BER_ID)
    ) ENGINE=InnoDB;

    create table Released_Info (
        ReleasedInfo_ID bigint not null auto_increment,
        balance numeric(19,2),
        ci_commitment_amount numeric(19,2),
        CI_franchise bigint,
        CI_share numeric(19,2),
        ci_tariff_sum numeric(19,2),
        discount numeric(19,2),
        extra_global numeric(19,2),
        global_price numeric(19,2),
        is_global bit,
        out_of_commitment_sum numeric(19,2),
        patient_payable numeric(19,2),
        patient_share numeric(19,2),
        PI_franchise bigint,
        PI_share numeric(19,2),
        pi_tariff_sum numeric(19,2),
        release_date datetime,
        remaining_Type integer,
        settlement numeric(19,2),
        status_settlement integer,
        total_price numeric(19,2),
        globalService_id bigint,
        BER_DiscountBy_Id bigint not null,
        primary key (ReleasedInfo_ID)
    ) ENGINE=InnoDB;

    create table Request_Service (
        requestService_Id bigint not null auto_increment,
        count integer,
        Primary_Diagnosis varchar(255),
        reply_date datetime,
        reply_time varchar(255),
        Surgery_Date datetime,
        usage_Count integer,
        phisiotheropyMember_Id bigint,
        consultantSpeciality_Id bigint,
        personnel_id bigint,
        shift_Id bigint,
        service_id bigint,
        Request_Id bigint,
        primary key (requestService_Id)
    ) ENGINE=InnoDB;

    create table Request_Service_Setting (
        Service_Setting_Id bigint not null auto_increment,
        Request_Type integer,
        Base_Entity_Record_Id bigint,
        primary key (Service_Setting_Id)
    ) ENGINE=InnoDB;

    create table RoutineDrug_Inventory (
        Routine_Drug_ID bigint not null,
        inventory_id bigint not null
    ) ENGINE=InnoDB;

    create table Routine_Drug (
        Routine_Drug_ID bigint not null auto_increment,
        Personnel_ID bigint,
        Routine_Type_ID bigint not null,
        Medical_Center_ID bigint not null,
        primary key (Routine_Drug_ID)
    ) ENGINE=InnoDB;

    create table SIP_PROFICIENCY (
        SIP_PROFICIENCY_ID bigint not null auto_increment,
        PROFICIENCY_TYPE_ID bigint not null,
        SIP_ID bigint not null,
        SERVICE_INSURANCE_PRICE_ID bigint,
        primary key (SIP_PROFICIENCY_ID)
    ) ENGINE=InnoDB;

    create table SUB_ANTIBIOTIC (
        SUB_ANTIBIOTIC_ID bigint not null auto_increment,
        SENSITIVITY_TYPE integer,
        SUB_ANTIBIOTIC_ENTITY_ID bigint,
        SUB_EXAM_REPLY_ID bigint,
        primary key (SUB_ANTIBIOTIC_ID)
    ) ENGINE=InnoDB;

    create table SUB_EXAM_REPLY (
        SUB_EXAM_REPLY_ID bigint not null auto_increment,
        ANSWER varchar(255),
        COMPLEMENTARY_EXAM_INFO_ID bigint,
        UNIT_RECEPTION_SUB_SERVICE_ID bigint,
        KitType_Id bigint,
        unit_Id bigint,
        primary key (SUB_EXAM_REPLY_ID)
    ) ENGINE=InnoDB;

    create table SUB_LEACH (
        SUB_LEACH_ID bigint not null auto_increment,
        BER_LEACH_ID bigint,
        SUB_EXAM_REPLY_ID bigint,
        primary key (SUB_LEACH_ID)
    ) ENGINE=InnoDB;

    create table SUB_MICROBE (
        SUB_MICROBE_ID bigint not null auto_increment,
        BER_MICROBE_ID bigint,
        SUB_EXAM_REPLY_ID bigint,
        primary key (SUB_MICROBE_ID)
    ) ENGINE=InnoDB;

    create table SURGERY_INFO (
        SURGERY_INFO_ID bigint not null auto_increment,
        ANESTHESIA_END_DATE datetime,
        ANESTHESIA_END_TIME varchar(255),
        ANESTHESIA_START_DATE datetime,
        ANESTHESIA_START_TIME varchar(255),
        ANESTHESIA_SUM integer,
        ANESTHESIA_UNIT_SUM integer,
        DOCTOR_ORDER varchar(255),
        FINAL_DIAGNOSIS varchar(255),
        GAS_MATCH bit,
        HAS_PROBLEM bit,
        HAS_RISK_SATISFY bit,
        PROBLEM_DESC varchar(255),
        RECOVERY_END_DATE datetime,
        RECOVERY_END_TIME varchar(255),
        RECOVERY_START_DATE datetime,
        RECOVERY_START_TIME varchar(255),
        SATISFIED_PERSON varchar(255),
        SURGERY_DESC varchar(255),
        SURGERY_END_DATE datetime,
        SURGERY_END_TIME varchar(255),
        SURGERY_START_DATE datetime,
        SURGERY_START_TIME varchar(255),
        SURGERY_TYPE integer,
        STANDBY_ANESTHESIOLOGIST_ID bigint,
        ANESTHESIA_TYPE_ID bigint,
        UNIT_RECEPTION_ID bigint not null,
        ANESTHESIOLOGIST_ID bigint,
        primary key (SURGERY_INFO_ID)
    ) ENGINE=InnoDB;

    create table SURGERY_TEAM (
        SURGERY_TEAM_ID bigint not null auto_increment,
        COLLABORATION_PERCENT integer,
        CollaborationType_ID bigint,
        PERSONNEL_ID bigint,
        UNIT_RECEPTION_SERVICE_ID bigint not null,
        primary key (SURGERY_TEAM_ID)
    ) ENGINE=InnoDB;

    create table Service (
        service_id bigint not null auto_increment,
        abbreviation varchar(255),
        ANESTHESIA_UNIT integer,
        ANSWER_TYPE integer,
        confirm bit,
        description varchar(255),
        FOLLOWING_DAY integer,
        international_code varchar(255),
        KQTY numeric(19,2),
        MAX_HOSPITALIZATION integer,
        name varchar(255) not null,
        price bigint,
        REPLY_PERIOD integer,
        service_order integer,
        status bit,
        age_gender_limit_id bigint,
        service_group_id bigint not null,
        KTYPE_ID bigint,
        service_kind_id bigint not null,
        primary key (service_id)
    ) ENGINE=InnoDB;

    create table Service_Film (
        service_film_id bigint not null auto_increment,
        film_qty integer,
        film_size_id bigint not null,
        service_id bigint not null,
        primary key (service_film_id)
    ) ENGINE=InnoDB;

    create table Service_Insurance_Price (
        service_insurance_price_id bigint not null auto_increment,
        k_decrease bit,
        p_add_percent integer,
        bastary_diff_possible bit,
        bastary_Taerefe bigint not null,
        end_Date datetime,
        EXTRATAREFEPRICE bigint,
        insurance_percent numeric(19,2),
        MABLAGH_EZAFE_KESHIDAN bigint,
        MATERIAL_PAIEDBY_PATIENT bit,
        max_used_k integer,
        patient_percent numeric(19,2),
        sarpa_diff_possible bit,
        sarpa_Taerefe bigint not null,
        start_Date datetime not null,
        tahteNazar_diff_possible bit,
        tahteNazar_Taerefe bigint not null,
        service_group_id bigint,
        sub_group_id bigint,
        insurance_type_id bigint not null,
        service_top_id bigint,
        service_id bigint not null,
        primary key (service_insurance_price_id)
    ) ENGINE=InnoDB;

    create table Service_Pack (
        Service_Pack_Id integer not null auto_increment,
        Service_Id bigint not null,
        Package_Id bigint not null,
        primary key (Service_Pack_Id)
    ) ENGINE=InnoDB;

    create table Smear (
        transaction_id bigint not null auto_increment,
        IUD_status bit,
        LMP_Date datetime,
        adenocarcinoma integer,
        atypical integer,
        educational_notes varchar(255),
        endocervical integer,
        general_categorization integer,
        inflammatory_cells integer,
        organism integer,
        other integer,
        pregnit_status integer,
        reactive_changes integer,
        result integer,
        satisfactory integer,
        specimen_adequacy integer,
        specimen_processed integer,
        specimen_reject integer,
        specimen_type integer,
        squamous integer,
        unsatisfactory integer,
        unit_reception_service_id bigint,
        primary key (transaction_id)
    ) ENGINE=InnoDB;

    create table Sub_Service (
        subService_Id bigint not null auto_increment,
        abbreviation_Code varchar(255),
        DOCTOR_SHARE_PRICE bigint,
        sort integer,
        subService_Name varchar(255),
        SUBSERVICE_PRICE bigint,
        subService_Type integer,
        Service_Id bigint not null,
        primary key (subService_Id)
    ) ENGINE=InnoDB;

    create table Surgery_UnitRequest_Status (
        Id bigint not null auto_increment,
        register_date datetime,
        status bigint not null,
        unitRequest_id bigint not null,
        primary key (Id)
    ) ENGINE=InnoDB;

    create table System_Setting (
        System_Setting_Id bigint not null auto_increment,
        Holiday_Increase_Percent varchar(255),
        lab_Reception_Footer varchar(255),
        Inpatient_FileNumber varchar(255),
        Outpatient_FileNumber varchar(255),
        underControl_FileNumber varchar(255),
        Night_EndTime varchar(255),
        Night_Increase_Percent varchar(255),
        Night_StartTime varchar(255),
        SURGERY_ITEM_VIEW_TIME integer,
        SURGERY_LIST_PAGE_TIME_OUT integer,
        SURGERY_LIST_RECORD_NUMBERS integer,
        anesthesiaK_Id bigint,
        drugCalendar_Id bigint,
        labCalendar_Id bigint,
        primary key (System_Setting_Id)
    ) ENGINE=InnoDB;

    create table TECHNICIAN_TEAM (
        TECHNICIAN_TEAM_ID bigint not null auto_increment,
        COLLABORATION_TYPE_ID bigint,
        PERSONNEL_ID bigint,
        SURGERY_INFO_ID bigint,
        primary key (TECHNICIAN_TEAM_ID)
    ) ENGINE=InnoDB;

    create table Teryaj (
        Teryaj_Id bigint not null auto_increment,
        GCS varchar(255),
        Bed_Code varchar(255),
        Blood_Pressure varchar(255),
        Eye_Reflex varchar(255),
        Introducer_Center varchar(255),
        Nerve_Sign varchar(255),
        Observation varchar(255),
        Patient_Attendant_Property varchar(255),
        police varchar(255),
        is_policeInform bit,
        Pulse varchar(255),
        Pulse_Rate varchar(255),
        Respire_Rate varchar(255),
        is_surgeryBackground bit,
        Temprature varchar(255),
        Teryaj_Date datetime not null,
        Teryaj_Time varchar(255) not null,
        Patient_Id bigint not null,
        patientComingStatus_Id bigint not null,
        personnel_id bigint,
        patientGeneralStatus_Id bigint not null,
        patientMainComplaint_Id bigint not null,
        Priority_Id bigint,
        IncidentType_Id bigint not null,
        Reception_Id bigint,
        IncidentPlace_Id bigint not null,
        User_Id bigint not null,
        Center_Id bigint not null,
        primary key (Teryaj_Id)
    ) ENGINE=InnoDB;

    create table Teryaj_STATUS (
        ID bigint not null auto_increment,
        ReleasedType integer,
        Status_Date datetime not null,
        status_Type integer not null,
        transferred_Hospital varchar(255),
        Naja_Center_ID bigint,
        Teryaj_Id bigint,
        PATIENT_STATUS_ID bigint,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table UNIT_RECEPTION_SERVICE_STATUS (
        SERVICE_STATUS_ID bigint not null auto_increment,
        SAMPLE_CODE varchar(255),
        SERVICE_STATUS_DATE datetime,
        SERVICE_STATUS_TYPE integer,
        PROCEED_RESPONSIBLE_ID bigint,
        UNIT_RECEPTION_SERVICE_ID bigint,
        SAMPLING_RESPONSIBLE_ID bigint,
        primary key (SERVICE_STATUS_ID)
    ) ENGINE=InnoDB;

    create table UNIT_RECEPTION_STATUS (
        UNIT_RECEPTION_STATUS_ID bigint not null auto_increment,
        PRINT_DATE date,
        PRINT_STATUS smallint,
        RECEPTION_STATUS smallint,
        REPLY_DATE date,
        REPLY_STATUS smallint,
        SAMPLING_DATE date,
        SAMPLING_STATUS smallint,
        primary key (UNIT_RECEPTION_STATUS_ID)
    ) ENGINE=InnoDB;

    create table Unit_Reception (
        UnitReception_Id bigint not null auto_increment,
        conference_result varchar(255),
        creditDate datetime,
        dr_order varchar(255),
        pageNumber integer,
        prescriptionDate datetime,
        prescription_rest integer,
        prescription_rest_date datetime,
        PRINT_SERAIL bigint unique,
        release_date datetime,
        released bit,
        turn_Base integer,
        Turn_Date datetime,
        Turn_Number varchar(255),
        Turn_Time varchar(255),
        turn_Type integer,
        TYPE integer,
        Reception_Id bigint not null,
        admitted_request_id bigint,
        record_id bigint,
        personnelunit_Id bigint,
        unit_Id bigint not null,
        TurnShift_Id bigint,
        primary key (UnitReception_Id)
    ) ENGINE=InnoDB;

    create table Unit_Reception_Service_Film (
        unit_reception_service_film_id bigint not null auto_increment,
        filmQty bigint,
        unit_reception_service_id bigint,
        ber_filmSize_id bigint,
        primary key (unit_reception_service_film_id)
    ) ENGINE=InnoDB;

    create table Unit_Request (
        Request_Id bigint not null auto_increment,
        Request_Code bigint,
        Request_Date datetime,
        Request_Desc varchar(255),
        Request_Priority integer,
        Request_Time varchar(255),
        Request_Type integer,
        personnel_id bigint,
        UnitReception_Id bigint,
        primary key (Request_Id)
    ) ENGINE=InnoDB;

    create table Warehouse_Counting (
        Warehouse_Counting_ID bigint not null auto_increment,
        Description varchar(255),
        Register_Date datetime,
        Warehouse_Counting_Date datetime,
        User_ID bigint,
        Center_ID bigint,
        BER_Warehouse_ID bigint,
        primary key (Warehouse_Counting_ID)
    ) ENGINE=InnoDB;

    create table Warehouse_Counting_Item (
        Warehouse_Counting_Item_ID bigint not null auto_increment,
        Count1_Qty bigint,
        Count2_Qty bigint,
        Count3_Qty bigint,
        WarehouseCounting_ID bigint not null,
        Inventory_Id bigint,
        SubGroup_Id bigint,
        inventoryTransaction_Id bigint,
        primary key (Warehouse_Counting_Item_ID)
    ) ENGINE=InnoDB;

    create table Warehouse_Transfer (
        Warehouse_Transfer_ID bigint not null auto_increment,
        Warehouse_Transfer_Date datetime,
        Warehouse_Transfer_Reason varchar(255),
        transferType integer,
        SourceWarehouse_BER_ID bigint,
        TargetWarehouse_BER_ID bigint,
        CenterUnit_BER_ID bigint,
        User_ID bigint,
        OutOrderReason_BER_ID bigint,
        primary key (Warehouse_Transfer_ID)
    ) ENGINE=InnoDB;

    create table Warehouse_Transfer_Item (
        Warehouse_Transfer_Item_ID bigint not null auto_increment,
        Qty float,
        export_invtra_id bigint,
        Warehouse_Transfer_ID bigint,
        import_invtra_id bigint,
        Inventory_Id bigint,
        primary key (Warehouse_Transfer_Item_ID)
    ) ENGINE=InnoDB;

    create table answers (
        answer_id bigint not null auto_increment,
        answer_code varchar(255) not null,
        answer_description varchar(255) not null,
        answer_name varchar(255) not null,
        service_id bigint,
        primary key (answer_id)
    ) ENGINE=InnoDB;

    create table base_entity (
        entity_id bigint not null,
        EDITABLE bit,
        entity_name varchar(200) not null,
        parent_entity_id bigint,
        primary key (entity_id)
    ) ENGINE=InnoDB;

    create table base_entity_record (
        record_id bigint not null auto_increment,
        record_enabled bit not null,
        HELPER integer,
        record_code varchar(100) not null,
        record_description varchar(200),
        record_name varchar(200) not null,
        entity_id bigint,
        parent_record_id bigint,
        primary key (record_id),
        unique (entity_id, record_name),
        unique (entity_id, record_code)
    ) ENGINE=InnoDB;

    create table bedridden (
        bedridden_Id bigint not null auto_increment,
        admission_no bigint,
        prescription_status integer not null,
        register_date datetime not null,
        register_time varchar(255) not null,
        medical_center_request_id bigint,
        bedridden_account_id bigint,
        center_id bigint,
        reception_id bigint,
        primary key (bedridden_Id)
    ) ENGINE=InnoDB;

    create table bedridden_account (
        bedridden_account_Id bigint not null auto_increment,
        compound_technical_cost numeric(19,2),
        difference_cost numeric(19,2),
        discount numeric(19,2),
        free_cost numeric(19,2),
        friendly_cost numeric(19,2),
        insu_cost numeric(19,2),
        organ_cost numeric(19,2),
        patient_cost numeric(19,2),
        technical_cost numeric(19,2),
        totalCost numeric(19,2) not null,
        total_pay numeric(19,2),
        primary key (bedridden_account_Id)
    ) ENGINE=InnoDB;

    create table bedridden_item (
        bedridden_item_Id bigint not null auto_increment,
        cost double precision,
        difference_cost double precision,
        free_cost bit,
        friendly_cost bit,
        not_show_in_list bit,
        requested_quantity float,
        sell_quantity double precision,
        total_cost double precision,
        unit_reception_service bigint,
        bedridden_id bigint not null,
        sub_group_superseded bigint,
        ware_house bigint,
        inventory_transaction_id bigint not null,
        sub_inventory_id bigint,
        sub_group bigint,
        inventory_id bigint not null,
        primary key (bedridden_item_Id),
        unique (inventory_transaction_id)
    ) ENGINE=InnoDB;

    create table cash (
        transaction_id bigint not null auto_increment,
        branch_id integer,
        branch_name varchar(255),
        cash_Type integer,
        doc_date datetime,
        doc_no varchar(255),
        group_ids bigint,
        has_payed bit,
        payed_date datetime,
        print_counter integer,
        transaction_amount bigint,
        transaction_date datetime,
        transaction_status varchar(255),
        transaction_type_id varchar(255),
        transaction_time varchar(255),
        unit_category integer,
        bank_id bigint,
        casher_id bigint,
        reception_id bigint,
        payment_type_id bigint,
        UnitReception_Id bigint,
        unit_reception_service_id bigint,
        releaseInfo_id bigint,
        primary key (transaction_id)
    ) ENGINE=InnoDB;

    create table center (
        center_id bigint not null auto_increment,
        address varchar(150),
        city varchar(50),
        country varchar(100),
        postal_code varchar(15),
        province varchar(100),
        center_code varchar(100) not null unique,
        center_name varchar(200) not null unique,
        email varchar(255),
        center_enabled bit not null,
        fax_number varchar(100),
        phone_number varchar(100),
        centerProvince_Id bigint,
        centerKind_Id bigint,
        centerOwnerKind_Id bigint,
        primary key (center_id)
    ) ENGINE=InnoDB;

    create table center_unit (
        unit_id bigint not null auto_increment,
        unit_enabled bit not null,
        INPATIENT bit,
        OUTPATIENT bit,
        RESERVATION bit,
        unit_name varchar(255) not null,
        center_id bigint not null,
        unit_type bigint not null,
        personnel_id bigint,
        primary key (unit_id),
        unique (unit_name, center_id)
    ) ENGINE=InnoDB;

    create table change_unit (
        change_unit_id bigint not null auto_increment,
        major_quantity numeric(19,2) not null,
        minor_quantity numeric(19,2) not null,
        inventory_id bigint not null,
        minor_unit_code bigint not null,
        primary key (change_unit_id)
    ) ENGINE=InnoDB;

    create table compound_technical_indicate (
        compound_technical_indicate_id bigint not null auto_increment,
        primary_matter integer not null,
        product_type integer not null,
        register_date datetime not null,
        technical_cost numeric(19,2) not null,
        primary key (compound_technical_indicate_id)
    ) ENGINE=InnoDB;

    create table disease (
        disease_id bigint not null auto_increment,
        record_id bigint,
        unit_reception_id bigint,
        primary key (disease_id)
    ) ENGINE=InnoDB;

    create table gastric (
        gastric_id bigint not null auto_increment,
        activity smallint not null,
        astrophy smallint not null,
        chronic_gastritis smallint not null,
        diagnosis varchar(1000) not null,
        dysplasia smallint not null,
        erosion smallint not null,
        granuloma_formation smallint not null,
        helicobacter_pylori smallint not null,
        hemorrhage smallint not null,
        intestinal_metaplasia smallint not null,
        lymph_follicles smallint not null,
        macro_description varchar(1000) not null,
        micro_description varchar(1000) not null,
        mucosal smallint not null,
        unit_reception_service_id bigint not null,
        primary key (gastric_id)
    ) ENGINE=InnoDB;

    create table group_service_unit (
        allSubsets bit,
        unit_id bigint,
        record_id bigint,
        primary key (record_id, unit_id)
    ) ENGINE=InnoDB;

    create table hai_report (
        hai_report_id bigint not null auto_increment,
        confluent_necrosis smallint not null,
        focal_lytic_necrosis smallint not null,
        modified_hai_staging smallint not null,
        piecemeal_necrosis smallint not null,
        portal_inflammation smallint not null,
        unit_reception_service_id bigint not null,
        primary key (hai_report_id)
    ) ENGINE=InnoDB;

    create table immunohistochemistry (
        immunohistochemistry_id bigint not null auto_increment,
        dx varchar(1000) not null,
        clinical_data varchar(1000) not null,
        description varchar(1000) not null,
        negative varchar(1000),
        no varchar(100) not null,
        outside_histopathologic_dx varchar(1000) not null,
        positive varchar(1000),
        sample varchar(1000) not null,
        unit_reception_service_id bigint not null,
        primary key (immunohistochemistry_id)
    ) ENGINE=InnoDB;

    create table insur_disk_insur (
        insur_disk_id bigint not null,
        ber_id bigint not null
    ) ENGINE=InnoDB;

    create table insur_disk_top_service (
        insur_disk_id bigint not null,
        ber_id bigint not null
    ) ENGINE=InnoDB;

    create table insurance_diskette (
        ID bigint not null auto_increment,
        content blob,
        creation_date datetime,
        drId varchar(255),
        file_name varchar(255),
        file_type integer,
        from_date datetime,
        to_date datetime,
        primary key (ID)
    ) ENGINE=InnoDB;

    create table insurance_per_grp_srv (
        ipg_id bigint not null auto_increment,
        bimar_bastary double precision not null,
        bimar_sarpa double precision not null,
        bimar_tahte_nazar double precision not null,
        bime_bastary double precision not null,
        bime_sarpa double precision not null,
        bime_tahte_nazar double precision not null,
        difference_payer integer,
        end_date datetime,
        gharardad_bastary double precision not null,
        gharardad_sarpa double precision not null,
        gharardad_tahte_nazar double precision not null,
        start_date datetime not null,
        technical_Indicator_payer integer,
        yarane_bastary double precision not null,
        yarane_sarpa double precision not null,
        yarane_tahte_nazar double precision not null,
        insurance_id bigint not null,
        top_service_id bigint not null,
        service_group_id bigint not null,
        primary key (ipg_id)
    ) ENGINE=InnoDB;

    create table insurance_per_top_srv (
        ipts_id bigint not null auto_increment,
        bimar_bastary double precision not null,
        bimar_sarpa double precision not null,
        bimar_tahte_nazar double precision not null,
        bime_bastary double precision not null,
        bime_sarpa double precision not null,
        bime_tahte_nazar double precision not null,
        difference_cost bit,
        difference_cost_bimar double precision,
        difference_cost_bime double precision,
        difference_cost_gharardad double precision,
        difference_cost_yaraneh double precision,
        difference_payer integer,
        end_date datetime,
        gharardad_bastary double precision not null,
        gharardad_sarpa double precision not null,
        gharardad_tahte_nazar double precision not null,
        lab_reception_cost bit,
        lab_reception_cost_bimar double precision,
        lab_reception_cost_bime double precision,
        lab_reception_cost_gharardad double precision,
        lab_reception_cost_yaraneh double precision,
        start_date datetime not null,
        technical_cost bit,
        technical_cost_bimar double precision,
        technical_cost_bime double precision,
        technical_cost_gharardad double precision,
        technical_cost_yaraneh double precision,
        technical_Indicator_payer integer,
        yarane_bastary double precision not null,
        yarane_sarpa double precision not null,
        yarane_tahte_nazar double precision not null,
        top_service_id bigint not null,
        insurance_id bigint not null,
        primary key (ipts_id)
    ) ENGINE=InnoDB;

    create table insurance_percent (
        insurance_percent_id bigint not null auto_increment,
        bimar_bastary integer not null,
        bimar_sarpa integer not null,
        bimar_tahte_nazar integer not null,
        bime_bastary integer not null,
        bime_sarpa integer not null,
        bime_tahte_nazar integer not null,
        difference_payer integer,
        end_date datetime,
        gharardad_bastary double precision not null,
        gharardad_sarpa double precision not null,
        gharardad_tahte_nazar double precision not null,
        start_date datetime not null,
        technical_Indicator_payer integer,
        yarane_bastary integer not null,
        yarane_sarpa integer not null,
        yarane_tahte_nazar integer not null,
        insurance_id bigint not null,
        primary key (insurance_percent_id)
    ) ENGINE=InnoDB;

    create table insurance_percent_service (
        insurance_percent_service_id bigint not null auto_increment,
        bimar_bastary double precision not null,
        bimar_sarpa double precision not null,
        bimar_tahte_nazar double precision not null,
        bime_bastary double precision not null,
        bime_sarpa double precision not null,
        bime_tahte_nazar double precision not null,
        difference_payer integer,
        end_date datetime,
        gharardad_bastary double precision not null,
        gharardad_sarpa double precision not null,
        gharardad_tahte_nazar double precision not null,
        start_date datetime not null,
        technical_Indicator_payer integer,
        yarane_bastary double precision not null,
        yarane_sarpa double precision not null,
        yarane_tahte_nazar double precision not null,
        service_id bigint not null,
        insurance_id bigint not null,
        primary key (insurance_percent_service_id)
    ) ENGINE=InnoDB;

    create table insurance_unit (
        insurance_unit_id bigint not null auto_increment,
        medical_center_unit_id bigint not null,
        insurance_id bigint not null,
        primary key (insurance_unit_id)
    ) ENGINE=InnoDB;

    create table inventory (
        inventory_id bigint not null auto_increment,
        attach_possible bit not null,
        barcode varchar(255),
        build_status integer,
        compound_amount numeric(19,2),
        compound_qty double precision,
        compound_type integer,
        deliverable_toward bit not null,
        dosage varchar(255),
        enabled bit not null,
        generic_code varchar(255),
        generic_name varchar(255),
        has_conflict bit not null,
        has_multi_unit bit not null,
        has_replaceable bit not null,
        has_similar bit not null,
        has_special_license bit,
        has_stock_management bit not null,
        has_sub_group bit not null,
        insurance_coverage bit not null,
        price_type_code integer not null,
        quantity double precision,
        review_by_batch bit not null,
        sell_with_prescription bit not null,
        special_code integer,
        trademark_name1 varchar(255),
        trademark_name2 varchar(255),
        trademark_name3 varchar(255),
        used_Type bit,
        service_id bigint not null,
        sell_unit_code bigint,
        group_code bigint,
        major_unit_code bigint not null,
        shape_code bigint not null,
        primary key (inventory_id),
        unique (service_id)
    ) ENGINE=InnoDB;

    create table inventory_attach (
        inventory_attach_id bigint not null auto_increment,
        attach_data blob,
        attach_content_type varchar(255),
        attach_name varchar(255) not null,
        description varchar(255),
        inventory_id bigint not null,
        primary key (inventory_attach_id)
    ) ENGINE=InnoDB;

    create table inventory_compound (
        inventory_compound_id bigint not null auto_increment,
        inventory_quantity numeric(19,2) not null,
        used_inventory_id bigint not null,
        inventory_id bigint not null,
        primary key (inventory_compound_id)
    ) ENGINE=InnoDB;

    create table inventory_conflict (
        inventory_conflict_id bigint not null auto_increment,
        description varchar(255),
        inventory_id bigint not null,
        inventory_conflict_fid bigint not null,
        conflict_reason_code bigint,
        primary key (inventory_conflict_id)
    ) ENGINE=InnoDB;

    create table inventory_management (
        inventory_management_id bigint not null auto_increment,
        inventory_management_type integer,
        lot_size numeric(19,2),
        max_order numeric(19,2),
        max_sotck numeric(19,2),
        min_order numeric(19,2),
        min_stock numeric(19,2),
        order_point numeric(19,2),
        order_policy integer,
        provide_time integer,
        inventory_id bigint not null,
        primary key (inventory_management_id),
        unique (inventory_id)
    ) ENGINE=InnoDB;

    create table inventory_similar (
        inventory_similar_id bigint not null auto_increment,
        inventory_id bigint not null,
        inventory_similar_code bigint not null,
        primary key (inventory_similar_id)
    ) ENGINE=InnoDB;

    create table inventory_transaction (
        inventory_transaction_id bigint not null auto_increment,
        buying_price double precision,
        consumer_price double precision,
        documentNo varchar(255),
        document_type integer,
        inventory_quantity float,
        operation_type integer not null,
        status integer not null,
        transaction_date datetime,
        ware_house bigint,
        sub_group_id bigint,
        user_id bigint,
        inventory_id bigint not null,
        inventory_detail_id bigint,
        primary key (inventory_transaction_id)
    ) ENGINE=InnoDB;

    create table inventory_transaction_detail (
        inventory_detail_id bigint not null auto_increment,
        bach_no varchar(255),
        buying_price double precision,
        consumer_price double precision,
        expire_date datetime,
        expire_day integer,
        expire_month integer,
        expire_year integer,
        produce_date datetime,
        quantity float,
        transaction_date datetime,
        primary key (inventory_detail_id)
    ) ENGINE=InnoDB;

    create table login_history (
        login_id bigint not null auto_increment,
        login_date datetime not null,
        logoff_date datetime not null,
        user_id bigint,
        primary key (login_id)
    ) ENGINE=InnoDB;

    create table manager_Group (
        manager_group_id bigint not null auto_increment,
        manager_Group_name varchar(200) not null unique,
        manager_group_parent_id bigint,
        primary key (manager_group_id)
    ) ENGINE=InnoDB;

    create table manager_Group_role (
        manager_group_id bigint not null,
        role_id bigint not null,
        primary key (manager_group_id, role_id)
    ) ENGINE=InnoDB;

    create table manager_Group_service_manager (
        manager_group_id bigint not null,
        service_manager_id bigint not null,
        primary key (manager_group_id, service_manager_id)
    ) ENGINE=InnoDB;

    create table medical_center_responsibles (
        center_responsible_id bigint not null auto_increment,
        appointment_date datetime not null,
        position_id bigint not null,
        center_Id bigint not null,
        personnel_id bigint not null,
        primary key (center_responsible_id),
        unique (personnel_id, position_id, appointment_date)
    ) ENGINE=InnoDB;

    create table outpatient (
        outpatient_id bigint not null auto_increment,
        otc bit not null,
        admission_no bigint,
        difference_payer integer,
        has_confirmation bit,
        insu_valid_date datetime,
        page_no integer,
        prescription_date datetime,
        prescription_status integer not null,
        register_date datetime not null,
        register_time varchar(255) not null,
        request_type integer,
        technical_Indicator_payer integer,
        externalDr_id bigint,
        reception_id bigint,
        doctor_id bigint,
        user_id bigint not null,
        patient_id bigint,
        cash_id bigint,
        outpatient_account_id bigint,
        primary key (outpatient_id)
    ) ENGINE=InnoDB;

    create table outpatient_CTI (
        Op_CTI_id bigint not null auto_increment,
        CTI_id bigint not null,
        outpatient_id bigint not null,
        primary key (Op_CTI_id)
    ) ENGINE=InnoDB;

    create table outpatient_account (
        outpatient_account_id bigint not null auto_increment,
        compound_technical_cost numeric(19,2),
        difference_cost numeric(19,2),
        discount numeric(19,2),
        free_cost numeric(19,2),
        friendly_cost numeric(19,2),
        insu_cost numeric(19,2),
        organ_cost numeric(19,2),
        patient_cost numeric(19,2),
        SPE_LICENSE_COST numeric(19,2),
        technical_cost numeric(19,2),
        totalCost numeric(19,2) not null,
        total_pay numeric(19,2),
        primary key (outpatient_account_id)
    ) ENGINE=InnoDB;

    create table outpatient_item (
        outpatient_item_id bigint not null auto_increment,
        cost bigint not null,
        difference_cost bigint,
        free_cost bit,
        friendly_cost bit,
        FRIENDLYCOST_VALUE bigint,
        INSURANCE_COST bigint,
        not_show_in_list bit,
        PATIENT_COST bigint,
        quantity double precision,
        sell_quantity double precision,
        SPECIAL_LICENSE bit,
        SPE_LICENSE_COST bigint,
        inventory_id bigint not null,
        sub_group_superseded_id bigint,
        sub_inventory_id bigint,
        outpatient_id bigint not null,
        ware_house bigint not null,
        inventory_transaction_id bigint not null,
        sub_group_id bigint,
        primary key (outpatient_item_id),
        unique (inventory_transaction_id)
    ) ENGINE=InnoDB;

    create table outpatient_max_drug_amount (
        id bigint not null auto_increment,
        max_amount numeric(19,2) not null,
        proficiency_id bigint not null,
        primary key (id)
    ) ENGINE=InnoDB;

    create table patient_allergy (
        patient_allergy_id bigint not null auto_increment,
        allergy_id bigint not null,
        patient_id bigint not null,
        primary key (patient_allergy_id),
        unique (patient_id, allergy_id)
    ) ENGINE=InnoDB;

    create table patient_base_disease (
        patient_base_disease_id bigint not null auto_increment,
        patient_id bigint not null,
        base_disease_id bigint not null,
        primary key (patient_base_disease_id),
        unique (patient_id, base_disease_id)
    ) ENGINE=InnoDB;

    create table patient_drug_use (
        patient_drug_use_id bigint not null auto_increment,
        patient_id bigint not null,
        drug_id bigint not null,
        primary key (patient_drug_use_id),
        unique (patient_id, drug_id)
    ) ENGINE=InnoDB;

    create table patient_family_disease (
        patient_family_disease_id bigint not null auto_increment,
        patient_id bigint not null,
        family_disease_id bigint not null,
        primary key (patient_family_disease_id),
        unique (patient_id, family_disease_id)
    ) ENGINE=InnoDB;

    create table patient_special_disease (
        patient_special_disease_Id bigint not null auto_increment,
        special_disease_id bigint not null,
        patient_id bigint not null,
        primary key (patient_special_disease_Id),
        unique (patient_id, special_disease_id)
    ) ENGINE=InnoDB;

    create table personnel (
        personnel_id bigint not null auto_increment,
        f_name varchar(255) not null,
        l_name varchar(255) not null,
        address varchar(255),
        birth_date datetime,
        cell_phone integer,
        council varchar(255),
        email varchar(255),
        employ_date datetime,
        person_enabled bit not null,
        father_name varchar(255),
        identify_number integer,
        midwife_number varchar(255),
        national_code varchar(255) not null,
        personnel_code varchar(255) unique,
        phone_number integer,
        specialized bit,
        gender_id bigint,
        employ_kind_id bigint,
        educational_level_id3 bigint,
        center_id bigint,
        status_id bigint,
        grade_id bigint,
        proficiency_id bigint,
        job_id bigint,
        marriage_status_id bigint,
        personnel_type_id bigint,
        primary key (personnel_id)
    ) ENGINE=InnoDB;

    create table personnel_unit_present (
        personnel_unit_present_iId bigint not null auto_increment,
        personnel_reception_qty integer,
        present_date datetime,
        usual_reception_qty integer,
        presentType_id bigint,
        shift_Id bigint,
        personnelunit_id bigint,
        primary key (personnel_unit_present_iId)
    ) ENGINE=InnoDB;

    create table purchase_invoice (
        purchase_invoice_id bigint not null auto_increment,
        delivery_date datetime not null,
        invoice_date datetime not null,
        invoice_no varchar(255) not null,
        registery_date datetime,
        user_id bigint not null,
        ware_house bigint not null,
        purchase_order_id bigint,
        supplier_id bigint not null,
        primary key (purchase_invoice_id)
    ) ENGINE=InnoDB;

    create table purchase_invoice_item (
        purchase_invoice_item_id bigint not null auto_increment,
        batch_no bigint,
        consumer_price float,
        expire_date datetime not null,
        expire_day integer,
        expire_month integer,
        expire_year integer,
        is_sample bit,
        major_purchase_quantity float,
        produce_date datetime,
        purchase_price float,
        purchase_quantity float not null,
        change_unit bigint not null,
        subGroup_id bigint,
        inventory_id bigint not null,
        purchase_invoice_id bigint not null,
        inventory_transaction_id bigint not null,
        primary key (purchase_invoice_item_id),
        unique (inventory_transaction_id)
    ) ENGINE=InnoDB;

    create table purchase_order (
        purchase_request_id bigint not null auto_increment,
        need_date datetime,
        order_date datetime not null,
        medical_center_id bigint not null,
        ware_house bigint not null,
        user_id bigint not null,
        supplier_id bigint not null,
        priority_id bigint,
        primary key (purchase_request_id)
    ) ENGINE=InnoDB;

    create table purchase_order_item (
        purchase_order_item_id bigint not null auto_increment,
        major_ordered_quantity float,
        order_quantity float not null,
        inventory_id bigint not null,
        purchase_order_id bigint not null,
        change_unit bigint not null,
        primary key (purchase_order_item_id)
    ) ENGINE=InnoDB;

    create table purchase_request (
        purchase_request_id bigint not null auto_increment,
        request_date datetime not null,
        ware_house bigint not null,
        medical_center_id bigint not null,
        user_id bigint not null,
        priority_id bigint,
        primary key (purchase_request_id)
    ) ENGINE=InnoDB;

    create table purchase_request_item (
        purchase_request_item_id bigint not null auto_increment,
        major_requested_quantity float,
        request_quantity float not null,
        request_status integer not null,
        change_unit bigint not null,
        purchase_request_id bigint not null,
        purchase_order_id bigint,
        inventory_id bigint not null,
        primary key (purchase_request_item_id)
    ) ENGINE=InnoDB;

    create table requestService_subService (
        id bigint not null auto_increment,
        requestService_Id bigint not null,
        sub_servpce_id bigint not null,
        primary key (id)
    ) ENGINE=InnoDB;

    create table reservation (
        reservation_id bigint not null auto_increment,
        fragnet_personnel_reserve_qty integer not null,
        fragnet_usual_reserve_qty integer not null,
        introducion_date datetime,
        introducion_Number varchar(255),
        referal_date datetime,
        request_date integer,
        reserve_date datetime not null,
        reserve_time varchar(255) not null,
        unit_id bigint not null,
        organ_id bigint,
        shift_id bigint not null,
        personnel_unit_id bigint not null,
        personnel_type bigint not null,
        patient_id bigint,
        primary key (reservation_id)
    ) ENGINE=InnoDB;

    create table revoke_invoice (
        revoke_invoice_id bigint not null auto_increment,
        register_date datetime,
        revoke_date datetime not null,
        revoke_no varchar(255) not null,
        medical_center_id bigint not null,
        purchase_invoice_id bigint,
        user_id bigint not null,
        supplier_id bigint not null,
        primary key (revoke_invoice_id)
    ) ENGINE=InnoDB;

    create table revoke_invoice_item (
        revoke_invoice_item_id bigint not null auto_increment,
        bach_no varchar(255),
        revoke_quantity float not null,
        revoke_reason varchar(255) not null,
        revoke_invoice_id bigint not null,
        inventory_transaction_id bigint not null,
        inventory_id bigint not null,
        primary key (revoke_invoice_item_id),
        unique (inventory_transaction_id)
    ) ENGINE=InnoDB;

    create table role (
        role_id bigint not null auto_increment,
        description varchar(64),
        role_name varchar(200) not null,
        center_id bigint not null,
        primary key (role_id),
        unique (role_name, center_id)
    ) ENGINE=InnoDB;

    create table role_unit (
        role_id bigint not null,
        unit_id bigint not null,
        primary key (role_id, unit_id)
    ) ENGINE=InnoDB;

    create table role_warehouse (
        role_warehouse_id bigint not null auto_increment,
        ware_house bigint not null,
        role_id bigint not null,
        primary key (role_warehouse_id)
    ) ENGINE=InnoDB;

    create table room (
        room_id bigint not null auto_increment,
        room_code varchar(255) not null,
        medical_center_unit_id bigint,
        room_type_id bigint,
        primary key (room_id)
    ) ENGINE=InnoDB;

    create table service_detail (
        service_detail_id bigint not null auto_increment,
        from_date datetime not null,
        price bigint not null,
        reg_date datetime not null,
        reg_time time not null,
        to_date datetime,
        subGroup_id bigint,
        service_id bigint,
        user_id bigint not null,
        primary key (service_detail_id)
    ) ENGINE=InnoDB;

    create table service_manager (
        service_manager_id bigint not null auto_increment,
        service_manager_method varchar(200) unique,
        service_manager_name varchar(200) not null,
        task_id bigint not null,
        primary key (service_manager_id)
    ) ENGINE=InnoDB;

    create table service_manager_role (
        service_manager_id bigint not null,
        role_id bigint not null,
        primary key (service_manager_id, role_id)
    ) ENGINE=InnoDB;

    create table service_unit (
        service_id bigint,
        unit_id bigint,
        primary key (service_id, unit_id)
    ) ENGINE=InnoDB;

    create table special_prescription (
        special_prescription_id bigint not null auto_increment,
        special_quantity numeric(19,2) not null,
        inventory_id bigint not null,
        special_type_code bigint not null,
        primary key (special_prescription_id)
    ) ENGINE=InnoDB;

    create table sub_group (
        sub_group_id bigint not null auto_increment,
        code varchar(255) unique,
        description varchar(255) not null,
        inventory_id bigint not null,
        primary key (sub_group_id),
        unique (inventory_id, code)
    ) ENGINE=InnoDB;

    create table supplier (
        supplier_id bigint not null auto_increment,
        address varchar(255),
        description varchar(255),
        distributer bit not null,
        email varchar(255),
        fax varchar(255),
        provider bit not null,
        reg_no varchar(255),
        responsible_name varchar(255),
        seller bit not null,
        status integer not null,
        supplier_name varchar(255) not null,
        tel varchar(255),
        web_site varchar(255),
        primary key (supplier_id)
    ) ENGINE=InnoDB;

    create table technical_indicator (
        technical_indicator_id bigint not null auto_increment,
        calculation_method integer,
        max_cost numeric(19,2) not null,
        min_cost numeric(19,2) not null,
        percent integer,
        prescription_type varchar(255) not null,
        register_date datetime not null,
        technical_cost numeric(19,2),
        primary key (technical_indicator_id)
    ) ENGINE=InnoDB;

    create table top_service_unit (
        allSubsets bit,
        unit_id bigint,
        record_id bigint,
        primary key (record_id, unit_id)
    ) ENGINE=InnoDB;

    create table unit_reception_service (
        unit_reception_service_id bigint not null auto_increment,
        answer_date datetime,
        BALON_NO smallint,
        bed_number integer,
        cancel bit,
        CENTER_SHARE_PRICE bigint,
        COMPLEMENTARY_INSURANCE_K_QTY smallint,
        complementary_service_price bigint,
        consultation_status integer,
        credit_date datetime,
        discount_share bigint,
        DOCTOR_SHARE_PRICE bigint,
        hospital_name varchar(255),
        INSURANCE_PERCENT double precision,
        insurance_price_share bigint,
        mablaghEzafeKeshidan bigint,
        MATERIAL_AMOUNT bigint,
        MATERIAL_DIFF bigint,
        materialPaiedByPatient bit,
        not_send_to_insurance bit,
        page_number integer,
        PATIENT_PERCENT double precision,
        patient_price_share bigint,
        payment_amount bigint,
        prepayment_share bigint,
        prescription_date datetime,
        PRIMARY_INSURANCE_K_QTY smallint,
        REAL_MATERIAL_AMOUNT bigint,
        released bit,
        request_status bit,
        request_type integer,
        result varchar(255),
        room_number integer,
        sample_code varchar(255),
        sample_date datetime,
        sample_number varchar(255),
        sample_QTY integer,
        sample_time varchar(255),
        service_Category integer,
        service_date datetime,
        service_price bigint,
        service_quantity integer,
        service_status integer,
        STENT_NO smallint,
        teeth_number varchar(255),
        used_material_amount numeric(19,2),
        VESSEL_NO smallint,
        yaraneh_price_share bigint,
        internal_dr_id bigint,
        SUB_SERVICE_ID bigint,
        COMPLE_INSURANCE_TYPE_ID bigint,
        dr_assistance_id bigint,
        unit_reception_id bigint not null,
        record_id bigint,
        SURGERY_INFO_ID bigint,
        subGroup bigint,
        Store_Type_Id bigint,
        LAB_ID bigint,
        PRIM_INSURANCE_TYPE_ID bigint,
        inventory_transaction bigint,
        external_dr_id bigint,
        body_id bigint,
        personnel_unit_id bigint,
        unit_Id bigint,
        service_id bigint,
        teeth_side_id bigint,
        primary key (unit_reception_service_id)
    ) ENGINE=InnoDB;

    create table urs_sub_service (
        id bigint not null auto_increment,
        result varchar(255),
        sub_servpce_id bigint not null,
        unit_reception_service_id bigint not null,
        primary key (id)
    ) ENGINE=InnoDB;

    create table user_role (
        user_id bigint not null,
        role_id bigint not null,
        primary key (user_id, role_id)
    ) ENGINE=InnoDB;

    create table users (
        user_id bigint not null auto_increment,
        account_expired bit,
        account_locked bit not null,
        address varchar(150),
        city varchar(50),
        country varchar(100),
        postal_code varchar(15),
        province varchar(100),
        cell_number varchar(100),
        credentials_expired bit,
        email varchar(255),
        employee_code varchar(50),
        account_enabled bit not null,
        fax_number varchar(100),
        first_name varchar(50),
        last_name varchar(100) not null,
        national_code varchar(15) unique,
        pass_expire_period integer,
        password varchar(255) not null,
        password_hint varchar(255),
        phone_number varchar(100),
        system_admin bit,
        username varchar(100) not null,
        valid_from_date datetime not null,
        valid_through_date datetime,
        version integer,
        center_id bigint not null,
        primary key (user_id),
        unique (username, center_id)
    ) ENGINE=InnoDB;

    alter table ANESTHESIA_CALC_METHOD
        add index INSURANCE_TYPE_BER_FK (INSURANCE_TYPE_BER_ID),
        add constraint INSURANCE_TYPE_BER_FK
        foreign key (INSURANCE_TYPE_BER_ID)
        references base_entity_record (record_id);

    alter table ANESTHESIA_CALC_METHOD
        add index K_ANESTHASIA_BER_FK (K_ANESTHASIA_BER_ID),
        add constraint K_ANESTHASIA_BER_FK
        foreign key (K_ANESTHASIA_BER_ID)
        references base_entity_record (record_id);

    alter table ANTIBIOTIC
        add index FKD3D2E4689E596304 (ANTIBIOTIC_ENTITY_ID),
        add constraint FKD3D2E4689E596304
        foreign key (ANTIBIOTIC_ENTITY_ID)
        references base_entity_record (record_id);

    alter table ANTIBIOTIC
        add index FKD3D2E468AEB81DCB (EXAM_REPLY_ID),
        add constraint FKD3D2E468AEB81DCB
        foreign key (EXAM_REPLY_ID)
        references EXAM_REPLY (EXAM_REPLY_ID);

    alter table BIRTH_CERTIFICATION
        add index CER_INFANT_INFO_FK (INFANT_INFO_ID),
        add constraint CER_INFANT_INFO_FK
        foreign key (INFANT_INFO_ID)
        references INFANT_INFO (ID);

    alter table BIRTH_CERTIFICATION
        add index CERTIFICATION_ISSUER_FK (CERTIFICATION_ISSUER_ID),
        add constraint CERTIFICATION_ISSUER_FK
        foreign key (CERTIFICATION_ISSUER_ID)
        references personnel (personnel_id);

    alter table BREAKFAST
        add index FK34FFA9BBC2B6C6D3 (BER_Breakfast_ID),
        add constraint FK34FFA9BBC2B6C6D3
        foreign key (BER_Breakfast_ID)
        references base_entity_record (record_id);

    alter table BREAKFAST
        add index FK34FFA9BBF7897DC1 (food_Schedule_ID),
        add constraint FK34FFA9BBF7897DC1
        foreign key (food_Schedule_ID)
        references Food_Schedule (food_Schedule_ID);

    alter table Bed_Info
        add index fk_BED_ROOM (room_id),
        add constraint fk_BED_ROOM
        foreign key (room_id)
        references room (room_id);

    alter table CB_CONTACT
        add index FK18EF9020FA2A8BC7 (PATIENT_ID),
        add constraint FK18EF9020FA2A8BC7
        foreign key (PATIENT_ID)
        references Patient (Patient_Id);

    alter table CB_CONTACT
        add index FK18EF9020B167D364 (TYPE_ID),
        add constraint FK18EF9020B167D364
        foreign key (TYPE_ID)
        references base_entity_record (record_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_ANESTHESIOLOGIST_FK (ANESTHESIOLOGIST_ID),
        add constraint CHD_BTH_ANESTHESIOLOGIST_FK
        foreign key (ANESTHESIOLOGIST_ID)
        references personnel (personnel_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_INTERVENTION_TYPE_FK (INTERVENTION_TYPE_ID),
        add constraint CHD_BTH_INTERVENTION_TYPE_FK
        foreign key (INTERVENTION_TYPE_ID)
        references base_entity_record (record_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_MIDWIFE_FK (MIDWIFE_ID),
        add constraint CHD_BTH_MIDWIFE_FK
        foreign key (MIDWIFE_ID)
        references personnel (personnel_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_ANESTHESIA_TYPE_FK (ANESTHESIA_TYPE_ID),
        add constraint CHD_BTH_ANESTHESIA_TYPE_FK
        foreign key (ANESTHESIA_TYPE_ID)
        references base_entity_record (record_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_CESAREAN_CAUSE_FK (CESAREAN_CAUSE_ID),
        add constraint CHD_BTH_CESAREAN_CAUSE_FK
        foreign key (CESAREAN_CAUSE_ID)
        references base_entity_record (record_id);

    alter table CHILD_BIRTH_INFO
        add index CHILD_BIRTH_INF_DR_FK (DOCTOR_ID),
        add constraint CHILD_BIRTH_INF_DR_FK
        foreign key (DOCTOR_ID)
        references personnel (personnel_id);

    alter table CHILD_BIRTH_INFO
        add index CHD_BTH_UNIT_RECEPTION_FK (UNIT_RECEPTION_ID),
        add constraint CHD_BTH_UNIT_RECEPTION_FK
        foreign key (UNIT_RECEPTION_ID)
        references Unit_Reception (UnitReception_Id);

    alter table CenterUnit_RequestType  
        add index fk_CU_CURT (CenterUnit_Id),
        add constraint fk_CU_CURT
        foreign key (CenterUnit_Id)
        references center_unit (unit_id);

    alter table Complementary_Exam_Info
        add index COMPLE_INFO_SUBSRV_FK (subExam),
        add constraint COMPLE_INFO_SUBSRV_FK
        foreign key (subExam)
        references Sub_Service (subService_Id);

    alter table Complementary_Exam_Info
        add index fk_BER_Unit_SER (unit_Id),
        add constraint fk_BER_Unit_SER
        foreign key (unit_Id)
        references base_entity_record (record_id);

    alter table Complementary_Exam_Info
        add index fk_BER_kitType_compl (kitType_Id),
        add constraint fk_BER_kitType_compl
        foreign key (kitType_Id)
        references base_entity_record (record_id);

    alter table Complementary_Exam_Info
        add index COMPLE_INFO_SRV_FK (exam),
        add constraint COMPLE_INFO_SRV_FK
        foreign key (exam)
        references Service (service_id);

    alter table Complementary_Parameter
        add index complementary_info_fk (Complementary_Exam_Info_Id),
        add constraint complementary_info_fk
        foreign key (Complementary_Exam_Info_Id)
        references Complementary_Exam_Info (Complementary_Exam_Info_Id);

    alter table Cyto
        add index fk_Cyto_unitReceptionService (unit_reception_service_id),
        add constraint fk_Cyto_unitReceptionService
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table DINNER
        add index FK7832E072F7897DC1 (food_Schedule_ID),
        add constraint FK7832E072F7897DC1
        foreign key (food_Schedule_ID)
        references Food_Schedule (food_Schedule_ID);

    alter table DINNER
        add index FK7832E07233161B7C (BER_dinner_ID),
        add constraint FK7832E07233161B7C
        foreign key (BER_dinner_ID)
        references base_entity_record (record_id);

    alter table Death
        add index fk_Personnel_death (personnel_id),
        add constraint fk_Personnel_death
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Death
        add index fk_death_teryaj (Teryaj_Id),
        add constraint fk_death_teryaj
        foreign key (Teryaj_Id)
        references Teryaj (Teryaj_Id);

    alter table Dr_Percent
        add index FK_Dr_Percent_BER (Record_Id),
        add constraint FK_Dr_Percent_BER
        foreign key (Record_Id)
        references base_entity_record (record_id);

    alter table EXAM_REPLY
        add index FKBF7E5AAA7D3E68 (UNIT_RECEPTION_SERVICE_ID),
        add constraint FKBF7E5AAA7D3E68
        foreign key (UNIT_RECEPTION_SERVICE_ID)
        references unit_reception_service (unit_reception_service_id);

    alter table EXAM_REPLY
        add index fk_BER_unit_ER (unit_Id),
        add constraint fk_BER_unit_ER
        foreign key (unit_Id)
        references base_entity_record (record_id);

    alter table EXAM_REPLY
        add index fk_BER_kitType_ER (kitType_Id),
        add constraint fk_BER_kitType_ER
        foreign key (kitType_Id)
        references base_entity_record (record_id);

    alter table External_Dr
        add index externalDr_BER (proficiency_id),
        add constraint externalDr_BER
        foreign key (proficiency_id)
        references base_entity_record (record_id);

    alter table Food_Schedule
        add index fk_food_confirmationUser (confirmationUser_Id),
        add constraint fk_food_confirmationUser
        foreign key (confirmationUser_Id)
        references users (user_id);

    alter table Food_Schedule
        add index fk_food_registrationUser (registrationUser_Id),
        add constraint fk_food_registrationUser
        foreign key (registrationUser_Id)
        references users (user_id);

    alter table Food_Schedule
        add index FK695A555861223FCC (UnitReception_Id),
        add constraint FK695A555861223FCC
        foreign key (UnitReception_Id)
        references Unit_Reception (UnitReception_Id);

    alter table Group_Disease_Unit
        add index Fk_Group_Disease_Unit_MCU (unit_id),
        add constraint Fk_Group_Disease_Unit_MCU
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table Group_Disease_Unit
        add index Fk_Group_Disease_Unit_BER (record_id),
        add constraint Fk_Group_Disease_Unit_BER
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table Holiday_Calendar
        add index fk_BER_HC_HC (calendar_Id),
        add constraint fk_BER_HC_HC
        foreign key (calendar_Id)
        references base_entity_record (record_id);

    alter table Holiday_Calendar_Date
        add index fk_hc_in_hcd (holiday_Calendar_Id),
        add constraint fk_hc_in_hcd
        foreign key (holiday_Calendar_Id)
        references Holiday_Calendar (holiday_Calendar_Id);

    alter table Holiday_Calendar_Date
        add index fk_BER_HT_HCD (holidayType_Id),
        add constraint fk_BER_HT_HCD
        foreign key (holidayType_Id)
        references base_entity_record (record_id);

    alter table INFANT_INFO
        add index FK815466E76820E9D7 (CHILD_BIRTH_INFO_ID),
        add constraint FK815466E76820E9D7
        foreign key (CHILD_BIRTH_INFO_ID)
        references CHILD_BIRTH_INFO (ID);

    alter table INFANT_MALFORMATION
        add index INF_MALFORMATION_TYPE_FK (MALFORMATION_TYPE_ID),
        add constraint INF_MALFORMATION_TYPE_FK
        foreign key (MALFORMATION_TYPE_ID)
        references base_entity_record (record_id);

    alter table INFANT_MALFORMATION
        add index FK95250F92396FD8C4 (INFANT_INFO_ID),
        add constraint FK95250F92396FD8C4
        foreign key (INFANT_INFO_ID)
        references INFANT_INFO (ID);

    alter table INSURANCE
        add index FKAA72B6BA4534B14 (compInsType_rec_id),
        add constraint FKAA72B6BA4534B14
        foreign key (compInsType_rec_id)
        references base_entity_record (record_id);

    alter table INSURANCE
        add index fk_insurance_reception (Reception_Id),
        add constraint fk_insurance_reception
        foreign key (Reception_Id)
        references Reception (Reception_Id);

    alter table K_Definition
        add index K_DEF_INSURANCE_TYPE_FK (INSURANCE_TYPE_ID),
        add constraint K_DEF_INSURANCE_TYPE_FK
        foreign key (INSURANCE_TYPE_ID)
        references base_entity_record (record_id);

    alter table K_Definition
        add index K_DEF_K_TYPE_FK (K_TYPE_ID),
        add constraint K_DEF_K_TYPE_FK
        foreign key (K_TYPE_ID)
        references base_entity_record (record_id);

    alter table Kit
        add index fk_BER_Unit_Kit (Unit_Id),
        add constraint fk_BER_Unit_Kit
        foreign key (Unit_Id)
        references base_entity_record (record_id);

    alter table Kit
        add index fk_BER_KType_Kit (KitType_Id),
        add constraint fk_BER_KType_Kit
        foreign key (KitType_Id)
        references base_entity_record (record_id);

    alter table LAUNCH
        add index FK856C17B3F7897DC1 (food_Schedule_ID),
        add constraint FK856C17B3F7897DC1
        foreign key (food_Schedule_ID)
        references Food_Schedule (food_Schedule_ID);

    alter table LAUNCH
        add index FK856C17B385B109B (BER_Launch_ID),
        add constraint FK856C17B385B109B
        foreign key (BER_Launch_ID)
        references base_entity_record (record_id);

    alter table LEACH
        add index FK44F544DBF948B01 (BER_LEACH_ID),
        add constraint FK44F544DBF948B01
        foreign key (BER_LEACH_ID)
        references base_entity_record (record_id);

    alter table LEACH
        add index FK44F544DAEB81DCB (EXAM_REPLY_ID),
        add constraint FK44F544DAEB81DCB
        foreign key (EXAM_REPLY_ID)
        references EXAM_REPLY (EXAM_REPLY_ID);

    alter table Literal_Answer
        add index FKFC8F818E9619D081 (Complementary_Exam_Info_Id),
        add constraint FKFC8F818E9619D081
        foreign key (Complementary_Exam_Info_Id)
        references Complementary_Exam_Info (Complementary_Exam_Info_Id);

    alter table MB_ROLE_TASK
        add index FK1688158423162568 (ROLE_ID),
        add constraint FK1688158423162568
        foreign key (ROLE_ID)
        references role (role_id);

    alter table MB_ROLE_TASK
        add index FK168815847564D708 (TASK_ID),
        add constraint FK168815847564D708
        foreign key (TASK_ID)
        references MB_TASK (ID);

    alter table MB_TASK
        add index FK5F4191EF4C6BF5C3 (parent_ID),
        add constraint FK5F4191EF4C6BF5C3
        foreign key (parent_ID)
        references MB_TASK (ID);

    alter table METHOD_PARAMETER
        add index FKF10C9DAB9144093E (METHOD_LOG_ID),
        add constraint FKF10C9DAB9144093E
        foreign key (METHOD_LOG_ID)
        references METHOD_LOG (METHOD_LOG_ID);

    alter table MICROBE
        add index FK69A835E773C36327 (BER_MICROBE_ID),
        add constraint FK69A835E773C36327
        foreign key (BER_MICROBE_ID)
        references base_entity_record (record_id);

    alter table MICROBE
        add index FK69A835E7AEB81DCB (EXAM_REPLY_ID),
        add constraint FK69A835E7AEB81DCB
        foreign key (EXAM_REPLY_ID)
        references EXAM_REPLY (EXAM_REPLY_ID);

    alter table Naja_Personnel
        add index fk_BER_gender_NP (Gender_id),
        add constraint fk_BER_gender_NP
        foreign key (Gender_id)
        references base_entity_record (record_id);

    alter table Naja_Personnel
        add index fk_BER_organ_NP (Organ_Id),
        add constraint fk_BER_organ_NP
        foreign key (Organ_Id)
        references base_entity_record (record_id);

    alter table Naja_Personnel
        add index fk_BER_grade_NP (Grade_Id),
        add constraint fk_BER_grade_NP
        foreign key (Grade_Id)
        references base_entity_record (record_id);

    alter table Naja_Personnel
        add index fk_BER_InsuranceType_NP (InsuranceNumber_id),
        add constraint fk_BER_InsuranceType_NP
        foreign key (InsuranceNumber_id)
        references base_entity_record (record_id);

    alter table PATIENT_LOCATION
        add index fk_pl_reception (reception_id),
        add constraint fk_pl_reception
        foreign key (reception_id)
        references Reception (Reception_Id);

    alter table PATIENT_LOCATION
        add index FKAC723BCFDBEDAF2 (PATIENT_STATUS_ID),
        add constraint FKAC723BCFDBEDAF2
        foreign key (PATIENT_STATUS_ID)
        references base_entity_record (record_id);

    alter table PATIENT_LOCATION
        add index FKAC723BCFF56C9B3 (Naja_Center_ID),
        add constraint FKAC723BCFF56C9B3
        foreign key (Naja_Center_ID)
        references center (center_id);

    alter table PATIENT_LOCATION
        add index fk_pl_ur (UNITRECEPTION_ID),
        add constraint fk_pl_ur
        foreign key (UNITRECEPTION_ID)
        references Unit_Reception (UnitReception_Id);

    alter table PATIENT_LOCATION
        add index FKAC723BCF856FB60 (BED_INFO_ID),
        add constraint FKAC723BCF856FB60
        foreign key (BED_INFO_ID)
        references Bed_Info (bed_info_id);

    alter table PATIENT_LOCATION
        add index fk_death_pl (deathId),
        add constraint fk_death_pl
        foreign key (deathId)
        references Death (Death_Id);

    alter table Patient
        add index fk_BER_gender_Pa (Gender_id),
        add constraint fk_BER_gender_Pa
        foreign key (Gender_id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_organ_Pa (Organ_Id),
        add constraint fk_BER_organ_Pa
        foreign key (Organ_Id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_subInsurance_Pa (subInsurance_id),
        add constraint fk_BER_subInsurance_Pa
        foreign key (subInsurance_id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_grade_Pa (Grade_Id),
        add constraint fk_BER_grade_Pa
        foreign key (Grade_Id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_InsuranceType_Pa (InsuranceNumber_id),
        add constraint fk_BER_InsuranceType_Pa
        foreign key (InsuranceNumber_id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_married_Pa (marriage_status_id),
        add constraint fk_BER_married_Pa
        foreign key (marriage_status_id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_BER_job_Pa (Job_Id),
        add constraint fk_BER_job_Pa
        foreign key (Job_Id)
        references base_entity_record (record_id);

    alter table Patient
        add index fk_patient_MC (Center_Id),
        add constraint fk_patient_MC
        foreign key (Center_Id)
        references center (center_id);

    alter table Patient
        add index fk_BER_religion_Pa (religion_id),
        add constraint fk_BER_religion_Pa
        foreign key (religion_id)
        references base_entity_record (record_id);

    alter table Personnel_PayRoll
        add index FK_Personnel_PayRoll_Pers (personnel_id),
        add constraint FK_Personnel_PayRoll_Pers
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Personnel_Unit
        add index fk_personnelUnit_MCU (Unit_Id),
        add constraint fk_personnelUnit_MCU
        foreign key (Unit_Id)
        references center_unit (unit_id);

    alter table Personnel_Unit
        add index fk_personnelUnit_personnel (Personnel_Id),
        add constraint fk_personnelUnit_personnel
        foreign key (Personnel_Id)
        references personnel (personnel_id);

    alter table Personnel_Unit_Calender
        add index fk_PersonnelUnitCalender_BER (shift_Id),
        add constraint fk_PersonnelUnitCalender_BER
        foreign key (shift_Id)
        references base_entity_record (record_id);

    alter table Personnel_Unit_Calender
        add index fk_PersonnelUnitCalender_PU (personnelunit_Id),
        add constraint fk_PersonnelUnitCalender_PU
        foreign key (personnelunit_Id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table Personnel_Unit_Calender
        add index fk_personnelunitcalender_BER2 (calenderType_id),
        add constraint fk_personnelunitcalender_BER2
        foreign key (calenderType_id)
        references base_entity_record (record_id);

    alter table RECEPTION_STATUS
        add index fk_reception_in_rec_status (reception_id),
        add constraint fk_reception_in_rec_status
        foreign key (reception_id)
        references Reception (Reception_Id);

    alter table RECEPTION_STATUS
        add index fk_user_in_rec_status (user_id),
        add constraint fk_user_in_rec_status
        foreign key (user_id)
        references users (user_id);

    alter table REQUEST_SERVICE_STATUS
        add index FK38D5B0AC51620C57 (lossReason_Id),
        add constraint FK38D5B0AC51620C57
        foreign key (lossReason_Id)
        references base_entity_record (record_id);

    alter table REQUEST_SERVICE_STATUS
        add index FK38D5B0ACED850280 (relapseReason_Id),
        add constraint FK38D5B0ACED850280
        foreign key (relapseReason_Id)
        references base_entity_record (record_id);

    alter table REQUEST_SERVICE_STATUS
        add index FK38D5B0ACB3B2875B (requestService_Id),
        add constraint FK38D5B0ACB3B2875B
        foreign key (requestService_Id)
        references Request_Service (requestService_Id);

    alter table REQUEST_STATUS
        add index FKB52EF7C2DE7FC155 (Request_Id),
        add constraint FKB52EF7C2DE7FC155
        foreign key (Request_Id)
        references Unit_Request (Request_Id);

    alter table Reception
        add index fk_BER_subInsurance_rec (subInsurance_id),
        add constraint fk_BER_subInsurance_rec
        foreign key (subInsurance_id)
        references base_entity_record (record_id);

    alter table Reception
        add index fk_BER_organ_Re (Organ_Id),
        add constraint fk_BER_organ_Re
        foreign key (Organ_Id)
        references base_entity_record (record_id);

    alter table Reception
        add index fk_reception_death (Death_Id),
        add constraint fk_reception_death
        foreign key (Death_Id)
        references Death (Death_Id);

    alter table Reception
        add index fk_Recep_releaseInfo (Released_Info_Id),
        add constraint fk_Recep_releaseInfo
        foreign key (Released_Info_Id)
        references Released_Info (ReleasedInfo_ID);

    alter table Reception
        add index fk_reception_user (User_Id),
        add constraint fk_reception_user
        foreign key (User_Id)
        references users (user_id);

    alter table Reception
        add index fk_reception_patient (Patient_Id),
        add constraint fk_reception_patient
        foreign key (Patient_Id)
        references Patient (Patient_Id);

    alter table Reception
        add index fk_reception_medical_center (Center_Id),
        add constraint fk_reception_medical_center
        foreign key (Center_Id)
        references center (center_id);

    alter table Reception
        add index FKA1853EAF4694E6FF (personnel_id),
        add constraint FKA1853EAF4694E6FF
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Reception
        add index fk_BER_InsuranceType_rec (InsuranceType_id),
        add constraint fk_BER_InsuranceType_rec
        foreign key (InsuranceType_id)
        references base_entity_record (record_id);

    alter table Reception_Reasons
        add index FK6A6414FFB4A5AA6C (Reception_Id),
        add constraint FK6A6414FFB4A5AA6C
        foreign key (Reception_Id)
        references Reception (Reception_Id);

    alter table Reception_Reasons
        add index FK6A6414FF8632804A (Reason_BER_ID),
        add constraint FK6A6414FF8632804A
        foreign key (Reason_BER_ID)
        references base_entity_record (record_id);

    alter table Released_Info
        add index fk_BER_DiscountBy_ReInfo (BER_DiscountBy_Id),
        add constraint fk_BER_DiscountBy_ReInfo
        foreign key (BER_DiscountBy_Id)
        references base_entity_record (record_id);

    alter table Released_Info
        add index fk_Srv_ReleaseInfo (globalService_id),
        add constraint fk_Srv_ReleaseInfo
        foreign key (globalService_id)
        references Service (service_id);

    alter table Request_Service
        add index FKC115B0C5C4F0911C (shift_Id),
        add constraint FKC115B0C5C4F0911C
        foreign key (shift_Id)
        references base_entity_record (record_id);

    alter table Request_Service
        add index FKC115B0C537C8B0CE (consultantSpeciality_Id),
        add constraint FKC115B0C537C8B0CE
        foreign key (consultantSpeciality_Id)
        references base_entity_record (record_id);

    alter table Request_Service
        add index FKC115B0C5DE7FC155 (Request_Id),
        add constraint FKC115B0C5DE7FC155
        foreign key (Request_Id)
        references Unit_Request (Request_Id);

    alter table Request_Service
        add index FKC115B0C5262F5AB5 (phisiotheropyMember_Id),
        add constraint FKC115B0C5262F5AB5
        foreign key (phisiotheropyMember_Id)
        references base_entity_record (record_id);

    alter table Request_Service
        add index FKC115B0C5FEE3FB5F (service_id),
        add constraint FKC115B0C5FEE3FB5F
        foreign key (service_id)
        references Service (service_id);

    alter table Request_Service
        add index FKC115B0C54694E6FF (personnel_id),
        add constraint FKC115B0C54694E6FF
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Request_Service_Setting
        add index fk_BER_ReqSerSetting (Base_Entity_Record_Id),
        add constraint fk_BER_ReqSerSetting
        foreign key (Base_Entity_Record_Id)
        references base_entity_record (record_id);

    alter table RoutineDrug_Inventory
        add index FK46C83121DC3700A6 (Routine_Drug_ID),
        add constraint FK46C83121DC3700A6
        foreign key (Routine_Drug_ID)
        references Routine_Drug (Routine_Drug_ID);

    alter table RoutineDrug_Inventory
        add index FK46C83121E168948E (inventory_id),
        add constraint FK46C83121E168948E
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table Routine_Drug
        add index fk_RType_RoutineD (Routine_Type_ID),
        add constraint fk_RType_RoutineD
        foreign key (Routine_Type_ID)
        references base_entity_record (record_id);

    alter table Routine_Drug
        add index fk_CUnit_RoutineD (Medical_Center_ID),
        add constraint fk_CUnit_RoutineD
        foreign key (Medical_Center_ID)
        references center_unit (unit_id);

    alter table Routine_Drug
        add index fk_Personnel_RoutineD (Personnel_ID),
        add constraint fk_Personnel_RoutineD
        foreign key (Personnel_ID)
        references personnel (personnel_id);

    alter table SIP_PROFICIENCY
        add index FK6A0FCC5048FED849 (SIP_ID),
        add constraint FK6A0FCC5048FED849
        foreign key (SIP_ID)
        references Service_Insurance_Price (service_insurance_price_id);

    alter table SIP_PROFICIENCY
        add index FK6A0FCC504D1FCB09 (SERVICE_INSURANCE_PRICE_ID),
        add constraint FK6A0FCC504D1FCB09
        foreign key (SERVICE_INSURANCE_PRICE_ID)
        references Service_Insurance_Price (service_insurance_price_id);

    alter table SIP_PROFICIENCY
        add index FK6A0FCC5032DA159A (PROFICIENCY_TYPE_ID),
        add constraint FK6A0FCC5032DA159A
        foreign key (PROFICIENCY_TYPE_ID)
        references base_entity_record (record_id);

    alter table SUB_ANTIBIOTIC
        add index FK7CE763E7C1DCB38C (SUB_EXAM_REPLY_ID),
        add constraint FK7CE763E7C1DCB38C
        foreign key (SUB_EXAM_REPLY_ID)
        references SUB_EXAM_REPLY (SUB_EXAM_REPLY_ID);

    alter table SUB_ANTIBIOTIC
        add index FK7CE763E7E7AC27A3 (SUB_ANTIBIOTIC_ENTITY_ID),
        add constraint FK7CE763E7E7AC27A3
        foreign key (SUB_ANTIBIOTIC_ENTITY_ID)
        references base_entity_record (record_id);

    alter table SUB_EXAM_REPLY
        add index fk_BER_Unit_SER (unit_Id),
        add constraint fk_BER_Unit_SER
        foreign key (unit_Id)
        references base_entity_record (record_id);

    alter table SUB_EXAM_REPLY
        add index FK6892DA291F80DEBC (UNIT_RECEPTION_SUB_SERVICE_ID),
        add constraint FK6892DA291F80DEBC
        foreign key (UNIT_RECEPTION_SUB_SERVICE_ID)
        references urs_sub_service (id);

    alter table SUB_EXAM_REPLY
        add index FK6892DA299619D081 (COMPLEMENTARY_EXAM_INFO_ID),
        add constraint FK6892DA299619D081
        foreign key (COMPLEMENTARY_EXAM_INFO_ID)
        references Complementary_Exam_Info (Complementary_Exam_Info_Id);

    alter table SUB_EXAM_REPLY
        add index fk_BER_KitType_SER (KitType_Id),
        add constraint fk_BER_KitType_SER
        foreign key (KitType_Id)
        references base_entity_record (record_id);

    alter table SUB_LEACH
        add index FKD9BAE16EBF948B01 (BER_LEACH_ID),
        add constraint FKD9BAE16EBF948B01
        foreign key (BER_LEACH_ID)
        references base_entity_record (record_id);

    alter table SUB_LEACH
        add index FKD9BAE16EC1DCB38C (SUB_EXAM_REPLY_ID),
        add constraint FKD9BAE16EC1DCB38C
        foreign key (SUB_EXAM_REPLY_ID)
        references SUB_EXAM_REPLY (SUB_EXAM_REPLY_ID);

    alter table SUB_MICROBE
        add index FK9264FEC873C36327 (BER_MICROBE_ID),
        add constraint FK9264FEC873C36327
        foreign key (BER_MICROBE_ID)
        references base_entity_record (record_id);

    alter table SUB_MICROBE
        add index FK9264FEC8C1DCB38C (SUB_EXAM_REPLY_ID),
        add constraint FK9264FEC8C1DCB38C
        foreign key (SUB_EXAM_REPLY_ID)
        references SUB_EXAM_REPLY (SUB_EXAM_REPLY_ID);

    alter table SURGERY_INFO
        add index SURGERY_INF_ANESTHESIOLOGIST_FK (ANESTHESIOLOGIST_ID),
        add constraint SURGERY_INF_ANESTHESIOLOGIST_FK
        foreign key (ANESTHESIOLOGIST_ID)
        references personnel (personnel_id);

    alter table SURGERY_INFO
        add index SURGERY_INF_ANESTHESIA_TYPE_FK (ANESTHESIA_TYPE_ID),
        add constraint SURGERY_INF_ANESTHESIA_TYPE_FK
        foreign key (ANESTHESIA_TYPE_ID)
        references base_entity_record (record_id);

    alter table SURGERY_INFO
        add index SURGERY_INF_STANDBY_ANESGIST_FK (STANDBY_ANESTHESIOLOGIST_ID),
        add constraint SURGERY_INF_STANDBY_ANESGIST_FK
        foreign key (STANDBY_ANESTHESIOLOGIST_ID)
        references personnel (personnel_id);

    alter table SURGERY_INFO
        add index SURGERY_INFO_UNIT_RECEPTION_FK (UNIT_RECEPTION_ID),
        add constraint SURGERY_INFO_UNIT_RECEPTION_FK
        foreign key (UNIT_RECEPTION_ID)
        references Unit_Reception (UnitReception_Id);

    alter table SURGERY_TEAM
        add index FKDBBA52877D3E68 (UNIT_RECEPTION_SERVICE_ID),
        add constraint FKDBBA52877D3E68
        foreign key (UNIT_RECEPTION_SERVICE_ID)
        references unit_reception_service (unit_reception_service_id);

    alter table SURGERY_TEAM
        add index ST_CollaborationType_FK (CollaborationType_ID),
        add constraint ST_CollaborationType_FK
        foreign key (CollaborationType_ID)
        references base_entity_record (record_id);

    alter table SURGERY_TEAM
        add index SURGERY_TEAM_PERSONNEL_FK (PERSONNEL_ID),
        add constraint SURGERY_TEAM_PERSONNEL_FK
        foreign key (PERSONNEL_ID)
        references personnel (personnel_id);

    alter table Service
        add index fk_base_entity_srv_kind (service_kind_id),
        add constraint fk_base_entity_srv_kind
        foreign key (service_kind_id)
        references base_entity_record (record_id);

    alter table Service
        add index FK_BASE_ENTITY_KTYPE (KTYPE_ID),
        add constraint FK_BASE_ENTITY_KTYPE
        foreign key (KTYPE_ID)
        references base_entity_record (record_id);

    alter table Service
        add index fk_service_group_record (service_group_id),
        add constraint fk_service_group_record
        foreign key (service_group_id)
        references base_entity_record (record_id);

    alter table Service
        add index fk_base_entity_age_limit (age_gender_limit_id),
        add constraint fk_base_entity_age_limit
        foreign key (age_gender_limit_id)
        references base_entity_record (record_id);

    alter table Service_Film
        add index fk_srvic_film_baseRec (film_size_id),
        add constraint fk_srvic_film_baseRec
        foreign key (film_size_id)
        references base_entity_record (record_id);

    alter table Service_Film
        add index fk_srvic_film_srvic (service_id),
        add constraint fk_srvic_film_srvic
        foreign key (service_id)
        references Service (service_id);

    alter table Service_Insurance_Price
        add index fk_insurance_type_record (insurance_type_id),
        add constraint fk_insurance_type_record
        foreign key (insurance_type_id)
        references base_entity_record (record_id);

    alter table Service_Insurance_Price
        add index fk_service_top_record (service_top_id),
        add constraint fk_service_top_record
        foreign key (service_top_id)
        references base_entity_record (record_id);

    alter table Service_Insurance_Price
        add index fk_service_group_record (service_group_id),
        add constraint fk_service_group_record
        foreign key (service_group_id)
        references base_entity_record (record_id);

    alter table Service_Insurance_Price
        add index fk_service_ins_service (service_id),
        add constraint fk_service_ins_service
        foreign key (service_id)
        references Service (service_id);

    alter table Service_Insurance_Price
        add index fk_subGroup (sub_group_id),
        add constraint fk_subGroup
        foreign key (sub_group_id)
        references sub_group (sub_group_id);

    alter table Service_Pack
        add index fk_SP_Pack_SPack (Package_Id),
        add constraint fk_SP_Pack_SPack
        foreign key (Package_Id)
        references Package_Exam (Pack_ID);

    alter table Service_Pack
        add index fk_SP_Service_SPack (Service_Id),
        add constraint fk_SP_Service_SPack
        foreign key (Service_Id)
        references Service (service_id);

    alter table Smear
        add index fk_smear_urc (unit_reception_service_id),
        add constraint fk_smear_urc
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table Sub_Service
        add index fk_SS_Service (Service_Id),
        add constraint fk_SS_Service
        foreign key (Service_Id)
        references Service (service_id);

    alter table Surgery_UnitRequest_Status
        add index FK_Surgery_UR_Status_UnitRequest (unitRequest_id),
        add constraint FK_Surgery_UR_Status_UnitRequest
        foreign key (unitRequest_id)
        references Unit_Request (Request_Id);

    alter table System_Setting
        add index fk_BER_DC_SS (drugCalendar_Id),
        add constraint fk_BER_DC_SS
        foreign key (drugCalendar_Id)
        references base_entity_record (record_id);

    alter table System_Setting
        add index fk_BER_AK_SS (anesthesiaK_Id),
        add constraint fk_BER_AK_SS
        foreign key (anesthesiaK_Id)
        references base_entity_record (record_id);

    alter table System_Setting
        add index fk_BER_LC_SS (labCalendar_Id),
        add constraint fk_BER_LC_SS
        foreign key (labCalendar_Id)
        references base_entity_record (record_id);

    alter table TECHNICIAN_TEAM
        add index TECHNICIAN_TEAM_SURGERY_INF_FK (SURGERY_INFO_ID),
        add constraint TECHNICIAN_TEAM_SURGERY_INF_FK
        foreign key (SURGERY_INFO_ID)
        references SURGERY_INFO (SURGERY_INFO_ID);

    alter table TECHNICIAN_TEAM
        add index TECHNICIAN_TEAM_PERSONNEL_FK (PERSONNEL_ID),
        add constraint TECHNICIAN_TEAM_PERSONNEL_FK
        foreign key (PERSONNEL_ID)
        references personnel (personnel_id);

    alter table TECHNICIAN_TEAM
        add index TT_COLLABORATION_TYPE_FK (COLLABORATION_TYPE_ID),
        add constraint TT_COLLABORATION_TYPE_FK
        foreign key (COLLABORATION_TYPE_ID)
        references base_entity_record (record_id);

    alter table Teryaj
        add index fk_BER_MainComplaint (patientMainComplaint_Id),
        add constraint fk_BER_MainComplaint
        foreign key (patientMainComplaint_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index fk_BER_IncidentType (IncidentType_Id),
        add constraint fk_BER_IncidentType
        foreign key (IncidentType_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index FK_TERYAJ_RECEPTION (Reception_Id),
        add constraint FK_TERYAJ_RECEPTION
        foreign key (Reception_Id)
        references Reception (Reception_Id);

    alter table Teryaj
        add index fk_BER_IncidentPlace (IncidentPlace_Id),
        add constraint fk_BER_IncidentPlace
        foreign key (IncidentPlace_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index fk_BER_priority_Teryaj (Priority_Id),
        add constraint fk_BER_priority_Teryaj
        foreign key (Priority_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index FK_TERYAJ_USER (User_Id),
        add constraint FK_TERYAJ_USER
        foreign key (User_Id)
        references users (user_id);

    alter table Teryaj
        add index fk_teryaj_patient (Patient_Id),
        add constraint fk_teryaj_patient
        foreign key (Patient_Id)
        references Patient (Patient_Id);

    alter table Teryaj
        add index fk_BER_GeneralStatus (patientGeneralStatus_Id),
        add constraint fk_BER_GeneralStatus
        foreign key (patientGeneralStatus_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index fk_BER_ComingStatu (patientComingStatus_Id),
        add constraint fk_BER_ComingStatu
        foreign key (patientComingStatus_Id)
        references base_entity_record (record_id);

    alter table Teryaj
        add index fk_Teryaj_MC (Center_Id),
        add constraint fk_Teryaj_MC
        foreign key (Center_Id)
        references center (center_id);

    alter table Teryaj
        add index FK951BFEC14694E6FF (personnel_id),
        add constraint FK951BFEC14694E6FF
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Teryaj_STATUS
        add index fk_BER_patientStatus_TS (PATIENT_STATUS_ID),
        add constraint fk_BER_patientStatus_TS
        foreign key (PATIENT_STATUS_ID)
        references base_entity_record (record_id);

    alter table Teryaj_STATUS
        add index FK759DD730F56C9B3 (Naja_Center_ID),
        add constraint FK759DD730F56C9B3
        foreign key (Naja_Center_ID)
        references center (center_id);

    alter table Teryaj_STATUS
        add index FK759DD7309476C746 (Teryaj_Id),
        add constraint FK759DD7309476C746
        foreign key (Teryaj_Id)
        references Teryaj (Teryaj_Id);

    alter table UNIT_RECEPTION_SERVICE_STATUS
        add index FKF85736C77D3E68 (UNIT_RECEPTION_SERVICE_ID),
        add constraint FKF85736C77D3E68
        foreign key (UNIT_RECEPTION_SERVICE_ID)
        references unit_reception_service (unit_reception_service_id);

    alter table UNIT_RECEPTION_SERVICE_STATUS
        add index FKF85736C7830D9EE (PROCEED_RESPONSIBLE_ID),
        add constraint FKF85736C7830D9EE
        foreign key (PROCEED_RESPONSIBLE_ID)
        references users (user_id);

    alter table UNIT_RECEPTION_SERVICE_STATUS
        add index FKF85736C75A5E2DC1 (SAMPLING_RESPONSIBLE_ID),
        add constraint FKF85736C75A5E2DC1
        foreign key (SAMPLING_RESPONSIBLE_ID)
        references personnel (personnel_id);

    alter table Unit_Reception
        add index fk_unitReception_reception (Reception_Id),
        add constraint fk_unitReception_reception
        foreign key (Reception_Id)
        references Reception (Reception_Id);

    alter table Unit_Reception
        add index fk_BER_turnShift (TurnShift_Id),
        add constraint fk_BER_turnShift
        foreign key (TurnShift_Id)
        references base_entity_record (record_id);

    alter table Unit_Reception
        add index fk_unitReception_PU (personnelunit_Id),
        add constraint fk_unitReception_PU
        foreign key (personnelunit_Id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table Unit_Reception
        add index fk_UnitReception_MCU (unit_Id),
        add constraint fk_UnitReception_MCU
        foreign key (unit_Id)
        references center_unit (unit_id);

    alter table Unit_Reception
        add index fk_reception_unit_BER (record_id),
        add constraint fk_reception_unit_BER
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table Unit_Reception
        add index fk_UR_admittedRequest (admitted_request_id),
        add constraint fk_UR_admittedRequest
        foreign key (admitted_request_id)
        references Unit_Request (Request_Id);

    alter table Unit_Reception_Service_Film
        add index fk_urs_ursf (unit_reception_service_id),
        add constraint fk_urs_ursf
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table Unit_Reception_Service_Film
        add index fk_filmsize_ursf (ber_filmSize_id),
        add constraint fk_filmsize_ursf
        foreign key (ber_filmSize_id)
        references base_entity_record (record_id);

    alter table Unit_Request
        add index FK1A799AD461223FCC (UnitReception_Id),
        add constraint FK1A799AD461223FCC
        foreign key (UnitReception_Id)
        references Unit_Reception (UnitReception_Id);

    alter table Unit_Request
        add index FK1A799AD44694E6FF (personnel_id),
        add constraint FK1A799AD44694E6FF
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table Warehouse_Counting
        add index fk_User_WHC (User_ID),
        add constraint fk_User_WHC
        foreign key (User_ID)
        references users (user_id);

    alter table Warehouse_Counting
        add index fk_BER_WH_WHC (BER_Warehouse_ID),
        add constraint fk_BER_WH_WHC
        foreign key (BER_Warehouse_ID)
        references base_entity_record (record_id);

    alter table Warehouse_Counting
        add index fk_Center_WHC (Center_ID),
        add constraint fk_Center_WHC
        foreign key (Center_ID)
        references center (center_id);

    alter table Warehouse_Counting_Item
        add index fk_WHC_WHCI (WarehouseCounting_ID),
        add constraint fk_WHC_WHCI
        foreign key (WarehouseCounting_ID)
        references Warehouse_Counting (Warehouse_Counting_ID);

    alter table Warehouse_Counting_Item
        add index fk_SubGroup_WHCItem (SubGroup_Id),
        add constraint fk_SubGroup_WHCItem
        foreign key (SubGroup_Id)
        references sub_group (sub_group_id);

    alter table Warehouse_Counting_Item
        add index fk_Inventory_WHCItem (Inventory_Id),
        add constraint fk_Inventory_WHCItem
        foreign key (Inventory_Id)
        references inventory (inventory_id);

    alter table Warehouse_Counting_Item
        add index fk_InvTra_WHCItem (inventoryTransaction_Id),
        add constraint fk_InvTra_WHCItem
        foreign key (inventoryTransaction_Id)
        references inventory_transaction (inventory_transaction_id);

    alter table Warehouse_Transfer
        add index fk_SrcWH_BER_WH (SourceWarehouse_BER_ID),
        add constraint fk_SrcWH_BER_WH
        foreign key (SourceWarehouse_BER_ID)
        references base_entity_record (record_id);

    alter table Warehouse_Transfer
        add index fk_CenterUnit_WH (CenterUnit_BER_ID),
        add constraint fk_CenterUnit_WH
        foreign key (CenterUnit_BER_ID)
        references center_unit (unit_id);

    alter table Warehouse_Transfer
        add index fk_User_WH (User_ID),
        add constraint fk_User_WH
        foreign key (User_ID)
        references users (user_id);

    alter table Warehouse_Transfer
        add index fk_OutOrderReason_BER_WH (OutOrderReason_BER_ID),
        add constraint fk_OutOrderReason_BER_WH
        foreign key (OutOrderReason_BER_ID)
        references base_entity_record (record_id);

    alter table Warehouse_Transfer
        add index fk_TWh_BER_WH (TargetWarehouse_BER_ID),
        add constraint fk_TWh_BER_WH
        foreign key (TargetWarehouse_BER_ID)
        references base_entity_record (record_id);

    alter table Warehouse_Transfer_Item
        add index fk_WTI_EXP_INV_TRA (export_invtra_id),
        add constraint fk_WTI_EXP_INV_TRA
        foreign key (export_invtra_id)
        references inventory_transaction (inventory_transaction_id);

    alter table Warehouse_Transfer_Item
        add index fk_WTI_IMP_INV_TRA (import_invtra_id),
        add constraint fk_WTI_IMP_INV_TRA
        foreign key (import_invtra_id)
        references inventory_transaction (inventory_transaction_id);

    alter table Warehouse_Transfer_Item
        add index fk_WH_WHItem (Warehouse_Transfer_ID),
        add constraint fk_WH_WHItem
        foreign key (Warehouse_Transfer_ID)
        references Warehouse_Transfer (Warehouse_Transfer_ID);

    alter table Warehouse_Transfer_Item
        add index fk_Inventory_WHItem (Inventory_Id),
        add constraint fk_Inventory_WHItem
        foreign key (Inventory_Id)
        references inventory (inventory_id);

    alter table answers
        add index fk_ans_serv (service_id),
        add constraint fk_ans_serv
        foreign key (service_id)
        references Service (service_id);

    alter table base_entity
        add index fk_parent_base_entity (parent_entity_id),
        add constraint fk_parent_base_entity
        foreign key (parent_entity_id)
        references base_entity (entity_id);

    alter table base_entity_record
        add index fk_base_entity (entity_id),
        add constraint fk_base_entity
        foreign key (entity_id)
        references base_entity (entity_id);

    alter table base_entity_record
        add index fk_parent_BER (parent_record_id),
        add constraint fk_parent_BER
        foreign key (parent_record_id)
        references base_entity_record (record_id);

    alter table bedridden
        add index fk_bed_reception (reception_id),
        add constraint fk_bed_reception
        foreign key (reception_id)
        references Unit_Reception (UnitReception_Id);

    alter table bedridden
        add index fk_bed_BEDRIDDEN_ACCOUNT (bedridden_account_id),
        add constraint fk_bed_BEDRIDDEN_ACCOUNT
        foreign key (bedridden_account_id)
        references bedridden_account (bedridden_account_Id);

    alter table bedridden
        add index fk_bed_center (center_id),
        add constraint fk_bed_center
        foreign key (center_id)
        references center_unit (unit_id);

    alter table bedridden
        add index fk_bed_center_request (medical_center_request_id),
        add constraint fk_bed_center_request
        foreign key (medical_center_request_id)
        references center_unit (unit_id);

    alter table bedridden_item
        add index fk_bedi_subGroupSuperseded (sub_group_superseded),
        add constraint fk_bedi_subGroupSuperseded
        foreign key (sub_group_superseded)
        references sub_group (sub_group_id);

    alter table bedridden_item
        add index fk_bedi_WARE_HOUSE (ware_house),
        add constraint fk_bedi_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table bedridden_item
        add index fk_bedi_INVENTORY_TRANSACTION (inventory_transaction_id),
        add constraint fk_bedi_INVENTORY_TRANSACTION
        foreign key (inventory_transaction_id)
        references inventory_transaction (inventory_transaction_id);

    alter table bedridden_item
        add index fk_bedi_bedridden (bedridden_id),
        add constraint fk_bedi_bedridden
        foreign key (bedridden_id)
        references bedridden (bedridden_Id);

    alter table bedridden_item
        add index fk_bedi_SubGroup (sub_group),
        add constraint fk_bedi_SubGroup
        foreign key (sub_group)
        references sub_group (sub_group_id);

    alter table bedridden_item
        add index fk_bedi_sub_INVENTORY (sub_inventory_id),
        add constraint fk_bedi_sub_INVENTORY
        foreign key (sub_inventory_id)
        references inventory (inventory_id);

    alter table bedridden_item
        add index fk_bedi_URS (unit_reception_service),
        add constraint fk_bedi_URS
        foreign key (unit_reception_service)
        references unit_reception_service (unit_reception_service_id);

    alter table bedridden_item
        add index fk_bedi_inventory (inventory_id),
        add constraint fk_bedi_inventory
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table cash
        add index cash_unit_reception_service (unit_reception_service_id),
        add constraint cash_unit_reception_service
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table cash
        add index fk_C_reception (reception_id),
        add constraint fk_C_reception
        foreign key (reception_id)
        references Reception (Reception_Id);

    alter table cash
        add index fk_C_releaseInfo (releaseInfo_id),
        add constraint fk_C_releaseInfo
        foreign key (releaseInfo_id)
        references Released_Info (ReleasedInfo_ID);

    alter table cash
        add index fk_C_unitReception (UnitReception_Id),
        add constraint fk_C_unitReception
        foreign key (UnitReception_Id)
        references Unit_Reception (UnitReception_Id);

    alter table cash
        add index cash_base_entity_record1 (bank_id),
        add constraint cash_base_entity_record1
        foreign key (bank_id)
        references base_entity_record (record_id);

    alter table cash
        add index cash_base_entity_record2 (payment_type_id),
        add constraint cash_base_entity_record2
        foreign key (payment_type_id)
        references base_entity_record (record_id);

    alter table cash
        add index cash_user (casher_id),
        add constraint cash_user
        foreign key (casher_id)
        references users (user_id);

    alter table center
        add index fk_BER_CenterKind (centerKind_Id),
        add constraint fk_BER_CenterKind
        foreign key (centerKind_Id)
        references base_entity_record (record_id);

    alter table center
        add index fk_BER_CenterProvince (centerProvince_Id),
        add constraint fk_BER_CenterProvince
        foreign key (centerProvince_Id)
        references base_entity_record (record_id);

    alter table center
        add index fk_BER_centerOwnerKind (centerOwnerKind_Id),
        add constraint fk_BER_centerOwnerKind
        foreign key (centerOwnerKind_Id)
        references base_entity_record (record_id);

    alter table center_unit
        add index fk_MCU_BER (unit_type),
        add constraint fk_MCU_BER
        foreign key (unit_type)
        references base_entity_record (record_id);

    alter table center_unit
        add index fk_MCU_personnel (personnel_id),
        add constraint fk_MCU_personnel
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table center_unit
        add index fk_MCU_MC (center_id),
        add constraint fk_MCU_MC
        foreign key (center_id)
        references center (center_id);

    alter table change_unit
        add index fk_CU_MINOR_CODE (minor_unit_code),
        add constraint fk_CU_MINOR_CODE
        foreign key (minor_unit_code)
        references base_entity_record (record_id);

    alter table change_unit
        add index fk_CU_INVENTORY (inventory_id),
        add constraint fk_CU_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table disease
        add index disease_base_entity_record (record_id),
        add constraint disease_base_entity_record
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table disease
        add index disease_unit_reception (unit_reception_id),
        add constraint disease_unit_reception
        foreign key (unit_reception_id)
        references Unit_Reception (UnitReception_Id);

    alter table gastric
        add index fk_Gastric_unit_reception (unit_reception_service_id),
        add constraint fk_Gastric_unit_reception
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table group_service_unit
        add index group_service_unit_MCU (unit_id),
        add constraint group_service_unit_MCU
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table group_service_unit
        add index group_service_unit_BER (record_id),
        add constraint group_service_unit_BER
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table hai_report
        add index fk_I_unit_reception_service (unit_reception_service_id),
        add constraint fk_I_unit_reception_service
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table immunohistochemistry
        add index fk_I_unit_reception_service (unit_reception_service_id),
        add constraint fk_I_unit_reception_service
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table insur_disk_insur
        add index FKF2D4979D914069EF (ber_id),
        add constraint FKF2D4979D914069EF
        foreign key (ber_id)
        references base_entity_record (record_id);

    alter table insur_disk_insur
        add index FKF2D4979D8E7603BE (insur_disk_id),
        add constraint FKF2D4979D8E7603BE
        foreign key (insur_disk_id)
        references insurance_diskette (ID);

    alter table insur_disk_top_service
        add index FK59AD08DD914069EF (ber_id),
        add constraint FK59AD08DD914069EF
        foreign key (ber_id)
        references base_entity_record (record_id);

    alter table insur_disk_top_service
        add index FK59AD08DD8E7603BE (insur_disk_id),
        add constraint FK59AD08DD8E7603BE
        foreign key (insur_disk_id)
        references insurance_diskette (ID);

    alter table insurance_per_grp_srv
        add index fk_IP_GPR_SRV_BER2 (top_service_id),
        add constraint fk_IP_GPR_SRV_BER2
        foreign key (top_service_id)
        references base_entity_record (record_id);

    alter table insurance_per_grp_srv
        add index fk_IP_GRP_SRV_BER1 (service_group_id),
        add constraint fk_IP_GRP_SRV_BER1
        foreign key (service_group_id)
        references base_entity_record (record_id);

    alter table insurance_per_grp_srv
        add index fk_IP_GRP_SRV_BER (insurance_id),
        add constraint fk_IP_GRP_SRV_BER
        foreign key (insurance_id)
        references base_entity_record (record_id);

    alter table insurance_per_top_srv
        add index fk_IP_TOP_SRV_BER1 (top_service_id),
        add constraint fk_IP_TOP_SRV_BER1
        foreign key (top_service_id)
        references base_entity_record (record_id);

    alter table insurance_per_top_srv
        add index fk_IP_TOP_SRV_BER (insurance_id),
        add constraint fk_IP_TOP_SRV_BER
        foreign key (insurance_id)
        references base_entity_record (record_id);

    alter table insurance_percent
        add index fk_insurance_percent_BER (insurance_id),
        add constraint fk_insurance_percent_BER
        foreign key (insurance_id)
        references base_entity_record (record_id);

    alter table insurance_percent_service
        add index fk_IPS_Base_REC (insurance_id),
        add constraint fk_IPS_Base_REC
        foreign key (insurance_id)
        references base_entity_record (record_id);

    alter table insurance_percent_service
        add index fk_insutance_serv_serv (service_id),
        add constraint fk_insutance_serv_serv
        foreign key (service_id)
        references Service (service_id);

    alter table insurance_unit
        add index fk_IU_UNIT (medical_center_unit_id),
        add constraint fk_IU_UNIT
        foreign key (medical_center_unit_id)
        references center_unit (unit_id);

    alter table insurance_unit
        add index fk_IU_INSURANCE (insurance_id),
        add constraint fk_IU_INSURANCE
        foreign key (insurance_id)
        references base_entity_record (record_id);

    alter table inventory
        add index fk_I_BER_GROUP_CODE (group_code),
        add constraint fk_I_BER_GROUP_CODE
        foreign key (group_code)
        references base_entity_record (record_id);

    alter table inventory
        add index fk_I_BER_SHAPE (shape_code),
        add constraint fk_I_BER_SHAPE
        foreign key (shape_code)
        references base_entity_record (record_id);

    alter table inventory
        add index fk_I_BER_SELL_UNIT (sell_unit_code),
        add constraint fk_I_BER_SELL_UNIT
        foreign key (sell_unit_code)
        references base_entity_record (record_id);

    alter table inventory
        add index fk_I_BER_MAJOR_UNIT (major_unit_code),
        add constraint fk_I_BER_MAJOR_UNIT
        foreign key (major_unit_code)
        references base_entity_record (record_id);

    alter table inventory
        add index fk_I_SERVICE (service_id),
        add constraint fk_I_SERVICE
        foreign key (service_id)
        references Service (service_id);

    alter table inventory_attach
        add index fk_IA_INVENTORY (inventory_id),
        add constraint fk_IA_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_compound
        add index fk_ICOMPOUND_USED_I (used_inventory_id),
        add constraint fk_ICOMPOUND_USED_I
        foreign key (used_inventory_id)
        references inventory (inventory_id);

    alter table inventory_compound
        add index fk_ICOMPOUND_INVENTORY (inventory_id),
        add constraint fk_ICOMPOUND_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_conflict
        add index fk_ICONFLICT_INVENTORY_CONFL (inventory_conflict_fid),
        add constraint fk_ICONFLICT_INVENTORY_CONFL
        foreign key (inventory_conflict_fid)
        references inventory (inventory_id);

    alter table inventory_conflict
        add index fk_ICONFLICT_BER_REASON_CODE (conflict_reason_code),
        add constraint fk_ICONFLICT_BER_REASON_CODE
        foreign key (conflict_reason_code)
        references base_entity_record (record_id);

    alter table inventory_conflict
        add index fk_ICONFLICT_INVENTORY (inventory_id),
        add constraint fk_ICONFLICT_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_management
        add index fk_IM_INVENTORY (inventory_id),
        add constraint fk_IM_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_similar
        add index fk_IS_INVENTORY_SIMILAR (inventory_similar_code),
        add constraint fk_IS_INVENTORY_SIMILAR
        foreign key (inventory_similar_code)
        references inventory (inventory_id);

    alter table inventory_similar
        add index fk_IS_INVENTORY (inventory_id),
        add constraint fk_IS_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_transaction
        add index fk_it_BER_WARE_HOUSE (ware_house),
        add constraint fk_it_BER_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table inventory_transaction
        add index fk_it_user (user_id),
        add constraint fk_it_user
        foreign key (user_id)
        references users (user_id);

    alter table inventory_transaction
        add index fk_IT_INVENTORY_DETAIL (inventory_detail_id),
        add constraint fk_IT_INVENTORY_DETAIL
        foreign key (inventory_detail_id)
        references inventory_transaction_detail (inventory_detail_id);

    alter table inventory_transaction
        add index fk_IT_INVENTORY (inventory_id),
        add constraint fk_IT_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table inventory_transaction
        add index fk_it_sub_group_id (sub_group_id),
        add constraint fk_it_sub_group_id
        foreign key (sub_group_id)
        references sub_group (sub_group_id);

    alter table login_history
        add index fk_login_history_user (user_id),
        add constraint fk_login_history_user
        foreign key (user_id)
        references users (user_id);

    alter table manager_Group
        add index FKDA52434D2F0DB6BE (manager_group_parent_id),
        add constraint FKDA52434D2F0DB6BE
        foreign key (manager_group_parent_id)
        references manager_Group (manager_group_id);

    alter table manager_Group_role
        add index FKA674FE28D8C1676D (manager_group_id),
        add constraint FKA674FE28D8C1676D
        foreign key (manager_group_id)
        references manager_Group (manager_group_id);

    alter table manager_Group_role
        add index FKA674FE2823162568 (role_id),
        add constraint FKA674FE2823162568
        foreign key (role_id)
        references role (role_id);

    alter table manager_Group_service_manager
        add index FK677E5731D8C1676D (manager_group_id),
        add constraint FK677E5731D8C1676D
        foreign key (manager_group_id)
        references manager_Group (manager_group_id);

    alter table manager_Group_service_manager
        add index FK677E5731310A5BDD (service_manager_id),
        add constraint FK677E5731310A5BDD
        foreign key (service_manager_id)
        references service_manager (service_manager_id);

    alter table medical_center_responsibles
        add index fk_MC_responsibles_BER (position_id),
        add constraint fk_MC_responsibles_BER
        foreign key (position_id)
        references base_entity_record (record_id);

    alter table medical_center_responsibles
        add index fk_MC_responsibles_personnel (personnel_id),
        add constraint fk_MC_responsibles_personnel
        foreign key (personnel_id)
        references personnel (personnel_id);

    alter table medical_center_responsibles
        add index fk_responsibles_MC (center_Id),
        add constraint fk_responsibles_MC
        foreign key (center_Id)
        references center (center_id);

    alter table outpatient
        add index fk_opi_EXTERNALDR (externalDr_id),
        add constraint fk_opi_EXTERNALDR
        foreign key (externalDr_id)
        references External_Dr (external_dr_id);

    alter table outpatient
        add index fk_op_reception (reception_id),
        add constraint fk_op_reception
        foreign key (reception_id)
        references Reception (Reception_Id);

    alter table outpatient
        add index fk_op_cash (cash_id),
        add constraint fk_op_cash
        foreign key (cash_id)
        references cash (transaction_id);

    alter table outpatient
        add index fk_op_user (user_id),
        add constraint fk_op_user
        foreign key (user_id)
        references users (user_id);

    alter table outpatient
        add index fk_op_patient (patient_id),
        add constraint fk_op_patient
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table outpatient
        add index fk_opi_OUTPATIENT_ACCOUNT (outpatient_account_id),
        add constraint fk_opi_OUTPATIENT_ACCOUNT
        foreign key (outpatient_account_id)
        references outpatient_account (outpatient_account_id);

    alter table outpatient
        add index fk_op_personnel (doctor_id),
        add constraint fk_op_personnel
        foreign key (doctor_id)
        references personnel (personnel_id);

    alter table outpatient_CTI
        add index fk_CTI_OPCTI (CTI_id),
        add constraint fk_CTI_OPCTI
        foreign key (CTI_id)
        references compound_technical_indicate (compound_technical_indicate_id);

    alter table outpatient_CTI
        add index fk_OP_OPCTI (outpatient_id),
        add constraint fk_OP_OPCTI
        foreign key (outpatient_id)
        references outpatient (outpatient_id);

    alter table outpatient_item
        add index fk_opi_BER_WARE_HOUSE (ware_house),
        add constraint fk_opi_BER_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table outpatient_item
        add index fk_opi_INVENTORY_TRANSACTION (inventory_transaction_id),
        add constraint fk_opi_INVENTORY_TRANSACTION
        foreign key (inventory_transaction_id)
        references inventory_transaction (inventory_transaction_id);

    alter table outpatient_item
        add index fk_opi_INVENTORY (sub_inventory_id),
        add constraint fk_opi_INVENTORY
        foreign key (sub_inventory_id)
        references inventory (inventory_id);

    alter table outpatient_item
        add index fk_opi_OUTPATIENT (outpatient_id),
        add constraint fk_opi_OUTPATIENT
        foreign key (outpatient_id)
        references outpatient (outpatient_id);

    alter table outpatient_item
        add index fk_opi_inventory (inventory_id),
        add constraint fk_opi_inventory
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table outpatient_item
        add index fk_opi_subGroup (sub_group_id),
        add constraint fk_opi_subGroup
        foreign key (sub_group_id)
        references sub_group (sub_group_id);

    alter table outpatient_item
        add index fk_opi_subGroupSuperseded (sub_group_superseded_id),
        add constraint fk_opi_subGroupSuperseded
        foreign key (sub_group_superseded_id)
        references sub_group (sub_group_id);

    alter table outpatient_max_drug_amount
        add index fk_out_mda_proficiency (proficiency_id),
        add constraint fk_out_mda_proficiency
        foreign key (proficiency_id)
        references base_entity_record (record_id);

    alter table patient_allergy
        add index fk_patient_alrgy167 (allergy_id),
        add constraint fk_patient_alrgy167
        foreign key (allergy_id)
        references base_entity_record (record_id);

    alter table patient_allergy
        add index fk_patient_alrgy149 (patient_id),
        add constraint fk_patient_alrgy149
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table patient_base_disease
        add index fk_patint_bs_dises (patient_id),
        add constraint fk_patint_bs_dises
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table patient_base_disease
        add index fk_patint_bs_dises165 (base_disease_id),
        add constraint fk_patint_bs_dises165
        foreign key (base_disease_id)
        references base_entity_record (record_id);

    alter table patient_drug_use
        add index fk_patint_drug_use (patient_id),
        add constraint fk_patint_drug_use
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table patient_drug_use
        add index fk_patint_drug_use161 (drug_id),
        add constraint fk_patint_drug_use161
        foreign key (drug_id)
        references base_entity_record (record_id);

    alter table patient_family_disease
        add index fk_patint_family_dises (patient_id),
        add constraint fk_patint_family_dises
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table patient_family_disease
        add index fk_patint_family_dises155 (family_disease_id),
        add constraint fk_patint_family_dises155
        foreign key (family_disease_id)
        references base_entity_record (record_id);

    alter table patient_special_disease
        add index fk_patint_spec_dises (patient_id),
        add constraint fk_patint_spec_dises
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table patient_special_disease
        add index fk_patint_spec_dises158 (special_disease_id),
        add constraint fk_patint_spec_dises158
        foreign key (special_disease_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER8 (gender_id),
        add constraint fk_BER8
        foreign key (gender_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER2 (proficiency_id),
        add constraint fk_BER2
        foreign key (proficiency_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER4 (personnel_type_id),
        add constraint fk_BER4
        foreign key (personnel_type_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER6 (grade_id),
        add constraint fk_BER6
        foreign key (grade_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER100 (status_id),
        add constraint fk_BER100
        foreign key (status_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER9 (marriage_status_id),
        add constraint fk_BER9
        foreign key (marriage_status_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER5 (employ_kind_id),
        add constraint fk_BER5
        foreign key (employ_kind_id)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_BER1 (job_id),
        add constraint fk_BER1
        foreign key (job_id)
        references base_entity_record (record_id);

    alter table personnel
        add index FK32DAD220675F2AF5 (educational_level_id3),
        add constraint FK32DAD220675F2AF5
        foreign key (educational_level_id3)
        references base_entity_record (record_id);

    alter table personnel
        add index fk_center (center_id),
        add constraint fk_center
        foreign key (center_id)
        references center (center_id);

    alter table personnel_unit_present
        add index fk_PersonnelUnitPresent_BER (shift_Id),
        add constraint fk_PersonnelUnitPresent_BER
        foreign key (shift_Id)
        references base_entity_record (record_id);

    alter table personnel_unit_present
        add index fk_PersonnelUnitPresent_BER2 (presentType_id),
        add constraint fk_PersonnelUnitPresent_BER2
        foreign key (presentType_id)
        references base_entity_record (record_id);

    alter table personnel_unit_present
        add index fk_PersonnelUnitPresent_PU (personnelunit_id),
        add constraint fk_PersonnelUnitPresent_PU
        foreign key (personnelunit_id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table purchase_invoice
        add index fk_PI_PURCHASE_ORDER (purchase_order_id),
        add constraint fk_PI_PURCHASE_ORDER
        foreign key (purchase_order_id)
        references purchase_order (purchase_request_id);

    alter table purchase_invoice
        add index fk_PI_BER_WARE_HOUSE (ware_house),
        add constraint fk_PI_BER_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table purchase_invoice
        add index fk_pi_USER (user_id),
        add constraint fk_pi_USER
        foreign key (user_id)
        references users (user_id);

    alter table purchase_invoice
        add index fk_PI_SUPPLIER (supplier_id),
        add constraint fk_PI_SUPPLIER
        foreign key (supplier_id)
        references supplier (supplier_id);

    alter table purchase_invoice_item
        add index fk_PII_CHANGE_UNIT (change_unit),
        add constraint fk_PII_CHANGE_UNIT
        foreign key (change_unit)
        references base_entity_record (record_id);

    alter table purchase_invoice_item
        add index fk_PII_INVENTORY_TRANSACTION (inventory_transaction_id),
        add constraint fk_PII_INVENTORY_TRANSACTION
        foreign key (inventory_transaction_id)
        references inventory_transaction (inventory_transaction_id);

    alter table purchase_invoice_item
        add index fk_PII_PURCHASE_INVOICE (purchase_invoice_id),
        add constraint fk_PII_PURCHASE_INVOICE
        foreign key (purchase_invoice_id)
        references purchase_invoice (purchase_invoice_id);

    alter table purchase_invoice_item
        add index fk_PII_SUBGROUP (subGroup_id),
        add constraint fk_PII_SUBGROUP
        foreign key (subGroup_id)
        references sub_group (sub_group_id);

    alter table purchase_invoice_item
        add index fk_PII_INVENTORY (inventory_id),
        add constraint fk_PII_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table purchase_order
        add index fk_po_BER_WARE_HOUSE (ware_house),
        add constraint fk_po_BER_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table purchase_order
        add index fk_po_BER_PRRORITY_ID (priority_id),
        add constraint fk_po_BER_PRRORITY_ID
        foreign key (priority_id)
        references base_entity_record (record_id);

    alter table purchase_order
        add index fk_po_USER (user_id),
        add constraint fk_po_USER
        foreign key (user_id)
        references users (user_id);

    alter table purchase_order
        add index fk_po_MEDICAL_CENTER (medical_center_id),
        add constraint fk_po_MEDICAL_CENTER
        foreign key (medical_center_id)
        references center (center_id);

    alter table purchase_order
        add index fk_po_SUPPLIER (supplier_id),
        add constraint fk_po_SUPPLIER
        foreign key (supplier_id)
        references supplier (supplier_id);

    alter table purchase_order_item
        add index fk_POI_PURCHASE_ORDER (purchase_order_id),
        add constraint fk_POI_PURCHASE_ORDER
        foreign key (purchase_order_id)
        references purchase_order (purchase_request_id);

    alter table purchase_order_item
        add index fk_POI_CHANGE_UNIT (change_unit),
        add constraint fk_POI_CHANGE_UNIT
        foreign key (change_unit)
        references base_entity_record (record_id);

    alter table purchase_order_item
        add index fk_POI_INVENTORY (inventory_id),
        add constraint fk_POI_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table purchase_request
        add index fk_pr_BER_WARE_HOUSE (ware_house),
        add constraint fk_pr_BER_WARE_HOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table purchase_request
        add index fk_pr_BER_PRRORITY_ID (priority_id),
        add constraint fk_pr_BER_PRRORITY_ID
        foreign key (priority_id)
        references base_entity_record (record_id);

    alter table purchase_request
        add index fk_pr_USER (user_id),
        add constraint fk_pr_USER
        foreign key (user_id)
        references users (user_id);

    alter table purchase_request
        add index fk_pr_MEDICAL_CENTER (medical_center_id),
        add constraint fk_pr_MEDICAL_CENTER
        foreign key (medical_center_id)
        references center (center_id);

    alter table purchase_request_item
        add index fk_PRI_PURCHASE_ORDER (purchase_order_id),
        add constraint fk_PRI_PURCHASE_ORDER
        foreign key (purchase_order_id)
        references purchase_order (purchase_request_id);

    alter table purchase_request_item
        add index fk_PRI_CHANGE_UNIT (change_unit),
        add constraint fk_PRI_CHANGE_UNIT
        foreign key (change_unit)
        references base_entity_record (record_id);

    alter table purchase_request_item
        add index fk_PRI_PURCHASE_REQUEST (purchase_request_id),
        add constraint fk_PRI_PURCHASE_REQUEST
        foreign key (purchase_request_id)
        references purchase_request (purchase_request_id);

    alter table purchase_request_item
        add index fk_PRI_INVENTORY (inventory_id),
        add constraint fk_PRI_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table requestService_subService
        add index fk_RS_SERVICE_RSS (requestService_Id),
        add constraint fk_RS_SERVICE_RSS
        foreign key (requestService_Id)
        references Request_Service (requestService_Id);

    alter table requestService_subService
        add index fk_URS_SERVICE_SS (sub_servpce_id),
        add constraint fk_URS_SERVICE_SS
        foreign key (sub_servpce_id)
        references Sub_Service (subService_Id);

    alter table reservation
        add index fk_reservation144 (shift_id),
        add constraint fk_reservation144
        foreign key (shift_id)
        references base_entity_record (record_id);

    alter table reservation
        add index fk_reservation140 (organ_id),
        add constraint fk_reservation140
        foreign key (organ_id)
        references base_entity_record (record_id);

    alter table reservation
        add index fk_reservationPatient (patient_id),
        add constraint fk_reservationPatient
        foreign key (patient_id)
        references Patient (Patient_Id);

    alter table reservation
        add index fk_reservation147 (personnel_type),
        add constraint fk_reservation147
        foreign key (personnel_type)
        references base_entity_record (record_id);

    alter table reservation
        add index fk_reservation146 (personnel_unit_id),
        add constraint fk_reservation146
        foreign key (personnel_unit_id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table reservation
        add index fk_reservation145 (unit_id),
        add constraint fk_reservation145
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table revoke_invoice
        add index fk_ri_USER (user_id),
        add constraint fk_ri_USER
        foreign key (user_id)
        references users (user_id);

    alter table revoke_invoice
        add index fk_RI_PURCHASE_INVOICE (purchase_invoice_id),
        add constraint fk_RI_PURCHASE_INVOICE
        foreign key (purchase_invoice_id)
        references purchase_invoice (purchase_invoice_id);

    alter table revoke_invoice
        add index fk_RI_MEDICAL_CENTER (medical_center_id),
        add constraint fk_RI_MEDICAL_CENTER
        foreign key (medical_center_id)
        references center (center_id);

    alter table revoke_invoice
        add index fk_RI_SUPPLIER (supplier_id),
        add constraint fk_RI_SUPPLIER
        foreign key (supplier_id)
        references supplier (supplier_id);

    alter table revoke_invoice_item
        add index fk_RII_INVENTORY_TRANSACTION (inventory_transaction_id),
        add constraint fk_RII_INVENTORY_TRANSACTION
        foreign key (inventory_transaction_id)
        references inventory_transaction (inventory_transaction_id);

    alter table revoke_invoice_item
        add index fk_RII_REVOKE_INVOICE (revoke_invoice_id),
        add constraint fk_RII_REVOKE_INVOICE
        foreign key (revoke_invoice_id)
        references revoke_invoice (revoke_invoice_id);

    alter table revoke_invoice_item
        add index fk_RII_INVENTORY (inventory_id),
        add constraint fk_RII_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table role
        add index fk_role_center (center_id),
        add constraint fk_role_center
        foreign key (center_id)
        references center (center_id);

    alter table role_unit
        add index FK1407EBAD23162568 (role_id),
        add constraint FK1407EBAD23162568
        foreign key (role_id)
        references role (role_id);

    alter table role_unit
        add index FK1407EBAD2624261D (unit_id),
        add constraint FK1407EBAD2624261D
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table role_warehouse
        add index fk_I_BER_WAREHOUSE (ware_house),
        add constraint fk_I_BER_WAREHOUSE
        foreign key (ware_house)
        references base_entity_record (record_id);

    alter table role_warehouse
        add index fk_I_BER_ROLE (role_id),
        add constraint fk_I_BER_ROLE
        foreign key (role_id)
        references role (role_id);

    alter table room
        add index fk_BED_ROOM (medical_center_unit_id),
        add constraint fk_BED_ROOM
        foreign key (medical_center_unit_id)
        references center_unit (unit_id);

    alter table room
        add index fk_BER_ROOM_TYPE_ID (room_type_id),
        add constraint fk_BER_ROOM_TYPE_ID
        foreign key (room_type_id)
        references base_entity_record (record_id);

    alter table service_detail
        add index fk_servce_det_user (user_id),
        add constraint fk_servce_det_user
        foreign key (user_id)
        references users (user_id);

    alter table service_detail
        add index fk_subGroup_serviceDet (subGroup_id),
        add constraint fk_subGroup_serviceDet
        foreign key (subGroup_id)
        references sub_group (sub_group_id);

    alter table service_detail
        add index fk_servce_det_servc (service_id),
        add constraint fk_servce_det_servc
        foreign key (service_id)
        references Service (service_id);

    alter table service_manager
        add index FK3D8F8237564D708 (task_id),
        add constraint FK3D8F8237564D708
        foreign key (task_id)
        references MB_TASK (ID);

    alter table service_manager_role
        add index FK162BDF1223162568 (role_id),
        add constraint FK162BDF1223162568
        foreign key (role_id)
        references role (role_id);

    alter table service_manager_role
        add index FK162BDF12310A5BDD (service_manager_id),
        add constraint FK162BDF12310A5BDD
        foreign key (service_manager_id)
        references service_manager (service_manager_id);

    alter table service_unit
        add index service_unit_MCU (unit_id),
        add constraint service_unit_MCU
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table service_unit
        add index service_unit_service (service_id),
        add constraint service_unit_service
        foreign key (service_id)
        references Service (service_id);

    alter table special_prescription
        add index fk_SP_BER_CODE (special_type_code),
        add constraint fk_SP_BER_CODE
        foreign key (special_type_code)
        references base_entity_record (record_id);

    alter table special_prescription
        add index fk_SP_INVENTORY (inventory_id),
        add constraint fk_SP_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table sub_group
        add index fk_SG_INVENTORY (inventory_id),
        add constraint fk_SG_INVENTORY
        foreign key (inventory_id)
        references inventory (inventory_id);

    alter table top_service_unit
        add index top_service_unit_MCU (unit_id),
        add constraint top_service_unit_MCU
        foreign key (unit_id)
        references center_unit (unit_id);

    alter table top_service_unit
        add index top_service_unit_BER (record_id),
        add constraint top_service_unit_BER
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index unit_reception_service_PU (personnel_unit_id),
        add constraint unit_reception_service_PU
        foreign key (personnel_unit_id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table unit_reception_service
        add index un_rec_serv_surg_inf_fk (SURGERY_INFO_ID),
        add constraint un_rec_serv_surg_inf_fk
        foreign key (SURGERY_INFO_ID)
        references SURGERY_INFO (SURGERY_INFO_ID);

    alter table unit_reception_service
        add index fk_urc_unit (unit_Id),
        add constraint fk_urc_unit
        foreign key (unit_Id)
        references center_unit (unit_id);

    alter table unit_reception_service
        add index unit_reception_service_BER (record_id),
        add constraint unit_reception_service_BER
        foreign key (record_id)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index PRIM_INSURANCE_TYPE_FK (PRIM_INSURANCE_TYPE_ID),
        add constraint PRIM_INSURANCE_TYPE_FK
        foreign key (PRIM_INSURANCE_TYPE_ID)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index urs_inventoryTransaction (inventory_transaction),
        add constraint urs_inventoryTransaction
        foreign key (inventory_transaction)
        references inventory_transaction (inventory_transaction_id);

    alter table unit_reception_service
        add index unit_recep_srv_EDR (external_dr_id),
        add constraint unit_recep_srv_EDR
        foreign key (external_dr_id)
        references External_Dr (external_dr_id);

    alter table unit_reception_service
        add index unit_reception_service_UR (unit_reception_id),
        add constraint unit_reception_service_UR
        foreign key (unit_reception_id)
        references Unit_Reception (UnitReception_Id);

    alter table unit_reception_service
        add index unit_recep_srv_PU3 (internal_dr_id),
        add constraint unit_recep_srv_PU3
        foreign key (internal_dr_id)
        references personnel (personnel_id);

    alter table unit_reception_service
        add index unit_recep_srv_PU2 (dr_assistance_id),
        add constraint unit_recep_srv_PU2
        foreign key (dr_assistance_id)
        references Personnel_Unit (PersonnelUnit_Id);

    alter table unit_reception_service
        add index UNIT_RECEPTION_SERVICE_SUB_SERVICE (SUB_SERVICE_ID),
        add constraint UNIT_RECEPTION_SERVICE_SUB_SERVICE
        foreign key (SUB_SERVICE_ID)
        references Sub_Service (subService_Id);

    alter table unit_reception_service
        add index COMPLE_INSURANCE_TYPE_FK (COMPLE_INSURANCE_TYPE_ID),
        add constraint COMPLE_INSURANCE_TYPE_FK
        foreign key (COMPLE_INSURANCE_TYPE_ID)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index unit_recep_srv_BR (body_id),
        add constraint unit_recep_srv_BR
        foreign key (body_id)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index fk_lab (LAB_ID),
        add constraint fk_lab
        foreign key (LAB_ID)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index urs_subGroup (subGroup),
        add constraint urs_subGroup
        foreign key (subGroup)
        references sub_group (sub_group_id);

    alter table unit_reception_service
        add index fk_URS_BER_StoreType (Store_Type_Id),
        add constraint fk_URS_BER_StoreType
        foreign key (Store_Type_Id)
        references base_entity_record (record_id);

    alter table unit_reception_service
        add index unit_reception_service_service (service_id),
        add constraint unit_reception_service_service
        foreign key (service_id)
        references Service (service_id);

    alter table unit_reception_service
        add index fk_urc_ber (teeth_side_id),
        add constraint fk_urc_ber
        foreign key (teeth_side_id)
        references base_entity_record (record_id);

    alter table urs_sub_service
        add index fk_URS_SERVICE_URS (unit_reception_service_id),
        add constraint fk_URS_SERVICE_URS
        foreign key (unit_reception_service_id)
        references unit_reception_service (unit_reception_service_id);

    alter table urs_sub_service
        add index fk_URS_SERVICE_SS (sub_servpce_id),
        add constraint fk_URS_SERVICE_SS
        foreign key (sub_servpce_id)
        references Sub_Service (subService_Id);

    alter table user_role
        add index FK143BF46A23162568 (role_id),
        add constraint FK143BF46A23162568
        foreign key (role_id)
        references role (role_id);

    alter table user_role
        add index FK143BF46AC840E948 (user_id),
        add constraint FK143BF46AC840E948
        foreign key (user_id)
        references users (user_id);

    alter table users
        add index fk_user_center (center_id),
        add constraint fk_user_center
        foreign key (center_id)
        references center (center_id);
[INFO] schema export complete
[INFO]
[INFO] --- maven-compiler-plugin:2.0.2:testCompile (default-testCompile) @ snp-hospital ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ snp-hospital ---
[INFO]
[INFO] --- maven-war-plugin:2.0.2:war (default-war) @ snp-hospital ---
[INFO] Exploding webapp...
[INFO] Assembling webapp snp-hospital in D:\Java\Projects\snp\his\target\snp-hospital
[INFO] Copy webapp webResources to D:\Java\Projects\snp\his\target\snp-hospital
[INFO] Generating war D:\Java\Projects\snp\his\target\snp-hospital-0.3.10.r20140916.214757.war
[INFO] Building war: D:\Java\Projects\snp\his\target\snp-hospital-0.3.10.r20140916.214757.war
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ snp-hospital ---
[INFO] Installing D:\Java\Projects\snp\his\target\snp-hospital-0.3.10.r20140916.214757.war to D:\Java\repository\net\snp\hospital\snp-hospital\0.3.10\snp-hospital-0.3.10.war
[INFO] Installing D:\Java\Projects\snp\his\pom.xml to D:\Java\repository\net\snp\hospital\snp-hospital\0.3.10\snp-hospital-0.3.10.pom
[INFO]
[INFO] --- maven-dependency-plugin:2.8:copy (copy-to-deploy) @ snp-hospital ---
[INFO] Configured Artifact: net.snp.hospital:snp-hospital:0.3.10:war
[INFO] Copying snp-hospital-0.3.10.r20140916.214757.war to D:\Java\Projects\snp\his\target\dependency\snp-hospital.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 04:00 min
[INFO] Finished at: 2014-09-16T21:51:53+04:30
[INFO] Final Memory: 19M/113M
[INFO] ------------------------------------------------------------------------

Process finished with exit code 0