dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #17551
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 7019: (patient) Add Standard interval for program-stage and minor fix.
------------------------------------------------------------
revno: 7019
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2012-05-23 23:19:55 +0700
message:
(patient) Add Standard interval for program-stage and minor fix.
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java
dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportsMenu.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseProgramStages.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageListAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.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/programStage.js
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.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/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/program/ProgramStage.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2012-02-27 01:07:19 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/program/ProgramStage.java 2012-05-23 16:19:55 +0000
@@ -56,6 +56,8 @@
private Set<ProgramStageDataElement> programStageDataElements = new HashSet<ProgramStageDataElement>();
private DataEntryForm dataEntryForm;
+
+ private Integer standardInterval;
// -------------------------------------------------------------------------
// Constructors
@@ -130,6 +132,16 @@
return description;
}
+ public Integer getStandardInterval()
+ {
+ return standardInterval;
+ }
+
+ public void setStandardInterval( Integer standardInterval )
+ {
+ this.standardInterval = standardInterval;
+ }
+
public void setDescription( String description )
{
this.description = description;
=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml'
--- dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml 2012-02-27 01:07:19 +0000
+++ dhis-2/dhis-services/dhis-service-patient/src/main/resources/org/hisp/dhis/program/hibernate/ProgramStage.hbm.xml 2012-05-23 16:19:55 +0000
@@ -31,6 +31,8 @@
<many-to-one name="dataEntryForm" class="org.hisp.dhis.dataentryform.DataEntryForm"
foreign-key="fk_programstage_dataentryform" />
-
+
+ <property name="standardInterval" />
+
</class>
</hibernate-mapping>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/entry.js 2012-05-23 16:19:55 +0000
@@ -30,7 +30,7 @@
addOptionById( 'programStageId', "0", i18n_select );
for ( i in json.programStages )
{
- addOptionById( 'programStageId', json.programStages[i].id, json.programStages[i].name );
+ $('#programStageId').append("<option value='" + json.programStages[i].id + "' standardInterval='" + json.programStages[i].standardInterval + "' >" + json.programStages[i].name + '</option>');
}
var type = jQuery('#dataRecordingSelectDiv [name=programId] option:selected').attr('type');
@@ -654,6 +654,16 @@
width: 300,
height: 100
}).show('fast');
+
+ var standardInterval = jQuery('#dataRecordingSelectDiv [name=programStageId] option:selected').attr('standardInterval');
+
+ var date = new Date();
+ var d = date.getDate();
+ var m = date.getMonth();
+ var y = date.getFullYear();
+ var edate= new Date(y, m, d+standardInterval);
+ jQuery('#dueDateNewEncounter').datepicker( "setDate" , edate )
+
}
var selectedProgram = jQuery('#dataRecordingSelectForm [name=programId] option:selected');
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportsMenu.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportsMenu.vm 2012-05-22 12:53:50 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/reportsMenu.vm 2012-05-23 16:19:55 +0000
@@ -2,7 +2,7 @@
<a href="index.action"><h2>$i18n.getString( "reports" ) </h2></a>
<ul>
<li><a href="reportSelect.action">$i18n.getString( "program_summary" ) </a></li>
- <li><a href="app/index.html"> $i18n.getString( "tabular_report" ) </a></li>
+ <li><a href="tabularReportSelect.action"> $i18n.getString( "tabular_report" ) </a></li>
</ul>
<br>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseProgramStages.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseProgramStages.vm 2012-04-11 06:25:02 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/responseProgramStages.vm 2012-05-23 16:19:55 +0000
@@ -5,7 +5,8 @@
{
"id": ${programStage.id} ,
"name": "$!encoder.jsonEncode( ${programStage.name} )",
- "irregular": "${programStage.irregular}"
+ "irregular": "${programStage.irregular}",
+ "standardInterval": "$!programStage.standardInterval"
}#if( $velocityCount < $size ),#end
#end],
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-05-22 13:09:34 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/select.vm 2012-05-23 16:19:55 +0000
@@ -4,7 +4,7 @@
<table style="margin-bottom:8px">
<tr>
<td>
- <label>$i18n.getString( "orgunit" )</label>
+ <label>$i18n.getString( "registering_unit" )</label>
</td>
<td>
<input type="text" id='orgunitName' readonly="readonly" #if( $organisationUnit ) value="$encoder.htmlEncode( $organisationUnit.name )" #else value="[$i18n.getString( "please_select_village" )]" #end style="min-width:350px">
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/AddProgramAction.java 2012-05-23 16:19:55 +0000
@@ -132,7 +132,7 @@
public String execute()
throws Exception
{
- displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? true : displayProvidedOtherFacility;
+ displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
Program program = new Program();
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/program/UpdateProgramAction.java 2012-05-23 16:19:55 +0000
@@ -129,7 +129,7 @@
public String execute()
throws Exception
{
- displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? true : displayProvidedOtherFacility;
+ displayProvidedOtherFacility = (displayProvidedOtherFacility == null) ? false : displayProvidedOtherFacility;
Program program = programService.getProgram( id );
program.setName( name );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2012-03-28 08:26:44 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2012-05-23 16:19:55 +0000
@@ -139,6 +139,13 @@
this.irregular = irregular;
}
+ private Integer standardInterval;
+
+ public void setStandardInterval( Integer standardInterval )
+ {
+ this.standardInterval = standardInterval;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -155,6 +162,7 @@
programStage.setDescription( description );
programStage.setStageInProgram( program.getProgramStages().size() + 1 );
programStage.setProgram( program );
+ programStage.setStandardInterval( standardInterval );
irregular = (irregular == null) ? false : irregular;
programStage.setIrregular( irregular );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageListAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageListAction.java 2011-09-28 08:51:32 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/GetProgramStageListAction.java 2012-05-23 16:19:55 +0000
@@ -35,7 +35,6 @@
import org.hisp.dhis.program.ProgramService;
import org.hisp.dhis.program.ProgramStage;
import org.hisp.dhis.program.ProgramStageService;
-import org.hisp.dhis.program.comparator.ProgramNameComparator;
import org.hisp.dhis.program.comparator.ProgramStageNameComparator;
import org.hisp.dhis.program.comparator.ProgramStageOrderComparator;
@@ -93,19 +92,7 @@
{
this.associations = associations;
}
-
- private List<Program> programs;
-
- public List<Program> getPrograms()
- {
- return programs;
- }
-
- public void setPrograms( List<Program> programs )
- {
- this.programs = programs;
- }
-
+
private Program program;
public Program getProgram()
@@ -120,10 +107,6 @@
public String execute()
throws Exception
{
- programs = new ArrayList<Program>( programService.getAllPrograms() );
-
- Collections.sort( programs, new ProgramNameComparator() );
-
if ( id != null )
{
program = programService.getProgram( id );
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2012-03-07 02:40:08 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2012-05-23 16:19:55 +0000
@@ -134,6 +134,13 @@
this.irregular = irregular;
}
+ private Integer standardInterval;
+
+ public void setStandardInterval( Integer standardInterval )
+ {
+ this.standardInterval = standardInterval;
+ }
+
// -------------------------------------------------------------------------
// Action implementation
// -------------------------------------------------------------------------
@@ -145,11 +152,12 @@
programStage.setName( name );
programStage.setDescription( description );
+ programStage.setStandardInterval( standardInterval );
minDaysFromStart = (minDaysFromStart == null) ? 0 : minDaysFromStart;
programStage.setMinDaysFromStart( minDaysFromStart );
- irregular = (irregular==null) ? false : irregular;
+ irregular = (irregular == null) ? false : irregular;
programStage.setIrregular( irregular );
programStageService.updateProgramStage( programStage );
@@ -163,7 +171,7 @@
ProgramStageDataElement programStageDataElement = programStageDataElementService.get( programStage,
dataElement );
-
+
if ( programStageDataElement == null )
{
programStageDataElement = new ProgramStageDataElement( programStage, dataElement, this.compulsories
@@ -173,7 +181,7 @@
else
{
programStageDataElement.setCompulsory( this.compulsories.get( i ) );
-
+
programStageDataElement.setSortOrder( new Integer( i ) );
programStageDataElementService.updateProgramStageDataElement( programStageDataElement );
=== 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 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties 2012-05-23 16:19:55 +0000
@@ -177,7 +177,7 @@
create_new_single_validation=Create new single validation
create_new_multi_validation=Create new multi validation
beneficiary_attribute_group_sort_order=Beneficiary Attribute Group Sort Order
-min_days_from_start=Mininum number of days from start
+scheduled_days_from_start=Scheduled days from start
success_delete_program_attribute_option=Delete program attribute option successfully.
validation_criteria_management=Validation criteria management
aggregation_data_element=Aggregation data element
@@ -223,7 +223,7 @@
run_success=Run successful
run_fail=Run failed
patients_registered=Registered Beneficiaries No
-irregular_encounter=Irregular encounter
+repeatable=Repeatable
date_of_birth=Date of Birth
anonymous=Anonymous
edit_program_validation=Edit program validation
@@ -244,7 +244,7 @@
condition=Condition
no_date_data_element_in_selected_program_stage=No data elements with date-type in the selected program stage
shown_on_reports=Shown on reports
-hide_provided_other_facility=Hide provided other facility
+show_provided_provided_elsewhere=Show provided elsewhere
suggested_values=Suggested values
add_all_values=Add all values
display_provided_other_facility_column=Display provided other facility column
@@ -256,3 +256,5 @@
multiple_events_with_registration = Multiple events with registration
single_event_with_registration = Single event with registration
single_event_without_registration = Single event without registration
+for = for
+standard_interval = Standard interval
\ 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/addProgramForm.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramForm.vm 2012-05-23 16:19:55 +0000
@@ -38,7 +38,7 @@
</tr>
<tr>
- <td><label>$i18n.getString( "hide_provided_other_facility" )</label></td>
+ <td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='false'></td>
<td></td>
</tr>
=== 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 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/addProgramStageForm.vm 2012-05-23 16:19:55 +0000
@@ -6,32 +6,38 @@
<input type="hidden" id="id" name="id" value="$program.id"/>
<table>
- <tr>
- <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="name" name="name" class="{validate:{required:true,rangelength:[4,160]}}"/></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
- <td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:4}}"/></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "min_days_from_start" )</label></td>
- <td><input type="text" id="minDaysFromStart" name="minDaysFromStart" class="{validate:{number:true,min:0}}"/></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "program" )</label></td>
- <td><input type="text" id="program" name="program" value="$encoder.htmlEncode( $program.name )" disabled="disabled"/></td>
- </tr>
+ <thead>
+ <tr><th colspan="2">$i18n.getString( "program_stage_details" )</th></tr>
+ </thead>
+ <tbody>
+
+ <tr>
+ <td><label>$i18n.getString( "name" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td><input type="text" id="name" name="name" class="{validate:{required:true,rangelength:[4,160]}}"/></td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "description" ) <em title="$i18n.getString( 'required' )" class="required">*</em></label></td>
+ <td><input type="text" id="description" name="description" class="{validate:{required:true,minlength:4}}"/></td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "min_days_from_start" )</label></td>
+ <td><input type="text" id="minDaysFromStart" name="minDaysFromStart" class="{validate:{number:true,min:0}}"/></td>
+ </tr>
- <tr>
- <td><label>$i18n.getString( "irregular_encounter" )</label></td>
- <td><input type="checkbox" id="irregular" name="irregular" value='true' /></td>
- </tr>
-
- <tr><td> </td><td> </td></tr>
+ <tr>
+ <td><label>$i18n.getString( "repeatable" )</label></td>
+ <td><input type="checkbox" id="irregular" name="irregular" value='true' onchange='repeatableOnChange();'/></td>
+ </tr>
+
+ <tr>
+ <td><label>$i18n.getString( "standard_interval" )</label></td>
+ <td><input type="text" id="standardInterval" name="standardInterval" class="{validate:{number:true}}" disabled/></td>
+ </tr>
+
+ <tr><td> </td><td> </td></tr>
+ </thead>
</table>
<table id="programStageMembersArea">
=== 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 2012-03-13 09:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/programStage.js 2012-05-23 16:19:55 +0000
@@ -42,7 +42,12 @@
setInnerHTML( 'nameField', json.programStage.name );
setInnerHTML( 'descriptionField', json.programStage.description );
setInnerHTML( 'stageInProgramField', json.programStage.stageInProgram );
- setInnerHTML( 'minDaysFromStartField', json.programStage.minDaysFromStart );
+ setInnerHTML( 'scheduledDaysFromStartField', json.programStage.minDaysFromStart );
+
+ var irregular = (json.programStage.irregular=='true') ? i18n_yes : i18n_no;
+ setInnerHTML( 'irregularField', irregular );
+ setInnerHTML( 'standardIntervalField', json.programStage.standardInterval );
+
setInnerHTML( 'dataElementCountField', json.programStage.dataElementCount );
showDetails();
@@ -132,3 +137,17 @@
if( element.hasClass( 'selected') ) element.removeClass( 'selected' );
else element.addClass( 'selected' );
}
+
+function repeatableOnChange()
+{
+ var checked = byId('irregular').checked;
+ if( checked )
+ {
+ enable('standardInterval');
+ }
+ else
+ {
+ disable('standardInterval');
+ setFieldValue('standardInterval', '0');
+ }
+}
\ 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/menu.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm 2012-05-22 12:49:45 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/menu.vm 2012-05-23 16:19:55 +0000
@@ -11,10 +11,6 @@
<ul>
<li><a href="program.action">$i18n.getString( "program" )</a></li>
<li><a href="programAttribute.action">$i18n.getString( "program_attribute" )</a></li>
+ <li><a href="caseAggregation.action">$i18n.getString( "aggregation_query_builder" )</a></li>
<li><a href="validationCriteria.action">$i18n.getString( "validation_criteria" )</a></li>
</ul>
-
-<h2>$i18n.getString( "aggregation")</h2>
-<ul>
- <li><a href="caseAggregation.action">$i18n.getString( "aggregation_query_builder" )</a></li>
-</ul>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm 2012-05-22 12:44:13 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programAssociations.vm 2012-05-23 16:19:55 +0000
@@ -1,5 +1,5 @@
-<h3>$i18n.getString( "assign_program_to_orgunits" )</h3>
+<h3>$i18n.getString( "assign_program_to_orgunits_for_registering" )</h3>
<h4>$encoder.htmlEncode( $program.name )</h4>
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/programStageList.vm 2012-05-23 16:19:55 +0000
@@ -1,16 +1,10 @@
-<h3>$i18n.getString( "program_stage_management" )</h3>
+<h3>$i18n.getString( "program_stage_management" ) $i18n.getString( "for" ) $program.name</h3>
+<h4></h4>
+<input type='hidden' id='id' name='id' value='$program.id'>
<table class="mainPageTable">
+
<tr>
- <td>
- <label class="bold">$i18n.getString( "select_program" )</label><br>
- <select id="id" name="id" style="min-width:20em" onchange="getStageByProgram( this.value )">
- <option value="" selected="selected" >[ $i18n.getString( "all" ) ]</option>
- #foreach ( $program in $programs )
- <option value="$program.id" #if($id==$program.id) selected="selected" #end>$program.name</option>
- #end
- </select>
- </td>
<td style="text-align:right">
<input type="button" value="$i18n.getString( "back" )" onclick="window.location.href='program.action'" style="width:75px">
#if( $program.type=='1' )
@@ -64,7 +58,9 @@
<p><label class="bold">$i18n.getString( "name" ):</label><br><span id="nameField"></span></p>
<p><label class="bold">$i18n.getString( "description" ):</label><br><span id="descriptionField"></span></p>
<p><label class="bold">$i18n.getString( "stage_in_program" ):</label><br><span id="stageInProgramField"></span></p>
- <p><label class="bold">$i18n.getString( "min_days_from_start" ):</label><br><span id="minDaysFromStartField"></span></p>
+ <p><label class="bold">$i18n.getString( "scheduled_days_from_start" ):</label><br><span id="scheduledDaysFromStartField"></span></p>
+ <p><label class="bold">$i18n.getString( "irregular" ):</label><br><span id="irregularField"></span></p>
+ <p><label class="bold">$i18n.getString( "standard_interval" ):</label><br><span id="standardIntervalField"></span></p>
<p><label class="bold">$i18n.getString( "no_of_dataelements" ):</label><br><span id="dataElementCountField"></span></p>
</div>
@@ -78,5 +74,7 @@
var i18n_adding_program_stage_failed = '$encoder.jsEscape( $i18n.getString( "adding_program_stage_failed" ), "'")';
var i18n_updating_program_stage_failed = '$encoder.jsEscape( $i18n.getString( "updating_program_stage_failed" ), "'")';
var i18n_none = '$encoder.jsEscape( $i18n.getString( "none" ), "'")';
+ var i18n_yes = '$encoder.jsEscape( $i18n.getString( "yes" ), "'")';
+ var i18n_no= '$encoder.jsEscape( $i18n.getString( "no" ), "'")';
</script>
=== 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 2012-05-23 15:02:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramForm.vm 2012-05-23 16:19:55 +0000
@@ -37,7 +37,7 @@
</tr>
<tr>
- <td><label>$i18n.getString( "hide_provided_other_facility" )</label></td>
+ <td><label>$i18n.getString( "show_provided_provided_elsewhere" )</label></td>
<td><input type="checkbox" id="displayProvidedOtherFacility" name="displayProvidedOtherFacility" value='false' #if( $program.displayProvidedOtherFacility=='false' ) checked #end ></td>
<td></td>
</tr>
=== 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 2012-03-19 09:35:42 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/updateProgramStageForm.vm 2012-05-23 16:19:55 +0000
@@ -21,20 +21,19 @@
</tr>
<tr>
- <td><label>$i18n.getString( "min_days_from_start" )</label></td>
+ <td><label>$i18n.getString( "scheduled_days_from_start" )</label></td>
<td><input type="text" id="minDaysFromStart" name="minDaysFromStart" value="$programStage.minDaysFromStart" class="{validate:{number:true,min:0}}"/></td>
</tr>
<tr>
- <td><label>$i18n.getString( "program" )</label></td>
- <td><input type="text" id="program" name="program" maxlength="30" value="$encoder.htmlEncode( $programStage.program.name )" disabled="disabled"/></td>
- </tr>
-
- <tr>
- <td><label>$i18n.getString( "irregular_encounter" )</label></td>
- <td><input type="checkbox" id="irregular" name="irregular" value='true' #if( $programStage.irregular=='true' ) checked #end/></td>
+ <td><label>$i18n.getString( "repeatable" )</label></td>
+ <td><input type="checkbox" id="irregular" name="irregular" value='true' #if( $programStage.irregular=='true' ) checked #end /></td>
</tr>
+ <tr>
+ <td><label>$i18n.getString( "standard_interval" )</label></td>
+ <td><input type="text" id="standardInterval" name="standardInterval" value='$programStage.standardInterval' class="{validate:{number:true}}" #if( $programStage.irregular=='false' ) disabled #end /></td>
+ </tr>
<tr><td> </td></tr>
</tbody>