forked from openmrs/openmrs-module-patientmatching
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PTM-84: Functionality to support two datasources
- Loading branch information
1 parent
a327c3e
commit b8adb68
Showing
14 changed files
with
828 additions
and
47 deletions.
There are no files selected for viewing
231 changes: 196 additions & 35 deletions
231
api/src/main/java/org/openmrs/module/patientmatching/MatchingReportUtils.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping> | ||
<class name="org.openmrs.module.patientmatching.ConfigurationEntry" table="patientmatching_configurationEntries"> | ||
|
||
<id name="entryId" column="entry_id" | ||
unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
<discriminator column="entry_id" insert="false" /> | ||
|
||
<many-to-one name="patientMatchingConfiguration" class="org.openmrs.module.patientmatching.PatientMatchingConfiguration" not-null="true"> | ||
<column name="configuration_id" /> | ||
</many-to-one> | ||
|
||
<property name="fieldViewName" column="field_view_name" length="255" unique="true" /> | ||
<property name="fieldName" column="field_name" not-null="true" /> | ||
<property name="inclusion" column="inclusion" not-null="false" /> | ||
<property name="blockOrder" column="block_order" not-null="false" /> | ||
<property name="flag" column="flag" not-null="false" /> | ||
</class> | ||
</hibernate-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping> | ||
<class name="org.openmrs.module.patientmatching.MatchingRecord" table="patientmatching_matchingset"> | ||
<id name="setId" column="set_id" unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
<property name="groupId" type="java.lang.Integer" column="group_id" not-null="true" /> | ||
<many-to-one name="report" class="org.openmrs.module.patientmatching.Report" not-null="true"> | ||
<column name="report_id" /> | ||
</many-to-one> | ||
<many-to-one name="patient" column="patient_id" class="org.openmrs.Patient"/> | ||
<property name="state" type="java.lang.String" column="state" not-null="true"/> | ||
<set name="matchingRecordAttributeSet" lazy="true" inverse="true" cascade="all-delete-orphan" sort="natural"> | ||
<key column="matching_record_id" not-null="true"/> | ||
<one-to-many class="org.openmrs.module.patientmatching.MatchingRecordAttribute"/> | ||
</set> | ||
</class> | ||
</hibernate-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping auto-import="false"> | ||
<class name="org.openmrs.module.patientmatching.MatchingRecordAttribute" table="patientmatching_matching_attribute"> | ||
<id name="recordAttributeId" column="record_attribute_id" | ||
unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
<many-to-one name="matchingRecord" class="org.openmrs.module.patientmatching.MatchingRecord" not-null="true"> | ||
<column name="matching_record_id" /> | ||
</many-to-one> | ||
<property name="fieldName" column="field_name" length="128" /> | ||
<property name="fieldValue" column="field_value" not-null="true" length="128"/> | ||
</class> | ||
</hibernate-mapping> |
23 changes: 23 additions & 0 deletions
23
api/src/main/resources/PatientMatchingConfiguration.hbm.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping package="org.openmrs.module.patientmatching"> | ||
<class name="PatientMatchingConfiguration" table="patientmatching_configuration"> | ||
|
||
<id name="configurationId" column="configuration_id" unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
|
||
<property name="configurationName" column="configuration_name" length="255" unique="true" /> | ||
<property name="randomSampleSize" column="random_sample_size" not-null="true" /> | ||
<property name="usingRandomSample" column="using_random_sample" not-null="true"/> | ||
<property name="estimatedPairs" column="estimated_pairs" not-null="true"/> | ||
<property name="estimatedTime" column="estimated_time" not-null="true"/> | ||
<property name="totalRecords" column="total_records" not-null="true"/> | ||
|
||
<!-- bi-directional one-to-many association --> | ||
<set name="configurationEntries" lazy="true" inverse="true" cascade="all-delete-orphan" sort="natural"> | ||
<key column="configuration_id" not-null="true" /> | ||
<one-to-many class="org.openmrs.module.patientmatching.ConfigurationEntry" /> | ||
</set> | ||
|
||
</class> | ||
</hibernate-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping auto-import="false"> | ||
<class name="org.openmrs.module.patientmatching.Report" table="patientmatching_report"> | ||
<id name="reportId" column="report_id" | ||
unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
|
||
<property name="reportName" column="report_name" length="255" /> | ||
<property name="createdOn" type="java.util.Date" column="created_on" not-null="true" length="19"/> | ||
|
||
<many-to-one name="createdBy" class="org.openmrs.User"> | ||
<column name="created_by" /> | ||
</many-to-one> | ||
|
||
<set name="matchingRecordSet" lazy="true" inverse="true" cascade="all-delete-orphan" sort="natural"> | ||
<key column="report_id" not-null="true"/> | ||
<one-to-many class="org.openmrs.module.patientmatching.MatchingRecord"/> | ||
</set> | ||
|
||
<set name="reportGenerationSteps" lazy="true" inverse="true" cascade="all-delete-orphan" sort="natural"> | ||
<key column="report_id" not-null="true"/> | ||
<one-to-many class="org.openmrs.module.patientmatching.ReportGenerationStep"/> | ||
</set> | ||
|
||
<set name="usedConfigurationList" table="patientmatching_report_configuration" cascade="none"> | ||
<key column="report_id"/> | ||
<many-to-many column="configuration_id" | ||
class="org.openmrs.module.patientmatching.PatientMatchingConfiguration"/> | ||
</set> | ||
|
||
</class> | ||
</hibernate-mapping> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> | ||
<hibernate-mapping> | ||
<class name="org.openmrs.module.patientmatching.ReportGenerationStep" table=" patientmatching_report_generation_step"> | ||
|
||
<id name="stepId" type="int" column="step_id" | ||
unsaved-value="0"> | ||
<generator class="identity" /> | ||
</id> | ||
|
||
<many-to-one name="report" class="org.openmrs.module.patientmatching.Report" not-null="true"> | ||
<column name="report_id" /> | ||
</many-to-one> | ||
|
||
<property name="processName" type="java.lang.String" column="process_name" length="50" /> | ||
<property name="sequenceNo" type="java.lang.Integer" column="sequence_number" not-null="true" /> | ||
<property name="timeTaken" type="java.lang.Integer" column="time_taken" not-null="false" /> | ||
</class> | ||
</hibernate-mapping> |
Oops, something went wrong.