=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2012-07-30 10:56:25 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2012-09-05 01:41:15 +0000 @@ -87,6 +87,18 @@ // Input/Output // ------------------------------------------------------------------------- + private Boolean addNewForm; + + public Boolean getAddNewForm() + { + return addNewForm; + } + + public void setAddNewForm( Boolean addNewForm ) + { + this.addNewForm = addNewForm; + } + private Collection noGroupAttributes; private List attributeGroups; === 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-09-04 10:10:05 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2012-09-05 01:41:15 +0000 @@ -110,7 +110,8 @@ view_patient_chart=View patient chart generate_patient_chart=Generate patient chart patient_chart_management=Patient chart management -intro_patient=Create, modify and search for persons. Any type of data can be registered for a person through attributes. +intro_find_and_add_person=Create, modify and search for persons. Any type of data can be registered for a person through attributes. +intro_add_person=Add new person. Any type of data can be registered for a person through attributes. registration=Registration select_relationship=Select relationship please_select_a_representative=Please select a representative @@ -426,4 +427,6 @@ no_message = No message program_reports = Program reports show_hide_content = Show/Hide content -completed_date = Completed date \ No newline at end of file +completed_date = Completed date +find_and_add_person = Find/Add Person +add_person = Add Person \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-04 10:10:05 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/struts.xml 2012-09-05 01:41:15 +0000 @@ -410,6 +410,24 @@ style/style.css F_PATIENT_MANAGEMENT + + + + /main.vm + /dhis-web-caseentry/addPatientForm.vm + /dhis-web-caseentry/registrationMenu.vm + + ../dhis-web-commons/ouwt/ouwt.js + ,javascript/commons.js + ,javascript/patient.js + ,javascript/entry.js + ,javascript/relationshipPatient.js + + style/style.css + F_PATIENT_ADD + + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2012-08-02 02:48:18 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/addPatientForm.vm 2012-09-05 01:41:15 +0000 @@ -41,14 +41,18 @@
- + #parse( "/dhis-web-caseentry/patientForm.vm" )
- + #if( $addNewForm == "true") + + #else + + #end
@@ -58,4 +62,5 @@ \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm 2012-07-26 06:12:27 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/index.vm 2012-09-05 01:41:15 +0000 @@ -2,7 +2,8 @@

$i18n.getString( "dhis-web-caseentry" )

    - #introListImgItem( "patient.action" "patient" "patient" ) + #introListImgItem( "patient.action" "find_and_add_person" "patient" ) + #introListImgItem( "showAddPatientFormFormMenu.action?addNewForm=true" "add_person" "add_patient" ) #introListImgItem( "multipledataEntrySelect.action" "multiple_individual_records" "dataentry" ) #introListImgItem( "singleEventSelect.action" "single_event_with_registration" "dataentry" ) #introListImgItem( "anonymousRegistration.action" "anonymous_events" "dataentry" ) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-09-04 10:10:05 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2012-09-05 01:41:15 +0000 @@ -48,11 +48,11 @@ function validateAddPatient() { - $("#editPatientDiv :input").attr("disabled", true); + $("#patientForm :input").attr("disabled", true); $.ajax({ type: "POST", url: 'validatePatient.action', - data: getParamsForDiv('editPatientDiv'), + data: getParamsForDiv('patientForm'), success:addValidationCompleted }); } @@ -69,7 +69,6 @@ } else { - $("#editPatientDiv :input").attr("disabled", true); if ( type == 'error' ) { showErrorMessage( i18n_adding_patient_failed + ':' + '\n' + message ); @@ -83,7 +82,7 @@ showListPatientDuplicate(data, false); } - $("#editPatientDiv :input").attr("disabled", false); + $("#patientForm :input").attr("disabled", false); } } @@ -281,15 +280,27 @@ $.ajax({ type: "POST", url: 'addPatient.action', - data: getParamsForDiv('editPatientDiv'), + data: getParamsForDiv('patientForm'), success: function(json) { var patientId = json.message.split('_')[0]; var systemIdentifierId = json.message.split('_')[1]; jQuery('#advSearchBox0 [id="searchText"]').val( systemIdentifierId ); statusSearching = 1; - - showPatientDashboardForm( patientId ); - jQuery('#resultSearchDiv').dialog('close'); + if( getFieldValue("addNewForm")=="true") + { + $("#patientForm :input").attr("disabled", false); + $("#patientForm :input").each(function(){ + if( this.type!='button' || this.type!='submit' ){ + this.value = ""; + } + }); + showSuccessMessage(i18n_add_person_successfully); + } + else + { + showPatientDashboardForm( patientId ); + jQuery('#resultSearchDiv').dialog('close'); + } } }); return false; === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm 2012-08-09 08:57:01 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/menu.vm 2012-09-05 01:41:15 +0000 @@ -1,7 +1,8 @@ -

    $i18n.getString( "registration" ) 

    +

    $i18n.getString( "patient" ) 

    $i18n.getString( "data_entry" ) 

    === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-08-28 05:48:46 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2012-09-05 01:41:15 +0000 @@ -10,8 +10,7 @@ $i18n.getString( "advanced_search_patients" ) #end - - + $i18n.getString( "total_result" )   @@ -80,7 +79,7 @@ #end #end - $!patient.getFullName() + $!patient.getFullName() $i18n.getString($!patient.gender) === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm 2012-05-15 07:12:41 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/registrationMenu.vm 2012-09-05 01:41:15 +0000 @@ -1,8 +1,9 @@ -

    $i18n.getString( "registration" ) 

    +

    $i18n.getString( "patient" ) 


    === added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/add_patient.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/add_patient.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/icons/add_patient.png 2012-09-05 01:41:15 +0000 differ