← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7321: Modify patientdatavaluearchive schema.

 

------------------------------------------------------------
revno: 7321
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2012-06-18 14:02:55 +0700
message:
  Modify patientdatavaluearchive schema.
modified:
  dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java
  dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java
  dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java'
--- dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java	2012-03-15 09:25:30 +0000
+++ dhis-2/dhis-services/dhis-service-administration/src/main/java/org/hisp/dhis/dataarchive/jdbc/JdbcDataArchiveStore.java	2012-06-18 07:02:55 +0000
@@ -171,7 +171,7 @@
         // Move data from patientdatavalue to patientdatavaluearchive
         String sql = "INSERT INTO patientdatavaluearchive ( " 
             + "SELECT pdv.programstageinstanceid, pdv.dataelementid, pdv.value, "
-                    +" pdv.timestamp FROM patientdatavalue AS pdv "
+                    +" providedelsewhere, pdv.timestamp FROM patientdatavalue AS pdv "
             + "INNER JOIN programstageinstance AS psi " 
                 + "ON pdv.programstageinstanceid = psi.programstageinstanceid "
             + "INNER JOIN programinstance AS pi " 
@@ -194,7 +194,7 @@
         // Move data from patientdatavalue to patientdatavaluearchive
         String sql = "INSERT INTO patientdatavalue ( " 
             + "SELECT pdv.programstageinstanceid, pdv.dataelementid, pdv.value, "
-                    +"pdv.timestamp FROM patientdatavaluearchive AS pdv "
+                    +"providedelsewhere, pdv.timestamp FROM patientdatavaluearchive AS pdv "
             + "INNER JOIN programstageinstance AS psi " 
                 + "ON pdv.programstageinstanceid = psi.programstageinstanceid "
             + "INNER JOIN programinstance AS pi " 

=== modified file 'dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java'
--- dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java	2012-02-17 12:10:18 +0000
+++ dhis-2/dhis-services/dhis-service-core/src/main/java/org/hisp/dhis/startup/TableCreator.java	2012-06-18 07:02:55 +0000
@@ -103,10 +103,10 @@
              " dataelementid integer NOT NULL, " +
              " organisationunitid integer NOT NULL, " +
              " value varchar(255) default NULL, " +
-             " providedbyanotherfacility boolean NOT NULL, " +
+             " providedelsewhere boolean, " +
              " timestamp TIMESTAMP, " +
              " PRIMARY KEY  (programstageinstanceid,dataelementid,organisationunitid), " +
-             " CONSTRAINT fk_patientdatavaluearchive_organisationunitid FOREIGN KEY (organisationunitid) REFERENCES organisationunit (organisationunitid), " +
+             " CONSTRAINT fk_patientdatavaluearchivepatientdatavaluearchive_organisationunitid FOREIGN KEY (organisationunitid) REFERENCES organisationunit (organisationunitid), " +
              " CONSTRAINT fk_patientdatavaluearchive_programstageinstanceid FOREIGN KEY (programstageinstanceid) REFERENCES programstageinstance (programstageinstanceid) );";
         
         createSilently( sqlPatientDataValueArchive, "patientdatavaluearchive" );

=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2012-06-18 02:36:01 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/DefaultProgramDataEntryService.java	2012-06-18 07:02:55 +0000
@@ -967,7 +967,7 @@
     private String addProvidedElsewherCheckbox( String appendCode, PatientDataValue patientDataValue,
         ProgramStage programStage )
     {
-        appendCode += "<label for=\"$PROGRAMSTAGEID_$DATAELEMENTID_facility\" title=\"is provided by another Facility ?\" ></label><input name=\"providedByAnotherFacility\"  title=\"is provided by another Facility ?\"  id=\"$PROGRAMSTAGEID_$DATAELEMENTID_facility\"  type=\"checkbox\" style=\"display:$DISPLAY;\" ";
+        appendCode += "<label for=\"$PROGRAMSTAGEID_$DATAELEMENTID_facility\" title=\"is provided by another Facility ?\" ></label><input name=\"providedByAnotherFacility\"  title=\"is provided by another Facility ?\"  id=\"$PROGRAMSTAGEID_$DATAELEMENTID_facility\"  type=\"checkbox\" ";
 
         if ( patientDataValue != null && patientDataValue.getProvidedElsewhere() )
         {
@@ -976,9 +976,6 @@
 
         appendCode += "onChange=\"updateProvidingFacility( $DATAELEMENTID, this )\"  >";
 
-        String display = (!programStage.getProgram().isRegistration()) ? "none" : "block";
-        appendCode = appendCode.replace( "$DISPLAY", display );
-
         return appendCode;
 
     }

=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-06-18 03:29:11 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties	2012-06-18 07:02:55 +0000
@@ -356,7 +356,7 @@
 events = Events
 orgunit_groups = Groups
 not_empty = The value must be not empty.
-seach_available_patients = Seach available persons
+seach_available_patient = Seach available person
 set_as_representative = Set as representative
 set_as_representative_and_copy_attributes_for_the_person = Set as representative and copy attributes for the person
 is_not_representative = Is not representative ?