=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java 2013-09-17 06:08:16 +0000 @@ -30,6 +30,10 @@ import java.util.Collection; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.period.PeriodType; +import org.hisp.dhis.program.Program; + /** * @author Abyot Asalefew Gizaw * @version $Id$ @@ -73,5 +77,6 @@ Collection getPatientIdentifiers( Collection identifierTypes, Patient patient ); - boolean checkDuplicateIdentifier( Integer patientId, String identifier ); + boolean checkDuplicateIdentifier( PatientIdentifierType patientIdentifierType, String identifier, + OrganisationUnit orgunit, Program program, PeriodType periodType ); } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java 2013-09-17 06:08:16 +0000 @@ -30,6 +30,8 @@ import org.hisp.dhis.common.GenericIdentifiableObjectStore; import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.period.PeriodType; +import org.hisp.dhis.program.Program; import java.util.Collection; @@ -48,7 +50,10 @@ PatientIdentifier get( PatientIdentifierType type, String identifier ); - /* We need this since we have allowed identifiers with duplicate values in the past. This returns a list instead. */ + /* + * We need this since we have allowed identifiers with duplicate values in + * the past. This returns a list instead. + */ Collection getAll( PatientIdentifierType type, String identifier ); Collection getByIdentifier( String identifier ); @@ -69,6 +74,7 @@ Collection get( Collection identifierTypes, Patient patient ); - boolean checkDuplicateIdentifier( Integer patientId, String identifier ); + boolean checkDuplicateIdentifier( PatientIdentifierType patientIdentifierType, String identifier, + OrganisationUnit orgunit, Program program, PeriodType periodType ); } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2013-09-11 15:26:20 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2013-09-17 06:08:16 +0000 @@ -30,13 +30,14 @@ import org.hisp.dhis.common.BaseIdentifiableObject; import org.hisp.dhis.common.DxfNamespaces; +import org.hisp.dhis.period.PeriodType; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; -@XmlRootElement(name = "patientIdentifierType", namespace = DxfNamespaces.DXF_2_0) -@XmlAccessorType(value = XmlAccessType.NONE) +@XmlRootElement( name = "patientIdentifierType", namespace = DxfNamespaces.DXF_2_0 ) +@XmlAccessorType( value = XmlAccessType.NONE ) public class PatientIdentifierType extends BaseIdentifiableObject { @@ -52,8 +53,8 @@ public static final String VALUE_TYPE_NUMBER = "number"; public static final String VALUE_TYPE_LETTER = "letter"; - - public static final String VALUE_TYPE_ORGUNIT_COUNT = "orgunitCount"; + + public static final String VALUE_TYPE_LOCAL_ID = "localId"; private String description; @@ -67,6 +68,14 @@ private Boolean personDisplayName; + // For Local ID type + + private Boolean orgunitScope; + + private Boolean programScope; + + private PeriodType periodType; + // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- @@ -165,4 +174,34 @@ this.personDisplayName = personDisplayName; } + public Boolean getOrgunitScope() + { + return orgunitScope; + } + + public void setOrgunitScope( Boolean orgunitScope ) + { + this.orgunitScope = orgunitScope; + } + + public Boolean getProgramScope() + { + return programScope; + } + + public void setProgramScope( Boolean programScope ) + { + this.programScope = programScope; + } + + public PeriodType getPeriodType() + { + return periodType; + } + + public void setPeriodType( PeriodType periodType ) + { + this.periodType = periodType; + } + } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierService.java 2013-09-17 06:08:16 +0000 @@ -28,6 +28,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.period.PeriodType; +import org.hisp.dhis.program.Program; import org.springframework.transaction.annotation.Transactional; import java.util.Collection; @@ -142,8 +145,9 @@ } @Override - public boolean checkDuplicateIdentifier( Integer patientId, String identifier ) + public boolean checkDuplicateIdentifier( PatientIdentifierType patientIdentifierType, String identifier, + OrganisationUnit orgunit, Program program, PeriodType periodType ) { - return patientIdentifierStore.checkDuplicateIdentifier( patientId, identifier ); + return patientIdentifierStore.checkDuplicateIdentifier( patientIdentifierType, identifier, orgunit, program, periodType ); } } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierTypeService.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierTypeService.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientIdentifierTypeService.java 2013-09-17 06:08:16 +0000 @@ -33,6 +33,8 @@ import java.util.Collection; import org.hisp.dhis.i18n.I18nService; +import org.hisp.dhis.period.PeriodService; +import org.hisp.dhis.period.PeriodType; import org.springframework.transaction.annotation.Transactional; /** @@ -54,6 +56,13 @@ this.patientIdentifierTypeStore = patientIdentifierTypeStore; } + private PeriodService periodService; + + public void setPeriodService( PeriodService periodService ) + { + this.periodService = periodService; + } + private I18nService i18nService; public void setI18nService( I18nService service ) @@ -82,11 +91,25 @@ public int savePatientIdentifierType( PatientIdentifierType patientIdentifierType ) { + if ( patientIdentifierType.getPeriodType() != null ) + { + PeriodType periodType = periodService.reloadPeriodType( patientIdentifierType.getPeriodType() ); + + patientIdentifierType.setPeriodType( periodType ); + } + return patientIdentifierTypeStore.save( patientIdentifierType ); } public void updatePatientIdentifierType( PatientIdentifierType patientIdentifierType ) { + if ( patientIdentifierType.getPeriodType() != null ) + { + PeriodType periodType = periodService.reloadPeriodType( patientIdentifierType.getPeriodType() ); + + patientIdentifierType.setPeriodType( periodType ); + } + patientIdentifierTypeStore.update( patientIdentifierType ); } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/hibernate/HibernatePatientIdentifierStore.java 2013-09-17 06:08:16 +0000 @@ -29,6 +29,7 @@ */ import java.util.Collection; +import java.util.Date; import org.hibernate.criterion.Projections; import org.hibernate.criterion.Restrictions; @@ -38,6 +39,11 @@ import org.hisp.dhis.patient.PatientIdentifier; import org.hisp.dhis.patient.PatientIdentifierStore; import org.hisp.dhis.patient.PatientIdentifierType; +import org.hisp.dhis.period.Period; +import org.hisp.dhis.period.PeriodType; +import org.hisp.dhis.program.Program; +import org.hisp.dhis.system.util.DateUtils; +import org.springframework.jdbc.core.JdbcTemplate; /** * @author Abyot Asalefew Gizaw @@ -47,6 +53,21 @@ extends HibernateGenericStore implements PatientIdentifierStore { + // ------------------------------------------------------------------------- + // Dependencies + // ------------------------------------------------------------------------- + + private JdbcTemplate jdbcTemplate; + + public void setJdbcTemplate( JdbcTemplate jdbcTemplate ) + { + this.jdbcTemplate = jdbcTemplate; + } + + // ------------------------------------------------------------------------- + // Implementation methods + // ------------------------------------------------------------------------- + public PatientIdentifier get( Patient patient ) { return (PatientIdentifier) getCriteria( Restrictions.eq( "patient", patient ) ).uniqueResult(); @@ -67,8 +88,8 @@ @SuppressWarnings( "unchecked" ) public Collection getAll( PatientIdentifierType type, String identifier ) { - return getCriteria( Restrictions.eq( "identifierType", type ), - Restrictions.eq( "identifier", identifier ) ).list(); + return getCriteria( Restrictions.eq( "identifierType", type ), Restrictions.eq( "identifier", identifier ) ) + .list(); } @SuppressWarnings( "unchecked" ) @@ -129,10 +150,31 @@ .list(); } - public boolean checkDuplicateIdentifier( Integer patientId, String identifier ) + @SuppressWarnings( "deprecation" ) + public boolean checkDuplicateIdentifier( PatientIdentifierType patientIdentifierType, String identifier, + OrganisationUnit orgunit, Program program, PeriodType periodType ) { - Number rs = (Number) getCriteria( Restrictions.eq( "patient.id", patientId ) , Restrictions.ilike( "identifier", identifier ) ).setProjection( - Projections.rowCount() ).uniqueResult(); - return ( rs != null & rs.intValue() > 0 )? true: false; + String sql = "select count(*) from patientidentifier pi inner join patient p on pi.patientid=p.patientid " + + "inner join programinstance pis on pis.patientid=pi.patientid where pi.patientidentifiertypeid=" + + patientIdentifierType.getId() + " and pi.identifier='" + identifier + "' "; + if ( orgunit != null ) + { + sql += " and p.organisationunitid=" + orgunit.getId(); + } + + if ( program != null ) + { + sql += " and pis.programid=" + program.getId(); + } + + if ( periodType != null ) + { + Date currentDate = new Date(); + Period period = periodType.createPeriod( currentDate ); + sql += " and pis.enrollmentdate >='" + period.getStartDateString() + "' and pis.enrollmentdate <='" + + DateUtils.getMediumDateString( period.getEndDate() ) + "'"; + } + + return jdbcTemplate.queryForInt( sql ) == 0 ? false : true; } } === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-09-10 04:51:49 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-09-17 06:08:16 +0000 @@ -89,6 +89,7 @@ class="org.hisp.dhis.patient.hibernate.HibernatePatientIdentifierStore"> + + === modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml' --- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2013-02-07 10:25:34 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2013-09-17 06:08:16 +0000 @@ -8,7 +8,7 @@ - + &identifiableProperties; @@ -27,5 +27,12 @@ + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ValidatePatientAction.java 2013-09-17 06:08:16 +0000 @@ -29,10 +29,13 @@ */ import com.opensymphony.xwork2.Action; + import org.apache.commons.lang.StringUtils; import org.apache.struts2.ServletActionContext; import org.hisp.dhis.i18n.I18n; import org.hisp.dhis.i18n.I18nFormat; +import org.hisp.dhis.organisationunit.OrganisationUnit; +import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager; import org.hisp.dhis.patient.Patient; import org.hisp.dhis.patient.PatientIdentifier; import org.hisp.dhis.patient.PatientIdentifierService; @@ -46,6 +49,7 @@ import org.hisp.dhis.validation.ValidationCriteria; import javax.servlet.http.HttpServletRequest; + import java.util.Collection; import java.util.HashMap; import java.util.Map; @@ -74,6 +78,8 @@ private ProgramService programService; + private OrganisationUnitSelectionManager selectionManager; + // ------------------------------------------------------------------------- // Input // ------------------------------------------------------------------------- @@ -191,11 +197,30 @@ if ( StringUtils.isNotBlank( value ) ) { - boolean isDuplicate = patientIdentifierService.checkDuplicateIdentifier( id, value ); + boolean isDuplicate = false; + + if ( idType.getType().equals( PatientIdentifierType.VALUE_TYPE_LOCAL_ID ) ) + { + OrganisationUnit orgunit = (idType.getOrgunitScope()) ? selectionManager + .getSelectedOrganisationUnit() : null; + + Program program = (idType.getProgramScope()) ? programService.getProgram( programId ) + : null; + isDuplicate = patientIdentifierService.checkDuplicateIdentifier( idType, value, orgunit, + program, idType.getPeriodType() ); + } + else + { + PatientIdentifier identifier = patientIdentifierService.get( idType, value ); + if ( identifier != null && (id == null || identifier.getPatient().getId() != id) ) + { + idDuplicate += idType.getName() + ", "; + } + } if ( isDuplicate ) { - idDuplicate += value + ", "; + idDuplicate += idType.getName() + ", "; } } } @@ -291,6 +316,11 @@ this.patientService = patientService; } + public void setSelectionManager( OrganisationUnitSelectionManager selectionManager ) + { + this.selectionManager = selectionManager; + } + public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService ) { this.patientAttributeValueService = patientAttributeValueService; === modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-09-11 16:02:06 +0000 +++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-09-17 06:08:16 +0000 @@ -560,6 +560,9 @@ + + + periodTypes = new ArrayList(); + + public List getPeriodTypes() + { + return periodTypes; + } + + // ------------------------------------------------------------------------- + // Getters && Setters + // ------------------------------------------------------------------------- + + @Override + public String execute() + throws Exception + { + periodTypes = periodService.getAllPeriodTypes(); + + return SUCCESS; + } + +} === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ShowUpdatePatientIdentifierTypeForm.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ShowUpdatePatientIdentifierTypeForm.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/ShowUpdatePatientIdentifierTypeForm.java 2013-09-17 06:08:16 +0000 @@ -28,10 +28,14 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +import java.util.ArrayList; import java.util.Collection; +import java.util.List; import org.hisp.dhis.patient.PatientIdentifierType; import org.hisp.dhis.patient.PatientIdentifierTypeService; +import org.hisp.dhis.period.PeriodService; +import org.hisp.dhis.period.PeriodType; import org.hisp.dhis.program.Program; import org.hisp.dhis.program.ProgramService; @@ -53,6 +57,8 @@ private ProgramService programService; + private PeriodService periodService; + // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- @@ -63,6 +69,8 @@ private Collection programs; + private List periodTypes = new ArrayList(); + // ------------------------------------------------------------------------- // Getters && Setters // ------------------------------------------------------------------------- @@ -72,6 +80,11 @@ return patientIdentifierType; } + public void setPeriodService( PeriodService periodService ) + { + this.periodService = periodService; + } + public Collection getPrograms() { return programs; @@ -97,6 +110,11 @@ this.patientIdentifierTypeService = patientIdentifierTypeService; } + public List getPeriodTypes() + { + return periodTypes; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -105,6 +123,8 @@ throws Exception { patientIdentifierType = patientIdentifierTypeService.getPatientIdentifierType( id ); + + periodTypes = periodService.getAllPeriodTypes(); programs = programService.getAllPrograms(); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java 2013-09-17 06:08:16 +0000 @@ -30,6 +30,8 @@ import org.hisp.dhis.patient.PatientIdentifierType; import org.hisp.dhis.patient.PatientIdentifierTypeService; +import org.hisp.dhis.period.PeriodService; +import org.hisp.dhis.period.PeriodType; import com.opensymphony.xwork2.Action; @@ -46,6 +48,18 @@ private PatientIdentifierTypeService patientIdentifierTypeService; + public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService ) + { + this.patientIdentifierTypeService = patientIdentifierTypeService; + } + + private PeriodService periodService; + + public void setPeriodService( PeriodService periodService ) + { + this.periodService = periodService; + } + // ------------------------------------------------------------------------- // Input/Output // ------------------------------------------------------------------------- @@ -64,6 +78,14 @@ private String type; + // For Local ID type + + private Boolean orgunitScope; + + private Boolean programScope; + + private String periodTypeName; + // ------------------------------------------------------------------------- // Getters && Setters // ------------------------------------------------------------------------- @@ -88,11 +110,6 @@ this.name = name; } - public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService ) - { - this.patientIdentifierTypeService = patientIdentifierTypeService; - } - public void setId( Integer id ) { this.id = id; @@ -107,7 +124,22 @@ { this.related = related; } - + + public void setOrgunitScope( Boolean orgunitScope ) + { + this.orgunitScope = orgunitScope; + } + + public void setProgramScope( Boolean programScope ) + { + this.programScope = programScope; + } + + public void setPeriodTypeName( String periodTypeName ) + { + this.periodTypeName = periodTypeName; + } + // ------------------------------------------------------------------------- // Action implementation // ------------------------------------------------------------------------- @@ -120,16 +152,27 @@ { identifierType.setName( name ); identifierType.setDescription( description ); - + related = (related == null) ? false : true; identifierType.setRelated( related ); - + mandatory = (mandatory == null) ? false : true; identifierType.setMandatory( mandatory ); - + identifierType.setNoChars( noChars ); identifierType.setType( type ); + if ( type.equals( PatientIdentifierType.VALUE_TYPE_LOCAL_ID ) ) + { + orgunitScope = (orgunitScope == null) ? false : orgunitScope; + programScope = (programScope == null) ? false : programScope; + PeriodType periodType = periodService.getPeriodTypeByName( periodTypeName ); + + identifierType.setOrgunitScope( orgunitScope ); + identifierType.setProgramScope( programScope ); + identifierType.setPeriodType( periodType ); + } + patientIdentifierTypeService.updatePatientIdentifierType( identifierType ); } === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2013-09-05 17:59:57 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/META-INF/dhis/beans.xml 2013-09-17 06:08:16 +0000 @@ -159,7 +159,7 @@ - + - + - - + @@ -224,7 +223,7 @@ - @@ -238,7 +237,7 @@ - - - + @@ -340,8 +338,7 @@ - + - + - + + + + + + + + + @@ -1197,7 +1205,7 @@ - + + class="org.hisp.dhis.patient.action.patientidentifiertype.ShowAddPatientIdentifierTypeFormAction"> /main.vm /dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2013-07-04 06:47:28 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2013-09-17 06:08:16 +0000 @@ -42,7 +42,7 @@ - + @@ -54,7 +54,40 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2013-09-17 06:08:16 +0000 @@ -128,7 +128,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2013-07-17 08:40:02 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientIdentifierType.js 2013-09-17 06:08:16 +0000 @@ -37,12 +37,12 @@ function typeOnChange() { var type = getFieldValue('type'); - if(type=='orgunitCount') + if(type=='localId') { - disable('noChars'); + jQuery('[name=localIdField]').show(); } else { - enable('noChars'); + jQuery('[name=localIdField]').hide(); } } \ No newline at end of file === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2013-07-04 09:32:22 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2013-09-17 06:08:16 +0000 @@ -43,7 +43,7 @@ - + @@ -55,12 +55,44 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-09-16 09:47:59 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2013-09-17 06:08:16 +0000 @@ -82,7 +82,7 @@ }); - +$program.dataEntryMethod

$i18n.getString( "edit_program" )

@@ -127,9 +127,9 @@ - + - +