Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
434 commits
Select commit Hold shift + click to select a range
ea26d47
Update method for updating plan processing status
Rkareko Oct 7, 2021
1ac8b31
Refactor method for updating processing status
Rkareko Oct 7, 2021
8b3225b
Add plan template model
Rkareko Oct 8, 2021
b072c2d
Bump up version
Rkareko Oct 8, 2021
4ba727f
Add test
Rkareko Oct 12, 2021
5aaf499
Filter rapidpro generated events
ellykits Oct 13, 2021
217e192
Bump up plan evaluator version
Rkareko Oct 15, 2021
de5ab6c
Bump up version
Rkareko Oct 15, 2021
5ab2020
Merge pull request #508 from opensrp/fix-location-convertion-bug
ndegwamartin Oct 15, 2021
3e96162
:bug: Fix the child unsynced data load. Add getting data using the id…
dubdabasoduba Oct 19, 2021
3e76604
:arrow_up: Update the version
dubdabasoduba Oct 19, 2021
2d62ce3
include task owner when using rabbitmq profile (#510)
Oct 19, 2021
a5b483d
Add method for getting plan task counts
Rkareko Oct 21, 2021
20d1ee0
Add service method to return count of tasks for a plan and code
Rkareko Oct 21, 2021
e576f67
Populate actual task counts
Rkareko Oct 21, 2021
45ec83d
Update Bcc and case confirmation task count logic;
Rkareko Oct 21, 2021
5c09c55
Add service and repository method to return count of locations filter…
Rkareko Oct 21, 2021
c961dfa
Add service and repository method for returning count of structures f…
Rkareko Oct 21, 2021
875954a
Update count structures by properties to take a list of parent ids
Rkareko Oct 21, 2021
c73b732
Update count structures by properties to take a list of parent ids
Rkareko Oct 21, 2021
36c0bc8
Update logic for getting mosquito collection and larval dipping task …
Rkareko Oct 21, 2021
2b64ef9
Add service and repository method for counting family members by loca…
Rkareko Oct 25, 2021
df5ab45
Set plan task counts for blood screening action
Rkareko Oct 25, 2021
a238e4b
Bump up plan evaluator version
Rkareko Oct 26, 2021
6f7bf89
Bump up version
Rkareko Oct 26, 2021
f32d29c
Add unit tests
Rkareko Oct 26, 2021
428f0af
Add base entity service tests
Rkareko Oct 26, 2021
588d305
Add errortrace service tests
Rkareko Oct 26, 2021
c49247d
Merge pull request #514 from opensrp/populate-task-reason-reference
Rkareko Oct 26, 2021
da8744a
Merge v2 into create-mybatis-artifacts-for-template-table
Rkareko Nov 9, 2021
24f3191
Throw illegal argument exceptions instead of runtime exceptions
Rkareko Nov 9, 2021
8620550
Update unit test
Rkareko Nov 9, 2021
49219c3
:sparkles: Update the ZEIR to RapidPro sync
dubdabasoduba Nov 10, 2021
90466a0
:arrow_up: Merge branch 'v2' of github.com:opensrp/opensrp-server-cor…
dubdabasoduba Nov 10, 2021
879cafc
Add json property annotation
Rkareko Nov 10, 2021
e4f19b0
Bump up version
Rkareko Nov 10, 2021
53a7937
:bug: Fix the update from ZEIR creates a new RapidPro contact
dubdabasoduba Nov 10, 2021
660c914
Retrieve record by primary key
Rkareko Nov 10, 2021
35c9d84
Bump up version
Rkareko Nov 10, 2021
9f3df34
Add null check for plan actions
Rkareko Nov 12, 2021
0dc093f
Bump up version
Rkareko Nov 12, 2021
bd83526
Add plan constants
Rkareko Nov 12, 2021
3e9cc64
Bump up version
Rkareko Nov 12, 2021
5482714
:bug: Update the post exising child method to avoid duplicates on rap…
dubdabasoduba Nov 16, 2021
5e4f723
Resolve codacy comments
ellykits Nov 16, 2021
b37d106
Resolve review comments
ellykits Nov 16, 2021
970620e
Set page size when fetching assigned locations and plans
Rkareko Nov 17, 2021
21c8186
Bump up version
Rkareko Nov 17, 2021
f4814b9
Merge pull request #515 from opensrp/1002-assigned-location-and-plans…
Rkareko Nov 17, 2021
51fffb2
Merge branch 'v2' into 509-missing-task-gen
Rkareko Nov 21, 2021
83e1ec7
Add task generation info for family registration and bednet distribut…
Rkareko Nov 28, 2021
a6fbcbc
Correct logic for fetching family member tasks
Rkareko Nov 29, 2021
9c3a4aa
Bump up version
Rkareko Nov 29, 2021
d18c992
Merge branch 'v2' into create-mybatis-artifacts-for-template-table
Rkareko Dec 1, 2021
700a356
Allow filtering of plans by either identifiers or edit date
Rkareko Dec 2, 2021
8befb04
add threadpooltaskexecutor bean (#519)
Dec 2, 2021
9f2fea5
Merge v2 into 509-missing-task-gen
Rkareko Dec 2, 2021
631946b
Add plan constants
Rkareko Dec 2, 2021
b112a28
Code cleanup
Rkareko Dec 2, 2021
fa75e28
Add locaiton service tests:
Rkareko Dec 2, 2021
ddab03d
Add location repository tests
Rkareko Dec 2, 2021
9c3a878
Add plan and task tests
Rkareko Dec 2, 2021
463f40a
Rafactor get plan task count function
Rkareko Dec 3, 2021
2efb77f
Fix seach plan by status
Rkareko Dec 3, 2021
695de9e
Bump up plan evaluator version
Rkareko Dec 3, 2021
d7849d2
Add count family members by location function
Rkareko Dec 5, 2021
a2ead83
Add get plan task counts test
Rkareko Dec 6, 2021
b7a800f
Add unit tests
Rkareko Dec 6, 2021
44329d8
Add missing semi colon
Rkareko Dec 6, 2021
95e0ea2
Add filter by plan status
Rkareko Dec 7, 2021
2b842ee
Merge v2 into create-mybatis-artifacts-for-template-table
Rkareko Dec 7, 2021
953fac9
Update configs
Rkareko Dec 7, 2021
fdd188a
Add plan identifier to task count details
Rkareko Dec 7, 2021
2f76ad6
Add task count object
Rkareko Dec 7, 2021
f1bfd5d
Bump up version
Rkareko Dec 7, 2021
fab4b7a
Update unit tests
Rkareko Dec 7, 2021
8831cc5
Bump up version
Rkareko Dec 7, 2021
416bdbd
Verify plan identifier is set
Rkareko Dec 7, 2021
e00f2b6
Merge pull request #512 from opensrp/509-missing-task-gen
Rkareko Dec 7, 2021
d76b168
Merge v2 into create-mybatis-artifacts-for-template-table
Rkareko Dec 7, 2021
68bef04
Resolve codacy comments
ellykits Dec 7, 2021
535de98
Merge branch 'v2' into rapidpro-refactor
ellykits Dec 7, 2021
332f654
Fix mutable function parameter
ellykits Dec 7, 2021
5e22c6d
Add plan processing repository tests
Rkareko Dec 7, 2021
92c681d
Add unit plan processing status unit tests
Rkareko Dec 7, 2021
66abae4
Add template unit tests
Rkareko Dec 7, 2021
98e6ea8
Fix codacy issues
Rkareko Dec 7, 2021
d435f11
Reset plan processing status ud sequence
Rkareko Dec 7, 2021
ceb35b4
Code cleanup
Rkareko Dec 7, 2021
b12430e
Remove unused import
Rkareko Dec 7, 2021
4b9f54f
Add plan service tests
Rkareko Dec 8, 2021
0b455c3
Add get plan template tests
Rkareko Dec 9, 2021
35653a0
Add template and processing status service tests
Rkareko Dec 9, 2021
d1619b4
Update template tests
Rkareko Dec 9, 2021
65a7537
Use sample plan json for test
Rkareko Dec 9, 2021
6b865a5
Update unit tests
Rkareko Dec 9, 2021
f1c5306
Use Lombok to generate setters and getters
Rkareko Dec 9, 2021
78cf0db
Bump up version
Rkareko Dec 9, 2021
b08216b
Merge pull request #507 from opensrp/create-mybatis-artifacts-for-tem…
ndegwamartin Dec 10, 2021
081b23a
Bump up server core artifact version to 2.12.17
ndegwamartin Dec 11, 2021
3bcb649
Bump up Log4J core to v2.15.0
ndegwamartin Dec 11, 2021
c8520af
Merge pull request #526 from opensrp/security-patches-v2
ndegwamartin Dec 11, 2021
85cc0e9
Add error log field to mybatis artifacts
Rkareko Dec 12, 2021
7135f1c
Update repository and service methods to handle error log field
Rkareko Dec 12, 2021
5c87377
Add failed status
Rkareko Dec 12, 2021
0bbbd49
Add unit test
Rkareko Dec 12, 2021
66e5d7a
Bump up version
Rkareko Dec 12, 2021
60fc430
Update configs
Rkareko Dec 12, 2021
687b356
Add repository tests
Rkareko Dec 13, 2021
1d70147
Add unit test
Rkareko Dec 13, 2021
105c6fa
Merge pull request #527 from opensrp/add_error_log_to_plan_processing…
Rkareko Dec 14, 2021
2d1fa4b
Log4j security patch v2.16 - v2 (#531)
Dec 16, 2021
d2c3ca7
Merge branch 'v2' into rapidpro-refactor
ellykits Dec 16, 2021
a2eee95
Fix action temaplate deserialization
Rkareko Dec 19, 2021
0d9c278
Bump up version
Rkareko Dec 19, 2021
d07392b
Merge pull request #535 from opensrp/fix_plan_action_convertion
Rkareko Dec 20, 2021
40ce222
update log4j version (#538)
Dec 20, 2021
28b83dd
Fix retrieve event bug
Rkareko Dec 20, 2021
ce9389c
Bump up version
Rkareko Dec 20, 2021
0df9bb9
Merge branch 'v2' into fix_get_event
Rkareko Dec 20, 2021
867bea1
Bump up version
Rkareko Dec 20, 2021
5f74b9e
Refactor variable name
Rkareko Dec 20, 2021
6c03362
Merge pull request #539 from opensrp/fix_get_event
qiarie Dec 20, 2021
4c60690
Fix logic for determining whether a plan hascounts for tasks that we…
Rkareko Jan 7, 2022
5388d36
Bump up version
Rkareko Jan 7, 2022
69ffe5a
Merge pull request #542 from opensrp/fix_missing_plan_task_count_bug
Rkareko Jan 13, 2022
3c6202e
Add service and repository methods for fetching family counts
Rkareko Jan 18, 2022
b628a64
Use registered families to evaluate missing registration and bednet t…
Rkareko Jan 18, 2022
f946397
Bump up version
Rkareko Jan 18, 2022
ace8ced
Add contant for family client type
Rkareko Jan 20, 2022
15a5bba
Update logic for fetching families by location
Rkareko Jan 24, 2022
b45b4ee
Bump up version
Rkareko Jan 24, 2022
88ff962
Use number of registered families as the expected bednet task count
Rkareko Jan 25, 2022
0f462fc
Bump up version
Rkareko Jan 25, 2022
41125f8
Update test cases
Rkareko Jan 31, 2022
75d3210
Bump up version
Rkareko Jan 31, 2022
572f8a5
Add unit tests
Rkareko Jan 31, 2022
df58665
Merge pull request #545 from opensrp/family-reg-missing-tasks-count-fix
Rkareko Feb 1, 2022
7170d62
Dependency updates v2 (#548)
Feb 9, 2022
a72f778
Add service and repository method for checking existing case triggred…
Rkareko Feb 10, 2022
63d2a00
Check for duplicates by referenicing plans
Rkareko Feb 11, 2022
b94b021
Bump up version
Rkareko Feb 11, 2022
dd110e2
Rename mapper method
Rkareko Feb 11, 2022
9985342
Remove logic for fetching case triggered plans
Rkareko Feb 21, 2022
9f32071
Use exisiting case details to check for duplicates
Rkareko Feb 21, 2022
8282ded
Bum up version
Rkareko Feb 21, 2022
e22b7fd
:construction: Update Practitioner,Organization Models,Mappers
allan-on Dec 6, 2021
14030e4
:construction: Undo merge overwrite in OrganizationMapper.xml
allan-on Feb 23, 2022
ec623e6
:construction: Apply OpenSRP Java code style formatter
allan-on Dec 8, 2021
2b4c1cd
:construction: Format code
allan-on Feb 23, 2022
1a9ec3d
:arrow_up: Update plan-evaluator version
allan-on Dec 15, 2021
6662d40
:construction: Add select & update by key & generate server vn
allan-on Dec 15, 2021
57d625b
:construction: Add Organisation DateTime & Server vn attributes
allan-on Dec 15, 2021
a3c095c
:construction: Refactor add, update & get a Practitioner
allan-on Dec 16, 2021
b6afaa5
:white_check_mark: Update PractitionerRepository Tests
allan-on Dec 17, 2021
ba0f550
:construction: Fix set practitioner server version NPE
allan-on Dec 17, 2021
2ba3c00
:arrow_up: Upgrade plan evaluator version
allan-on Feb 23, 2022
8388a0d
:construction: Refactor add/update Organization functionality
allan-on Dec 17, 2021
659307f
:white_check_mark: Update OrganizationRepository tests
allan-on Dec 17, 2021
8cd2f32
:construction: Add filter/search by server version
allan-on Dec 23, 2021
36f0eb5
:green_heart: Remove unused import
allan-on Dec 22, 2021
34482f7
:white_check_mark: Update Org & Practitioner Repository tests
allan-on Dec 23, 2021
a5ce62f
:recycle: Remove empty PractitionerSearchBean constructor
allan-on Jan 3, 2022
ba6069e
:construction: Set server version to null in getAllPractitionersByIde…
allan-on Jan 10, 2022
50e50a9
:white_check_mark: Update PractitionerRepositoryTest
allan-on Feb 7, 2022
5aba402
:wrench: Exclude MyBatis generated files from test report
allan-on Feb 7, 2022
5d62bb3
:white_check_mark: Fix Practitioner Repository Test
allan-on Feb 7, 2022
951d021
:camera_flash: Update snapshot version
allan-on Feb 23, 2022
c5e698b
Merge pull request #550 from opensrp/issue-521-v2
allan-on Feb 24, 2022
61c89ab
Merge branch 'v2' into reinstate-duplicate-plan-check
Rkareko Feb 25, 2022
dd8e925
Bump up version
Rkareko Feb 25, 2022
342b80c
Merge pull request #549 from opensrp/reinstate-duplicate-plan-check
Rkareko Feb 25, 2022
9d1f6fd
Update logical for checking local case classifications
Rkareko Feb 28, 2022
fbf53c4
Update unit tests
Rkareko Mar 1, 2022
e2d14a2
Bump up version
Rkareko Mar 1, 2022
e269866
Merge pull request #552 from opensrp/update-case-calassification-logic
Rkareko Mar 1, 2022
eec81a3
Upgrade Spring to 5.2.20-RELEASE
qiarie Apr 12, 2022
3361f78
Restart CI
qiarie Apr 13, 2022
c387aa9
Update Coveralls badge
qiarie Apr 13, 2022
016bad9
Merge pull request #556 from opensrp/spring-upgrade-v2
qiarie Apr 13, 2022
acbc9c8
spring security upgrade
hilpitome May 4, 2022
9d8aa83
add serverversion to OrganizationSearchBean fieldnames
hilpitome May 6, 2022
04751fa
Add v2.2 as base branch for CI
ekigamba May 25, 2022
08c5000
Merge pull request #559 from opensrp/add-serverversion-fieldname-to-O…
ekigamba May 26, 2022
6e4951d
Fix RapidPro integration fetching mother contact for child
ekigamba May 30, 2022
a9fea86
Update core version to 2.13.5-SNAPSHOT-ALPHA-ZEIR
ekigamba May 30, 2022
a995dfc
Update core version to 2.13.5-ZEIR-ALPHA-SNAPSHOT
ekigamba May 30, 2022
0439043
add mybatis runtime feature
Jun 8, 2022
89f1a25
remove run_migration task from ci
Jun 8, 2022
31b9c14
update configs module
Jun 8, 2022
4cb4008
remove unused variables
Jun 8, 2022
e9a4c9c
remove data migration scripts
Jun 8, 2022
d3dfd68
update server core version
Jun 8, 2022
625c9be
add postgres test container
Jun 9, 2022
ee45e7f
update github workflow
Jun 9, 2022
af5f942
use postgis image
Jun 9, 2022
7e67c32
add rabbitmq test container
Jun 9, 2022
112724a
remove rabbitmq from github workflows
Jun 9, 2022
deb46e2
cleanup code
Jun 9, 2022
a63f34f
Fix loop in ZeirRapidProStateService
ekigamba Jun 10, 2022
73bdb32
Update core version to 2.13.6-ZEIR-ALPHA-SNAPSHOT
ekigamba Jun 10, 2022
f9e461f
add doc on test-containers
Jun 13, 2022
a824d01
code cleanup
Jun 13, 2022
a15c587
fix readme formatting
Jun 13, 2022
d186eff
Add mybatis runtime feature (#565)
Jun 15, 2022
b389643
update configs module
Jun 15, 2022
de868be
update server version
Jun 15, 2022
08b8121
Merge branch 'v2' into add-test-containers-v2
Jun 15, 2022
9686800
Merge branch 'add-test-containers-v2' of github.com:opensrp/opensrp-s…
Jun 15, 2022
7d82b38
cleanup ci
Jun 15, 2022
79eaee8
order Practitioners by serverversion
hilpitome Jun 23, 2022
9355f40
update configs module
hilpitome Jun 23, 2022
b90fbed
test practitionerSearchBean orderByType ASC
hilpitome Jun 23, 2022
c06fb89
Merge pull request #578 from opensrp/v2-add-identifier-n-serverversio…
hilpitome Jun 24, 2022
738acf3
Merge branch 'v2' into add-test-containers-v2
Jun 29, 2022
8d44123
update snapshot version
Jun 29, 2022
46db71b
Merge pull request #566 from opensrp/add-test-containers-v2
ndegwamartin Jun 29, 2022
0c233d1
use lombrok in PractitionerSearchBean
hilpitome Jun 30, 2022
9d3b06c
retrigger checks
hilpitome Jun 30, 2022
b15e869
remove getter and setter annotations
hilpitome Jun 30, 2022
351aa1f
sort codacy issue
hilpitome Jun 30, 2022
ea04ad1
retrigger checks
hilpitome Jun 30, 2022
e3f1ade
retrigger checks
hilpitome Jun 30, 2022
f542be6
retrigger checks
hilpitome Jun 30, 2022
8292445
retrigger checks
hilpitome Jun 30, 2022
43be17e
retrigger checks
hilpitome Jun 30, 2022
9e33088
extend BaseSearchBean
hilpitome Jul 1, 2022
11c3c34
extend basesearchbean
hilpitome Jul 1, 2022
e0fe548
added tests to PractitionerRepositoryTest
hilpitome Jul 4, 2022
afd9a8f
add more tests
hilpitome Jul 5, 2022
5d0b26c
sort codacy issues
hilpitome Jul 5, 2022
658d4cb
code and naming clean up
hilpitome Jul 5, 2022
9e9eddd
Merge pull request #586 from opensrp/v2-revert-practitioner-search-be…
hilpitome Jul 5, 2022
d2d71cc
Handle Empty Event or Missing baseEntityId During Event Save
qiarie Jul 12, 2022
d258f0b
Handle Missing Details Field in Event When Processing outOfArea Event
qiarie Jul 12, 2022
fd18179
Bump up version to 2.14.4-SNAPSHOT
qiarie Jul 12, 2022
5a0e763
Trigger CI Build
qiarie Jul 13, 2022
73c0d00
Merge pull request #591 from opensrp/589-fix-missing-baseentityid-in-…
qiarie Jul 13, 2022
2905548
updgrade com.fasterxml.jackson.core dependencies to 2.14.0
hilpitome Nov 8, 2022
c647202
Trigger Build
hilpitome Nov 8, 2022
df4592f
Trigger Build
hilpitome Nov 8, 2022
61e0225
Merge pull request #612 from opensrp/v2-upgrade-jackson-version-2.14.0
hilpitome Nov 8, 2022
b66a493
Merge branch 'v2' into rapidpro-refactor
ellykits Jan 19, 2023
8a004a9
Merge branch 'rapidpro-refactor' of github.com:opensrp/opensrp-server…
ellykits Jan 19, 2023
75bb02a
Update configs
ellykits Jan 19, 2023
61a63ed
Revert updateContactFields implementation
ellykits Jan 19, 2023
5b985a5
Merge branch 'master' into rapidpro-refactor-master
ndegwamartin Jan 26, 2023
40567ae
Update import path RapidProService
ndegwamartin Jan 26, 2023
05c5421
Fix failing test ✅
ndegwamartin Feb 9, 2023
af18e93
Fix build
ndegwamartin Feb 17, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mybatis/mybatis -->
<dependency>
<groupId>org.mybatis</groupId>
Expand Down Expand Up @@ -341,7 +346,6 @@
<artifactId>mybatis-migrations</artifactId>
<version>3.3.10</version>
</dependency>

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-redis</artifactId>
Expand All @@ -354,7 +358,6 @@
<scope>test</scope>
</dependency>


<!-- Test dependencies -->
<dependency>
<groupId>junit</groupId>
Expand Down
67 changes: 67 additions & 0 deletions src/main/java/org/opensrp/domain/ActionTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package org.opensrp.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import org.smartregister.domain.Condition;
import org.smartregister.domain.DynamicValue;
import org.smartregister.domain.Trigger;

import java.io.Serializable;
import java.util.Set;

@Getter
@Setter
@AllArgsConstructor
public class ActionTemplate implements Serializable {
private static final long serialVersionUID = 1L;
private String identifier;
private int prefix;
private String title;
private String description;
private String code;
private PeriodTemplate timingPeriod;
private String reason;
private String goalId;
private ActionTemplate.SubjectConcept subjectCodableConcept;
private String taskTemplate;
private Set<Trigger> trigger;
private Set<Condition> condition;
private String definitionUri;
private Set<DynamicValue> dynamicValue;
private ActionTemplate.ActionType type;

public ActionTemplate() {
this.type = ActionTemplate.ActionType.CREATE;
}

public static class SubjectConcept implements Serializable {
private String text;

public String getText() {
return text;
}

public void setText(String text) {
this.text = text;
}
}

public static enum ActionType {
@JsonProperty("create")
@SerializedName("create")
CREATE,
@JsonProperty("update")
@SerializedName("update")
UPDATE,
@JsonProperty("remove")
@SerializedName("remove")
REMOVE,
@JsonProperty("fire-event")
@SerializedName("fire-event")
FIRE_EVENT;

}
}
27 changes: 27 additions & 0 deletions src/main/java/org/opensrp/domain/GoalTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.opensrp.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class GoalTemplate implements Serializable {

private static final long serialVersionUID = 1L;
private String id;
private String description;
private String priority;
@JsonProperty("target")
@SerializedName("target")
private List<TargetTemplate> targets;

}
6 changes: 3 additions & 3 deletions src/main/java/org/opensrp/domain/Organization.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
*
*
*/
package org.opensrp.domain;

Expand Down Expand Up @@ -34,8 +34,8 @@ public class Organization implements Serializable {
private DateTime dateEdited;

private long serverVersion;

private Integer memberCount;

public Long getId() {
return id;
}
Expand Down Expand Up @@ -95,7 +95,7 @@ public void setAssignedLocations(Set<AssignedLocations> assignedLocations) {
public Integer getMemberCount() {
return memberCount;
}

public void setMemberCount(Integer memberCount) {
this.memberCount = memberCount;
}
Expand Down
26 changes: 26 additions & 0 deletions src/main/java/org/opensrp/domain/PeriodTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package org.opensrp.domain;

import java.io.Serializable;

public class PeriodTemplate implements Serializable {

private static final long serialVersionUID = 1L;
private String start;
private String end;

public String getStart() {
return start;
}

public void setStart(String start) {
this.start = start;
}

public String getEnd() {
return end;
}

public void setEnd(String end) {
this.end = end;
}
}
29 changes: 29 additions & 0 deletions src/main/java/org/opensrp/domain/PlanTaskCount.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package org.opensrp.domain;

import java.io.Serializable;
import java.util.List;

public class PlanTaskCount implements Serializable {

private static final long serialVersionUID = 1L;

private String planIdentifier;

private List<TaskCount> taskCounts;

public String getPlanIdentifier() {
return planIdentifier;
}

public void setPlanIdentifier(String planIdentifier) {
this.planIdentifier = planIdentifier;
}

public List<TaskCount> getTaskCounts() {
return taskCounts;
}

public void setTaskCounts(List<TaskCount> taskCounts) {
this.taskCounts = taskCounts;
}
}
102 changes: 102 additions & 0 deletions src/main/java/org/opensrp/domain/PlanTemplate.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
package org.opensrp.domain;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.smartregister.domain.Jurisdiction;
import org.smartregister.domain.PlanDefinition;

import java.io.Serializable;
import java.util.List;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class PlanTemplate implements Serializable {

private static final long serialVersionUID = 1L;
@JsonProperty
private String identifier;
@JsonProperty
private String description;
@JsonProperty
private String version;
@JsonProperty
private String name;
@JsonProperty
private String title;
@JsonProperty
private String status;
@JsonProperty
private String date;
@JsonProperty
private PeriodTemplate effectivePeriod;
@JsonProperty
private List<PlanDefinition.UseContext> useContext;
@JsonProperty
private List<Jurisdiction> jurisdiction;
private Long serverVersion;
@JsonProperty("goal")
@SerializedName("goal")
private List<GoalTemplate> goals;
@JsonProperty("action")
@SerializedName("action")
private List<ActionTemplate> actions;
@JsonProperty
private boolean experimental;

public int compareTo(PlanDefinition o) {
return this.getName().equals(o.getName()) ? this.getName().compareTo(o.getIdentifier()) : this.getName().compareTo(o.getName());
}

public static enum PlanStatus {
@SerializedName("draft")
DRAFT("draft"),
@SerializedName("active")
ACTIVE("active"),
@SerializedName("retired")
RETIRED("retired"),
@SerializedName("complete")
COMPLETED("complete"),
@SerializedName("unknown")
UNKNOWN("unknown");

private final String value;

private PlanStatus(String value) {
this.value = value;
}

public String value() {
return this.value;
}

public static PlanTemplate.PlanStatus from(String value) {
PlanTemplate.PlanStatus[] var1 = values();
int var2 = var1.length;

for(int var3 = 0; var3 < var2; ++var3) {
PlanTemplate.PlanStatus c = var1[var3];
if (c.value.equals(value)) {
return c;
}
}

throw new IllegalArgumentException(value);
}
}

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public static class UseContext implements Serializable {
private String code;
private String valueCodableConcept;

}
}
Loading