dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #27332
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13594: Remove health-staff property from Patient object, create a new dynamic attribute call Staff to sa...
------------------------------------------------------------
revno: 13594
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-01-06 22:31:51 +0700
message:
Remove health-staff property from Patient object, create a new dynamic attribute call Staff to save values of this property. In template message, replace health-staff in recipients option to this attribute values.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientReminder.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.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/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml
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/SearchPatientAction.java
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/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/webapp/dhis-web-caseentry/cacheManifest.vm
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/patientForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.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/addProgramPatientReminder.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programPatientReminder.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programPatientReminder.vm
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/updateProgramForm.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramPatientReminder.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.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/Patient.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2013-12-18 06:05:41 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/Patient.java 2014-01-06 15:31:51 +0000
@@ -38,7 +38,6 @@
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.user.User;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonView;
@@ -82,8 +81,6 @@
private Patient representative;
- private User associate;
-
// -------------------------------------------------------------------------
// Constructors
// -------------------------------------------------------------------------
@@ -144,20 +141,6 @@
@JsonSerialize( as = BaseIdentifiableObject.class )
@JsonView( { DetailedView.class, ExportView.class } )
@JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
- public User getAssociate()
- {
- return associate;
- }
-
- public void setAssociate( User associate )
- {
- this.associate = associate;
- }
-
- @JsonProperty
- @JsonSerialize( as = BaseIdentifiableObject.class )
- @JsonView( { DetailedView.class, ExportView.class } )
- @JacksonXmlProperty( namespace = DxfNamespaces.DXF_2_0 )
public Patient getRepresentative()
{
return representative;
=== 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 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2014-01-06 15:31:51 +0000
@@ -72,6 +72,8 @@
public static final String TYPE_PHONE_NUMBER = "phoneNumber";
public static final String TYPE_TRACKER_ASSOCIATE = "trackerAssociate";
+
+ public static final String TYPE_USERS = "users";
public static final String TYPE_AGE = "age";
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientReminder.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientReminder.java 2014-01-06 06:29:46 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientReminder.java 2014-01-06 15:31:51 +0000
@@ -66,7 +66,7 @@
public static final int SEND_TO_PATIENT = 1;
- public static final int SEND_TO_HEALTH_WORKER = 2;
+ public static final int SEND_TO_ATTRIBUTE_TYPE_USERS = 2;
public static final int SEND_TO_ORGUGNIT_REGISTERED = 3;
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/DefaultPatientReminderService.java 2014-01-06 15:31:51 +0000
@@ -42,6 +42,7 @@
import org.hisp.dhis.program.ProgramStageInstance;
import org.hisp.dhis.system.util.DateUtils;
import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
/**
* @author Chau Thu Tran
@@ -69,6 +70,13 @@
this.patientReminderStore = patientReminderStore;
}
+ private UserService userService;
+
+ public void setUserService( UserService userService )
+ {
+ this.userService = userService;
+ }
+
// -------------------------------------------------------------------------
// Implementation methods
// -------------------------------------------------------------------------
@@ -92,7 +100,7 @@
Patient patient = programInstance.getPatient();
String templateMessage = patientReminder.getTemplateMessage();
String template = templateMessage;
-
+
String organisationunitName = patient.getOrganisationUnit().getName();
String programName = programInstance.getProgram().getName();
String daysSinceEnrollementDate = DateUtils.daysBetween( new Date(), programInstance.getEnrollmentDate() ) + "";
@@ -223,10 +231,20 @@
}
}
break;
- case PatientReminder.SEND_TO_HEALTH_WORKER:
- if ( patient.getAssociate() != null && patient.getAssociate().getPhoneNumber() != null )
+ case PatientReminder.SEND_TO_ATTRIBUTE_TYPE_USERS:
+ if ( patient.getAttributeValues() != null )
{
- phoneNumbers.add( patient.getAssociate().getPhoneNumber() );
+ for ( PatientAttributeValue attributeValue : patient.getAttributeValues() )
+ {
+ if ( attributeValue.getPatientAttribute().getValueType().equals( PatientAttribute.TYPE_USERS ) )
+ {
+ User user = userService.getUser( Integer.parseInt( attributeValue.getValue() ) );
+ if ( user.getPhoneNumber() != null && !user.getPhoneNumber().isEmpty() )
+ {
+ phoneNumbers.add( user.getPhoneNumber() );
+ }
+ }
+ }
}
break;
case PatientReminder.SEND_TO_ORGUGNIT_REGISTERED:
@@ -271,10 +289,16 @@
case PatientReminder.SEND_TO_ALL_USERS_IN_ORGUGNIT_REGISTERED:
users.addAll( patient.getOrganisationUnit().getUsers() );
break;
- case PatientReminder.SEND_TO_HEALTH_WORKER:
- if ( patient.getAssociate() != null && patient.getAssociate().getPhoneNumber() != null )
+ case PatientReminder.SEND_TO_ATTRIBUTE_TYPE_USERS:
+ if ( patient.getAttributeValues() != null )
{
- users.add( patient.getAssociate() );
+ for ( PatientAttributeValue attributeValue : patient.getAttributeValues() )
+ {
+ if ( attributeValue.getPatientAttribute().getValueType().equals( PatientAttribute.TYPE_USERS ) )
+ {
+ users.add( userService.getUser( Integer.parseInt( attributeValue.getValue() ) ) );
+ }
+ }
}
break;
case PatientReminder.SEND_TO_USER_GROUP:
=== 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 2014-01-06 14:13:52 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/startup/TableAlteror.java 2014-01-06 15:31:51 +0000
@@ -464,6 +464,7 @@
{
Statement statement = holder.getStatement();
+
ResultSet resultSet = statement.executeQuery( "SELECT gender FROM patientattribute" );
// Only execute once
@@ -754,7 +755,26 @@
removeFixedAttributeInCustomRegistrationForm( "fullName", uid );
// update template messsages
- updateFixedAttributeInTemplateMessage(uid);
+ updateFixedAttributeInTemplateMessage( uid );
+
+ // -------------------------------------------------------------
+ // User Associate
+ // -------------------------------------------------------------
+
+ uid = CodeGenerator.generateCode();
+ executeSql( "INSERT INTO patientattribute (patientattributeid, uid, lastUpdated, name, description, valueType, mandatory, inherit, displayOnVisitSchedule ) VALUES ("
+ + max
+ + ",'"
+ + uid
+ + "','"
+ + DateUtils.getMediumDateString()
+ + "','Staff', 'Staff','"
+ + PatientAttribute.TYPE_USERS + "', false, false, false)" );
+ executeSql( "INSERT INTO patientattributevalue (patientid, patientattributeid, value ) SELECT patientid,"
+ + max + ",healthworkerid from patient inner join userinfo on patient.healthworkerid=userinfo.userinfoid where patient.healthworkerid is not null" );
+
+ // Update custom entry form
+ removeFixedAttributeInCustomRegistrationForm( "associate", uid );
executeSql( "ALTER TABLE patient DROP COLUMN gender" );
executeSql( "ALTER TABLE patient DROP COLUMN deathDate" );
@@ -765,6 +785,7 @@
executeSql( "ALTER TABLE patient DROP COLUMN birthdate" );
executeSql( "ALTER TABLE patient DROP COLUMN phoneNumber" );
executeSql( "ALTER TABLE patient DROP COLUMN name" );
+ executeSql( "ALTER TABLE patient DROP COLUMN healthworkerid" );
}
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramInstanceStore.java 2014-01-06 15:31:51 +0000
@@ -325,7 +325,7 @@
+ " and prm.templatemessage is not NULL and prm.templatemessage != '' "
+ " and pg.type=1 and prm.daysallowedsendmessage is not null " + " and ( DATE(now()) - DATE( pi."
+ dateToCompare + " ) ) = prm.daysallowedsendmessage " + " and prm.dateToCompare='" + dateToCompare
- + "' and prm.whenToSend is null and prm.sendto = " + PatientReminder.SEND_TO_HEALTH_WORKER;
+ + "' and prm.whenToSend is null and prm.sendto = " + PatientReminder.SEND_TO_ATTRIBUTE_TYPE_USERS;
}
private String sendMessageToOrgunitRegisteredSql( String dateToCompare )
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/program/hibernate/HibernateProgramStageInstanceStore.java 2014-01-06 15:31:51 +0000
@@ -622,7 +622,7 @@
+ " and pg.type=1 and prm.daysallowedsendmessage is not null "
+ " and psi.executiondate is null "
+ " and ( DATE(now()) - DATE(psi.duedate) ) = prm.daysallowedsendmessage "
- + " and prm.whentosend is null and prm.sendto = " + PatientReminder.SEND_TO_HEALTH_WORKER;
+ + " and prm.whentosend is null and prm.sendto = " + PatientReminder.SEND_TO_ATTRIBUTE_TYPE_USERS;
}
private String sendMessageToOrgunitRegisteredSql()
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/patient/hibernate/Patient.hbm.xml 2014-01-06 15:31:51 +0000
@@ -32,8 +32,6 @@
<many-to-one name="organisationUnit" class="org.hisp.dhis.organisationunit.OrganisationUnit" column="organisationunitid"
foreign-key="fk_patient_organisationunitid" not-null="true" />
-
- <many-to-one name="associate" column="healthworkerid" class="org.hisp.dhis.user.User" foreign-key="fk_user_patientid" />
-
+
</class>
</hibernate-mapping>
=== 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 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/AddPatientAction.java 2014-01-06 15:31:51 +0000
@@ -120,24 +120,15 @@
Patient patient = new Patient();
// ---------------------------------------------------------------------
- // Set FullName && location
+ // Set location
// ---------------------------------------------------------------------
patient.setOrganisationUnit( organisationUnit );
// ---------------------------------------------------------------------
- // Set Other information for patient
- // ---------------------------------------------------------------------
-
- if ( healthWorker != null )
- {
- patient.setAssociate( userService.getUser( healthWorker ) );
- }
-
- // ---------------------------------------------------------------------
// Prepare Patient Attributes
// ---------------------------------------------------------------------
-
+
HttpServletRequest request = ServletActionContext.getRequest();
Collection<PatientAttribute> attributes = patientAttributeService.getAllPatientAttributes();
@@ -162,8 +153,7 @@
{
value = format.formatDate( PatientAttribute.getDateFromAge( Integer.parseInt( value ) ) );
}
-
- if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
+ else if ( PatientAttribute.TYPE_COMBO.equalsIgnoreCase( attribute.getValueType() ) )
{
PatientAttributeOption option = patientAttributeOptionService.get( Integer.parseInt( value ) );
if ( option != null )
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/SearchPatientAction.java 2014-01-06 15:31:51 +0000
@@ -39,6 +39,8 @@
import org.hisp.dhis.program.Program;
import org.hisp.dhis.program.ProgramService;
import org.hisp.dhis.user.CurrentUserService;
+import org.hisp.dhis.user.User;
+import org.hisp.dhis.user.UserService;
import java.util.ArrayList;
import java.util.Collection;
@@ -73,6 +75,8 @@
private OrganisationUnitService organisationUnitService;
+ private UserService userService;
+
// -------------------------------------------------------------------------
// Input/output
// -------------------------------------------------------------------------
@@ -96,6 +100,11 @@
this.organisationUnitService = organisationUnitService;
}
+ public void setUserService( UserService userService )
+ {
+ this.userService = userService;
+ }
+
public void setCurrentUserService( CurrentUserService currentUserService )
{
this.currentUserService = currentUserService;
@@ -188,6 +197,13 @@
return organisationUnit;
}
+ private Map<String, String> mapUsers = new HashMap<String, String>();
+
+ public Map<String, String> getMapUsers()
+ {
+ return mapUsers;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -233,6 +249,20 @@
orgunits = null;
}
+ // -----------------------------------------------------------------
+ // Users by orgunits for searching
+ // -----------------------------------------------------------------
+
+ Collection<User> users = userService.getAllUsers();
+ for ( User user : users )
+ {
+ mapUsers.put( user.getId() + "", user.getName() );
+ }
+
+ // -----------------------------------------------------------------
+ // Searching
+ // -----------------------------------------------------------------
+
total = patientService.countSearchPatients( searchTexts, orgunits, null, statusEnrollment );
this.paging = createPaging( total );
patients = patientService.searchPatients( searchTexts, orgunits, null, null, null, statusEnrollment,
=== 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 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2014-01-06 15:31:51 +0000
@@ -102,14 +102,7 @@
{
this.attributeService = attributeService;
}
-
- private PatientService patientService;
-
- public void setPatientService( PatientService patientService )
- {
- this.patientService = patientService;
- }
-
+
private PatientAttributeGroupService attributeGroupService;
public void setAttributeGroupService( PatientAttributeGroupService attributeGroupService )
@@ -310,7 +303,7 @@
healthWorkers, null, null, i18n, format );
}
}
-
+
if ( customRegistrationForm == null )
{
attributeGroups = new ArrayList<PatientAttributeGroup>(
@@ -353,8 +346,6 @@
}
- orgunitCountIdentifier = generateOrgunitIdentifier( organisationUnit );
-
if ( relatedProgramId != null )
{
relatedProgram = programService.getProgram( relatedProgramId );
@@ -368,28 +359,4 @@
return SUCCESS;
}
- private String generateOrgunitIdentifier( OrganisationUnit organisationUnit )
- {
- String value = organisationUnit.getCode();
- value = (value == null) ? "" : value;
-
- int totalPatient = patientService.countGetPatientsByOrgUnit( organisationUnit );
- if ( totalPatient < 10 )
- {
- value += "000" + totalPatient;
- }
- else if ( totalPatient < 100 )
- {
- value += "00" + totalPatient;
- }
- else if ( totalPatient < 1000 )
- {
- value += "0" + totalPatient;
- }
- else
- {
- value += totalPatient;
- }
- return value;
- }
}
=== 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 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/UpdatePatientAction.java 2014-01-06 15:31:51 +0000
@@ -95,8 +95,6 @@
private Integer relationshipTypeId;
- private Integer healthWorker;
-
// -------------------------------------------------------------------------
// Output
// -------------------------------------------------------------------------
@@ -115,24 +113,15 @@
patient = patientService.getPatient( id );
// ---------------------------------------------------------------------
- // Set FullName && location
+ // Set location
// ---------------------------------------------------------------------
patient.setOrganisationUnit( organisationUnit );
// ---------------------------------------------------------------------
- // Set Other information for patient
- // ---------------------------------------------------------------------
-
- if ( healthWorker != null )
- {
- patient.setAssociate( userService.getUser( healthWorker ) );
- }
-
- // ---------------------------------------------------------------------
// Save Patient Attributes
// ---------------------------------------------------------------------
-
+
HttpServletRequest request = ServletActionContext.getRequest();
Collection<PatientAttribute> attributes = patientAttributeService.getAllPatientAttributes();
@@ -272,11 +261,6 @@
this.format = format;
}
- public void setHealthWorker( Integer healthWorker )
- {
- this.healthWorker = healthWorker;
- }
-
public void setPatientIdentifierTypeService( PatientIdentifierTypeService patientIdentifierTypeService )
{
this.patientIdentifierTypeService = patientIdentifierTypeService;
=== 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 2014-01-02 13:45:23 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2014-01-06 15:31:51 +0000
@@ -22,6 +22,7 @@
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
<property name="organisationUnitService"
ref="org.hisp.dhis.organisationunit.OrganisationUnitService" />
+ <property name="userService" ref="org.hisp.dhis.user.UserService" />
</bean>
<bean
@@ -503,7 +504,6 @@
<bean id="org.hisp.dhis.caseentry.action.patient.ShowAddPatientFormAction"
class="org.hisp.dhis.caseentry.action.patient.ShowAddPatientFormAction"
scope="prototype">
- <property name="patientService" ref="org.hisp.dhis.patient.PatientService" />
<property name="selectionManager"
ref="org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager" />
<property name="attributeService">
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2014-01-06 14:43:16 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/cacheManifest.vm 2014-01-06 15:31:51 +0000
@@ -64,6 +64,7 @@
../images/colapse.png
../images/expand.png
../images/transparent.gif
+../images/help.png
../images/hide.png
../images/ajax-loader-circle.gif
../images/ajax-loader-bar.gif
=== 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 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/defaultPatientForm.vm 2014-01-06 15:31:51 +0000
@@ -31,10 +31,6 @@
#else
#set( $identifier = '' )
#set( $identifier = $identiferMap.get( $identifierType.id ) )
- #if($identifierType.type=='orgunitCount' && $!orgunitCountIdentifier)
- #set( $identifier = $!orgunitCountIdentifier )
- #end
-
<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">
=== 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 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2014-01-06 15:31:51 +0000
@@ -12,25 +12,7 @@
{validate:{required:true}}
#end
#end
-
- <tr>
- <th colspan="2" class="heading-column">$i18n.getString( "demographics" )</th>
- </tr>
-
- <tr name='propertiesField'>
- <td class='text-column'><label for="healthWorker">$i18n.getString( "health_worker" )</label></td>
- <td class="input-column">
- <select id="healthWorker" name="healthWorker">
- <option value="">[$i18n.getString("please_select")]</option>
- #foreach( $healthWorker in $healthWorkers)
- <option value="$healthWorker.id" #if($patient.associate.id == $healthWorker.id) selected #end>$healthWorker.name</option>
- #end
- </select>
- </td>
- </tr>
- <tr><td> </td></tr>
-
#if( $identifierTypes.size() > 0)
<!--IDENTIFIERS -->
<tr><th colspan="2" class="heading-column">$i18n.getString("patient_identifiers")</th></tr>
@@ -39,10 +21,6 @@
#else
#set( $identifier = '' )
#set( $identifier = $identiferMap.get( $identifierType.id ) )
- #if($identifierType.type=='orgunitCount' && $!orgunitCountIdentifier)
- #set( $identifier = $!orgunitCountIdentifier )
- #end
-
<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">
@@ -55,6 +33,56 @@
#end
#end
+#foreach ($attributeGroup in $attributeGroups )
+ #set($attributesByGroup = $!attributesMap.get($attributeGroup.displayName))
+ #if( $attributesByGroup && $attributesByGroup.size() > 0 )
+ <tr><td> </td></tr>
+ <tr><th colspan="2" class="heading-column">$attributeGroup.displayName</th></tr>
+ #foreach($attribute in $attributesByGroup )
+ #if( $attribute )
+ #set($value = "")
+ #set($value = $patientAttributeValueMap.get($attribute.id))
+ <tr name='attributesFields'>
+ <td class='text-column'><label>$encoder.htmlEncode($attribute.displayName) #if($attribute.mandatory) <em title="$i18n.getString( 'required' )" class="required">*</em> #end</label></td>
+ <td class="input-column">
+ #if( $attribute.valueType == "bool" )
+ <select id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class="{validate:{required:$attribute.mandatory}" >
+ <option value="" selected="selected">[$i18n.getString( "please_select" )]</option>
+ <option value="true" #if($value=='true') selected #end>$i18n.getString( "yes" )</option>
+ <option value="false" #if($value=='false') selected #end>$i18n.getString( "no" )</option>
+ </select>
+ #elseif( $attribute.valueType == "trueOnly" )
+ <input type='checkbox' value="true" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" #if($value=='true') checked #end class="{validate:{required:$attribute.mandatory}" >
+ #elseif( $attribute.valueType == "date" )
+ <input type="text" id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" value='$value' class="{validate:{required:$attribute.mandatory}" />
+ <script type="text/javascript">
+ 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:{required:$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>
+ #elseif( $attribute.valueType == "phoneNumber" )
+ <input type='text' id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class="{validate:{phone:true,required:$attribute.mandatory}}}"/>
+ #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' />
+ #elseif( $attribute.valueType == "age" || $attribute.valueType == "number" )
+ <input type='text' id="attr$attribute.id" name="attr$attribute.id" inherit="$!attribute.inherit" class="{validate:{required:$attribute.mandatory,number:true}}"/>
+ #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>
+ </tr>
+ #end
+ #end
+ #end
+#end
+
<!-- ATTRIBUTES -->
#set($attributes = $attributesMap.get(""))
#if ($!attributes)
@@ -86,6 +114,13 @@
<option value="$option.id" #if($attributeValue == $option.name) selected="selected" #end>$option.name</option>
#end
</select>
+ #elseif( $attribute.valueType == "users" )
+ <select inherit="$!attribute.inherit" class=' #validate( "default" $attribute.mandatory )' >
+ <option value="">[$i18n.getString("please_select")]</option>
+ #foreach( $user in $healthWorkers)
+ <option value="$user.id" #if($attributeValue == $user.id) selected="selected" #end >$user.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" )
=== 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 2014-01-05 14:04:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientRegistrationList.vm 2014-01-06 15:31:51 +0000
@@ -102,10 +102,12 @@
#set($value=$attributeValue.value)
#if( $attribute.valueType == 'bool')
#set($value=$i18n.getString($attributeValue.value))
+ #elseif( $attribute.valueType == 'users')
+ #set($value=$mapUsers.get($attributeValue.value))
#end
#end
#end
- <a>$encoder.htmlEncode($value)</a>
+ <a>$!encoder.htmlEncode($value)</a>
</td>
#end
#end
=== 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 2014-01-06 13:31:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2014-01-06 15:31:51 +0000
@@ -489,4 +489,6 @@
create_new_template_reminder_message = Create new template reminder message
confirm_delete_template_reminder_message=Are you sure you want to delete template reminder message?
days_before = day(s) before
-data_entry_method_for_option_sets=Data entry method for option sets
\ No newline at end of file
+data_entry_method_for_option_sets=Data entry method for option sets
+users = Users
+attribute_users = Attribute users
\ 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-19 04:00:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2014-01-06 15:31:51 +0000
@@ -49,6 +49,7 @@
<option value="phoneNumber">$i18n.getString( "phone_number" )</option>
<option value="trackerAssociate">$i18n.getString( "tracker_associate" )</option>
<option value="age">$i18n.getString( "age" )</option>
+ <option value="users">$i18n.getString( "users" )</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/addProgramPatientReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramPatientReminder.vm 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramPatientReminder.vm 2014-01-06 15:31:51 +0000
@@ -70,7 +70,7 @@
<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup( )">
<option value="1" >$i18n.getString("patient_sms_only")</option>
<option value="3" >$i18n.getString("orgunit_phone_number_sms_only")</option>
- <option value="2" >$i18n.getString("health_worker_assigned_to_person")</option>
+ <option value="2" >$i18n.getString("attribute_users")</option>
<option value="4" >$i18n.getString("all_users_in_orgunit_registered")</option>
<option value="5" >$i18n.getString("user_group")</option>
</select>
@@ -153,7 +153,7 @@
var i18n_date_to_compare = '$encoder.jsEscape( $i18n.getString( "date_to_compare" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
var i18n_all_users_at_orgunit = '$encoder.jsEscape( $i18n.getString( "all_users_at_orgunit" ) , "'")';
var i18n_send_when_to = '$encoder.jsEscape( $i18n.getString( "send_base_on" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2014-01-06 13:23:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2014-01-06 15:31:51 +0000
@@ -253,7 +253,7 @@
var i18n_name_exists = '$encoder.jsEscape( $i18n.getString( "name_exists" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
var i18n_all_users_at_orgunit = '$encoder.jsEscape( $i18n.getString( "all_users_at_orgunit" ) , "'")';
var i18n_send_when_to = '$encoder.jsEscape( $i18n.getString( "send_base_on" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programPatientReminder.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programPatientReminder.js 2014-01-06 13:23:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programPatientReminder.js 2014-01-06 15:31:51 +0000
@@ -84,7 +84,7 @@
var typeMap = [];
typeMap['1'] = i18n_patient_sms_only;
typeMap['2'] = i18n_orgunit_phone_number_sms_only;
- typeMap['3'] = i18n_health_worker_assigned_to_person;
+ typeMap['3'] = i18n_attribute_users;
typeMap['4'] = i18n_all_users_in_orgunit_registered;
typeMap['5'] = i18n_user_group;
return typeMap;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2014-01-06 13:23:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2014-01-06 15:31:51 +0000
@@ -352,7 +352,7 @@
+ '<select id="sendTo' + rowId + '" name="sendTo' + rowId + '" class="sendTo" onchange="onchangeUserGroup('+ rowId +')">'
+ '<option value="1">' + i18n_patient_sms_only + '</option>'
+ '<option value="3">' + i18n_orgunit_phone_number_sms_only + '</option>'
- + '<option value="2">' + i18n_health_worker_assigned_to_person + '</option>'
+ + '<option value="2">' + i18n_attribute_users + '</option>'
+ '<option value="4">' + i18n_all_users_at_orgunit + '</option>'
+ '<option value="5">' + i18n_user_group + '</option>'
+ '</select>'
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programPatientReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programPatientReminder.vm 2014-01-06 08:56:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programPatientReminder.vm 2014-01-06 15:31:51 +0000
@@ -77,7 +77,7 @@
var i18n_yes_only = '$encoder.jsEscape( $i18n.getString( "yes_only" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_all_users_in_orgunit_registered = '$encoder.jsEscape( $i18n.getString( "all_users_in_orgunit_registered" ) , "'")';
var i18n_user_group = '$encoder.jsEscape( $i18n.getString( "user_group" ) , "'")';
var i18n_days_scheduled = '$encoder.jsEscape( $i18n.getString( "days_scheduled" ) , "'")';
=== 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-19 04:00:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2014-01-06 15:31:51 +0000
@@ -52,6 +52,7 @@
<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="age" #if( $patientAttribute.valueType == 'age' ) selected="selected" #end>$i18n.getString( "age" )</option>
+ <option value="users" #if( $patientAttribute.valueType == 'users' ) selected="selected" #end>$i18n.getString( "users" )</option>
<option value="combo" #if( $patientAttribute.valueType == 'combo' ) selected="selected" #end>$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/updateProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2014-01-06 12:21:07 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2014-01-06 15:31:51 +0000
@@ -306,7 +306,7 @@
var i18n_date_to_compare = '$encoder.jsEscape( $i18n.getString( "date_to_compare" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
var i18n_all_users_at_orgunit = '$encoder.jsEscape( $i18n.getString( "all_users_at_orgunit" ) , "'")';
var i18n_send_when_to = '$encoder.jsEscape( $i18n.getString( "send_base_on" ) , "'")';
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramPatientReminder.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramPatientReminder.vm 2014-01-06 13:23:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramPatientReminder.vm 2014-01-06 15:31:51 +0000
@@ -14,7 +14,7 @@
var i18n_date_to_compare = '$encoder.jsEscape( $i18n.getString( "date_to_compare" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
var i18n_all_users_at_orgunit = '$encoder.jsEscape( $i18n.getString( "all_users_at_orgunit" ) , "'")';
var i18n_send_when_to = '$encoder.jsEscape( $i18n.getString( "send_base_on" ) , "'")';
@@ -113,7 +113,7 @@
<select type="text" id="sendTo" name="sendTo" class="{validate:{required:true,number:true}}" onchange="onchangeUserGroup()">
<option value="1" #if($!reminder.sendTo==1) selected #end >$i18n.getString("patient_sms_only")</option>
<option value="3" #if($!reminder.sendTo==3) selected #end >$i18n.getString("orgunit_phone_number_sms_only")</option>
- <option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("health_worker_assigned_to_person")</option>
+ <option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("attribute_users")</option>
<option value="4" #if($!reminder.sendTo==4) selected #end >$i18n.getString("all_users_in_orgunit_registered")</option>
<option value="5" #if($!reminder.sendTo==5) selected #end >$i18n.getString("user_group")</option>
</select>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2014-01-06 13:23:58 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2014-01-06 15:31:51 +0000
@@ -286,7 +286,7 @@
<select type="text" id="sendTo$index" name="sendTo$index" class="sendTo {validate:{required:true,number:true}}" onchange="onchangeUserGroup( $index )">
<option value="1" #if($!reminder.sendTo==1) selected #end >$i18n.getString("patient_sms_only")</option>
<option value="3" #if($!reminder.sendTo==3) selected #end >$i18n.getString("orgunit_phone_number_sms_only")</option>
- <option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("health_worker_assigned_to_person")</option>
+ <option value="2" #if($!reminder.sendTo==2) selected #end >$i18n.getString("attribute_users")</option>
<option value="4" #if($!reminder.sendTo==4) selected #end >$i18n.getString("all_users_at_orgunit")</option>
<option value="5" #if($!reminder.sendTo==5) selected #end >$i18n.getString("user_group")</option>
</select>
@@ -375,7 +375,7 @@
var i18n_message = '$encoder.jsEscape( $i18n.getString( "message" ) , "'")';
var i18n_recipients = '$encoder.jsEscape( $i18n.getString( "recipients" ) , "'")';
var i18n_patient_sms_only = '$encoder.jsEscape( $i18n.getString( "patient_sms_only" ) , "'")';
- var i18n_health_worker_assigned_to_person = '$encoder.jsEscape( $i18n.getString( "health_worker_assigned_to_person" ) , "'")';
+ var i18n_attribute_users = '$encoder.jsEscape( $i18n.getString( "attribute_users" ) , "'")';
var i18n_orgunit_phone_number_sms_only = '$encoder.jsEscape( $i18n.getString( "orgunit_phone_number_sms_only" ) , "'")';
var i18n_all_users_at_orgunit = '$encoder.jsEscape( $i18n.getString( "all_users_at_orgunit" ) , "'")';
var i18n_send_when_to = '$encoder.jsEscape( $i18n.getString( "send_base_on" ) , "'")';