dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15544
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5652: Add missing file ( Patient module ).
------------------------------------------------------------
revno: 5652
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2012-01-03 13:11:36 +0700
message:
Add missing file ( Patient module ).
added:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js
--
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
=== added file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/multiDataEntry.js 2012-01-03 06:11:36 +0000
@@ -0,0 +1,87 @@
+
+function multiDataEntryOrgunitSelected( orgUnits, orgUnitNames )
+{
+ hideById("listPatient");
+ jQuery.postJSON( "getPrograms.action",
+ {
+ },
+ function( json )
+ {
+ enable('programId');
+ enable('patientAttributeId');
+
+ clearListById('programId');
+ if(json.programs.length == 0)
+ {
+ disable('programId');
+ disable('patientAttributeId');
+ }
+ else
+ {
+ addOptionById( 'programId', "0", i18n_select );
+
+ for ( var i in json.programs )
+ {
+ addOptionById( 'programId', json.programs[i].id, json.programs[i].name );
+ }
+ }
+ setFieldValue( 'orgunitName', orgUnitNames[0] );
+ });
+}
+
+selection.setListenerFunction( multiDataEntryOrgunitSelected );
+
+
+
+function selectProgram()
+{
+ setInnerHTML('listPatient', '');
+ if( getFieldValue('programId') == 0 )
+ {
+ hideById('listPatient');
+ return;
+ }
+
+ contentDiv = 'listPatient';
+ showLoader();
+ jQuery('#listPatient').load("getDataRecords.action",
+ {
+ programId:getFieldValue('programId'),
+ sortPatientAttributeId: getFieldValue('patientAttributeId')
+ },
+ function()
+ {
+ showById("listPatient");
+ hideLoader();
+ });
+}
+
+function viewPrgramStageRecords( programStageInstanceId )
+{
+ $('#contentDataRecord').dialog('destroy').remove();
+ $('<div id="contentDataRecord">' ).load("viewProgramStageRecords.action",
+ {
+ programStageInstanceId: programStageInstanceId
+ }).dialog(
+ {
+ title: 'ProgramStage',
+ maximize: true,
+ closable: true,
+ modal:false,
+ overlay:{background:'#000000', opacity:0.1},
+ width: 800,
+ height: 400
+ });
+}
+
+function loadProgramStageRecords( programStageInstanceId )
+{
+ setInnerHTML('dataEntryFormDiv', '');
+ showLoader();
+ $('#dataEntryFormDiv' ).load("loadProgramStageRecords.action",
+ {
+ programStageInstanceId: programStageInstanceId
+ }, function() {
+ hideLoader();
+ });
+}