dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #12267
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 3735: Removed "Identifier Format" property of IdentifierType.
------------------------------------------------------------
revno: 3735
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2011-05-25 13:27:29 +0700
message:
Removed "Identifier Format" property of IdentifierType.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java
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/resources/org/hisp/dhis/patient/i18n_module.properties
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/addPatientIdentifierTypeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm
--
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-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2011-05-05 21:14:56 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierType.java 2011-05-25 06:27:29 +0000
@@ -52,8 +52,6 @@
private String description;
- private String format;
-
private boolean mandatory;
private boolean related;
@@ -70,11 +68,10 @@
{
}
- public PatientIdentifierType( String name, String description, String format )
+ public PatientIdentifierType( String name, String description )
{
this.name = name;
this.description = description;
- this.format = format;
}
// -------------------------------------------------------------------------
@@ -144,16 +141,6 @@
this.description = description;
}
- public String getFormat()
- {
- return format;
- }
-
- public void setFormat( String format )
- {
- this.format = format;
- }
-
public boolean isMandatory()
{
return mandatory;
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2011-05-25 05:27:00 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2011-05-25 06:27:29 +0000
@@ -92,6 +92,8 @@
executeSql( "UPDATE patientidentifiertype SET type='" + PatientIdentifierType.VALUE_TYPE_TEXT
+ "' WHERE type IS NULL" );
+ executeSql( "ALTER TABLE patientidentifiertype DROP COLUMN format" );
+
executeSql( "ALTER TABLE program DROP COLUMN minDaysAllowedInputData" );
executeSql( "UPDATE program SET maxDaysAllowedInputData=0 WHERE maxDaysAllowedInputData IS NULL" );
=== 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 2011-04-12 13:44:50 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/PatientIdentifierType.hbm.xml 2011-05-25 06:27:29 +0000
@@ -14,8 +14,6 @@
<property name="description" />
- <property name="format" />
-
<property name="mandatory" not-null="true" />
<property name="related" not-null="true" />
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java 2011-05-01 09:07:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/report/GetPatientDetailsAction.java 2011-05-25 06:27:29 +0000
@@ -97,14 +97,6 @@
private String systemIdentifier;
- private String benicode;
-
- private String yearcode;
-
- private String progcode;
-
- private String orgunitcode;
-
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -142,15 +134,6 @@
if ( idType != null )
{
identiferMap.put( identifier.getIdentifierType().getId(), identifier.getIdentifier() );
-
- if ( idType.getFormat().equals( "State Format" ) )
- {
- String iden = identifier.getIdentifier();
- benicode = iden.substring( 12, 16 );// abcdefghi1121111
- yearcode = iden.substring( 10, 12 );
- progcode = iden.substring( 9, 10 );
- orgunitcode = iden.substring( 0, 9 );
- }
}
else
{
@@ -290,24 +273,4 @@
return systemIdentifier;
}
- public String getBenicode()
- {
- return benicode;
- }
-
- public String getOrgunitcode()
- {
- return orgunitcode;
- }
-
- public String getProgcode()
- {
- return progcode;
- }
-
- public String getYearcode()
- {
- return yearcode;
- }
-
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/AddPatientAction.java 2011-05-25 06:27:29 +0000
@@ -110,9 +110,9 @@
private Integer representativeId;
private Integer relationshipTypeId;
-
+
private String message;
-
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -199,15 +199,9 @@
{
for ( PatientIdentifierType identifierType : identifierTypes )
{
- if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" ) )
- {
- value = organisationUnit.getCode() + request.getParameter( "progcode" )
- + request.getParameter( "yearcode" ) + request.getParameter( "benicode" );
- }
- else
- {
- value = request.getParameter( PREFIX_IDENTIFIER + identifierType.getId() );
- }
+
+ value = request.getParameter( PREFIX_IDENTIFIER + identifierType.getId() );
+
if ( StringUtils.isNotBlank( value ) )
{
pIdentifier = new PatientIdentifier();
@@ -297,10 +291,11 @@
// Save patient
// -------------------------------------------------------------------------
- Integer id = patientService.createPatient( patient, representativeId, relationshipTypeId, patientAttributeValues );
+ Integer id = patientService.createPatient( patient, representativeId, relationshipTypeId,
+ patientAttributeValues );
message = id + "";
-
+
return SUCCESS;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-05-13 09:11:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/GetPatientAction.java 2011-05-25 06:27:29 +0000
@@ -146,15 +146,6 @@
if ( idType != null )
{
identiferMap.put( identifier.getIdentifierType().getId(), identifier.getIdentifier() );
-
- if ( idType.getFormat().equals( "State Format" ) )
- {
- String iden = identifier.getIdentifier();
- benicode = iden.substring( 12, 16 );
- yearcode = iden.substring( 10, 12 );
- progcode = iden.substring( 9, 10 );
- orgunitcode = iden.substring( 0, 9 );
- }
}
else
{
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java 2011-05-10 09:10:04 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patient/UpdatePatientAction.java 2011-05-25 06:27:29 +0000
@@ -202,15 +202,7 @@
{
for ( PatientIdentifierType identifierType : identifierTypes )
{
- if ( identifierType.getFormat() != null && identifierType.getFormat().equals( "State Format" ) )
- {
- value = request.getParameter( "progcode" ) + request.getParameter( "yearcode" )
- + request.getParameter( "benicode" );
- }
- else
- {
- value = request.getParameter( AddPatientAction.PREFIX_IDENTIFIER + identifierType.getId() );
- }
+ value = request.getParameter( AddPatientAction.PREFIX_IDENTIFIER + identifierType.getId() );
identifier = patientIdentifierService.getPatientIdentifier( identifierType, patient );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/AddPatientIdentifierTypeAction.java 2011-05-25 06:27:29 +0000
@@ -51,8 +51,6 @@
private String name;
- private String formater;
-
private String description;
private Boolean mandatory;
@@ -67,11 +65,6 @@
// Getters && Setters
// -------------------------------------------------------------------------
- public void setFormater( String formater )
- {
- this.formater = formater;
- }
-
public void setName( String name )
{
this.name = name;
@@ -117,7 +110,6 @@
PatientIdentifierType patientIdentifierType = new PatientIdentifierType();
patientIdentifierType.setName( name );
patientIdentifierType.setDescription( description );
- patientIdentifierType.setFormat( formater == null ? "" : formater );
patientIdentifierType.setRelated( related.booleanValue() );
patientIdentifierType.setMandatory( mandatory.booleanValue() );
patientIdentifierType.setNoChars( noChars );
=== 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 2011-03-31 01:42:05 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/patientidentifiertype/UpdatePatientIdentifierTypeAction.java 2011-05-25 06:27:29 +0000
@@ -55,8 +55,6 @@
private String description;
- private String formater;
-
private Boolean mandatory;
private Boolean related;
@@ -99,11 +97,6 @@
this.id = id;
}
- public void setFormater( String formater )
- {
- this.formater = formater;
- }
-
public void setMandatory( Boolean mandatory )
{
this.mandatory = mandatory;
@@ -126,7 +119,6 @@
{
identifierType.setName( name );
identifierType.setDescription( description );
- identifierType.setFormat( formater == null ? "" : formater );
identifierType.setMandatory( mandatory.booleanValue() );
identifierType.setRelated( related.booleanValue() );
identifierType.setNoChars( noChars );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-05-24 14:48:37 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2011-05-25 06:27:29 +0000
@@ -395,11 +395,9 @@
month = Month
year = Year
please_verify_birthday = Please verify the birthday.
-state_format = State Format
no_of_char = Number of characters
letter = Letter
date_of_incident_invalid = Date of Enrollment should be greater and equals to Date of incident
-no_min_days_allowed_input_data = Number of min days allowed to input data
no_max_days_allowed_input_data = Number of max days allowed to input data
program_attribute = Program Attribute
program_attribute_management = Program Attribute Management
=== 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-25 03:18:02 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientForm.vm 2011-05-25 06:27:29 +0000
@@ -152,23 +152,8 @@
#foreach ($identifierType in $identifierTypes)
<tr>
<td><label>$identifierType.name #if($identifierType.mandatory == true )<em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
-
- #if($identifierType.format == "State Format")
- <td><input type="hidden" id="iden$identifierType.id" name="iden$identifierType.id"/>
- <table>
- <tr valign="top">
- <td><input type="text" id="orgunitcode" name="orgunitcode" disabled="disabled" value="$!organisationUnit.code" maxlength="9" size="10"/> <br/> <div class='stateformat'>$i18n.getString('registering_unit')<br>$i18n.getString('code')</div></td>
- <td> - <input type="text" id="progcode" name="progcode" maxlength="1" size="6" class='idfield {validate:{required:$identifierType.mandatory,minlength:1,lettersdigitsonly:true}}' /> <br/> <div class='stateformat'>$i18n.getString('program')<br>$i18n.getString('code')</div></td>
- <td> - <input type="text" id="yearcode" name="yearcode" maxlength="2" size="6" value="$year" class="{validate:{required:true,minlength:2}}"/> <br/> <div class='stateformat'>$i18n.getString('year')</div></td>
- <td> - <input type="text" id="benicode" name="benicode" maxlength="4" size="9" class="{validate:{required:true,number:true,minlength:4}}"/> <br/> <div class='stateformat'>$i18n.getString('patient')<br>$i18n.getString('code')</div></td>
- </tr>
- </table>
- </td>
- #else
- <td class="input-column">
- <input type="text" style="width:28em" id="iden$identifierType.id" name="iden$identifierType.id" data="{related:$identifierType.related}" class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" /></td>
- #end
-
+ <td class="input-column">
+ <input type="text" style="width:28em" id="iden$identifierType.id" name="iden$identifierType.id" data="{related:$identifierType.related}" class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" /></td>
</tr>
#end
=== 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 2011-05-19 08:14:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientIdentifierTypeForm.vm 2011-05-25 06:27:29 +0000
@@ -30,12 +30,6 @@
</tr>
<tr>
- <td><label>$i18n.getString( "identifier_format" ) </label></td>
- <td><input type="checkbox" name="formater" id="formater" value="State Format"/>$i18n.getString('state_format')</td>
- <td></td>
- </tr>
-
- <tr>
<td width="30em"><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
<select id="mandatory" name="mandatory" style="min-width:30.2em" class="{validate:{required:true}}">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm 2010-02-22 09:19:15 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/responsePatientIdentifierType.vm 2011-05-25 06:27:29 +0000
@@ -3,5 +3,4 @@
<id>$patientIdentifierType.id</id>
<name>$encoder.xmlEncode( $patientIdentifierType.name )</name>
<description>$encoder.xmlEncode( $patientIdentifierType.description )</description>
- <format>#if($patientIdentifierType.format) $encoder.xmlEncode( $patientIdentifierType.format )#end</format>
</patientIdentifierType>
\ 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 2011-05-19 08:14:24 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientIdentifierType.vm 2011-05-25 06:27:29 +0000
@@ -30,12 +30,6 @@
</tr>
<tr>
- <td><label>$i18n.getString( "identifier_format" ) </label></td>
- <td><input type="checkbox" name="formater" id="formater" value="State Format" #if(!$!patientIdentifierType.format.isEmpty()) checked="checked" #end />$i18n.getString('state_format')</td>
- <td></td>
- </tr>
-
- <tr>
<td width="20em"><label for="mandatory">$i18n.getString( "mandatory" )<em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
<td>
<select id="mandatory" name="mandatory" style="min-width:20em">