← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 1738: Commit changes on api for patient module.

 

------------------------------------------------------------
revno: 1738
committer: Viet <Viet@Viet-Laptop>
branch nick: trunk
timestamp: Tue 2010-04-06 13:38:04 +0700
message:
  Commit changes on api for patient module.
modified:
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java
  dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueStore.java


--
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/PatientIdentifierService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java	2010-03-09 12:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierService.java	2010-04-06 06:38:04 +0000
@@ -76,4 +76,8 @@
     Patient getPatient( PatientIdentifierType idenType, String value);
     
     Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit );
+    
+    Collection<Patient> getPatientsByIdentifier( String identifier, int min, int max );
+    
+    int countGetPatientsByIdentifier( String identifier );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2010-03-09 12:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientIdentifierStore.java	2010-04-06 06:38:04 +0000
@@ -66,4 +66,8 @@
     int countListPatientByOrganisationUnit( OrganisationUnit orgUnit );
     
     Collection<Patient> listPatientByOrganisationUnit( OrganisationUnit organisationUnit );
+    
+    Collection<Patient> getPatientsByIdentifier( String identifier, int min, int max );
+    
+    int countGetPatientsByIdentifier( String identifier );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java	2010-03-09 12:10:10 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientService.java	2010-04-06 06:38:04 +0000
@@ -29,8 +29,10 @@
 
 import java.util.Collection;
 import java.util.Date;
+import java.util.List;
 
 import org.hisp.dhis.organisationunit.OrganisationUnit;
+import org.hisp.dhis.patientattributevalue.PatientAttributeValue;
 
 /**
  * @author Abyot Asalefew Gizaw
@@ -48,7 +50,7 @@
 
     Patient getPatient( int id );
 
-    Collection<Patient> getAllPatients();    
+    Collection<Patient> getAllPatients();
 
     Collection<Patient> getAllPatients( Boolean isDead );
 
@@ -57,29 +59,46 @@
     Collection<Patient> getPatientsByBirthDate( Date birthDate );
 
     Collection<Patient> getPatientsByNames( String name );
-    
+
     Collection<Patient> getPatients( String searchText );
-    
-    //Collection<Patient> getPatientsByAttribute( PatientAttribute attribute );
-    
-    Collection<Patient> getPatientsByOrgUnit( OrganisationUnit organisationUnit , int min, int max);
-    
+
+    // Collection<Patient> getPatientsByAttribute( PatientAttribute attribute );
+
+    Collection<Patient> getPatientsByOrgUnit( OrganisationUnit organisationUnit, int min, int max );
+
     int countGetPatientsByOrgUnit( OrganisationUnit organisationUnit );
-    
-    Collection<Patient> getPatients( OrganisationUnit organisationUnit, String searchText , int min, int max);
-    
+
+    Collection<Patient> getPatients( OrganisationUnit organisationUnit, String searchText, int min, int max );
+
     Collection<Patient> sortPatientsByAttribute( Collection<Patient> patients, PatientAttribute patientAttribute );
-    
-    Collection<Patient> getPatient( String firstName, String middleName, String lastName, Date birthdate, String gender);
-    
+
+    Collection<Patient> getPatient( String firstName, String middleName, String lastName, Date birthdate, String gender );
+
     /**
-     *  Search Patient base on PatientIdentifierType or Attribute or Patient's name
+     * Search Patient base on PatientIdentifierType or Attribute or Patient's
+     * name
+     * 
      * @param identifierTypeId
      * @param attributeId
      * @param value
      * @return
      */
     Collection<Patient> searchPatient( Integer identifierTypeId, Integer attributeId, String value );
-    
+
     Collection<Patient> getPatientsByOrgUnit( OrganisationUnit organisationUnit );
+
+    Collection<Patient> getPatients( String searchText, int min, int max );
+
+    int countGetPatients( String searchText );
+
+    Collection<Patient> getPatientsByNames( String name, int min, int max );
+
+    int countnGetPatientsByNames( String name );
+
+    void createPatient( Patient patient, OrganisationUnit orgUnit, Integer representativeId,
+        Integer relationshipTypeId, List<PatientAttributeValue> patientAttributeValues );
+
+    public void updatePatient( Patient patient, OrganisationUnit orgUnit, Integer representativeId,
+        Integer relationshipTypeId, List<PatientAttributeValue> valuesForSave,
+        List<PatientAttributeValue> valuesForUpdate, Collection<PatientAttributeValue> valuesForDelete );
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java	2010-02-28 03:32:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patient/PatientStore.java	2010-04-06 06:38:04 +0000
@@ -52,5 +52,10 @@
     //Collection<Patient> getByAttribute( PatientAttribute attribute );
     
     Collection<Patient> getPatient( String firstName, String middleName, String lastName, Date birthdate, String gender );
+    
+    Collection<Patient> getPatientsByNames( String name, int min, int max );
+    
+    int countGetPatientsByNames( String name );
+    
 }
 

=== 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	2010-02-28 03:32:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueService.java	2010-04-06 06:38:04 +0000
@@ -70,4 +70,9 @@
     int countByPatientAttributeoption( PatientAttributeOption attributeOption ); 
     
     Collection<Patient> getPatient( PatientAttribute attribute, String value );
+    
+    Collection<Patient> searchPatientAttributeValue( PatientAttribute patientAttribute, String searchText, int min, int max);
+    
+    int countSearchPatientAttributeValue(  PatientAttribute patientAttribute, String searchText );
+    
 }

=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueStore.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueStore.java	2010-02-28 03:32:13 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/patientattributevalue/PatientAttributeValueStore.java	2010-04-06 06:38:04 +0000
@@ -61,4 +61,8 @@
     int countByPatientAttributeoption( PatientAttributeOption attributeOption );
     
     Collection<Patient> getPatient( PatientAttribute attribute, String value );
+    
+    Collection<Patient> searchPatientAttributeValue( PatientAttribute patientAttribute, String searchText, int min, int max);
+    
+    int countSearchPatientAttributeValue(  PatientAttribute patientAttribute, String searchText );
 }