dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23767
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11576: Only dislay numbers in Orgunit Count identifier type field of Add new patient form if the code is...
------------------------------------------------------------
revno: 11576
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-06 10:10:36 +0700
message:
Only dislay numbers in Orgunit Count identifier type field of Add new patient form if the code is null
modified:
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/webapp/dhis-web-caseentry/patientForm.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-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 2013-07-03 15:40:29 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2013-08-06 03:10:36 +0000
@@ -218,11 +218,10 @@
{
organisationUnit = selectionManager.getSelectedOrganisationUnit();
healthWorkers = organisationUnit.getUsers();
-
+
if ( programId == null )
{
- patientRegistrationForm = patientRegistrationFormService
- .getCommonPatientRegistrationForm();
+ patientRegistrationForm = patientRegistrationFormService.getCommonPatientRegistrationForm();
if ( patientRegistrationForm != null && patientRegistrationForm.getDataEntryForm() != null )
{
@@ -233,8 +232,7 @@
else
{
program = programService.getProgram( programId );
- patientRegistrationForm = patientRegistrationFormService
- .getPatientRegistrationForm( program );
+ patientRegistrationForm = patientRegistrationFormService.getPatientRegistrationForm( program );
if ( patientRegistrationForm != null && patientRegistrationForm.getDataEntryForm() != null )
{
@@ -283,6 +281,7 @@
private String generateOrgunitIdentifier( OrganisationUnit organisationUnit )
{
String value = organisationUnit.getCode();
+ value = (value == null) ? "" : value;
int totalPatient = patientService.countGetPatientsByOrgUnit( organisationUnit );
if ( totalPatient < 10 )
=== 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-08-01 03:15:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/patientForm.vm 2013-08-06 03:10:36 +0000
@@ -140,7 +140,9 @@
<tr>
<td class='text-column'><label>$encoder.htmlEncode($identifierType.displayName) #if($identifierType.mandatory) <em title="$i18n.getString( "required" )" class="required">*</em> #end</label></td>
<td class="input-column">
- <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related && $!patient.underAge) disabled="disabled" #end class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}" />
+ <input type="text" id="iden$identifierType.id" name="iden$identifierType.id" value="$!identifier" data="{related:$identifierType.related}" #if($identifierType.related && $!patient.underAge) disabled="disabled" #end
+ class="{validate:{required:$identifierType.mandatory, #if($!identifierType.noChars) maxlength:$identifierType.noChars, #end #if($identifierType.type=='number') number:true #elseif($!identifierType.type=='letter') lettersonly:true #end }}"
+ #if($identifierType.type=='orgunitCount') readonly #end />
</td>
</tr>
#end