=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-03-20 17:57:30 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/ShowAddPatientFormAction.java 2011-05-25 02:34:58 +0000 @@ -94,17 +94,13 @@ private OrganisationUnit organisationUnit; private String year; - - private boolean showMsg; - + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- public String execute() { - - showMsg = false; identifierTypes = patientIdentifierTypeService.getAllPatientIdentifierTypes(); noGroupAttributes = patientAttributeService.getPatientAttributesNotGroup(); @@ -113,18 +109,11 @@ organisationUnit = selectionManager.getSelectedOrganisationUnit(); - for ( PatientIdentifierType identifierType : identifierTypes ) - { - if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" ) - && identifierType.isMandatory() == true ) - { - if ( organisationUnit.getCode() == null || organisationUnit.getCode().length() < 9 ) - showMsg = true; - } - } - + SimpleDateFormat dataFormat = new SimpleDateFormat( "y" ); + year = dataFormat.format( new Date() ); + return SUCCESS; } @@ -156,9 +145,4 @@ { return year; } - - public boolean isShowMsg() - { - return showMsg; - } } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-05-13 09:11:13 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-05-25 02:34:58 +0000 @@ -8,10 +8,6 @@ #end #end -#if($showMsg == "true" ) -
$i18n.getString( "oucode_must_be_valid" )
-#else -