dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26845
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13292: Add new patient-attribute type called phoneNumber. In registration form, this attribute is displa...
------------------------------------------------------------
revno: 13292
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-12-18 15:01:59 +0700
message:
Add new patient-attribute type called phoneNumber. In registration form, this attribute is displayed as checkbox, click on it to show a form to find/add new patient..
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java
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/org/hisp/dhis/caseentry/i18n_module.properties
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js
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/patientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm
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/addPatientAttributeForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.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/PatientAttribute.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-12-18 08:01:59 +0000
@@ -67,6 +67,8 @@
public static final String TYPE_COMBO = "combo";
public static final String TYPE_PHONE_NUMBER = "phoneNumber";
+
+ public static final String TYPE_TRACKER_ASSOCIATE = "trackerAssociate";
private String description;
=== 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 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2013-12-18 08:01:59 +0000
@@ -508,6 +508,7 @@
// ---------------------------------------------------------------------
// Death date
// ---------------------------------------------------------------------
+
max++;
executeSql( "INSERT INTO patientattribute (patientattributeid, uid, lastUpdated, name, description, valueType, mandatory, inherit, displayOnVisitSchedule ) VALUES ("
+ max
@@ -522,6 +523,7 @@
// ---------------------------------------------------------------------
// registrationDate
// ---------------------------------------------------------------------
+
max++;
executeSql( "INSERT INTO patientattribute (patientattributeid, uid, lastUpdated, name, description, valueType, mandatory, inherit, displayOnVisitSchedule ) VALUES ("
+ max
@@ -538,6 +540,7 @@
// ---------------------------------------------------------------------
// isDead
// ---------------------------------------------------------------------
+
max++;
executeSql( "INSERT INTO patientattribute (patientattributeid, uid, lastUpdated, name, description, valueType, mandatory, inherit, displayOnVisitSchedule ) VALUES ("
+ max
@@ -545,7 +548,7 @@
+ CodeGenerator.generateCode()
+ "','"
+ DateUtils.getMediumDateString()
- + "','Is Dead', 'Is Dead','" + PatientAttribute.TYPE_TRUE_ONLY + "', false, false, false)" );
+ + "','Is Dead', 'Is Dead','" + PatientAttribute.TYPE_TRACKER_ASSOCIATE + "', false, false, false)" );
executeSql( "INSERT INTO patientattributevalue (patientid, patientattributeid, value ) SELECT patientid,"
+ max + ",isDead from patient where isDead is not null" );
@@ -561,7 +564,7 @@
+ "','"
+ DateUtils.getMediumDateString()
+ "','Is under age', 'Is under age','"
- + PatientAttribute.TYPE_TRUE_ONLY
+ + PatientAttribute.TYPE_TRACKER_ASSOCIATE
+ "', false, false, false)" );
executeSql( "INSERT INTO patientattributevalue (patientid, patientattributeid, value ) SELECT patientid,"
+ max + ",isDead from patient where underAge=true" );
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java 2013-12-18 08:01:59 +0000
@@ -38,6 +38,8 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.struts2.ServletActionContext;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeOption;
@@ -89,6 +91,8 @@
private RelationshipService relationshipService;
+ private OrganisationUnitSelectionManager selectionManager;
+
// -------------------------------------------------------------------------
// Input
// -------------------------------------------------------------------------
@@ -115,14 +119,18 @@
public String execute()
{
+ OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
+
Patient patient = new Patient();
// ---------------------------------------------------------------------
- // Set FullName
+ // Set FullName && location
// ---------------------------------------------------------------------
patient.setName( fullName );
+ patient.setOrganisationUnit( organisationUnit );
+
// ---------------------------------------------------------------------
// Set Other information for patient
// ---------------------------------------------------------------------
@@ -270,7 +278,7 @@
}
}
- message = id + "_" + systemGenerateIdentifier.getIdentifier();
+ message = patient.getUid() + "_" + systemGenerateIdentifier.getIdentifier();
return SUCCESS;
}
@@ -304,6 +312,11 @@
this.relationshipService = relationshipService;
}
+ public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
+ {
+ this.selectionManager = selectionManager;
+ }
+
public String getMessage()
{
return message;
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java 2013-12-18 08:01:59 +0000
@@ -37,6 +37,8 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang.math.NumberUtils;
import org.apache.struts2.ServletActionContext;
+import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeOption;
@@ -79,6 +81,8 @@
private UserService userService;
+ private OrganisationUnitSelectionManager selectionManager;
+
// -------------------------------------------------------------------------
// Input
// -------------------------------------------------------------------------
@@ -106,15 +110,18 @@
public String execute()
throws Exception
{
+ OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
patient = patientService.getPatient( id );
// ---------------------------------------------------------------------
- // Set FullName
+ // Set FullName && location
// ---------------------------------------------------------------------
patient.setName( fullName );
+ patient.setOrganisationUnit( organisationUnit );
+
// ---------------------------------------------------------------------
// Set Other information for patient
// ---------------------------------------------------------------------
@@ -286,6 +293,11 @@
this.patientIdentifierService = patientIdentifierService;
}
+ public void setSelectionManager( OrganisationUnitSelectionManager selectionManager )
+ {
+ this.selectionManager = selectionManager;
+ }
+
public void setId( Integer id )
{
this.id = id;
=== 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-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-12-18 08:01:59 +0000
@@ -469,6 +469,8 @@
ref="org.hisp.dhis.relationship.RelationshipService" />
<property name="relationshipTypeService"
ref="org.hisp.dhis.relationship.RelationshipTypeService" />
+ <property name="selectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
</bean>
<bean id="org.hisp.dhis.caseentry.action.patient.RemovePatientAction"
@@ -494,6 +496,8 @@
<property name="patientAttributeOptionService"
ref="org.hisp.dhis.patient.PatientAttributeOptionService" />
<property name="userService" ref="org.hisp.dhis.user.UserService" />
+ <property name="selectionManager"
+ ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
</bean>
<bean id="org.hisp.dhis.caseentry.action.patient.ShowAddPatientFormAction"
@@ -771,8 +775,7 @@
</bean>
<!-- Tabular report -->
- <bean
- id="org.hisp.dhis.caseentry.action.caseentry.SearchEventsAction"
+ <bean id="org.hisp.dhis.caseentry.action.caseentry.SearchEventsAction"
class="org.hisp.dhis.caseentry.action.caseentry.SearchEventsAction"
scope="prototype">
<property name="programStageService" ref="org.hisp.dhis.program.ProgramStageService" />
=== 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 2013-10-23 12:24:18 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/org/hisp/dhis/caseentry/i18n_module.properties 2013-12-18 08:01:59 +0000
@@ -148,7 +148,7 @@
please_choose_relationshipType_for_this_under_age_patient=Please choose relationship type for this under age person
dateOfEnrollmentDescription=Date of enrollment description
dateOfIncidentDescription=Date of incident description
-child_representative=Child's representative
+tracker_associate=Tracker associate
total_result=Total number of results
add_new_relationship_for=Add new relationship for
transgender=Trans-gender
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm 2013-12-18 08:01:59 +0000
@@ -1,13 +1,3 @@
-
-#if($patientRegistrationForm.fixedAttributes.contains( 'registrationDate' ))
- <tr id='registrationDateTR'>
- <td class='text-column'><label for="registration_date">$i18n.getString( "registration_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" colspan='2'>
- <input type="text" id="registrationDate" name="registrationDate" class="{validate:{required:true}}" value='$!format.formatDate($!patient.registrationDate)'/>
- </td>
- </tr>
-#end
-
<tr>
<th colspan="2" class="heading-column">$i18n.getString( "demographics" )</th>
</tr>
@@ -55,7 +45,7 @@
<tr>
<td class='text-column'><label>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory) <em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column">
- <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related && $!patient.underAge) disabled="disabled" #end 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 }}" />
+ <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related) disabled="disabled" #end 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
@@ -63,8 +53,7 @@
#end
<!-- ATTRIBUTES IN GROUPS -->
-
-
+
#foreach($attribute in $$patientRegistrationForm.dynamicAttributes )
#if( $attribute )
#set($value = "")
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/commons.js 2013-12-18 08:01:59 +0000
@@ -1106,28 +1106,14 @@
if( $(this_).is(":checked")) {
$('#representativeDiv').dialog('destroy').remove();
$('<div id="representativeDiv">' ).load( 'showAddRepresentative.action',{}, function() {
- $('#patientForm [id=birthDate]').attr('id','birthDate_id');
- $('#patientForm [id=birthDate_id]').attr('name','birthDate_id');
-
- $('#patientForm [id=registrationDate]').attr('id','registrationDate_id');
- $('#patientForm [id=registrationDate_id]').attr('name','registrationDate_id');
-
- datePickerValid( 'representativeDiv [id=registrationDate]' );
}).dialog({
- title: i18n_child_representative,
+ title: i18n_tracker_associate,
maximize: true,
closable: true,
modal:true,
overlay:{background:'#000000', opacity:0.1},
width: 800,
- height: 450,
- close:function() {
- $('#patientForm [id=birthDate_id]').attr('id','birthDate');
- $('#patientForm [id=birthDate]').attr('name','birthDate');
-
- $('#patientForm [id=registrationDate_id]').attr('id','registrationDate');
- $('#patientForm [id=registrationDate]').attr('name','registrationDate');
- }
+ height: 450
});
} else {
$("#representativeDiv :input.idfield").each(function(){
=== 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 2013-11-25 08:38:25 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/patient.js 2013-12-18 08:01:59 +0000
@@ -69,7 +69,7 @@
this.validate = function( programId )
{
setMessage('');
- if( byId('underAge').checked ){
+ if( jQuery('.underAge').prop('checked')=='true' ){
if ( getFieldValue('representativeId') == '' )
{
setMessage( i18n_please_choose_representative_for_this_under_age_patient );
@@ -179,8 +179,7 @@
{
if(isContinue){
jQuery("#patientForm :input").each( function(){
- if( $(this).attr('id') != "registrationDate"
- && $(this).attr('type') != 'button'
+ if( $(this).attr('type') != 'button'
&& $(this).attr('type') != 'submit'
&& $(this).attr('id') !='enrollmentDate' )
{
@@ -195,8 +194,7 @@
}
else if(isContinue){
jQuery("#patientForm :input").each( function(){
- if( $(this).attr('id') != "registrationDate"
- && $(this).attr('type') != 'button'
+ if( $(this).attr('type') != 'button'
&& $(this).attr('type') != 'submit' )
{
$(this).val("");
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-12-18 08:01:59 +0000
@@ -12,13 +12,6 @@
{validate:{required:true}}
#end
#end
-
- <tr id='registrationDateTR' name='propertiesField'>
- <td class='text-column'><label for="registration_date">$i18n.getString( "registration_date" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td class="input-column" colspan='2'>
- <input type="text" id="registrationDate" name="registrationDate" class="{validate:{required:true}}" value='$!format.formatDate($!patient.registrationDate)'/>
- </td>
- </tr>
<tr>
<th colspan="2" class="heading-column">$i18n.getString( "demographics" )</th>
@@ -63,7 +56,7 @@
<tr name='idenFields'>
<td class='text-column'><label>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory) <em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column">
- <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related && $!patient.underAge) disabled="disabled" #end
+ <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related) disabled="disabled" #end
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 }}"
#if($identifierType.type=='orgunitCount') readonly #end />
</td>
@@ -100,13 +93,19 @@
datePickerValid( 'attr$attribute.id', false, false );
</script>
#elseif( $attribute.valueType == "combo" )
- <select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class='#validate( "default" $attribute.mandatory )'>
+ <select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class='#validate( "default" $attribute.mandatory )'>
<option value="">[$i18n.getString( "please_select" )]</option>
#foreach ($option in $attribute.attributeOptions )
<option value="$option.id" #if("$value"=="$option.name") selected #end>$option.name</option>
#end
</select>
- #else
+ #elseif( $attribute.valueType == "phoneNumber" )
+ <input type='text' id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class="{validate:{phone:true}}"/>
+ #elseif( $attribute.valueType == "trackerAssociate" )
+ <input type="checkbox" value='true' id="attr$attribute.id" name="attr$attribute.id"
+ inherit="$!attribute.inherit" #if($value=='true') checked #end
+ onclick="toggleUnderAge(this);" class='underAge' />
+ #else
<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class="{validate:{required:$attribute.mandatory #if($attribute.valueType=='NUMBER'),number:true #end }}" />
#end
</td>
@@ -149,6 +148,12 @@
<option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
#end
</select>
+ #elseif( $attribute.valueType == "phoneNumber" )
+ <input type='text' id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class="{validate:{phone:true}}"/>
+ #elseif( $attribute.valueType == "trackerAssociate" )
+ <input type="checkbox" value='true' id="attr$attribute.id" name="attr$attribute.id"
+ inherit="$!attribute.inherit" #if($value=='true') checked #end
+ onclick="toggleUnderAge(this);" class='underAge' />
#else
<input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value="$!attributeValue" class="{validate:{required:$attribute.mandatory #if($!attribute.noChars),maxlength:$attribute.noChars #end #if($attribute.valueType=='NUMBER'),number:true #end }}" >
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programTrackingSelect.vm 2013-12-18 08:01:59 +0000
@@ -123,7 +123,7 @@
var i18n_edit_this_patient = '$encoder.jsEscape( $i18n.getString( "edit_this_patient" ) , "'")';
var i18n_no_duplicate_found = '$encoder.jsEscape( $i18n.getString( "no_duplicate_found" ) , "'")';
var i18n_patient_system_id = '$encoder.jsEscape( $i18n.getString( "patient_system_id" ) , "'")';
- var i18n_child_representative = '$encoder.jsEscape( $i18n.getString( "child_representative" ) , "'")';
+ var i18n_tracker_associate = '$encoder.jsEscape( $i18n.getString( "tracker_associate" ) , "'")';
var i18n_no_patients_found = '$encoder.jsEscape( $i18n.getString( "no_patients_found" ) , "'")';
var i18n_search_result = '$encoder.jsEscape( $i18n.getString( "search_result" ) , "'")';
var i18n_duplicated_patient_list = '$encoder.jsEscape( $i18n.getString( "duplicated_patient_list" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/selectPatient.vm 2013-12-18 08:01:59 +0000
@@ -58,7 +58,7 @@
var i18n_edit_this_patient = '$encoder.jsEscape( $i18n.getString( "edit_this_patient" ) , "'")';
var i18n_no_duplicate_found = '$encoder.jsEscape( $i18n.getString( "no_duplicate_found" ) , "'")';
var i18n_patient_system_id = '$encoder.jsEscape( $i18n.getString( "patient_system_id" ) , "'")';
- var i18n_child_representative = '$encoder.jsEscape( $i18n.getString( "child_representative" ) , "'")';
+ var i18n_tracker_associate = '$encoder.jsEscape( $i18n.getString( "tracker_associate" ) , "'")';
var i18n_no_patients_found = '$encoder.jsEscape( $i18n.getString( "no_patients_found" ) , "'")';
var i18n_search_result = '$encoder.jsEscape( $i18n.getString( "search_result" ) , "'")';
var i18n_duplicated_patient_list = '$encoder.jsEscape( $i18n.getString( "duplicated_patient_list" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/singleEventSelect.vm 2013-12-18 08:01:59 +0000
@@ -90,7 +90,7 @@
var i18n_edit_this_patient = '$encoder.jsEscape( $i18n.getString( "edit_this_patient" ) , "'")';
var i18n_no_duplicate_found = '$encoder.jsEscape( $i18n.getString( "no_duplicate_found" ) , "'")';
var i18n_patient_system_id = '$encoder.jsEscape( $i18n.getString( "patient_system_id" ) , "'")';
- var i18n_child_representative = '$encoder.jsEscape( $i18n.getString( "child_representative" ) , "'")';
+ var i18n_tracker_associate = '$encoder.jsEscape( $i18n.getString( "tracker_associate" ) , "'")';
var i18n_no_patients_found = '$encoder.jsEscape( $i18n.getString( "no_patients_found" ) , "'")';
var i18n_search_result = '$encoder.jsEscape( $i18n.getString( "search_result" ) , "'")';
var i18n_duplicated_patient_list = '$encoder.jsEscape( $i18n.getString( "duplicated_patient_list" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/underAgeForm.vm 2013-12-18 08:01:59 +0000
@@ -131,6 +131,6 @@
</div>
<script>
-
+ var i18n_no_result = '$encoder.jsEscape( $i18n.getString( "no_result" ) , "'")';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/updatePatientForm.vm 2013-12-18 08:01:59 +0000
@@ -17,20 +17,6 @@
{
updatePatient();
}
- ,beforeValidateHandler: function(form)
- {
- var dobType = $('#patientForm [id=dobType]').val();
- if( dobType=='V' || dobType=='D' )
- {
- var birthDate = $('#patientForm [id=birthDate]').val();
- if( birthDate != '' ){
- $("#patientForm [id=memberValidator]").val(birthDate);
- }
- }else{
- var age = $('#patientForm [id=age]').val();
- $("#patientForm [id=memberValidator]").val(age);
- }
- }
});
checkedDuplicate = false;
@@ -40,23 +26,9 @@
#end
addEventForPatientForm('patientForm');
- if("$!patient.dobType" == 'A'){
- var i18n_please_please_verify_birthday = '$encoder.jsEscape( $i18n.getString( "please_verify_birthday" ) , "'")';
- jQuery('#patientForm [id=birthDate]').css("display","none");
- alert(i18n_please_please_verify_birthday);
- }
- else{
- #if($!customRegistrationForm)
- #else
- datePickerValid( 'patientForm [id=birthDate]' );
- #end
-
- jQuery('#patientForm [id=age]').css("display","none");
- }
});
addRelationship = false;
- hideById('registrationDateTR');
hideById('mainLinkLbl');
jQuery('[name=mainPagelink]').html(i18n_main_form_link);
</script>
=== 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 2013-10-23 12:24:18 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2013-12-18 08:01:59 +0000
@@ -481,4 +481,5 @@
relationship = Relationship
select_at_least_one_scope=Select at least one scope for local id
scheduling_of_events = Scheduling of events
-show_advanced_options = Show advanced options
\ No newline at end of file
+show_advanced_options = Show advanced options
+tracker_associate = Tracker associate
\ 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/addPatientAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-12-18 08:01:59 +0000
@@ -47,6 +47,7 @@
<option value="trueOnly">$i18n.getString( "yes_only" )</option>
<option value="date">$i18n.getString( "date" )</option>
<option value="phoneNumber">$i18n.getString( "phone_number" )</option>
+ <option value="trackerAssociate">$i18n.getString( "tracker_associate" )</option>
<option value="combo">$i18n.getString( "attribute_combo_type" )</option>
</select>
</td>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-12-18 08:01:59 +0000
@@ -41,6 +41,7 @@
typeMap['trueOnly'] = i18n_yes_only;
typeMap['date'] = i18n_date;
typeMap['phoneNumber'] = i18n_phone_number;
+ typeMap['trackerAssociate'] = i18n_tracker_associate;
typeMap['combo'] = i18n_attribute_combo_type;
return typeMap;
}
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2013-12-18 08:01:59 +0000
@@ -74,4 +74,5 @@
var i18n_yes_only = '$encoder.jsEscape( $i18n.getString( "yes_only" ) , "'")';
var i18n_attribute_combo_type = '$encoder.jsEscape( $i18n.getString( "attribute_combo_type" ) , "'")';
var i18n_phone_number = '$encoder.jsEscape( $i18n.getString( "phone_number" ) , "'") ';
+ var i18n_tracker_associate = '$encoder.jsEscape( $i18n.getString( "tracker_associate" ) , "'") ';
</script>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2013-12-18 08:01:59 +0000
@@ -50,6 +50,7 @@
<option value="trueOnly" #if( $patientAttribute.valueType == 'trueOnly' ) selected="selected" #end >$i18n.getString( "yes_only" )</option>
<option value="date" #if( $patientAttribute.valueType == 'date' ) selected="selected" #end>$i18n.getString( "date" )</option>
<option value="phoneNumber" #if( $patientAttribute.valueType == 'phoneNumber' ) selected="selected" #end>$i18n.getString( "phone_number" )</option>
+ <option value="trackerAssociate" #if( $patientAttribute.valueType == 'trackerAssociate' ) selected="selected" #end>$i18n.getString( "tracker_associate" )</option>
<option value="combo" #if( $patientAttribute.valueType == 'combo' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
</select>
</td>