dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #21346
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10069: Remove calculated person attribute.
------------------------------------------------------------
revno: 10069
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2013-03-08 16:15:27 +0700
message:
Remove calculated person attribute.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java
dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/DefaultPatientAttributeValueService.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.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/identifierAndAttributeForm.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/programEnrollmentForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm
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-02-27 14:39:27 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientAttribute.java 2013-03-08 09:15:27 +0000
@@ -54,8 +54,6 @@
public static final String TYPE_COMBO = "combo";
- public static final String TYPE_CALCULATED = "calculated";
-
private String description;
private String valueType;
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java 2012-12-21 09:23:20 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java 2013-03-08 09:15:27 +0000
@@ -29,7 +29,6 @@
import java.util.Collection;
import java.util.Map;
-import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeOption;
@@ -76,5 +75,4 @@
void updatePatientAttributeValues( PatientAttributeOption patientAttributeOption);
- Double getCalculatedPatientAttributeValue( Patient patient, PatientAttribute patientAttribute, I18nFormat format);
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/DefaultPatientAttributeValueService.java'
--- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/DefaultPatientAttributeValueService.java 2012-12-21 13:15:04 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patientattributevalue/DefaultPatientAttributeValueService.java 2013-03-08 09:15:27 +0000
@@ -26,22 +26,7 @@
*/
package org.hisp.dhis.patientattributevalue;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PATIENT;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PATIENT_ATTRIBUTE;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PATIENT_PROGRAM_STAGE_PROPERTY;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PATIENT_PROPERTY;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_PROPERTY;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_STAGE;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_STAGE_DATAELEMENT;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_STAGE_PROPERTY;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_PROPERTY_INCIDENT_DATE;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.OBJECT_PROGRAM_PROPERTY_ENROLLEMENT_DATE;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.SEPARATOR_ID;
-import static org.hisp.dhis.caseaggregation.CaseAggregationCondition.SEPARATOR_OBJECT;
-
import java.util.Collection;
-import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
@@ -49,19 +34,10 @@
import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeOption;
-import org.hisp.dhis.patient.PatientAttributeService;
-import org.hisp.dhis.program.Program;
-import org.hisp.dhis.program.ProgramInstance;
-import org.hisp.dhis.program.ProgramInstanceService;
-import org.hisp.dhis.program.ProgramService;
-import org.nfunk.jep.JEP;
import org.springframework.transaction.annotation.Transactional;
/**
@@ -72,13 +48,6 @@
public class DefaultPatientAttributeValueService
implements PatientAttributeValueService
{
- private final String CURRENT_DATE = "current_date";
-
- private final String regExp = "\\[(" + CURRENT_DATE + "|" + OBJECT_PATIENT + "|" + OBJECT_PROGRAM + "|"
- + OBJECT_PROGRAM_STAGE + "|" + OBJECT_PROGRAM_STAGE_PROPERTY + "|" + OBJECT_PATIENT_PROGRAM_STAGE_PROPERTY
- + "|" + OBJECT_PROGRAM_STAGE_DATAELEMENT + "|" + OBJECT_PATIENT_ATTRIBUTE + "|" + OBJECT_PATIENT_PROPERTY + "|"
- + OBJECT_PROGRAM_PROPERTY + ")" + SEPARATOR_OBJECT + "([0-9]+[" + SEPARATOR_ID + "[a-zA-Z0-9]*]*)" + "\\]";
-
// -------------------------------------------------------------------------
// Dependencies
// -------------------------------------------------------------------------
@@ -90,27 +59,6 @@
this.patientAttributeValueStore = patientAttributeValueStore;
}
- private PatientAttributeService patientAttributeService;
-
- public void setPatientAttributeService( PatientAttributeService patientAttributeService )
- {
- this.patientAttributeService = patientAttributeService;
- }
-
- private ProgramService programService;
-
- public void setProgramService( ProgramService programService )
- {
- this.programService = programService;
- }
-
- private ProgramInstanceService programInstanceService;
-
- public void setProgramInstanceService( ProgramInstanceService programInstanceService )
- {
- this.programInstanceService = programInstanceService;
- }
-
// -------------------------------------------------------------------------
// Implementation methods
// -------------------------------------------------------------------------
@@ -271,95 +219,4 @@
patientAttributeValueStore.updatePatientAttributeValues( patientAttributeOption );
}
- public Double getCalculatedPatientAttributeValue( Patient patient, PatientAttribute patientAttribute,
- I18nFormat format )
- {
- StringBuffer result = new StringBuffer();
-
- String expression = patientAttribute.getExpression();
-
- Pattern patternCondition = Pattern.compile( regExp );
-
- Matcher matcher = patternCondition.matcher( expression );
-
- Date currentDate = new Date();
-
- while ( matcher.find() )
- {
- String match = matcher.group();
- match = match.replaceAll( "[\\[\\]]", "" );
- String property = matcher.group( 1 );
- if ( CURRENT_DATE.equals( property ) )
- {
- matcher.appendReplacement( result, "0" );
- }
- else
- {
- String[] infor = matcher.group( 2 ).split( SEPARATOR_ID );
- int id = Integer.parseInt( infor[0] );
-
- if ( property.equalsIgnoreCase( OBJECT_PATIENT_ATTRIBUTE ) )
- {
- PatientAttribute attribute = patientAttributeService.getPatientAttribute( id );
- PatientAttributeValue attributeValue = patientAttributeValueStore.get( patient, attribute );
-
- if ( attributeValue != null )
- {
- if ( PatientAttribute.TYPE_INT.equals( attributeValue.getPatientAttribute().getValueType() ) )
- {
- matcher.appendReplacement( result, attributeValue.getValue() );
- }
- else if ( PatientAttribute.TYPE_DATE.equals( attributeValue.getPatientAttribute()
- .getValueType() ) )
- {
- matcher.appendReplacement( result,
- getDays( currentDate, format.parseDate( attributeValue.getValue() ) ) + "" );
- }
- }
- }
- else if ( property.equalsIgnoreCase( OBJECT_PATIENT_PROPERTY ) )
- {
- matcher.appendReplacement( result, getDays( currentDate, patient.getBirthDate() ) + "" );
- }
- else if ( property.equalsIgnoreCase( OBJECT_PROGRAM ) )
- {
- Program program = programService.getProgram( id );
- Collection<ProgramInstance> programInstances = programInstanceService.getProgramInstances( patient,
- program, false );
-
- Date value = null;
- if ( programInstances != null && programInstances.size() > 0 )
- {
- ProgramInstance programInstance = programInstances.iterator().next();
- String propProgram = infor[1];
- if ( OBJECT_PROGRAM_PROPERTY_INCIDENT_DATE.equals( propProgram ) )
- {
- value = programInstance.getDateOfIncident();
- }
- else if ( OBJECT_PROGRAM_PROPERTY_ENROLLEMENT_DATE.equals( propProgram ) )
- {
- value = programInstance.getEnrollmentDate();
- }
- }
- else
- {
- return null;
- }
- matcher.appendReplacement( result, getDays( currentDate, value ) + "" );
- }
- }
- }
-
- final JEP parser = new JEP();
-
- parser.parseExpression( result.toString() );
-
- return parser.getValue();
- }
-
- private long getDays( Date currentDate, Date dateValue )
- {
- long interval = currentDate.getTime() - dateValue.getTime();
- return (-interval / 86400000);
- }
}
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-02-27 14:39:27 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/META-INF/dhis/beans.xml 2013-03-08 09:15:27 +0000
@@ -286,12 +286,6 @@
class="org.hisp.dhis.patientattributevalue.DefaultPatientAttributeValueService">
<property name="patientAttributeValueStore"
ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueStore" />
- <property name="patientAttributeService"
- ref="org.hisp.dhis.patient.PatientAttributeService" />
- <property name="programService"
- ref="org.hisp.dhis.program.ProgramService" />
- <property name="programInstanceService"
- ref="org.hisp.dhis.program.ProgramInstanceService" />
</bean>
<bean id="org.hisp.dhis.patient.PatientAttributeOptionService"
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-03-01 14:09:05 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadDataEntryAction.java 2013-03-08 09:15:27 +0000
@@ -27,8 +27,6 @@
package org.hisp.dhis.caseentry.action.caseentry;
-import static org.hisp.dhis.system.util.ValidationUtils.coordinateIsValid;
-
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
@@ -42,7 +40,6 @@
import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.organisationunit.OrganisationUnit;
import org.hisp.dhis.patient.Patient;
-import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patientattributevalue.PatientAttributeValueService;
import org.hisp.dhis.patientdatavalue.PatientDataValue;
@@ -81,14 +78,8 @@
private SelectedStateManager selectedStateManager;
- private PatientAttributeService patientAttributeService;
-
- private PatientAttributeValueService patientAttributeValueService;
-
private ProgramStageSectionService programStageSectionService;
- private I18nFormat format;
-
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
@@ -128,22 +119,7 @@
{
this.programStageSectionService = programStageSectionService;
}
-
- public void setPatientAttributeService( PatientAttributeService patientAttributeService )
- {
- this.patientAttributeService = patientAttributeService;
- }
-
- public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
- {
- this.patientAttributeValueService = patientAttributeValueService;
- }
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
+
public void setProgramStageInstanceId( Integer programStageInstanceId )
{
this.programStageInstanceId = programStageInstanceId;
@@ -268,19 +244,6 @@
if ( program.isRegistration() )
{
patient = programStageInstance.getProgramInstance().getPatient();
-
- Collection<PatientAttribute> calAttributes = patientAttributeService
- .getPatientAttributesByValueType( PatientAttribute.TYPE_CALCULATED );
-
- for ( PatientAttribute calAttribute : calAttributes )
- {
- Double value = patientAttributeValueService.getCalculatedPatientAttributeValue( patient,
- calAttribute, format );
- if ( value != null )
- {
- calAttributeValueMap.put( calAttribute.getName(), value );
- }
- }
}
// ---------------------------------------------------------------------
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java 2013-02-28 08:50:43 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/PatientDashboardAction.java 2013-03-08 09:15:27 +0000
@@ -34,10 +34,8 @@
import java.util.Map;
import java.util.Set;
-import org.hisp.dhis.i18n.I18nFormat;
import org.hisp.dhis.patient.Patient;
import org.hisp.dhis.patient.PatientAttribute;
-import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientAudit;
import org.hisp.dhis.patient.PatientAuditService;
import org.hisp.dhis.patient.PatientIdentifier;
@@ -76,10 +74,6 @@
private CurrentUserService currentUserService;
- private PatientAttributeService patientAttributeService;
-
- private I18nFormat format;
-
// -------------------------------------------------------------------------
// Input && Output
// -------------------------------------------------------------------------
@@ -115,17 +109,7 @@
{
return attributeMap;
}
-
- public void setFormat( I18nFormat format )
- {
- this.format = format;
- }
-
- public void setPatientAttributeService( PatientAttributeService patientAttributeService )
- {
- this.patientAttributeService = patientAttributeService;
- }
-
+
public void setPatientAttributeValueService( PatientAttributeValueService patientAttributeValueService )
{
this.patientAttributeValueService = patientAttributeValueService;
@@ -207,19 +191,6 @@
attributeValues = patientAttributeValueService.getPatientAttributeValues( patient );
- Collection<PatientAttribute> calAttributes = patientAttributeService
- .getPatientAttributesByValueType( PatientAttribute.TYPE_CALCULATED );
-
- for ( PatientAttribute calAttribute : calAttributes )
- {
- Double value = patientAttributeValueService.getCalculatedPatientAttributeValue( patient, calAttribute,
- format );
- if ( value != null )
- {
- attributeMap.put( calAttribute, value + "" );
- }
- }
-
// ---------------------------------------------------------------------
// Get patient-identifiers
// ---------------------------------------------------------------------
=== 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-03-07 16:01:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/resources/META-INF/dhis/beans.xml 2013-03-08 09:15:27 +0000
@@ -101,10 +101,6 @@
ref="org.hisp.dhis.program.ProgramStageInstanceService" />
<property name="selectedStateManager"
ref="org.hisp.dhis.caseentry.state.SelectedStateManager" />
- <property name="patientAttributeService"
- ref="org.hisp.dhis.patient.PatientAttributeService" />
- <property name="patientAttributeValueService"
- ref="org.hisp.dhis.patientattributevalue.PatientAttributeValueService" />
<property name="programStageSectionService"
ref="org.hisp.dhis.program.ProgramStageSectionService" />
</bean>
@@ -1075,8 +1071,6 @@
<property name="programInstanceService" ref="org.hisp.dhis.program.ProgramInstanceService" />
<property name="patientAuditService" ref="org.hisp.dhis.patient.PatientAuditService" />
<property name="currentUserService" ref="org.hisp.dhis.user.CurrentUserService" />
- <property name="patientAttributeService"
- ref="org.hisp.dhis.patient.PatientAttributeService" />
</bean>
<!-- Comment -->
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm 2013-03-07 16:01:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/identifierAndAttributeForm.vm 2013-03-08 09:15:27 +0000
@@ -9,7 +9,6 @@
#end
#foreach($attribute in $program.patientAttributes )
- #if( $attribute.valueType!='calculated')
#set( $attributeValue = '')
<tr>
<td class='text-column'><label>$attribute.displayName #if($attribute.mandatory)<em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
@@ -37,5 +36,4 @@
#end
</td>
</tr>
- #end
#end
\ No newline at end of file
=== 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-03-07 08:55:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-03-08 09:15:27 +0000
@@ -143,7 +143,6 @@
#foreach($attribute in $attributes )
#set($value = "")
#set($value = $patientAttributeValueMap.get($attribute.id))
- #if( $attribute.valueType != 'calculated')
<tr>
<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">
@@ -170,7 +169,6 @@
#end
</td>
</tr>
- #end
#end
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-03-07 16:01:54 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/programEnrollmentForm.vm 2013-03-08 09:15:27 +0000
@@ -71,7 +71,6 @@
<!-- ATTRIBUTES IN GROUPS -->
#foreach($attribute in $patientAttributes )
- #if( $attribute.valueType!='calculated')
#set( $attributeValue = '')
#set( $attributeValue = $!patientAttributeValueMap.get( $attribute.id ) )
<tr #alternate( $mark )>
@@ -100,7 +99,6 @@
#end
</td>
</tr>
- #end
#set( $mark = !$mark )
#end
<tr><td> </td></tr>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm 2013-03-05 13:55:46 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportDataEntryForm.vm 2013-03-08 09:15:27 +0000
@@ -26,12 +26,6 @@
<td class='bold text-column' style="vertical-align:top">$i18n.getString('program_stage'): </td>
<td style="vertical-align:right">$programStageInstance.programStage.displayName</td>
</tr>
- #foreach( $attributeName in $calAttributeValueMap.keySet() )
- <tr>
- <td class='bold text-column'>$attributeName</td>
- <td>$calAttributeValueMap.get($attributeName)</td>
- </tr>
- #end
<tr><td> </td></tr>
</table>
#end
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-07 15:11:33 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/searchPatientCriteria.vm 2013-03-08 09:15:27 +0000
@@ -73,9 +73,7 @@
<option value="fixedAttr_gender">$i18n.getString( "gender" )</option>
<option value="fixedAttr_phoneNumber">$i18n.getString( "phone_number" )</option>
#foreach( $attribute in $patientAttributes )
- #if($attribute.valueType!='calculated')
<option value="attr_$attribute.id" valueType='$attribute.valueType'>$encoder.htmlEncode( $attribute.displayName )</option>
- #end
#end
</select>
<em title="$i18n.getString( 'required' )" class="required">*</em></label>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 2012-12-21 09:23:20 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonPatientAttribute.vm 2013-03-08 09:15:27 +0000
@@ -5,7 +5,6 @@
"description": "$!encoder.jsonEncode( ${patientAttribute.description} )",
"mandatory": "$!{patientAttribute.mandatory}",
"valueType": "$!patientAttribute.valueType",
- "inherit": "$!patientAttribute.inherit",
- "expression": "$!patientAttribute.expression"
+ "inherit": "$!patientAttribute.inherit"
}
}
\ 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-02-28 07:12:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addPatientAttributeForm.vm 2013-03-08 09:15:27 +0000
@@ -46,7 +46,6 @@
<option value="bool">$i18n.getString( "yes_no" )</option>
<option value="date">$i18n.getString( "date" )</option>
<option value="combo">$i18n.getString( "attribute_combo_type" )</option>
- <option value="calculated">$i18n.getString( "calculated" )</option>
</select>
</td>
<td></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-02-28 07:12:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/patientAttribute.js 2013-03-08 09:15:27 +0000
@@ -13,7 +13,6 @@
var inherit = ( json.patientAttribute.inherit == 'true') ? i18n_yes : i18n_no;
setInnerHTML( 'inheritField', inherit );
setInnerHTML( 'valueTypeField', json.patientAttribute.valueType );
- setInnerHTML( 'expressionField', json.patientAttribute.expression );
showDetails();
});
@@ -32,7 +31,7 @@
{
selectValueType : function (this_)
{
- if ( jQuery(this_).val() == "COMBO" )
+ if ( jQuery(this_).val() == "combo" )
{
hideById("calculatedAttrTR");
hideById("expressionTR");
=== 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-01-28 09:09:20 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/patientAttribute.vm 2013-03-08 09:15:27 +0000
@@ -53,7 +53,6 @@
<p><label class="bold">$i18n.getString( "mandatory" ):</label><br><span id="mandatoryField"></span></p>
<p><label class="bold">$i18n.getString( "inherit" ):</label><br><span id="inheritField"></span></p>
<p><label class="bold">$i18n.getString( "value_type" ):</label><br><span id="valueTypeField"></span></p>
- <p><label class="bold">$i18n.getString( "expression" ):</label><br><span id="expressionField"></span></p>
</div>
</td>
=== 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-02-28 07:12:57 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updatePatientAttibuteForm.vm 2013-03-08 09:15:27 +0000
@@ -49,7 +49,6 @@
<option value="bool" #if( $patientAttribute.valueType == 'bool' ) selected="selected" #end>$i18n.getString( "yes_no" )</option>
<option value="date" #if( $patientAttribute.valueType == 'date' ) selected="selected" #end>$i18n.getString( "date" )</option>
<option value="combo" #if( $patientAttribute.valueType == 'combo' ) selected="selected" #end>$i18n.getString( "attribute_combo_type" )</option>
- <option value="calculated" #if( $patientAttribute.valueType == 'calculated' ) selected="selected" #end>$i18n.getString( "calculated" )</option>
</select>
</td>
</tr>