From c0e93af485127a00e34c90bd231a8d4d7d8651d6 Mon Sep 17 00:00:00 2001 From: Martin Ndegwa Date: Tue, 5 Feb 2019 16:54:07 +0300 Subject: [PATCH] branch cleanup --- .../java/org/opensrp/BaseIntegrationTest.java | 13 - .../opensrp/FormSubmissionProcessorTest.java | 90 - .../org/opensrp/MultimediaServiceTest.java | 107 - .../SpringApplicationContextProvider.java | 24 - .../java/org/opensrp/domain/AddressTest.java | 154 - .../org/opensrp/domain/AppStateTokenTest.java | 56 - .../org/opensrp/domain/BaseEntityTest.java | 175 - .../java/org/opensrp/domain/ClientTest.java | 138 - .../org/opensrp/domain/ContactPointTest.java | 44 - .../opensrp/domain/ErrorTraceFormTest.java | 22 - .../org/opensrp/domain/ErrorTraceTest.java | 61 - .../java/org/opensrp/domain/EventTest.java | 120 - .../opensrp/domain/FormDefinitionTest.java | 24 - .../org/opensrp/domain/FormFieldTest.java | 54 - .../java/org/opensrp/domain/FormTest.java | 42 - .../org/opensrp/domain/MultimediaTest.java | 54 - .../test/java/org/opensrp/domain/ObsTest.java | 107 - .../java/org/opensrp/domain/PhotoTest.java | 22 - .../java/org/opensrp/domain/ProviderTest.java | 54 - .../java/org/opensrp/domain/SearchTest.java | 98 - .../opensrp/domain/SubFormDefinitionTest.java | 56 - .../java/org/opensrp/domain/UniqueIdTest.java | 23 - .../java/org/opensrp/domain/UserTest.java | 103 - .../it/ActionCreationIntegrationTest.java | 50 - .../it/AllActionsIntegrationTest.java | 239 - .../it/AllAlertsIntegrationTest.java | 211 - .../it/AllBaseEntitiesIntegrationTest.java | 105 - .../it/AllClientsIntegrationTest.java | 271 -- .../it/AllErrorTraceIntegrationTest.java | 46 - .../it/AllEventsIntegrationTest.java | 58 - .../it/AllLocationsIntegrationTest.java | 70 - .../it/AllProvidersIntegrationTest.java | 56 - .../it/AllUsersIntegrationTest.java | 60 - .../it/ConfigServiceIntegrationTest.java | 122 - .../repository/it/FormLifeCycleTest.java | 256 - .../repository/it/ScheduleLifeCycleTest.java | 40 - .../repository/it/ZiggyServiceTest.java | 93 - .../lucene/it/LuceneActionRepositoryTest.java | 78 - .../lucene/it/LuceneClientRepositoryTest.java | 433 -- .../lucene/it/LuceneEventRepositoryTest.java | 260 - .../lucene/it/LuceneReportRepositoryTest.java | 160 - .../lucene/it/LuceneSearchRepositoryTest.java | 170 - .../postgres/ActionsRepositoryTest.java | 250 - .../postgres/AlertsRepositoryTest.java | 321 -- .../AppStateTokensRepositoryTest.java | 101 - .../postgres/BaseRepositoryTest.java | 57 - .../postgres/ClientsRepositoryTest.java | 500 -- .../postgres/ErrorTraceRepositoryTest.java | 162 - .../postgres/EventsRepositoryTest.java | 602 --- .../postgres/MultimediaRepositoryTest.java | 122 - .../postgres/ReportsRepositoryTest.java | 239 - .../postgres/SearchRepositoryTest.java | 106 - .../postgres/StocksRepositoryTest.java | 211 - .../ViewConfigurationRepositoryTest.java | 164 - .../org/opensrp/scheduler/ActionTest.java | 32 - .../java/org/opensrp/scheduler/AlertTest.java | 128 - .../scheduler/FormEventListenerTest.java | 91 - .../scheduler/RepeatingCornScheduleTest.java | 54 - .../scheduler/RepeatingScheduleTest.java | 57 - .../opensrp/scheduler/ScheduleConfigTest.java | 219 - .../org/opensrp/scheduler/ScheduleTest.java | 49 - .../opensrp/scheduler/SystemEventTest.java | 36 - .../scheduler/TaskSchedulerServiceTest.java | 113 - .../router/AlertCreationActionTest.java | 119 - .../router/AlertHandlerRoutesTest.java | 296 -- .../scheduler/router/AlertRouterTest.java | 215 - .../scheduler/router/HealthSchedulesTest.java | 225 - .../opensrp/scheduler/router/MatcherTest.java | 42 - .../scheduler/service/ActionServiceTest.java | 218 - .../service/ECAlertCreationTest.java | 71 - .../service/ScheduleServiceTest.java | 284 -- .../opensrp/service/ClientServiceTest.java | 203 - .../org/opensrp/service/EventServiceTest.java | 264 -- .../service/MultiMediaServiceTest.java | 112 - .../opensrp/service/OpenmrsIDServiceTest.java | 220 - .../OpenmrsIDServiceUsingMockTest.java | 59 - .../org/opensrp/service/StockServiceTest.java | 115 - .../formSubmission/EventListenerTest.java | 119 - .../FormEntityConverterTest.java | 209 - .../formSubmission/FormEntityServiceTest.java | 184 - ...ubmissionDataMigrationIntegrationTest.java | 112 - .../FormSubmissionProcessorScheduleTest.java | 84 - .../formSubmission/StubAllAppStateToken.java | 12 - .../formSubmission/StubAllFormSubmission.java | 12 - .../service/it/BaseEntityServiceTest.java | 101 - .../opensrp/service/it/ClientServiceTest.java | 499 -- .../opensrp/service/it/ConfigServiceTest.java | 193 - .../opensrp/service/it/ErrorTraceTest.java | 161 - .../opensrp/service/it/EventServiceTest.java | 596 --- .../service/it/LocationServiceTest.java | 80 - .../service/it/MultimediaServiceTest.java | 201 - .../service/it/ProviderServiceTest.java | 90 - .../opensrp/service/it/ReportServiceTest.java | 307 -- .../opensrp/service/it/SearchServiceTest.java | 97 - .../opensrp/service/it/UserServiceTest.java | 99 - .../opensrp/services/RapidProServiceTest.java | 163 - .../it/RapidProServiceIntegrationTest.java | 104 - .../src/test/java/org/opensrp/util/Event.java | 7 - .../java/org/opensrp/util/EventBuilder.java | 78 - .../test/java/org/opensrp/util/Matcher.java | 27 - .../opensrp/util/SampleFullDomainObject.java | 305 -- .../org/opensrp/util/ScheduleBuilder.java | 52 - .../org/opensrp/util/TestResourceLoader.java | 60 - .../test/java/org/opensrp/util/UtilTest.java | 86 - .../opensrp/util/it/UtilsIntegrationTest.java | 69 - .../test/java/org/utils/AssertionUtil.java | 56 - .../java/org/utils/CouchDbAccessUtils.java | 42 - .../test/resources/form/basic_reg/form.json | 653 --- .../test/resources/form/basic_reg/form.xml | 287 -- .../form/basic_reg/form_definition.json | 245 - .../form/basic_reg/form_submission.json | 254 - .../test/resources/form/basic_reg/model.xml | 79 - .../resources/form/child_enrollment/form.json | 1 - .../resources/form/child_enrollment/form.xml | 1699 ------- .../child_enrollment/form_definition.json | 346 -- .../child_enrollment/form_submission1.json | 427 -- .../child_enrollment/form_submission2.json | 428 -- .../child_enrollment/form_submission3.json | 261 -- .../resources/form/child_enrollment/model.xml | 1691 ------- .../resources/form/child_followup/form.json | 4165 ----------------- .../resources/form/child_followup/form.xml | 2276 --------- .../form/child_followup/form_definition.json | 466 -- .../form/child_followup/form_submission.json | 103 - .../resources/form/child_followup/model.xml | 1685 ------- .../resources/form/entity_relationship.json | 34 - .../form/new_household_registration/form.json | 655 --- .../form/new_household_registration/form.xml | 26 - .../form_definition.json | 166 - .../form_submission1.json | 228 - .../form_submission2.json | 207 - .../form_submission3.json | 208 - .../form_submission4.json | 208 - .../form_submission5.json | 209 - .../form_submission6.json | 216 - .../form_submission7.json | 216 - .../form_submission8.json | 211 - .../form_submission9.json | 206 - .../form/new_household_registration/model.xml | 49 - .../form.json | 1100 ----- .../form.xml | 31 - .../form_definition.json | 290 -- .../form_submission1.json | 363 -- .../model.xml | 83 - .../form/offsite_child_followup/form.json | 1 - .../form/offsite_child_followup/form.xml | 1560 ------ .../form_definition.json | 466 -- .../form/offsite_child_followup/model.xml | 1685 ------- .../form/offsite_woman_followup/form.json | 1 - .../form/offsite_woman_followup/form.xml | 1439 ------ .../form_definition.json | 372 -- .../form/offsite_woman_followup/model.xml | 1643 ------- .../form/pnc_1st_registration/form.json | 373 -- .../form/pnc_1st_registration/form.xml | 29 - .../pnc_1st_registration/form_definition.json | 89 - .../pnc_1st_registration/form_submission.json | 135 - .../form/pnc_1st_registration/model.xml | 31 - .../resources/form/pnc_reg_form/form.json | 1381 ------ .../form/pnc_reg_form/form_definition.json | 315 -- .../form/pnc_reg_form/form_submission.json | 459 -- .../resources/form/pnc_reg_form/model.xml | 91 - .../form/vaccine_stock_position/form.json | 1 - .../form/vaccine_stock_position/form.xml | 381 -- .../form_definition.json | 186 - .../form/vaccine_stock_position/model.xml | 68 - .../resources/form/woman_enrollment/form.json | 1 - .../resources/form/woman_enrollment/form.xml | 1550 ------ .../woman_enrollment/form_definition.json | 311 -- .../woman_enrollment/form_submission.json | 350 -- .../resources/form/woman_enrollment/model.xml | 1659 ------- .../resources/form/woman_followup/form.json | 1 - .../resources/form/woman_followup/form.xml | 1435 ------ .../form/woman_followup/form_definition.json | 384 -- .../resources/form/woman_followup/model.xml | 1643 ------- .../src/test/resources/report-definition.json | 29 - .../resources/report-fields-definition.json | 10 - .../src/test/resources/sampleXLS/emptyXLS.xls | Bin 5632 -> 0 bytes .../test/resources/sampleXLS/invalidXLS.xls | Bin 5632 -> 0 bytes .../src/test/resources/sampleXLS/validXLS.xls | Bin 5632 -> 0 bytes .../test/resources/schedules/child-bcg.json | 29 - .../resources/schedules/child-boosters.json | 23 - .../schedules/child-dpt-booster1.json | 35 - .../schedules/child-dpt-booster2.json | 22 - .../schedules/child-measles-booster.json | 35 - .../resources/schedules/child-measles.json | 35 - .../resources/schedules/child-measles1.json | 35 - .../resources/schedules/child-measles2.json | 35 - .../schedules/child-opv-booster.json | 29 - .../test/resources/schedules/child-opv0.json | 29 - .../test/resources/schedules/child-opv1.json | 35 - .../test/resources/schedules/child-opv2.json | 35 - .../test/resources/schedules/child-opv3.json | 35 - .../schedules/child-pentavalent-1.json | 35 - .../schedules/child-pentavalent-2.json | 35 - .../schedules/child-pentavalent-3.json | 35 - .../schedules/child-pentavalent1.json | 35 - .../schedules/child-pentavalent2.json | 35 - .../schedules/child-pentavalent3.json | 35 - .../resources/schedules/delivery-plan.json | 35 - .../resources/schedules/ec-condom-refill.json | 29 - .../schedules/ec-dmpa-injectable-refill.json | 35 - .../ec-female-sterilization-followup.json | 75 - .../resources/schedules/ec-fp-followup.json | 35 - .../schedules/ec-fp-referral-followup.json | 35 - .../resources/schedules/ec-iud-followup.json | 58 - .../ec-male-sterilization-followup.json | 52 - .../resources/schedules/ec-ocp-refill.json | 29 - .../test/resources/schedules/fw-census.json | 35 - .../schedules/mother-anc-normal.json | 104 - .../schedules/mother-auto-close-pnc.json | 20 - .../mother-expected-date-of-delivery.json | 35 - .../schedules/mother-hb-followup-test.json | 35 - .../resources/schedules/mother-hb-test-1.json | 29 - .../resources/schedules/mother-hb-test-2.json | 29 - .../resources/schedules/mother-ifa-1.json | 35 - .../resources/schedules/mother-ifa-2.json | 35 - .../resources/schedules/mother-ifa-3.json | 35 - .../schedules/mother-lab-reminder.json | 29 - .../resources/schedules/schedule-config.xls | Bin 12800 -> 0 bytes .../test/resources/schedules/woman-tt1.json | 29 - .../test/resources/schedules/woman-tt2.json | 35 - .../test/resources/schedules/woman-tt3.json | 35 - .../test/resources/schedules/woman-tt4.json | 36 - .../test/resources/schedules/woman-tt5.json | 35 - .../test-applicationContext-opensrp.xml | 79 - .../resources/test-persistence-postgres.xml | 37 - .../test/resources/test-scripts/action.sql | 78 - .../src/test/resources/test-scripts/alert.sql | 41 - .../test-scripts/app_state_token.sql | 12 - .../test/resources/test-scripts/client.sql | 40 - .../src/test/resources/test-scripts/error.sql | 84 - .../src/test/resources/test-scripts/event.sql | 42 - .../resources/test-scripts/multimedia.sql | 11 - .../test/resources/test-scripts/report.sql | 22 - .../src/test/resources/test-scripts/stock.sql | 42 - .../test-scripts/view_configuration.sql | 21 - 235 files changed, 54637 deletions(-) delete mode 100644 opensrp-core/src/test/java/org/opensrp/BaseIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/SpringApplicationContextProvider.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/AddressTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/AppStateTokenTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/BaseEntityTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ClientTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ContactPointTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceFormTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/EventTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/FormDefinitionTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/FormFieldTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/FormTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/MultimediaTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ObsTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/PhotoTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/ProviderTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/SearchTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/SubFormDefinitionTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/UniqueIdTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/domain/UserTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/ActionCreationIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/ScheduleLifeCycleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/it/ZiggyServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ViewConfigurationRepositoryTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/ActionTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/AlertTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/FormEventListenerTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingCornScheduleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingScheduleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleConfigTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/SystemEventTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/TaskSchedulerServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertCreationActionTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertHandlerRoutesTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertRouterTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/router/HealthSchedulesTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/router/MatcherTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/service/ECAlertCreationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/scheduler/service/ScheduleServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceUsingMockTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityConverterTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllFormSubmission.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/services/RapidProServiceTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/services/it/RapidProServiceIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/Event.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/EventBuilder.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/Matcher.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/ScheduleBuilder.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/TestResourceLoader.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/UtilTest.java delete mode 100644 opensrp-core/src/test/java/org/opensrp/util/it/UtilsIntegrationTest.java delete mode 100644 opensrp-core/src/test/java/org/utils/AssertionUtil.java delete mode 100644 opensrp-core/src/test/java/org/utils/CouchDbAccessUtils.java delete mode 100644 opensrp-core/src/test/resources/form/basic_reg/form.json delete mode 100644 opensrp-core/src/test/resources/form/basic_reg/form.xml delete mode 100644 opensrp-core/src/test/resources/form/basic_reg/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/basic_reg/form_submission.json delete mode 100644 opensrp-core/src/test/resources/form/basic_reg/model.xml delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form.json delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form.xml delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form_submission1.json delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form_submission2.json delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/form_submission3.json delete mode 100644 opensrp-core/src/test/resources/form/child_enrollment/model.xml delete mode 100644 opensrp-core/src/test/resources/form/child_followup/form.json delete mode 100644 opensrp-core/src/test/resources/form/child_followup/form.xml delete mode 100644 opensrp-core/src/test/resources/form/child_followup/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/child_followup/form_submission.json delete mode 100644 opensrp-core/src/test/resources/form/child_followup/model.xml delete mode 100644 opensrp-core/src/test/resources/form/entity_relationship.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form.xml delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission1.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission2.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission3.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission4.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission5.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission6.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission7.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission8.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/form_submission9.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration/model.xml delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.xml delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_submission1.json delete mode 100644 opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/model.xml delete mode 100644 opensrp-core/src/test/resources/form/offsite_child_followup/form.json delete mode 100644 opensrp-core/src/test/resources/form/offsite_child_followup/form.xml delete mode 100644 opensrp-core/src/test/resources/form/offsite_child_followup/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/offsite_child_followup/model.xml delete mode 100644 opensrp-core/src/test/resources/form/offsite_woman_followup/form.json delete mode 100644 opensrp-core/src/test/resources/form/offsite_woman_followup/form.xml delete mode 100644 opensrp-core/src/test/resources/form/offsite_woman_followup/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/offsite_woman_followup/model.xml delete mode 100644 opensrp-core/src/test/resources/form/pnc_1st_registration/form.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_1st_registration/form.xml delete mode 100644 opensrp-core/src/test/resources/form/pnc_1st_registration/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_1st_registration/form_submission.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_1st_registration/model.xml delete mode 100644 opensrp-core/src/test/resources/form/pnc_reg_form/form.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_reg_form/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_reg_form/form_submission.json delete mode 100644 opensrp-core/src/test/resources/form/pnc_reg_form/model.xml delete mode 100644 opensrp-core/src/test/resources/form/vaccine_stock_position/form.json delete mode 100644 opensrp-core/src/test/resources/form/vaccine_stock_position/form.xml delete mode 100644 opensrp-core/src/test/resources/form/vaccine_stock_position/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/vaccine_stock_position/model.xml delete mode 100644 opensrp-core/src/test/resources/form/woman_enrollment/form.json delete mode 100644 opensrp-core/src/test/resources/form/woman_enrollment/form.xml delete mode 100644 opensrp-core/src/test/resources/form/woman_enrollment/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/woman_enrollment/form_submission.json delete mode 100644 opensrp-core/src/test/resources/form/woman_enrollment/model.xml delete mode 100644 opensrp-core/src/test/resources/form/woman_followup/form.json delete mode 100644 opensrp-core/src/test/resources/form/woman_followup/form.xml delete mode 100644 opensrp-core/src/test/resources/form/woman_followup/form_definition.json delete mode 100644 opensrp-core/src/test/resources/form/woman_followup/model.xml delete mode 100644 opensrp-core/src/test/resources/report-definition.json delete mode 100644 opensrp-core/src/test/resources/report-fields-definition.json delete mode 100644 opensrp-core/src/test/resources/sampleXLS/emptyXLS.xls delete mode 100644 opensrp-core/src/test/resources/sampleXLS/invalidXLS.xls delete mode 100644 opensrp-core/src/test/resources/sampleXLS/validXLS.xls delete mode 100644 opensrp-core/src/test/resources/schedules/child-bcg.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-boosters.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-dpt-booster1.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-dpt-booster2.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-measles-booster.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-measles.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-measles1.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-measles2.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-opv-booster.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-opv0.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-opv1.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-opv2.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-opv3.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent-1.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent-2.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent-3.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent1.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent2.json delete mode 100644 opensrp-core/src/test/resources/schedules/child-pentavalent3.json delete mode 100644 opensrp-core/src/test/resources/schedules/delivery-plan.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-condom-refill.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-dmpa-injectable-refill.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-female-sterilization-followup.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-fp-followup.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-fp-referral-followup.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-iud-followup.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-male-sterilization-followup.json delete mode 100644 opensrp-core/src/test/resources/schedules/ec-ocp-refill.json delete mode 100644 opensrp-core/src/test/resources/schedules/fw-census.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-anc-normal.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-auto-close-pnc.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-expected-date-of-delivery.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-hb-followup-test.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-hb-test-1.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-hb-test-2.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-ifa-1.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-ifa-2.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-ifa-3.json delete mode 100644 opensrp-core/src/test/resources/schedules/mother-lab-reminder.json delete mode 100644 opensrp-core/src/test/resources/schedules/schedule-config.xls delete mode 100644 opensrp-core/src/test/resources/schedules/woman-tt1.json delete mode 100644 opensrp-core/src/test/resources/schedules/woman-tt2.json delete mode 100644 opensrp-core/src/test/resources/schedules/woman-tt3.json delete mode 100644 opensrp-core/src/test/resources/schedules/woman-tt4.json delete mode 100644 opensrp-core/src/test/resources/schedules/woman-tt5.json delete mode 100644 opensrp-core/src/test/resources/test-applicationContext-opensrp.xml delete mode 100644 opensrp-core/src/test/resources/test-persistence-postgres.xml delete mode 100644 opensrp-core/src/test/resources/test-scripts/action.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/alert.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/app_state_token.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/client.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/error.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/event.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/multimedia.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/report.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/stock.sql delete mode 100644 opensrp-core/src/test/resources/test-scripts/view_configuration.sql diff --git a/opensrp-core/src/test/java/org/opensrp/BaseIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/BaseIntegrationTest.java deleted file mode 100644 index 8ec36a4f5e..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/BaseIntegrationTest.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.opensrp; - -import org.junit.Ignore; -import org.junit.Test; - - -public class BaseIntegrationTest extends - SpringApplicationContextProvider{ - @Ignore@Test - public void testOk(){ - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java deleted file mode 100644 index c3743c7401..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.opensrp; - -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.mockito.Mock; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.domain.SubFormData; -import org.opensrp.form.service.FormAttributeParser; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.Schedule; -import org.opensrp.scheduler.Schedule.ActionType; -import org.opensrp.service.ClientService; -import org.opensrp.service.EventService; -import org.opensrp.service.formSubmission.FormEntityConverter; -import org.opensrp.service.formSubmission.FormSubmissionProcessor; -import org.opensrp.service.formSubmission.handler.FormSubmissionRouter; -import org.opensrp.service.formSubmission.ziggy.ZiggyService; -import org.opensrp.util.TestResourceLoader; - -public class FormSubmissionProcessorTest extends TestResourceLoader{ - - @Mock - private FormSubmissionProcessor fsp; - @Mock - private ZiggyService ziggyService; - @Mock - private FormSubmissionRouter formSubmissionRouter; - @Mock - private FormEntityConverter formEntityConverter; - @Mock - private HealthSchedulerService scheduleService; - @Mock - private ClientService clientService; - @Mock - private EventService eventService; - @Mock - private AllClients allClients; - @Mock - private AllEvents allEvents; - - public FormSubmissionProcessorTest() throws IOException { - super(); - } - - @Before - public void setup() throws IOException{ - initMocks(this); - FormEntityConverter fec = new FormEntityConverter(new FormAttributeParser("/form")); - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, - fec, scheduleService, clientService,allClients, eventService,allEvents); - } - - @Test - @Ignore//FIXME - public void testFormSubmission() throws Exception{ - FormSubmission submission = getFormSubmissionFor("pnc_reg_form"); - - List schl = new ArrayList(); - schl.add(new Schedule(ActionType.enroll, new String[]{submission.formName()}, "Boosters", "REMINDER", new String[]{"birthdate"}, "child", "")); - when(scheduleService.findAutomatedSchedules(submission.formName())).thenReturn(schl); - - fsp.processFormSubmission(submission); - - - int totalEntities = 1; - for (SubFormData e : submission.subForms()) { - totalEntities += e.instances().size(); - } - verify(clientService, times(totalEntities)).addClient(any(Client.class)); - verify(eventService, times(totalEntities)).addEvent(any(Event.class)); - verify(scheduleService, times(totalEntities-1)).enrollIntoSchedule(any(String.class), - eq("Boosters"), eq("REMINDER"), any(String.class), eq(submission.getInstanceId())); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java deleted file mode 100644 index d82d3cae24..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.opensrp; - -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.util.List; - -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.opensrp.domain.Multimedia; -import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.couch.MultimediaRepositoryImpl; -import org.opensrp.service.ClientService; -import org.opensrp.service.MultimediaService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.mock.web.MockMultipartFile; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import org.springframework.web.multipart.MultipartFile; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class MultimediaServiceTest { - - @Mock - private MultimediaService multimediaService; - - @Autowired - private MultimediaRepositoryImpl multimediaRepository; - - @Autowired - private ClientService clientService; - - @Autowired - @Value("#{opensrp['multimedia.directory.name']}") - private String multimediaDirPath; - - @Before - public void setUp() throws Exception { - initMocks(this); - multimediaService = new MultimediaService(multimediaRepository, clientService); - } - - @Ignore - @Test - public void shouldSaveMultimediaFile() throws FileNotFoundException { - MultimediaDTO multimedia = new MultimediaDTO("1234567891", "opensrp", "image/jpeg", "", "nid"); - String baseDirPath = System.getProperty("user.home"); - FileInputStream fis = new FileInputStream(baseDirPath + File.separator + ".OpenSRP/multimedia/image.jpeg"); - - MultipartFile multipartFile = null; - - try { - multipartFile = new MockMultipartFile("file", fis); - } - catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - String status = multimediaService.saveMultimediaFile(multimedia, multipartFile); - - Assert.assertEquals("success", status); - - } - - @Ignore - @Test - public void shouldGetMultimediaFiles() throws FileNotFoundException { - MultimediaDTO multimediaDTO = new MultimediaDTO("1234567890", "opensrp", "image/jpeg", "", "profile"); - - Multimedia expectedMultimedia = new Multimedia().withCaseId(multimediaDTO.getCaseId()) - .withProviderId(multimediaDTO.getProviderId()).withContentType(multimediaDTO.getContentType()) - .withFilePath(multimediaDTO.getFilePath()).withFileCategory(multimediaDTO.getFileCategory()); - - String baseDirPath = System.getProperty("user.home"); - FileInputStream fis = new FileInputStream(baseDirPath + File.separator + ".OpenSRP/multimedia/image.jpeg"); - MultipartFile multipartFile = null; - - try { - multipartFile = new MockMultipartFile("file", fis); - } - catch (IOException e) { - e.printStackTrace(); - } - - boolean status = multimediaService.uploadFile(multimediaDTO, multipartFile); - - if (status) - multimediaRepository.add(expectedMultimedia); - - List multimediaFiles = multimediaService.getMultimediaFiles("opensrp"); - - for (Multimedia actualMultimedia : multimediaFiles) { - if (actualMultimedia.getCaseId().equals(multimediaDTO.getCaseId())) - Assert.assertEquals(expectedMultimedia.getFilePath(), actualMultimedia.getFilePath()); - } - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/SpringApplicationContextProvider.java b/opensrp-core/src/test/java/org/opensrp/SpringApplicationContextProvider.java deleted file mode 100644 index 0e8ef86dea..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/SpringApplicationContextProvider.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opensrp; - -import org.junit.runner.RunWith; -import org.opensrp.util.TestResourceLoader; -import org.springframework.context.ApplicationContext; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class SpringApplicationContextProvider extends TestResourceLoader { - - public static ApplicationContext context; - - public static ApplicationContext getContext() { - return context; - } - - public static void setContext(ApplicationContext context) { - SpringApplicationContextProvider.context = context; - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/AddressTest.java b/opensrp-core/src/test/java/org/opensrp/domain/AddressTest.java deleted file mode 100644 index 4d1b472c63..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/AddressTest.java +++ /dev/null @@ -1,154 +0,0 @@ -package org.opensrp.domain; - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.common.AddressField; - -import static org.junit.Assert.*; - -public class AddressTest { - - @Test - public void testEqualAndHashCode() { - EqualsVerifier.forClass(Address.class).suppress(Warning.NONFINAL_FIELDS).verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create().with(new SetterTester()).with(new GetterTester()).build(); - - validator.validate(PojoClassFactory.getPojoClass(Address.class)); - } - - @Test - public void testSetAndGetAddressField() { - Address address = new Address(); - address.withAddressFields(null); - assertNull(address.getAddressFields()); - - address.withAddressField("field", "val"); - assertEquals("val", address.getAddressField("field")); - assertNull(address.getAddressField("ddd")); - - address.withAddressFields(null); - assertNull(address.getAddressFields()); - - address.withAddressField(AddressField.AREA, "val"); - assertEquals("val", address.getAddressField(AddressField.AREA)); - assertNull(address.getAddressField(AddressField.HOUSE_NUMBER)); - - address.withAddressFields(null); - assertNull(address.getAddressFields()); - - } - - @Test - public void testAddAndRemoveAddressField() { - Address address = new Address(); - address.withAddressFields(null); - assertNull(address.getAddressFields()); - - address.addAddressField("field", "val"); - address.addAddressField(AddressField.AREA, "val"); - assertEquals(2, address.getAddressFields().size()); - assertEquals("val", address.getAddressField("field")); - assertEquals("val", address.getAddressField(AddressField.AREA)); - - address.removeAddressField("ddd"); - address.removeAddressField(AddressField.HOUSE_NUMBER); - assertEquals(2, address.getAddressFields().size()); - assertEquals("val", address.getAddressField("field")); - assertEquals("val", address.getAddressField(AddressField.AREA)); - - address.removeAddressField("field"); - address.removeAddressField(AddressField.AREA); - assertEquals(0, address.getAddressFields().size()); - assertNull(address.getAddressField("field")); - assertNull(address.getAddressField(AddressField.AREA)); - } - - @Test - public void testGetAddressFieldUsingRegex() { - Address address = new Address(); - address.withAddressFields(null); - assertNull(address.getAddressFields()); - - address.addAddressField(AddressField.AREA, "area"); - address.addAddressField("field", "val"); - - assertNull(address.getAddressFieldMatchingRegex("")); - assertNull(address.getAddressFieldMatchingRegex("^[0-9]+")); - assertEquals("val", address.getAddressFieldMatchingRegex("^field")); - assertNull(address.getAddressFieldMatchingRegex("^TYPE")); - assertEquals("area", address.getAddressFieldMatchingRegex("^AREA")); - assertNull(address.getAddressFieldMatchingRegex("^area")); - assertNull(address.getAddressFieldMatchingRegex("^id")); - - } - - @Test - public void testIsActive() { - Address address = new Address(); - assertTrue(address.isActive()); - - address.withEndDate(new DateTime().plusDays(5)); - assertTrue(address.isActive()); - - address.withEndDate(new DateTime().minusDays(5)); - assertFalse(address.isActive()); - } - - @Test - public void testDurationCalculation() { - Address address = new Address(); - assertEquals(-1, address.durationInDays()); - - address.withStartDate(new DateTime().minusDays(5)); - assertEquals(5, address.durationInDays()); - - address.withStartDate(new DateTime()); - address.withEndDate(new DateTime().plusMonths(2)); - assertEquals(2, address.durationInMonths()); - - address.withEndDate(new DateTime().plusWeeks(2)); - assertEquals(2, address.durationInWeeks()); - - address.withEndDate(new DateTime().plusYears(2)); - assertEquals(2, address.durationInYears()); - } - - @Test - public void testCreatingObject() { - Address address = new Address(); - String latitude = "222"; - String longitude = "22"; - String geopoint = "geopoint"; - String postalCode = "postalCode"; - String town = "town"; - String subDistrict = "sub"; - String countyDistrict = "count"; - String cityVillage = "village"; - String stateProvince = "province"; - String country = "country"; - address.withLatitude(latitude).withLongitude(longitude).withGeopoint(geopoint).withPostalCode(postalCode) - .withTown(town).withSubDistrict(subDistrict).withCountyDistrict(countyDistrict).withCityVillage(cityVillage) - .withStateProvince(stateProvince).withCountry(country); - - assertEquals(latitude, address.getLatitude()); - assertEquals(longitude, address.getLongitude()); - assertEquals(geopoint, address.getGeopoint()); - assertEquals(postalCode, address.getPostalCode()); - assertEquals(town, address.getTown()); - assertEquals(subDistrict, address.getSubDistrict()); - assertEquals(countyDistrict, address.getCountyDistrict()); - assertEquals(cityVillage, address.getCityVillage()); - assertEquals(country, address.getCountry()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/AppStateTokenTest.java b/opensrp-core/src/test/java/org/opensrp/domain/AppStateTokenTest.java deleted file mode 100644 index ff0bc20370..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/AppStateTokenTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class AppStateTokenTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(AppStateToken.class)); - } - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(AppStateToken.class) - .suppress(Warning.NONFINAL_FIELDS) - .withIgnoredFields("id", "revision") - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testValueBasedOnType() { - AppStateToken appStateToken = new AppStateToken("name", "2.3", 3l); - - assertEquals(2.3, appStateToken.doubleValue(), 0); - assertEquals(2.3, appStateToken.floatValue(), 0.2); - assertEquals("2.3", appStateToken.stringValue()); - - - appStateToken = new AppStateToken("name", "true", 3l); - assertTrue(appStateToken.booleanValue()); - - appStateToken = new AppStateToken("name", "2", 3l); - assertEquals(2, appStateToken.intValue()); - - appStateToken = new AppStateToken("name", new DateTime(0l).toLocalDate(), 3l); - assertEquals(new DateTime(0l).toLocalDate(), appStateToken.datetimeValue()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/BaseEntityTest.java b/opensrp-core/src/test/java/org/opensrp/domain/BaseEntityTest.java deleted file mode 100644 index 6d848abb22..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/BaseEntityTest.java +++ /dev/null @@ -1,175 +0,0 @@ -package org.opensrp.domain; - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; - -import java.util.HashMap; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; - -public class BaseEntityTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create().with(new SetterTester()).with(new GetterTester()).build(); - - validator.validate(PojoClassFactory.getPojoClass(BaseEntity.class)); - } - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(BaseEntity.class).suppress(Warning.NONFINAL_FIELDS).suppress(Warning.STRICT_INHERITANCE) - .withPrefabValues(User.class, new User("dsd"), new User("sdf")).withRedefinedSuperclass().verify(); - } - - @Test - public void testIdentifiers() { - BaseEntity baseEntity = new BaseEntity(); - - baseEntity.withIdentifiers(null); - assertEquals(0, baseEntity.getIdentifiers().size()); - - String type = "type"; - String id = "id"; - baseEntity.withIdentifier(type, id); - assertEquals(1, baseEntity.getIdentifiers().size()); - assertEquals(id, baseEntity.getIdentifier(type)); - - baseEntity.withIdentifiers(null); - baseEntity.addIdentifier(type, id); - assertEquals(1, baseEntity.getIdentifiers().size()); - assertEquals(id, baseEntity.getIdentifier(type)); - - baseEntity.removeIdentifier("eee"); - assertEquals(1, baseEntity.getIdentifiers().size()); - assertEquals(id, baseEntity.getIdentifier(type)); - - baseEntity.removeIdentifier(type); - assertEquals(0, baseEntity.getIdentifiers().size()); - assertNull(baseEntity.getIdentifier(type)); - - } - - @Test - public void testGettingIdentifiersUsingRegex() { - BaseEntity baseEntity = new BaseEntity(); - - baseEntity.withIdentifiers(null); - baseEntity.addIdentifier("type", "id"); - assertEquals(1, baseEntity.getIdentifiers().size()); - assertEquals("id", baseEntity.getIdentifier("type")); - - assertNull(baseEntity.getIdentifierMatchingRegex("")); - assertEquals("id", baseEntity.getIdentifierMatchingRegex("^[a-zA-Z]+")); - assertNull(baseEntity.getIdentifierMatchingRegex("^[0-9]+")); - assertEquals("id", baseEntity.getIdentifierMatchingRegex("^type")); - assertNull(baseEntity.getIdentifierMatchingRegex("^id")); - } - - @Test - public void testAttributes() { - BaseEntity baseEntity = new BaseEntity(); - - baseEntity.withAttributes(null); - - assertEquals(0, baseEntity.getAttributes().size()); - - baseEntity.withAttribute("type", "id"); - assertEquals(1, baseEntity.getAttributes().size()); - assertEquals("id", baseEntity.getAttribute("type")); - - baseEntity.removeAttribute("type"); - assertEquals(0, baseEntity.getAttributes().size()); - assertNull(baseEntity.getAttribute("type")); - - baseEntity.withAttributes(null); - baseEntity.addAttribute("type", "id"); - assertEquals(1, baseEntity.getAttributes().size()); - assertEquals("id", baseEntity.getAttribute("type")); - - } - - @Test - public void testSuperObjectCreation() { - BaseEntity baseEntity = new BaseEntity(); - - DateTime dateCreated = new DateTime(0l); - DateTime dateEdited = new DateTime(1l); - DateTime dateVoided = new DateTime(3l); - User editor = new User("dd"); - String voidReason = "void"; - User creator = new User("ee"); - User voider = new User("klj"); - baseEntity.withCreator(creator).withDateCreated(dateCreated).withDateEdited(dateEdited).withDateVoided(dateVoided) - .withEditor(editor).withVoided(true).withVoidReason(voidReason).withVoider(voider); - - assertEquals(creator, baseEntity.getCreator()); - assertEquals(editor, baseEntity.getEditor()); - assertEquals(voider, baseEntity.getVoider()); - assertEquals(dateCreated, baseEntity.getDateCreated()); - assertEquals(dateEdited, baseEntity.getDateEdited()); - assertEquals(dateVoided, baseEntity.getDateVoided()); - assertEquals(voidReason, baseEntity.getVoidReason()); - assertTrue(baseEntity.getVoided()); - - baseEntity = new BaseEntity(); - baseEntity.setCreator(creator); - baseEntity.setEditor(editor); - baseEntity.setVoider(voider); - baseEntity.setDateCreated(dateCreated); - baseEntity.setDateEdited(dateEdited); - baseEntity.setDateVoided(dateVoided); - baseEntity.setVoided(false); - baseEntity.setVoidReason(voidReason); - - assertEquals(creator, baseEntity.getCreator()); - assertEquals(editor, baseEntity.getEditor()); - assertEquals(voider, baseEntity.getVoider()); - assertEquals(dateCreated, baseEntity.getDateCreated()); - assertEquals(dateEdited, baseEntity.getDateEdited()); - assertEquals(dateVoided, baseEntity.getDateVoided()); - assertEquals(voidReason, baseEntity.getVoidReason()); - assertFalse(baseEntity.getVoided()); - } - - @Test - public void testConstructor() { - BaseEntity baseEntity; - HashMap identifiers = new HashMap<>(); - identifiers.put("k", "l"); - HashMap attribues = new HashMap<>(); - attribues.put("l", "k"); - Address address = new Address().withCountry("country").withAddressType("type"); - List
addressList = asList(address); - - baseEntity = new BaseEntity("dd", identifiers); - assertEquals("dd", baseEntity.getBaseEntityId()); - assertEquals(identifiers, baseEntity.getIdentifiers()); - - baseEntity = new BaseEntity("dd", identifiers, attribues); - assertEquals("dd", baseEntity.getBaseEntityId()); - assertEquals(identifiers, baseEntity.getIdentifiers()); - assertEquals(attribues, baseEntity.getAttributes()); - - baseEntity = new BaseEntity("dd", identifiers, attribues, addressList); - assertEquals("dd", baseEntity.getBaseEntityId()); - assertEquals(identifiers, baseEntity.getIdentifiers()); - assertEquals(attribues, baseEntity.getAttributes()); - assertEquals(addressList, baseEntity.getAddresses()); - assertEquals(address, baseEntity.getAddress("type")); - - baseEntity = new BaseEntity().withBaseEntityId("dd"); - assertEquals("dd", baseEntity.getBaseEntityId()); - assertEquals(null, baseEntity.getAddress("type")); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ClientTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ClientTest.java deleted file mode 100644 index 8ff17d5643..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ClientTest.java +++ /dev/null @@ -1,138 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; - -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNull; - -public class ClientTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Client.class) - .withIgnoredFields("id","revision") - .suppress(Warning.NONFINAL_FIELDS) - .withPrefabValues(User.class, new User("ll"), new User("e")) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Client.class)); - } - - @Test - public void testSetAndGetRelationship() { - Client client = new Client(); - client.withRelationships(null); - - assertNull(client.getRelationships()); - assertNull(client.findRelatives("dd")); - assertEquals(0, client.getRelationships("d").size()); - - - - client.withRelationships(null); - client.addRelationship("type", "r"); - client.addRelationship("type", "e"); - client.addRelationship("type1", "r"); - - List expectedRelationships = asList("type1", "type"); - List expectedIds = asList("r", "e"); - assertEquals(2, client.getRelationships().size()); - assertEquals(new HashSet<>(expectedRelationships), new HashSet<>(client.getRelationships("r"))); - assertEquals(new HashSet<>(expectedIds), new HashSet<>(client.findRelatives("type"))); - assertEquals(0, client.getRelationships("d").size()); - - } - - @Test - public void testConstructor() { - String baseEntityId = "id"; - String firstName = "first"; - String middleName = "middleName"; - String lastName = "lastName"; - DateTime birthDate = new DateTime(0l); - boolean birthDateApprx = true; - DateTime deathDate = new DateTime(1l); - boolean deathDateApprox = false; - String gender = "male"; - String type = "type"; - String identifier = "identifier"; - - Client client = new Client(baseEntityId, firstName, middleName, lastName, birthDate, deathDate, birthDateApprx, deathDateApprox, gender, type, identifier); - - assertEquals(firstName, client.getFirstName()); - assertEquals(middleName, client.getMiddleName()); - assertEquals(lastName, client.getLastName()); - assertEquals(birthDate, client.getBirthdate()); - assertEquals(birthDateApprx, client.getBirthdateApprox()); - assertEquals(deathDate, client.getDeathdate()); - assertEquals(deathDateApprox, client.getDeathdateApprox()); - assertEquals(identifier, client.getIdentifier(type)); - assertEquals(gender, client.getGender()); - - client = new Client(baseEntityId, firstName, middleName, lastName, birthDate, deathDate, birthDateApprx, deathDateApprox, gender); - assertEquals(firstName, client.getFirstName()); - assertEquals(middleName, client.getMiddleName()); - assertEquals(lastName, client.getLastName()); - assertEquals(birthDate, client.getBirthdate()); - assertEquals(birthDateApprx, client.getBirthdateApprox()); - assertEquals(deathDate, client.getDeathdate()); - assertEquals(deathDateApprox, client.getDeathdateApprox()); - assertNull(client.getIdentifier(type)); - assertEquals(gender, client.getGender()); - } - - @Test - public void testFullName() { - Client client = new Client("ss").withFirstName("first").withMiddleName("middle").withLastName("last"); - assertEquals("first middle last", client.fullName()); - - client = new Client("dd").withName("first", "middle", null); - assertEquals("first middle", client.fullName()); - - client = new Client("dd").withName("first", null, "last"); - assertEquals("first last", client.fullName()); - - client = new Client("dd").withName("first", null, null); - assertEquals("first", client.fullName()); - - client = new Client("dd").withName(null, "middle", null); - assertEquals("middle", client.fullName()); - - client = new Client("dd").withName(null, "middle", "last"); - assertEquals("middle last", client.fullName()); - - client = new Client("dd").withName(null, null, "last"); - assertEquals("last", client.fullName()); - - client = new Client("dd").withName(null, null, null); - assertEquals("", client.fullName()); - } - - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ContactPointTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ContactPointTest.java deleted file mode 100644 index e55c80e1cf..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ContactPointTest.java +++ /dev/null @@ -1,44 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.joda.time.DateTime; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class ContactPointTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(ContactPoint.class)); - } - - @Test - public void testConstructor() { - final Class clazz = ContactPoint.class; - final Object obj1 = FormTest.getInstance(clazz, - "type","use", "number",0, new DateTime(0l), new DateTime(1l)); - Affirm.affirmNotNull("Should have created an object", obj1); - ContactPoint contactPoint = (ContactPoint) obj1; - assertEquals("type", contactPoint.getType()); - assertEquals("use", contactPoint.getUse()); - assertEquals("number", contactPoint.getNumber()); - assertEquals(0, contactPoint.getPreference()); - assertEquals(new DateTime(0l), contactPoint.getStartDate()); - assertEquals(new DateTime(1l), contactPoint.getEndDate()); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceFormTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceFormTest.java deleted file mode 100644 index 0c781a2c3f..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceFormTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -public class ErrorTraceFormTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(ErrorTraceForm.class)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceTest.java deleted file mode 100644 index a9b37d28da..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ErrorTraceTest.java +++ /dev/null @@ -1,61 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.joda.time.DateTime; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class ErrorTraceTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(ErrorTrace.class)); - } - - @Test - public void testConstructor() { - final Class clazz = ErrorTrace.class; - String document = "document"; - String status = "status"; - String stackTrace = "stactTrace"; - String occurredAt = "occuredAt"; - String errorType = "errorType"; - DateTime dateTime = new DateTime(0l); - - final Object obj1 = FormTest.getInstance(clazz, dateTime, errorType, occurredAt, stackTrace, status, document); - Affirm.affirmNotNull("Should have created an object", obj1); - - ErrorTrace errorTrace = (ErrorTrace) obj1; - assertEquals(dateTime, errorTrace.getDate()); - assertEquals(status, errorTrace.getStatus()); - assertEquals(errorType, errorTrace.getErrorType()); - assertEquals(document, errorTrace.getDocumentType()); - assertEquals(stackTrace, errorTrace.getStackTrace()); - assertEquals(occurredAt, errorTrace.getOccurredAt()); - - String recordId = "recordId"; - String name = "name"; - final Object obj2 = FormTest.getInstance(clazz, recordId, dateTime, name, occurredAt, stackTrace, status); - errorTrace = (ErrorTrace) obj2; - assertEquals(dateTime, errorTrace.getDate()); - assertEquals(status, errorTrace.getStatus()); - assertEquals(recordId, errorTrace.getRecordId()); - assertEquals(name, errorTrace.getErrorType()); - assertEquals(stackTrace, errorTrace.getStackTrace()); - assertEquals(occurredAt, errorTrace.getOccurredAt()); - - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/EventTest.java b/opensrp-core/src/test/java/org/opensrp/domain/EventTest.java deleted file mode 100644 index 089da58b83..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/EventTest.java +++ /dev/null @@ -1,120 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -public class EventTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Event.class) - .withIgnoredFields("id","revision") - .suppress(Warning.NONFINAL_FIELDS) - .withPrefabValues(User.class, new User("ll"), new User("e")) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Event.class)); - } - - @Test - public void testObs() { - Event event = new Event(); - event.setObs(null); - assertEquals(0, event.getObs().size()); - - event.setObs(null); - event.withObs(new Obs()); - assertEquals(1, event.getObs().size()); - assertNull(event.getObs("p", "c")); - - Obs obs = new Obs().withFieldCode("concept"); - event.setObs(null); - event.withObs(asList(obs)); - assertEquals(1, event.getObs().size()); - assertEquals(obs, event.getObs("", "concept")); - assertNull(event.getObs("p", "concept")); - - obs = new Obs().withFieldCode("concept"); - obs.withParentCode("p"); - event.setObs(null); - event.withObs(obs); - assertEquals(1, event.getObs().size()); - assertEquals(obs, event.getObs("p", "concept")); - assertEquals(obs, event.getObs("", "concept")); - assertNull(event.getObs("p", "con")); - } - - @Test - public void testIdentifiers() { - Event event = new Event(); - event.withIdentifiers(null); - assertEquals(0, event.getIdentifiers().size()); - assertNull(event.getIdentifier("dd")); - - event.withIdentifiers(null); - event.withIdentifier("type", "id"); - assertEquals(1, event.getIdentifiers().size()); - assertNull(event.getIdentifier("dd")); - assertEquals("id", event.getIdentifier("type")); - - event.removeIdentifier("dd"); - assertEquals(1, event.getIdentifiers().size()); - assertNull(event.getIdentifier("dd")); - assertEquals("id", event.getIdentifier("type")); - - event.removeIdentifier("type"); - assertEquals(0, event.getIdentifiers().size()); - assertNull(event.getIdentifier("type")); - - event.withIdentifiers(null); - event.addIdentifier("type", "id"); - assertEquals(1, event.getIdentifiers().size()); - assertEquals("id", event.getIdentifier("type")); - } - - @Test - public void testGettingIdentifiersUsingRegex() { - Event event = new Event(); - event.withIdentifiers(null); - event.addIdentifier("type", "id"); - assertEquals(1, event.getIdentifiers().size()); - assertEquals("id", event.getIdentifier("type")); - - assertNull( event.getIdentifierMatchingRegex("")); - assertEquals("id", event.getIdentifierMatchingRegex("^[a-zA-Z]+")); - assertNull(event.getIdentifierMatchingRegex("^[0-9]+")); - assertEquals("id", event.getIdentifierMatchingRegex("^type")); - assertNull(event.getIdentifierMatchingRegex("^id")); - } - - @Test - public void testAddingDetails() { - Event event = new Event(); - event.setDetails(null); - event.addDetails("key", "val"); - assertEquals(1, event.getDetails().size()); - assertEquals("val", event.getDetails().get("key")); - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/FormDefinitionTest.java b/opensrp-core/src/test/java/org/opensrp/domain/FormDefinitionTest.java deleted file mode 100644 index d485b45843..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/FormDefinitionTest.java +++ /dev/null @@ -1,24 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -public class FormDefinitionTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(FormDefinition.class)); - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/FormFieldTest.java b/opensrp-core/src/test/java/org/opensrp/domain/FormFieldTest.java deleted file mode 100644 index ad7920e6a4..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/FormFieldTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.random.RandomFactory; -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -import javax.management.ReflectionException; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; - -public class FormFieldTest { - - @Test - @SuppressWarnings("RedundantArrayCreation") - public void shouldCreateUsingDefaultConstructor() { - final Class clazz = FormField.class; - final Object obj1 = FormTest.getInstance(clazz, (Object[]) null); - Affirm.affirmNotNull("Should have created an object", obj1); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(FormField.class)); - } - - @Test - public void testConstructorWithParameter() { - final Class clazz = FormField.class; - final Object obj1 = FormTest.getInstance(clazz, "bind","bind_path"); - FormField formField = (FormField) obj1; - Affirm.affirmNotNull("Should have created an object", obj1); - assertEquals("bind", formField.name()); - assertEquals("bind_path", formField.bind()); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/FormTest.java b/opensrp-core/src/test/java/org/opensrp/domain/FormTest.java deleted file mode 100644 index a698be8a04..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/FormTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.PojoClass; -import com.openpojo.reflection.construct.InstanceFactory; -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -import static java.util.Arrays.asList; - -public class FormTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Form.class)); - } - - @Test - public void testConstructor() { - final Class clazz = Form.class; - final Object obj1 = getInstance(clazz, "bind","bind_path", asList(new FormField()), asList(new SubFormDefinition())); - Affirm.affirmNotNull("Should have created an object", obj1); - - final Object obj2 = getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } - - public static Object getInstance(final Class clazz, final Object... parameters) { - final PojoClass pojoClass = PojoClassFactory.getPojoClass(clazz); - return InstanceFactory.getInstance(pojoClass, parameters); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/MultimediaTest.java b/opensrp-core/src/test/java/org/opensrp/domain/MultimediaTest.java deleted file mode 100644 index c9673b0ed2..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/MultimediaTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; - -import static org.junit.Assert.assertTrue; - -public class MultimediaTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Multimedia.class) - .withIgnoredFields("id", "revision") - .suppress(Warning.NONFINAL_FIELDS) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Multimedia.class)); - } - - @Test - public void testConstructor() { - String fileCategory = "fileCategory"; - String filePath = "filePath"; - String contentType = "contentType"; - String providerId = "providerId"; - String caseId = "caseId"; - - Multimedia multimedia = new Multimedia(caseId, providerId, contentType, filePath, fileCategory); - - Multimedia multimedia1 = new Multimedia().withCaseId(caseId).withProviderId(providerId) - .withContentType(contentType) - .withFilePath(filePath) - .withFileCategory(fileCategory); - - assertTrue(multimedia.equals(multimedia1)); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ObsTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ObsTest.java deleted file mode 100644 index afd9062192..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ObsTest.java +++ /dev/null @@ -1,107 +0,0 @@ -package org.opensrp.domain; - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; - -import java.util.ArrayList; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; - -public class ObsTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Obs.class).suppress(Warning.NONFINAL_FIELDS).withIgnoredFields("set").verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create().with(new SetterTester()).with(new GetterTester()).build(); - - validator.validate(PojoClassFactory.getPojoClass(Obs.class)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionIfMultipleValuesFound() { - List values = new ArrayList<>(); - values.add("dd"); - values.add("d"); - Obs obs = new Obs().withValues(values); - - obs.getValue(); - } - - @Test - public void testGettingSingleValue() { - Obs obs = new Obs().withValues(null); - assertNull(obs.getValue()); - - obs.setValue("d"); - assertEquals("d", obs.getValue()); - - } - - @Test - public void testAddToValueList() { - Obs obs = new Obs().withValues(null); - obs = obs.addToValueList(null); - - assertNull(obs.getValues()); - - List values = new ArrayList<>(); - values.add("dd"); - obs = obs.addToValueList(values); - - assertEquals(1, obs.getValues().size()); - assertEquals("dd", obs.getValue()); - } - - @Test - public void shouldDeleteExistingValueWileAddingNewOne() { - List values = new ArrayList<>(); - values.add("dd"); - values.add("d"); - Obs obs = new Obs().withValues(values); - - obs.addToValueList("dd"); - - assertEquals(1, obs.getValues().size()); - assertEquals("dd", obs.getValue()); - } - - @Test - public void testCreatingObject() { - List values = new ArrayList<>(); - values.add("dd"); - String fieldType = "fieldType"; - String dataType = "dataType"; - String fieldCode = "fieldCode"; - String parentCode = "parentCode"; - String value = "sd"; - String comment = "comment"; - String formSubmission = "formSubmission"; - - Obs obs = new Obs().withFieldType(fieldType).withFieldDataType(dataType).withFieldCode(fieldCode) - .withParentCode(parentCode).withValue(value).withComments(comment).withFormSubmissionField(formSubmission) - .withEffectiveDatetime(new DateTime(0l)).withHumanReadableValues(values); - - assertEquals(fieldType, obs.getFieldType()); - assertEquals(fieldCode, obs.getFieldCode()); - assertEquals(dataType, obs.getFieldDataType()); - assertEquals(parentCode, obs.getParentCode()); - assertEquals(value, obs.getValue()); - assertEquals(comment, obs.getComments()); - assertEquals(formSubmission, obs.getFormSubmissionField()); - assertEquals(new DateTime(0l), obs.getEffectiveDatetime()); - assertEquals(values, obs.getHumanReadableValues()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/PhotoTest.java b/opensrp-core/src/test/java/org/opensrp/domain/PhotoTest.java deleted file mode 100644 index 0f3effe22f..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/PhotoTest.java +++ /dev/null @@ -1,22 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -public class PhotoTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Photo.class)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/ProviderTest.java b/opensrp-core/src/test/java/org/opensrp/domain/ProviderTest.java deleted file mode 100644 index c15163129c..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/ProviderTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; - -import static org.junit.Assert.assertEquals; - -public class ProviderTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Provider.class) - .withIgnoredFields("id", "revision") - .suppress(Warning.NONFINAL_FIELDS) - .withPrefabValues(User.class, new User("ll"), new User("e")) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Provider.class)); - } - - @Test - public void testConstructor() { - final Class clazz = Provider.class; - final Object obj1 = FormTest.getInstance(clazz, "entityId", "name"); - Affirm.affirmNotNull("Should have created an object", obj1); - - Provider provider = (Provider) obj1; - assertEquals("entityId", provider.getBaseEntityId()); - assertEquals("name", provider.getFullName()); - - final Object obj2 = FormTest.getInstance(clazz, "entityId"); - provider = (Provider) obj2; - assertEquals("entityId", provider.getBaseEntityId()); - assertEquals(null, provider.getFullName()); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/SearchTest.java b/opensrp-core/src/test/java/org/opensrp/domain/SearchTest.java deleted file mode 100644 index f74389e765..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/SearchTest.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; - -import java.util.*; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; - -public class SearchTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(Search.class) - .withIgnoredFields("id", "revision") - .suppress(Warning.NONFINAL_FIELDS) - .withPrefabValues(User.class, new User("ll"), new User("e")) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Search.class)); - } - - @Test - public void testFullName() { - Search search = new Search("ss").withFirstName("first").withMiddleName("middle").withLastName("last"); - assertEquals("first middle last", search.fullName()); - - search = new Search("ss").withName("first", "middle", null); - assertEquals("first middle", search.fullName()); - - search = new Search("ee", "first", "", "last", new DateTime(0l), true, "male"); - assertEquals("first last", search.fullName()); - - search = new Search("ee", "first", "", null, new DateTime(0l), true, "male"); - assertEquals("first", search.fullName()); - - search = new Search("ee", null, "middle", "", new DateTime(0l), true, "male"); - assertEquals("middle", search.fullName()); - - search = new Search("ee", null, "middle", "last", new DateTime(0l), true, "male"); - assertEquals("middle last", search.fullName()); - - search = new Search("ee", "", "", "last", new DateTime(0l), true, "male"); - assertEquals("last", search.fullName()); - - search = new Search("ee", "", "", null, new DateTime(0l), true, "male", Collections.EMPTY_LIST, new HashMap(), new HashMap()); - assertEquals("", search.fullName()); - } - - @Test - public void testRelationShip() { - Search search = new Search("ee", "", "", "last", new DateTime(0l), true, "male", "d", "d"); - search.withBirthdate(new DateTime(0l), true); - search.withGender("male"); - search.withRelationships(null); - assertNull(search.findRelatives("d")); - - search.withRelationships(null); - search.addRelationship("t", "id"); - assertEquals(1, search.getRelationships().size()); - assertEquals(asList("id"), search.findRelatives("t")); - assertEquals(asList("t"), search.getRelationships("id")); - assertEquals(0, search.getRelationships("ddd").size()); - - search.withRelationships(null); - search.addRelationship("t", "id"); - search.addRelationship("t", "id1"); - search.addRelationship("t2", "id"); - assertEquals(2, search.getRelationships().size()); - List expectedRelationships = new ArrayList<>(); - expectedRelationships.add("t"); - expectedRelationships.add("t2"); - List expectedIds = new ArrayList<>(); - expectedIds.add("id"); - expectedIds.add("id1"); - assertEquals(new HashSet<>(expectedIds), new HashSet<>(search.findRelatives("t"))); - assertEquals(new HashSet<>(expectedRelationships), new HashSet<>(search.getRelationships("id"))); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/SubFormDefinitionTest.java b/opensrp-core/src/test/java/org/opensrp/domain/SubFormDefinitionTest.java deleted file mode 100644 index 9265aa454a..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/SubFormDefinitionTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -import java.util.Collections; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; - -public class SubFormDefinitionTest { - - @Test - @SuppressWarnings("RedundantArrayCreation") - public void shouldCreateUsingDefaultConstructor() { - final Class clazz = SubFormDefinition.class; - final Object obj1 = FormTest.getInstance(clazz, (Object[]) null); - SubFormDefinition subFormDefinition = (SubFormDefinition) obj1; - assertEquals("", subFormDefinition.name()); - Affirm.affirmNotNull("Should have created an object", obj1); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - subFormDefinition = (SubFormDefinition) obj2; - assertEquals("", subFormDefinition.name()); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(SubFormDefinition.class)); - } - - @Test - public void testConstructorWithParameter() { - final Class clazz = SubFormDefinition.class; - final Object obj1 = FormTest.getInstance(clazz, "bind", Collections.EMPTY_LIST); - SubFormDefinition subFormDefinition = (SubFormDefinition) obj1; - Affirm.affirmNotNull("Should have created an object", obj1); - assertEquals("bind", subFormDefinition.name()); - assertEquals(Collections.EMPTY_LIST, subFormDefinition.getFields()); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/UniqueIdTest.java b/opensrp-core/src/test/java/org/opensrp/domain/UniqueIdTest.java deleted file mode 100644 index 5f8e99ab3a..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/UniqueIdTest.java +++ /dev/null @@ -1,23 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import org.junit.Test; - -public class UniqueIdTest { - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(UniqueId.class)); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/domain/UserTest.java b/opensrp-core/src/test/java/org/opensrp/domain/UserTest.java deleted file mode 100644 index 7a69657a91..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/domain/UserTest.java +++ /dev/null @@ -1,103 +0,0 @@ -package org.opensrp.domain; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.affirm.Affirm; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; - -import java.util.Collections; - -import static org.junit.Assert.*; - -public class UserTest { - - @Test - public void testEqualAndHashcodeContract() { - EqualsVerifier.forClass(User.class) - .withIgnoredFields("id","revision") - .suppress(Warning.NONFINAL_FIELDS) - .withPrefabValues(User.class, new User("ll"), new User("e")) - .withRedefinedSuperclass() - .verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(User.class)); - } - - @Test - public void testConstructor() { - final Class clazz = User.class; - final Object obj1 = FormTest.getInstance(clazz, "entityId","username", "password", "salt"); - Affirm.affirmNotNull("Should have created an object", obj1); - - final Object obj2 = FormTest.getInstance(clazz, new Object[] {}); - Affirm.affirmTrue("Should have created a different object", obj1 != obj2); - } - - @Test - public void testRoles() { - User user = new User("dd", "userName", "password", "salt", "status" , null, null); - assertFalse(user.hasRole("role")); - assertFalse(user.hasAdminRights()); - assertFalse(user.isDefaultAdmin()); - - user.addRole("role"); - assertTrue(user.hasRole("role")); - assertFalse(user.hasAdminRights()); - assertFalse(user.isDefaultAdmin()); - - user.removeRole("role"); - assertFalse(user.hasRole("role")); - - user.withRole("admin"); - assertTrue(user.hasRole("admin")); - assertTrue(user.hasAdminRights()); - assertFalse(user.isDefaultAdmin()); - - user.removeRole("admin"); - user.withRole("administrator"); - assertFalse(user.hasRole("admin")); - assertTrue(user.hasAdminRights()); - assertFalse(user.isDefaultAdmin()); - - user.withUsername("admin"); - assertTrue(user.hasRole("administrator")); - assertTrue(user.hasAdminRights()); - assertTrue(user.isDefaultAdmin()); - } - - @Test - public void testPermission() { - User user = new User(); - assertNull(user.getPermissions()); - assertFalse(user.hasPermission("permission")); - - user.withPermission("permission"); - assertNotNull(user.getPermissions()); - assertTrue(user.hasPermission("permission")); - assertFalse(user.hasPermission("permis")); - - assertFalse(user.removePermission("perms")); - - assertTrue(user.removePermission("permission")); - assertFalse(user.hasPermission("permission")); - - user.withPermissions(null); - user.addPermission("permission"); - assertTrue(user.hasPermission("permission")); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/ActionCreationIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/ActionCreationIntegrationTest.java deleted file mode 100644 index 79ca39c69f..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/ActionCreationIntegrationTest.java +++ /dev/null @@ -1,50 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.IOException; -import java.util.HashMap; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.scheduler.AlertCreationAction; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.MilestoneEvent; -import org.opensrp.util.Event; -import org.opensrp.util.ScheduleBuilder; -import org.opensrp.util.TestResourceLoader; - -public class ActionCreationIntegrationTest extends TestResourceLoader{ - public ActionCreationIntegrationTest() throws IOException { - super(); - } - - @Mock - private HealthSchedulerService scheduler; - - - - private AlertCreationAction reminderAction; - - @Mock - private FormSubmissionService formSubmissionService; - - @Before - public void setUp() throws Exception { - initMocks(this); - - } - - public static void main(String[] args) { - System.out.println(Boolean.valueOf("0")); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java deleted file mode 100644 index 77727e5e44..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java +++ /dev/null @@ -1,239 +0,0 @@ -package org.opensrp.repository.it; - -import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertTrue; -import static org.opensrp.dto.AlertStatus.normal; -import static org.opensrp.dto.BeneficiaryType.mother; - -import java.util.List; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.dto.ActionData; -import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.repository.couch.AllActions; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllActionsIntegrationTest { - - public static final String SCHEDULE_NAME = "Ante Natal Care - Normal"; - - public static final String VISIT_CODE = "ANC 1"; - - @Autowired - AllActions allActions; - - @Before - public void setUp() throws Exception { - allActions.removeAll(); - } - - @Test - public void shouldSaveAReminder() throws Exception { - Action alertAction = new Action("Case X", "ANM phone no", alert()); - - allActions.add(alertAction); - - List allTheAlertActionsInDB = allActions.getAll(); - assertEquals(1, allTheAlertActionsInDB.size()); - assertEquals(alertAction, allTheAlertActionsInDB.get(0)); - } - - @Test - public void shouldNotFindAnyAlertsIfNoneExistForGivenANM() throws Exception { - assertEquals(0, allActions.findByProviderIdAndTimeStamp("ANM 1", 0).size()); - } - - @Test - public void shouldReturnAlertActionsBasedOnProviderIdAndTimeStamp() throws Exception { - Action firstAction = new Action("Case X", "ANM 1", alert()); - allActions.add(firstAction); - - Action secondAction = new Action("Case Y", "ANM 1", alert()); - allActions.add(secondAction); - - Action thirdAction = new Action("Case Z", "ANM 1", alert()); - allActions.add(thirdAction); - - assertEquals(asList(firstAction, secondAction, thirdAction), allActions.findByProviderIdAndTimeStamp("ANM 1", 0)); - assertEquals(asList(secondAction, thirdAction), - allActions.findByProviderIdAndTimeStamp("ANM 1", firstAction.getTimestamp())); - assertEquals(asList(thirdAction), allActions.findByProviderIdAndTimeStamp("ANM 1", secondAction.getTimestamp())); - - assertEquals(0, allActions.findByProviderIdAndTimeStamp("ANM 1", thirdAction.getTimestamp()).size()); - } - - @Test - public void shouldReturnAlertActionsBasedOnCaseIdAndScheduleNameAndTimeStamp() throws Exception { - Action firstAction = new Action("Case X", "ANM 1", alert()); - allActions.add(firstAction); - - Action secondAction = new Action("Case X", "ANM 1", alert()); - allActions.add(secondAction); - - Action thirdAction = new Action("Case X", "ANM 1", alert()); - allActions.add(thirdAction); - - assertEquals(asList(firstAction, secondAction, thirdAction), allActions - .findByCaseIdScheduleAndTimeStamp("Case X", SCHEDULE_NAME, new DateTime(0), - new DateTime(thirdAction.getTimeStamp()))); - assertEquals(asList(secondAction, thirdAction), allActions - .findByCaseIdScheduleAndTimeStamp("Case X", SCHEDULE_NAME, new DateTime(firstAction.getTimeStamp() + 1), - new DateTime(thirdAction.getTimeStamp()))); - assertEquals(asList(thirdAction), allActions - .findByCaseIdScheduleAndTimeStamp("Case X", SCHEDULE_NAME, new DateTime(secondAction.getTimeStamp() + 1), - new DateTime(thirdAction.getTimeStamp()))); - assertEquals(0, allActions - .findByCaseIdScheduleAndTimeStamp("Case X", SCHEDULE_NAME, new DateTime(thirdAction.getTimeStamp() + 1), - new DateTime(thirdAction.getTimeStamp() + 2)).size()); - } - - @Test - public void shouldReturnAlertActionsBasedOnCaseIdAndTimeStamp() throws Exception { - Action firstAction = new Action("Case X", "ANM 1", alert()); - allActions.add(firstAction); - - Action secondAction = new Action("Case X", "ANM 1", alert()); - allActions.add(secondAction); - - Action thirdAction = new Action("Case X", "ANM 1", alert()); - allActions.add(thirdAction); - - assertEquals(asList(firstAction, secondAction, thirdAction), allActions.findByCaseIdAndTimeStamp("Case X", 0)); - assertEquals(asList(secondAction, thirdAction), - allActions.findByCaseIdAndTimeStamp("Case X", firstAction.getTimestamp() + 1)); - assertEquals(asList(thirdAction), allActions.findByCaseIdAndTimeStamp("Case X", secondAction.getTimestamp() + 1)); - - assertEquals(0, allActions.findByCaseIdAndTimeStamp("Case X", thirdAction.getTimestamp() + 1).size()); - } - - @Test - public void shouldFindAlertsOnlyForTheANMSpecified() throws Exception { - Action firstAction = new Action("Case X", "ANM 1", alert()); - allActions.add(firstAction); - - Action secondAction = new Action("Case Y", "ANM 2", alert()); - allActions.add(secondAction); - - assertEquals(asList(firstAction), allActions.findByProviderIdAndTimeStamp("ANM 1", 0)); - assertEquals(asList(secondAction), allActions.findByProviderIdAndTimeStamp("ANM 2", 0)); - } - - @Test - public void shouldMarkAllActionsAsInActiveForACase() throws Exception { - Action firstAction = new Action("Case X", "ANM 1", alert()); - Action secondAction = new Action("Case X", "ANM 1", alert()); - Action thirdAction = new Action("Case Y", "ANM 2", alert()); - allActions.add(firstAction); - allActions.add(secondAction); - allActions.add(thirdAction); - - allActions.markAllAsInActiveFor("Case X"); - - assertEquals(asList(firstAction.markAsInActive(), secondAction.markAsInActive()), - allActions.findByProviderIdAndTimeStamp("ANM 1", 0)); - assertEquals(asList(thirdAction), allActions.findByProviderIdAndTimeStamp("ANM 2", 0)); - } - - @Test - public void shouldFetchAlertsSortedByTimestamp() throws Exception { - Action earlierAction = new Action("Case X", "ANM 1", alert()); - Thread.sleep(100); - Action laterAction = new Action("Case X", "ANM 1", alert()); - Thread.sleep(100); - Action latestAction = new Action("Case X", "ANM 1", alert()); - - allActions.add(laterAction); - allActions.add(latestAction); - allActions.add(earlierAction); - - assertEquals(asList(earlierAction, laterAction, latestAction), allActions.findByProviderIdAndTimeStamp("ANM 1", 0)); - } - - @Test - public void shouldNotDoAnythingIfNoActionsAreFoundForATarget() { - Action alertAction = new Action("Case X", "ANM 1", alert()); - allActions.add(alertAction); - - allActions.deleteAllByTarget("report"); - - assertEquals(asList(alertAction), allActions.findByProviderIdAndTimeStamp("ANM 1", 0)); - } - - @Test - public void shouldReturnActionBasedOnANMIdEntityIdScheduleName() throws Exception { - Action anmAction = new Action("entity id 1", "anm id 1", alert("schedule1", "milestone1")); - Action anotherANMAction = new Action("entity id 2", "anm id 2", alert("schedule2", "milestone2")); - Action anotherEntityAction = new Action("entity id 2", "anm id 1", alert("schedule1", "milestone1")); - Action anotherScheduleAction = new Action("entity id 1", "anm id 1", alert("schedule2", "milestone1")); - allActions.add(anmAction); - allActions.add(anotherEntityAction); - allActions.add(anotherANMAction); - allActions.add(anotherScheduleAction); - - assertEquals(asList(anmAction), - allActions.findAlertByANMIdEntityIdScheduleName("anm id 1", "entity id 1", "schedule1")); - assertEquals(asList(anotherScheduleAction), - allActions.findAlertByANMIdEntityIdScheduleName("anm id 1", "entity id 1", "schedule2")); - assertEquals(asList(anotherEntityAction), - allActions.findAlertByANMIdEntityIdScheduleName("anm id 1", "entity id 2", "schedule1")); - assertEquals(asList(anotherANMAction), - allActions.findAlertByANMIdEntityIdScheduleName("anm id 2", "entity id 2", "schedule2")); - } - - @Test - public void shouldRemoveExistingAlertBeforeAddingNewOne() throws Exception { - Action existingAlert = new Action("entity id 1", "anm id 1", alert("schedule1", "milestone1")); - Action existingDifferentScheduleAlert = new Action("entity id 1", "anm id 1", alert("schedule2", "milestone3")); - allActions.add(existingAlert); - allActions.add(existingDifferentScheduleAlert); - - Action newAlert = new Action("entity id 1", "anm id 1", alert("schedule1", "milestone2")); - allActions.addOrUpdateAlert(newAlert); - - assertFalse(allActions.contains(existingAlert.getId())); - assertTrue(allActions.contains(existingDifferentScheduleAlert.getId())); - assertEquals(allActions.findAlertByANMIdEntityIdScheduleName("anm id 1", "entity id 1", "schedule1").get(0).getId(), - newAlert.getId()); - } - - @Test - public void shouldAddNewAlertWhenThereIsNoExistingAlert() throws Exception { - Action newAlert = new Action("entity id 1", "anm id 1", alert("schedule1", "milestone2")); - allActions.addOrUpdateAlert(newAlert); - - assertTrue(allActions.contains(newAlert.getId())); - } - - @Test - public void shouldUpdateAlertAsAnInactive() { - Action firstAction = new Action("Case X", "ANM 1", alert("schedule1", "milestone1")); - Action secondAction = new Action("Case X", "ANM 1", alert("schedule2", "milestone2")); - allActions.add(firstAction); - allActions.add(secondAction); - - allActions.markAlertAsInactiveFor("ANM 1", "Case X", "schedule1"); - - assertEquals(asList(firstAction.markAsInActive()), - allActions.findAlertByANMIdEntityIdScheduleName("ANM 1", "Case X", "schedule1")); - assertEquals(asList(secondAction), allActions.findAlertByANMIdEntityIdScheduleName("ANM 1", "Case X", "schedule2")); - } - - private ActionData alert() { - return ActionData - .createAlert(mother.value(), SCHEDULE_NAME, VISIT_CODE, normal, DateTime.now(), DateTime.now().plusDays(3)); - } - - private ActionData alert(String schedule, String milestone) { - return ActionData - .createAlert(mother.value(), schedule, milestone, normal, DateTime.now(), DateTime.now().plusDays(3)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java deleted file mode 100644 index 7cc7ee396f..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java +++ /dev/null @@ -1,211 +0,0 @@ -package org.opensrp.repository.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.opensrp.dto.AlertStatus.normal; - -import java.util.List; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.dto.AlertStatus; -import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.Alert.AlertType; -import org.opensrp.scheduler.Alert.TriggerType; -import org.opensrp.scheduler.repository.couch.AllAlerts; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllAlertsIntegrationTest { - @Autowired - public AllAlerts allAlerts; - - @Before - public void setUp() throws Exception { - allAlerts.removeAll(); - } - - @Test - public void shouldSaveANotification() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - allAlerts.add(alert); - - List allTheAlertsInDB = allAlerts.getAll(); - assertEquals(1, allTheAlertsInDB.size()); - assertEquals(alert, allTheAlertsInDB.get(0)); - } - - @Test - public void shouldNotFindAnyAlertsIfNoneExistForGivenProvider() throws Exception { - assertEquals(0, allAlerts.findActiveByProviderAndTimestamp("ANM 1", 0).size()); - } - - @Test - public void shouldReturnAlertActionsBasedOnProviderIDAndTimeStamp() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert1 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert1); - - Alert alert2 = new Alert("ANM 1", "Entity 2", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert2); - - Alert alert3 = new Alert("ANM 1", "Entity 3", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert3); - - assertEquals(asList(alert1, alert2, alert3), allAlerts.findActiveByProviderAndTimestamp("ANM 1", 0)); - assertEquals(asList(alert2, alert3), allAlerts.findActiveByProviderAndTimestamp("ANM 1", alert1.timestamp())); - assertEquals(asList(alert3), allAlerts.findActiveByProviderAndTimestamp("ANM 1", alert2.timestamp())); - - assertEquals(0, allAlerts.findActiveByProviderAndTimestamp("ANM 1", alert3.timestamp()).size()); - } - - @Test - public void shouldFindAlertsOnlyForTheANMSpecified() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert1 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert1); - - Alert alert2 = new Alert("ANM 2", "Entity 2", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert2); - - Alert alert3 = new Alert("ANM 1", "Entity 3", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - allAlerts.add(alert3); - - assertEquals(asList(alert1, alert3), allAlerts.findActiveByProviderAndTimestamp("ANM 1", 0)); - assertEquals(asList(alert2), allAlerts.findActiveByProviderAndTimestamp("ANM 2", 0)); - } - - @Test - public void shouldMarkAllAlertsAsInActiveForACase() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert1 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert2 = new Alert("ANM 1", "Entity 2", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert3 = new Alert("ANM 2", "Entity 3", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert4 = new Alert("ANM 1", "Entity 4", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - allAlerts.add(alert1); - allAlerts.add(alert2); - allAlerts.add(alert3); - allAlerts.add(alert4); - - allAlerts.markAllAsClosedFor("Entity 1", "none"); - - assertEquals(asList(alert2, alert4), allAlerts.findActiveByProviderAndTimestamp("ANM 1", 0)); - assertEquals(asList(alert3), allAlerts.findActiveByProviderAndTimestamp("ANM 2", 0)); - } - - @Test - public void shouldNotDoAnythingIfNoActionsAreFoundForATarget() { - //TODO - } - - @Test - public void shouldReturnActionBasedOnProviderIdEntityIdScheduleName() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert1 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert2 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 2", "penta2", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert3 = new Alert("ANM 2", "Entity 2", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert4 = new Alert("ANM 1", "Entity 3", "mother", AlertType.notification, TriggerType.schedule, - "Penta 2", "penta2", dueDate, expiryDate, AlertStatus.upcoming, null); - - allAlerts.add(alert1); - allAlerts.add(alert2); - allAlerts.add(alert3); - allAlerts.add(alert4); - - - assertEquals(asList(alert1), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 1")); - assertEquals(asList(alert2), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 2")); - assertEquals(asList(alert3), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 2", "Entity 2", "Penta 1")); - assertEquals(asList(alert4), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 3", "Penta 2")); - } - - @Test - public void shouldRemoveExistingAlertBeforeAddingNewOne() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - allAlerts.addOrUpdateScheduleNotificationAlert("mother", "Entity 1", "ANM 1", "Penta 1", "penta1", AlertStatus.upcoming, dueDate, expiryDate); - assertTrue(allAlerts.findActiveAlertByEntityId("Entity 1").size() == 1); - - allAlerts.addOrUpdateScheduleNotificationAlert("mother", "Entity 1", "ANM 1", "Penta 1", "penta1", normal, dueDate, expiryDate); - - List al = allAlerts.findActiveAlertByEntityId("Entity 1"); - assertTrue(al.size() == 1); - assertTrue(al.get(0).alertStatus().equalsIgnoreCase(normal.name())); - } - - @Test - public void shouldAddNewAlertWhenThereIsNoExistingAlert() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - allAlerts.addOrUpdateScheduleNotificationAlert("mother", "Entity 1", "ANM 1", "Penta 1", "penta1", AlertStatus.upcoming, dueDate, expiryDate); - - assertTrue(allAlerts.findActiveAlertByEntityId("Entity 1").size() == 1); - } - - @Test - public void shouldUpdateAlertAsAnInactive() { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Alert alert1 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 1", "penta1", dueDate, expiryDate, AlertStatus.upcoming, null); - - Alert alert2 = new Alert("ANM 1", "Entity 1", "mother", AlertType.notification, TriggerType.schedule, - "Penta 2", "penta2", dueDate, expiryDate, AlertStatus.upcoming, null); - - allAlerts.add(alert1); - allAlerts.add(alert2); - - assertEquals(asList(alert1, alert2), allAlerts.findActiveAlertByEntityId("Entity 1")); - assertEquals(asList(alert1), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 1")); - assertEquals(asList(alert2), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 2")); - - allAlerts.markAlertAsClosedFor("ANM 1", "Entity 1", "Penta 1", "none"); - - assertEquals(asList(alert2), allAlerts.findActiveAlertByEntityId("Entity 1")); - assertEquals(asList(), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 1")); - assertEquals(asList(alert2), allAlerts.findActiveAlertByProviderEntityIdTriggerName("ANM 1", "Entity 1", "Penta 2")); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java deleted file mode 100644 index e04d3e9f97..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java +++ /dev/null @@ -1,105 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.MockitoAnnotations.initMocks; -import static org.junit.Assert.*; - -import java.util.Date; -import java.util.List; - -import org.ektorp.CouchDbConnector; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.common.AllConstants; -import org.opensrp.common.Gender; -import org.opensrp.domain.Address; -import org.opensrp.domain.BaseEntity; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllBaseEntities; -import org.opensrp.repository.couch.AllClients; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllBaseEntitiesIntegrationTest { - - @Autowired - @Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) - CouchDbConnector db; - - @Autowired - private AllBaseEntities allBaseEntities; - @Autowired - private AllClients allClients; - - @Before - public void setUp() throws Exception { - allClients.removeAll(); - initMocks(this); - } - - @Test - public void shouldFetchBaseEntityForClientData() throws Exception { - String baseEntityId = "testclient1"; - Client c = new Client(baseEntityId) - .withBirthdate(new DateTime(), false) - .withFirstName("C first n") - .withLastName("C last n") - .withMiddleName("C middle n") - .withGender(Gender.FEMALE); - c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis()-1000*60*60*24*2), DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); - c.withAttribute("ETHNICITY", "Mughal"); - c.withIdentifier("Program ID", "01001221"); - - allClients.add(c); - - BaseEntity be = allBaseEntities.findByBaseEntityId("testclient1"); - assertEquals("testclient1", be.getBaseEntityId()); - assertTrue(Client.class.getSimpleName().equals(be.type())); - assertEquals("birthplace", be.getAddresses().get(0).getAddressType()); - assertEquals("Mughal", be.getAttribute("ethnicity")); - assertEquals("01001221", be.getIdentifier("program id")); - - List be2 = allBaseEntities.findAllByIdentifier("01001221"); - assertTrue(be2.size() == 1); - assertEquals("testclient1", be2.get(0).getBaseEntityId()); - - List be3 = allBaseEntities.findAllByIdentifier("Program ID", "01001221"); - assertTrue(be3.size() == 1); - assertEquals("testclient1", be3.get(0).getBaseEntityId()); - } - - @Test - public void shouldFetchBaseEntityByIdentifier() throws Exception { - String baseEntityId = "testclient2"; - Client c = new Client(baseEntityId) - .withBirthdate(new DateTime(), false) - .withFirstName("C first n") - .withLastName("C last n") - .withMiddleName("C middle n") - .withGender(Gender.MALE); - c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis()-1000*60*60*24*2), DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); - c.withAttribute("ETHNICITY", "Mughal"); - c.withIdentifier("Program ID", "01001222"); - - allClients.add(c); - - BaseEntity be = allBaseEntities.findByBaseEntityId("testclient2"); - assertEquals("testclient2", be.getBaseEntityId()); - assertTrue(Client.class.getSimpleName().equals(be.type())); - assertEquals("01001222", be.getIdentifier("program id")); - - List be2 = allBaseEntities.findAllByIdentifier("01001222"); - assertTrue(be2.size() == 1); - assertEquals("testclient2", be2.get(0).getBaseEntityId()); - - List be3 = allBaseEntities.findAllByIdentifier("Program ID", "01001222"); - assertTrue(be3.size() == 1); - assertEquals("testclient2", be3.get(0).getBaseEntityId()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java deleted file mode 100644 index b4f7138b15..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java +++ /dev/null @@ -1,271 +0,0 @@ -package org.opensrp.repository.it; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.equalTo; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.net.MalformedURLException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import org.apache.log4j.FileAppender; -import org.apache.log4j.Level; -import org.apache.log4j.Logger; -import org.apache.log4j.PatternLayout; -import org.ektorp.CouchDbConnector; -import org.hamcrest.Matchers; -import org.joda.time.DateTime; -import org.json.JSONException; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.common.Gender; -import org.opensrp.domain.Address; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.search.AddressSearchBean; -import org.opensrp.search.ClientSearchBean; -import org.opensrp.service.ClientService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllClientsIntegrationTest { - //TODO detailed testign - - @Autowired - private ClientService clientService; - - @Autowired - private AllClients ac; - - @Before - public void setUp() throws Exception { - System.out.println("Removing all data"); - ac.removeAll(); - System.out.println("Removed"); - initMocks(this); - - FileAppender fa = new FileAppender(); - fa.setName("FileLogger"); - fa.setFile("d:\\opensrp-logger.log"); - fa.setLayout(new PatternLayout("%d %-5p [%c{1}] %m%n")); - fa.setThreshold(Level.INFO); - fa.setAppend(true); - fa.activateOptions(); - - // add appender to any Logger (here is root) - Logger.getRootLogger().addAppender(fa); - } - - private void addClients() { - for (int i = 0; i < 10; i++) { - Client c = new Client("eid" + i).withName("fn" + i, "mn" + i, "ln" + i).withGender("MALE") - .withBirthdate(new DateTime(), false); - c.withAddress(new Address().withAddressType("usual_residence").withCityVillage("city" + i).withTown("town" + i)); - c.withAttribute("at1", "atval" + i); - - clientService.addClient(c); - } - } - - @Test - public void shouldMergeSuccessfullyIfClientFound() throws JSONException {//TODO - Client c = new Client("eid0").withName("fn", "mn", "ln").withGender("MALE").withBirthdate(new DateTime(), false); - c.withAddress(new Address().withAddressType("usual_residence").withCityVillage("city").withTown("town")); - c.withAttribute("at1", "atval1"); - - c = clientService.addClient(c); - - Client cu = new Client("eid0").withGender("FEMALE").withBirthdate(new DateTime(), false); - cu.withAddress(new Address().withAddressType("deathplace").withCityVillage("city").withTown("town")); - cu.withAttribute("at2", "atval2"); - - clientService.mergeClient(cu); - } - - @Test - public void shouldSearchByLastUpdatedDate() throws JSONException {//TODO - DateTime start = DateTime.now(); - - addClients(); - - DateTime end = DateTime.now(); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setLastEditFrom(start); - clientSearchBean.setLastEditTo(end); - - List cll = clientService.findByCriteria(clientSearchBean, null); - - assertEquals(10, cll.size()); - } - - public static void main(String[] args) { - System.out.println(new DateTime("2016-01-23").toString("MMMM (yyyy)")); - } - - @Test - public void shouldSearchFullDataClientsIn10Sec() throws MalformedURLException { - - /*org.ektorp.http.HttpClient httpClient = new StdHttpClient.Builder().url("http://202.141.249.106:6808").build(); - CouchDbInstance dbInstance = new StdCouchDbInstance(httpClient); - - CouchDbConnector db = new StdCouchDbConnector("opensrp", dbInstance); - - Logger.getLogger("FileLogger").info("Starting at "+new DateTime());*/ - - final long start = System.currentTimeMillis(); - - for (int i = 0; i < 100; i++) { - addClient(i, false, null); - } - Logger.getLogger("FileLogger") - .info("10K entries complete at " + new DateTime() + " in " + ((System.currentTimeMillis() - start) / 1000) - + " sec"); - - Logger.getLogger("FileLogger").info("Going for First search by Couch"); - clientService.findAllByIdentifier("1234556" + "786"); - Logger.getLogger("FileLogger").info("Completed First search by Couch"); - - Logger.getLogger("FileLogger").info("Going for 2nd search by Couch"); - clientService.findAllByIdentifier("1234556" + "786"); - Logger.getLogger("FileLogger").info("Completed 2nd search by Couch"); - - Logger.getLogger("FileLogger").info("Going for First search by Lucene"); - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike("first"); - clientSearchBean.setGender("MALE"); - clientSearchBean.setBirthdateFrom(new DateTime()); - clientSearchBean.setAttributeType("ethnicity"); - clientSearchBean.setAttributeValue("eth3"); - List l = clientService.findByCriteria(clientSearchBean, null); - Logger.getLogger("FileLogger").info("Completed First search of size "+l.size()+" by Lucene"); - - Logger.getLogger("FileLogger").info("Going for 2nd search by Lucene"); - l = clientService.findByCriteria(clientSearchBean, null); - - Logger.getLogger("FileLogger").info("Completed 2nd search of size " + l.size() + " by Lucene"); - } - - void addClient(int i, boolean direct, CouchDbConnector db) { - int ageInWeeks = new Random().nextInt(2860);// assuming average age of people is 55 years - DateTime birthdate = new DateTime().minusWeeks(ageInWeeks); - DateTime deathdate = i % 7 == 0 ? new DateTime() : null;// every 7th person died today - Client c = new Client("entityId" + i, "firstName" + i, "middleName" + i, "lastName" + i, birthdate, deathdate, false, - false, i % 2 == 0 ? "FEMALE" : "MALE"); - - Map am = new HashMap<>(); - Address ab = new Address("birthplace", null, null, am, null, null, null, "Sindh", "Pakistan"); - ab.setCityVillage("Karachi"); - ab.setTown("Korangi"); - ab.setSubTown("UC" + i % 11); - c.addAddress(ab); - - Address ur = new Address("usual_residence", null, null, am, null, null, "752" + new Random().nextInt(5), "Sindh", - "Pakistan"); - ur.setCityVillage("Karachi"); - ur.setTown(i % 3 == 0 ? "Korangi" : "Baldia"); - ur.setSubTown("UC" + i % 11); - c.addAddress(ur); - - c.addAttribute("ethnicity", "eth" + i % 7); - c.addAttribute("health area", "healtha" + i % 7); - - c.addIdentifier("CNIC", "1234556" + i); - c.addIdentifier("NTN", "564300" + i); - - if (db != null) { - db.create(c); - } else if (direct) { - ac.add(c); - } else { - clientService.addClient(c); - } - } - - @Test - public void shouldGetByDynamicView() { - addClients(); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setGender("MALE"); - List l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); - assertTrue(l2.size() == 10); - - clientSearchBean = new ClientSearchBean(); - clientSearchBean.setGender("FEMALE"); - l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); - assertTrue(l2.size() == 0); - - clientSearchBean = new ClientSearchBean(); - clientSearchBean.setGender("FEMALE"); - clientSearchBean.setNameLike("fn"); - l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); - assertTrue(l2.size() == 10); - - clientSearchBean.setNameLike("fn1"); - l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); - assertTrue(l2.size() == 1); - } - - @Test - public void shouldFetchClientByIdentifier() { - String baseEntityId = "testclient2"; - Client c = new Client(baseEntityId).withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); - c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), - DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); - c.withAttribute("ETHNICITY", "Mughal"); - c.withIdentifier("Program ID", "01001222"); - - clientService.addClient(c); - - Client ce = clientService.getByBaseEntityId("testclient2"); - assertEquals("testclient2", ce.getBaseEntityId()); - assertTrue(Client.class.getSimpleName().equals(ce.type())); - assertEquals("birthplace", ce.getAddresses().get(0).getAddressType()); - assertEquals("Mughal", ce.getAttribute("ethnicity")); - assertEquals("01001222", ce.getIdentifier("program id")); - - List ce2 = clientService.findAllByIdentifier("01001222"); - assertTrue(ce2.size() == 1); - assertEquals("testclient2", ce2.get(0).getBaseEntityId()); - - List ce3 = clientService.findAllByIdentifier("Program ID", "01001222"); - assertTrue(ce3.size() == 1); - assertEquals("testclient2", ce3.get(0).getBaseEntityId()); - } - - @Test - public void shouldFetchClientByAttribute() { - String baseEntityId = "testclient2"; - Client c = new Client(baseEntityId).withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); - c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), - DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); - c.withAttribute("ETHNICITY", "Mughal"); - c.withIdentifier("Program ID", "01001222"); - - clientService.addClient(c); - - c = new Client("testclient3").withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); - c.withAttribute("ETHNICITY", "Mughal"); - c.addIdentifier("Program ID", "01001223"); - - clientService.addClient(c); - - List ce = clientService.findAllByAttribute("ETHNICITY", "Mughal"); - assertTrue(ce.size() == 2); - assertThat(ce, Matchers. hasItem(Matchers. hasProperty("baseEntityId", equalTo("testclient2")))); - assertThat(ce, Matchers. hasItem(Matchers. hasProperty("baseEntityId", equalTo("testclient3")))); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java deleted file mode 100644 index 6bd0797dd2..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.MockitoAnnotations.initMocks; - -import java.util.Date; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.couch.AllErrorTrace; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllErrorTraceIntegrationTest { - - @Autowired - private AllErrorTrace allErrorTrace; - @Before - public void setUp() throws Exception { - initMocks(this); - } - - @Test - public void shouldAddError()throws Exception - { - //ErrorTrace error=new ErrorTrace(new Date(), "Error Testing" , "not availalbe","this is an Testing Error", "unsolved"); - ErrorTrace error=new ErrorTrace(); - error.setErrorType("error loggging test"); - error.setDate(DateTime.now()); - error.setStackTrace("Complete Stack Trace :"); - error.setStatus("unsolved"); - error.setDocumentType("Test Document"); - // error.setErrorType("test Error"); - allErrorTrace.add(error); - - } - - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java deleted file mode 100644 index 5a1b4d36a8..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java +++ /dev/null @@ -1,58 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.MockitoAnnotations.initMocks; -import static org.junit.Assert.*; - -import java.util.ArrayList; -import java.util.List; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.service.EventService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllEventsIntegrationTest { -//TODO Detailed testing - @Autowired - private EventService eventService; - @Autowired - private AllEvents allEvents; - - @Before - public void setUp() throws Exception { - allEvents.removeAll(); - initMocks(this); - } - - private void addEvents() { - for (int i = 0; i < 20; i++) { - Event e = new Event("entityid"+i, "Immunization", new DateTime(), - "testentity", "demotest", "location"+i, "formSubmission"+i+100); - e.addObs(new Obs("concept", "txt", "1025AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "bcg")); - e.addObs(new Obs("concept", "txt", "1026AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "penta1")); - e.addObs(new Obs("concept", "txt", "1027AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "penta2")); - e.addObs(new Obs("concept", "txt", "1028AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "penta3")); - e.addObs(new Obs("concept", "txt", "1029AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "mealses1")); - e.addObs(new Obs("concept", "txt", "1030AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "measles2")); - e.addObs(new Obs("concept", "txt", "1029AAAAAAAAAAAAAAAA", null, "2015-01-01" , "comments test"+i, "tt1")); - e.addObs(new Obs("concept", "txt", "1030AAAAAAAAAAAAAAAA", null, "2016-02-01" , "comments test"+i, "tt2")); - eventService.addEvent(e); - } - } - - @Test - public void test(){ - addEvents(); - assertTrue(eventService.getByBaseEntityAndFormSubmissionId("entityid0", "formSubmission0100")!=null); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java deleted file mode 100644 index 50361371db..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java +++ /dev/null @@ -1,70 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.MockitoAnnotations.initMocks; - -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.domain.Address; -import org.opensrp.repository.couch.AllLocations; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllLocationsIntegrationTest { - - - @Autowired - private AllLocations allLocations; - - @Before - public void setUp() throws Exception { - initMocks(this); - } - - @Test - public void shouldAddLocation() throws Exception - { - Map addressFields = new HashMap(); - addressFields.put("PS","Dimla"); - addressFields.put("Union","Gaya Bari"); - addressFields.put("Ward","Middle Gaya Bari"); - - Address address = new Address("Permanent", DateTime.now(), DateTime.now(), - addressFields, "70.5", "40.5", "6300", "", "Bangladesh"); - - Map identifiers = new HashMap(); - identifiers.put("identifier-1", - "FWA0001"); - - Set tags = new HashSet(); - tags.add("tag1"); - tags.add("tag2"); - - Map attributes = new HashMap(); - - attributes.put("attr1", "value1"); - attributes.put("attr2", "value2"); - - - - org.opensrp.domain.Location domainLocation = new org.opensrp.domain.Location() - .withLocationId("10203040") - .withName("Dimla") - .withAddress(address) - .withIdentifiers(identifiers) - .withAttributes(attributes) - .withTags(tags); - - allLocations.add(domainLocation); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java deleted file mode 100644 index 3bebe595f1..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.opensrp.repository.it; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.Matchers.is; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.util.HashMap; -import java.util.Map; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.repository.couch.AllProviders; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllProvidersIntegrationTest { - - @Autowired - private AllProviders allProviders; - - @Before - public void setUp() throws Exception { - initMocks(this); - } - - @Test - public void shouldAddProvider() - { - /*Map identifiers = new HashMap(); - identifiers.put("identifier-1", - "FWA-1"); - - - org.opensrp.domain.Provider domainProvider = new org.opensrp.domain.Provider() - .withBaseEntityId("0001") - .withIdentifiers(identifiers); - - - allProviders.add(domainProvider);*/ - - - - org.opensrp.domain.Provider baseEntityIdInProvider = allProviders - .findByBaseEntityId("0001"); - - //assertThat(allBaseEntitiesInDB, is(asList(domainBaseEntity))); - //assertThat(baseEntityIdInProvider.getBaseEntityId(), is("0001")); - - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java deleted file mode 100644 index 4a8aecfaa7..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.opensrp.repository.it; - -import static org.mockito.MockitoAnnotations.initMocks; - -import java.util.ArrayList; -import java.util.List; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.domain.BaseEntity; -import org.opensrp.domain.User; -import org.opensrp.repository.couch.AllBaseEntities; -import org.opensrp.repository.couch.AllUsers; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class AllUsersIntegrationTest { - - - @Autowired - private AllUsers allUsers; - @Autowired - private AllBaseEntities allBaseEntities; - - @Before - public void setUp() throws Exception { - initMocks(this); - } - - @Test - public void shouldAddUser()throws Exception - { - List permissions = new ArrayList<>(); - permissions.add("add"); - permissions.add("edit"); - permissions.add("delete"); - - List roles = new ArrayList<>(); - roles.add("tlp"); - - BaseEntity baseEntity = allBaseEntities.findByBaseEntityId("0001"); - - User domainUser = new User("0001") - .withUsername("FWA2") - .withPassword("77ba08ff5832b6c4143c51160b7e9bab7b72d98a") - .withSalt("1efa26b9-9cc9-40df-aecb-14836069a8f8") - .withStatus("active") - .withPermissions(permissions) - .withRoles(roles); - - //domainUser.isDefaultAdmin(); - - allUsers.add(domainUser); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java deleted file mode 100644 index 7d2bfe6858..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.opensrp.repository.it; - -import static org.junit.Assert.*; - -import org.joda.time.LocalDate; -import org.junit.AfterClass; -import org.junit.Before; -import org.junit.FixMethodOrder; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.MethodSorters; -import org.opensrp.common.AllConstants.Config; -import org.opensrp.repository.couch.AllAppStateTokens; -import org.opensrp.service.ConfigService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class ConfigServiceIntegrationTest { - - public enum TestToken { - token1_int(Integer.valueOf(12)), - token2_long(Long.valueOf(1234567890123L)), - token3_string("test string"), - token5_datetime(LocalDate.now()), - token6_float(Float.valueOf("21212.3323")), - token7_double(Double.valueOf(43748384.347384738)), - token9_boolean(Boolean.valueOf(true)); - - private Object value; - public Object value() { - return value; - } - private TestToken(Object value) { - this.value = value; - } - } - @Autowired - private AllAppStateTokens alltokens; - private static AllAppStateTokens allAppTokens; - @Autowired - private ConfigService configService; - - @Before - public void setUp() { - if(allAppTokens == null){ - alltokens.removeAll(); - allAppTokens = alltokens; - - for (TestToken tk : TestToken.values()) { - configService.registerAppStateToken(tk, tk.value(), tk.name(), false); - } - - for (TestToken tk : TestToken.values()) { - assertEquals(tk.name(), configService.getAppStateTokenByName(tk).getName()); - } - } - } - - @AfterClass - public static void cleanup() {allAppTokens.removeAll();} - - @Test - public void shouldGetIntToken() { - TestToken tk = TestToken.token1_int; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).intValue()); - } - @Test(expected=IllegalArgumentException.class) - public void shouldThrowExceptionForRegisteringDuplicateEntryFlaggedAsDonotSuppressException() { - configService.registerAppStateToken(TestToken.token1_int, "", "token1_int", false); - } - @Test - public void shouldNotThrowExceptionForRegisteringDuplicateEntryFlaggedAsSuppressException() { - configService.registerAppStateToken(TestToken.token1_int, "", "token1_int", true); - } - @Test(expected=IllegalArgumentException.class) - public void shouldThrowExceptionForRegisteringWithMissingDescription() { - configService.registerAppStateToken(TestToken.token1_int, "", "", false); - } - @Test(expected=IllegalArgumentException.class) - public void shouldThrowExceptionForRegisteringWithMissingName() { - configService.registerAppStateToken(null, "", "", false); - } - @Test(expected=IllegalStateException.class) - public void shouldThrowExceptionForUpdatingWithNonExistentName() { - configService.updateAppStateToken(Config.FORM_ENTITY_PARSER_LAST_SYNCED_FORM_SUBMISSION, ""); - } - @Test - public void shouldGetLongToken() { - TestToken tk = TestToken.token2_long; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).longValue()); - } - @Test - public void shouldGetStringToken() { - TestToken tk = TestToken.token3_string; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).stringValue()); - } - @Test - public void shouldGetDatetimeToken() { - TestToken tk = TestToken.token5_datetime; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).datetimeValue()); - } - @Test - public void shouldGetFloatToken() { - TestToken tk = TestToken.token6_float; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).floatValue()); - } - @Test - public void shouldGetDoubleToken() { - TestToken tk = TestToken.token7_double; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).doubleValue()); - } - @Test - public void shouldGetBooleanToken() { - TestToken tk = TestToken.token9_boolean; - assertEquals(tk.value(), configService.getAppStateTokenByName(tk).booleanValue()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java deleted file mode 100644 index fec34a7f86..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java +++ /dev/null @@ -1,256 +0,0 @@ -package org.opensrp.repository.it; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.ektorp.CouchDbConnector; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.motechproject.model.MotechBaseDataObject; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.motechproject.scheduletracking.api.repository.AllEnrollments; -import org.opensrp.api.domain.Client; -import org.opensrp.common.AllConstants; -import org.opensrp.domain.Event; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.AlertCreationAction; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.couch.AllActions; -import org.opensrp.scheduler.repository.couch.AllAlerts; -import org.opensrp.service.ClientService; -import org.opensrp.service.EventService; -import org.opensrp.service.formSubmission.FormEntityConverter; -import org.opensrp.service.formSubmission.FormSubmissionProcessor; -import org.opensrp.service.formSubmission.handler.CustomFormSubmissionHandler; -import org.opensrp.service.formSubmission.handler.FormSubmissionRouter; -import org.opensrp.service.formSubmission.handler.HandlerMapper; -import org.opensrp.service.formSubmission.ziggy.EntityDataMap; -import org.opensrp.service.formSubmission.ziggy.ZiggyService; -import org.opensrp.util.ScheduleBuilder; -import org.opensrp.util.TestResourceLoader; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class FormLifeCycleTest extends TestResourceLoader { - - public FormLifeCycleTest() throws IOException { - super(); - } - - private List docsToRemove = new ArrayList<>(); - - @Autowired - @Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) - private CouchDbConnector db; - - @Autowired - private FormSubmissionProcessor fsp; - - @Autowired - private ZiggyService ziggyService; - - @Autowired - private FormSubmissionRouter formSubmissionRouter; - - @Autowired - private FormEntityConverter formEntityConverter; - - /*@Autowired - private ActionService actionService; - @Autowired - private ScheduleService schService;*/ - @Autowired - private HealthSchedulerService scheduleService; - - @Autowired - private ClientService clientService; - - @Autowired - private EventService eventService; - - @Autowired - private HandlerMapper hmap; - - @Autowired - private EntityDataMap edmap; - - @Mock - private FormSubmissionService formSubmissionService; - - private AlertCreationAction reminderAction; - - private DateTime dueWindowStart; - - private DateTime lateWindowStart; - - private DateTime maxWindowStart; - - @Autowired - private AllActions allActions; - - @Autowired - private AllAlerts allAlerts; - - @Autowired - private AllClients allClients; - - @Autowired - private AllEvents allEvents; - - @Autowired - private AllEnrollments allEnrollments; - - @Before - public void setup() throws IOException { - initMocks(this); - - allEnrollments.removeAll(); - allClients.removeAll(); - allEvents.removeAll(); - allActions.removeAll(); - allAlerts.removeAll(); - - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, - formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); - reminderAction = new AlertCreationAction(scheduleService, formSubmissionService); - - dueWindowStart = DateTime.now(); - lateWindowStart = DateTime.now().plusDays(10); - maxWindowStart = DateTime.now().plusDays(20); - } - - @Ignore - @Test //TODO - public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception { - FormSubmission fs = getFormSubmissionFor("child_enrollment", 1); - //child birthdate is 10/Nov/2015 - fsp.processFormSubmission(fs); - - assertNotNull(clientService.getByBaseEntityId(fs.entityId())); - List evl = allEvents.findByBaseEntityId(fs.entityId()); - assertTrue(evl.size() == 1); - //TODO assertTrue(eventService.findEventsBy(fs.entityId(), null, "Enrollement Vaccination Register", null, "pkchild", 0, Long.MAX_VALUE).size() == 1); - Enrollment p1schedule = scheduleService.getEnrollment(fs.entityId(), "PENTAVALENT 1"); - assertNotNull(p1schedule); - assertTrue(p1schedule.isActive()); - assertFalse(p1schedule.isCompleted()); - assertEquals(p1schedule.getStatus(), EnrollmentStatus.ACTIVE); - assertEquals(p1schedule.getLastFulfilledDate(), null); - assertTrue(p1schedule.getFulfillments().isEmpty()); - - Enrollment m1schedule = scheduleService.getActiveEnrollment(fs.entityId(), "Measles 1"); - assertNotNull(m1schedule); - assertTrue(m1schedule.isActive()); - assertFalse(m1schedule.isCompleted()); - assertEquals(m1schedule.getStatus(), EnrollmentStatus.ACTIVE); - assertEquals(m1schedule.getLastFulfilledDate(), null); - assertTrue(m1schedule.getFulfillments().isEmpty()); - - when(formSubmissionService.findByInstanceId(fs.instanceId())).thenReturn(fs); - - reminderAction.invoke(ScheduleBuilder.event(fs.entityId(), "PENTAVALENT 1", "penta1", WindowName.earliest, - p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due), - p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late), - p1schedule.getStartOfWindowForCurrentMilestone(WindowName.max)), null); - - List acl = allActions.findByCaseIdScheduleAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), - new DateTime(0), new DateTime(System.currentTimeMillis())); - assertTrue(acl.size() == 1); - Action ac = acl.get(0); - assertEquals(fs.anmId(), ac.providerId()); - assertEquals(fs.entityId(), ac.baseEntityId()); - assertEquals("createAlert", ac.getActionType()); - assertEquals("alert", ac.getActionTarget()); - assertEquals(true, ac.getIsActionActive()); - assertEquals(fs.bindType(), ac.data().get("beneficiaryType")); - assertEquals(p1schedule.getScheduleName(), ac.data().get("scheduleName")); - assertEquals("pentavalent_1", ac.data().get("visitCode")); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), - ac.data().get("startDate")); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), - ac.data().get("expiryDate")); - - List all = allAlerts.findByEntityIdTriggerAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), - new DateTime(0), new DateTime(System.currentTimeMillis())); - assertTrue(all.size() == 1); - Alert al = all.get(0); - assertEquals(fs.anmId(), al.providerId()); - assertEquals(fs.entityId(), al.entityId()); - assertEquals("upcoming", al.alertStatus()); - assertEquals("notification", al.alertType()); - assertEquals("pkchild", al.beneficiaryType()); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), - al.expiryDate()); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), - al.startDate()); - assertEquals(true, al.isActive()); - assertEquals("penta1", al.triggerCode()); - assertEquals("PENTAVALENT 1", al.triggerName()); - assertEquals("schedule", al.triggerType()); - - //TODO followup handling - } - - @Test - @Ignore //FIXME - public void shouldCreateClientAndEventAndSchedulesWithRouter() throws Exception { - hmap.addCustomFormSubmissionHandler("pnc_1st_registration", new CustomFormSubmissionHandler() { - - @Override - public void handle(FormSubmission submission) { - assertEquals("pnc_1st_registration", submission.formName()); - assertEquals("b716d938-1aea-40ae-a081-9ddddddcccc9", submission.entityId()); - assertEquals("admin", submission.anmId()); - assertEquals("demo_mother", submission.bindType()); - System.out.println("I want to call scheduler myself :D"); - } - }); - FormSubmission fs = getFormSubmissionFor("pnc_1st_registration"); - fsp.processFormSubmission(fs); - - } - - @Test - @Ignore - public void shouldCreateClientAndEventAndSchedulesWithZiggy() throws Exception { - hmap.addCustomFormSubmissionHandler("new_household_registration", new CustomFormSubmissionHandler() { - - @Override - public void handle(FormSubmission submission) { - assertEquals("new_household_registration", submission.formName()); - assertEquals("b716d938-1aea-40ae-a081-9ddddddcccc9", submission.entityId()); - assertEquals("admin", submission.anmId()); - assertEquals("household", submission.bindType()); - System.out.println("I am Ziggy scheduler"); - } - }); - edmap.addEntity("household", Client.class); - - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - fsp.processFormSubmission(fs); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/ScheduleLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/ScheduleLifeCycleTest.java deleted file mode 100644 index 82b3c23f44..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/ScheduleLifeCycleTest.java +++ /dev/null @@ -1,40 +0,0 @@ -package org.opensrp.repository.it; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Test; -import org.junit.runner.RunWith; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.repository.AllEnrollments; -import org.opensrp.domain.Client; -import org.opensrp.scheduler.service.ScheduleService; -import org.opensrp.util.TestResourceLoader; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class ScheduleLifeCycleTest extends TestResourceLoader{ - - public ScheduleLifeCycleTest() throws IOException { - super(); - } - - @Autowired - private ScheduleService scheduleService; - - @Autowired - private AllEnrollments allEnrollments; - - @Test - public void name() { - List keys = new ArrayList(); -// Enrollment l2 = allEnrollments.getActiveEnrollment("4634", "hshdsd"); -// l2.toString(); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/ZiggyServiceTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/ZiggyServiceTest.java deleted file mode 100644 index 10b23942a9..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/ZiggyServiceTest.java +++ /dev/null @@ -1,93 +0,0 @@ -package org.opensrp.repository.it; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.IOException; - -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.service.formSubmission.handler.CustomFormSubmissionHandler; -import org.opensrp.service.formSubmission.handler.FormSubmissionRouter; -import org.opensrp.service.formSubmission.handler.HandlerMapper; -import org.opensrp.service.formSubmission.ziggy.EntityDataMap; -import org.opensrp.service.formSubmission.ziggy.ZiggyDataHandler; -import org.opensrp.service.formSubmission.ziggy.ZiggyFileLoader; -import org.opensrp.service.formSubmission.ziggy.ZiggyService; -import org.opensrp.util.TestResourceLoader; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import com.google.gson.Gson; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class ZiggyServiceTest extends TestResourceLoader{ - public ZiggyServiceTest() throws IOException { - super(); - } - - @Mock - private ZiggyDataHandler ziggyDataHandler; - @Autowired - private EntityDataMap edmap; - - @Autowired - @Value("#{opensrp['form.directory.name']}") - private String formFilePath; - - @Autowired - @Value("#{opensrp['js.directory.name']}") - private String jsDirectoryName; - - @Mock - private FormSubmissionService formSubmissionService; - - private ZiggyFileLoader ziggyFileLoader; - - @Mock - private HandlerMapper handlerMapper; - - @Before - public void setUp() throws Exception { - initMocks(this); - ziggyFileLoader = new ZiggyFileLoader(jsDirectoryName, formFilePath); - } - - @Test - public void test() throws Exception { - String params = "{\"instanceId\":\"88c0e824-10b4-44c2-9429-754b8d823776\", \"anmId\":\"demotest\", \"entityId\":\"a3f2abf4-2699-4761-819a-cea739224164\",\"formName\":\"new_household_registration\",\"clientVersion\":\"1430997074596\", \"serverVersion\": \"1430998001293\"}"; - FormSubmission fs = getFormSubmissionFor("new_household_registration",1); - String formInstance = new Gson().toJson(fs.instance()); - - when(formSubmissionService.findByInstanceId("88c0e824-10b4-44c2-9429-754b8d823776")).thenReturn(fs); - when(ziggyDataHandler.saveEntity(eq("household"), any(String.class))).thenReturn("a3f2abf4-2699-4761-819a-cea739224164"); - - handlerMapper = new HandlerMapper().addCustomFormSubmissionHandler("new_household_registration", - new CustomFormSubmissionHandler() { - @Override - public void handle(FormSubmission submission) { - System.out.println("CUSTOM FORM CALLED"); - assertEquals("new_household_registration", submission.formName()); - assertEquals("demotest", submission.anmId()); - assertEquals("a3f2abf4-2699-4761-819a-cea739224164", submission.entityId()); - assertEquals("household", submission.bindType()); - } - }); - - ZiggyService service = new ZiggyService(ziggyFileLoader, ziggyDataHandler, - new FormSubmissionRouter(formSubmissionService, handlerMapper) - ); - - service.saveForm(params, formInstance); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java deleted file mode 100644 index 750ab9ac62..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.opensrp.repository.lucene.it; - -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Arrays; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.dto.ActionData; -import org.opensrp.dto.AlertStatus; -import org.opensrp.repository.lucene.LuceneActionRepository; -import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.repository.couch.AllActions; -import org.springframework.beans.factory.annotation.Autowired; - -public class LuceneActionRepositoryTest extends BaseIntegrationTest { - - @Autowired - private AllActions allActions; - - @Autowired - private LuceneActionRepository luceneActionRepository; - - @Before - public void setUp() { - allActions.removeAll(); - } - - @After - public void cleanUp() { - //allActions.removeAll(); - } - - @Test - public void shouldFindByAllCriteria() { - ActionData actionData = ActionData - .createAlert("beneficiaryType", "scheduleName", "visitCode", AlertStatus.normal, EPOCH_DATE_TIME, - EPOCH_DATE_TIME); - Action expectedAction = new Action(BASE_ENTITY_ID, PROVIDER_ID, actionData); - Action expectedAction2 = new Action(DIFFERENT_BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID, actionData); - List expectedActions = Arrays.asList(expectedAction, expectedAction2); - addObjectToRepository(expectedActions, allActions); - - String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; - List actualActions = luceneActionRepository - .getByCriteria(teamIds, PROVIDER_ID, EPOCH_DATE_TIME.getMillis(), null, "desc", 100); - - assertTwoListAreSameIgnoringOrder(expectedActions, actualActions); - } - - //TODO: fix source - @Test(expected = NullPointerException.class) - public void throwExceptionIfNoSortOrderSpecified() { - ActionData actionData = ActionData - .createAlert("beneficiaryType", "scheduleName", "visitCode", AlertStatus.normal, EPOCH_DATE_TIME, - EPOCH_DATE_TIME); - Action expectedAction = new Action(BASE_ENTITY_ID, PROVIDER_ID, actionData); - Action expectedAction2 = new Action(DIFFERENT_BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID, actionData); - List expectedActions = Arrays.asList(expectedAction, expectedAction2); - addObjectToRepository(expectedActions, allActions); - - String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; - luceneActionRepository.getByCriteria(teamIds, PROVIDER_ID, EPOCH_DATE_TIME.getMillis(), null, null, 100); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionIfNoFilterAdded() { - luceneActionRepository.getByCriteria(null, null, null, null, null, 100); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java deleted file mode 100644 index c1a7bc5aa0..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ /dev/null @@ -1,433 +0,0 @@ -package org.opensrp.repository.lucene.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.common.AllConstants.BaseEntity.MOTHERS_INDENTIFIER; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.FEMALE; -import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; -import static org.opensrp.util.SampleFullDomainObject.attributes; -import static org.opensrp.util.SampleFullDomainObject.getAddress; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.ektorp.DbAccessException; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Address; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.lucene.LuceneClientRepository; -import org.opensrp.search.AddressSearchBean; -import org.opensrp.search.ClientSearchBean; -import org.springframework.beans.factory.annotation.Autowired; - -//TODO: test birthDate range -public class LuceneClientRepositoryTest extends BaseIntegrationTest { - - @Autowired - public AllClients allClients; - - @Autowired - LuceneClientRepository luceneClientRepository; - - @Before - public void setUp() { - allClients.removeAll(); - } - - @After - public void cleanUp() { - //allClients.removeAll(); - } - - @Test - public void shouldFindBasedOnFirstNameCriteria() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, null); - - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionIfNoCriteriaIsSelected() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository.getByCriteria(new ClientSearchBean(), null); - - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionWithOutClientBirthDateField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - luceneClientRepository.getByCriteria(clientSearchBean, null); - - } - - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionWithClientNullBirthDateField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setDateCreated(null); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - luceneClientRepository.getByCriteria(clientSearchBean, null); - - } - - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionWithOutClientDateCreatedField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - luceneClientRepository.getByCriteria(clientSearchBean, null); - - } - - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionWithClientNullDateCreatedField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setDateCreated(null); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - luceneClientRepository.getByCriteria(clientSearchBean, null); - - } - - @Test - public void shouldNotFindWithOutClientAddressField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); - - assertTrue(actualClients.isEmpty()); - } - - @Test - public void shouldNotFindWithClientNullAddressField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(null); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); - - assertTrue(actualClients.isEmpty()); - } - - @Test - public void shouldNotFindWithClientEmptyAddressField() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setAddresses(Collections.EMPTY_LIST); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); - - assertTrue(actualClients.isEmpty()); - } - - //TODO:Fix source - @Test - public void canNotSearchWithDeathDate() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setDeathdate(new DateTime(DateTimeZone.UTC)); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - clientSearchBean.setDeathdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setDeathdateTo(new DateTime(DateTimeZone.UTC)); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); - - assertEquals(0, actualClients.size()); - } - - @Test - public void shouldFindBasedOnAll() { - addRandomInvalidClient(); - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setAttributes(attributes); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime()); - clientSearchBean.setAttributeType(ATTRIBUTES_TYPE); - clientSearchBean.setAttributeValue(IDENTIFIER_VALUE); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - - AddressSearchBean addressSearchBean = new AddressSearchBean(); - addressSearchBean.setAddressType(getAddress().getAddressType()); - addressSearchBean.setCountry(getAddress().getCountry()); - addressSearchBean.setStateProvince(getAddress().getStateProvince()); - addressSearchBean.setCityVillage(getAddress().getCityVillage()); - addressSearchBean.setCountyDistrict(getAddress().getCountyDistrict()); - addressSearchBean.setSubDistrict(getAddress().getSubDistrict()); - addressSearchBean.setTown(getAddress().getTown()); - addressSearchBean.setSubTown(getAddress().getSubTown()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, addressSearchBean, null); - - assertEquals(1, actualClients.size()); - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test - public void shouldFindByWithOutAddressCriteria() { - addRandomInvalidClient(); - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setAttributes(attributes); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike(expectedClient.getFirstName()); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime()); - clientSearchBean.setAttributeType(ATTRIBUTES_TYPE); - clientSearchBean.setAttributeValue(IDENTIFIER_VALUE); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, null); - - assertEquals(1, actualClients.size()); - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test - public void shouldFindByWithOutNameAndGenderAndBirthDateAndDeathDateAndAttributes() { - addRandomInvalidClient(); - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setAttributes(attributes); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - AddressSearchBean addressSearchBean = new AddressSearchBean(); - addressSearchBean.setAddressType(getAddress().getAddressType()); - addressSearchBean.setCountry(getAddress().getCountry()); - addressSearchBean.setStateProvince(getAddress().getStateProvince()); - addressSearchBean.setCityVillage(getAddress().getCityVillage()); - addressSearchBean.setCountyDistrict(getAddress().getCountyDistrict()); - addressSearchBean.setSubDistrict(getAddress().getSubDistrict()); - addressSearchBean.setTown(getAddress().getTown()); - addressSearchBean.setSubTown(getAddress().getSubTown()); - - List actualClients = luceneClientRepository.getByCriteria(addressSearchBean, EPOCH_DATE_TIME, - new DateTime(DateTimeZone.UTC), null); - assertEquals(1, actualClients.size()); - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test - public void shouldFindByStringQuery() { - String query = "(firstName:\"firstName\"OR middleName:\"firstName\"OR lastName:\"firstName\")AND gender:female AND birthdate:[1970-01-01T00:00:00 TO 2017-08-30T10:29:01] AND lastEdited:[1970-01-01T00:00:00 TO 2017-08-30T04:29:01] AND attributesType:attributesValue AND addressType:addressType AND country:country AND stateProvince:stateProvince AND cityVillage:cityVillage AND countyDistrict:countryDistrict AND subDistrict:subDistrict AND town:town"; - addRandomInvalidClient(); - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setAttributes(attributes); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository.getByCriteria(query); - - assertEquals(1, actualClients.size()); - assertEquals(expectedClient, actualClients.get(0)); - } - - //TODO: Fix source - @Test(expected = DbAccessException.class) - public void throwExcetionMotherIdentifierInRelationship() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.addRelationship(MOTHERS_INDENTIFIER, IDENTIFIER_VALUE); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository.getByClientByMother(MOTHERS_INDENTIFIER, IDENTIFIER_VALUE); - assertEquals(0, actualClients.size()); - } - - @Test - public void shouldFindByBaseEntityFieldAndValue() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, - BASE_ENTITY_ID); - assertEquals(1, actualClients.size()); - assertEquals(expectedClient, actualClients.get(0)); - } - - @Test - public void shouldReturnEmptyForBaseEntityFieldAndValue() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - String value = null; - - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, value); - assertEquals(0, actualClients.size()); - } - - @Test - public void shouldFindByBaseEntityFieldAndValues() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - - Client expectedClient2 = new Client(DIFFERENT_BASE_ENTITY_ID); - expectedClient2.setFirstName(FIRST_NAME); - expectedClient2.setBirthdate(EPOCH_DATE_TIME); - expectedClient2.setAddresses(asList(getAddress())); - expectedClient2.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - - List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, - asList(BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID)); - assertEquals(2, actualClients.size()); - assertTwoListAreSameIgnoringOrder(asList(expectedClient, expectedClient2), actualClients); - } - - @Test - public void shouldReturnEmptyForNullOrEmptyValues() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - - Client expectedClient2 = new Client(DIFFERENT_BASE_ENTITY_ID); - expectedClient2.setFirstName(FIRST_NAME); - expectedClient2.setBirthdate(EPOCH_DATE_TIME); - expectedClient2.setAddresses(asList(getAddress())); - expectedClient2.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - - List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, - Collections.EMPTY_LIST); - assertEquals(0, actualClients.size()); - - List nullList = null; - actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, nullList); - assertEquals(0, actualClients.size()); - - } - - private void addRandomInvalidClient() { - for (int i = 0; i < 100; i++) { - Client client = new Client(BASE_ENTITY_ID + i); - client.setFirstName(FIRST_NAME + i); - client.setBirthdate(EPOCH_DATE_TIME); - client.setAddresses(asList(new Address())); - client.setDateCreated(EPOCH_DATE_TIME); - client.setGender(FEMALE); - client.setDateEdited(EPOCH_DATE_TIME); - client.setAttributes(attributes); - addObjectToRepository(Collections.singletonList(client), allClients); - } - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java deleted file mode 100644 index 6b8cd05148..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java +++ /dev/null @@ -1,260 +0,0 @@ -package org.opensrp.repository.lucene.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.ENTITY_TYPE; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.EVENT_TYPE; -import static org.opensrp.util.SampleFullDomainObject.LOCATION_ID; -import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.List; - -import org.ektorp.DbAccessException; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Event; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.repository.lucene.LuceneEventRepository; -import org.opensrp.search.EventSearchBean; -import org.springframework.beans.factory.annotation.Autowired; - -public class LuceneEventRepositoryTest extends BaseIntegrationTest { - - @Autowired - private AllEvents allEvents; - - @Autowired - private LuceneEventRepository luceneEventRepository; - - @Before - public void setUp() { - allEvents.removeAll(); - } - - @After - public void cleanUp() { - //allEvents.removeAll(); - } - - @Test - public void shouldFindByBaseEntityId() { - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - - addObjectToRepository(asList(expectedEvent), allEvents); - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); - List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean); - - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - } - - @Test(expected = DbAccessException.class) - public void shouldThrowExceptionIfEventDateCreatedFieldFound() { - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - - addObjectToRepository(asList(expectedEvent), allEvents); - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); - luceneEventRepository.getByCriteria(eventSearchBean); - - } - - @Test - public void shouldFindByAllCriteria() { - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - - addObjectToRepository(asList(expectedEvent), allEvents); - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); - eventSearchBean.setEventDateFrom(EPOCH_DATE_TIME); - eventSearchBean.setEventDateTo(new DateTime(DateTimeZone.UTC)); - eventSearchBean.setEntityType(expectedEvent.getEventType()); - eventSearchBean.setEntityType(expectedEvent.getEntityType()); - eventSearchBean.setProviderId(expectedEvent.getProviderId()); - eventSearchBean.setLocationId(expectedEvent.getLocationId()); - eventSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - eventSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - - List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean); - - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionWithNoCriteriaWithTeamIds() { - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - - addObjectToRepository(asList(expectedEvent), allEvents); - - luceneEventRepository.getByCriteria(new EventSearchBean()); - } - - @Test - public void shouldFindByAllCriteriaWithTeamId() { - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - - Event expectedEvent2 = new Event(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedEvent2.setDateCreated(EPOCH_DATE_TIME); - expectedEvent2.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent2.setEventType(EVENT_TYPE); - expectedEvent2.setEntityType(ENTITY_TYPE); - expectedEvent2.setProviderId(DIFFERENT_BASE_ENTITY_ID); - expectedEvent2.setLocationId(LOCATION_ID); - expectedEvent2.setDateEdited(new DateTime(DateTimeZone.UTC)); - - addObjectToRepository(asList(expectedEvent, expectedEvent2), allEvents); - - String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; - String baseEntityIds = BASE_ENTITY_ID + "," + DIFFERENT_BASE_ENTITY_ID; - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId(baseEntityIds); - eventSearchBean.setProviderId(teamIds); - eventSearchBean.setLocationId(LOCATION_ID); - eventSearchBean.setServerVersion(EPOCH_DATE_TIME.getMillis()); - List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean, null, "desc", 100); - - assertTwoListAreSameIgnoringOrder(asList(expectedEvent, expectedEvent2), actualEvents); - } - - //TODO: fix source - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionFindByCriteriaWithTeamIdWithOutSortOrder() { - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - - Event expectedEvent2 = new Event(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedEvent2.setDateCreated(EPOCH_DATE_TIME); - expectedEvent2.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent2.setEventType(EVENT_TYPE); - expectedEvent2.setEntityType(ENTITY_TYPE); - expectedEvent2.setProviderId(DIFFERENT_BASE_ENTITY_ID); - expectedEvent2.setLocationId(LOCATION_ID); - expectedEvent2.setDateEdited(new DateTime(DateTimeZone.UTC)); - - addObjectToRepository(asList(expectedEvent, expectedEvent2), allEvents); - - String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; - String baseEntityIds = BASE_ENTITY_ID + "," + DIFFERENT_BASE_ENTITY_ID; - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId(baseEntityIds); - eventSearchBean.setProviderId(teamIds); - eventSearchBean.setLocationId(LOCATION_ID); - eventSearchBean.setServerVersion(EPOCH_DATE_TIME.getMillis()); - - List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean, null, null, 100); - - assertTwoListAreSameIgnoringOrder(asList(expectedEvent, expectedEvent2), actualEvents); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionWithNoCriteria() { - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(new DateTime(DateTimeZone.UTC)); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - - addObjectToRepository(asList(expectedEvent), allEvents); - - luceneEventRepository.getByCriteria(new EventSearchBean(), null, null, 0); - } - - @Test - public void shouldFindByStringQuery() { - String query = "eventDate:[1970-01-01T00:00:00 TO 3017-08-30T08:12:38] AND lastEdited:[1970-01-01T00:00:00 TO 3017-08-30T08:12:38] AND baseEntityId:baseEntityId AND eventType:eventType AND entityType:entityType AND providerId:providerId AND locationId:locationId"; - addRandomInvalidEvents(); - Event expectedEvent = new Event(); - expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - expectedEvent.setDateCreated(EPOCH_DATE_TIME); - expectedEvent.setEventDate(EPOCH_DATE_TIME); - expectedEvent.setEventType(EVENT_TYPE); - expectedEvent.setEntityType(ENTITY_TYPE); - expectedEvent.setProviderId(PROVIDER_ID); - expectedEvent.setLocationId(LOCATION_ID); - expectedEvent.setDateEdited(EPOCH_DATE_TIME); - - addObjectToRepository(asList(expectedEvent), allEvents); - - List actualEvents = luceneEventRepository.getByCriteria(query); - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - - } - - private void addRandomInvalidEvents() { - for (int i = 0; i < 100; i++) { - Event event = new Event(); - event.setBaseEntityId(BASE_ENTITY_ID + i); - event.setDateCreated(EPOCH_DATE_TIME); - event.setEventDate(new DateTime(DateTimeZone.UTC)); - event.setEventType(EVENT_TYPE + i); - event.setEntityType(ENTITY_TYPE + i); - event.setProviderId(PROVIDER_ID + i); - event.setLocationId(LOCATION_ID + i); - event.setDateEdited(new DateTime(DateTimeZone.UTC)); - allEvents.add(event); - } - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java deleted file mode 100644 index e9bcc730ba..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java +++ /dev/null @@ -1,160 +0,0 @@ -package org.opensrp.repository.lucene.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.LOCATION_ID; -import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; -import static org.opensrp.util.SampleFullDomainObject.REPORT_TYPE; -import static org.opensrp.util.SampleFullDomainObject.getReport; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.ektorp.DbAccessException; -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Report; -import org.opensrp.repository.couch.AllReports; -import org.opensrp.repository.lucene.LuceneReportRepository; -import org.springframework.beans.factory.annotation.Autowired; - -public class LuceneReportRepositoryTest extends BaseIntegrationTest { - - @Autowired - public AllReports allReports; - - @Autowired - public LuceneReportRepository luceneReportRepository; - - @Before - public void setUp() { - allReports.removeAll(); - } - - @After - public void cleanUp() { - //allReports.removeAll(); - } - - @Test - public void shouldSearchUsingAllCriteria() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - - List actualReports = luceneReportRepository - .getByCriteria(BASE_ENTITY_ID, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), REPORT_TYPE, PROVIDER_ID, - LOCATION_ID, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC)); - - assertEquals(1, actualReports.size()); - assertEquals(expectedReport, actualReports.get(0)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionIfNoParameterSpecified() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - - luceneReportRepository.getByCriteria(null, null, null, null, null, null, null, null); - } - - @Test - public void findByAllCriteriaV2() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - expectedReport.setServerVersion(EPOCH_DATE_TIME.getMillis()); - - Report expectedReport2 = getReport(); - expectedReport2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedReport2.setDateCreated(EPOCH_DATE_TIME); - expectedReport2.setDateEdited(EPOCH_DATE_TIME); - expectedReport2.setServerVersion(EPOCH_DATE_TIME.getMillis()); - - Report expectedReport3 = getReport(); - expectedReport3.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedReport3.setDateCreated(EPOCH_DATE_TIME); - expectedReport3.setDateEdited(EPOCH_DATE_TIME); - expectedReport3.setProviderId(DIFFERENT_BASE_ENTITY_ID); - expectedReport3.setServerVersion(EPOCH_DATE_TIME.getMillis()); - List expectedReports = asList(expectedReport, expectedReport2, expectedReport3); - addObjectToRepository(expectedReports, allReports); - - String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; - String baseEntityIds = BASE_ENTITY_ID + "," + DIFFERENT_BASE_ENTITY_ID; - List actualReports = luceneReportRepository - .getByCriteria(teamIds, PROVIDER_ID, LOCATION_ID, baseEntityIds, EPOCH_DATE_TIME.getMillis(), null, "DESC", - 100); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test(expected = NullPointerException.class) - public void shouldThrowExceptionIfSortOrderNotSpecifiedInV2() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - luceneReportRepository - .getByCriteria(null, PROVIDER_ID, LOCATION_ID, BASE_ENTITY_ID, EPOCH_DATE_TIME.getMillis(), null, null, 100); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowExceptionIfNoQueryParameterSpecifiedInV2() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - luceneReportRepository.getByCriteria(null, null, null, null, null, null, null, 100); - } - - @Test - public void shouldFindByStringQuery() { - Report expectedReport = getReport(); - expectedReport.setDateCreated(EPOCH_DATE_TIME); - expectedReport.setDateEdited(EPOCH_DATE_TIME); - expectedReport.setServerVersion(EPOCH_DATE_TIME.getMillis()); - - Report expectedReport2 = getReport(); - expectedReport2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedReport2.setDateCreated(EPOCH_DATE_TIME); - expectedReport2.setDateEdited(EPOCH_DATE_TIME); - expectedReport2.setServerVersion(EPOCH_DATE_TIME.getMillis()); - - Report expectedReport3 = getReport(); - expectedReport3.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedReport3.setDateCreated(EPOCH_DATE_TIME); - expectedReport3.setDateEdited(EPOCH_DATE_TIME); - expectedReport3.setProviderId(DIFFERENT_BASE_ENTITY_ID); - expectedReport3.setServerVersion(EPOCH_DATE_TIME.getMillis()); - List expectedReports = asList(expectedReport, expectedReport2, expectedReport3); - addObjectToRepository(expectedReports, allReports); - - String query = "serverVersion:[0 TO 9223372036854775807]AND providerId:(providerId OR differentBaseEntityId)AND locationId:locationId AND (baseEntityId:(baseEntityId OR differentBaseEntityId))"; - List actualReports = luceneReportRepository.getByCriteria(query); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test(expected = DbAccessException.class) - public void shouldThrowExceptionIfDateCreatedFileNotPresent() { - Report expectedReport = new Report(); - expectedReport.setBaseEntityId(BASE_ENTITY_ID); - - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - - luceneReportRepository.getByCriteria(BASE_ENTITY_ID, null, null, null, null, null, null, null); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java deleted file mode 100644 index b7035def95..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java +++ /dev/null @@ -1,170 +0,0 @@ -package org.opensrp.repository.lucene.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.FEMALE; -import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; -import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; -import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; -import static org.opensrp.util.SampleFullDomainObject.attributes; -import static org.opensrp.util.SampleFullDomainObject.getAddress; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.lucene.LuceneSearchRepository; -import org.opensrp.search.ClientSearchBean; -import org.springframework.beans.factory.annotation.Autowired; - -public class LuceneSearchRepositoryTest extends BaseIntegrationTest { - - @Autowired - public AllClients allClients; - - @Autowired - public LuceneSearchRepository luceneSearchRepository; - - @Before - public void setUp() { - allClients.removeAll(); - } - - @After - public void cleanUp() { - allClients.removeAll(); - } - - @Test - public void shouldSearchByAllCriteria() { - Client expectedClient = createExpectedClient(); - expectedClient.setAttributes(attributes); - Client expectedClient2 = createExpectedClient(); - expectedClient2.addAttribute("inactive", true); - Client expectedClient3 = createExpectedClient(); - expectedClient3.addAttribute("lost_to_follow_up", true); - Client expectedClient4 = createExpectedClient(); - expectedClient4.addAttribute("inactive", false); - List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); - addObjectToRepository(expectedClients, allClients); - - Map queryAttributes = new HashMap<>(); - queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); - queryAttributes.put("inactive", "true"); - queryAttributes.put("inactive", "false"); - queryAttributes.put("lost_to_follow_up", "true"); - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike("first"); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); - - assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); - } - - @Test - public void canNotSearchWithIdentifiers() { - Client expectedClient = createExpectedClient(); - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike("first"); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); - clientSearchBean.setIdentifiers(identifier); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); - assertEquals(0, actualClients.size()); - } - - @Test - public void canNotSearchWithAttributes() { - Client expectedClient = createExpectedClient(); - expectedClient.setAttributes(attributes); - Client expectedClient2 = createExpectedClient(); - expectedClient2.addAttribute("inactive", true); - Client expectedClient3 = createExpectedClient(); - expectedClient3.addAttribute("lost_to_follow_up", true); - Client expectedClient4 = createExpectedClient(); - expectedClient4.addAttribute("inactive", false); - List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); - addObjectToRepository(expectedClients, allClients); - - Map queryAttributes = new HashMap<>(); - queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); - queryAttributes.put("inactive", "true"); - queryAttributes.put("inactive", "false"); - queryAttributes.put("lost_to_follow_up", "true"); - - - ClientSearchBean clientSearchBean = new ClientSearchBean(); - clientSearchBean.setNameLike("first"); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); - clientSearchBean.setAttributes(queryAttributes); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - - List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); - assertEquals(0, actualClients.size()); - } - - @Test - public void shouldSearchWithStringQuery() { - Client expectedClient = createExpectedClient(); - expectedClient.setAttributes(attributes); - Client expectedClient2 = createExpectedClient(); - expectedClient2.addAttribute("inactive", true); - Client expectedClient3 = createExpectedClient(); - expectedClient3.addAttribute("lost_to_follow_up", true); - Client expectedClient4 = createExpectedClient(); - expectedClient4.addAttribute("inactive", false); - List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); - addObjectToRepository(expectedClients, allClients); - - Map queryAttributes = new HashMap<>(); - queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); - queryAttributes.put("inactive", "true"); - queryAttributes.put("inactive", "false"); - queryAttributes.put("lost_to_follow_up", "true"); - - String query = "(firstName:first* OR middleName:first* OR lastName:first* )AND firstName:first* AND middleName:middle* AND lastName:last* AND gender:female AND birthdate:[1970-01-01T00:00:00 TO 2017-09-07T10:12:18] AND lastEdited:[1970-01-01T00:00:00 TO 2017-09-07T10:12:18]"; - List actualClients = luceneSearchRepository.getByCriteria(query); - - assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); - } - - private Client createExpectedClient() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setMiddleName(MIDDLE_NAME); - expectedClient.setLastName(LAST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setIdentifiers(identifier); - return expectedClient; - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java deleted file mode 100644 index ef38197d47..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java +++ /dev/null @@ -1,250 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.junit.Test; -import org.opensrp.dto.ActionData; -import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.repository.ActionsRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ActionsRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("actionsRepositoryPostgres") - private ActionsRepository actionsRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("action.sql"); - return scripts; - } - - @Test - public void testGet() { - Action action = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); - assertEquals(6, action.data().size()); - assertEquals("PENTA 1", action.data().get("scheduleName")); - assertEquals("2018-02-22", action.data().get("startDate")); - assertEquals("aabcd2cc-c111-41c6-85e6-cb5d9e350d08", action.baseEntityId()); - - //missing action - assertNull(actionsRepository.get("05934ae338431f28bf6793b241")); - } - - @Test - public void testAdd() { - Action action = new Action("bshjfsdf-sdfsd9-4243-ssf", "tester", ActionData.markAlertAsClosed("BCG", "2018-02-23")); - actionsRepository.add(action); - assertEquals(35, actionsRepository.getAll().size()); - - action = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-4243-ssf", 0l).get(0); - assertEquals("BCG", action.data().get("visitCode")); - assertEquals("2018-02-23", action.data().get("completionDate")); - assertEquals("closeAlert", action.getActionType()); - - } - - @Test - public void testUpdate() { - Action action = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); - action.getDetails().put("Key11", "Baby123"); - String today = new LocalDate().toString(); - action.data().put("expiryDate", today); - - actionsRepository.update(action); - - Action updatedAction = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); - assertEquals("Baby123", updatedAction.getDetails().get("Key11")); - assertEquals(today, updatedAction.data().get("expiryDate")); - - } - - @Test - public void testGetAll() { - assertEquals(34, actionsRepository.getAll().size()); - - actionsRepository.safeRemove(actionsRepository.get("05934ae338431f28bf6793b2417c98f9")); - - List actions = actionsRepository.getAll(); - assertEquals(33, actions.size()); - - List ids = Arrays.asList("05934ae338431f28bf6793b241645f1f", "05934ae338431f28bf6793b24164a5d7", - "05934ae338431f28bf6793b2417c5aae"); - int found = 0; - for (Action act : actions) { - assertNotEquals("05934ae338431f28bf6793b2417c98f9", act.getId()); - if (ids.contains(act.getId())) - found++; - } - assertEquals(3, found); - - } - - @Test - public void testSafeRemove() { - - Action action = actionsRepository.get("05934ae338431f28bf6793b2417c7d94"); - actionsRepository.safeRemove(action); - - List actions = actionsRepository.getAll(); - assertEquals(33, actions.size()); - - for (Action act : actions) { - assertNotEquals("05934ae338431f28bf6793b2417c7d94", act.getId()); - } - - assertNull(actionsRepository.get("05934ae338431f28bf6793b2417c7d94")); - } - - @Test - public void testFindByProviderIdAndTimeStamp() { - assertEquals(34, actionsRepository.findByProviderIdAndTimeStamp("biddemo", 0l).size()); - - assertEquals(24, actionsRepository.findByProviderIdAndTimeStamp("biddemo", 1520932703825l).size()); - - List actions = actionsRepository.findByProviderIdAndTimeStamp("biddemo", 1520978414513l); - assertEquals(1, actions.size()); - assertEquals("05934ae338431f28bf6793b2417da475", actions.get(0).getId()); - - assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddeo", 0l).isEmpty()); - - assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddemo", System.currentTimeMillis()).isEmpty()); - } - - @Test - public void findAlertByANMIdEntityIdScheduleName() { - List actions = actionsRepository.findAlertByANMIdEntityIdScheduleName("biddemo", - "b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG"); - assertEquals(1, actions.size()); - assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); - assertEquals("2018-01-11", actions.get(0).data().get("startDate")); - assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); - - assertTrue(actionsRepository - .findAlertByANMIdEntityIdScheduleName("biddemo", "b06e0847-0d68-4f5c-9288-58bc394fe052", "OPV 2").isEmpty()); - } - - @Test - public void testFindByCaseIdScheduleAndTimeStamp() { - List actions = actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", - "BCG", new DateTime("2018-03-13"), new DateTime()); - assertEquals(1, actions.size()); - assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); - assertEquals("2018-01-11", actions.get(0).data().get("startDate")); - assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); - - assertTrue(actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG", - new DateTime("2018-03-20"), new DateTime()).isEmpty()); - } - - @Test - public void testFindByCaseIdAndTimeStamp() { - List actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", - new DateTime("2018-03-13").getMillis()); - assertEquals(5, actions.size()); - - actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", 1520978414514l); - assertEquals("05934ae338431f28bf6793b2417da475", actions.get(0).getId()); - assertEquals("2018-02-22", actions.get(0).data().get("startDate")); - assertEquals("pcv1", actions.get(0).data().get("visitCode")); - - assertTrue(actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG", - new DateTime("2018-03-20"), new DateTime()).isEmpty()); - } - - @Test - public void testDeleteAllByTarget() { - actionsRepository.deleteAllByTarget("alert"); - assertTrue(actionsRepository.getAll().isEmpty()); - } - - @Test - public void testMarkAllAsInActiveFor() { - actionsRepository.markAllAsInActiveFor("b06e0847-0d68-4f5c-9288-58bc394fe052"); - List actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", 0l); - for (Action action : actions) - assertFalse(action.getIsActionActive()); - } - - @Test - public void testAddOrUpdateAlert() { - Action action = new Action("bshjfsdf-sdfsd9-42642-ssf", "tester1", - ActionData.markAlertAsClosed("OPV 1", "2018-03-23")); - actionsRepository.addOrUpdateAlert(action); - assertEquals(35, actionsRepository.getAll().size()); - - action = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-42642-ssf", 0l).get(0); - assertEquals("OPV 1", action.data().get("visitCode")); - assertEquals("2018-03-23", action.data().get("completionDate")); - assertEquals("closeAlert", action.getActionType()); - - action.getDetails().put("tag", "1234"); - String today = new LocalDate().toString(); - action.data().put("expiryDate", today); - - actionsRepository.addOrUpdateAlert(action); - - assertEquals(35, actionsRepository.getAll().size()); - Action updatedAction = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-42642-ssf", 0l).get(0); - assertEquals("1234", updatedAction.getDetails().get("tag")); - assertEquals(today, updatedAction.data().get("expiryDate")); - - } - - @Test - public void testMarkAlertAsInactiveFor() { - String provider = "biddemo"; - String entityId = "b06e0847-0d68-4f5c-9288-58bc394fe052"; - String schedule = "BCG"; - actionsRepository.markAlertAsInactiveFor(provider, entityId, schedule); - List actions = actionsRepository.findAlertByANMIdEntityIdScheduleName(provider, entityId, schedule); - for (Action action : actions) - assertFalse(action.getIsActionActive()); - } - - @Test - public void testFindByCriteria() { - - long now = System.currentTimeMillis(); - Action action = new Action("bshdsf989-32hjh-d9-42642-ssf", "tester1", - ActionData.markAlertAsClosed("OPV 2", "2018-04-23")); - actionsRepository.addOrUpdateAlert(action); - - assertEquals(34, actionsRepository.findByCriteria(null, "biddemo", 0, null, null, 50).size()); - - assertEquals(35, actionsRepository.findByCriteria("biddemo,tester1", "biddemo", 0, null, null, 50).size()); - - assertEquals(35, actionsRepository.findByCriteria("biddemo,tester1", null, 0, null, null, 50).size()); - - assertEquals(5, actionsRepository.findByCriteria("biddemo,tester1", null, 0, "server_version", "desc", 5).size()); - - List actions = actionsRepository.findByCriteria("biddemo,tester1", null, now, null, null, 50); - assertEquals(1, actions.size()); - - assertEquals("bshdsf989-32hjh-d9-42642-ssf", actions.get(0).baseEntityId()); - assertEquals("OPV 2", actions.get(0).data().get("visitCode")); - assertEquals("2018-04-23", actions.get(0).data().get("completionDate")); - } - - @Test - public void testFindAllActionNotExpired() { - List actions = actionsRepository.findAllActionNotExpired(); - assertEquals(1, actions.size()); - assertEquals("05934ae338431f28bf6793b2417dba2d", actions.get(0).getId()); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java deleted file mode 100644 index d6e6bc69a2..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java +++ /dev/null @@ -1,321 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.dto.AlertStatus; -import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.Alert.AlertType; -import org.opensrp.scheduler.Alert.TriggerType; -import org.opensrp.scheduler.repository.AlertsRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class AlertsRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("alertsRepositoryPostgres") - private AlertsRepository alertsRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("alert.sql"); - return scripts; - } - - @Test - public void testGet() { - Alert alert = alertsRepository.get("170c64f5-a187-4c90-b76d-09ff14d5e280"); - assertEquals("06e4d8c0-f3ff-458c-8141-53d199355c7a", alert.entityId()); - assertEquals("PCV 3", alert.getTriggerName()); - assertEquals(1521756016156l, alert.timestamp()); - - assertNull(alertsRepository.get("170c64f5-nbnsd8-sdfds-234-09ff14d5e280")); - } - - @Test - public void testAdd() { - Alert alert = new Alert("tester1", "ssdf-mn878-jsdjsd-kn", "child", AlertType.notification, TriggerType.schedule, - "BCG 2", "b2g2", new DateTime("2017-08-22"), new DateTime("2018-02-22"), AlertStatus.normal, null); - alertsRepository.add(alert); - assertEquals(16, alertsRepository.getAll().size()); - Alert savedAlert = alertsRepository.findActiveAlertByEntityId("ssdf-mn878-jsdjsd-kn").get(0); - assertEquals("2017-08-22", savedAlert.startDate()); - assertEquals("2018-02-22", savedAlert.expiryDate()); - } - - @Test - public void testUpdate() { - Alert alert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); - alert.setClosingPeriod("closingPresiod"); - alert.setDateClosed("2017-09-18"); - alert.setReasonClosed("Test closing"); - long timeStamp = System.currentTimeMillis(); - alert.setTimeStamp(timeStamp); - - alertsRepository.update(alert); - - Alert updatedAlert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); - assertEquals("closingPresiod", updatedAlert.closingPeriod()); - assertEquals("2017-09-18", updatedAlert.getDateClosed()); - assertEquals("Test closing", updatedAlert.getReasonClosed()); - assertEquals(timeStamp, updatedAlert.timestamp()); - } - - @Test - public void testGetAll() { - assertEquals(15, alertsRepository.getAll().size()); - - alertsRepository.safeRemove(alertsRepository.get("f210392d-2905-458a-8301-5a7fb844c448")); - - List alerts = alertsRepository.getAll(); - assertEquals(14, alerts.size()); - - for (Alert alert : alerts) - assertNotEquals("f210392d-2905-458a-8301-5a7fb844c448", alert.getId()); - } - - @Test - public void testSafeRemove() { - Alert alert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); - alertsRepository.safeRemove(alert); - assertEquals(14, alertsRepository.getAll().size()); - - assertTrue(alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").isEmpty()); - - for (Alert alert_ : alertsRepository.getAll()) - assertNotEquals("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", alert_.entityId()); - } - - @Test - public void testFindByProviderAndTimestamp() { - assertEquals(8, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); - - assertEquals(4, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1521842403899l).size()); - - List alerts = alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1522188003908l); - - assertEquals(1, alerts.size()); - assertEquals("01741058-588c-4105-b2e4-6e5ae47f4880", alerts.get(0).getId()); - - assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); - - assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); - } - - @Test - public void testFindActiveByProviderAndTimestamp() { - assertEquals(8, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); - - alertsRepository.markAllAsClosedFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "testing"); - - assertEquals(3, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); - - List alerts = alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1520978414377l); - assertEquals(2, alerts.size()); - for (Alert alert : alerts) { - assertTrue(alert.getTimeStamp() > 1520978414377l); - assertEquals("biddemo", alert.providerId()); - } - - assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); - - assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); - - } - - @Test - public void testFindAlertByProviderEntityIdTriggerName() { - - List alerts = alertsRepository.findAlertByProviderEntityIdTriggerName("biddemo", - "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1"); - assertEquals(1, alerts.size()); - assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); - - alerts = alertsRepository.findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", - "PENTA 2"); - assertEquals(1, alerts.size()); - assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); - - assertTrue(alertsRepository - .findAlertByProviderEntityIdTriggerName("biddemo1", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - assertTrue(alertsRepository - .findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2").isEmpty()); - assertTrue(alertsRepository - .findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG").isEmpty()); - } - - @Test - public void testFindActiveAlertByProviderEntityIdTriggerName() { - List alerts = alertsRepository.findActiveAlertByProviderEntityIdTriggerName("biddemo", - "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1"); - assertEquals(1, alerts.size()); - assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); - - alerts = alertsRepository.findActiveAlertByProviderEntityIdTriggerName("biddemo", - "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2"); - assertEquals(1, alerts.size()); - assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); - - alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-31"); - - assertTrue(alertsRepository - .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - assertTrue(alertsRepository - .findActiveAlertByProviderEntityIdTriggerName("biddemo1", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - assertTrue(alertsRepository - .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - assertTrue(alertsRepository - .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG") - .isEmpty()); - } - - @Test - public void testFindActiveAlertByEntityIdTriggerName() { - List alerts = alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", - "PCV 1"); - assertEquals(1, alerts.size()); - assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); - - alerts = alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2"); - assertEquals(1, alerts.size()); - assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); - - alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-31"); - - assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - assertTrue( - alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2").isEmpty()); - assertTrue( - alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG").isEmpty()); - } - - @Test - public void testFindActiveAlertByEntityId() { - List alerts = alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a"); - assertEquals(3, alerts.size()); - - for (Alert alert : alerts) { - assertEquals("06e4d8c0-f3ff-458c-8141-53d199355c7a", alert.entityId()); - assertTrue(alert.isActive()); - } - - alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "testing"); - - assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").isEmpty()); - - assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-453kk-kjj1-53d199355c7a").isEmpty()); - } - - @Test - public void testFindByEntityIdTriggerAndTimeStamp() { - List alerts = alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", - "PCV 1", new DateTime(0), new DateTime()); - assertEquals(1, alerts.size()); - assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); - - alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1", "2018-03-31"); - - assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1") - .isEmpty()); - - assertTrue(alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1", - new DateTime(1521842403913l), new DateTime()).isEmpty()); - assertTrue(alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG", - new DateTime(1521842403913l), new DateTime()).isEmpty()); - - } - - @Test - public void testMarkAllAsClosedFor() { - alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi"); - assertFalse(alertsRepository.get("89bcc696-9491-4b03-8064-d7752b0cb12a").isActive()); - assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").isEmpty()); - } - - @Test - public void testMarkAlertAsClosedFor() { - alertsRepository.markAlertAsClosedFor("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", - "Testing Close!!"); - - assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); - assertEquals(false, alert.isActive()); - assertEquals("Testing Close!!", alert.getReasonClosed()); - assertEquals(AlertStatus.closed.name(), alert.getAlertStatus()); - } - - @Test - public void testMarkAlertAsCompleteFor() { - alertsRepository.markAlertAsCompleteFor("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-27"); - - assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); - assertEquals(false, alert.isActive()); - assertEquals("2018-03-27", alert.getDateComplete()); - assertEquals(AlertStatus.complete.name(), alert.getAlertStatus()); - } - - @Test - public void testMarkAlertAsCompleteForWithoutProvider() { - alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-27"); - - assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") - .isEmpty()); - - Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); - assertEquals(false, alert.isActive()); - assertEquals("2018-03-27", alert.getDateComplete()); - assertEquals(AlertStatus.complete.name(), alert.getAlertStatus()); - } - - @Test - public void testAddOrUpdateScheduleNotificationAlert() { - //test update - alertsRepository.addOrUpdateScheduleNotificationAlert("vaccination", "06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi", - "OPV 3", "opv3", AlertStatus.upcoming, new DateTime("2018-04-28"), new DateTime("2021-02-19")); - - Alert alert = alertsRepository.findActiveAlertByEntityIdTriggerName("06e4d8c0-f3ff-458c-8141-53d199355c7a", "OPV 3") - .get(0); - assertEquals(new DateTime("2018-04-28").toString(), alert.getStartDate()); - assertEquals(new DateTime("2021-02-19").toString(), alert.getExpiryDate()); - assertEquals(AlertStatus.upcoming.name(), alert.getAlertStatus()); - - assertEquals(15, alertsRepository.getAll().size()); - - //test add - alertsRepository.addOrUpdateScheduleNotificationAlert("vaccination", "06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi", - "OPV 4", "opv4", AlertStatus.urgent, new DateTime("2017-01-21"), new DateTime("2020-05-09")); - - alert = alertsRepository.findActiveAlertByEntityIdTriggerName("06e4d8c0-f3ff-458c-8141-53d199355c7a", "OPV 4") - .get(0); - assertEquals("2017-01-21", alert.getStartDate()); - assertEquals("2020-05-09", alert.getExpiryDate()); - assertEquals(AlertStatus.urgent.name(), alert.getAlertStatus()); - - assertEquals(16, alertsRepository.getAll().size()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java deleted file mode 100644 index ba0e862149..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.Test; -import org.opensrp.domain.AppStateToken; -import org.opensrp.repository.AppStateTokensRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class AppStateTokensRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("appStateTokensRepositoryPostgres") - private AppStateTokensRepository appStateTokensRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("app_state_token.sql"); - return scripts; - } - - @Test - public void testGet() { - AppStateToken token = appStateTokensRepository.get("1"); - assertEquals("sync_schedule_tracker_by_last_update_enrollment", token.getName()); - assertEquals("34343", token.getValue().toString()); - assertEquals("ScheduleTracker token to keep track of enrollment", token.getDescription()); - assertEquals(1521017416, token.getLastEditDate()); - //Try to find non-exist token - assertNull(appStateTokensRepository.get("10")); - } - - @Test - public void testGetAll() { - List tokens = appStateTokensRepository.getAll(); - assertEquals(5, tokens.size()); - - appStateTokensRepository.safeRemove(appStateTokensRepository.findByName("sync_event_by_date_updated").get(0)); - - tokens = appStateTokensRepository.getAll(); - assertEquals(4, tokens.size()); - for (AppStateToken token : tokens) - assertNotEquals("sync_event_by_date_updated", token.getName()); - } - - @Test - public void testFindByName() { - List tokens = appStateTokensRepository.findByName("sync_event_by_date_updated"); - assertEquals(1, tokens.size()); - assertEquals("343232", tokens.get(0).getValue()); - assertEquals(1521017416, tokens.get(0).getLastEditDate()); - //Try to find non-exist token - assertTrue(appStateTokensRepository.findByName("sync_client_non_existent").isEmpty()); - } - - @Test - public void testSafeRemove() { - appStateTokensRepository.safeRemove(appStateTokensRepository.findByName("sync_event_by_date_voided").get(0)); - assertTrue(appStateTokensRepository.findByName("sync_event_by_date_voided").isEmpty()); - List tokens = appStateTokensRepository.getAll(); - assertEquals(4, tokens.size()); - for (AppStateToken token : tokens) - assertNotEquals("sync_event_by_date_voided", token.getName()); - } - - @Test - public void testUpdate() { - AppStateToken token = new AppStateToken("sync_event_by_date_updated", "4564353453434", 1521019916); - appStateTokensRepository.update(token); - - AppStateToken updatedToken = appStateTokensRepository.findByName("sync_event_by_date_updated").get(0); - - assertEquals("4564353453434", updatedToken.getValue()); - assertEquals(1521019916, updatedToken.getLastEditDate()); - - } - - @Test - public void testAdd() { - AppStateToken token = new AppStateToken("sync_apptoken_custom", "45643534MKHT", 15210234516l, - "Custom Test App Token"); - appStateTokensRepository.add(token); - - AppStateToken savedToken = appStateTokensRepository.findByName("sync_apptoken_custom").get(0); - - assertEquals("45643534MKHT", savedToken.getValue()); - assertEquals(15210234516l, savedToken.getLastEditDate()); - assertEquals("Custom Test App Token", savedToken.getDescription()); - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java deleted file mode 100644 index b8d0ce3558..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.opensrp.repository.postgres; - -import java.sql.Connection; -import java.sql.SQLException; -import java.util.Set; - -import javax.sql.DataSource; - -import org.junit.Before; -import org.junit.runner.RunWith; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.ClassPathResource; -import org.springframework.jdbc.datasource.DataSourceUtils; -import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public abstract class BaseRepositoryTest { - - private static String TEST_SCRIPTS_ROOT_DIRECTORY = "test-scripts/"; - - @Autowired - private DataSource openSRPDataSource; - - /** - * Populates the configured {@link DataSource} with data from passed scripts - * - * @param the scripts to load - * @throws SQLException - */ - - @Before - public void populateDatabase() throws SQLException { - if (getDatabaseScripts() == null || getDatabaseScripts().isEmpty()) - return; - ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); - for (String script : getDatabaseScripts()) { - populator.addScript(new ClassPathResource(TEST_SCRIPTS_ROOT_DIRECTORY + script)); - } - - Connection connection = null; - - try { - connection = DataSourceUtils.getConnection(openSRPDataSource); - populator.populate(connection); - } - finally { - if (connection != null) { - DataSourceUtils.releaseConnection(connection, openSRPDataSource); - } - } - } - - protected abstract Set getDatabaseScripts(); -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java deleted file mode 100644 index 584d1119f3..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ /dev/null @@ -1,500 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.opensrp.common.AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; - -import java.util.Arrays; -import java.util.Calendar; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.domain.Client; -import org.opensrp.repository.ClientsRepository; -import org.opensrp.search.AddressSearchBean; -import org.opensrp.search.ClientSearchBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ClientsRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("clientsRepositoryPostgres") - private ClientsRepository clientsRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("client.sql"); - return scripts; - } - - @Test - public void testGet() { - Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); - assertEquals("469597f0-eefe-4171-afef-f7234cbb2859", client.getBaseEntityId()); - assertEquals("eb4b258c-7558-436c-a1fe-e91d9e12f849", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - assertEquals("January", client.getFirstName().trim()); - assertEquals("Babysix", client.getLastName()); - assertEquals("05934ae338431f28bf6793b2416946b7",client.getId()); - //missing client - assertNull(clientsRepository.get("05934ae338bf6793b2416946b7")); - - //test deleted client - clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); - assertNull(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); - } - - @Test - public void testAdd() { - Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) - .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); - client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); - clientsRepository.add(client); - assertEquals(16, clientsRepository.getAll().size()); - - Client savedClient = clientsRepository.findByBaseEntityId("f67823b0-378e-4a35-93fc-bb00def74e2f"); - assertNotNull(savedClient.getId()); - assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); - assertEquals("xobili", client.getFirstName()); - assertEquals("mbangwa", client.getLastName()); - assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); - - //test if a client with voided date add client as deleted - client = new Client("f67823b0-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) - .withGender("Male").withFirstName("Test").withLastName("Deleted"); - client.withDateVoided(new DateTime()); - clientsRepository.add(client); - assertNull(clientsRepository.findByBaseEntityId(client.getBaseEntityId())); - - } - - @Test - public void testUpdate() { - Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); - client.setFirstName("Hummel"); - client.setLastName("Basialis"); - client.withIdentifier("ZEIR_ID", "09876-98"); - clientsRepository.update(client); - - Client updatedClient = clientsRepository.get(client.getId()); - assertEquals("Hummel", updatedClient.getFirstName()); - assertEquals("Basialis", updatedClient.getLastName()); - assertEquals("09876-98", client.getIdentifier("ZEIR_ID")); - - //test update with voided date deletes client - updatedClient.setDateVoided(new DateTime()); - clientsRepository.update(updatedClient); - assertNull(clientsRepository.get(updatedClient.getId())); - } - - @Test - public void testGetAll() { - assertEquals(15, clientsRepository.getAll().size()); - - clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); - - List clients = clientsRepository.getAll(); - - //test deleted clients - assertEquals(14, clients.size()); - for (Client client : clients) - assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); - - assertNull(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); - - } - - @Test - public void testSafeRemove() { - Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); - clientsRepository.safeRemove(client); - List clients = clientsRepository.getAll(); - assertEquals(14, clients.size()); - - for (Client cl : clients) - assertNotEquals("05934ae338431f28bf6793b2416946b7", cl.getId()); - - assertNull(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); - } - - @Test - public void testFindByBaseEntityId() { - Client client = clientsRepository.findByBaseEntityId("86c039a2-0b68-4166-849e-f49897e3a510"); - assertEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); - assertEquals("ab91df5d-e433-40f3-b44f-427b73c9ae2a", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - assertEquals("Sally", client.getFirstName()); - assertEquals("Mtini", client.getLastName().trim()); - - assertNull(clientsRepository.findByBaseEntityId("f67823b0-378e-4a35-93fc-bb00def74e2f")); - - //test deleted client - clientsRepository.safeRemove(client); - assertNull(clientsRepository.findByBaseEntityId("86c039a2-0b68-4166-849e-f49897e3a510")); - } - - @Test - public void testFindAllClients() { - assertEquals(15, clientsRepository.findAllClients().size()); - - clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); - - List clients = clientsRepository.findAllClients(); - - assertEquals(14, clients.size()); - for (Client client : clients) - assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); - - //test deleted client - assertNull(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); - } - - @Test - public void testFindAllByIdentifier() { - assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") - .isEmpty()); - - assertTrue( - clientsRepository.findAllByIdentifier("identifier_type", "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); - - List clients = clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, - "ab91df5d-e433-40f3-b44f-427b73c9ae2a"); - - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); - assertEquals("Sally", clients.get(0).getFirstName()); - assertEquals("Mtini", clients.get(0).getLastName().trim()); - - //test deleted clients - clientsRepository.safeRemove(clients.get(0)); - assertTrue(clientsRepository - .findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); - - } - - @Test - public void testAllByAttribute() { - List clients = clientsRepository.findAllByAttribute("Home_Facility", "Happy Kids Clinic"); - - assertEquals(9, clients.size()); - - clients = clientsRepository.findAllByAttribute("CHW_Phone_Number", "0964357951"); - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); - assertEquals("Sally", clients.get(0).getFirstName()); - assertEquals("Mtini", clients.get(0).getLastName().trim()); - - assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "+0964357951").isEmpty()); - - assertTrue(clientsRepository.findAllByAttribute("Phone_Number", "0964357951").isEmpty()); - - //test deleted clients - clientsRepository.safeRemove(clients.get(0)); - assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "0964357951").isEmpty()); - } - - @Test - public void testFindAllByMatchingName() { - assertEquals(5, clientsRepository.findAllByMatchingName("b").size()); - - List clients = clientsRepository.findAllByMatchingName("babytwo"); - - assertEquals(1, clients.size()); - - assertEquals("05934ae338431f28bf6793b24167b6d1", clients.get(0).getId()); - assertEquals("fe7b6350-16d2-41d0-8574-c194088705df", clients.get(0).getBaseEntityId()); - assertEquals("218227-7", clients.get(0).getIdentifier("ZEIR_ID")); - assertEquals("ba5d3927-414f-4796-ae1e-9b73b50a5573", clients.get(0).getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - - assertEquals(6, clientsRepository.findAllByMatchingName("a").size()); - - assertEquals(5, clientsRepository.findAllByMatchingName("Ja").size()); - - assertEquals(4, clientsRepository.findAllByMatchingName("Janu").size()); - - assertEquals(2, clientsRepository.findAllByMatchingName("January").size()); - - assertTrue(clientsRepository.findAllByMatchingName("Kimbley").isEmpty()); - - //test deleted clients - clientsRepository.safeRemove(clientsRepository.findAllByMatchingName("babytwo").get(0)); - assertTrue(clientsRepository.findAllByMatchingName("babytwo").isEmpty()); - } - - @Test - public void testFindByRelationshipIdAndDateCreated() { - assertEquals(2, clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-b729-89067c7a8c5d", - new DateTime("2018-03-13").toString(), new DateTime().toString()).size()); - - assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-89067c7a8c5d", - new DateTime("2018-03-14").toString(), new DateTime().toString()).isEmpty()); - - assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-b729-89067c7a8c5d", - new DateTime("2018-03-14").toString(), new DateTime().toString()).isEmpty()); - - Client client = clientsRepository.findByRelationshipIdAndDateCreated("3abdb25a-f151-4a95-9311-bd30bf935085", - new DateTime("2018-03-13").toString(), new DateTime().toString()).get(0); - assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); - assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); - assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("3abdb25a-f151-4a95-9311-bd30bf935085", - new DateTime("2018-03-13").toString(), new DateTime().toString()).isEmpty()); - } - - @Test - public void testFindByRelationshipId() { - assertEquals(2, clientsRepository.findByRelationshipId("mother", "0154839f-8766-4eda-b729-89067c7a8c5d").size()); - - Client client = clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").get(0); - assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); - assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); - assertEquals("cf58894b-71c6-41e0-a977-7283f2411cd5", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - - assertTrue(clientsRepository.findByRelationshipId("father", "0154839f-8766-4eda-b729-89067c7a8c5d").isEmpty()); - - assertTrue(clientsRepository.findByRelationshipId("mother", "0154839f-4eda-b729-89067c7a8c5d").isEmpty()); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); - } - - @Test - public void testFindByCriteria() { - ClientSearchBean searchBean = new ClientSearchBean(); - AddressSearchBean addressSearchBean = new AddressSearchBean(); - assertEquals(15, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean.setNameLike("Janu"); - assertEquals(4, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean.setNameLike("Baby"); - searchBean.setGender("Male"); - assertEquals(2, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean.setBirthdateFrom(new DateTime("2016-04-13")); - searchBean.setBirthdateTo(new DateTime()); - assertEquals(2, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean.setDeathdateFrom(new DateTime("2018-01-01")); - searchBean.setDeathdateTo(new DateTime()); - assertEquals(1, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean = new ClientSearchBean(); - searchBean.setAttributeType("Home_Facility"); - searchBean.setAttributeValue("Happy Kids Clinic"); - assertEquals(9, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - searchBean.setAttributeType("CHW_Name"); - searchBean.setAttributeValue("Hellen"); - List clients = clientsRepository.findByCriteria(searchBean, addressSearchBean); - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); - - searchBean = new ClientSearchBean(); - searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); - searchBean.setLastEditTo(new DateTime()); - assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - addressSearchBean.setAddressType("usual_residence"); - assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - addressSearchBean.setAddressType("usual_residence"); - assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - - //test deleted clients - for (Client client : clientsRepository.findByCriteria(searchBean, addressSearchBean)) - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByCriteria(searchBean, addressSearchBean).isEmpty()); - - } - - @Test - public void testFindByCriteriaWithoutAddressBean() { - ClientSearchBean searchBean = new ClientSearchBean(); - assertEquals(15, clientsRepository.findByCriteria(searchBean).size()); - - searchBean.setNameLike("Janu"); - assertEquals(4, clientsRepository.findByCriteria(searchBean).size()); - - searchBean.setNameLike("Baby"); - searchBean.setGender("Male"); - assertEquals(2, clientsRepository.findByCriteria(searchBean).size()); - - searchBean.setBirthdateFrom(new DateTime("2016-04-13")); - searchBean.setBirthdateTo(new DateTime()); - assertEquals(2, clientsRepository.findByCriteria(searchBean).size()); - - searchBean.setDeathdateFrom(new DateTime("2018-01-01")); - searchBean.setDeathdateTo(new DateTime()); - assertEquals(1, clientsRepository.findByCriteria(searchBean).size()); - - searchBean = new ClientSearchBean(); - searchBean.setAttributeType("Home_Facility"); - searchBean.setAttributeValue("Happy Kids Clinic"); - assertEquals(9, clientsRepository.findByCriteria(searchBean).size()); - - searchBean.setAttributeType("CHW_Name"); - searchBean.setAttributeValue("Hellen"); - List clients = clientsRepository.findByCriteria(searchBean); - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); - - searchBean = new ClientSearchBean(); - searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); - searchBean.setLastEditTo(new DateTime()); - assertEquals(6, clientsRepository.findByCriteria(searchBean).size()); - - //test deleted clients - for (Client client : clientsRepository.findByCriteria(searchBean)) - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByCriteria(searchBean).isEmpty()); - - } - - @Test - public void testFindByCriteriaWithEditDateParams() { - - DateTime from = new DateTime("2018-03-13T12:57:05.652"); - DateTime to = new DateTime(); - List clients = clientsRepository.findByCriteria(new AddressSearchBean(), from, to); - assertEquals(6, clients.size()); - - for (Client client : clients) - assertTrue(client.getDateEdited().isEqual(from) || client.getDateEdited().isAfter(from)); - - to = from; - from = new DateTime("2018-01-01"); - clients = clientsRepository.findByCriteria(new AddressSearchBean(), from, to); - assertEquals(10, clients.size()); - - for (Client client : clients) { - assertTrue(client.getDateEdited().isEqual(from) || client.getDateEdited().isAfter(from)); - assertTrue(client.getDateEdited().isEqual(to) || client.getDateEdited().isBefore(to)); - } - - AddressSearchBean addressSearchBean = new AddressSearchBean(); - addressSearchBean.setCityVillage("hui"); - assertTrue( - clientsRepository.findByCriteria(addressSearchBean, new DateTime("2018-01-01"), new DateTime()).isEmpty()); - - //test deleted clients - for (Client client : clientsRepository.findByCriteria(new AddressSearchBean(), from, to)) - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByCriteria(new AddressSearchBean(), from, to).isEmpty()); - } - - @Test - public void testFindByRelationShip() { - assertEquals(2, clientsRepository.findByRelationShip("0154839f-8766-4eda-b729-89067c7a8c5d").size()); - - Client client = clientsRepository.findByRelationShip("3abdb25a-f151-4a95-9311-bd30bf935085").get(0); - assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); - assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); - assertEquals("Fith", client.getFirstName()); - assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByRelationShip("3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); - - assertTrue(clientsRepository.findByRelationShip("0154839f-4eda-b729-89067c7a8c5d").isEmpty()); - } - - @Test - public void testFindByEmptyServerVersion() { - assertTrue(clientsRepository.findByEmptyServerVersion().isEmpty()); - - Client client = clientsRepository.get("05934ae338431f28bf6793b2415a0374"); - client.setServerVersion(null); - clientsRepository.update(client); - - client = clientsRepository.findByEmptyServerVersion().get(0); - assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); - assertEquals("Fith", client.getFirstName()); - assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByEmptyServerVersion().isEmpty()); - - } - - @Test - public void testFindByServerVersion() { - assertEquals(5, clientsRepository.findByServerVersion(1520935878136l).size()); - - List clients = clientsRepository.findByServerVersion(1521003136406l); - List expectedIds = Arrays.asList("05934ae338431f28bf6793b241839005", "05934ae338431f28bf6793b2418380ce"); - assertEquals(2, clients.size()); - for (Client client : clients) { - assertTrue(client.getServerVersion() >= 1521003136406l); - assertTrue(expectedIds.contains(client.getId())); - } - - //test deleted clients - for (Client client : clients) - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByServerVersion(1521003136406l).isEmpty()); - } - - @Test - public void testFindByFieldValue() { - assertEquals(3, - clientsRepository - .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "86c039a2-0b68-4166-849e-f49897e3a510", - "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "fe7b6350-16d2-41d0-8574-c194088705df" })) - .size()); - - assertTrue(clientsRepository.findByFieldValue("Firstname", Arrays.asList(new String[] { "Baby", "Jan" })).isEmpty()); - - assertTrue( - clientsRepository.findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "Baby", "Jan" })).isEmpty()); - - Client client = clientsRepository - .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "f33c71c7-a9a4-495d-8028-b6d59e4034b3" })) - .get(0); - - assertEquals("05934ae338431f28bf6793b241679500", client.getId()); - assertEquals("Jan", client.getFirstName()); - assertEquals("2018-01-01", client.getBirthdate().toLocalDate().toString()); - assertEquals("218226-9", client.getIdentifier("ZEIR_ID")); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository - .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "f33c71c7-a9a4-495d-8028-b6d59e4034b3" })) - .isEmpty()); - } - - @Test - public void testNotInOpenMRSByServerVersion() { - assertTrue(clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).isEmpty()); - - Client client = clientsRepository.get("05934ae338431f28bf6793b2415a0374"); - client.removeIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE); - clientsRepository.update(client); - - client = clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).get(0); - assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); - assertEquals("Fith", client.getFirstName()); - assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); - - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).isEmpty()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java deleted file mode 100644 index 8033a59011..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java +++ /dev/null @@ -1,162 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.*; - -import static org.opensrp.repository.postgres.ErrorTraceRepositoryImpl.*; - -import java.util.Date; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.ErrorTraceRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ErrorTraceRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("errorRepositoryPostgres") - private ErrorTraceRepository errorTraceRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("error.sql"); - return scripts; - } - - @Test - public void testGet() { - ErrorTrace error = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); - assertEquals(new DateTime("2018-03-14T07:53:11.152"), error.getDateOccurred()); - assertEquals("OPENMRS FAILED CLIENT PUSH", error.getErrorType()); - assertEquals("org.opensrp.domain.Client", error.getDocumentType()); - assertNull(errorTraceRepository.get("07271855-4018-497a-b180-6af")); - } - - @Test - public void testAdd() { - DateTime occured = new DateTime(); - ErrorTrace error = new ErrorTrace(occured, "GENERIC ERROR 123!!", occured.toString(), - "error at stocktrace.java(677)", "unsolved", "org.test.bean"); - errorTraceRepository.add(error); - List errors = errorTraceRepository.getAll(); - assertEquals(9, errors.size()); - boolean found = false; - for (ErrorTrace er : errors) { - if (er.getDateOccurred().equals(occured)) { - found = true; - assertEquals("GENERIC ERROR 123!!", error.getErrorType()); - assertEquals("error at stocktrace.java(677)", error.getStackTrace()); - break; - } - } - assertTrue(found); - - } - - @Test - public void testUpdate() { - ErrorTrace error = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); - error.setStatus("closed"); - Date now = new Date(); - error.setDateClosed(now); - error.setRecordId("jjhi-iiui-234423-ll"); - errorTraceRepository.update(error); - - ErrorTrace updateError = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); - assertEquals("closed", updateError.getStatus()); - assertEquals(now, updateError.getDateClosed()); - assertEquals("jjhi-iiui-234423-ll", updateError.getRecordId()); - errorTraceRepository.update(error); - } - - @Test - public void testGetAll() { - assertEquals(8, errorTraceRepository.getAll().size()); - errorTraceRepository.safeRemove(errorTraceRepository.get("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); - assertEquals(7, errorTraceRepository.getAll().size()); - } - - @Test - public void testSafeRemove() { - errorTraceRepository.safeRemove(errorTraceRepository.get("911c7520-f701-419e-b225-5e21286b585b")); - List errors = errorTraceRepository.getAll(); - assertEquals(7, errors.size()); - for (ErrorTrace error : errors) - assertNotEquals("911c7520-f701-419e-b225-5e21286b585b", error.getId()); - } - - @Test - public void testFindById() { - ErrorTrace error = errorTraceRepository.get("07c32814-d7d1-48a5-8320-ed80435a4606"); - assertEquals(new DateTime("2018-01-03T17:06:11.166"), error.getDateOccurred()); - assertEquals("FormSubmissionProcessor", error.getErrorType()); - assertEquals("org.opensrp.service.formSubmission.FormSubmissionListener", error.getOccurredAt()); - assertEquals("[Ljava.lang.StackTraceElement;@50ef4583", error.getStackTrace()); - - assertNull(errorTraceRepository.get("07271855-4-b180-6af")); - } - - @Test - public void testExists() { - assertTrue(errorTraceRepository.exists("07c32814-d7d1-48a5-8320-ed80435a4606")); - - assertTrue(errorTraceRepository.exists("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); - - assertFalse(errorTraceRepository.exists("07c32814-d7d1-48a5-8320-ed804356")); - } - - @Test - public void testFindAllErrors() { - assertEquals(8, errorTraceRepository.findAllErrors().size()); - errorTraceRepository.safeRemove(errorTraceRepository.get("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); - - List errors = errorTraceRepository.findAllErrors(); - assertEquals(7, errors.size()); - - for (ErrorTrace error : errors) - assertNotEquals("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f", error.getId()); - } - - @Test - public void testFindAllUnSolvedErrors() { - assertEquals(6, errorTraceRepository.findAllUnSolvedErrors().size()); - - ErrorTrace error = errorTraceRepository.get("911c7520-f701-419e-b225-5e21286b585b"); - error.setStatus(SOLVED); - error.setDateClosed(new Date()); - errorTraceRepository.update(error); - - List errors = errorTraceRepository.findAllUnSolvedErrors(); - assertEquals(5, errors.size()); - - for (ErrorTrace err : errors) - assertTrue(err.getStatus() == null || err.getStatus().equals(UNSOLVED)); - } - - @Test - public void testFindAllSolvedErrors() { - List errors = errorTraceRepository.findAllSolvedErrors(); - assertEquals(2, errors.size()); - for (ErrorTrace err : errors) - assertTrue(err.getStatus().equals(SOLVED)); - - ErrorTrace error = errorTraceRepository.get("48106c03-8900-4156-a7bf-93226e1d3e58"); - error.setStatus(UNSOLVED); - error.setDateClosed(null); - errorTraceRepository.update(error); - - errors = errorTraceRepository.findAllSolvedErrors(); - assertEquals(1, errors.size()); - assertEquals(new DateTime("2018-01-03T17:06:11.166"), errors.get(0).getDateOccurred()); - assertEquals("FormSubmissionProcessor", errors.get(0).getErrorType()); - assertEquals("org.opensrp.service.formSubmission.FormSubmissionListener", errors.get(0).getOccurredAt()); - assertEquals("[Ljava.lang.StackTraceElement;@50ef4583", errors.get(0).getStackTrace()); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java deleted file mode 100644 index 16a3f7ec91..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ /dev/null @@ -1,602 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.Arrays; -import java.util.Calendar; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.common.AllConstants.BaseEntity; -import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; -import org.opensrp.repository.EventsRepository; -import org.opensrp.search.EventSearchBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class EventsRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("eventsRepositoryPostgres") - private EventsRepository eventsRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("event.sql"); - return scripts; - } - - @Test - public void testGet() { - Event event = eventsRepository.get("05934ae338431f28bf6793b2419c319a"); - assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); - assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); - assertEquals("Vaccination", event.getEventType()); - //find non existent event - assertNull(eventsRepository.get("05934ae338431f28bf4234gvnbvvh")); - assertNull(eventsRepository.get(null)); - - //test results with deleted event - eventsRepository.safeRemove(event); - assertNull(eventsRepository.get(event.getId())); - } - - @Test - public void testGetAll() { - List events = eventsRepository.getAll(); - assertEquals(15, events.size()); - - //test with deleted event - Event event = eventsRepository.findById("05934ae338431f28bf6793b2419c319a"); - eventsRepository.safeRemove(event); - events = eventsRepository.getAll(); - assertEquals(14, events.size()); - for (Event e : events) - assertNotEquals("05934ae338431f28bf6793b2419c319a", e.getId()); - - } - - @Test - public void testFindAllByIdentifier() { - assertTrue(eventsRepository.findAllByIdentifier(null).isEmpty()); - List events = eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504"); - assertEquals(1, events.size()); - assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); - } - - @Test - public void testFindAllByIdentifierAndType() { - assertTrue(eventsRepository.findAllByIdentifier(null, null).isEmpty()); - List events = eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504"); - assertEquals(1, events.size()); - assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - - assertTrue(eventsRepository.findAllByIdentifier("OPENMRS", "06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); - } - - @Test - public void testFindById() { - Event event = eventsRepository.findById("05934ae338431f28bf6793b2419c319a"); - assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); - assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); - assertEquals("Vaccination", event.getEventType()); - //find non existent event - assertNull(eventsRepository.findById("05934ae338431f28bf4234gvnbvvh")); - assertNull(eventsRepository.findById(null)); - - //test with deleted event - eventsRepository.safeRemove(event); - assertNull(eventsRepository.findById("05934ae338431f28bf6793b2419c319a")); - } - - @Test - public void testFindByFormSubmissionId() { - Event event = eventsRepository.findByFormSubmissionId("31c4a45a-09f4-4b01-abe8-a87526827df6"); - assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); - assertEquals("05934ae338431f28bf6793b241781149", event.getId()); - assertEquals("Growth Monitoring", event.getEventType()); - //find non existent event - assertNull(eventsRepository.findByFormSubmissionId("05934ae338431f28bf4234gvnbvvh")); - assertNull(eventsRepository.findByFormSubmissionId(null)); - - //test with deleted event - eventsRepository.safeRemove(event); - assertNull(eventsRepository.findByFormSubmissionId("31c4a45a-09f4-4b01-abe8-a87526827df6")); - } - - @Test - public void testFindByBaseEntityId() { - List events = eventsRepository.findByBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); - assertEquals(7, events.size()); - - events = eventsRepository.findByBaseEntityId("43930c23-c787-4ddb-ab76-770f77e7b17d"); - assertEquals(1, events.size()); - assertEquals("6b3243e9-3d45-495c-af69-f012061def01", events.get(0).getFormSubmissionId()); - assertEquals("05934ae338431f28bf6793b24199e690", events.get(0).getId()); - assertEquals("New Woman Registration", events.get(0).getEventType()); - //non-existent records - assertTrue(eventsRepository.findByBaseEntityId("05934ae338431f28bf4234gvnbvvh").isEmpty()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findByBaseEntityId("43930c23-c787-4ddb-ab76-770f77e7b17d").isEmpty()); - } - - @Test - public void testFindByBaseEntityAndFormSubmissionId() { - Event event = eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"); - assertEquals("05934ae338431f28bf6793b241bdbb60", event.getId()); - - event = eventsRepository.findByBaseEntityAndFormSubmissionId("43930c23-c787-4ddb-ab76-770f77e7b17d", - "6b3243e9-3d45-495c-af69-f012061def01"); - assertEquals(3, event.getObs().size()); - assertEquals("05934ae338431f28bf6793b24199e690", event.getId()); - assertEquals("New Woman Registration", event.getEventType()); - //non-existent records - assertNull(eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "34354")); - - //test with deleted event - eventsRepository.safeRemove(event); - assertNull(eventsRepository.findByBaseEntityAndFormSubmissionId("43930c23-c787-4ddb-ab76-770f77e7b17d", - "6b3243e9-3d45-495c-af69-f012061def01")); - } - - @Test - public void testFindByBaseEntityAndType() { - List events = eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Vaccination"); - assertEquals(6, events.size()); - - events = eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Birth Registration"); - assertEquals(1, events.size()); - assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - assertEquals(1521183592609l, events.get(0).getServerVersion().longValue()); - //non-existent records - assertTrue( - eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Growth Monitoring").isEmpty()); - assertTrue(eventsRepository.findByBaseEntityAndType("58b33379", "Vaccination").isEmpty()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Birth Registration") - .isEmpty()); - } - - @Test - public void testFindEvents() { - - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); - List events = eventsRepository.findEvents(eventSearchBean); - assertEquals(7, events.size()); - - DateTime from = new DateTime("2018-01-10T11:59:37.380"); - DateTime to = new DateTime("2018-02-21T12:00:08.788"); - eventSearchBean.setEventDateFrom(from); - eventSearchBean.setEventDateTo(to); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(6, events.size()); - - eventSearchBean.setEventType("Vaccination"); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(6, events.size()); - - eventSearchBean.setEntityType("vaccination"); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(6, events.size()); - - eventSearchBean.setProviderId("biddemo"); - eventSearchBean.setLocationId("42abc582-6658-488b-922e-7be500c070f3"); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(6, events.size()); - - eventSearchBean.setTeam("ATeam"); - eventSearchBean.setTeamId("3453hgb454-4j345n-llk345"); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(2, events.size()); - - for (Event event : events) { - assertEquals("3453hgb454-4j345n-llk345", event.getTeamId()); - assertEquals("ATeam", event.getTeam()); - assertEquals("42abc582-6658-488b-922e-7be500c070f3", event.getLocationId()); - assertEquals("biddemo", event.getProviderId()); - assertEquals("vaccination", event.getEntityType()); - assertEquals("Vaccination", event.getEventType()); - assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", event.getBaseEntityId()); - assertTrue(event.getEventDate().isEqual(from) || event.getEventDate().isAfter(from)); - assertTrue(event.getEventDate().isEqual(to) || event.getEventDate().isBefore(to)); - } - - eventSearchBean.setLastEditFrom(new DateTime()); - eventSearchBean.setLastEditTo(new DateTime()); - events = eventsRepository.findEvents(eventSearchBean); - assertTrue(events.isEmpty()); - - DateTime editFrom = new DateTime("2018-03-16T10:03:01.537+03:00"); - DateTime editTo = new DateTime("2018-03-19T17:17:15.929+03:00"); - eventSearchBean.setLastEditFrom(editFrom); - eventSearchBean.setLastEditTo(editTo); - events = eventsRepository.findEvents(eventSearchBean); - assertEquals(2, events.size()); - for (Event event : events) { - assertTrue(event.getDateEdited().equals(editFrom) || event.getDateEdited().isAfter(editFrom)); - assertTrue(event.getDateEdited().equals(editTo) || event.getDateEdited().isBefore(editTo)); - } - - //test with deleted event - for (Event event : events) - eventsRepository.safeRemove(event); - assertTrue(eventsRepository.findEvents(eventSearchBean).isEmpty()); - } - - @Test(expected = IllegalArgumentException.class) - public void testFindEventsByDynamicQuery() { - eventsRepository.findEventsByDynamicQuery("baseEntityId:4234324"); - } - - @Test - public void testFindByServerVersion() { - assertEquals(15, eventsRepository.findByServerVersion(0).size()); - - //missing data - assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); - - List events = eventsRepository.findByServerVersion(1521469045587l); - assertEquals(3, events.size()); - List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149", - "05934ae338431f28bf6793b241781a1e"); - for (Event event : events) { - assertTrue(event.getServerVersion() >= 1521469045587l); - assertTrue(expectedIds.contains(event.getId())); - } - - //test with deleted event - for (Event event : events) - eventsRepository.safeRemove(event); - assertTrue(eventsRepository.findByServerVersion(1521469045587l).isEmpty()); - } - - @Test - public void testNotInOpenMRSByServerVersion() { - Calendar cal = Calendar.getInstance(); - assertEquals(7, eventsRepository.notInOpenMRSByServerVersion(0, cal).size()); - - cal.setTimeInMillis(1521469045589l); - - //test missing data - assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); - - List events = eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal); - assertEquals(2, events.size()); - - List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149"); - for (Event event : events) { - assertTrue(event.getServerVersion() >= 1521469045588l && event.getServerVersion() <= cal.getTimeInMillis()); - assertTrue(expectedIds.contains(event.getId())); - } - - //test with deleted event - for (Event event : events) - eventsRepository.safeRemove(event); - assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal).isEmpty()); - - } - - @Test - public void testNotInOpenMRSByServerVersionAndType() { - Calendar cal = Calendar.getInstance(); - assertEquals(4, eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 0, cal).size()); - - //missing data - assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); - cal.setTimeInMillis(1521469045589l); - List events = eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal); - List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149"); - assertEquals(2, events.size()); - for (Event event : events) { - assertTrue(event.getServerVersion() >= 1521469045588l && event.getServerVersion() <= cal.getTimeInMillis()); - assertTrue(expectedIds.contains(event.getId())); - assertEquals("Growth Monitoring", event.getEventType()); - } - - //test with deleted event - for (Event event : events) - eventsRepository.safeRemove(event); - assertTrue(eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal).isEmpty()); - - } - - @Test - public void testFindByClientAndConceptAndDate() { - List events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-01-10", new DateTime().toString("yyyy-MM-dd")); - assertEquals(5, events.size()); - for (Event event : events) { - assertTrue(event.getEventDate().equals(new DateTime("2018-01-10")) - || event.getEventDate().isAfter(new DateTime("2018-01-10"))); - assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", event.getBaseEntityId()); - assertEquals("1", events.get(0).getObs(null, "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); - } - - events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-03-20", new DateTime().toString("yyyy-MM-dd")); - - assertTrue(events.isEmpty()); - - events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "2018-02-21", "2018-03-19", new DateTime().toString("yyyy-MM-dd")); - - assertEquals(4, events.size()); - - events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic", "2018-03-19", - new DateTime().toString("yyyy-MM-dd")); - - assertEquals(1, events.size()); - assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - assertEquals("Happy Kids Clinic", - events.get(0).getObs(null, "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); - assertTrue(events.get(0).getDateCreated().equals(new DateTime("2018-03-19")) - || events.get(0).getDateCreated().isAfter(new DateTime("2018-03-19"))); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic", "2018-03-19", new DateTime().toString("yyyy-MM-dd")) - .isEmpty()); - - } - - @Test - public void testFindByBaseEntityIdAndConceptParentCode() { - //missing data - List events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); - - assertTrue(events.isEmpty()); - - events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); - assertEquals(2, events.size()); - - events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); - - assertEquals(1, events.size()); - assertEquals("05934ae338431f28bf6793b241bdbc55", events.get(0).getId()); - boolean found = false; - for (Obs obs : events.get(0).getObs()) { - if (obs.getParentCode().equals("886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") - && obs.getFieldCode().equals("1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { - found = true; - break; - } - } - assertTrue(found); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").isEmpty()); - - } - - @Test - public void testFindByConceptAndValue() { - List events = eventsRepository.findByConceptAndValue("1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1"); - assertEquals(8, events.size()); - - events = eventsRepository.findByConceptAndValue("1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "5"); - - assertTrue(events.isEmpty()); - - events = eventsRepository.findByConceptAndValue("1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "2018-02-21"); - - assertEquals(4, events.size()); - for (Event event : events) { - assertEquals("2018-02-21", event.getObs(null, "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); - } - - events = eventsRepository.findByConceptAndValue("163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic"); - - assertEquals(1, events.size()); - assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue( - eventsRepository.findByConceptAndValue("163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic").isEmpty()); - - } - - @Test - public void testFindEvents2() { - EventSearchBean eventSearchBean = new EventSearchBean(); - eventSearchBean.setTeam("ATeam"); - eventSearchBean.setTeamId("3453hgb454-4j345n-llk345"); - List events = eventsRepository.findEvents(eventSearchBean, null, null, 20); - assertEquals(2, events.size()); - - eventSearchBean = new EventSearchBean(); - eventSearchBean.setTeam("ATeam,BTeam"); - events = eventsRepository.findEvents(eventSearchBean, null, null, 20); - assertEquals(3, events.size()); - - eventSearchBean = new EventSearchBean(); - eventSearchBean.setProviderId("biddemo,biddemo2"); - eventSearchBean.setLocationId("42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5"); - events = eventsRepository.findEvents(eventSearchBean, null, null, 20); - assertEquals(7, events.size()); - - eventSearchBean.setBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); - events = eventsRepository.findEvents(eventSearchBean, null, null, 20); - assertEquals(0, events.size()); - - eventSearchBean.setLocationId("42abc582-6658-488b-922e-7be500c070f3"); - events = eventsRepository.findEvents(eventSearchBean, null, null, 20); - assertEquals(7, events.size()); - - eventSearchBean.setTeam("ATeam,BTeam"); - eventSearchBean.setTeamId("3453hgb454-4j345n-llk345,3453hgb454-4j345n-llk348"); - eventSearchBean.setProviderId("biddemo"); - eventSearchBean.setServerVersion(0l); - events = eventsRepository.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", 20); - assertEquals(3, events.size()); - - long previousVersion = 0; - for (Event event : events) { - assertTrue(event.getTeam().equals("ATeam") || event.getTeam().equals("BTeam")); - assertTrue(event.getTeamId().equals("3453hgb454-4j345n-llk345") - || event.getTeamId().equals("3453hgb454-4j345n-llk348")); - assertEquals("42abc582-6658-488b-922e-7be500c070f3", event.getLocationId()); - assertEquals("biddemo", event.getProviderId()); - assertTrue(event.getServerVersion() >= previousVersion); - previousVersion = event.getServerVersion(); - } - - //test with deleted event - for (Event event : events) - eventsRepository.safeRemove(event); - assertTrue(eventsRepository.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", 20).isEmpty()); - } - - @Test - public void testUpdate() { - Event event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); - long now = System.currentTimeMillis(); - event.setServerVersion(now); - event.setDateEdited(new DateTime(now)); - Obs obs = new Obs("concept", "text", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "25-Apr-2017", null, - "Date_Reaction"); - event.addObs(obs); - eventsRepository.update(event); - event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); - assertEquals(now, event.getServerVersion().longValue()); - assertEquals(now, event.getDateEdited().getMillis()); - assertEquals(3, event.getObs().size()); - assertEquals(obs.getValue(), event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - - //test update with voided date deletes event - event.setDateVoided(new DateTime()); - eventsRepository.update(event); - assertNull(eventsRepository.get(event.getId())); - } - - @Test - public void testFindByEmptyServerVersion() { - assertEquals(0, eventsRepository.findByEmptyServerVersion().size()); - Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); - event.setServerVersion(0l); - eventsRepository.update(event); - - event = eventsRepository.get("05934ae338431f28bf6793b241bdbb60"); - event.setServerVersion(null); - eventsRepository.update(event); - long beforeFetch = System.currentTimeMillis(); - List events = eventsRepository.findByEmptyServerVersion(); - assertEquals(2, events.size()); - for (Event loopEvent : events) { - assertTrue(loopEvent.getId().equals("05934ae338431f28bf6793b241bdb88c") - || loopEvent.getId().equals("05934ae338431f28bf6793b241bdbb60")); - //if serverVersion is null will automatically be set to current timestamp in org.opensrp.domain.BaseDataObject.serverVersion - assertTrue(loopEvent.getServerVersion() == 0 || loopEvent.getServerVersion() >= beforeFetch); - - } - - //test with deleted event - for (Event e : events) - eventsRepository.safeRemove(e); - assertTrue(eventsRepository.findByEmptyServerVersion().isEmpty()); - } - - @Test - public void testFindEventByEventTypeBetweenTwoDates() { - List events = eventsRepository.getAll(); - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.DATE, 1); - for (Event event : events) { - event.setServerVersion(cal.getTimeInMillis()); - eventsRepository.update(event); - } - assertEquals(9, eventsRepository.findEventByEventTypeBetweenTwoDates("Vaccination").size()); - assertEquals(4, eventsRepository.findEventByEventTypeBetweenTwoDates("Growth Monitoring").size()); - events = eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration"); - assertEquals(1, events.size()); - assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); - assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); - - //test with deleted event - eventsRepository.safeRemove(events.get(0)); - assertTrue(eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration").isEmpty()); - } - - @Test - public void testSafeRemove() { - Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); - eventsRepository.safeRemove(event); - List events = eventsRepository.getAll(); - assertEquals(14, events.size()); - for (Event e : events) - assertNotEquals("05934ae338431f28bf6793b241bdb88c", e.getId()); - assertNull(eventsRepository.get("05934ae338431f28bf6793b241bdb88c")); - } - - @Test - public void testAdd() { - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") - .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); - - eventsRepository.add(event); - - event = eventsRepository.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); - assertEquals("435534534543", event.getBaseEntityId()); - assertEquals("Growth Monitoring", event.getEventType()); - assertEquals(1, event.getObs().size()); - assertEquals("3.5", event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - - //test if an event with voided date add event as deleted - event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") - .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); - event.setDateVoided(new DateTime()); - eventsRepository.add(event); - assertNull(eventsRepository.findByFormSubmissionId(event.getFormSubmissionId())); - - } - - @Test - public void testFindByProvider() { - List events = eventsRepository.findByProvider("biddemo"); - assertEquals(13, events.size()); - events = eventsRepository.findByProvider("biddemo2"); - assertEquals(2, events.size()); - for (Event event : events) { - assertEquals("biddemo2", event.getProviderId()); - assertTrue(event.getId().equals("05934ae338431f28bf6793b241781149") - || event.getId().equals("05934ae338431f28bf6793b241781a1e")); - } - assertTrue(eventsRepository.findByProvider("biddemo9").isEmpty()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java deleted file mode 100644 index 1f7e26fd50..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java +++ /dev/null @@ -1,122 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; - -import java.util.Arrays; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.Test; -import org.opensrp.domain.Multimedia; -import org.opensrp.repository.MultimediaRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class MultimediaRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("multimediaRepositoryPostgres") - private MultimediaRepository multimediaRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("multimedia.sql"); - return scripts; - } - - @Test - public void testGet() { - Multimedia multimedia = multimediaRepository.get("05934ae338431f28bf6793b241f0c5ca"); - assertEquals("040d4f18-8140-479c-aa21-725612073490", multimedia.getCaseId()); - assertEquals("/opt/patient_images/040d4f18-8140-479c-aa21-725612073490.jpg", multimedia.getFilePath()); - assertEquals("profilepic", multimedia.getFileCategory()); - - assertNull(multimediaRepository.get("05934ae338431f28bf6793b241fa")); - } - - @Test - public void testAdd() { - Multimedia multimedia = new Multimedia("2332kkj-jhjmmn-23423423", "tester1", "image/jpeg", "/tmp/123.jpg", - "thumbnail"); - multimediaRepository.add(multimedia); - - assertEquals(6, multimediaRepository.getAll().size()); - - Multimedia savedEntity = multimediaRepository.findByCaseId("2332kkj-jhjmmn-23423423"); - assertEquals("/tmp/123.jpg", savedEntity.getFilePath()); - assertEquals("thumbnail", savedEntity.getFileCategory()); - assertEquals("image/jpeg", savedEntity.getContentType()); - } - - @Test - public void testUpdate() { - Multimedia multimedia = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); - multimedia.setContentType("image/png"); - multimedia.setFilePath("/opt/images/783434-34534.png"); - multimediaRepository.update(multimedia); - - Multimedia updatedEntity = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); - assertEquals("/opt/images/783434-34534.png", updatedEntity.getFilePath()); - assertEquals("image/png", updatedEntity.getContentType()); - } - - @Test - public void testGetAll() { - assertEquals(5, multimediaRepository.getAll().size()); - - Multimedia multimedia = new Multimedia("2332kkj-76385430sdfsd-23423423", "tester23", "image/jpeg", - "/tmp/b7jhkh23.jpg", "thumbnail"); - multimediaRepository.add(multimedia); - - List expectedClients = Arrays.asList("2332kkj-76385430sdfsd-23423423", "87dc3230-84f7-4088-b257-e8b3130ab86b", - "24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf"); - int found = 0; - List multimediaList = multimediaRepository.getAll(); - assertEquals(6, multimediaList.size()); - for (Multimedia media : multimediaList) - if (expectedClients.contains(media.getCaseId())) - found++; - assertEquals(3, found); - - } - - @Test - public void testSafeRemove() { - - Multimedia multimedia = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); - multimediaRepository.safeRemove(multimedia); - - List multimediaList = multimediaRepository.getAll(); - assertEquals(4, multimediaList.size()); - for (Multimedia media : multimediaList) - assertNotEquals("3157f9339bf0c948dd5d12aff82111e1", media.getId()); - - assertNull(multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1")); - - } - - @Test - public void testFindByCaseId() { - Multimedia multimedia = multimediaRepository.findByCaseId("87dc3230-84f7-4088-b257-e8b3130ab86b"); - assertEquals("091488163b6ecd589a915372a0ad3b0d", multimedia.getId()); - assertEquals("/opt/patient_images/87dc3230-84f7-4088-b257-e8b3130ab86b.jpg", multimedia.getFilePath()); - assertEquals("profilepic", multimedia.getFileCategory()); - - assertNull(multimediaRepository.findByCaseId("05934ae338431f28bf6793b241fa")); - } - - @Test - public void testAll() { - assertEquals(4, multimediaRepository.all("biddemo").size()); - - List multimedia = multimediaRepository.all("tester11"); - assertEquals(1, multimedia.size()); - assertEquals("317f8db1bb6cc4b15ecc9993a2922f47", multimedia.get(0).getId()); - assertEquals("24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf", multimedia.get(0).getCaseId()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java deleted file mode 100644 index 65015ede37..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java +++ /dev/null @@ -1,239 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.domain.Report; -import org.opensrp.repository.ReportsRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ReportsRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("reportsRepositoryPostgres") - private ReportsRepository reportsRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("report.sql"); - return scripts; - } - - @Test - public void testGet() { - Report report = reportsRepository.get("07271855-4018-497a-b180-6af01f0fa62b"); - assertEquals("7073cef4-b974-4910-afa7-dd2ccadba089", report.getFormSubmissionId()); - assertEquals("b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", report.getLocationId()); - assertNull(reportsRepository.get("07271855-4018-497a-b180-6af")); - } - - @Test - public void testAdd() { - Report report = new Report("ghsjf-s723-sj97s", "3453535sdfs", new DateTime(), "MONTHLY", "435-njhjh-jjh", "tester11", - "3", 1522829702064l, 0, null); - reportsRepository.add(report); - assertEquals(6, reportsRepository.getAll().size()); - List reports = reportsRepository.findByBaseEntityAndFormSubmissionId("ghsjf-s723-sj97s", "435-njhjh-jjh"); - assertEquals("3453535sdfs", reports.get(0).getLocationId()); - assertEquals("MONTHLY", report.getReportType()); - assertNull(report.getHia2Indicators()); - - } - - @Test - public void testUpdate() { - Report report = reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be"); - report.setBaseEntityId("asads-asdas7676-ggas"); - report.setServerVersion(1522827820l); - report.setDuration(6); - - reportsRepository.update(report); - - Report updateReport = reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be"); - assertEquals("asads-asdas7676-ggas", updateReport.getBaseEntityId()); - assertEquals(1522827820l, updateReport.getServerVersion().longValue()); - assertEquals(6, updateReport.getDuration()); - - } - - @Test - public void testGetAll() { - assertEquals(5, reportsRepository.getAll().size()); - reportsRepository.safeRemove(reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be")); - List reports = reportsRepository.getAll(); - assertEquals(4, reports.size()); - for (Report report : reports) - assertNotEquals("cd09a3d4-01d9-485c-a1c5-a2eb078a61be", report.getId()); - } - - @Test - public void testSafeRemove() { - reportsRepository.safeRemove(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); - List reports = reportsRepository.getAll(); - assertEquals(4, reports.size()); - for (Report report : reports) - assertNotEquals("c57ba49f-34b9-4986-9b87-69f48b1830c5", report.getId()); - assertNull(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); - } - - @Test - public void testFindById() { - Report report = reportsRepository.findById("c57ba49f-34b9-4986-9b87-69f48b1830c5"); - assertEquals("88f9fe90-1e45-46b3-8056-e932574dcbd9", report.getFormSubmissionId()); - assertEquals(64, report.getHia2Indicators().size()); - } - - @Test - public void testFindByBaseEntityId() { - - assertEquals(2, reportsRepository.findByBaseEntityId("6654kk-mnj45-mmnfgd-l45645").size()); - - List reports = reportsRepository.findByBaseEntityId("678343544-nhj7-jghdfgfd-mkjdkfg"); - assertEquals(1, reports.size()); - assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); - assertEquals("1aea74ac-b737-477a-99d3-728011fbae3f", reports.get(0).getFormSubmissionId()); - - assertTrue(reportsRepository.findByBaseEntityId("sfsdfd").isEmpty()); - - } - - @Test - public void testFindAllByIdentifier() { - assertEquals(2, reportsRepository.findAllByIdentifier("56757L").size()); - - List reports = reportsRepository.findAllByIdentifier("1121K"); - assertEquals(1, reports.size()); - assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); - - assertTrue(reportsRepository.findAllByIdentifier("7234M").isEmpty()); - } - - @Test - public void testFindByBaseEntityAndType() { - assertEquals(2, reportsRepository.findByBaseEntityAndType("6654kk-mnj45-mmnfgd-l45645", "HIA2").size()); - - List reports = reportsRepository.findByBaseEntityAndType("678343544-nhj7-jghdfgfd-mkjdkfg", "HIA2"); - assertEquals(1, reports.size()); - assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); - assertEquals("1aea74ac-b737-477a-99d3-728011fbae3f", reports.get(0).getFormSubmissionId()); - - assertTrue(reportsRepository.findByBaseEntityAndType("678343544-nhj7-jghdfgfd-mkjdkfg", "HIA4").isEmpty()); - } - - @Test - public void testFindByEmptyServerVersion() { - List reports = reportsRepository.findByEmptyServerVersion(); - assertEquals(1, reports.size()); - assertEquals("60ab7d5c-a051-4633-b0b3-f52b701cb261", reports.get(0).getId()); - assertEquals("03b5d0b8-4f72-4415-9909-ce03b5802c75", reports.get(0).getFormSubmissionId()); - - reports.get(0).setServerVersion(System.currentTimeMillis()); - reportsRepository.update(reports.get(0)); - - assertTrue(reportsRepository.findByEmptyServerVersion().isEmpty()); - } - - @Test - public void testFindByServerVersion() { - List reports = reportsRepository.findByServerVersion(1503312366264l); - assertEquals(1, reports.size()); - assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); - - reports = reportsRepository.findByServerVersion(1500307579515l); - assertEquals(3, reports.size()); - for (Report report : reports) - assertTrue(report.getServerVersion() >= 1500307579516l); - assertTrue(reportsRepository.findByServerVersion(System.currentTimeMillis()).isEmpty()); - } - - @Test - public void testFindByBaseEntityAndFormSubmissionId() { - List reports = reportsRepository.findByBaseEntityAndFormSubmissionId("6654kk-mnj45-mmnfgd-l45645", - "03b5d0b8-4f72-4415-9909-ce03b5802c75"); - assertEquals(1, reports.size()); - assertEquals("60ab7d5c-a051-4633-b0b3-f52b701cb261", reports.get(0).getId()); - - assertTrue(reportsRepository - .findByBaseEntityAndFormSubmissionId("6654kk-mnj45-mmnfgd-l45645", "d78a8105-f808-488a-b67a-0c4c46845194") - .isEmpty()); - } - - @Test - public void testFindReports() { - assertEquals(2, - reportsRepository.findReports(null, "biddemo", "", "6654kk-mnj45-mmnfgd-l45645", null, null, null, 20).size()); - - List reports = reportsRepository.findReports(null, "biddemo", "", "6654kk-mnj45-mmnfgd-l45645", 0l, null, - null, 20); - assertEquals(1, reports.size()); - - assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); - - assertEquals(1, reportsRepository.findReports(null, "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", - "6654kk-mnj45-mmnfgd-l45645", null, null, null, 20).size()); - - assertEquals(4, reportsRepository.findReports("", "biddemo", null, null, 0l, null, null, 20).size()); - - assertEquals(5, reportsRepository.findReports("", "biddemo", null, null, null, null, null, 20).size()); - - assertEquals(3, reportsRepository.findReports("", "biddemo", null, null, 1500307579515l, null, null, 20).size()); - - assertEquals(2, reportsRepository.findReports("", "biddemo", null, null, 0l, null, null, 2).size()); - - assertTrue(reportsRepository.findReports("ATeam", "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", - "6654kk-mnj45-mmnfgd-l45645", System.currentTimeMillis(), null, null, 20).isEmpty()); - } - - @Test(expected = IllegalArgumentException.class) - public void testFindReportsNoParams() { - reportsRepository.findReports("", null, null, null, null, null, null, 2); - } - - @Test - public void testFindReportsV2() { - assertEquals(2, reportsRepository.findReports("6654kk-mnj45-mmnfgd-l45645", new DateTime("2017-05-01"), - new DateTime(), "HIA2", "biddemo", null, null, null).size()); - - assertEquals(5, reportsRepository - .findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", null, null, null).size()); - - assertEquals(4, reportsRepository.findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", - "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-17"), new DateTime()).size()); - - assertEquals(2, reportsRepository.findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", - "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-18"), new DateTime()).size()); - - List reports = reportsRepository.findReports("678343544-nhj7-jghdfgfd-mkjdkfg", new DateTime("2017-05-01"), - new DateTime(), "HIA2", "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-17"), - new DateTime()); - - assertEquals(1, reports.size()); - - assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); - - assertTrue( - reportsRepository.findReports("6654kk-mnj45-mmnfgd-l45645", new DateTime("2017-05-01"), new DateTime(), "HIA2", - "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-31"), new DateTime()).isEmpty()); - } - - @Test(expected = IllegalArgumentException.class) - public void testFindReportsV2NoParams() { - reportsRepository.findReports(null, null, null, null, null, null, null, null); - } - - @Test(expected = IllegalArgumentException.class) - public void testFindReportsByDynamicQuery() { - reportsRepository.findReportsByDynamicQuery("reportType:HIA2"); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java deleted file mode 100644 index 2121551fa2..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java +++ /dev/null @@ -1,106 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.domain.Client; -import org.opensrp.repository.SearchRepository; -import org.opensrp.search.ClientSearchBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class SearchRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("searchRepositoryPostgres") - private SearchRepository searchRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("client.sql"); - return scripts; - } - - @Test - public void testFindByCriteria() { - ClientSearchBean clientSearchBean = new ClientSearchBean(); - List clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, null, 20); - - assertEquals(5, clients.size()); - - clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, "Bab", 20); - - assertEquals(5, clients.size()); - - clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, "Baby", 20); - - assertEquals(4, clients.size()); - - clients = searchRepository.findByCriteria(clientSearchBean, "Janu", null, "Baby", 3); - - assertEquals(3, clients.size()); - - for (Client client : clients) { - assertTrue(client.getFirstName().contains("Janu")); - assertTrue(client.getLastName().contains("Baby")); - } - - clients = searchRepository.findByCriteria(clientSearchBean, "JAnu", null, "BABY", 3); - - assertEquals(3, clients.size()); - - for (Client client : clients) { - assertTrue(client.getFirstName().contains("Janu")); - assertTrue(client.getLastName().contains("Baby")); - } - - clients = searchRepository.findByCriteria(clientSearchBean, "Janu", null, "Babyfive", 3); - - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b241693a2f", clients.get(0).getId()); - assertEquals("aabcd2cc-c111-41c6-85e6-cb5d9e350d08", clients.get(0).getBaseEntityId()); - - ClientSearchBean searchBean = new ClientSearchBean(); - assertEquals(15, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); - - searchBean.setNameLike("Jan"); - assertEquals(4, searchRepository.findByCriteria(searchBean, "Janu", null, null, 20).size()); - - searchBean.setNameLike("Baby"); - searchBean.setGender("Male"); - assertEquals(2, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); - - searchBean.setBirthdateFrom(new DateTime("2016-04-13")); - searchBean.setBirthdateTo(new DateTime()); - assertEquals(2, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); - - searchBean.setDeathdateFrom(new DateTime("2018-01-01")); - searchBean.setDeathdateTo(new DateTime()); - assertEquals(1, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); - - searchBean = new ClientSearchBean(); - searchBean.setAttributeType("Home_Facility"); - searchBean.setAttributeValue("Happy Kids Clinic"); - assertEquals(9, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); - - searchBean.setAttributeType("CHW_Name"); - searchBean.setAttributeValue("Hellen"); - clients = searchRepository.findByCriteria(searchBean, null, null, null, 20); - assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); - - searchBean = new ClientSearchBean(); - searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); - searchBean.setLastEditTo(new DateTime()); - assertEquals(6, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java deleted file mode 100644 index 9b4392e136..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java +++ /dev/null @@ -1,211 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.Test; -import org.opensrp.common.AllConstants.BaseEntity; -import org.opensrp.domain.Stock; -import org.opensrp.repository.StocksRepository; -import org.opensrp.search.StockSearchBean; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class StocksRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("stocksRepositoryPostgres") - private StocksRepository stocksRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("stock.sql"); - return scripts; - } - - @Test - public void testGet() { - Stock stock = stocksRepository.get("05934ae338431f28bf6793b241978ad9"); - assertEquals(5l, stock.getIdentifier().longValue()); - assertEquals(20, stock.getValue()); - assertEquals("1", stock.getVaccine_type_id()); - assertEquals(1521009418783l, stock.getServerVersion().longValue()); - assertNull(stocksRepository.get("07271855-4018-497a-b180-6af")); - } - - @Test - public void testAdd() { - Stock stock = new Stock(521l, "VC1", "received", "tester1", 31, 1521499800000l, "VCC1", 1521536143239l, - 1521536179443l); - stocksRepository.add(stock); - assertEquals(16, stocksRepository.getAll().size()); - - List stocks = stocksRepository.findAllByIdentifier("vaccine_type", "VC1"); - - assertEquals(1, stocks.size()); - assertEquals("tester1", stocks.get(0).getProviderid()); - assertEquals(31, stock.getValue()); - assertEquals("VC1", stock.getVaccine_type_id()); - } - - @Test - public void testUpdate() { - Stock stock = stocksRepository.get("05934ae338431f28bf6793b241b2daa6"); - long now = System.currentTimeMillis(); - stock.setDate_updated(now); - stock.setValue(23); - stocksRepository.update(stock); - - Stock updatedStock = stocksRepository.get("05934ae338431f28bf6793b241b2daa6"); - assertEquals(now, updatedStock.getDate_updated().longValue()); - assertEquals(23, stock.getValue()); - - } - - @Test - public void testGetAll() { - assertEquals(15, stocksRepository.getAll().size()); - stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2daa6")); - List stocks = stocksRepository.getAll(); - assertEquals(14, stocks.size()); - for (Stock stock : stocks) - assertNotEquals("05934ae338431f28bf6793b241b2daa6", stock.getId()); - - } - - @Test - public void testSafeRemove() { - stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); - List stocks = stocksRepository.getAll(); - assertEquals(14, stocks.size()); - for (Stock stock : stocks) - assertNotEquals("05934ae338431f28bf6793b2419a606f", stock.getId()); - - assertNull(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); - } - - @Test - public void testFindAllByProviderid() { - assertEquals(12, stocksRepository.findAllByProviderid("biddemo").size()); - - List stocks = stocksRepository.findAllByProviderid("biddemo1"); - assertEquals(3, stocks.size()); - for (Stock stock : stocks) - assertEquals("biddemo1", stock.getProviderid()); - - assertTrue(stocksRepository.findAllByProviderid("biddemo2").isEmpty()); - } - - @Test - public void testFindAllByIdentifier() { - assertEquals(11, stocksRepository.findAllByIdentifier("vaccine_type", "1").size()); - - List stocks = stocksRepository.findAllByIdentifier("vaccine_type", "2"); - assertEquals(4, stocks.size()); - for (Stock stock : stocks) - assertEquals("2", stock.getVaccine_type_id()); - - assertTrue(stocksRepository.findAllByIdentifier("vaccine_type", "19").isEmpty()); - } - - @Test - public void testFindById() { - Stock stock = stocksRepository.findById("05934ae338431f28bf6793b241b2df09"); - assertEquals(12l, stock.getIdentifier().longValue()); - assertEquals(-2, stock.getValue()); - assertEquals("1", stock.getVaccine_type_id()); - assertEquals("Physical_recount", stock.getTo_from()); - assertEquals("loss_adjustment", stock.getTransaction_type()); - assertNull(stocksRepository.findById("07271855-4018-497a-b180-6af")); - } - - @Test - public void testFindStocksWithOrder() { - StockSearchBean searchBean = new StockSearchBean(); - - searchBean.setStockTypeId("1"); - List stocks = stocksRepository.findStocks(searchBean, BaseEntity.SERVER_VERSIOIN, "asc", 5); - assertEquals(5, stocks.size()); - long previousVersion = 0; - for (Stock stock : stocks) { - assertEquals("1", stock.getVaccine_type_id()); - assertTrue(stock.getServerVersion() >= previousVersion); - previousVersion = stock.getServerVersion(); - } - - } - - @Test - public void testFindStocksStockbeanOnly() { - StockSearchBean searchBean = new StockSearchBean(); - - searchBean.setIdentifier("10"); - List stocks = stocksRepository.findStocks(searchBean); - assertEquals(1, stocks.size()); - - assertEquals(-19, stocks.get(0).getValue()); - assertEquals("2", stocks.get(0).getVaccine_type_id()); - assertEquals("C/C", stocks.get(0).getTo_from()); - assertEquals("issued", stocks.get(0).getTransaction_type()); - - searchBean = new StockSearchBean(); - searchBean.setStockTypeId("1"); - assertEquals(11, stocksRepository.findStocks(searchBean).size()); - - searchBean.setTransactionType("issued"); - searchBean.setProviderId("biddemo"); - assertEquals(3, stocksRepository.findStocks(searchBean).size()); - - searchBean = new StockSearchBean(); - searchBean.setValue("10"); - assertEquals(2, stocksRepository.findStocks(searchBean).size()); - - searchBean.setValue("2"); - stocks = stocksRepository.findStocks(searchBean); - assertEquals(1, stocks.size()); - assertEquals(14l, stocks.get(0).getIdentifier().longValue()); - assertEquals("1", stocks.get(0).getVaccine_type_id()); - assertEquals("DHO", stocks.get(0).getTo_from()); - assertEquals("received", stocks.get(0).getTransaction_type()); - - searchBean = new StockSearchBean(); - searchBean.setDateCreated("1518559200000"); - assertEquals(4, stocksRepository.findStocks(searchBean).size()); - - searchBean.setToFrom("DHO"); - assertEquals(2, stocksRepository.findStocks(searchBean).size()); - - searchBean.setDateUpdated("1521007053945"); - stocks = stocksRepository.findStocks(searchBean); - assertEquals(1, stocks.size()); - assertEquals(2l, stocks.get(0).getIdentifier().longValue()); - assertEquals("1", stocks.get(0).getVaccine_type_id()); - assertEquals("DHO", stocks.get(0).getTo_from()); - assertEquals("received", stocks.get(0).getTransaction_type()); - - searchBean = new StockSearchBean(); - searchBean.setServerVersion(1521009418783l); - assertEquals(11, stocksRepository.findStocks(searchBean).size()); - - searchBean.setServerVersion(1521023046990l); - assertEquals(8, stocksRepository.findStocks(searchBean).size()); - - } - - @Test - public void testFindAllStocks() { - assertEquals(15, stocksRepository.findAllStocks().size()); - stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2df09")); - List stocks = stocksRepository.findAllStocks(); - assertEquals(14, stocks.size()); - for (Stock stock : stocks) - assertNotEquals("05934ae338431f28bf6793b241b2df09", stock.getId()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ViewConfigurationRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ViewConfigurationRepositoryTest.java deleted file mode 100644 index 00511dc932..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ViewConfigurationRepositoryTest.java +++ /dev/null @@ -1,164 +0,0 @@ -package org.opensrp.repository.postgres; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.junit.Test; -import org.opensrp.domain.viewconfiguration.LoginConfiguration; -import org.opensrp.domain.viewconfiguration.View; -import org.opensrp.domain.viewconfiguration.ViewConfiguration; -import org.opensrp.repository.ViewConfigurationRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ViewConfigurationRepositoryTest extends BaseRepositoryTest { - - @Autowired - @Qualifier("viewConfigurationRepositoryPostgres") - private ViewConfigurationRepository viewConfigurationRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet<>(); - scripts.add("view_configuration.sql"); - return scripts; - } - - @Test - public void testGet() { - ViewConfiguration view = viewConfigurationRepository.get("19a2e8aa6739d77a2b780199c6122867"); - assertEquals("main", view.getIdentifier()); - assertEquals(1516890951253l, view.getServerVersion().longValue()); - - assertNull(viewConfigurationRepository.get("19a2e8aa6739d22867")); - - } - - @Test - public void testAdd() { - long now = System.currentTimeMillis(); - - ViewConfiguration viewConfiguration = new ViewConfiguration(); - viewConfiguration.setIdentifier("help"); - View view = new View(); - view.setIdentifier("faq"); - view.setLabel("FAQ"); - view.setVisible(true); - view.setOrientation("vertical"); - viewConfiguration.setViews(new ArrayList()); - viewConfiguration.getViews().add(view); - - viewConfigurationRepository.add(viewConfiguration); - - assertEquals(6, viewConfigurationRepository.getAll().size()); - - List savedViews = viewConfigurationRepository.findViewConfigurationsByVersion(now); - assertEquals(1, savedViews.size()); - assertEquals(1, savedViews.get(0).getViews().size()); - assertEquals("faq", savedViews.get(0).getViews().get(0).getIdentifier()); - } - - @Test - public void testUpdate() { - ViewConfiguration view = viewConfigurationRepository.get("92141b17040021a7ce326194ff0029f7"); - LoginConfiguration configuration = (LoginConfiguration) view.getMetadata(); - configuration.setShowPasswordCheckbox(false); - configuration.setLanguage("fr_cn"); - configuration.setLogoUrl("http://localhost:98778/test.jpg"); - view.setMetadata(configuration); - viewConfigurationRepository.update(view); - - LoginConfiguration updatedView = (LoginConfiguration) viewConfigurationRepository - .get("92141b17040021a7ce326194ff0029f7").getMetadata(); - assertEquals("fr_cn", updatedView.getLanguage()); - assertEquals("http://localhost:98778/test.jpg", updatedView.getLogoUrl()); - assertFalse(updatedView.getShowPasswordCheckbox()); - - } - - @Test - public void testGetAll() { - assertEquals(5, viewConfigurationRepository.getAll().size()); - - viewConfigurationRepository.safeRemove(viewConfigurationRepository.get("3a065d7c3354eb2bc23c8a3bc303ef62")); - - assertEquals(4, viewConfigurationRepository.getAll().size()); - } - - @Test - public void testSafeRemove() { - - ViewConfiguration view = viewConfigurationRepository.get("3a065d7c3354eb2bc23c8a3bc303ef62"); - viewConfigurationRepository.safeRemove(view); - - assertNull(viewConfigurationRepository.get(view.getId())); - - List views = viewConfigurationRepository.getAll(); - for (ViewConfiguration v : views) { - assertNotEquals(view.getId(), v.getId()); - assertNotEquals(view.getIdentifier(), v.getIdentifier()); - } - } - - @Test - public void testFindAllViewConfigurations() { - assertEquals(5, viewConfigurationRepository.getAll().size()); - - ViewConfiguration viewConfiguration = new ViewConfiguration(); - viewConfiguration.setIdentifier("bmi"); - - viewConfigurationRepository.add(viewConfiguration); - - assertEquals(6, viewConfigurationRepository.getAll().size()); - } - - @Test - public void testFindViewConfigurationsByVersion() { - assertEquals(5, viewConfigurationRepository.findViewConfigurationsByVersion(0l).size()); - - List views = viewConfigurationRepository.findViewConfigurationsByVersion(1516614392971l); - assertEquals(2, views.size()); - - for (ViewConfiguration view : views) { - assertTrue(view.getServerVersion() >= 1516614392971l); - assertTrue(view.getIdentifier().equals("positive_register_header") || view.getIdentifier().equals("main")); - } - - } - - @Test - public void testFindByEmptyServerVersion() { - assertTrue(viewConfigurationRepository.findByEmptyServerVersion().isEmpty()); - - ViewConfiguration view = viewConfigurationRepository.get("d243bc5737fb389e52601cb850299541"); - view.setServerVersion(null); - viewConfigurationRepository.update(view); - - List views = viewConfigurationRepository.findByEmptyServerVersion(); - assertEquals(1, views.size()); - assertEquals("lang_sw", views.get(0).getIdentifier()); - assertEquals("d243bc5737fb389e52601cb850299541", views.get(0).getId()); - - ViewConfiguration view2 = viewConfigurationRepository.get("3a065d7c3354eb2bc23c8a3bc303ba20"); - view2.setServerVersion(0l); - viewConfigurationRepository.update(view2); - - views = viewConfigurationRepository.findByEmptyServerVersion(); - assertEquals(2, views.size()); - - for (ViewConfiguration v : views) { - assertTrue(v.getIdentifier().equals(view.getIdentifier()) || v.getIdentifier().equals(view2.getIdentifier())); - assertTrue(v.getId().equals(view.getId()) || v.getId().equals(view2.getId())); - } - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/ActionTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/ActionTest.java deleted file mode 100644 index 8a361ecf10..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/ActionTest.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.opensrp.scheduler; - - -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.rule.impl.GetterMustExistRule; -import com.openpojo.validation.rule.impl.SetterMustExistRule; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; - -public class ActionTest { - - @Test - public void testEqualityAndHashCode() { - EqualsVerifier.forClass(Action.class).withIgnoredFields("id", "timeStamp", "revision").suppress(Warning.NONFINAL_FIELDS).verify(); - } - - @Test - public void testGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Action.class)); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/AlertTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/AlertTest.java deleted file mode 100644 index a52e9b166f..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/AlertTest.java +++ /dev/null @@ -1,128 +0,0 @@ -package org.opensrp.scheduler; - -import com.openpojo.reflection.filters.FilterPackageInfo; -import com.openpojo.reflection.impl.PojoClassFactory; -import com.openpojo.validation.Validator; -import com.openpojo.validation.ValidatorBuilder; -import com.openpojo.validation.rule.impl.GetterMustExistRule; -import com.openpojo.validation.rule.impl.SetterMustExistRule; -import com.openpojo.validation.test.impl.GetterTester; -import com.openpojo.validation.test.impl.SetterTester; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.dto.AlertStatus; - -import java.util.HashMap; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.doAnswer; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; - - -public class AlertTest { - - @Test - public void testEqualityAndHashCode() { - EqualsVerifier.forClass(Alert.class).withIgnoredFields("timeStamp", "revision") - .suppress(Warning.NONFINAL_FIELDS).verify(); - } - - @Test - public void testConstructorGetterAndSetter() { - Validator validator = ValidatorBuilder.create() - // Add Rules to validate structure for POJO_PACKAGE - // See com.openpojo.validation.rule.impl for more ... - .with(new GetterMustExistRule()) - .with(new SetterMustExistRule()) - // Add Testers to validate behaviour for POJO_PACKAGE - // See com.openpojo.validation.test.impl for more ... - .with(new SetterTester()) - .with(new GetterTester()) - .build(); - - validator.validate(PojoClassFactory.getPojoClass(Alert.class)); - } - - @Test(expected = IllegalStateException.class) - public void testExceptionMarkAsClosedWithClosedAlert() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.closed, - new HashMap()); - - alert.markAlertAsClosed("reason"); - } - - @Test(expected = IllegalStateException.class) - public void testExceptionMarkAsClosedWithCompletedAlert() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.complete, - new HashMap()); - - alert.markAlertAsClosed("reason"); - } - - @Test - public void testMarkAsClosed() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.normal, - new HashMap()); - - Alert spyAlert = spy(alert); - when(spyAlert.getCurrentDateTime()).thenReturn(new DateTime(1l)); - spyAlert.markAlertAsClosed("reason"); - - assertEquals("reason", spyAlert.reasonClosed()); - assertEquals(AlertStatus.normal.name(), spyAlert.closingPeriod()); - assertEquals(AlertStatus.closed.name(), spyAlert.alertStatus()); - assertEquals(new DateTime(1l).toLocalDate().toString(), spyAlert.dateClosed()); - assertFalse(spyAlert.isActive()); - } - - @Test(expected = IllegalStateException.class) - public void testExceptionMarkAsCompletedWithCompletedAlert() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.complete, - new HashMap()); - - alert.markAlertAsComplete("reason"); - } - - @Test(expected = IllegalStateException.class) - public void testExceptionMarkAsCompletedWithClosedAlert() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.closed, - new HashMap()); - - alert.markAlertAsComplete("reason"); - } - - @Test - public void testMarkAsCompleted() { - Alert alert = new Alert("pr", "en", "ben", - Alert.AlertType.notification, Alert.TriggerType.event, "", "", - new DateTime(1l), new DateTime(2l), AlertStatus.normal, - new HashMap()); - - - Alert spyAlert = spy(alert); - when(spyAlert.getCurrentDateTime()).thenReturn(new DateTime(1l)); - spyAlert.markAlertAsComplete("date"); - - assertEquals("date", spyAlert.getDateComplete()); - assertEquals( AlertStatus.normal.name(), spyAlert.closingPeriod()); - assertEquals(AlertStatus.complete.name(), spyAlert.alertStatus() ); - assertEquals(new DateTime(1l).toLocalDate().toString(), spyAlert.dateClosed()); - assertFalse(spyAlert.isActive()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/FormEventListenerTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/FormEventListenerTest.java deleted file mode 100644 index a90ae623a0..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/FormEventListenerTest.java +++ /dev/null @@ -1,91 +0,0 @@ -package org.opensrp.scheduler; - -import static java.util.Arrays.asList; -import static org.mockito.Mockito.verify; -import static org.mockito.Matchers.*; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.opensrp.common.util.EasyMap.mapOf; - -import java.text.Normalizer.Form; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.motechproject.scheduler.domain.MotechEvent; -import org.opensrp.common.AllConstants; -import org.opensrp.common.AllConstants.Config; -import org.opensrp.common.AllConstants.OpenSRPEvent; -import org.opensrp.domain.AppStateToken; -import org.opensrp.dto.form.FormSubmissionDTO; -import org.opensrp.form.domain.FormData; -import org.opensrp.form.domain.FormField; -import org.opensrp.form.domain.FormInstance; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.service.ConfigService; -import org.opensrp.service.ErrorTraceService; -import org.opensrp.service.formSubmission.FormSubmissionListener; -import org.opensrp.service.formSubmission.FormSubmissionProcessor; -import org.powermock.api.mockito.internal.verification.VerifyNoMoreInteractions; - -import com.google.gson.Gson; - -public class FormEventListenerTest { - @Mock - private FormSubmissionService formSubmissionService; - @Mock - private FormSubmissionProcessor fsp; - @Mock - private ConfigService configService; - @Mock - private ErrorTraceService errorTraceService; - - private FormSubmissionListener listener; - - @Before - public void setUp() throws Exception { - initMocks(this); - listener = new FormSubmissionListener(formSubmissionService, fsp, configService, errorTraceService); - } - - @Test - public void shouldDelegateFormSubmissionToSubmissionService() throws Exception { - List formSubmissions = asList(new FormSubmissionDTO("anm id 1", "instance id 1", "entity id 1", "form name", null, "0", "1"), - new FormSubmissionDTO("anm id 2", "instance id 2", "entity id 2", "form name", null, "0", "1")); - - listener.submitForms(new MotechEvent(OpenSRPEvent.FORM_SUBMISSION, mapOf("data", (Object) new Gson().toJson(formSubmissions)))); - - verify(formSubmissionService).submit(formSubmissions); - } - - @Test - public void shouldFetchFormSubmissionsFromSubmissionService() throws Exception { - FormSubmission fs1 = new FormSubmission("anm id 1", "instance id 1", "form name", "entity id 1", "1.0", 0L, new FormInstance(new FormData("test","def/bindpath", new ArrayList(), null))), - fs2 = new FormSubmission("anm id 2", "instance id 2", "form name", "entity id 2", "1.0", 0L, new FormInstance(new FormData("test","def/bindpath", new ArrayList(), null))); - List formSubmissions = asList(fs1,fs2); - when(configService.getAppStateTokenByName(Config.FORM_ENTITY_PARSER_LAST_SYNCED_FORM_SUBMISSION)).thenReturn(new AppStateToken("token", 1L, 0)); - when(formSubmissionService.getAllSubmissions(1L, null)).thenReturn(formSubmissions); - - listener.parseForms(); - - verify(fsp).processFormSubmission(fs1); - verify(fsp).processFormSubmission(fs2); - verify(configService, atLeast(2)).updateAppStateToken(eq(Config.FORM_ENTITY_PARSER_LAST_SYNCED_FORM_SUBMISSION), any(Long.class)); - verifyNoMoreInteractions(fsp); - } - - @Test - public void shouldNotDoAnythingIfFetchFromSubmissionServiceReturnsEmptyList() throws Exception { - when(configService.getAppStateTokenByName(Config.FORM_ENTITY_PARSER_LAST_SYNCED_FORM_SUBMISSION)).thenReturn(new AppStateToken("token", 1L, 0)); - when(formSubmissionService.getAllSubmissions(1L, null)).thenReturn(Collections.EMPTY_LIST); - - listener.parseForms(); - - verifyZeroInteractions(fsp); - } -} - diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingCornScheduleTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingCornScheduleTest.java deleted file mode 100644 index a1cdbb3895..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingCornScheduleTest.java +++ /dev/null @@ -1,54 +0,0 @@ -package org.opensrp.scheduler; - - -import org.junit.Test; -import org.omg.CosNaming.NamingContextExtPackage.StringNameHelper; - -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertEquals; - -public class RepeatingCornScheduleTest { - - public static final String CRON_EXPRESSION = "cornexpression"; - public static final int START_DELAY = 100; - public static final String SUBJECT = "Subject"; - RepeatingCronSchedule repeatingCronSchedule = new RepeatingCronSchedule(SUBJECT, START_DELAY, TimeUnit.HOURS, CRON_EXPRESSION); - - @Test - public void testMillisConverter() { - assertEquals(1/1000000l, repeatingCronSchedule.millisConverter(TimeUnit.NANOSECONDS)); - assertEquals(1/1000l, repeatingCronSchedule.millisConverter(TimeUnit.MICROSECONDS)); - assertEquals(1l, repeatingCronSchedule.millisConverter(TimeUnit.MILLISECONDS)); - assertEquals(1000l, repeatingCronSchedule.millisConverter(TimeUnit.SECONDS)); - assertEquals(1000*60, repeatingCronSchedule.millisConverter(TimeUnit.MINUTES)); - assertEquals(1000*60*60l, repeatingCronSchedule.millisConverter(TimeUnit.HOURS)); - assertEquals(1000*60*60*24, repeatingCronSchedule.millisConverter(TimeUnit.DAYS)); - } - - @Test - public void testConstructor() { - Map extraData = new HashMap<>(); - extraData.put("key1", "value1"); - RepeatingCronSchedule repeatingCronSchedule = new RepeatingCronSchedule(SUBJECT, START_DELAY, TimeUnit.MILLISECONDS, CRON_EXPRESSION, new Date(0l), extraData); - - assertEquals(extraData, repeatingCronSchedule.getData()); - assertEquals(new Date(0l), repeatingCronSchedule.getEndTime()); - assertEquals(START_DELAY, repeatingCronSchedule.getStartDelayMilis()); - - repeatingCronSchedule.addData("key2", "value2"); - extraData.put("key2", "value2"); - assertEquals(extraData, repeatingCronSchedule.getData()); - - repeatingCronSchedule.withData(Collections.EMPTY_MAP); - assertEquals(Collections.EMPTY_MAP, repeatingCronSchedule.getData()); - - repeatingCronSchedule.withEndTime(new Date(1l)); - assertEquals(new Date(1l), repeatingCronSchedule.getEndTime()); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingScheduleTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingScheduleTest.java deleted file mode 100644 index 8ca1a76fe4..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/RepeatingScheduleTest.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.opensrp.scheduler; - - -import org.junit.Test; -import org.opensrp.scheduler.RepeatingCronSchedule; -import org.opensrp.scheduler.RepeatingSchedule; - -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import static org.junit.Assert.assertEquals; -import static org.opensrp.scheduler.RepeatingCornScheduleTest.CRON_EXPRESSION; - -public class RepeatingScheduleTest { - public static final int START_DELAY = 100; - public static final String SUBJECT = "Subject"; - public static final int REPEAT_INTERVAL = 5; - RepeatingSchedule repeatingSchedule = new RepeatingSchedule(SUBJECT, START_DELAY, TimeUnit.HOURS, REPEAT_INTERVAL, TimeUnit.MILLISECONDS); - - @Test - public void testMillisConverter() { - assertEquals(1/1000000l, repeatingSchedule.millisConverter(TimeUnit.NANOSECONDS)); - assertEquals(1/1000l, repeatingSchedule.millisConverter(TimeUnit.MICROSECONDS)); - assertEquals(1l, repeatingSchedule.millisConverter(TimeUnit.MILLISECONDS)); - assertEquals(1000l, repeatingSchedule.millisConverter(TimeUnit.SECONDS)); - assertEquals(1000*60, repeatingSchedule.millisConverter(TimeUnit.MINUTES)); - assertEquals(1000*60*60l, repeatingSchedule.millisConverter(TimeUnit.HOURS)); - assertEquals(1000*60*60*24, repeatingSchedule.millisConverter(TimeUnit.DAYS)); - } - - @Test - public void testConstructor() { - Map extraData = new HashMap<>(); - extraData.put("key1", "value1"); - RepeatingSchedule repeatingSchedule = new RepeatingSchedule(SUBJECT, START_DELAY, TimeUnit.MILLISECONDS, REPEAT_INTERVAL, TimeUnit.MILLISECONDS, new Date(0l), extraData); - - assertEquals(extraData, repeatingSchedule.getData()); - assertEquals(new Date(0l), repeatingSchedule.getEndTime()); - assertEquals(START_DELAY, repeatingSchedule.getStartDelayMilis()); - assertEquals(REPEAT_INTERVAL, repeatingSchedule.getRepeatIntervalMilis()); - - repeatingSchedule.addData("key2", "value2"); - extraData.put("key2", "value2"); - assertEquals(extraData, repeatingSchedule.getData()); - - repeatingSchedule.withData(Collections.EMPTY_MAP); - assertEquals(Collections.EMPTY_MAP, repeatingSchedule.getData()); - - repeatingSchedule.withEndTime(new Date(1l)); - assertEquals(new Date(1l), repeatingSchedule.getEndTime()); - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleConfigTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleConfigTest.java deleted file mode 100644 index 9f6574e0ac..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleConfigTest.java +++ /dev/null @@ -1,219 +0,0 @@ -package org.opensrp.scheduler; - -import static org.junit.Assert.*; -import static org.hamcrest.Matchers.*; - -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.hamcrest.Matchers; -import org.json.JSONException; -import org.junit.Test; -import org.opensrp.scheduler.Schedule.ActionType; - -public class ScheduleConfigTest { - private ScheduleConfig schconfig; - - public ScheduleConfigTest() throws IOException, JSONException { - schconfig = new ScheduleConfig("/schedules/schedule-config.xls"); - } - - @SuppressWarnings("unchecked") - @Test - public void shouldReadAllPropertiesForSingleTriggerSingleForm() throws JSONException { - Schedule sch = new Schedule("{\"milestone\":\"pentavalent_1\",\"passLogic\":\"${fs.pentavalent_1} == empty && ${fs.pentavalent_1_retro} == empty\",\"schedule\":\"PENTAVALENT 1\",\"form\":\"child_enrollment\",\"triggerDateField\":\"child_birth_date\",\"action\":\"enroll\",\"entityType\":\"pkchild\"}"); - assertThat(sch, Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 1")), - Matchers.hasProperty("milestone",equalTo("pentavalent_1")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("triggerDateFields",hasItem("child_birth_date")), - Matchers.hasProperty("forms",hasItem("child_enrollment")) - )); - - assertEquals("PENTAVALENT 1", sch.schedule()); - assertEquals("pentavalent_1", sch.milestone()); - assertEquals(ActionType.enroll, sch.action()); - assertEquals("pkchild", sch.entityType()); - assertThat(sch.triggerDateFields(), hasItem("child_birth_date")); - assertThat(sch.forms(), hasItem("child_enrollment")); - } - - @SuppressWarnings("unchecked") - @Test - public void shouldReadAllPropertiesForMultipleTriggerMultipleForm() throws JSONException { - Schedule sch = new Schedule("{\"milestone\":\"pentavalent_2\"," - + "\"passLogic\":\"${fs.pentavalent_2} == empty && ${fs.pentavalent_2_retro} == empty\"," - + "\"schedule\":\"PENTAVALENT 2\",\"form\":\"child_enrollment,child_followup\"," - + "\"triggerDateField\":\"pentavalent_1, pentavalent_1_retro\"," - + "\"action\":\"enroll\",\"entityType\":\"pkchild\"}"); - assertThat(sch, Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 2")), - Matchers.hasProperty("milestone",equalTo("pentavalent_2")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("passLogic", anything()), - Matchers.hasProperty("triggerDateFields",hasItems("pentavalent_1","pentavalent_1_retro")), - Matchers.hasProperty("forms",hasItems("child_enrollment","child_followup")) - )); - - assertEquals("PENTAVALENT 2", sch.schedule()); - assertEquals("pentavalent_2", sch.milestone()); - assertEquals(ActionType.enroll, sch.action()); - assertEquals("pkchild", sch.entityType()); - assertThat(sch.triggerDateFields(), hasItems("pentavalent_1","pentavalent_1_retro")); - assertThat(sch.forms(), hasItems("child_enrollment","child_followup")); - } - - @SuppressWarnings("unchecked") - @Test - public void shouldLoadScheduleByFormName() { - List sch = schconfig.searchSchedules("child_enrollment"); - assertThat(sch, hasItem(Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 1")), - Matchers.hasProperty("milestone",equalTo("penta1")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("passLogic", anything()), - Matchers.hasProperty("triggerDateFields",hasItem("dob")) - ))); - - assertThat(sch, hasItem(Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 2")), - Matchers.hasProperty("milestone",equalTo("penta2")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("passLogic", anything()), - Matchers.hasProperty("triggerDateFields",hasItems("pentavalent_1","pentavalent_1_retro")), - Matchers.hasProperty("forms",hasItems("child_enrollment")) - ))); - - List schf = schconfig.searchSchedules("child_followup"); - assertThat(schf, hasItem(Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 2")), - Matchers.hasProperty("milestone",equalTo("penta2")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("passLogic", anything()), - Matchers.hasProperty("triggerDateFields",hasItems("pentavalent_1","pentavalent_1_retro")), - Matchers.hasProperty("forms",hasItems("child_followup")) - ))); - assertThat(schf, not(hasItem(Matchers.allOf( - Matchers.hasProperty("schedule",equalTo("PENTAVALENT 1")), - Matchers.hasProperty("milestone",equalTo("penta1")), - Matchers.hasProperty("action",equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType",equalTo("pkchild")), - Matchers.hasProperty("passLogic", anything()), - Matchers.hasProperty("triggerDateFields",hasItem("dob")) - )))); - } - - @Test - public void shouldReturnCorrectResultForValidation() { - List sch = schconfig.searchSchedules("child_enrollment", "PENTAVALENT 2", "penta2", ActionType.enroll); - assertEquals(1, sch.size()); - - Schedule s = sch.get(0); - - Map flvl = new HashMap<>(); - flvl.put("pentavalent_2", null); - flvl.put("pentavalent_2_retro", null); - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", ""); - flvl.put("pentavalent_2_retro", ""); - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", "a val"); - flvl.put("pentavalent_2_retro", ""); - assertFalse(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", "a val"); - flvl.put("pentavalent_2_retro", "a vale"); - assertFalse(s.passesValidations(flvl)); - - sch = schconfig.searchSchedules("pnc_reg_form", "Boosters", "REMINDER", ActionType.enroll); - assertEquals(1, sch.size()); - - s = sch.get(0); - - flvl = new HashMap<>(); - - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", null); - flvl.put("pentavalent_2_retro", null); - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", ""); - flvl.put("pentavalent_2_retro", ""); - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", "a val"); - flvl.put("pentavalent_2_retro", ""); - assertTrue(s.passesValidations(flvl)); - - flvl.put("pentavalent_2", "a val"); - flvl.put("pentavalent_2_retro", "a vale"); - assertTrue(s.passesValidations(flvl)); - } - - @Test - public void shouldReturnCorrectResultForApplicableEntity() { - List sch = schconfig.searchSchedules("child_enrollment", "PENTAVALENT 2", "penta2", ActionType.enroll); - assertEquals(1, sch.size()); - - Schedule s = sch.get(0); - assertTrue(s.applicableForEntity("pkchild")); - assertTrue(s.applicableForEntity(" pkchild ")); - assertFalse(s.applicableForEntity("pk child")); - assertFalse(s.applicableForEntity("otherstring")); - } - - @Test - public void shouldReturnCorrectResultForApplicableForm() { - List sch = schconfig.searchSchedules("child_enrollment", "PENTAVALENT 2", "penta2", ActionType.enroll); - assertEquals(1, sch.size()); - - Schedule s = sch.get(0); - assertTrue(s.hasForm("child_enrollment")); - assertFalse(s.hasForm("other form")); - } - - @Test - public void shouldReturnCorrectResultForLogicPresent() { - List sch = schconfig.searchSchedules("child_enrollment", "PENTAVALENT 2", "penta2", ActionType.enroll); - assertEquals(1, sch.size()); - - Schedule s = sch.get(0); - assertTrue(s.haspassLogic()); - - sch = schconfig.searchSchedules("pnc_reg_form", "Boosters", "REMINDER", ActionType.enroll); - assertEquals(1, sch.size()); - - s = sch.get(0); - assertFalse(s.haspassLogic()); - } - - @Test - public void shouldAddSchedule() { - List sch = schconfig.searchSchedules("child_enrollment", "PENTAVALENT 2", "penta2", ActionType.enroll); - Schedule s = sch.get(0); - - List actual = schconfig.getSchedules(); - Schedule lastSchedule = actual.get(actual.size()-1); - assertNotEquals(s, lastSchedule); - - schconfig.addSchedule(s); - - actual = schconfig.getSchedules(); - lastSchedule = actual.get(actual.size()-1); - - assertEquals(s, lastSchedule); - } - - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleTest.java deleted file mode 100644 index dfbe69842c..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/ScheduleTest.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.opensrp.scheduler; - - -import ch.maxant.rules.DuplicateNameException; -import com.google.gson.JsonParseException; -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.junit.Test; -import org.mvel2.CompileException; -import org.opensrp.util.Utils; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.ResourceLoader; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -public class ScheduleTest { - - @Test(expected = JSONException.class) - public void testConstructorInvalidString() throws JSONException { - new Schedule(" dsf"); - } - - @Test(expected = JSONException.class) - public void testWithInvalidJsonObject() throws JSONException { - new Schedule(new JSONObject()); - } - - @Test(expected = Exception.class) - public void testCompilerExceptionInPassesValidation() throws IOException, JSONException { - String scheduleConfigPath = "/schedules/schedule-config.xls"; - ResourceLoader loader=new DefaultResourceLoader(); - scheduleConfigPath = loader.getResource(scheduleConfigPath).getURI().getPath(); - - JSONArray xlsToJsonScheduleArray = Utils.getXlsToJson(scheduleConfigPath); - - String duplicatePassLogic = "${fs.pentavalent_2} !=s ${fs.pentavalent_2}"; - Schedule schedule = new Schedule(xlsToJsonScheduleArray.getJSONObject(0).put("passLogic", duplicatePassLogic)); - - Map flvl = new HashMap<>(); - - flvl.put("pentavalent_2", null); - schedule.passesValidations(flvl); - - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/SystemEventTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/SystemEventTest.java deleted file mode 100644 index ee5c248e24..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/SystemEventTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.opensrp.scheduler; - - -import com.google.gson.Gson; -import org.junit.Test; -import org.motechproject.scheduler.domain.MotechEvent; -import org.opensrp.common.FormEntityConstants; - -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.assertEquals; - -public class SystemEventTest { - - @Test - public void testMotechEventCreation() { - SystemEvent systemEvent = new SystemEvent("subject", "data"); - Map parameters = new HashMap<>(); - parameters.put(SystemEvent.DATA, new Gson().toJson("data")); - MotechEvent expected = new MotechEvent("subject", parameters); - - assertEquals(expected, systemEvent.toMotechEvent()); - - } - - @Test - public void testMotechEventCreationWintEnum() { - SystemEvent systemEvent = new SystemEvent(FormEntityConstants.Person.first_name, "data"); - Map parameters = new HashMap<>(); - parameters.put(SystemEvent.DATA, new Gson().toJson("data")); - MotechEvent expected = new MotechEvent(FormEntityConstants.Person.first_name.name(), parameters); - - assertEquals(expected, systemEvent.toMotechEvent()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/TaskSchedulerServiceTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/TaskSchedulerServiceTest.java deleted file mode 100644 index 3f485abf27..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/TaskSchedulerServiceTest.java +++ /dev/null @@ -1,113 +0,0 @@ -package org.opensrp.scheduler; - - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.motechproject.scheduler.MotechSchedulerService; -import org.motechproject.scheduler.domain.CronSchedulableJob; -import org.motechproject.scheduler.domain.MotechEvent; -import org.motechproject.scheduler.domain.RepeatingSchedulableJob; -import org.motechproject.scheduler.gateway.OutboundEventGateway; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; - -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - - -public class TaskSchedulerServiceTest { - public static final String SUBJECT = "subject"; - @Mock - MotechSchedulerService motechSchedulerService; - @Mock - OutboundEventGateway outboundEventGateway; - @Mock - AlertRouter alertRouter; - - @InjectMocks - TaskSchedulerService taskSchedulerService = new TaskSchedulerService(motechSchedulerService,outboundEventGateway, alertRouter); - - @Before - public void setUp() { - initMocks(this); - } - - @Test - public void testStartJobWithRepeatingSchedule() { - Map extraData = new HashMap<>(); - extraData.put("key1", "value1"); - RepeatingSchedule repeatingSchedule = new RepeatingSchedule(SUBJECT, 5, TimeUnit.MILLISECONDS, 4, TimeUnit.MILLISECONDS, new Date(1l), extraData); - TaskSchedulerService spyTaskSchedulingService = spy(taskSchedulerService); - when(spyTaskSchedulingService.getCurrentTime()).thenReturn(new DateTime(0l)); - - spyTaskSchedulingService.startJob(repeatingSchedule); - - MotechEvent motechEvent = new MotechEvent(SUBJECT, extraData); - verify(spyTaskSchedulingService).createRepeatingSchedulableJob(motechEvent,new DateTime(0l).plusMillis(5).toDate(), new Date(1l), 4l); - } - - @Test - public void testStartJobWithRepeatingScheduleWithNullData() { - RepeatingSchedule repeatingSchedule = new RepeatingSchedule(SUBJECT, 5, TimeUnit.MILLISECONDS, 4, TimeUnit.MILLISECONDS, new Date(1l), null); - TaskSchedulerService spyTaskSchedulingService = spy(taskSchedulerService); - when(spyTaskSchedulingService.getCurrentTime()).thenReturn(new DateTime(0l)); - - spyTaskSchedulingService.startJob(repeatingSchedule); - - MotechEvent motechEvent = new MotechEvent(SUBJECT, new HashMap()); - verify(spyTaskSchedulingService).createRepeatingSchedulableJob(motechEvent,new DateTime(0l).plusMillis(5).toDate(), new Date(1l), 4l); - } - - @Test - public void testStartJobWithCornSchedule() { - Map extraData = new HashMap<>(); - extraData.put("key1", "value1"); - String cronExpression = "corn"; - RepeatingCronSchedule repeatingCronSchedule = new RepeatingCronSchedule(SUBJECT, 5, TimeUnit.MILLISECONDS, cronExpression, new Date(1l), extraData); - TaskSchedulerService spyTaskSchedulingService = spy(taskSchedulerService); - when(spyTaskSchedulingService.getCurrentTime()).thenReturn(new DateTime(0l)); - - spyTaskSchedulingService.startJob(repeatingCronSchedule); - - MotechEvent motechEvent = new MotechEvent(SUBJECT, extraData); - CronSchedulableJob cronSchedulableJob = new CronSchedulableJob(motechEvent, cronExpression,new DateTime(0l).plusMillis(5).toDate(), new Date(1l)); - - verify(motechSchedulerService).safeScheduleJob(cronSchedulableJob); - } - - @Test - public void testStartJobWithCornScheduleWithNullData() { - String cronExpression = "corn"; - RepeatingCronSchedule repeatingCronSchedule = new RepeatingCronSchedule(SUBJECT, 5, TimeUnit.MILLISECONDS, cronExpression, new Date(1l), null); - TaskSchedulerService spyTaskSchedulingService = spy(taskSchedulerService); - when(spyTaskSchedulingService.getCurrentTime()).thenReturn(new DateTime(0l)); - - spyTaskSchedulingService.startJob(repeatingCronSchedule); - - MotechEvent motechEvent = new MotechEvent(SUBJECT, new HashMap()); - CronSchedulableJob cronSchedulableJob = new CronSchedulableJob(motechEvent, cronExpression,new DateTime(0l).plusMillis(5).toDate(), new Date(1l)); - - verify(motechSchedulerService).safeScheduleJob(cronSchedulableJob); - } - - @Test - public void testNotifyEvent() { - SystemEvent systemEvent = new SystemEvent(SUBJECT, "data"); - - taskSchedulerService.notifyEvent(systemEvent); - - verify(outboundEventGateway).sendEventMessage(systemEvent.toMotechEvent()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertCreationActionTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertCreationActionTest.java deleted file mode 100644 index a4da1fcab4..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertCreationActionTest.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.opensrp.scheduler.router; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.scheduler.AlertCreationAction; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.util.TestResourceLoader; - -import java.io.IOException; - -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.opensrp.util.ScheduleBuilder.enrollment; -import static org.opensrp.util.ScheduleBuilder.event; - -public class AlertCreationActionTest extends TestResourceLoader { - - public AlertCreationActionTest() throws IOException { - super(); - } - - @Mock - private HealthSchedulerService scheduler; - - private DateTime dueWindowStart; - private DateTime lateWindowStart; - private DateTime maxWindowStart; - - private AlertCreationAction reminderAction; - - @Mock - private FormSubmissionService formSubmissionService; - - private FormSubmission fs; - - @Before - public void setUp() throws Exception { - initMocks(this); - reminderAction = new AlertCreationAction(scheduler, formSubmissionService); - - dueWindowStart = DateTime.now(); - lateWindowStart = DateTime.now().plusDays(10); - maxWindowStart = DateTime.now().plusDays(20); - - fs = getFormSubmissionFor("child_enrollment", 1); - when(formSubmissionService.findByInstanceId(fs.instanceId())).thenReturn(fs); - when(scheduler.getEnrollment(fs.entityId(), "PENTAVALENT 1")) - .thenReturn(enrollment(fs.entityId(), "PENTAVALENT 1", "pentavalent_1", - null, null, EnrollmentStatus.ACTIVE, fs.instanceId())); - } - - @Test - public void shouldRaiseUpcomingAlertActionsForDueWindowAlerts() throws Exception { - reminderAction.invoke(event(fs.entityId(), "PENTAVALENT 1", "pentavalent_1", WindowName.earliest, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.earliest.toString(), "pkchild", fs.entityId(), "demotest", "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - @Test - public void shouldRaiseNormalAlertActionsForDueWindowAlerts() throws Exception { - reminderAction.invoke(event(fs.entityId(), "PENTAVALENT 1", "pentavalent_1", WindowName.due, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.due.toString(), "pkchild", fs.entityId(), "demotest", "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - @Test - public void shouldRaiseUrgentAlertActionsForLateWindowAlerts() throws Exception { - reminderAction.invoke(event(fs.entityId(), "PENTAVALENT 1", "pentavalent_1", WindowName.late, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.late.toString(), "pkchild", fs.entityId(), "demotest", "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - @Test - public void shouldRaiseExpiredAlertActionsForMaxWindowAlerts() throws Exception { - reminderAction.invoke(event(fs.entityId(), "PENTAVALENT 1", "pentavalent_1", WindowName.max, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.max.toString(), "pkchild", fs.entityId(), "demotest", "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - @Test - public void shouldUseUnknownIfEntityIdDoesntMatch() { - String invalidId = "11"; - when(scheduler.getEnrollment(invalidId, "PENTAVALENT 1")) - .thenReturn(enrollment(invalidId, "PENTAVALENT 1", "pentavalent_1", - null, null, EnrollmentStatus.ACTIVE, fs.instanceId())); - - - reminderAction.invoke(event(invalidId, "PENTAVALENT 1", "pentavalent_1", WindowName.earliest, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.earliest.toString(), AlertCreationAction.UNKNOWN_ENTITY_TYPE, invalidId, "demotest", "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - @Test - public void shouldUseSubFormEntityTypeIfSubFormIdGiven() throws IOException { - //Following variables mirror to the form fetched from directory - String subFormId = "ce71572a-8oc5-u32f-9d3b-4a6b568d5g77"; - String subFormBindType = "elco"; - String providerId = "opensrp"; - fs = getFormSubmissionFor("new_household_registration_with_grouped_subform_data", 1); - - when(formSubmissionService.findByInstanceId(fs.instanceId())).thenReturn(fs); - when(scheduler.getEnrollment(subFormId, "PENTAVALENT 1")) - .thenReturn(enrollment(subFormId, "PENTAVALENT 1", "pentavalent_1", - null, null, EnrollmentStatus.ACTIVE, fs.instanceId())); - - reminderAction.invoke(event(subFormId, "PENTAVALENT 1", "pentavalent_1", WindowName.earliest, dueWindowStart, lateWindowStart, maxWindowStart), null); - - verify(scheduler).alertFor(WindowName.earliest.toString(), subFormBindType, subFormId, providerId, "PENTAVALENT 1", "pentavalent_1", dueWindowStart, lateWindowStart, maxWindowStart); - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertHandlerRoutesTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertHandlerRoutesTest.java deleted file mode 100644 index e4ea883465..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertHandlerRoutesTest.java +++ /dev/null @@ -1,296 +0,0 @@ -package org.opensrp.scheduler.router; - -import org.junit.Test; -import org.motechproject.scheduler.domain.MotechEvent; -import org.motechproject.scheduletracking.api.domain.MilestoneAlert; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.opensrp.scheduler.*; - -import java.util.HashMap; -import java.util.Map; - -import static org.mockito.Mockito.*; -import static org.motechproject.scheduletracking.api.domain.WindowName.max; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.*; - -public class AlertHandlerRoutesTest { - - public static final String SCHEDULE_LAB = "EC EVENT"; - - - @Test - public void shouldRouteToProperEcHandeler() { - Event.of(SCHEDULE_LAB, "Milestone", max).shouldRouteToECAlertCreation(); - } - - - /* - @Test - public void shouldSendMaxEventsOfANCNormalScheduleToForceFulfillAction() { - Event.of(SCHEDULE_ANC, "ANC 1", max).shouldRouteToForceFulfillAction(); - Event.of(SCHEDULE_ANC, "ANC 3", max).shouldRouteToForceFulfillAction(); - } - - @Test - public void shouldSendMaxEventsOfLabRemindersScheduleToForceFulfillAction() { - Event.of(SCHEDULE_LAB, "EDD", max).shouldRouteToForceFulfillAction(); - } - @Test - public void shouldSendDueRemindersOfAllMotherSchedulesToCaptureRemindersAction() throws Exception { - Event.of(SCHEDULE_ANC, "ANC 1", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_ANC, "ANC 1", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_LAB, "Reminder", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_LAB, "Reminder", late).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_EDD, "Reminder", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_EDD, "Reminder", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_IFA_1, "IFA 1", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 1", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 1", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_IFA_1, "IFA 2", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 2", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 2", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_IFA_1, "IFA 3", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 3", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_IFA_1, "IFA 3", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_TT_1, "TT 1", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_TT_1, "TT 1", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_TT_1, "TT 1", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_TT_2, "TT 2", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_TT_2, "TT 2", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_TT_2, "TT 2", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_HB_TEST_1, "Hb Test 1", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_TEST_1, "Hb Test 1", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_TEST_1, "Hb Test 1", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_HB_TEST_2, "Hb Test 2", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_TEST_2, "Hb Test 2", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_TEST_2, "Hb Test 2", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_HB_FOLLOWUP_TEST, "Hb Followup Test", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_FOLLOWUP_TEST, "Hb Followup Test", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_HB_FOLLOWUP_TEST, "Hb Followup Test", late).shouldRouteToAlertCreationActionForMother(); - - Event.of(SCHEDULE_DELIVERY_PLAN, "Delivery Plan", earliest).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_DELIVERY_PLAN, "Delivery Plan", due).shouldRouteToAlertCreationActionForMother(); - Event.of(SCHEDULE_DELIVERY_PLAN, "Delivery Plan", late).shouldRouteToAlertCreationActionForMother(); - } -*/ - /* @Test - public void shouldSendReminderForAllChildSchedulesToCaptureRemindersAction() throws Exception { - Event.of(CHILD_SCHEDULE_BCG, "BCG", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_BCG, "BCG", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_BCG, "BCG", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_MEASLES, "Measles", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_MEASLES, "Measles", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_MEASLES, "Measles", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_MEASLES_BOOSTER, "Measles Booster", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_MEASLES_BOOSTER, "Measles Booster", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_MEASLES_BOOSTER, "Measles Booster", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_DPT_BOOSTER1, "dptbooster_1", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_DPT_BOOSTER1, "dptbooster_1", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_DPT_BOOSTER1, "dptbooster_1", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_DPT_BOOSTER2, "dptbooster_2", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_DPT_BOOSTER2, "dptbooster_2", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_DPT_BOOSTER2, "dptbooster_2", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_0", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_0", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_0", late).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_0", max).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_1", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_1", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_1", late).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_0_AND_1, "opv_1", max).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_OPV_2, "opv_2", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_2, "opv_2", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_2, "opv_2", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_OPV_3, "opv_3", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_3, "opv_3", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_3, "opv_3", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_OPV_BOOSTER, "opvbooster", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_BOOSTER, "opvbooster", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_OPV_BOOSTER, "opvbooster", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_PENTAVALENT_1, "pentavalent_1", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_1, "pentavalent_1", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_1, "pentavalent_1", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_PENTAVALENT_2, "pentavalent_2", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_2, "pentavalent_2", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_2, "pentavalent_2", late).shouldRouteToAlertCreationActionForChild(); - - Event.of(CHILD_SCHEDULE_PENTAVALENT_3, "pentavalent_3", earliest).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_3, "pentavalent_3", due).shouldRouteToAlertCreationActionForChild(); - Event.of(CHILD_SCHEDULE_PENTAVALENT_3, "pentavalent_3", late).shouldRouteToAlertCreationActionForChild(); - } - - @Test - public void shouldSendDueRemindersOfAllEcsToCaptureRemindersAction() throws Exception { - Event.of(EC_SCHEDULE_DMPA_INJECTABLE_REFILL, "DMPA Injectable Refill", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_DMPA_INJECTABLE_REFILL, "DMPA Injectable Refill", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_DMPA_INJECTABLE_REFILL, "DMPA Injectable Refill", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_OCP_REFILL, "OCP Refill", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_OCP_REFILL, "OCP Refill", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_OCP_REFILL, "OCP Refill", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_CONDOM_REFILL, "Condom Refill", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_CONDOM_REFILL, "Condom Refill", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_CONDOM_REFILL, "Condom Refill", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_FEMALE_STERILIZATION_FOLLOWUP, "Female sterilization followup", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_FEMALE_STERILIZATION_FOLLOWUP, "Female sterilization followup", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_FEMALE_STERILIZATION_FOLLOWUP, "Female sterilization followup", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_MALE_STERILIZATION_FOLLOWUP, "Male sterilization followup", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_MALE_STERILIZATION_FOLLOWUP, "Male sterilization followup", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_MALE_STERILIZATION_FOLLOWUP, "Male sterilization followup", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_IUD_FOLLOWUP, "IUD followup", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_IUD_FOLLOWUP, "IUD followup", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_IUD_FOLLOWUP, "IUD followup", late).shouldRouteToAlertCreationActionForEC(); - - Event.of(EC_SCHEDULE_FP_FOLLOWUP, "FP Referral Followup", earliest).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_FP_FOLLOWUP, "FP Referral Followup", due).shouldRouteToAlertCreationActionForEC(); - Event.of(EC_SCHEDULE_FP_FOLLOWUP, "FP Referral Followup", late).shouldRouteToAlertCreationActionForEC(); - } - - @Test - public void shouldSendDueRemindersOfPNCCloseToAutoClosePNCAction() throws Exception { - Event.of(SCHEDULE_AUTO_CLOSE_PNC, "PNC Close", due).shouldRouteToAutoClosePNCAction(); - }*/ - - public static class Event { - private final String schedule; - private final String milestone; - private final WindowName window; - private String externalId; - - private Event(String schedule, String milestone, WindowName window) { - this.schedule = schedule; - this.milestone = milestone; - this.window = window; - } - - public static Event of(String schedule, String milestone, WindowName window) { - return new Event(schedule, milestone, window); - } - - public static Event of(String externalId, String schedule, String milestone, WindowName window) { - Event event = new Event(schedule, milestone, window); - event.externalId = externalId; - return event; - } - - public void shouldRouteToECAlertCreation() { - expectCallsToECAlertCreation(Expectation.of(1)); - } - - public void expectCallsToECAlertCreation(Expectation fulfillActionCallsExpected) { - ECAlertCreationAction ecAlertCreationAction = mock(ECAlertCreationAction.class); - - MotechEvent event = routeEvent(ecAlertCreationAction, null, null); - - verify(ecAlertCreationAction, times(fulfillActionCallsExpected.numberOfCallsExpected)).invoke(new MilestoneEvent(event), fulfillActionCallsExpected.extraDataExpected); - } - - /* - public void shouldRouteToForceFulfillAction() { - expectCalls(Expectation.of(1), Expectation.of(0), Expectation.of(0)); - } - - public void shouldRouteToAlertCreationActionForMother() { - Map extraData = new HashMap<>(); - extraData.put("beneficiaryType", "mother"); - expectCalls(Expectation.of(0), Expectation.of(1, extraData), Expectation.of(0)); - } - - public void shouldRouteToAlertCreationActionForChild() { - Map extraData = new HashMap<>(); - extraData.put("beneficiaryType", "child"); - expectCalls(Expectation.of(0), Expectation.of(1, extraData), Expectation.of(0)); - } - - public void shouldRouteToAlertCreationActionForEC() { - Map extraData = new HashMap<>(); - extraData.put("beneficiaryType", "ec"); - expectCalls(Expectation.of(0), Expectation.of(1, extraData), Expectation.of(0)); - } - - public void shouldRouteToAutoClosePNCAction() { - expectCalls(Expectation.of(0), Expectation.of(0), Expectation.of(1)); - } - - private void expectCalls(Expectation fulfillActionCallsExpected, Expectation captureReminderActionCallsExpected, Expectation autoClosePNCActionCallsExpected) { - HookedEvent forceFulfillAction = mock(ECAlertCreationAction.class); - HookedEvent captureANCReminderAction = mock(HookedEvent.class); - HookedEvent autoClosePNCAction = mock(HookedEvent.class); - - MotechEvent event = routeEvent(forceFulfillAction, captureANCReminderAction, autoClosePNCAction); - - verify(forceFulfillAction, times(fulfillActionCallsExpected.numberOfCallsExpected)).invoke(new MilestoneEvent(event), fulfillActionCallsExpected.extraDataExpected); - verify(captureANCReminderAction, times(captureReminderActionCallsExpected.numberOfCallsExpected)).invoke(new MilestoneEvent(event), captureReminderActionCallsExpected.extraDataExpected); - verify(autoClosePNCAction, times(autoClosePNCActionCallsExpected.numberOfCallsExpected)).invoke(new MilestoneEvent(event), autoClosePNCActionCallsExpected.extraDataExpected); - }*/ - - public MotechEvent routeEvent(HookedEvent ancMissedAction, HookedEvent captureANCReminderAction, HookedEvent autoClosePNCAction) { - AlertRouter router = new AlertRouter(); - TaskSchedulerService sf = new TaskSchedulerService(null, null, router); - new AlertHandler(sf, ancMissedAction); - MotechEvent event = createMotechEvent(); - - router.handleAlerts(event); - - return event; - } - - public MotechEvent createMotechEvent() { - MilestoneAlert alert = mock(MilestoneAlert.class); - when(alert.getMilestoneName()).thenReturn(milestone); - - - Map parameters = new HashMap<>(); - - parameters.put(EXTERNAL_ID, externalId); - parameters.put(SCHEDULE_NAME, schedule); - parameters.put(MILESTONE_NAME, alert); - parameters.put(WINDOW_NAME, window.toString()); - - - return new MotechEvent("Subject", parameters); - } - - public static class Expectation { - private final int numberOfCallsExpected; - private final Map extraDataExpected; - - public static Expectation of(int numberOfCallsExpected) { - return new Expectation(numberOfCallsExpected, new HashMap()); - } - - public static Expectation of(int numberOfCallsExpected, Map extraDataExpected) { - return new Expectation(numberOfCallsExpected, extraDataExpected); - } - - public Expectation(int numberOfCallsExpected, Map extraDataExpected) { - this.numberOfCallsExpected = numberOfCallsExpected; - this.extraDataExpected = extraDataExpected; - } - } - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertRouterTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertRouterTest.java deleted file mode 100644 index 5638afb107..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/router/AlertRouterTest.java +++ /dev/null @@ -1,215 +0,0 @@ -package org.opensrp.scheduler.router; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.motechproject.scheduler.domain.MotechEvent; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.MilestoneAlert; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.motechproject.scheduletracking.api.events.constants.EventDataKeys; -import org.opensrp.domain.Event; -import org.opensrp.dto.ActionData; -import org.opensrp.dto.AlertStatus; -import org.opensrp.scheduler.*; -import org.opensrp.scheduler.service.ActionService; -import org.opensrp.scheduler.service.ScheduleService; -import org.opensrp.service.EventService; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import static org.junit.Assert.fail; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.*; -import static org.opensrp.scheduler.Matcher.any; -import static org.opensrp.scheduler.Matcher.eq; - -public class AlertRouterTest { - public static final String SAMPLE_ID = "11"; - public static final String SCHEDULE_NAME = "scheduleName"; - public static final String MILESTONE_NAME = "milestoneName"; - public static final String WINDOW_NAME = "windowName"; - @Mock - private HookedEvent firstAction; - - @Mock - private HookedEvent secondAction; - - @Mock - private HookedEvent thirdAction; - - @Mock - private ScheduleService scheduleService; - - @Mock - private EventService eventService; - - @Mock - private ActionService actionService; - - @InjectMocks - private AlertRouter router = new AlertRouter(); - - @Before - public void setUp() throws Exception { - initMocks(this); - } - - @Test - public void shouldBeAbleToSetACatchAllRoute() { - router.addRoute(any(), any(), any(), firstAction); - - assertRouteMatches("someSchedule", "someMilestone", "someWindow", firstAction, new HashMap()); - assertRouteMatches("someOtherSchedule", "someOtherMilestone", "someOtherWindow", firstAction, new HashMap()); - } - - - @Test - public void shouldBeAbleToSetARouteWhichMatchesBasedOnScheduleNameOnly() { - router.addRoute(eq("Schedule X"), any(), any(), firstAction); - - assertNoRoutesMatch("someSchedule", "someMilestone", "someWindow"); - assertRouteMatches("Schedule X", "someMilestone", "someWindow", firstAction, new HashMap()); - } - - @Test - public void shouldBeAbleToSetARouteWhichMatchesBasedOnMilestoneNameOnly() { - router.addRoute(any(), eq("Milestone X"), any(), firstAction); - - assertNoRoutesMatch("someSchedule", "someMilestone", "someWindow"); - assertRouteMatches("someOtherSchedule", "Milestone X", "someWindow", firstAction, new HashMap()); - } - - @Test - public void shouldBeAbleToSetARouteWhichMatchesBasedOnWindowNameOnly() { - router.addRoute(any(), any(), eq("Window X"), firstAction); - - assertNoRoutesMatch("someSchedule", "someMilestone", "someWindow"); - assertRouteMatches("someOtherSchedule", "someOtherMilestone", "Window X", firstAction, new HashMap()); - } - - @Test - public void shouldBeAbleToSetARouteWhichMatchesBasedOnACombinationOfMatchers() { - router.addRoute(eq("Milestone X"), any(), eq("Window X"), firstAction); - - assertNoRoutesMatch("someSchedule", "someMilestone", "someWindow"); - assertNoRoutesMatch("Milestone X", "someMilestone", "someWindow"); - assertNoRoutesMatch("someSchedule", "someMilestone", "Window X"); - assertRouteMatches("Milestone X", "someOtherMilestone", "Window X", firstAction, new HashMap()); - } - - @Test - public void shouldBeAbleToSetARouteWithExtraData() { - router.addRoute(eq("Milestone X"), any(), eq("Window X"), firstAction).addExtraData("Unicorns", "AreFun"); - - assertNoRoutesMatch("someSchedule", "someMilestone", "someWindow"); - assertNoRoutesMatch("Milestone X", "someMilestone", "someWindow"); - assertNoRoutesMatch("someSchedule", "someMilestone", "Window X"); - - HashMap extraData = new HashMap<>(); - extraData.put("Unicorns", "AreFun"); - assertRouteMatches("Milestone X", "someOtherMilestone", "Window X", firstAction, extraData); - } - - @Test - public void shouldInvokeTheActionOfOnlyTheFirstRouteWhichMatchesInTheOrderInWhichTheyWereAdded() { - router.addRoute(any(), any(), eq("Window X"), firstAction); - router.addRoute(any(), any(), any(), secondAction); - - assertRouteMatches("someSchedule", "someMilestone", "Window X", firstAction, new HashMap()); - verifyZeroInteractions(secondAction); - - assertRouteMatches("someSchedule", "someMilestone", "someOtherWindow", secondAction, new HashMap()); - verifyZeroInteractions(firstAction); - } - - @Test - public void shouldNotTryAndLookAtTheBestMatchButJustTheFirstProperMatch() { - router.addRoute(any(), any(), eq("Window X"), firstAction); - router.addRoute(eq("Milestone X"), any(), eq("Window X"), secondAction); - - assertRouteMatches("Milestone X", "someMilestone", "Window X", firstAction, new HashMap()); - verifyZeroInteractions(secondAction); - } - - @Test(expected = NoRoutesMatchException.class) - public void shouldFailIfNoRoutesMatch() { - router.handleAlerts(event("scheduleName", "milestoneName", "windowName")); - } - - @Test - public void shouldManuallyCallActionServiceIfExceptionHappen() throws IOException { - String entityType = "eT"; - String providerId = "PI"; - String enrollmentId = SAMPLE_ID; - String eventId = SAMPLE_ID; - DateTime sampleDate = new DateTime(0l); - - Map metaData = new HashMap<>(); - metaData.put(HealthSchedulerService.MetadataField.enrollmentEvent.name(), SAMPLE_ID); - - Event event = new Event(); - event.setEntityType(entityType); - event.setProviderId(providerId); - - Enrollment enrollment = mock(Enrollment.class); - - when(scheduleService.getEnrollment(enrollmentId)).thenReturn(enrollment); - when(enrollment.getMetadata()).thenReturn(metaData); - when(enrollment.getScheduleName()).thenReturn(SCHEDULE_NAME); - when(enrollment.getCurrentMilestoneName()).thenReturn(MILESTONE_NAME); - when(enrollment.getCurrentMilestoneStartDate()).thenReturn(sampleDate); - when(enrollment.getStartOfWindowForCurrentMilestone(WindowName.max)).thenReturn(sampleDate); - when(eventService.getById(eventId)).thenReturn(event); - - - ActionData actionData = ActionData.createAlert(entityType, SCHEDULE_NAME, MILESTONE_NAME, - AlertStatus.defaulted, sampleDate, sampleDate); - Action action = new Action(SAMPLE_ID, providerId, actionData); - - - router.addRoute(null); - router.handleAlerts(event(SCHEDULE_NAME, MILESTONE_NAME, WINDOW_NAME)); - - verify(actionService).alertForBeneficiary(action); - - } - - private void assertRouteMatches(String schedule, String milestone, String window, HookedEvent action, HashMap extraData) { - MotechEvent event = handleEvent(schedule, milestone, window); - verify(action, times(1)).invoke(new MilestoneEvent(event), extraData); - } - - private void assertNoRoutesMatch(String schedule, String milestone, String window) { - try { - handleEvent(schedule, milestone, window); - fail("Expected no routes to match! It matched a route."); - } catch (NoRoutesMatchException e) { - } - } - - private MotechEvent handleEvent(String schedule, String milestone, String window) { - MotechEvent event = event(schedule, milestone, window); - router.handleAlerts(event); - return event; - } - - private MotechEvent event(String scheduleName, String milestoneName, String windowName) { - MilestoneAlert alert = mock(MilestoneAlert.class); - when(alert.getMilestoneName()).thenReturn(milestoneName); - - Map parameters = new HashMap(); - parameters.put(EventDataKeys.SCHEDULE_NAME, scheduleName); - parameters.put(EventDataKeys.MILESTONE_NAME, alert); - parameters.put(EventDataKeys.WINDOW_NAME, windowName); - parameters.put(EXTERNAL_ID, SAMPLE_ID); - parameters.put(ENROLLMENT_ID, SAMPLE_ID); - - return new MotechEvent("Subject", parameters); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/router/HealthSchedulesTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/router/HealthSchedulesTest.java deleted file mode 100644 index f0e1ecf114..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/router/HealthSchedulesTest.java +++ /dev/null @@ -1,225 +0,0 @@ -package org.opensrp.scheduler.router; - - -import com.google.gson.JsonIOException; -import org.hamcrest.Matchers; -import org.joda.time.DateTime; -import org.json.JSONException; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.opensrp.dto.BeneficiaryType; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.Schedule; -import org.opensrp.scheduler.Schedule.ActionType; -import org.opensrp.scheduler.ScheduleConfig; -import org.opensrp.scheduler.service.ActionService; -import org.opensrp.scheduler.service.ScheduleService; -import org.opensrp.util.TestResourceLoader; - -import java.io.IOException; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.hasItem; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertThat; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.motechproject.scheduletracking.api.domain.WindowName.*; -import static org.opensrp.dto.AlertStatus.*; - -public class HealthSchedulesTest extends TestResourceLoader { - - public static final String BENIFICIARY_TYPE = "benificiaryType"; - public static final String ENTITY_ID = "entityId"; - public static final String PROVIDER_ID = "providerId"; - public static final String SCHEDULE_NAME = "schedule"; - public static final String MILESTONE = "milestone"; - public static final String REASONFOR_CLOSE = "reasonforClose"; - public static final String FORM_SUBMISSION_ID = "formSubmissionId"; - DateTime startOfDueWindow = new DateTime(0l); - DateTime startOfLateWindow = new DateTime(1l); - DateTime startOfMaxWindow = new DateTime(2l); - - public HealthSchedulesTest() throws IOException { - super(); - } - - private HealthSchedulerService sch; - private ScheduleConfig scheduleConfig; - @Mock - private ScheduleService schService; - @Mock - private ActionService actionService; - - @Before - public void setUp() throws IOException, JSONException { - initMocks(this); - - scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); - sch = new HealthSchedulerService(actionService, schService, scheduleConfig); - } - - @SuppressWarnings("unchecked") - @Test - public void testFindAutomatedSchedules() throws JsonIOException, IOException { - FormSubmission fs = getFormSubmissionFor("child_enrollment", 3); - List s = sch.findAutomatedSchedules(fs.formName()); - assertThat(s, hasItem(Matchers.allOf( - Matchers.hasProperty("schedule", equalTo("PENTAVALENT 1")), - Matchers.hasProperty("milestone", equalTo("penta1")), - Matchers.hasProperty("action", equalTo(ActionType.enroll)), - Matchers.hasProperty("entityType", equalTo("pkchild")), - Matchers.hasProperty("triggerDateFields", hasItem("dob")) - ))); - } - - @Test - public void testProperAlertRouting() { - - sch.alertFor(late.name(), BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, - startOfDueWindow, startOfLateWindow, startOfMaxWindow); - verify(actionService).alertForBeneficiary(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, urgent, startOfLateWindow, startOfMaxWindow); - - sch.alertFor(earliest.name(), BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, - startOfDueWindow, startOfLateWindow, startOfMaxWindow); - verify(actionService).alertForBeneficiary(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, upcoming, startOfDueWindow, startOfLateWindow); - - sch.alertFor(due.name(), BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, - startOfDueWindow, startOfLateWindow, startOfMaxWindow); - verify(actionService).alertForBeneficiary(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, normal, startOfDueWindow, startOfLateWindow); - - sch.alertFor(max.name(), BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, - startOfDueWindow, startOfLateWindow, startOfMaxWindow); - verify(actionService).alertForBeneficiary(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, expired, startOfMaxWindow, startOfMaxWindow); - } - - @Test - public void testAlertRoutingWithAlertStatus() { - sch.alertFor(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, upcoming, - startOfDueWindow, startOfLateWindow, startOfMaxWindow); - verify(actionService).alertForBeneficiary(BENIFICIARY_TYPE, ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, upcoming, startOfLateWindow, startOfMaxWindow); - } - - @Test - public void testGettingEnrollmentRecord() { - sch.getEnrollmentRecord(ENTITY_ID, SCHEDULE_NAME); - verify(schService).getEnrollmentRecord(ENTITY_ID, SCHEDULE_NAME); - } - - @Test - public void testGettingEnrollment() { - sch.getEnrollment(ENTITY_ID, SCHEDULE_NAME); - verify(schService).getEnrollment(ENTITY_ID, SCHEDULE_NAME); - } - - @Test - public void testActiveEnrollment() { - sch.getActiveEnrollment(ENTITY_ID, SCHEDULE_NAME); - verify(schService).getActiveEnrollment(ENTITY_ID, SCHEDULE_NAME); - } - - @Test - public void testIsNotEnrolled() { - Enrollment enrollment = mock(Enrollment.class); - when(schService.getEnrollment(ENTITY_ID, SCHEDULE_NAME)).thenReturn(enrollment); - boolean actual = sch.isNotEnrolled(ENTITY_ID, SCHEDULE_NAME); - assertFalse(actual); - - when(schService.getEnrollment(ENTITY_ID, SCHEDULE_NAME)).thenReturn(null); - actual = sch.isNotEnrolled(ENTITY_ID, SCHEDULE_NAME); - assertTrue(actual); - - } - - @Test - public void testFindActiveSchedules() { - sch.findActiveSchedules(ENTITY_ID); - verify(schService).findOpenEnrollmentNames(ENTITY_ID); - } - - @Test - public void testFindActiveEnrollments() { - sch.findActiveEnrollments(ENTITY_ID); - verify(schService).findOpenEnrollments(ENTITY_ID); - } - - @Test - public void testCloseBeneficiary() { - sch.closeBeneficiary(BeneficiaryType.mother, ENTITY_ID, PROVIDER_ID, REASONFOR_CLOSE); - verify(actionService).closeBeneficiary(BeneficiaryType.mother, ENTITY_ID, PROVIDER_ID, REASONFOR_CLOSE); - } - - @Test - public void testUnEnrollFromAllSchedules() { - List activeSchedules = asList("1","2"); - when(schService.findOpenEnrollmentNames(ENTITY_ID)).thenReturn(activeSchedules); - sch.unEnrollFromAllSchedules(ENTITY_ID, FORM_SUBMISSION_ID); - - verify(schService).unenroll(ENTITY_ID, activeSchedules, FORM_SUBMISSION_ID); - verify(actionService).markAllAlertsAsInactive(ENTITY_ID); - } - - @Test - public void testUnEnrollAndCloeSchedule() { - sch.unEnrollAndCloseSchedule(ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(schService).unenroll(ENTITY_ID, SCHEDULE_NAME, FORM_SUBMISSION_ID); - verify(actionService).markAlertAsClosed(PROVIDER_ID, ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate().toString()); - } - - @Test - public void testUnEnrollFroSchedule() { - sch.unEnrollFromSchedule(ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, FORM_SUBMISSION_ID); - verify(schService).unenroll(ENTITY_ID, SCHEDULE_NAME, FORM_SUBMISSION_ID); - verify(actionService).markAlertAsInactive(PROVIDER_ID, ENTITY_ID, SCHEDULE_NAME); - } - - @Test - public void testForceFullfillMilestonesAndCloseAlert() { - sch.forceFullfillMilestonesAndCloseAlert(ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate()); - verify(schService).fulfillMilestone(ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate(), ""); - verify(actionService).markAlertAsClosed(ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate().toString()); - } - - @Test - public void testFullFillMilestoneAndCloseAlert() { - sch.fullfillMilestoneAndCloseAlert(ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(schService).fulfillMilestone(ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(actionService).markAlertAsClosed(ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate().toString()); - } - - @Test - public void testFullFillMilestoneAndCloseAlertWithMilestone() { - sch.fullfillMilestoneAndCloseAlert(ENTITY_ID, PROVIDER_ID, SCHEDULE_NAME, MILESTONE, startOfDueWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(schService).fulfillMilestone(ENTITY_ID, SCHEDULE_NAME, startOfDueWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(actionService).markAlertAsClosed(ENTITY_ID, PROVIDER_ID, MILESTONE, startOfDueWindow.toLocalDate().toString()); - } - - - @Test - public void testEnrollmentIntoSchedule() { - sch.enrollIntoSchedule(ENTITY_ID,SCHEDULE_NAME, MILESTONE,"", FORM_SUBMISSION_ID); - verify(schService).enroll(ENTITY_ID, SCHEDULE_NAME, MILESTONE, "", FORM_SUBMISSION_ID); - - testEnrollmentWithOutMilestone(); - } - - @Test - public void testEnrollmentWithOutMilestone() { - sch.enrollIntoSchedule(ENTITY_ID, SCHEDULE_NAME, "", FORM_SUBMISSION_ID); - verify(schService).enroll(ENTITY_ID, SCHEDULE_NAME, "", FORM_SUBMISSION_ID); - } - - @Test - public void testEnrollmentWithOutMilestoneAndLocalDate() { - sch.enrollIntoSchedule(ENTITY_ID, SCHEDULE_NAME, startOfLateWindow.toLocalDate(), FORM_SUBMISSION_ID); - verify(schService).enroll(ENTITY_ID, SCHEDULE_NAME, startOfLateWindow.toLocalDate().toString(), FORM_SUBMISSION_ID); - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/router/MatcherTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/router/MatcherTest.java deleted file mode 100644 index 01bd03a26a..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/router/MatcherTest.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.opensrp.scheduler.router; - -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; - -import org.junit.Test; -import org.opensrp.scheduler.Matcher; - -public class MatcherTest { - @Test - public void shouldMatchUsingStringEquality() { - Matcher matcher = Matcher.eq("abc"); - - assertTrue(matcher.matches("abc")); - assertFalse(matcher.matches("abcd")); - assertFalse(matcher.matches("ab")); - assertFalse(matcher.matches("dabcd")); - assertFalse(matcher.matches("dabc")); - assertFalse(matcher.matches("dddd")); - assertFalse(matcher.matches(null)); - } - - @Test - public void shouldMatchAnyValues() { - Matcher matcher = Matcher.any(); - - assertTrue(matcher.matches("abcd")); - assertTrue(matcher.matches("defg")); - assertTrue(matcher.matches("xyza")); - assertTrue(matcher.matches("zzzz")); - } - - @Test - public void shouldMatchAGivenSetOfValues() { - Matcher matcher = Matcher.anyOf("abc", "def"); - - assertTrue(matcher.matches("abc")); - assertTrue(matcher.matches("def")); - assertFalse(matcher.matches("abcdef")); - assertFalse(matcher.matches("xyz")); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java deleted file mode 100644 index 982f847d57..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java +++ /dev/null @@ -1,218 +0,0 @@ -package org.opensrp.scheduler.service; - -import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static org.mockito.Mockito.verify; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.opensrp.dto.AlertStatus.normal; -import static org.opensrp.scheduler.service.ActionService.ALL_PROVIDERS; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; - -import java.util.Arrays; -import java.util.List; - -import org.joda.time.DateTime; -import org.joda.time.LocalDate; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.opensrp.dto.ActionData; -import org.opensrp.dto.AlertStatus; -import org.opensrp.dto.BeneficiaryType; -import org.opensrp.dto.MonthSummaryDatum; -import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.repository.couch.AllActions; -import org.opensrp.scheduler.repository.couch.AllAlerts; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; - -import com.google.gson.Gson; - - -@RunWith(PowerMockRunner.class) -@PrepareForTest({DateTime.class, org.motechproject.util.DateUtil.class}) -public class ActionServiceTest { - public static final String ANM_1 = "ANM 1"; - public static final String CASE_X = "Case X"; - public static final String REASON_FOR_CLOSE = "reason for close"; - public static final DateTime DATE_TIME = new DateTime(0l); - public static final String SCHDEDULE = "schdedule"; - @Mock - private AllActions allActions; - - @Mock - private AllAlerts allAlerts; - - private ActionService service; - - @Before - public void setUp() throws Exception { - initMocks(this); - allActions.removeAll(); - allAlerts.removeAll(); - service = new ActionService(allActions, allAlerts); - } - - @Test - public void shouldSaveAlertActionForEntity() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - service.alertForBeneficiary("mother", "Case X", "ANM ID M", "Ante Natal Care - Normal", "ANC 1", normal, dueDate, expiryDate); - Action action = new Action("Case X", "ANM ID M", ActionData.createAlert("mother", "Ante Natal Care - Normal", "ANC 1", normal, dueDate, expiryDate)); - - - verify(allActions).addOrUpdateAlert(action); - verify(allAlerts).addOrUpdateScheduleNotificationAlert("mother", "Case X", "ANM ID M", "Ante Natal Care - Normal", "ANC 1", normal, dueDate, expiryDate); - } - - @Test - public void shouldSaveAlertActionForEntityWithActionObject() throws Exception { - DateTime dueDate = DateTime.now().minusDays(1); - DateTime expiryDate = dueDate.plusWeeks(2); - - Action action = new Action("Case X", "ANM ID M", ActionData.createAlert("mother", "Ante Natal Care - Normal", "ANC 1", normal, dueDate, expiryDate)); - - service.alertForBeneficiary(action); - - verify(allActions).addOrUpdateAlert(action); - // verify(allAlerts).addOrUpdateScheduleNotificationAlert("mother", "Case X", "ANM ID M", "Ante Natal Care - Normal", "ANC 1", normal, dueDate, expiryDate); - } - - - @Test - public void shouldCreateACloseActionForAVisitOfAChild() throws Exception { - service.markAlertAsClosed("Case X", "ANM 1", "OPV 1", "2012-01-01"); - - verify(allActions).add(new Action("Case X", "ANM 1", ActionData.markAlertAsClosed("OPV 1", "2012-01-01"))); - } - - - @Test - public void shouldCreateADeleteAllActionForAMother() throws Exception { - service.markAllAlertsAsInactive("Case X"); - - verify(allActions).markAllAsInActiveFor("Case X"); - } - - @Test - public void shouldMarkAnAlertAsInactive() throws Exception { - service.markAlertAsInactive("ANM 1","Case X", "Schedule 1"); - - verify(allActions).markAlertAsInactiveFor("ANM 1","Case X", "Schedule 1"); - } - - - @Test - public void shouldReportForIndicator() { - ActionData summaryActionData = ActionData.reportForIndicator("ANC", "30", new Gson().toJson(asList(new MonthSummaryDatum("3", "2012", "2", "2", asList("CASE 5", "CASE 6"))))); - - service.reportForIndicator("ANM X", summaryActionData); - - verify(allActions).add(new Action("", "ANM X", summaryActionData)); - } - - @Test - public void shouldDeleteAllActionsWithTargetReport() { - service.deleteReportActions(); - - verify(allActions).deleteAllByTarget("report"); - } - - @Test - public void shouldCreateACloseActionForAVisitOfAMother() throws Exception { - service.markAlertAsClosed("Case X", "ANM ID 1", "ANC 1", "2012-12-12"); - - Action action = new Action("Case X", "ANM ID 1", ActionData.markAlertAsClosed("ANC 1", "2012-12-12")); - verify(allActions).add(action); - verify(allAlerts).markAlertAsCompleteFor("ANM ID 1", "Case X", "ANC 1", "2012-12-12"); - } - - @Test - public void shouldCloseAlertBasedOnCaseId() throws Exception { - service.markAlertAsClosed(CASE_X, "ANC 1", "2012-12-12"); - - Action action = new Action(CASE_X, ALL_PROVIDERS, ActionData.markAlertAsClosed("ANC 1", "2012-12-12")); - verify(allActions).add(action); - verify(allAlerts).markAlertAsCompleteFor( CASE_X, "ANC 1", "2012-12-12"); - } - - @Test - public void shouldCloseBeneficiary() throws Exception { - PowerMockito.mockStatic(org.motechproject.util.DateUtil.class); - DateTime dateTime = mock(DateTime.class); - - when(org.motechproject.util.DateUtil.now()).thenReturn(new DateTime(0l)); - PowerMockito.whenNew(DateTime.class).withNoArguments().thenReturn(dateTime); - when(dateTime.toLocalDate()).thenReturn(new LocalDate(0l)); - - service.closeBeneficiary(BeneficiaryType.mother, CASE_X, ANM_1, REASON_FOR_CLOSE); - - Action action = new Action(CASE_X, ANM_1, ActionData.closeBeneficiary(BeneficiaryType.mother.name(), REASON_FOR_CLOSE)); - DateTime defaultDate = service.getCurrentDateTime(); - Alert alert = new Alert(ANM_1, CASE_X, BeneficiaryType.mother.name(), Alert.AlertType.notification, - Alert.TriggerType.caseClosed, null, null, - defaultDate, defaultDate, AlertStatus.urgent, null); - - verify(allActions).add(action); - verify(allAlerts).add(alert); - } - - - @Test - public void shouldReturnAlertsBasedOnANMIDAndTimeStamp() throws Exception { - List alertActions = Arrays.asList(new Action("Case X", "ANM 1", ActionData.createAlert("mother", "Ante Natal Care - Normal", "ANC 1", normal, DateTime.now(), DateTime.now().plusDays(3)))); - when(allActions.findByProviderIdAndTimeStamp("ANM 1", 1010101)).thenReturn(alertActions); - - List alerts = service.getNewAlertsForANM("ANM 1", 1010101); - - assertEquals(1, alerts.size()); - assertEquals(alertActions, alerts); - } - - @Test - public void shouldFindAllByCriteria() { - List alerts = service.findByCriteria("team", "ANM 1", 1010101, "sortBy", "sortOrder", 1); - verify(allActions).findByCriteria("team", "ANM 1", 1010101, "sortBy", "sortOrder", 1); - - } - - @Test - public void shouldGetAlertsForProvider() { - service.getAlertsForProvider(ANM_1, 200l); - verify(allAlerts).findByProviderAndTimestamp(ANM_1, 200l); - } - - @Test - public void shouldGetAlertsActiveForProvider() { - service.getAlertsActiveForProvider(ANM_1, DATE_TIME.getMillis()); - - verify(allAlerts).findActiveByProviderAndTimestamp(ANM_1, new DateTime(0l).getMillis()); - } - - @Test - public void shouldFindByCaseIdScheduleAndTimeStamp() { - service.findByCaseIdScheduleAndTimeStamp(CASE_X, SCHDEDULE, DATE_TIME, DATE_TIME); - - verify(allActions).findByCaseIdScheduleAndTimeStamp(CASE_X, SCHDEDULE, DATE_TIME, DATE_TIME); - } - - @Test - public void shouldFindByCaseIdAndTimeStamp() { - service.findByCaseIdAndTimeStamp(CASE_X, DATE_TIME.getMillis()); - - verify(allActions).findByCaseIdAndTimeStamp(CASE_X, DATE_TIME.getMillis()); - } - - @Test - public void shouldFindAlertByEntityIdScheduleAndTimeStamp() { - service.findAlertByEntityIdScheduleAndTimeStamp(CASE_X, SCHDEDULE, DATE_TIME, DATE_TIME); - - verify(allAlerts).findByEntityIdTriggerAndTimeStamp(CASE_X, SCHDEDULE, DATE_TIME, DATE_TIME); - } - -} \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ECAlertCreationTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ECAlertCreationTest.java deleted file mode 100644 index aa51b50b39..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ECAlertCreationTest.java +++ /dev/null @@ -1,71 +0,0 @@ -package org.opensrp.scheduler.service; - - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.motechproject.scheduler.domain.MotechEvent; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.MilestoneAlert; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.motechproject.scheduletracking.api.events.constants.EventDataKeys; -import org.opensrp.domain.Event; -import org.opensrp.scheduler.ECAlertCreationAction; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.MilestoneEvent; -import org.opensrp.scheduler.router.AlertHandlerRoutesTest; -import org.opensrp.service.EventService; - -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.MILESTONE_NAME; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.SCHEDULE_NAME; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.WINDOW_NAME; - -public class ECAlertCreationTest { - - @Mock - HealthSchedulerService healthSchedulerService; - @Mock - EventService eventService; - - @InjectMocks - ECAlertCreationAction ecAlertCreationAction = new ECAlertCreationAction(healthSchedulerService, eventService); - - @Before - public void setUp() { - initMocks(this); - } - - @Test - public void test() { - String externalId = "sss"; - String scheduleBCG = "BCG"; - String milestone = "milestone"; - MotechEvent motechEvent = AlertHandlerRoutesTest.Event.of(externalId, scheduleBCG, milestone, WindowName.max).createMotechEvent(); - MilestoneEvent milestoneEvent = new MilestoneEvent(motechEvent); - String entityType = "type"; - String providerId = "anm 1"; - Enrollment enrollment = mock(Enrollment.class); - Map metaData = new HashMap<>(); - String entityId = "entityId"; - metaData.put(HealthSchedulerService.MetadataField.enrollmentEvent.name(), entityId); - - when(healthSchedulerService.getEnrollment(externalId, scheduleBCG)).thenReturn(enrollment); - when(enrollment.getMetadata()).thenReturn(metaData); - when(eventService.getById(entityId)).thenReturn(new Event().withEntityType(entityType).withProviderId(providerId)); - - ecAlertCreationAction.invoke(milestoneEvent, Collections.EMPTY_MAP); - - verify(healthSchedulerService).alertFor(milestoneEvent.windowName(), entityType, milestoneEvent.externalId(), providerId, - milestoneEvent.scheduleName(), milestoneEvent.milestoneName(), milestoneEvent.startOfDueWindow(), - milestoneEvent.startOfLateWindow(), milestoneEvent.startOfMaxWindow()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ScheduleServiceTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ScheduleServiceTest.java deleted file mode 100644 index b644630d5b..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ScheduleServiceTest.java +++ /dev/null @@ -1,284 +0,0 @@ -package org.opensrp.scheduler.service; - -import org.joda.time.DateTime; -import org.joda.time.LocalTime; -import org.joda.time.Period; -import org.junit.Before; -import org.junit.Test; -import org.mockito.InOrder; -import org.mockito.Mock; -import org.mockito.Mockito; -import org.motechproject.model.Time; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.domain.Milestone; -import org.motechproject.scheduletracking.api.domain.Schedule; -import org.motechproject.scheduletracking.api.repository.AllSchedules; -import org.motechproject.scheduletracking.api.service.EnrollmentRecord; -import org.motechproject.scheduletracking.api.service.EnrollmentsQuery; -import org.motechproject.scheduletracking.api.service.ScheduleTrackingService; -import org.opensrp.common.util.DateUtil; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.util.ScheduleBuilder; -import org.powermock.api.mockito.PowerMockito; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static org.joda.time.LocalDate.parse; -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; - - -public class ScheduleServiceTest { - - public static final String ENTITY_ID = "entity_id"; - public static final String MY_SCHEDULE = "my_schedule"; - public static final String ENROLLMENT_ID = "enrollment_di"; - @Mock - private ScheduleTrackingService scheduleTrackingService; - @Mock - private AllSchedules allSchedules; - @Mock - private AllEnrollmentWrapper allEnrollments; - - private ScheduleService scheduleService; - private Milestone firstMilestone; - private Milestone secondMilestone; - private Milestone thirdMilestone; - private Schedule schedule; - - @Before - public void setUp() throws Exception { - initMocks(this); - firstMilestone = new Milestone("firstMilestone", weeks(1), weeks(1), weeks(1), weeks(1)); - secondMilestone = new Milestone("secondMilestone", weeks(5), weeks(1), weeks(1), weeks(1)); - thirdMilestone = new Milestone("thirdMilestone", weeks(8), weeks(1), weeks(1), weeks(1)); - schedule = new Schedule("my_schedule"); - schedule.addMilestones(firstMilestone); - schedule.addMilestones(secondMilestone); - schedule.addMilestones(thirdMilestone); - scheduleService = new ScheduleService(scheduleTrackingService, allSchedules, 14, allEnrollments); - } - - @Test - public void shouldEnrollToFirstMilestoneBasedOnScheduleDatesAndReferenceDate() { - DateUtil.fakeIt(parse("2012-01-01")); - when(allSchedules.getByName("my_schedule")).thenReturn(schedule); - - scheduleService.enroll("entity_1", "my_schedule", "2012-01-01", "formsubmission1"); - - verify(scheduleTrackingService).enroll(ScheduleBuilder.enrollmentFor("entity_1", "my_schedule", firstMilestone.getName(), "2012-01-01")); - } - - @Test - public void shouldEnrollToSecondMilestoneBasedOnScheduleDatesAndReferenceDate() { - DateUtil.fakeIt(parse("2012-02-07")); - when(allSchedules.getByName("my_schedule")).thenReturn(schedule); - - scheduleService.enroll("entity_1", "my_schedule", "2012-01-01", "formsubmission2"); - - verify(scheduleTrackingService).enroll(ScheduleBuilder.enrollmentFor("entity_1", "my_schedule", secondMilestone.getName(), "2012-01-01")); - } - - @Test - public void shouldEnrollToThirdMilestoneBasedOnScheduleDatesAndReferenceDate() { - DateUtil.fakeIt(parse("2012-03-01")); - when(allSchedules.getByName("my_schedule")).thenReturn(schedule); - - scheduleService.enroll("entity_1", "my_schedule", "2012-01-01", "formsubmission3"); - - verify(scheduleTrackingService).enroll(ScheduleBuilder.enrollmentFor("entity_1", "my_schedule", thirdMilestone.getName(), "2012-01-01")); - } - - @Test - public void testEnrollIntoNullMilestone() { - DateUtil.fakeIt(parse("2018-03-01")); - when(allSchedules.getByName("my_schedule")).thenReturn(schedule); - - scheduleService.enroll("entity_1", "my_schedule", "2012-01-01", "formsubmission3"); - - verify(scheduleTrackingService).enroll(ScheduleBuilder.enrollmentFor("entity_1", "my_schedule", null, "2012-01-01")); - } - - - @Test(expected = NullPointerException.class) - public void shouldThrowNullPointerExceptionIfSchduleIsNotFound() { - scheduleService.enroll("entity_1", "my_schedule", "2012-01-01", "formsubmission2"); - } - - @Test - public void shouldSuccessfullyFulfilMilestone() { - Enrollment enrollment = ScheduleBuilder.enrollment("entity_1", "my_schedule", "milestone", new DateTime(0l), new DateTime(1l), EnrollmentStatus.ACTIVE, "formSubmission3"); - when(allEnrollments.getActiveEnrollment("entity_1", "my_schedule")).thenReturn(enrollment); - LocalTime localTime = new DateTime(3l).toLocalTime(); - - ScheduleService spyScheduleService = spy(scheduleService); - when(spyScheduleService.getCurrentTime()).thenReturn(new Time(localTime)); - - spyScheduleService.fulfillMilestone("entity_1", "my_schedule", new DateTime(0l).toLocalDate(), "formSubmission3"); - - Map metaData = enrollment.getMetadata(); - metaData.put(HealthSchedulerService.MetadataField.fulfillmentEvent.name(), "formSubmission3"); - enrollment.setMetadata(metaData); - InOrder inOrder = Mockito.inOrder(allEnrollments, scheduleTrackingService); - inOrder.verify(allEnrollments).update(enrollment); - inOrder.verify(scheduleTrackingService).fulfillCurrentMilestone( - "entity_1", "my_schedule", new DateTime(1l).toLocalDate(), - new Time(localTime)); - } - - @Test - public void shouldNotTryToFulfilMilestoneIfNoEnrollmentFound() { - scheduleService.fulfillMilestone("entity_1", "my_schedule", new DateTime(0l).toLocalDate(), "formSubmission3"); - verify(allEnrollments, never()).update(any(Enrollment.class)); - verifyNoMoreInteractions(scheduleTrackingService); - } - - @Test - public void shouldUnEnroll() { - Enrollment enrollment = ScheduleBuilder.enrollment("entity_1", "my_schedule", "milestone", new DateTime(0l), new DateTime(1l), EnrollmentStatus.ACTIVE, "formSubmission3"); - when(allEnrollments.getActiveEnrollment("entity_1", "my_schedule")).thenReturn(enrollment); - - - scheduleService.unenroll("entity_1", "my_schedule", "formSubmission3"); - - Map metaData = enrollment.getMetadata(); - metaData.put(HealthSchedulerService.MetadataField.unenrollmentEvent.name(), "formSubmission3"); - enrollment.setMetadata(metaData); - - InOrder inOrder = Mockito.inOrder(allEnrollments, scheduleTrackingService); - inOrder.verify(allEnrollments).update(enrollment); - inOrder.verify(scheduleTrackingService).unenroll( - "entity_1", asList("my_schedule")); - } - - @Test - public void shouldNotTryToUnEnrollIfNoEnrollmentFound() { - scheduleService.fulfillMilestone("entity_1", "my_schedule", new DateTime(0l).toLocalDate(), "formSubmission3"); - verify(allEnrollments, never()).update(any(Enrollment.class)); - verifyNoMoreInteractions(scheduleTrackingService); - } - - @Test - public void shouldUnEnrollGivenScheduleList() { - Enrollment enrollment_1 = ScheduleBuilder.enrollment("entity_1", "my_schedule", - "milestone", new DateTime(0l), new DateTime(1l), - EnrollmentStatus.ACTIVE, "formSubmission3"); - Enrollment enrollment_2 = ScheduleBuilder.enrollment("entity_1", "my_schedule", - "milestone", new DateTime(0l), new DateTime(1l), - EnrollmentStatus.ACTIVE, "formSubmission3"); - when(allEnrollments.getActiveEnrollment("entity_1", "schedule_1")).thenReturn(enrollment_1); - when(allEnrollments.getActiveEnrollment("entity_1", "schedule_2")).thenReturn(enrollment_2); - - - scheduleService.unenroll("entity_1", asList("schedule_1", "schedule_2"), "formSubmission3"); - - Map metaData = enrollment_1.getMetadata(); - metaData.put(HealthSchedulerService.MetadataField.unenrollmentEvent.name(), "formSubmission3"); - enrollment_1.setMetadata(metaData); - enrollment_2.setMetadata(metaData); - - InOrder inOrder = Mockito.inOrder(allEnrollments, scheduleTrackingService); - inOrder.verify(allEnrollments).update(enrollment_1); - inOrder.verify(allEnrollments).update(enrollment_2); - inOrder.verify(scheduleTrackingService).unenroll( - "entity_1", asList("schedule_1", "schedule_2")); - } - - @Test - public void findOpenEnrollments() throws Exception { - EnrollmentsQuery enrollmentsQuery = mock(EnrollmentsQuery.class); - when(enrollmentsQuery.havingExternalId(ENTITY_ID)).thenReturn(enrollmentsQuery); - when(enrollmentsQuery.havingState(EnrollmentStatus.ACTIVE)).thenReturn(enrollmentsQuery); - - ScheduleService spyScheduleService = spy(scheduleService); - when(spyScheduleService.createEnrollmentQueryWithActiveExternalId(ENTITY_ID)).thenReturn(enrollmentsQuery); - - spyScheduleService.findOpenEnrollments(ENTITY_ID); - - verify(scheduleTrackingService).search(enrollmentsQuery); - } - - @Test - public void shouldFindAllEnrollmentByStatusAndEnrollmentDate() { - scheduleService.findEnrollmentByStatusAndEnrollmentDate("active", new DateTime(0l), new DateTime(1l)); - verify(allEnrollments).findByEnrollmentDate("active", new DateTime(0l), new DateTime(1l)); - } - - @Test - public void shouldFindEnrollmentByLastUpDate() { - scheduleService.findEnrollmentByLastUpDate(new DateTime(0l), new DateTime(1l)); - verify(allEnrollments).findByLastUpDate(new DateTime(0l), new DateTime(1l)); - } - - - @Test - public void shouldUpdateEnrollmentWithMetadata() { - Enrollment enrollment = ScheduleBuilder.enrollment("entity_1", "my_schedule", "milestone", new DateTime(0l), new DateTime(1l), EnrollmentStatus.ACTIVE, "formSubmission3"); - when(allEnrollments.get("enrollment_id")).thenReturn(enrollment); - - scheduleService.updateEnrollmentWithMetadata("enrollment_id", "key", "value"); - - Map metaData = enrollment.getMetadata(); - metaData.put("key", "value"); - enrollment.setMetadata(metaData); - - verify(allEnrollments).update(enrollment); - - } - - @Test - public void shouldFindOpenEnrollmentNames() throws Exception { - EnrollmentsQuery enrollmentsQuery = PowerMockito.mock(EnrollmentsQuery.class); - when(enrollmentsQuery.havingExternalId(ENTITY_ID)).thenReturn(enrollmentsQuery); - when(enrollmentsQuery.havingState(EnrollmentStatus.ACTIVE)).thenReturn(enrollmentsQuery); - - ScheduleService spyScheduleService = spy(scheduleService); - when(spyScheduleService.createEnrollmentQueryWithActiveExternalId(ENTITY_ID)).thenReturn(enrollmentsQuery); - - List enrollmentRecords = new ArrayList<>(); - List expected = new ArrayList<>(); - for (int i = 0; i < 10; i++) { - enrollmentRecords.add(ScheduleBuilder.enrollmentRecord(ENTITY_ID, "schedule" + i, "milestone")); - expected.add("schedule" + i); - } - - when(scheduleTrackingService.search(enrollmentsQuery)).thenReturn(enrollmentRecords); - List actual = spyScheduleService.findOpenEnrollmentNames(ENTITY_ID); - - assertEquals(expected, actual); - } - - @Test - public void shouldGetActiveEnrollment() { - scheduleService.getActiveEnrollment(ENTITY_ID, MY_SCHEDULE); - verify(allEnrollments).getActiveEnrollment(ENTITY_ID, MY_SCHEDULE); - } - - @Test - public void shouldGetEnrollment() { - scheduleService.getEnrollment(ENTITY_ID, MY_SCHEDULE); - verify(allEnrollments).getEnrollment(ENTITY_ID, MY_SCHEDULE); - } - - @Test - public void shouldGetEnrollmentRecord() { - scheduleService.getEnrollmentRecord(ENTITY_ID, MY_SCHEDULE); - verify(scheduleTrackingService).getEnrollment(ENTITY_ID, MY_SCHEDULE); - } - - @Test - public void shouldGetEnrollmentById() { - scheduleService.getEnrollment(ENROLLMENT_ID); - verify(allEnrollments).get(ENROLLMENT_ID); - } - - private Period weeks(int numberOfWeeks) { - return new Period(0, 0, numberOfWeeks, 0, 0, 0, 0, 0); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java deleted file mode 100644 index 436050e2fd..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java +++ /dev/null @@ -1,203 +0,0 @@ -package org.opensrp.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.opensrp.common.AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE; - -import java.util.HashSet; -import java.util.Set; - -import org.joda.time.DateTime; -import org.json.JSONException; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.domain.Address; -import org.opensrp.domain.Client; -import org.opensrp.repository.ClientsRepository; -import org.opensrp.repository.postgres.BaseRepositoryTest; -import org.opensrp.repository.postgres.ClientsRepositoryImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -public class ClientServiceTest extends BaseRepositoryTest { - - private ClientService clientService; - - @Autowired - @Qualifier("clientsRepositoryPostgres") - private ClientsRepository clientsRepository; - - @Before - public void setUpPostgresRepository() { - clientService = new ClientService(clientsRepository); - } - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("client.sql"); - return scripts; - } - - @Test - public void testAddClient() { - Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) - .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); - client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); - clientService.addClient(client); - assertEquals(16, clientService.findAllClients().size()); - - Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); - assertNotNull(savedClient.getId()); - assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); - assertEquals("xobili", client.getFirstName()); - assertEquals("mbangwa", client.getLastName()); - assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); - - //test adding existing client is updated - DateTime timeBeforeUpdate = new DateTime(); - savedClient.withMiddleName("Rustus"); - clientService.addClient(savedClient); - - Client updatedClient = clientService.find(savedClient.getBaseEntityId()); - assertEquals("Rustus", updatedClient.getMiddleName()); - assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); - assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); - - } - - @Test - public void testFindClient() { - Client client = new Client("33d9a17f-d729-4276-9891-b43e8b60fd12"); - assertEquals("05934ae338431f28bf6793b24159c647", clientService.findClient(client).getId()); - - client.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "9c4260f2-d296-4af1-b771-debda1b6cfd1").withIdentifier("ZEIR_ID", - "218220-2"); - assertEquals("05934ae338431f28bf6793b24159c647", clientService.findClient(client).getId()); - - client = new Client(""); - client.withIdentifier("ZEIR_ID", "218220-211"); - assertNull(clientService.findClient(client)); - - client.withBaseEntityId("3423fdsf-23423-hjh23423"); - - assertNull(clientService.findClient(client)); - - client = new Client(""); - assertNull(clientService.findClient(client)); - - client.withIdentifier("ZEIR_ID", "218225-1"); - assertEquals("05934ae338431f28bf6793b24167817d", clientService.findClient(client).getId()); - } - - @Test - public void testFind() { - assertEquals("05934ae338431f28bf6793b24159c647", clientService.find("33d9a17f-d729-4276-9891-b43e8b60fd12").getId()); - - assertNull(clientService.find("3423fdsf-23423-hjh23423")); - } - - @Test(expected = IllegalArgumentException.class) - public void testUpdateClientNewClient() throws JSONException { - Client client = new Client("33d9a17f-d729-4276-9891-b43e8b60fd12"); - clientService.updateClient(client); - } - - @Test(expected = IllegalArgumentException.class) - public void testUpdateClientClientNotExists() throws JSONException { - Client client = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); - clientsRepository.safeRemove(client); - client.setFirstName("Conses"); - clientService.updateClient(client); - } - - @Test() - public void testUpdateClient() throws JSONException { - Client client = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); - client.withFirstName("Conses").withMiddleName("Divens").withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, - "2321312-dsfsd"); - clientService.updateClient(client); - - Client updatedClient = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); - assertEquals("Conses", updatedClient.getFirstName()); - assertEquals("Divens", updatedClient.getMiddleName()); - assertEquals("2321312-dsfsd", updatedClient.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - } - - @Test - public void testMergeClient() { - Client client = clientService.find("cc127350-c1cd-4c3a-99d4-4d632882f522"); - Address address = new Address().withCountry("KE").withStateProvince("Punja").withAddressType("home"); - - client.withFirstName("Conses").withMiddleName("Divens").withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "2321312-dsfsd") - .withAttribute("Zone", "Zone3").withAddress(address); - - Client mergedClient = clientService.mergeClient(client); - assertEquals("Conses", mergedClient.getFirstName()); - assertEquals("Divens", mergedClient.getMiddleName()); - assertEquals("2321312-dsfsd", mergedClient.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - assertEquals("Zone3", mergedClient.getAttribute("Zone")); - assertEquals(address, mergedClient.getAddress(address.getAddressType())); - - } - - @Test - public void testAddorUpdate() { - Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) - .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); - client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); - clientService.addorUpdate(client); - assertEquals(16, clientService.findAllClients().size()); - - Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); - assertNotNull(savedClient.getId()); - assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); - assertEquals("xobili", client.getFirstName()); - assertEquals("mbangwa", client.getLastName()); - assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); - - //test adding existing client is updated - DateTime timeBeforeUpdate = new DateTime(); - savedClient.withMiddleName("Rustus"); - clientService.addorUpdate(savedClient); - - Client updatedClient = clientService.find(savedClient.getBaseEntityId()); - assertEquals("Rustus", updatedClient.getMiddleName()); - assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); - assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); - } - - @Test - public void testAddorUpdateWithServerVersionFlag() { - Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) - .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); - client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); - clientService.addorUpdate(client, false); - assertEquals(16, clientService.findAllClients().size()); - - Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); - assertNotNull(savedClient.getId()); - assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); - assertEquals("xobili", client.getFirstName()); - assertEquals("mbangwa", client.getLastName()); - assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); - - long existingServerVesion = savedClient.getServerVersion(); - //test adding existing client is updated - DateTime timeBeforeUpdate = new DateTime(); - savedClient.withMiddleName("Rustus"); - clientService.addorUpdate(savedClient, false); - - Client updatedClient = clientService.find(savedClient.getBaseEntityId()); - assertEquals("Rustus", updatedClient.getMiddleName()); - assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); - assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); - assertEquals(existingServerVesion, updatedClient.getServerVersion().longValue()); - - clientService.addorUpdate(savedClient, true); - assertTrue(clientService.find(savedClient.getBaseEntityId()).getServerVersion() > existingServerVesion); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java deleted file mode 100644 index 915e0dcaab..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java +++ /dev/null @@ -1,264 +0,0 @@ -package org.opensrp.service; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.opensrp.common.AllConstants.Event.OPENMRS_UUID_IDENTIFIER_TYPE; - -import java.sql.SQLException; -import java.util.HashSet; -import java.util.Set; - -import org.joda.time.DateTime; -import org.joda.time.Minutes; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.common.AllConstants.Client; -import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; -import org.opensrp.repository.ClientsRepository; -import org.opensrp.repository.EventsRepository; -import org.opensrp.repository.postgres.BaseRepositoryTest; -import org.opensrp.repository.postgres.EventsRepositoryImpl; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.dao.DuplicateKeyException; - -public class EventServiceTest extends BaseRepositoryTest { - - private EventService eventService; - - @Autowired - @Qualifier("eventsRepositoryPostgres") - private EventsRepository eventsRepository; - - @Autowired - @Qualifier("clientsRepositoryPostgres") - private ClientsRepository clientsRepository; - - private Set scripts = new HashSet();; - - @Before - public void setUpPostgresRepository() { - eventService = new EventService(eventsRepository, new ClientService(clientsRepository)); - } - - @Override - protected Set getDatabaseScripts() { - scripts.add("event.sql"); - scripts.add("client.sql"); - return scripts; - } - - @Test - public void testFindByUniqueId() { - assertEquals("05934ae338431f28bf6793b241be69a5", eventService.find("4aecc0c1-e008-4227-938d-66db17236a3d").getId()); - - assertEquals("05934ae338431f28bf6793b241bdb88c", eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504").getId()); - - assertNull(eventService.find("50102f0a-a9c9-1d-a6c476433b3c")); - - //deleted event - eventsRepository.safeRemove(eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504")); - assertNull(eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504")); - } - - @Test - public void testFindByEvent() { - Event event = new Event(); - assertNull(eventService.find(event)); - - event.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"); - - assertEquals("05934ae338431f28bf6793b241bdbc55", eventService.find(event).getId()); - - //deleted event - eventsRepository.safeRemove(eventService.find(event)); - assertNull(eventService.find(event)); - } - - @Test - public void testFindByEventId() { - Event event = eventService.findById("05934ae338431f28bf6793b2419c319a"); - assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); - assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); - assertEquals("Vaccination", event.getEventType()); - - assertNull(eventService.findById("50102f0a-a9c9-1d-a6c476433b3c")); - - //deleted event - eventsRepository.safeRemove(event); - assertNull(eventService.findById(event.getId())); - } - - @Test - public void testAddEvent() { - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") - .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); - - eventService.addEvent(event); - - event = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); - assertEquals("435534534543", event.getBaseEntityId()); - assertEquals("Growth Monitoring", event.getEventType()); - assertEquals(1, event.getObs().size()); - assertEquals("3.5", event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - - //test if an event with voided date add event as deleted - event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") - .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); - event.setDateVoided(new DateTime()); - eventService.addEvent(event); - assertNull(eventService.findByFormSubmissionId(event.getFormSubmissionId())); - } - - @Test(expected = IllegalArgumentException.class) - public void testAddEventForExistingEvent() { - Event event = eventService.findById("05934ae338431f28bf6793b241bdc44a"); - eventService.addEvent(event); - } - - @Test(expected = IllegalArgumentException.class) - public void testAddEventDuplicateIdentifiers() { - Event event = new Event().withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "4aecc0c1-e008-4227-938d-66db17236a3d"); - eventService.addEvent(event); - } - - @Test(expected = IllegalArgumentException.class) - public void testAddEventDuplicateBaseEntityFormSubmission() { - Event event = new Event().withBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8") - .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); - eventService.addEvent(event); - } - - @Test(expected = DuplicateKeyException.class) - public void testAddEventDuplicateFormSubmission() { - Event event = new Event().withBaseEntityId("58b33379-dab2-4f") - .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); - eventService.addEvent(event); - - } - - @Test - public void testProcessOutOfArea() throws SQLException { - scripts.add("client.sql"); - populateDatabase(); - Event event = new Event().withEventType("Vaccination").withProviderId("tester111") - .withLocationId("2242342-23dsfsdfds").withIdentifier(Client.ZEIR_ID, "218229-3"); - Event outOfAreaEvent = eventService.processOutOfArea(event); - assertEquals(1, outOfAreaEvent.getDetails().size()); - assertEquals("biddemo", outOfAreaEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals("42abc582-6658-488b-922e-7be500c070f3", outOfAreaEvent.getLocationId()); - assertEquals("biddemo", outOfAreaEvent.getProviderId()); - - event = new Event().withEventType("Out of Area Service").withProviderId("tester111") - .withLocationId("2242342-23dsfsdfds").withIdentifier(Client.ZEIR_ID, "218229-3"); - - outOfAreaEvent = eventService.processOutOfArea(event); - assertEquals(event, outOfAreaEvent); - assertEquals(15, eventService.getAll().size()); - - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - event = new Event().withEventType("Out of Area Service - Growth Monitoring") - .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs) - .withIdentifier(Client.ZEIR_ID, "218229-3"); - - outOfAreaEvent = eventService.processOutOfArea(event); - assertEquals(event, outOfAreaEvent); - - assertEquals(16, eventService.getAll().size()); - - } - - @Test - public void testAddorUpdateEvent() { - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") - .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); - - eventService.addorUpdateEvent(event); - - Event updatedEvent = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); - assertEquals("435534534543", updatedEvent.getBaseEntityId()); - assertEquals("Growth Monitoring", updatedEvent.getEventType()); - assertEquals(1, updatedEvent.getObs().size()); - assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - assertNull(updatedEvent.getDateEdited()); - - event.setTeam("ATeam"); - event.setProviderId("tester11"); - event.setLocationId("321312-fsff-2328"); - eventService.addorUpdateEvent(event); - - updatedEvent = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); - assertEquals("ATeam", updatedEvent.getTeam()); - assertEquals("tester11", updatedEvent.getProviderId()); - assertEquals("321312-fsff-2328", updatedEvent.getLocationId()); - assertEquals(EventsRepositoryImpl.REVISION_PREFIX + 2, updatedEvent.getRevision()); - assertNotNull(updatedEvent.getDateEdited()); - - //test if an event with voided date add event as deleted - event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") - .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); - event.setDateVoided(new DateTime()); - eventService.addorUpdateEvent(event); - assertNull(eventService.findByFormSubmissionId(event.getFormSubmissionId())); - } - - @Test(expected = IllegalArgumentException.class) - public void testUpdateEventNonExistingEvent() { - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") - .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); - - eventService.updateEvent(event); - } - - @Test - public void testUpdateEvent() { - DateTime timebeforeUpdate = DateTime.now(); - Event event = eventService.findById("05934ae338431f28bf6793b24177a1dc"); - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - event.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "62242n-223423-2332").addObs(obs); - eventService.updateEvent(event); - - Event updatedEvent = eventService.findById(event.getId()); - assertEquals(0, Minutes.minutesBetween(timebeforeUpdate, updatedEvent.getDateEdited()).getMinutes()); - assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - assertEquals("62242n-223423-2332", updatedEvent.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); - - } - - @Test(expected = IllegalArgumentException.class) - public void testMergeEventMissingIdentifiers() { - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring"); - eventService.mergeEvent(event); - } - - @Test(expected = IllegalArgumentException.class) - public void testMergeEventNonExistingIdentifiers() { - Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") - .withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "242332-hgfhfh-dfg8d"); - eventService.mergeEvent(event); - } - - @Test - public void testMergeEvent() { - Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - Event event = new Event().withEventType("Growth Monitoring") - .withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "4aecc0c1-e008-4227-938d-66db17236a3d") - .withEventDate(new DateTime()).withObs(obs); - - eventService.mergeEvent(event); - - Event updatedEvent = eventService.find("4aecc0c1-e008-4227-938d-66db17236a3d"); - - assertEquals("05934ae338431f28bf6793b241be69a5", updatedEvent.getId()); - assertEquals("Growth Monitoring", updatedEvent.getEventType()); - assertEquals(1, updatedEvent.getObs().size()); - assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); - assertEquals(0, Minutes.minutesBetween(DateTime.now(), updatedEvent.getDateEdited()).getMinutes()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java deleted file mode 100644 index 5b8a65fc83..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.opensrp.service; - -import org.joda.time.DateTime; -import org.joda.time.Minutes; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.domain.Client; -import org.opensrp.domain.Multimedia; -import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.ClientsRepository; -import org.opensrp.repository.MultimediaRepository; -import org.opensrp.repository.postgres.BaseRepositoryTest; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.mock.web.MockMultipartFile; -import org.springframework.web.multipart.MultipartFile; - -import java.io.File; -import java.io.IOException; -import java.nio.file.Files; -import java.nio.file.Paths; -import java.util.HashSet; -import java.util.Set; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; - -public class MultiMediaServiceTest extends BaseRepositoryTest { - - private MultimediaService multimediaService; - - private ClientService clientService; - @Autowired - @Qualifier("multimediaRepositoryPostgres") - private MultimediaRepository multimediaRepository; - - @Autowired - @Qualifier("clientsRepositoryPostgres") - private ClientsRepository clientsRepository; - - @Value("#{opensrp['multimedia.directory.name']}") - private String baseMultimediaDirPath; - - @Before - public void setUp() { - clientService = new ClientService(clientsRepository); - multimediaService = new MultimediaService(multimediaRepository, clientService); - multimediaService.baseMultimediaDirPath = baseMultimediaDirPath; - } - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet(); - scripts.add("multimedia.sql"); - scripts.add("client.sql"); - return scripts; - } - - @Test - public void testUploadFile() throws IOException { - String content = "876nsfsdfs-sdfsfsdf"; - String baseEntityId = "67007c17-97bb-4732-a1b8-3a0c292b5432"; - MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test.jpg", "image/jpeg", content.getBytes()); - MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", - "profilepic"); - - assertTrue(multimediaService.uploadFile(multimediaDTO, multimediaFile)); - - //assertEquals(multimediaFile, multimediaService.findByCaseId("469597f0-eefe-4171-afef-f7234cbb2859")); - - File file = new File(baseMultimediaDirPath + File.separator + MultimediaService.IMAGES_DIR + File.separator - + baseEntityId + ".jpg"); - System.out.println(file.getAbsolutePath()); - assertTrue(file.exists()); - assertTrue(file.canRead()); - - assertEquals(content, new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())))); - - } - - @Test - public void testSaveMultimediaFile() throws IOException { - String baseEntityId = "469597f0-eefe-4171-afef-f7234cbb2859"; - String content = "876nsfsdfs-sdfsfsdf"; - MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test1.jpg", "image/jpeg", content.getBytes()); - MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", - "profile_picture"); - - assertEquals("success", multimediaService.saveMultimediaFile(multimediaDTO, multimediaFile)); - - File file = new File(baseMultimediaDirPath + File.separator + MultimediaService.IMAGES_DIR + File.separator - + baseEntityId + ".jpg"); - System.out.println(file.getAbsolutePath()); - assertTrue(file.exists()); - assertTrue(file.canRead()); - - assertEquals(content, new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())))); - Client client = clientService.find(baseEntityId); - Multimedia savedMultimedia = multimediaService.findByCaseId(baseEntityId); - assertEquals(multimediaDTO.getFilePath(), savedMultimedia.getFilePath()); - assertEquals(file.getAbsolutePath(), savedMultimedia.getFilePath()); - assertEquals(multimediaDTO.getContentType(), savedMultimedia.getContentType()); - assertEquals(multimediaDTO.getFileCategory(), savedMultimedia.getFileCategory()); - - assertEquals(5, multimediaService.getMultimediaFiles("biddemo").size()); - assertEquals(6, multimediaRepository.getAll().size()); - assertEquals(baseEntityId + ".jpg", client.getAttribute("Patient Image")); - assertEquals(0, Minutes.minutesBetween(client.getDateEdited(), DateTime.now()).getMinutes()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java deleted file mode 100644 index 60ae1904eb..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java +++ /dev/null @@ -1,220 +0,0 @@ -package org.opensrp.service; - -import org.joda.time.DateTime; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mockito; -import org.opensrp.SpringApplicationContextProvider; -import org.opensrp.domain.Address; -import org.opensrp.domain.Client; -import org.opensrp.domain.UniqueId; -import org.opensrp.repository.UniqueIdRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.jdbc.core.JdbcTemplate; - -import java.sql.SQLException; -import java.text.SimpleDateFormat; -import java.util.*; - -import static org.junit.Assert.*; -import static org.mockito.Matchers.anyInt; -import static org.mockito.Matchers.intThat; -import static org.opensrp.service.OpenmrsIDService.CHILD_REGISTER_CARD_NUMBER; - -public class OpenmrsIDServiceTest extends SpringApplicationContextProvider { - @Autowired - OpenmrsIDService openmrsIDService; - @Autowired - JdbcTemplate jdbcTemplate; - @Autowired - UniqueIdRepository uniqueIdRepository; - - @Before - public void setUp() { - String dropDbSql = "DROP TABLE IF EXISTS `unique_ids`;"; - jdbcTemplate.execute(dropDbSql); - String tableCreationString = - "CREATE TABLE `unique_ids` (\n" + - " `_id` bigint(20) NOT NULL AUTO_INCREMENT,\n" + - " `created_at` datetime DEFAULT NULL,\n" + - " `location` varchar(255) DEFAULT NULL,\n" + - " `openmrs_id` varchar(255) DEFAULT NULL,\n" + - " `status` varchar(255) DEFAULT NULL,\n" + - " `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\n" + - " `used_by` varchar(255) DEFAULT NULL,\n" + - " PRIMARY KEY (`_id`)\n" + - ") ENGINE=InnoDB DEFAULT CHARSET=utf8;"; - jdbcTemplate.execute(tableCreationString); - } - - @After - public void tearDown() { - String dropDbSql = "DROP TABLE IF EXISTS `unique_ids`;"; - // jdbcTemplate.execute(dropDbSql); - - } - - public Client createClient(String baseEntityId, String firstName, String lastName, String gender, String childRegisterCardNumber) { - DateTime dateOfBirth = new DateTime(); - Map addressFields = new HashMap<>(); - addressFields.put("address4", "birthFacilityName"); - addressFields.put("address3", "resolvedResidentialAddress"); - addressFields.put("address2", "residentialAddress"); - addressFields.put("address1", "physicalLandmark"); - - Address address = new Address("usual_residence", new DateTime(), new DateTime(), addressFields, null, null, null, "homeFacility", null); - ArrayList
addressList = new ArrayList
(); - addressList.add(address); - - Client client = new Client(baseEntityId, firstName, "", lastName, dateOfBirth, null, false, false, gender, addressList, null, null); - client.addAttribute(CHILD_REGISTER_CARD_NUMBER, childRegisterCardNumber); - return client; - } - - @Test - public void testAssignOpenmrsIdToClient() throws SQLException { - Client client = this.createClient("12345", "First", "Last", "Male", "454/16"); - - openmrsIDService.assignOpenmrsIdToClient("12345-1", client); - assertNotNull(client.getIdentifier(OpenmrsIDService.ZEIR_IDENTIFIER)); - } - - - @Test - public void testExistingClientsDoNotReceiveNewOpenmrsId() throws Exception { - Client client = this.createClient("45678", "Jane", "Doe", "Female", "102/17"); - Client duplicateClient = this.createClient("45677", "Jane", "Doe", "Female", "102/17"); - - openmrsIDService.assignOpenmrsIdToClient("12345-1", client); - assertNotNull(client.getIdentifier(OpenmrsIDService.ZEIR_IDENTIFIER)); - - openmrsIDService.assignOpenmrsIdToClient("12345-1", duplicateClient); - assertTrue(openmrsIDService.checkIfClientExists(duplicateClient)); - assertNull(duplicateClient.getIdentifier(OpenmrsIDService.ZEIR_IDENTIFIER)); - } - - @Test - public void testCheckClient() throws SQLException { - Client client = this.createClient("45678", "Jane", "Doe", "Female", "102/17"); - openmrsIDService.assignOpenmrsIdToClient("12345-1", client); - assertTrue(openmrsIDService.checkIfClientExists(client)); - } - - @Test - public void testCheckClientWithFalseData() throws SQLException { - Client client = this.createClient("45678", "Jane", "Doe", "Female", "102/17"); - assertFalse(openmrsIDService.checkIfClientExists(client)); - } - - @Test - public void testCheckClientWithInvalidData() throws SQLException {Client client = this.createClient("*", "Jane", "Doe", "Female", "*"); - assertNull(openmrsIDService.checkIfClientExists(null)); - } - - @Test - public void testDownloadAndSaveIds() { - List downloadedIds = new ArrayList<>(); - downloadedIds.add("1"); - downloadedIds.add("2"); - OpenmrsIDService openmrsIDServiceSpy = Mockito.spy(openmrsIDService); - Mockito.doReturn(downloadedIds).when(openmrsIDServiceSpy).downloadOpenmrsIds(anyInt()); - - openmrsIDServiceSpy.downloadAndSaveIds(2, "test"); - - List uniqueIds = uniqueIdRepository.getNotUsedIds(2); - List actualList = new ArrayList<>(); - for (UniqueId uniqueId : uniqueIds) { - assertEquals("test", uniqueId.getUsedBy()); - actualList.add(uniqueId.getOpenmrsId()); - } - - assertEquals(2, (int) uniqueIdRepository.totalUnUsedIds()); - assertEquals(downloadedIds, actualList); - } - - @Test - public void testClearRecord() throws SQLException { - Client client = this.createClient("12345", "First", "Last", "Male", "454/16"); - openmrsIDService.assignOpenmrsIdToClient("12345-1", client); - - assertTrue(openmrsIDService.checkIfClientExists(client)); - - openmrsIDService.clearRecords(); - - assertFalse(openmrsIDService.checkIfClientExists(client)); - } - - - @Test - public void testGetNotUsedId() throws Exception { - int size = 10; - List expectedList = createNotUsedUniqIdEntries(size); - List actualList = openmrsIDService.getNotUsedIds(100); - assertEquals(size, actualList.size()); - - for (int i = 0; i < size; i++) { - UniqueId expected = expectedList.get(i); - UniqueId actual = actualList.get(i); - assertUniqueId(expected, actual); - } - - } - - @Test - public void testGetNotUsedIdAsString() throws Exception { - int size = 10; - List ids = createNotUsedUniqIdEntries(size); - List expectedList = new ArrayList<>(); - List actualList = openmrsIDService.getNotUsedIdsAsString(100); - for (int i = 0; i < size; i++) { - expectedList.add(ids.get(i).getOpenmrsId()); - } - - assertEquals(size, actualList.size()); - assertEquals(expectedList, actualList); - } - - @Test - public void testMarkIdAsUsed() throws Exception { - int size = 10; - List ids = createNotUsedUniqIdEntries(size); - List idListAsString = new ArrayList<>(); - - for (int i = 0; i < size; i++) { - idListAsString.add(ids.get(i).getOpenmrsId()); - } - - int[] actualIds = openmrsIDService.markIdsAsUsed(idListAsString); - List actualList = openmrsIDService.getNotUsedIdsAsString(100); - - assertEquals(size, actualIds.length); - assertEquals(0, actualList.size()); - - } - - private List createNotUsedUniqIdEntries(int size) throws Exception { - List notUsedUniqueIds = new ArrayList<>(); - for (int i = 0; i < size; i++) { - UniqueId uniqueId = new UniqueId(); - uniqueId.setOpenmrsId(String.valueOf(i)); - uniqueId.setStatus(UniqueId.STATUS_NOT_USED); - uniqueId.setUsedBy("test" + i); - uniqueId.setCreatedAt(new Date()); - uniqueId.setLocation("test"); - notUsedUniqueIds.add(uniqueId); - uniqueIdRepository.save(uniqueId); - } - return notUsedUniqueIds; - } - - private void assertUniqueId(UniqueId expected, UniqueId actual) { - SimpleDateFormat dateFormat = new SimpleDateFormat("YYYY-mm-hh hh:MM:ss Z"); - assertEquals(dateFormat.format(expected.getCreatedAt()), dateFormat.format(actual.getCreatedAt())); - assertEquals(expected.getLocation(), actual.getLocation()); - assertEquals(expected.getId(), actual.getId()); - assertEquals(expected.getOpenmrsId(), actual.getOpenmrsId()); - assertEquals(expected.getStatus(), actual.getStatus()); - assertEquals(expected.getUsedBy(), actual.getUsedBy()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceUsingMockTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceUsingMockTest.java deleted file mode 100644 index 4f851158b9..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceUsingMockTest.java +++ /dev/null @@ -1,59 +0,0 @@ -package org.opensrp.service; - -import com.google.gson.Gson; -import org.apache.http.HttpEntity; -import org.apache.http.util.EntityUtils; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.BDDMockito; -import org.mockito.MockitoAnnotations; -import org.powermock.api.mockito.PowerMockito; -import org.powermock.core.classloader.annotations.PowerMockIgnore; -import org.powermock.core.classloader.annotations.PrepareForTest; -import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.beans.factory.annotation.Autowired; - -import java.io.IOException; -import java.util.List; - -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertTrue; -import static org.junit.Assert.assertNull; -import static org.mockito.Matchers.any; - -@RunWith(PowerMockRunner.class) -@PrepareForTest(EntityUtils.class) -@PowerMockIgnore({"org.apache.http.ssl.*", "javax.net.ssl.*","org.apache.http.conn.ssl.*"}) -public class OpenmrsIDServiceUsingMockTest { - - - OpenmrsIDService openmrsIDService; - - @Before - public void setUp() { - PowerMockito.mockStatic(EntityUtils.class); - - } - - @Ignore@Test - public void testDownloadsOpenmrsIds() throws IOException { - openmrsIDService = OpenmrsIDService.createInstanceWithOpenMrsUrl("http://localhost/"); - String jsonResponse = "{\"identifiers\":[\"1\",\"2\"]}"; - BDDMockito.when(EntityUtils.toString(any(HttpEntity.class))).thenReturn(jsonResponse); - List ids = openmrsIDService.downloadOpenmrsIds(2); - assertEquals(2, ids.size()); - assertTrue(ids.contains("1")); - assertTrue(ids.contains("2")); - assertFalse(ids.contains("3")); - } - - @Ignore@Test - public void testDownloadOpenmrsIdsWithInvalidUrl() { - openmrsIDService = OpenmrsIDService.createInstanceWithOpenMrsUrl(""); - List ids = openmrsIDService.downloadOpenmrsIds(2); - assertNull(ids); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java deleted file mode 100644 index 766c28aaf4..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java +++ /dev/null @@ -1,115 +0,0 @@ -package org.opensrp.service; - -import java.sql.SQLException; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import org.joda.time.DateTime; -import org.joda.time.Minutes; -import org.junit.Assert; -import org.junit.Test; -import org.opensrp.domain.Stock; -import org.opensrp.repository.StocksRepository; -import org.opensrp.repository.postgres.BaseRepositoryTest; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; - -/** - * Integration Tests for {@link StockService}. - */ -public class StockServiceTest extends BaseRepositoryTest { - - private StockService stockService; - - @Autowired - @Qualifier("stocksRepositoryPostgres") - private StocksRepository stocksRepository; - - @Override - protected Set getDatabaseScripts() { - Set scripts = new HashSet<>(); - scripts.add("stock.sql"); - return scripts; - } - - @Override - public void populateDatabase() throws SQLException { - super.populateDatabase(); - stockService = new StockService(stocksRepository); - Stock stock1 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - Stock stock2 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - stockService.addStock(stock1); - stockService.addStock(stock2); - } - - @Test - public void shouldSaveStock() { - Stock stock = new Stock(Long.parseLong("124"), "VT1", "TT1", "4-2", 10, Long.parseLong("20062017"), " TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - - Stock savedStock = stockService.addorUpdateStock(stock); - Assert.assertNotNull(savedStock.getServerVersion()); - Assert.assertEquals(savedStock.getProviderid(), stock.getProviderid()); - - } - - @Test - public void shouldUpdateStockWithSaveorUpdate() { - List stocks = stockService.findAllByProviderid("4-2"); - for (Stock stock : stocks) { - stock.setVaccine_type_id("12334"); - stock.setTransaction_type("Restocking_1"); - stock.setValue(stock.getValue() * 2); - stockService.addorUpdateStock(stock); - } - stocks = stockService.findAllByProviderid("4-2"); - for (Stock savedStock : stocks) { - Assert.assertEquals(0, Minutes.minutesBetween(savedStock.getDateEdited(), DateTime.now()).getMinutes()); - Assert.assertEquals("12334", savedStock.getVaccine_type_id()); - Assert.assertEquals("Restocking_1", savedStock.getTransaction_type()); - Assert.assertEquals(20, savedStock.getValue()); - } - } - - @Test - public void shouldUpdateStock() { - List stocks = stockService.findAllByProviderid("4-2"); - for (Stock stock : stocks) { - stock.setVaccine_type_id("12334"); - stock.setTransaction_type("Restocking_1"); - stock.setValue(stock.getValue() * 2); - stockService.updateStock(stock); - } - stocks = stockService.findAllByProviderid("4-2"); - for (Stock savedStock : stocks) { - Assert.assertEquals(0, Minutes.minutesBetween(savedStock.getDateEdited(), DateTime.now()).getMinutes()); - Assert.assertEquals("12334", savedStock.getVaccine_type_id()); - Assert.assertEquals("Restocking_1", savedStock.getTransaction_type()); - Assert.assertEquals(20, savedStock.getValue()); - } - } - - @Test(expected = IllegalArgumentException.class) - public void shouldNotUpdateStockForNewStock() { - Stock stock = new Stock(Long.parseLong("124"), "VT1", "TT1", "4-2", 10, Long.parseLong("20062017"), " TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - stockService.updateStock(stock); - } - - @Test - public void shouldFetchStocksByProcider() throws Exception { - List fecthedListByProviderid = stockService.findAllByProviderid("4-2"); - for (Stock stock : fecthedListByProviderid) - Assert.assertEquals("4-2", stock.getProviderid()); - } - - @Test - public void shouldFetchAll() throws Exception { - List fecthedListAll = stockService.getAll(); - Assert.assertEquals(17, fecthedListAll.size()); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java deleted file mode 100644 index ada5165158..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java +++ /dev/null @@ -1,119 +0,0 @@ -package org.opensrp.service.formSubmission; - - -import static java.util.Arrays.asList; -import static org.mockito.Matchers.any; -import static org.mockito.Matchers.anyBoolean; -import static org.mockito.Matchers.anyString; -import static org.mockito.Matchers.eq; -import static org.mockito.Mockito.atLeastOnce; -import static org.mockito.Mockito.inOrder; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; -import static org.mockito.Mockito.when; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.json.JSONObject; -import org.junit.Before; -import org.junit.Test; -import org.mockito.InOrder; -import org.mockito.Matchers; -import org.mockito.Mock; -import org.opensrp.common.AllConstants; -import org.opensrp.domain.AppStateToken; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.service.ClientService; -import org.opensrp.service.ConfigService; -import org.opensrp.service.ErrorTraceService; -import org.opensrp.service.EventService; -import org.opensrp.service.formSubmission.handler.EventsHandler; -import org.opensrp.service.formSubmission.handler.EventsRouter; -import org.opensrp.service.formSubmission.handler.IHandlerMapper; - -public class EventListenerTest { - - @Mock - private ConfigService configService; - @Mock - private AllEvents allEvents; - @Mock - private AllClients allClients; - @Mock - private ErrorTraceService errorTraceService; - @Mock - private ClientService clientService; - IHandlerMapper handlerMapper; - - private EventService eventService; - private EventsRouter eventsRouter; - private EventsListener eventsListener; - - @Before - public void setUp() { - configService = mock(ConfigService.class); - allEvents = mock(AllEvents.class); - clientService = mock(ClientService.class); - allClients = mock(AllClients.class); - handlerMapper = mock(IHandlerMapper.class); - - when(configService.registerAppStateToken(any(AllConstants.Config.class), Matchers.anyObject(), anyString(), anyBoolean())) - .thenReturn(new AppStateToken("token", 01l, 02l)); - eventsRouter = new EventsRouter(handlerMapper, "/schedules/schedule-configs"); - eventService = new EventService(allEvents, clientService); - eventsListener = new EventsListener(eventsRouter, configService, allEvents, eventService, - errorTraceService, allClients); - } - - @Test - public void shouldHandleNewEvent() throws Exception { - EventsHandler eventHandler = mock(EventsHandler.class); - Map handlerMap = new HashMap<>(); - handlerMap.put("VaccinesScheduleHandler", eventHandler); - - - List clients = asList(new Client("2222")); - List events = asList(new Event() - .withIdentifier(AllConstants.Client.ZEIR_ID.toUpperCase(), "2") - .withEventType("Vaccination"), new Event()); - - - when(allClients.findByEmptyServerVersion()).thenReturn(clients, Collections.emptyList()); - when(configService.getAppStateTokenByName(AllConstants.Config.EVENTS_PARSER_LAST_PROCESSED_EVENT)) - .thenReturn(new AppStateToken("token", 1l, 0l)); - when(allEvents.findByEmptyServerVersion()).thenReturn(events, Collections.EMPTY_LIST); - when(allEvents.findByServerVersion(1l)).thenReturn(events); - when(clientService.findAllByIdentifier(AllConstants.Client.ZEIR_ID.toUpperCase(), "2")) - .thenReturn(clients); - when(allEvents.findByBaseEntityAndType("222", "Birth Registration")).thenReturn(events); - - when(handlerMapper.handlerMap()).thenReturn(handlerMap); - - - EventsListener spyEventListener = spy(eventsListener); - when(spyEventListener.getCurrentMilliseconds()).thenReturn(0l); - - spyEventListener.processEvent(); - - - InOrder inOrder = inOrder(allClients, allEvents, eventHandler); - clients.get(0).setServerVersion(System.currentTimeMillis()); - events.get(0).setServerVersion(System.currentTimeMillis()); - inOrder.verify(allClients).update(clients.get(0)); - inOrder.verify(allEvents).update(events.get(0)); - inOrder.verify(eventHandler, atLeastOnce()).handle(eq(events.get(0)), any(JSONObject.class), eq("BCG")); - - } - - @Test - public void testComparator() { - - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityConverterTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityConverterTest.java deleted file mode 100644 index c1c7e66b0a..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityConverterTest.java +++ /dev/null @@ -1,209 +0,0 @@ -package org.opensrp.service.formSubmission; - - -import com.google.gson.Gson; -import org.joda.time.DateTime; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.common.FormEntityConstants; -import org.opensrp.domain.Address; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormAttributeParser; -import org.opensrp.form.service.FormSubmissionMap; -import org.springframework.beans.factory.annotation.Autowired; -import org.xml.sax.SAXException; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.xpath.XPathExpressionException; -import java.io.IOException; -import java.text.ParseException; -import java.util.ArrayList; -import java.util.List; - -import static junit.framework.Assert.*; -import static org.hamcrest.CoreMatchers.is; -import static org.junit.Assert.assertThat; - -public class FormEntityConverterTest extends BaseIntegrationTest { - - @Autowired - FormAttributeParser formAttributeParser; - @Autowired - private FormEntityConverter formEntityConverter; - - private Gson gson = new Gson(); - - @Test - public void test() throws Exception { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - System.out.println("************************form submission ************************"); - System.out.println(gson.toJson(fs)); - System.out.println("************************form submission ************************"); - System.out.println("************************ client ************************"); - Client client = formEntityConverter.getClientFromFormSubmission(fs); - System.out.println(gson.toJson(client)); - System.out.println("************************ client ************************"); - } - - - //TODO: test date approximation check - @Test - public void testCreateBaseClient() throws Exception { - String addressString = " {\n" + - " \"addressType\": \"usual_residence\",\n" + - " \"addressFields\": {\n" + - " \"landmark\": \"nothing\"\n" + - " },\n" + - " \"latitude\": \"34\",\n" + - " \"longitude\": \"34\",\n" + - " \"geopoint\": \"34 34 0 0\"\n" + - " }"; - Client expectedClient = new Client("a3f2abf4-2699-4761-819a-cea739224164"); - expectedClient.withFirstName("test") - .withLastName(".") - .withGender("male") - .withBirthdate(new DateTime("1900-01-01").withTimeAtStartOfDay(), false) - .withAddress(new Gson().fromJson(addressString, Address.class)) - .withIdentifier("JiVita HHID", "1234") - .withIdentifier("GOB HHID", "1234"); - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - - - Client client = formEntityConverter.createBaseClient(formSubmissionMap); - - - assertEquals(expectedClient.fullName(), client.fullName()); - assertEquals(expectedClient.getBirthdate(), client.getBirthdate()); - assertEquals(expectedClient.getBirthdateApprox(), client.getBirthdateApprox()); - assertEquals(expectedClient.getGender(), client.getGender()); - assertEquals(expectedClient.getIdentifier("JiVita HHID"), client.getIdentifier("JiVita HHID")); - assertEquals(expectedClient.getIdentifier("GOB HHID"), client.getIdentifier("GOB HHID")); - - } - - @Test - public void testValidOpenmrsForm() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - - boolean expectedValue = formEntityConverter.isOpenmrsForm(formSubmissionMap); - - assertTrue(expectedValue); - } - - @Test - public void testInvalidOpenmrsForm() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - formSubmissionMap.formAttributes().remove("encounter_type"); - - boolean expectedValue = formEntityConverter.isOpenmrsForm(formSubmissionMap); - - assertFalse(expectedValue); - } - - @Test - public void testCreateEvent() throws ParserConfigurationException, SAXException, XPathExpressionException, IOException, ParseException { - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - Event expectedEvent = new Event() - .withBaseEntityId(fsubmission.entityId()) - .withEventDate(new DateTime(FormEntityConstants.FORM_DATE.parse("2015-05-07"))) - .withEventType(formSubmissionMap.formAttributes().get("encounter_type")) - .withLocationId("KUPTALA") - .withProviderId(formSubmissionMap.providerId()) - .withEntityType(formSubmissionMap.bindType()) - .withFormSubmissionId(formSubmissionMap.instanceId()); - - List values = new ArrayList<>(); - values.add("2015-05-07"); - - Obs obs1 = new Obs("concept", "DateTime", - "160753AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, values, - null, "FWNHREGDATE"); - values.clear(); - values.add(2); - Obs obs2 = new Obs("concept", "Integer", - "5611AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, values, - null, "FWNHHMBRNUM"); - expectedEvent.addObs(obs1); - expectedEvent.addObs(obs2); - - Event event = formEntityConverter.getEventFromFormSubmission(fsubmission); - - assertEvents(expectedEvent, event); - } - - @Test(expected = IllegalStateException.class) - public void testExceptionWhileCreatingEventFromFromSubmission() { - FormSubmission fsubmission = new FormSubmission(); - formEntityConverter.getEventFromFormSubmission(fsubmission); - } - - @Test - public void testGetFieldName() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - String expected = "FWHOHGENDER"; - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - String actual = formEntityConverter.getFieldName(FormEntityConstants.Person.gender, formSubmissionMap); - - assertEquals(expected, actual); - } - - @Test - public void testGetFieldNameInSubForm() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - String expected = "FWGENDER"; - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - String actual = - formEntityConverter.getFieldName(FormEntityConstants.Person.gender, formSubmissionMap.subforms().get(0)); - - assertEquals(expected, actual); - } - - @Test - public void testInvalidFieldNameInForm() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - String actual = - formEntityConverter.getFieldName(FormEntityConstants.Encounter.encounter_date, formSubmissionMap.subforms().get(0)); - assertNull(actual); - } - - @Test - public void testGetFieldNameUsingEntity() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - String expected = "FWNHHMBRNUM"; - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - String actual = formEntityConverter.getFieldName("concept","5611AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, formSubmissionMap); - - assertEquals(expected, actual); - } - - @Test - public void testGetFieldNameUsingEnitityWithInvalidData() throws IOException, XPathExpressionException, SAXException, ParserConfigurationException { - FormSubmission fsubmission = getFormSubmissionFor("new_household_registration", 1); - FormSubmissionMap formSubmissionMap = formAttributeParser.createFormSubmissionMap(fsubmission); - String actual = formEntityConverter.getFieldName("concept","5611AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, formSubmissionMap.subforms().get(0)); - assertNull(actual); - } - - private void assertEvents(Event expected, Event actual) { - assertEquals(expected.getBaseEntityId(), actual.getBaseEntityId()); - assertEquals(expected.getEntityType(), actual.getEntityType()); - assertEquals(expected.getDetails(), actual.getDetails()); - assertEquals(expected.getEventDate(), actual.getEventDate()); - assertEquals(expected.getFormSubmissionId(), actual.getFormSubmissionId()); - assertEquals(expected.getId(), actual.getId()); - assertEquals(expected.getIdentifiers(), expected.getIdentifiers()); - assertThat(actual.getObs(), is(actual.getObs())); - assertEquals(expected.getLocationId(), actual.getLocationId()); - assertEquals(expected.getProviderId(), actual.getProviderId()); - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java deleted file mode 100644 index 7f762ac78a..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java +++ /dev/null @@ -1,184 +0,0 @@ -package org.opensrp.service.formSubmission; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.atLeastOnce; -import static org.mockito.Mockito.inOrder; -import static org.mockito.Mockito.verifyNoMoreInteractions; -import static org.mockito.Mockito.verifyZeroInteractions; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import java.io.IOException; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.InOrder; -import org.mockito.InjectMocks; -import org.mockito.Mock; -import org.mockito.Spy; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.service.FormAttributeParser; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.ScheduleConfig; -import org.opensrp.scheduler.service.ActionService; -import org.opensrp.scheduler.service.ScheduleService; -import org.opensrp.service.ClientService; -import org.opensrp.service.EventService; -import org.opensrp.service.formSubmission.handler.FormSubmissionRouter; -import org.opensrp.service.formSubmission.ziggy.ZiggyService; -import org.opensrp.util.TestResourceLoader; -import org.opensrp.util.Utils; - -import com.google.gson.Gson; - - -public class FormEntityServiceTest extends TestResourceLoader{ - - @Mock - private ZiggyService ziggyService; - @Mock - private FormSubmissionRouter formSubmissionRouter; - @Mock - private FormSubmissionProcessor fsp; - @Mock - private FormEntityConverter formEntityConverter; - @Mock - private ClientService clientService; - @Mock - private EventService eventService; - - @Spy - private ScheduleConfig scheduleConfig; - @Mock - private ScheduleService schService; - @Mock - private ActionService actionService; - - @Mock - private AllClients allClients; - - @Mock - private AllEvents allEvents; - - @InjectMocks - private HealthSchedulerService scheduleService; - - @Mock - private FormEntityConverter fec; - - public FormEntityServiceTest() throws IOException { - super(); - } - - @Before - public void setUp() throws Exception { - scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); - initMocks(this); - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); - fec = new FormEntityConverter(new FormAttributeParser("/form")); - } - - @Test - public void shouldProcessNonZiggySubmission() throws Exception { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - fsp.processFormSubmission(fs); - - InOrder inOrder = inOrder(formEntityConverter, clientService, eventService, schService, ziggyService, formSubmissionRouter); - inOrder.verify(formEntityConverter).getClientFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getEventFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getDependentClientsFromFormSubmission(fs); - inOrder.verify(clientService, atLeastOnce()).addClient(any(Client.class)); - inOrder.verify(eventService, atLeastOnce()).addEvent(any(Event.class)); - inOrder.verify(schService).enroll(fs.entityId(), "FW CENSUS", "FW CENSUS", "2015-05-07", fs.instanceId()); - inOrder.verify(ziggyService).isZiggyCompliant(fs.bindType()); - inOrder.verify(formSubmissionRouter).route(fs); - - verifyNoMoreInteractions(formEntityConverter); - //verifyNoMoreInteractions(clientService); - //verifyNoMoreInteractions(eventService); - //verifyNoMoreInteractions(schService); - verifyNoMoreInteractions(ziggyService); - verifyNoMoreInteractions(formSubmissionRouter); - } - - @Test - public void shouldProcessNonZiggyWomanTTEnrollmentSubmission() throws Exception { - FormSubmission fs = getFormSubmissionFor("woman_enrollment"); - - fsp.processFormSubmission(fs); - - InOrder inOrder = inOrder(formEntityConverter, clientService, eventService, schService, ziggyService, formSubmissionRouter); - inOrder.verify(formEntityConverter).getClientFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getEventFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getDependentClientsFromFormSubmission(fs); - inOrder.verify(clientService, atLeastOnce()).addClient(any(Client.class)); - inOrder.verify(eventService, atLeastOnce()).addEvent(any(Event.class)); - inOrder.verify(schService).enroll(fs.entityId(), "TT 4", "tt4", "2016-03-25", fs.instanceId()); - inOrder.verify(ziggyService).isZiggyCompliant(fs.bindType()); - inOrder.verify(formSubmissionRouter).route(fs); - - verifyNoMoreInteractions(formEntityConverter); - //verifyNoMoreInteractions(clientService); - //verifyNoMoreInteractions(eventService); - //verifyNoMoreInteractions(schService); - verifyNoMoreInteractions(ziggyService); - verifyNoMoreInteractions(formSubmissionRouter); - } - - @Test - public void shouldProcessZiggySubmission() throws Exception { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - when(ziggyService.isZiggyCompliant("household")).thenReturn(true); - - fsp.processFormSubmission(fs); - - InOrder inOrder = inOrder(formEntityConverter, clientService, eventService, schService, ziggyService, formSubmissionRouter); - inOrder.verify(formEntityConverter).getClientFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getEventFromFormSubmission(fs); - inOrder.verify(formEntityConverter).getDependentClientsFromFormSubmission(fs); - inOrder.verify(clientService, atLeastOnce()).addClient(any(Client.class)); - inOrder.verify(eventService, atLeastOnce()).addEvent(any(Event.class)); - inOrder.verify(schService).enroll(fs.entityId(), "FW CENSUS", "FW CENSUS", "2015-05-07", fs.instanceId()); - inOrder.verify(ziggyService).isZiggyCompliant(fs.bindType()); - inOrder.verify(ziggyService).saveForm(Utils.getZiggyParams(fs), new Gson().toJson(fs.instance())); - - verifyZeroInteractions(formSubmissionRouter); - verifyNoMoreInteractions(formEntityConverter); - // verifyNoMoreInteractions(clientService); - // verifyNoMoreInteractions(eventService); - // verifyNoMoreInteractions(schService); - verifyNoMoreInteractions(ziggyService); - } - - /*TODO - @Test - public void shouldSortAllSubmissionsAndSaveEachOne() throws Exception { - long baseTimeStamp = DateUtil.now().getMillis(); - String paramsForEarlierFormSubmission = new Gson().toJson(create(ANM_ID, "anm id 1").put(INSTANCE_ID, "instance id 1").put(ENTITY_ID, "entity id 1").put(FORM_NAME, "form name 1").put(CLIENT_VERSION, String.valueOf(baseTimeStamp)).put(SERVER_VERSION, String.valueOf(1L)).map()); - String paramsForLaterFormSubmission = new Gson().toJson(create(ANM_ID, "anm id 2").put(INSTANCE_ID, "instance id 2").put(ENTITY_ID, "entity id 2").put(FORM_NAME, "form name 1").put(CLIENT_VERSION, String.valueOf(baseTimeStamp + 1)).put(SERVER_VERSION, String.valueOf(2L)).map()); - String paramsForVeryLateFormSubmission = new Gson().toJson(create(ANM_ID, "anm id 2").put(INSTANCE_ID, "instance id 3").put(ENTITY_ID, "entity id 3").put(FORM_NAME, "form name 1").put(CLIENT_VERSION, String.valueOf(baseTimeStamp + 2)).put(SERVER_VERSION, String.valueOf(3L)).map()); - FormSubmission earlierFormSubmission = FormSubmissionBuilder.create().withANMId("anm id 1").addFormField("field 1", "value 1").withTimeStamp(baseTimeStamp).withServerVersion(1L).build(); - FormSubmission laterFormSubmission = FormSubmissionBuilder.create().withANMId("anm id 2").withInstanceId("instance id 2").withEntityId("entity id 2").addFormField("field 1", "value 2").withTimeStamp(baseTimeStamp + 1).withServerVersion(2L).build(); - FormSubmission veryLateFormSubmission = FormSubmissionBuilder.create().withANMId("anm id 2").withInstanceId("instance id 3").withEntityId("entity id 3").addFormField("field 1", "value 3").withTimeStamp(baseTimeStamp + 2).withServerVersion(3L).build(); - List formSubmissions = asList(laterFormSubmission, earlierFormSubmission, veryLateFormSubmission); - FormExportToken formExportToken = new FormExportToken(0L); - when(allFormExportTokens.getAll()).thenReturn(asList(formExportToken)); - - submissionService.process(formSubmissions); - - InOrder inOrder = inOrder(ziggyService, allFormExportTokens); - inOrder.verify(ziggyService).saveForm(paramsForEarlierFormSubmission, new Gson().toJson(earlierFormSubmission.instance())); - inOrder.verify(allFormExportTokens).update(formExportToken.withVersion(1L)); - inOrder.verify(ziggyService).saveForm(paramsForLaterFormSubmission, new Gson().toJson(laterFormSubmission.instance())); - inOrder.verify(allFormExportTokens).update(formExportToken.withVersion(2L)); - inOrder.verify(ziggyService).saveForm(paramsForVeryLateFormSubmission, new Gson().toJson(veryLateFormSubmission.instance())); - inOrder.verify(allFormExportTokens).update(formExportToken.withVersion(3L)); - verifyNoMoreInteractions(ziggyService); - }*/ -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java deleted file mode 100644 index ffc78b9065..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java +++ /dev/null @@ -1,112 +0,0 @@ -package org.opensrp.service.formSubmission; - -import java.net.MalformedURLException; -import java.util.List; - -import org.ektorp.CouchDbInstance; -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.common.AllConstants; -import org.opensrp.domain.AppStateToken; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.form.repository.AllFormSubmissions; -import org.opensrp.repository.couch.AllAppStateTokens; -import org.opensrp.service.FormSubmissionDataMigrationService; -import org.opensrp.util.Utils; -import org.opensrp.util.Utils.DatabaseConnectionParams; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.beans.factory.annotation.Value; - -public class FormSubmissionDataMigrationIntegrationTest extends BaseIntegrationTest{ - @Autowired - FormSubmissionDataMigrationService dataMigrationService; - @Autowired - @Qualifier("couchAppStateTokensRepository") - AllAppStateTokens allAppStateTokens; - @Autowired - private FormSubmissionProcessor fsp; - @Autowired - AllFormSubmissions allFormSubmissions; - - StubAllFormSubmission stubAllFormSubmission; - - DatabaseConnectionParams sourceDb = new Utils.DatabaseConnectionParams(); - DatabaseConnectionParams targetDb = new Utils.DatabaseConnectionParams(); - - @Value("#{opensrp['couchdb.username']}") - String username; - @Value("#{opensrp['couchdb.password']}") - String password; - - @Before - public void oneTimeSetUp() throws MalformedURLException { - sourceDb.password = password; - sourceDb.dbName = "opensrp-form-test"; - sourceDb.portNumber = "5984"; - sourceDb.url = "http://localhost"; - sourceDb.userName = username; - - - - targetDb.password = password; - targetDb.dbName = "opensrp-form-test-targetdb"; - targetDb.portNumber = "5984"; - targetDb.url = "http://localhost"; - targetDb.userName = username; - - stubAllFormSubmission = new StubAllFormSubmission(Utils.connectToDB(sourceDb)); - new StubAllAppStateToken(Utils.connectToDB(sourceDb)); - new StubAllFormSubmission(Utils.connectToDB(targetDb)); - new StubAllAppStateToken(Utils.connectToDB(targetDb)); - } - - @After - public void oneTimeTearDown() throws MalformedURLException { - CouchDbInstance couchDbInstance = Utils.getDbInstance(sourceDb); - couchDbInstance.deleteDatabase(sourceDb.dbName); - couchDbInstance.deleteDatabase(targetDb.dbName); - targetDb = null; - sourceDb = null; - - } - - - @Test - public void shouldMigrateFormSubmissions() throws Exception { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - allFormSubmissions.add(fs); - - dataMigrationService.migrateFormSubmissions(); - List ol = allAppStateTokens.findByName(AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION.name()); - - Assert.assertTrue("AppStateToken shouldn't be empty after a successful migration", !ol.isEmpty()); - Assert.assertTrue("AppStateToken should be greater than 0 all the times after a successful migration", ol.get(0).longValue() > 0); - - - } - - - - @Test - public void shouldMigrateFormSubmissionsAndPopulateTargetDB() throws Exception { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - - stubAllFormSubmission.add(fs); - - dataMigrationService.migrateFormSubmissions(sourceDb, targetDb); - - List ol = allAppStateTokens.findByName(Utils.connectToDB(sourceDb), AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION.name()); - - Assert.assertTrue("AppStateToken shouldn't be empty after a successful migration", !ol.isEmpty()); - Assert.assertTrue("AppStateToken should be greater than 0 all the times after a successful migration", ol.get(0).longValue() > 0); - - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java deleted file mode 100644 index b21212b909..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java +++ /dev/null @@ -1,84 +0,0 @@ -package org.opensrp.service.formSubmission; - -import com.google.gson.JsonIOException; -import org.joda.time.LocalDate; -import org.json.JSONException; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.opensrp.form.domain.FormSubmission; -import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.ScheduleConfig; -import org.opensrp.scheduler.service.ScheduleService; -import org.opensrp.util.TestResourceLoader; - -import java.io.IOException; - -import static org.mockito.Mockito.*; -import static org.mockito.MockitoAnnotations.initMocks; - -public class FormSubmissionProcessorScheduleTest extends TestResourceLoader { - public FormSubmissionProcessorScheduleTest() throws IOException { - super(); - } - - - @Mock - private FormSubmissionProcessor fsp; - @Mock - private HealthSchedulerService scheduleService; - @Mock - private ScheduleService schService; - - @Before - public void setup() throws IOException, JSONException { - initMocks(this); - - ScheduleConfig scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); - scheduleService = new HealthSchedulerService(null, schService, scheduleConfig); - fsp = new FormSubmissionProcessor(null, null, null, scheduleService, null, null,null,null); - } - - @Test - public void shouldScheduleP1WhenNoneGivenOnEnrollment() throws JsonIOException, IOException, JSONException { - FormSubmission fs = getFormSubmissionFor("child_enrollment", 3); - - spy(fsp).handleSchedules(fs); - - verify(schService).enroll("8cc8cbca-7c39-4c57-b8c7-5ccd5cf88af7", "PENTAVALENT 1", "penta1", "2014-12-13", "1996b940-181e-46d5-bf8f-630bef2880a9"); - } - - @Test - public void shouldEnrollScheduleProperly() throws IOException, JSONException { - FormSubmission fs = getFormSubmissionFor("child_followup"); - HealthSchedulerService mockScheduleService = mock(HealthSchedulerService.class); - when(mockScheduleService.findAutomatedSchedules(fs.formName())).thenReturn(scheduleService.findAutomatedSchedules(fs.formName())); - fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null,null,null); - - fsp.handleSchedules(fs); - - verify(mockScheduleService).fullfillMilestoneAndCloseAlert("101aab44-5377-4846-95ad-442b857b54d2", fs.anmId(), - "PENTAVALENT 1", new LocalDate("2016-09-20"), fs.instanceId()); - verify(mockScheduleService).unEnrollFromSchedule("101aab44-5377-4846-95ad-442b857b54d2", fs.anmId(), - "PENTAVALENT 1", fs.instanceId()); - verify(mockScheduleService).enrollIntoSchedule("101aab44-5377-4846-95ad-442b857b54d2", "PENTAVALENT 2", - "penta2", "2016-09-20", fs.instanceId()); - } - - @Test - public void shouldEnrollScheduleForSubforms() throws IOException, JSONException { - FormSubmission fs = getFormSubmissionFor("new_household_registration", 2); - HealthSchedulerService mockScheduleService = mock(HealthSchedulerService.class); - when(mockScheduleService.findAutomatedSchedules(fs.formName())).thenReturn(scheduleService.findAutomatedSchedules(fs.formName())); - fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null,null,null); - - fsp.handleSchedules(fs); - - verify(mockScheduleService).enrollIntoSchedule("0aac6d81-b51f-4096-b354-5a5786e406c8", "FW CENSUS", - "FW CENSUS", "2015-05-06", fs.instanceId()); - verify(mockScheduleService).enrollIntoSchedule("b19db74f-6e96-4652-a765-5078beb12434", "Psrf", - "psrf", "2000-12-12", fs.instanceId()); - } - - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java deleted file mode 100644 index d8c1afe678..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.opensrp.service.formSubmission; - -import org.ektorp.CouchDbConnector; -import org.opensrp.repository.couch.AllAppStateTokens; - - -public class StubAllAppStateToken extends AllAppStateTokens { - - public StubAllAppStateToken(CouchDbConnector db) { - super(db); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllFormSubmission.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllFormSubmission.java deleted file mode 100644 index 753fd3be01..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllFormSubmission.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.opensrp.service.formSubmission; - - -import org.ektorp.CouchDbConnector; -import org.opensrp.form.repository.AllFormSubmissions; - -public class StubAllFormSubmission extends AllFormSubmissions{ - - public StubAllFormSubmission(CouchDbConnector db) { - super(db); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java deleted file mode 100644 index 8764024100..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java +++ /dev/null @@ -1,101 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; -import static org.opensrp.util.SampleFullDomainObject.getBaseEntity; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.BaseEntity; -import org.opensrp.repository.couch.AllBaseEntities; -import org.opensrp.service.BaseEntityService; -import org.springframework.beans.factory.annotation.Autowired; - -public class BaseEntityServiceTest extends BaseIntegrationTest { - - @Autowired - public AllBaseEntities allBaseEntities; - - @Autowired - public BaseEntityService baseEntityService; - - @Before - public void setUp() { - allBaseEntities.removeAll(); - } - - @After - public void cleanUp() { - allBaseEntities.removeAll(); - } - - @Test - public void shouldGetAllBaseEntities() { - BaseEntity baseEntity = getBaseEntity(); - BaseEntity baseEntity1 = getBaseEntity(); - baseEntity1.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - List expectedBaseEntities = asList(baseEntity, baseEntity1); - addObjectToRepository(expectedBaseEntities, allBaseEntities); - - List actualBaseEntities = baseEntityService.getAllBaseEntities(); - - assertTwoListAreSameIgnoringOrder(expectedBaseEntities, actualBaseEntities); - } - - @Test - public void shouldFindByEntityId() { - BaseEntity expectedBaseEntity = getBaseEntity(); - BaseEntity invalidBaseEntity = getBaseEntity(); - invalidBaseEntity.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedBaseEntity, invalidBaseEntity), allBaseEntities); - - BaseEntity actualBaseEntity = baseEntityService.findByBaseEntityId(BASE_ENTITY_ID); - - assertEquals(expectedBaseEntity, actualBaseEntity); - } - - @Test - public void shouldFindByIdentifierValue() { - BaseEntity expectedBaseEntity = getBaseEntity(); - BaseEntity expectedBaseEntity1 = getBaseEntity(); - BaseEntity invalidBaseEntity = getBaseEntity(); - Map differentIdentifiers = new HashMap<>(identifier); - differentIdentifiers.put(IDENTIFIER_TYPE, DIFFERENT_BASE_ENTITY_ID); - invalidBaseEntity.setIdentifiers(differentIdentifiers); - List expectedBaseEntities = asList(expectedBaseEntity, expectedBaseEntity1); - addObjectToRepository(asList(expectedBaseEntity, expectedBaseEntity1, invalidBaseEntity), allBaseEntities); - - List actualBaseEntities = baseEntityService.findByIdentifier(IDENTIFIER_VALUE); - - assertTwoListAreSameIgnoringOrder(expectedBaseEntities, actualBaseEntities); - } - - @Test - public void shouldFindByIdentifierTypeAndValue() { - BaseEntity expectedBaseEntity = getBaseEntity(); - BaseEntity expectedBaseEntity1 = getBaseEntity(); - BaseEntity invalidBaseEntity = getBaseEntity(); - Map differentIdentifiers = new HashMap<>(); - differentIdentifiers.put(DIFFERENT_BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID); - invalidBaseEntity.setIdentifiers(differentIdentifiers); - List expectedBaseEntities = asList(expectedBaseEntity, expectedBaseEntity1); - addObjectToRepository(asList(expectedBaseEntity, expectedBaseEntity1, invalidBaseEntity), allBaseEntities); - - List actualBaseEntities = baseEntityService.findByIdentifier(IDENTIFIER_TYPE, IDENTIFIER_VALUE); - - assertTwoListAreSameIgnoringOrder(expectedBaseEntities, actualBaseEntities); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java deleted file mode 100644 index 3da74b3144..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java +++ /dev/null @@ -1,499 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; -import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; -import static org.opensrp.util.SampleFullDomainObject.getClient; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertNewObjectCreation; -import static org.utils.AssertionUtil.assertObjectUpdate; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.json.JSONException; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.service.ClientService; -import org.springframework.beans.factory.annotation.Autowired; - -//TODO: Write couch-lucene related method test cases e.g: findByCriteria -public class ClientServiceTest extends BaseIntegrationTest { - - @Autowired - private AllClients allClients; - - @Autowired - private ClientService clientService; - - @Before - public void setUp() { - allClients.removeAll(); - } - - @After - public void cleanUp() { - allClients.removeAll(); - } - - @Test - public void shouldFindByBaeEntityId() { - String baseEntityId = "baseEntityId"; - Client expectedClient = new Client(baseEntityId); - Client invalidClient = new Client("b2"); - Client invalidClientSecond = new Client("b3"); - List clientList = asList(expectedClient, invalidClient, invalidClientSecond); - addObjectToRepository(clientList, allClients); - - Client actualClient = clientService.getByBaseEntityId(baseEntityId); - - assertEquals(expectedClient, actualClient); - } - - @Test - public void shouldFindAllClient() { - Client expectedClient = new Client("b1"); - Client expectedClient2 = new Client("b2"); - Client expectedClient3 = new Client("b3"); - List expectedClientList = asList(expectedClient, expectedClient2, expectedClient3); - addObjectToRepository(expectedClientList, allClients); - - List actualClientList = clientService.findAllClients(); - - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - - } - - @Test - public void shouldFindAllClientsByIdentifierValue() { - Client expectedClient = new Client("b1"); - expectedClient.addIdentifier("type", "value"); - Client expectedClient2 = new Client("b2"); - expectedClient2.addIdentifier("type", "value"); - Client invalidClient = new Client("b3"); - invalidClient.addIdentifier("type2", "value2"); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService.findAllByIdentifier("value"); - - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - @Test - public void shouldFindAllClientsByIdentifierTypeAndValue() { - Client expectedClient = new Client("b1"); - expectedClient.addIdentifier("type", "value"); - Client expectedClient2 = new Client("b2"); - expectedClient2.addIdentifier("type", "value"); - Client invalidClient = new Client("b3"); - invalidClient.addIdentifier("type2", "value2"); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService.findAllByIdentifier("type", "value"); - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - @Test - public void shouldFindAllClientsByRelationIdAndDateCreated() { - Client expectedClient = new Client("b1"); - expectedClient.addRelationship("mother", "id"); - expectedClient.setDateCreated(new DateTime(100L, DateTimeZone.UTC)); - Client expectedClient2 = new Client("b2"); - expectedClient2.addRelationship("mother", "id"); - expectedClient2.setDateCreated(new DateTime(200L, DateTimeZone.UTC)); - Client invalidClient = new Client("b3"); - invalidClient.addRelationship("mother", "id2"); - expectedClient.setDateCreated(new DateTime(300L, DateTimeZone.UTC)); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService - .findByRelationshipIdAndDateCreated("id", new DateTime(100L, DateTimeZone.UTC).toLocalDate().toString(), - new DateTime(200L, DateTimeZone.UTC).toLocalDate().toString()); - - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - //TODO: Couch-lucene query error - @Test - @Ignore - public void shouldFindByRelationShip() { - Client expectedClient = getClient(); - expectedClient.addRelationship("mother", "id"); - expectedClient.setDateCreated(new DateTime(DateTimeZone.UTC)); - Client expectedClient2 = getClient(); - expectedClient2.setBaseEntityId("dd"); - expectedClient2.addRelationship("mother", "id"); - expectedClient2.setDateCreated(new DateTime(DateTimeZone.UTC)); - Client invalidClient = getClient(); - invalidClient.setBaseEntityId("ddss"); - invalidClient.addRelationship("mother", "id2"); - expectedClient.setDateCreated(new DateTime(DateTimeZone.UTC)); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService.findByRelationship("id"); - - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - @Test - public void shouldFindByAttributeTypeAndValue() { - Client expectedClient = new Client("b1"); - expectedClient.addAttribute("type", "value"); - Client expectedClient2 = new Client("b2"); - expectedClient2.addAttribute("type", "value"); - Client invalidClient = new Client("b3"); - invalidClient.addAttribute("type2", "value2"); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService.findAllByAttribute("type", "value"); - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - @Test - public void shouldFindAllMatchingName() { - Client expectedClient = new Client("b1"); - expectedClient.setFirstName("first"); - expectedClient.setLastName("last"); - Client expectedClient2 = new Client("b2"); - expectedClient2.setFirstName("first"); - expectedClient2.setLastName("last"); - Client invalidClient = new Client("b3"); - invalidClient.setFirstName("invalid"); - invalidClient.setLastName("invalid"); - addObjectToRepository(asList(expectedClient, expectedClient2, invalidClient), allClients); - List expectedClientList = asList(expectedClient, expectedClient2); - - List actualClientList = clientService.findAllByMatchingName("first"); - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - } - - /*@Test - @Ignore - public void shouldFindByAllCriteria() { - Client expectedClient = SampleFullDomainObject.client; - Client invalidClient = new Client(SampleFullDomainObject.BASE_ENTITY_ID); - invalidClient.setFirstName("invalid"); - invalidClient.setLastName("invalid"); - addObjectToRepository(asList(expectedClient, invalidClient), allClients); - List expectedClientList = asList(expectedClient); - - List actualClientList = clientService.findByCriteria(FIRST_NAME, ); - assertTwoListAreSameIgnoringOrder(expectedClientList, actualClientList); - }*/ - //TODO: Repository is returning time in UTC format. - //TODO: TEST value of Date created field. - @Test - public void shouldAdd() { - Client expectedClient = getClient(); - - Client actualClient = clientService.addClient(expectedClient); - - List dbClients = allClients.getAll(); - assertEquals(1, dbClients.size()); - - assertEquals(expectedClient, actualClient); - assertNewObjectCreation(expectedClient, dbClients.get(0)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowRuntimeExceptionWhileAddIfNoBaseEntityIdFound() { - Client expectedClient = getClient(); - expectedClient.setBaseEntityId(null); - - clientService.addClient(expectedClient); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowIllegalArgumentExceptionIfAClientAlreadyExistWithSameIdentifier() { - - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client expectedClient = allClients.getAll().get(0); - expectedClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - - clientService.addClient(expectedClient); - } - - //TODO: Repository is returning time in UTC format. - //TODO: TEST value of Date created field. - @Test - public void shouldAddWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - - Client actualClient = clientService.addClient(expectedClient); - - List dbClients = allClients.getAll(); - assertEquals(1, dbClients.size()); - assertNewObjectCreation(expectedClient, dbClients.get(0)); - assertEquals(expectedClient, actualClient); - - } - - @Test(expected = RuntimeException.class) - public void shouldThrowRuntimeExceptionWhileAddIfNoBaseEntityIdFoundWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - expectedClient.setBaseEntityId(null); - clientService.addClient(expectedClient); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowIllegalArgumentExceptionIfAClientAlreadyExistWithSameIdentifierWithCouchDbConnector() - throws IOException { - Client expectedClient = getClient(); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - expectedClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - clientService.addClient(expectedClient); - } - - @Test - public void shouldFindFromClientObjectWithBaseIdentifier() { - Client expectedClient = getClient(); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - Client actualClient = clientService.findClient(expectedClient); - - assertEquals(expectedClient, actualClient); - } - - @Test - public void shouldFindFromClientWithIdentifiers() { - Client expectedClient = getClient(); - expectedClient.setBaseEntityId(null); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - Client actualClient = clientService.findClient(expectedClient); - - assertEquals(expectedClient, actualClient); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleClientFoundWithSameIdentifier() { - Client expectedClient = getClient(); - Client sameClient = getClient(); - sameClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedClient, sameClient), allClients); - expectedClient.setBaseEntityId(null); - - clientService.findClient(expectedClient); - - } - - @Test - public void shouldReturnNullIfNoClientFound() { - Client expectedClient = getClient(); - - Client actualClient = clientService.findClient(expectedClient); - - assertNull(actualClient); - } - - @Test - public void shouldFindFromClientObjectWithBaseIdentifierWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - Client actualClient = clientService.findClient(expectedClient); - - assertEquals(expectedClient, actualClient); - } - - @Test - public void shouldFindFromClientWithIdentifiersWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - expectedClient.setBaseEntityId(null); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - Client actualClient = clientService.findClient(expectedClient); - - assertEquals(expectedClient, actualClient); - } - - public void shouldReturnNullIfMultipleClientFoundWithSameIdentifierWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - Client sameClient = getClient(); - sameClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedClient, sameClient), allClients); - expectedClient.setBaseEntityId(null); - - Client client = clientService.findClient(expectedClient); - - assertNull(client); - - } - - @Test - public void shouldReturnNullIfNoClientFoundWithCouchDbConnector() throws IOException { - Client expectedClient = getClient(); - - Client actualClient = clientService.findClient(expectedClient); - - assertNull(actualClient); - } - - @Test - public void shouldFindByUniqueIdBaseEntityId() { - Client expectedClient = getClient(); - Client invalidClient = getClient(); - invalidClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedClient, invalidClient), allClients); - - Client actualClient = clientService.find(BASE_ENTITY_ID); - - assertEquals(expectedClient, actualClient); - - } - - @Test - public void shouldFindByUniqueIdIdentifier() { - Client expectedClient = getClient(); - Client invalidClient = getClient(); - Map differentIdentifiers = new HashMap<>(identifier); - differentIdentifiers.put(IDENTIFIER_TYPE, "differentValue"); - invalidClient.setIdentifiers(differentIdentifiers); - addObjectToRepository(asList(expectedClient, invalidClient), allClients); - - Client actualClient = clientService.find(IDENTIFIER_VALUE); - - assertEquals(expectedClient, actualClient); - - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleClientFoundWithSameIdentifierUsingUniqueId() { - Client expectedClient = getClient(); - Client sameClient = getClient(); - sameClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedClient, sameClient), allClients); - - clientService.find(IDENTIFIER_VALUE); - - } - - @Test - public void shouldReturnNullIfNoClientFoundUsingUniqueId() { - Client expectedClient = getClient(); - addObjectToRepository(Collections.singletonList(expectedClient), allClients); - Client actualClient = clientService.find(DIFFERENT_BASE_ENTITY_ID); - - assertNull(actualClient); - } - - //TODO: Repository is returning time in UTC format. - //TODO: TEST value of Date edited field. - @Test - public void shouldUpdateClient() throws JSONException { - Client client = getClient(); - addObjectToRepository(Collections.singletonList(client), allClients); - Client updatedClient = allClients.getAll().get(0); - updatedClient.setFirstName(LAST_NAME); - - clientService.updateClient(updatedClient); - - List actualClientList = allClients.getAll(); - assertEquals(1, actualClientList.size()); - assertObjectUpdate(updatedClient, actualClientList.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionWhileUpdateIfNewClient() throws JSONException { - Client client = getClient(); - - clientService.updateClient(client); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionWhileUpdateIfClientIsNotFound() throws JSONException { - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client updatedClient = allClients.getAll().get(0); - allClients.removeAll(); - - clientService.updateClient(updatedClient); - } - - @Test - public void shouldFindByServerVersion() { - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client expectedClient = allClients.getAll().get(0); - - List actualClientList = clientService.findByServerVersion(expectedClient.getServerVersion() - 1); - - assertEquals(1, actualClientList.size()); - assertEquals(expectedClient, actualClientList.get(0)); - } - - @Test - public void shouldAddIfNewEntityInAddOrUpdateMethod() { - Client expectedClient = getClient(); - - Client actualClient = clientService.addorUpdate(expectedClient); - - List dbClients = allClients.getAll(); - assertEquals(1, dbClients.size()); - - assertEquals(expectedClient, actualClient); - assertNewObjectCreation(expectedClient, dbClients.get(0)); - - } - - @Test - public void shouldUpdateIfExistingEntityInAddOrUpdateMethodRes() { - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client expectedClient = allClients.getAll().get(0); - expectedClient.setFirstName(LAST_NAME); - Long expectedServerVersion = expectedClient.getServerVersion(); - - Client actualClient = clientService.addorUpdate(expectedClient); - - List dbClients = allClients.getAll(); - assertEquals(1, dbClients.size()); - assertEquals(expectedClient, actualClient); - - assertNotEquals(expectedServerVersion, dbClients.get(0).getServerVersion()); - assertObjectUpdate(expectedClient, dbClients.get(0)); - } - - @Test(expected = RuntimeException.class) - public void shouldThrowErrorIfBaseEntityIdNotFound() { - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client expectedClient = allClients.getAll().get(0); - expectedClient.setBaseEntityId(null); - clientService.addorUpdate(expectedClient); - } - - @Test - public void shouldUpdateIfExistingEntityInAddOrUpdateMethodWithOutResettingServerVersion() { - addObjectToRepository(Collections.singletonList(getClient()), allClients); - Client expectedClient = allClients.getAll().get(0); - expectedClient.setFirstName(LAST_NAME); - Client actualClient = clientService.addorUpdate(expectedClient, false); - - List dbClients = allClients.getAll(); - assertEquals(1, dbClients.size()); - - assertEquals(expectedClient, actualClient); - assertObjectUpdate(expectedClient, dbClients.get(0)); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java deleted file mode 100644 index 99efbe44e6..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java +++ /dev/null @@ -1,193 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.opensrp.util.SampleFullDomainObject.APP_STATE_TOKEN_DESCRIPTION; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.LAST_EDIT_DATE; -import static org.opensrp.util.SampleFullDomainObject.VALUE; -import static org.opensrp.util.SampleFullDomainObject.getAppStateToken; -import static org.opensrp.util.SampleFullDomainObject.AppStateTokenName.APP_STATE_TOKEN_NAME; -import static org.opensrp.util.SampleFullDomainObject.AppStateTokenName.DIFFERENT_APP_STATE_TOKEN_NAME; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; -import static org.utils.CouchDbAccessUtils.getCouchDbConnector; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.AppStateToken; -import org.opensrp.repository.couch.AllAppStateTokens; -import org.opensrp.service.ConfigService; -import org.springframework.beans.factory.annotation.Autowired; - -public class ConfigServiceTest extends BaseIntegrationTest { - - @Autowired - AllAppStateTokens allAppStateTokens; - - @Autowired - ConfigService configService; - - @Before - public void setUp() { - allAppStateTokens.removeAll(); - } - - @After - public void cleanUp() { - allAppStateTokens.removeAll(); - } - - @Test - public void shouldFindAppStateTokenByName() { - AppStateToken expectedAppStateToken = getAppStateToken(); - AppStateToken invalidAppStateToken = getAppStateToken(); - invalidAppStateToken.setName(DIFFERENT_APP_STATE_TOKEN_NAME.name()); - addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - - AppStateToken actualAppStateToken = configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME); - - assertEquals(expectedAppStateToken, actualAppStateToken); - } - - @Test(expected = IllegalStateException.class) - public void shouldThrowExceptionIfMultipleAppStateTokenWithSameNameFound() { - AppStateToken expectedAppStateToken = getAppStateToken(); - AppStateToken invalidAppStateToken = getAppStateToken(); - addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - - configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME); - - } - - @Test - public void shouldReturnNullIfNoTokenFound() { - assertNull(configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME)); - } - - @Test - public void shouldFindAppStateTokenByNameUsingCouchdbConnector() throws IOException { - AppStateToken expectedAppStateToken = getAppStateToken(); - AppStateToken invalidAppStateToken = getAppStateToken(); - invalidAppStateToken.setName(DIFFERENT_APP_STATE_TOKEN_NAME.name()); - addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - - AppStateToken actualAppStateToken = allAppStateTokens.getAppStateTokenByName(getCouchDbConnector("opensrp"), - APP_STATE_TOKEN_NAME); - - assertEquals(expectedAppStateToken, actualAppStateToken); - } - - @Test - public void shouldUpdate() { - AppStateToken expectedAppStateToken = getAppStateToken(); - addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - - expectedAppStateToken.setValue(DIFFERENT_BASE_ENTITY_ID); - - configService.updateAppStateToken(APP_STATE_TOKEN_NAME, DIFFERENT_BASE_ENTITY_ID); - - List allTokens = allAppStateTokens.getAll(); - assertEquals(1, allTokens.size()); - assertNotEquals(expectedAppStateToken.getLastEditDate(), allTokens.get(0).getLastEditDate()); - - allTokens.get(0).setLastEditDate(LAST_EDIT_DATE); - assertEquals(expectedAppStateToken, allTokens.get(0)); - } - - @Test(expected = IllegalStateException.class) - public void shouldThrowExceptionIfMultipleTokenFoundWithSameNameWhileUpdate() { - AppStateToken expectedAppStateToken = getAppStateToken(); - AppStateToken invalidAppStateToken = getAppStateToken(); - addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - - configService.updateAppStateToken(APP_STATE_TOKEN_NAME, DIFFERENT_BASE_ENTITY_ID); - } - - @Test - public void shouldThrowExceptionIfTokenNotFound() { - - } - - @Test - public void shouldUpdateWithCouchDbConnector() throws IOException { - AppStateToken expectedAppStateToken = getAppStateToken(); - addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - - expectedAppStateToken.setValue(DIFFERENT_BASE_ENTITY_ID); - - allAppStateTokens.updateAppStateToken(getCouchDbConnector("opensrp"), APP_STATE_TOKEN_NAME, - DIFFERENT_BASE_ENTITY_ID); - - List allTokens = allAppStateTokens.getAll(); - assertEquals(1, allTokens.size()); - assertNotEquals(expectedAppStateToken.getLastEditDate(), allTokens.get(0).getLastEditDate()); - - allTokens.get(0).setLastEditDate(LAST_EDIT_DATE); - assertEquals(expectedAppStateToken, allTokens.get(0)); - } - - @Test - public void shouldRegisterNewAppStateToken() { - AppStateToken expectedAppStateToken = getAppStateToken(); - expectedAppStateToken.setLastEditDate(0L); - - AppStateToken actualAppStateToken = configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, - APP_STATE_TOKEN_DESCRIPTION, true); - - List allTokens = allAppStateTokens.getAll(); - assertEquals(1, allTokens.size()); - assertEquals(expectedAppStateToken, allTokens.get(0)); - assertEquals(expectedAppStateToken, actualAppStateToken); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionInRegisterIfNameIsNull() { - configService.registerAppStateToken(null, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionInRegisterIfDescriptionIsEmpty() { - configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, "", true); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionInRegisterIfTokenAlreadyExistAndSuppressWaringIsOff() { - AppStateToken expectedAppStateToken = getAppStateToken(); - addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - - configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, false); - } - - @Test - public void shouldReturnExistingTokenIfSuppressWarningIsOn() { - AppStateToken expectedAppStateToken = getAppStateToken(); - addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - - AppStateToken actualAppStateToken = configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, - APP_STATE_TOKEN_DESCRIPTION, true); - - assertEquals(expectedAppStateToken, actualAppStateToken); - } - - @Test - public void shouldRegisterNewTokenWithCouchdbConnector() throws IOException { - AppStateToken expectedAppStateToken = getAppStateToken(); - expectedAppStateToken.setLastEditDate(0L); - - AppStateToken actualAppStateToken = allAppStateTokens.registerAppStateToken(getCouchDbConnector("opensrp"), - APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); - - List allTokens = allAppStateTokens.getAll(); - assertEquals(1, allTokens.size()); - assertEquals(expectedAppStateToken, allTokens.get(0)); - assertEquals(expectedAppStateToken, actualAppStateToken); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java deleted file mode 100644 index fb153e5485..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.getErrorTrace; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.couch.AllErrorTrace; -import org.opensrp.service.ErrorTraceService; -import org.springframework.beans.factory.annotation.Autowired; - -public class ErrorTraceTest extends BaseIntegrationTest { - - @Autowired - public AllErrorTrace allErrorTrace; - - @Autowired - public ErrorTraceService errorTraceService; - - @Before - public void setUp() { - allErrorTrace.removeAll(); - } - - @After - public void cleanUp() { - allErrorTrace.removeAll(); - } - - @Test - public void shouldGetErrorTraceById() { - addObjectToRepository(Collections.singletonList(getErrorTrace()), allErrorTrace); - ErrorTrace expectedErrorTrace = allErrorTrace.getAll().get(0); - - ErrorTrace actualErrorTrace = errorTraceService.getError(expectedErrorTrace.getId()); - - assertEquals(expectedErrorTrace, actualErrorTrace); - } - - @Test - public void shouldGetAllUnsolvedErrors() { - ErrorTrace errorTrace = getErrorTrace(); - errorTrace.setStatus("unsolved"); - ErrorTrace errorTrace1 = getErrorTrace(); - errorTrace1.setStatus("unsolved"); - ErrorTrace invalidErrorTrace = getErrorTrace(); - invalidErrorTrace.setStatus("solved"); - addObjectToRepository(asList(errorTrace, errorTrace1, invalidErrorTrace), allErrorTrace); - List expectedErrorTraces = asList(errorTrace, errorTrace1); - - List actualErrorTraces = errorTraceService.getAllUnsolvedErrors(); - - assertTwoListAreSameIgnoringOrder(expectedErrorTraces, actualErrorTraces); - } - - @Test - public void shouldReturnNullIfNoUnsolvedErrorFound() { - assertNull(errorTraceService.getAllUnsolvedErrors()); - } - - @Test - public void shouldGetAllSolvedErrors() { - ErrorTrace errorTrace = getErrorTrace(); - errorTrace.setStatus("solved"); - ErrorTrace errorTrace1 = getErrorTrace(); - errorTrace1.setStatus("solved"); - ErrorTrace invalidErrorTrace = getErrorTrace(); - invalidErrorTrace.setStatus("unsolved"); - addObjectToRepository(asList(errorTrace, errorTrace1, invalidErrorTrace), allErrorTrace); - List expectedErrorTraces = asList(errorTrace, errorTrace1); - - List actualErrorTraces = errorTraceService.getAllSolvedErrors(); - - assertTwoListAreSameIgnoringOrder(expectedErrorTraces, actualErrorTraces); - } - - @Test - public void shouldReturnNullIfNoSolvedErrorFound() { - assertNull(errorTraceService.getAllSolvedErrors()); - } - - @Test - public void shouldGetAllAllErrors() { - ErrorTrace errorTrace = getErrorTrace(); - errorTrace.setStatus("unsolved"); - ErrorTrace errorTrace1 = getErrorTrace(); - errorTrace1.setStatus("unsolved"); - ErrorTrace errorTrace2 = getErrorTrace(); - errorTrace2.setStatus("solved"); - List expectedErrorTraces = asList(errorTrace, errorTrace1, errorTrace2); - - assertEquals(0, allErrorTrace.getAll().size()); - addObjectToRepository(expectedErrorTraces, allErrorTrace); - List actualErrorTraces = errorTraceService.getAllErrors(); - - assertTwoListAreSameIgnoringOrder(expectedErrorTraces, actualErrorTraces); - } - - @Test - public void shouldReturnNullIfNoErrorFound() { - assertNull(errorTraceService.getAllErrors()); - } - - @Test - public void shouldAddErrorTrace() { - ErrorTrace expectedErrorTrace = getErrorTrace(); - - errorTraceService.addError(expectedErrorTrace); - - List actualErrorTraces = allErrorTrace.getAll(); - - assertEquals(1, actualErrorTraces.size()); - assertEquals(expectedErrorTrace, actualErrorTraces.get(0)); - } - - @Test - public void shouldLogError() { - ErrorTrace expectedErrorTrace = getErrorTrace(); - expectedErrorTrace.setOccurredAt(null); - expectedErrorTrace.setStatus(null); - expectedErrorTrace.setRetryUrl("retryUrl"); - - errorTraceService.log(expectedErrorTrace.getErrorType(), expectedErrorTrace.getDocumentType(), - expectedErrorTrace.getRecordId(), expectedErrorTrace.getStackTrace(), "retryUrl"); - - List actualErrorTraces = allErrorTrace.getAll(); - - assertEquals(1, actualErrorTraces.size()); - assertNotNull(actualErrorTraces.get(0).getDateOccurred()); - actualErrorTraces.get(0).setDateOccurred(EPOCH_DATE_TIME); - assertEquals(expectedErrorTrace, actualErrorTraces.get(0)); - - } - - @Test - public void shouldUpdateError() { - addObjectToRepository(Collections.singletonList(getErrorTrace()), allErrorTrace); - ErrorTrace updatedErrorTrace = allErrorTrace.getAll().get(0); - updatedErrorTrace.setRetryUrl("retryUrl"); - updatedErrorTrace.setStatus("solved"); - - errorTraceService.updateError(updatedErrorTrace); - - List actualErrorTraces = allErrorTrace.getAll(); - - assertEquals(1, actualErrorTraces.size()); - assertEquals(updatedErrorTrace, actualErrorTraces.get(0)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java deleted file mode 100644 index caa2b8164b..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java +++ /dev/null @@ -1,596 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.opensrp.common.AllConstants.OpenSRPEvent.Client.ZEIR_ID; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.EVENT_TYPE; -import static org.opensrp.util.SampleFullDomainObject.FIELD_CODE; -import static org.opensrp.util.SampleFullDomainObject.FORM_SUBMISSION_ID; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; -import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; -import static org.opensrp.util.SampleFullDomainObject.VALUE; -import static org.opensrp.util.SampleFullDomainObject.getClient; -import static org.opensrp.util.SampleFullDomainObject.getEvent; -import static org.opensrp.util.SampleFullDomainObject.getObs; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertNewObjectCreation; -import static org.utils.AssertionUtil.assertObjectUpdate; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; -import static org.utils.CouchDbAccessUtils.getCouchDbConnector; - -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; -import org.opensrp.service.EventService; -import org.springframework.beans.factory.annotation.Autowired; - -public class EventServiceTest extends BaseIntegrationTest { - - @Autowired - private AllEvents allEvents; - - @Autowired - private AllClients allClients; - - @Autowired - private EventService eventService; - - @Before - public void setUp() { - allClients.removeAll(); - allEvents.removeAll(); - } - - @Before - public void cleanUp() { - allClients.removeAll(); - allEvents.removeAll(); - } - - @Test - public void shouldFindAllByIdentifier() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - List expectedEventList = asList(expectedEvent, expectedEvent2); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - List actualEventList = eventService.findAllByIdentifier(IDENTIFIER_VALUE); - - assertTwoListAreSameIgnoringOrder(expectedEventList, actualEventList); - } - - @Test - public void shouldFindAllByIdentifierTypeAndValue() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - List expectedEventList = asList(expectedEvent, expectedEvent2); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - List actualEventList = eventService.findAllByIdentifier(IDENTIFIER_TYPE, IDENTIFIER_VALUE); - - assertTwoListAreSameIgnoringOrder(expectedEventList, actualEventList); - } - - @Test - public void shouldFindByDocumentId() { - addObjectToRepository(asList(getEvent()), allEvents); - Event expectedEvent = allEvents.getAll().get(0); - - Event actualEvent = eventService.getById(expectedEvent.getId()); - - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldFindByBaseEntityAndFormSubmissionId() { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - Event actualEvent = eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - - assertEquals(expectedEvent, actualEvent); - } - - @Test(expected = IllegalStateException.class) - public void shouldThrowExceptionIfMultipleFound() { - addObjectToRepository(asList(getEvent(), getEvent()), allEvents); - - eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - } - - @Test - public void shouldReturnNullIfNoEventFound() { - Event actualEvent = eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - - assertNull(actualEvent); - } - - @Test - public void shouldFindByBaseEntityIdAndFormSubmissionIdUsingCouchDbConnector() throws IOException { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - Event actualEvent = allEvents.getByBaseEntityAndFormSubmissionId(getCouchDbConnector("opensrp"), BASE_ENTITY_ID, - FORM_SUBMISSION_ID); - - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldFindByBaseEntityId() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - Event invalidEvent = getEvent(); - invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - List expectedEvents = asList(expectedEvent, expectedEvent2); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - List actualEvents = eventService.findByBaseEntityId(BASE_ENTITY_ID); - - assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); - } - - @Test - public void shouldFindByFormSubmissionId() { - Event expectedEvent = getEvent(); - - addObjectToRepository(asList(expectedEvent), allEvents); - - Event actualEvent = eventService.findByFormSubmissionId(FORM_SUBMISSION_ID); - - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldFindByUniqueIdIdentifier() { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - Event actualEvent = eventService.find(IDENTIFIER_VALUE); - - assertEquals(expectedEvent, actualEvent); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleFoundWithSameIdentifierValue() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - eventService.find(IDENTIFIER_VALUE); - } - - @Test - public void shouldReturnNullIfNothingFoundWithIdentifier() { - assertNull(eventService.find(IDENTIFIER_VALUE)); - } - - @Test - public void shouldFindByEventObject() { - Event expectedEvent = getEvent(); - - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - Event actualEvent = eventService.find(expectedEvent); - - assertEquals(expectedEvent, actualEvent); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleFoundWithSameEvent() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - eventService.find(expectedEvent); - } - - @Test - public void shouldReturnNullIfNothingFoundWithSameEvent() { - Event expectedEvent = getEvent(); - assertNull(eventService.find(expectedEvent)); - } - - @Test - public void shouldFindByEventOrDocumentId() { - addObjectToRepository(asList(getEvent()), allEvents); - Event expectedEvent = allEvents.getAll().get(0); - - Event actualEvent = eventService.findById(expectedEvent.getId()); - - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldReturnNullForNullOrEmptyIdInFindById() { - Event actualEvent = eventService.findById(""); - assertNull(actualEvent); - actualEvent = eventService.findById(null); - assertNull(actualEvent); - } - - @Test - public void shouldReturnNullIfEventNotFound() { - addObjectToRepository(asList(getEvent()), allEvents); - - Event actualEvent = eventService.findById(DIFFERENT_BASE_ENTITY_ID); - - assertNull(actualEvent); - } - - @Test - public void shouldAddEvent() { - Event expectedEvent = getEvent(); - - Event actualEvent = eventService.addEvent(expectedEvent); - - List dbEvents = allEvents.getAll(); - assertEquals(1, dbEvents.size()); - assertEquals(expectedEvent, actualEvent); - assertNewObjectCreation(expectedEvent, dbEvents.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfAnEventAlreadyExistWithSameIdentifier() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - - eventService.addEvent(expectedEvent); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfAnEventAlreadyExistWithSameBaseEntityIdAndFormSumbissionId() { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - eventService.addEvent(expectedEvent); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfNullFormSubmissionId() { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - expectedEvent.setFormSubmissionId(null); - eventService.addEvent(expectedEvent); - } - - @Test - public void shouldAddEventWithCouchDbConnector() throws IOException { - Event expectedEvent = getEvent(); - - Event actualEvent = allEvents.addEvent(getCouchDbConnector("opensrp"), expectedEvent); - - List dbEvents = allEvents.getAll(); - assertEquals(1, dbEvents.size()); - assertEquals(expectedEvent, actualEvent); - assertNewObjectCreation(expectedEvent, dbEvents.get(0)); - } - - @Test(expected = IllegalStateException.class) - public void shouldThrowExceptionIfAnEventAlreadyExistWithSameBaseEntityIdAndFormSumbissionIdWithCouchDbConector() - throws IOException { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - allEvents.addEvent(getCouchDbConnector("opensrp"), expectedEvent); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfNullFormSubmissionIdWithCouchDbConnector() throws IOException { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - invalidEvent.setIdentifiers(identifiers); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - expectedEvent.setFormSubmissionId(null); - allEvents.addEvent(getCouchDbConnector("opensrrp"), expectedEvent); - } - - @Test - public void shouldAddIfNewEntityInAddOrUpdate() { - Event expectedEvent = getEvent(); - - Event actualEvent = eventService.addorUpdateEvent(expectedEvent); - - List dbEvents = eventService.getAll(); - assertEquals(1, dbEvents.size()); - assertEquals(expectedEvent, actualEvent); - - assertNewObjectCreation(expectedEvent, dbEvents.get(0)); - } - - @Test - public void shouldUpdateIfExistingEntityInAddOrUpdate() { - addObjectToRepository(Collections.singletonList(getEvent()), allEvents); - Event expectedEvent = allEvents.getAll().get(0); - - Event actualEvent = eventService.addorUpdateEvent(expectedEvent); - - List dbEvents = eventService.getAll(); - assertEquals(1, dbEvents.size()); - assertEquals(expectedEvent, actualEvent); - - dbEvents.get(0).setServerVersion(null); - assertObjectUpdate(expectedEvent, dbEvents.get(0)); - } - - @Test - public void shouldUpdateEvent() { - addObjectToRepository(Collections.singletonList(getEvent()), allEvents); - Event expectedEvent = allEvents.getAll().get(0); - - eventService.updateEvent(expectedEvent); - - List dbEvents = eventService.getAll(); - assertEquals(1, dbEvents.size()); - assertObjectUpdate(expectedEvent, dbEvents.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfNewEventInUpdate() { - Event event = getEvent(); - - eventService.updateEvent(event); - } - - @Test - public void shouldFindBySeverVersion() { - addObjectToRepository(Collections.singletonList(getEvent()), allEvents); - - Event expectedEvent = allEvents.getAll().get(0); - - List actualEvents = allEvents.findByServerVersion(expectedEvent.getServerVersion() - 1); - - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - } - - @Test - public void shouldGeAllEvents() { - Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - Map identifiers = new HashMap<>(identifier); - identifiers.put(IDENTIFIER_TYPE, "invalidValue"); - expectedEvent2.setIdentifiers(identifiers); - List expectedEvents = asList(expectedEvent, expectedEvent2); - - addObjectToRepository(expectedEvents, allEvents); - - List actualEvents = eventService.getAll(); - - assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); - } - - @Test - public void shouldFindByObsFieldCodeKeyAndValue() { - Event expectedEvent = getEvent(); - - addObjectToRepository(Collections.singletonList(expectedEvent), allEvents); - - List actualEvents = eventService.findEventsByConceptAndValue(FIELD_CODE, VALUE); - - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - } - - @Test - public void shouldFindByBaseEntityAndEventType() { - Event expectedEvent = getEvent(); - Event invalidEvent = getEvent(); - invalidEvent.setEventType("diff"); - - addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - List actualEvents = eventService.findByBaseEntityAndType(BASE_ENTITY_ID, EVENT_TYPE); - - assertEquals(1, actualEvents.size()); - assertEquals(expectedEvent, actualEvents.get(0)); - } - - @Test - public void shouldProcessOutOfArea() { - Client client = getClient(); - client.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - addObjectToRepository(Collections.singletonList(client), allClients); - Event existingEvent = getEvent(); - existingEvent.setBaseEntityId(client.getBaseEntityId()); - existingEvent.setEventType("Birth Registration"); - addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - - //For null baseEntityId - Event expectedEvent = getEvent(); - expectedEvent.setBaseEntityId(null); - expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - Event actualEvent = eventService.processOutOfArea(expectedEvent); - - assertNull(actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); - assertEquals(BASE_ENTITY_ID, actualEvent.getBaseEntityId()); - assertEquals(PROVIDER_ID, actualEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals(expectedEvent, actualEvent); - - //For empty baseEntityId - expectedEvent = getEvent(); - expectedEvent.setBaseEntityId(""); - expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - actualEvent = eventService.processOutOfArea(expectedEvent); - - assertNull(actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); - assertEquals(BASE_ENTITY_ID, actualEvent.getBaseEntityId()); - assertEquals(PROVIDER_ID, actualEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldNotProcessOutOfAreaIfEventHasBaseEntityId() { - Client client = getClient(); - client.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - addObjectToRepository(Collections.singletonList(client), allClients); - Event existingEvent = getEvent(); - existingEvent.setBaseEntityId(client.getBaseEntityId()); - existingEvent.setEventType("Birth Registration"); - addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - - Event expectedEvent = getEvent(); - expectedEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - - Event actualEvent = eventService.processOutOfArea(expectedEvent); - - assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); - assertEquals(DIFFERENT_BASE_ENTITY_ID, actualEvent.getBaseEntityId()); - assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldNotProcessOutAreaIfNoClientFound() { - Event existingEvent = getEvent(); - existingEvent.setBaseEntityId(BASE_ENTITY_ID); - existingEvent.setEventType("Birth Registration"); - addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - - Event expectedEvent = getEvent(); - expectedEvent.setBaseEntityId(null); - expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - - Event actualEvent = eventService.processOutOfArea(expectedEvent); - - assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); - assertNull(actualEvent.getBaseEntityId()); - assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldNotProcessOutOfAreaIfNoExistingBirthRegistrationEventFound() { - Client client = getClient(); - client.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - addObjectToRepository(Collections.singletonList(client), allClients); - Event existingEvent = getEvent(); - existingEvent.setBaseEntityId(client.getBaseEntityId()); - addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - - //For null baseEntityId - Event expectedEvent = getEvent(); - expectedEvent.setBaseEntityId(null); - expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - Event actualEvent = eventService.processOutOfArea(expectedEvent); - - assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); - assertNull(actualEvent.getBaseEntityId()); - assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals(expectedEvent, actualEvent); - } - - @Test - public void shouldMergeAndUpdateExistingEvent() { - addObjectToRepository(Collections.singletonList(getEvent()), allEvents); - Event updatedEvent = allEvents.getAll().get(0); - - updatedEvent.addIdentifier("Second_Identifier", DIFFERENT_BASE_ENTITY_ID); - updatedEvent.addObs(getObs().withComments("comments").withFieldCode(DIFFERENT_BASE_ENTITY_ID)); - - Event actualEvent = eventService.mergeEvent(updatedEvent); - List dbEvents = allEvents.getAll(); - - DateTime updatedEventDate = updatedEvent.getEventDate(); - updatedEvent.setEventDate(null); - actualEvent.setEventDate(null); - actualEvent.setDateEdited(null); - assertEquals(1, dbEvents.size()); - assertEquals(updatedEvent, actualEvent); - updatedEvent.setEventDate(updatedEventDate); - assertObjectUpdate(updatedEvent, dbEvents.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfExistingClientNotFound() { - Event updatedEvent = getEvent(); - - eventService.mergeEvent(updatedEvent); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java deleted file mode 100644 index 924d07fe38..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java +++ /dev/null @@ -1,80 +0,0 @@ -package org.opensrp.service.it; - -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.getApiLocation; -import static org.opensrp.util.SampleFullDomainObject.getDomainLocation; -import static org.utils.AssertionUtil.assertTwoDifferentTypeLocationSame; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Location; -import org.opensrp.repository.couch.AllLocations; -import org.opensrp.service.LocationService; -import org.springframework.beans.factory.annotation.Autowired; - -public class LocationServiceTest extends BaseIntegrationTest { - - @Autowired - public AllLocations allLocations; - - @Autowired - public LocationService locationService; - - @Before - public void setUp() { - allLocations.removeAll(); - } - - @After - public void cleanUp() { - allLocations.removeAll(); - } - - @Test - public void shouldGetAllLocation() { - Location location = getDomainLocation(); - Location expectedLocation = getDomainLocation(); - expectedLocation.setParentLocation(location); - List expectedLocations = Collections.singletonList(expectedLocation); - addObjectToRepository(expectedLocations, allLocations); - - List actualLocations = locationService.getAllLocations(); - - assertEquals(1, actualLocations.size()); - assertTwoDifferentTypeLocationSame(expectedLocation, actualLocations.get(0)); - - } - - @Test - public void shouldAddLocation() { - org.opensrp.api.domain.Location expectedLocation = getApiLocation(); - - locationService.addLocation(expectedLocation); - - List actualLocations = allLocations.getAll(); - assertEquals(1, actualLocations.size()); - assertTwoDifferentTypeLocationSame(actualLocations.get(0), expectedLocation); - } - - @Test - @Ignore - public void shouldUpdateLocation() { - allLocations.add(getDomainLocation().withParentLocation(getDomainLocation())); - org.opensrp.api.domain.Location expectedLocation = locationService.getAllLocations().get(0); - expectedLocation.addAttribute("name", "value"); - - locationService.updateLocation(expectedLocation); - - List actualLocations = allLocations.getAll(); - assertEquals(1, actualLocations.size()); - assertTwoDifferentTypeLocationSame(actualLocations.get(0), expectedLocation); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java deleted file mode 100644 index e747d70ed0..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java +++ /dev/null @@ -1,201 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.times; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.opensrp.util.SampleFullDomainObject.CASE_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; -import static org.opensrp.util.SampleFullDomainObject.getMultimedia; -import static org.opensrp.util.SampleFullDomainObject.getMultimediaDTO; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.io.File; -import java.io.IOException; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Multimedia; -import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.couch.MultimediaRepositoryImpl; -import org.opensrp.service.MultimediaService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.web.multipart.MultipartFile; - -/** - * If tests fail check property `'multimedia.directory.name` in `opensrp.properties`. - */ -public class MultimediaServiceTest extends BaseIntegrationTest { - - @Autowired - private MultimediaRepositoryImpl multimediaRepository; - - @Autowired - private MultimediaService multimediaService; - - @Value("#{opensrp['multimedia.directory.name']}") - String baseMultimediaDirPath; - - @Before - public void setUp() { - multimediaRepository.removeAll(); - deleteFolders("../multimedia"); - } - - @After - public void cleanUp() { - multimediaRepository.removeAll(); - deleteFolders("../multimedia"); - } - - public void deleteFolders(String path) { - File multimediaFile = new File(path); - if (multimediaFile.exists()) { - String[] entries = multimediaFile.list(); - for (String s : entries) { - File currentFile = new File(multimediaFile.getPath(), s); - if (currentFile.isDirectory()) { - deleteFolders(currentFile.getPath()); - } - } - multimediaFile.delete(); - } - } - - @Test - public void shouldFindByCaseId() { - Multimedia expectedMultimedia = getMultimedia(); - Multimedia invalidMultimedia = getMultimedia(); - invalidMultimedia.setCaseId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedMultimedia, invalidMultimedia), multimediaRepository); - - Multimedia actualMultimedia = multimediaService.findByCaseId(CASE_ID); - - assertEquals(expectedMultimedia, actualMultimedia); - } - - @Test - public void shouldFindAllByProviderId() { - Multimedia expectedMultimedia = getMultimedia(); - Multimedia expectedMultimedia1 = getMultimedia(); - List expectedMultimedias = asList(expectedMultimedia, expectedMultimedia1); - Multimedia invalidMultimedia = getMultimedia(); - invalidMultimedia.setProviderId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedMultimedia, expectedMultimedia1, invalidMultimedia), multimediaRepository); - - List actualMultimedias = multimediaService.getMultimediaFiles(PROVIDER_ID); - - assertTwoListAreSameIgnoringOrder(expectedMultimedias, actualMultimedias); - } - - @Test - public void shouldUploadJpegFile() throws IOException { - String baseImagePath = baseMultimediaDirPath + "/" + "images/"; - String pathname = baseImagePath + CASE_ID + ".jpg"; - MultimediaDTO multimediaDTO = getMultimediaDTO("image/jpeg"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - Boolean result = multimediaService.uploadFile(multimediaDTO, mockMultipartFile); - - assertTrue(result); - assertTrue(new File(baseImagePath).exists()); - verify(mockMultipartFile, times(1)).transferTo(new File(pathname)); - } - - @Test - public void shouldUploadGifFile() throws IOException { - String baseImagePath = baseMultimediaDirPath + "/" + "images/"; - String pathname = baseImagePath + CASE_ID + ".gif"; - MultimediaDTO multimediaDTO = getMultimediaDTO("image/gif"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - Boolean result = multimediaService.uploadFile(multimediaDTO, mockMultipartFile); - - assertTrue(result); - assertTrue(new File(baseImagePath).exists()); - verify(mockMultipartFile, times(1)).transferTo(new File(pathname)); - } - - @Test - public void shouldUploadPngFile() throws IOException { - String baseImagePath = baseMultimediaDirPath + "/" + "images/"; - String pathname = baseImagePath + CASE_ID + ".png"; - MultimediaDTO multimediaDTO = getMultimediaDTO("image/png"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - Boolean result = multimediaService.uploadFile(multimediaDTO, mockMultipartFile); - - assertTrue(result); - assertTrue(new File(baseImagePath).exists()); - verify(mockMultipartFile, times(1)).transferTo(new File(pathname)); - } - - @Test - public void shouldUploadVideoOctetStreamFile() throws IOException { - String baseImagePath = baseMultimediaDirPath + "/" + "videos/"; - String pathname = baseImagePath + CASE_ID + ".mp4"; - MultimediaDTO multimediaDTO = getMultimediaDTO("application/octet-stream"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - Boolean result = multimediaService.uploadFile(multimediaDTO, mockMultipartFile); - - assertTrue(result); - assertTrue(new File(baseImagePath).exists()); - verify(mockMultipartFile, times(1)).transferTo(new File(pathname)); - } - - @Test - public void shouldReturnFalseUnknownContentType() throws IOException { - MultimediaDTO multimediaDTO = getMultimediaDTO("unknown"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - assertFalse(multimediaService.uploadFile(multimediaDTO, mockMultipartFile)); - } - - @Test - public void shouldReturnFalseFormEmptyMultiPartFile() { - MultimediaDTO multimediaDTO = getMultimediaDTO("image/jpeg"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - when(mockMultipartFile.isEmpty()).thenReturn(true); - assertFalse(multimediaService.uploadFile(multimediaDTO, mockMultipartFile)); - } - - @Test - public void shouldSaveMultimediaForSuccessfulUpdate() { - MultimediaDTO multimediaDTO = getMultimediaDTO("image/png"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - Multimedia expectedMultimedia = getMultimedia(); - expectedMultimedia.setContentType("image/png"); - expectedMultimedia.setFilePath("../multimedia/opensrp/images/caseId.png"); - - String result = multimediaService.saveMultimediaFile(multimediaDTO, mockMultipartFile); - - assertEquals("success", result); - List dbFiles = multimediaRepository.getAll(); - assertEquals(1, dbFiles.size()); - assertEquals(expectedMultimedia, dbFiles.get(0)); - } - - @Test - public void shouldReturnFailForUnsuccessfulUpdate() { - MultimediaDTO multimediaDTO = getMultimediaDTO("unknown"); - MultipartFile mockMultipartFile = mock(MultipartFile.class); - - String result = multimediaService.saveMultimediaFile(multimediaDTO, mockMultipartFile); - - assertEquals("fail", result); - List dbFiles = multimediaRepository.getAll(); - assertEquals(0, dbFiles.size()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java deleted file mode 100644 index 0402769b9b..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java +++ /dev/null @@ -1,90 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.getProvider; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Provider; -import org.opensrp.repository.couch.AllProviders; -import org.opensrp.service.ProviderService; -import org.springframework.beans.factory.annotation.Autowired; - -public class ProviderServiceTest extends BaseIntegrationTest { - - @Autowired - public AllProviders allProviders; - - @Autowired - public ProviderService providerService; - - @Before - public void setUp() { - allProviders.removeAll(); - } - - @After - public void cleanUp() { - allProviders.removeAll(); - } - - @Test - public void shouldGetProviderByBaseEntityId() { - Provider expectedProvider = getProvider(); - addObjectToRepository(Collections.singletonList(expectedProvider), allProviders); - - Provider actualProvider = providerService.getProviderByBaseEntityId(BASE_ENTITY_ID); - - assertEquals(expectedProvider, actualProvider); - } - - @Test - public void shouldGetAllTheProvider() { - Provider provider = getProvider(); - Provider provider1 = getProvider(); - provider1.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - List expectedProviders = asList(provider, provider1); - - addObjectToRepository(expectedProviders, allProviders); - - List actualProviders = providerService.getAllProviders(); - - assertTwoListAreSameIgnoringOrder(expectedProviders, actualProviders); - } - - @Test - public void shouldAddProvider() { - Provider expectedProvider = getProvider(); - - providerService.addProvider(expectedProvider); - - List actualProviders = allProviders.getAll(); - assertEquals(1, actualProviders.size()); - assertEquals(expectedProvider, actualProviders.get(0)); - } - - @Test - public void shouldUpdateProvider() { - addObjectToRepository(Collections.singletonList(getProvider()), allProviders); - - Provider updatedProvider = allProviders.getAll().get(0); - updatedProvider.setFullName(DIFFERENT_BASE_ENTITY_ID); - - providerService.updateProvider(updatedProvider); - - List actualProviders = allProviders.getAll(); - assertEquals(1, actualProviders.size()); - assertEquals(updatedProvider, actualProviders.get(0)); - - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java deleted file mode 100644 index 6896a1cc77..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java +++ /dev/null @@ -1,307 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.FORM_SUBMISSION_ID; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; -import static org.opensrp.util.SampleFullDomainObject.getReport; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertNewObjectCreation; -import static org.utils.AssertionUtil.assertObjectUpdate; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Report; -import org.opensrp.repository.couch.AllReports; -import org.opensrp.service.ReportService; -import org.springframework.beans.factory.annotation.Autowired; - -public class ReportServiceTest extends BaseIntegrationTest { - - @Autowired - private AllReports allReports; - - @Autowired - private ReportService reportService; - - @Before - public void setUp() { - allReports.removeAll(); - } - - @After - public void cleanUp() { - allReports.removeAll(); - } - - @Test - public void shouldFindById() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - Report expectedReport = allReports.getAll().get(0); - - Report actualReport = reportService.getById(expectedReport.getId()); - - assertEquals(expectedReport, actualReport); - } - - @Test - public void shouldFindByBaseEntityIdAndFormSubmissionId() { - Report expectedReport = getReport(); - Report invalidReport = getReport(); - invalidReport.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(expectedReport, invalidReport), allReports); - - Report actualReport = reportService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - - assertEquals(expectedReport, actualReport); - } - - @Test - public void shouldFindByBaseEntityId() { - Report report = getReport(); - Report report1 = getReport(); - List expectedReports = asList(report, report1); - Report invalidReport = getReport(); - invalidReport.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - addObjectToRepository(asList(report, report1, invalidReport), allReports); - - List actualReports = reportService.findByBaseEntityId(BASE_ENTITY_ID); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test(expected = IllegalStateException.class) - public void shouldThrowExceptionIfMultipleFound() { - Report report = getReport(); - Report report1 = getReport(); - addObjectToRepository(asList(report, report1), allReports); - - reportService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - } - - @Test - public void shouldReturnNullIfNoneFound() { - assertNull(reportService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID)); - } - - @Test - public void shouldFindByUniqueIdentifier() { - Report expectedReport = getReport(); - Report invalidReport = getReport(); - Map differentIdentifiers = new HashMap<>(identifier); - differentIdentifiers.put(IDENTIFIER_TYPE, DIFFERENT_BASE_ENTITY_ID); - invalidReport.setIdentifiers(differentIdentifiers); - addObjectToRepository(asList(expectedReport, invalidReport), allReports); - - Report actualReport = reportService.find(IDENTIFIER_VALUE); - - assertEquals(expectedReport, actualReport); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleFoundWhileFindByUniqueId() { - Report report = getReport(); - Report report1 = getReport(); - addObjectToRepository(asList(report, report1), allReports); - - reportService.find(IDENTIFIER_VALUE); - } - - @Test - public void shouldReturnNullIfNoneFoundWhileFindByIdentifier() { - assertNull(reportService.find(IDENTIFIER_VALUE)); - } - - @Test - public void shouldFindByReportObject() { - Report expectedReport = getReport(); - Report invalidReport = getReport(); - Map differentIdentifiers = new HashMap<>(identifier); - differentIdentifiers.put(IDENTIFIER_TYPE, DIFFERENT_BASE_ENTITY_ID); - invalidReport.setIdentifiers(differentIdentifiers); - addObjectToRepository(asList(expectedReport, invalidReport), allReports); - - Report actualReport = reportService.find(expectedReport); - - assertEquals(expectedReport, actualReport); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfMultipleFoundWhileFindByReportObject() { - Report report = getReport(); - Report report1 = getReport(); - addObjectToRepository(asList(report, report1), allReports); - - reportService.find(report); - } - - @Test - public void shouldReturnNullIfNoneFoundWhileFindByReportObject() { - assertNull(reportService.find(getReport())); - } - - @Test - public void shouldFindByReportId() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - Report expectedReport = allReports.getAll().get(0); - - Report actualReport = reportService.findById(expectedReport.getId()); - - assertEquals(expectedReport, actualReport); - } - - @Test(expected = Exception.class) - public void shouldThrowErrorIfMultipleRecordFoundWhileFindById() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - Report expectedReport = allReports.getAll().get(0); - addObjectToRepository(Collections.singletonList(expectedReport), allReports); - - reportService.findById(expectedReport.getId()); - - } - - @Test - public void shouldReturnNullIfNoneFoundUsingDocumentId() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - assertNull(reportService.findById(DIFFERENT_BASE_ENTITY_ID)); - } - - @Test - public void shouldReturnNullForNullOrEmptyId() { - assertNull(reportService.findById(null)); - assertNull(reportService.findById("")); - } - - @Test - public void shouldGetAllReport() { - Report report = getReport(); - Report report1 = getReport(); - List expectedReports = asList(report, report1); - addObjectToRepository(expectedReports, allReports); - - List actualReports = reportService.getAll(); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test - public void shouldFindByServerVersion() { - Report report = getReport(); - Report report1 = getReport(); - List expectedReports = asList(report, report1); - addObjectToRepository(expectedReports, allReports); - - List actualReports = reportService.findByServerVersion(0); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test - public void shouldFindByIdentifier() { - Report report1 = getReport(); - Report report = getReport(); - Report invalidReport = getReport(); - Map differentIdentifiers = new HashMap<>(identifier); - differentIdentifiers.put(IDENTIFIER_TYPE, DIFFERENT_BASE_ENTITY_ID); - invalidReport.setIdentifiers(differentIdentifiers); - List expectedReports = asList(report1, report); - addObjectToRepository(asList(report1, report, invalidReport), allReports); - - List actualReports = reportService.findAllByIdentifier(IDENTIFIER_VALUE); - - assertTwoListAreSameIgnoringOrder(expectedReports, actualReports); - } - - @Test - public void shouldAddReport() { - Report expectedReport = getReport(); - - Report actualReport = reportService.addReport(expectedReport); - List dbReports = allReports.getAll(); - - assertEquals(1, dbReports.size()); - assertEquals(expectedReport, actualReport); - assertNewObjectCreation(expectedReport, dbReports.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionWhileAddingExistingReport() { - Report report = getReport(); - - addObjectToRepository(Collections.singletonList(report), allReports); - - reportService.addReport(report); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfExistingReportFoundByBaseEntityIdAndFormSubmissionId() { - Report report = getReport(); - addObjectToRepository(Collections.singletonList(report), allReports); - report.setIdentifiers(null); - reportService.addReport(report); - } - - @Test - public void shouldUpdateExistingReport() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - Report updatedReport = allReports.getAll().get(0); - updatedReport.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - - reportService.updateReport(updatedReport); - - List actualReports = allReports.getAll(); - - assertEquals(1, actualReports.size()); - assertObjectUpdate(updatedReport, actualReports.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfNewObjectWhileUpdate() { - reportService.updateReport(getReport()); - } - - @Test - public void shouldAddIfNewInAddOrUpdate() { - Report expectedReport = getReport(); - - Report actualReport = reportService.addorUpdateReport(expectedReport); - List dbReports = allReports.getAll(); - - assertEquals(1, dbReports.size()); - assertEquals(expectedReport, actualReport); - assertNewObjectCreation(expectedReport, dbReports.get(0)); - } - - @Test - public void shouldUpdateReportIfExistInAddOrUpdate() { - addObjectToRepository(Collections.singletonList(getReport()), allReports); - Report updatedReport = allReports.getAll().get(0); - updatedReport.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - - Report actualReport = reportService.addorUpdateReport(updatedReport); - List dbReports = allReports.getAll(); - - assertEquals(1, dbReports.size()); - assertEquals(updatedReport, actualReport); - - assertNotNull(dbReports.get(0).getServerVersion()); - updatedReport.setServerVersion(null); - dbReports.get(0).setServerVersion(null); - - assertObjectUpdate(updatedReport, dbReports.get(0)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java deleted file mode 100644 index d4530fc836..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java +++ /dev/null @@ -1,97 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.opensrp.util.SampleFullDomainObject.FEMALE; -import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; -import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; -import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; -import static org.opensrp.util.SampleFullDomainObject.attributes; -import static org.opensrp.util.SampleFullDomainObject.getAddress; -import static org.opensrp.util.SampleFullDomainObject.identifier; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Client; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.search.ClientSearchBean; -import org.opensrp.service.SearchService; -import org.springframework.beans.factory.annotation.Autowired; - -public class SearchServiceTest extends BaseIntegrationTest { - - @Autowired - public AllClients allClients; - - @Autowired - public SearchService searchService; - - @Before - public void setUp() { - allClients.removeAll(); - } - - @After - public void cleanUp() { - allClients.removeAll(); - } - - @Test - public void shouldSearchClient() { - Client expectedClient = createExpectedClient(); - expectedClient.setAttributes(attributes); - Client expectedClient2 = createExpectedClient(); - expectedClient2.addAttribute("inactive", true); - Client expectedClient3 = createExpectedClient(); - expectedClient3.addAttribute("lost_to_follow_up", true); - Client expectedClient4 = createExpectedClient(); - expectedClient4.addAttribute("inactive", false); - List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); - addObjectToRepository(expectedClients, allClients); - - Map queryAttributes = new HashMap<>(); - queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); - queryAttributes.put("inactive", "true"); - queryAttributes.put("inactive", "false"); - queryAttributes.put("lost_to_follow_up", "true"); - - - ClientSearchBean clientSearchBean=new ClientSearchBean(); - clientSearchBean.setNameLike("first"); - clientSearchBean.setGender(expectedClient.getGender()); - clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); - clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); - clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); - clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); - List actualClients=searchService.searchClient(clientSearchBean, "first", "middle", "last",10); - assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); - } - - private Client createExpectedClient() { - Client expectedClient = new Client(BASE_ENTITY_ID); - expectedClient.setFirstName(FIRST_NAME); - expectedClient.setMiddleName(MIDDLE_NAME); - expectedClient.setLastName(LAST_NAME); - expectedClient.setBirthdate(EPOCH_DATE_TIME); - expectedClient.setAddresses(asList(getAddress())); - expectedClient.setDateCreated(EPOCH_DATE_TIME); - expectedClient.setGender(FEMALE); - expectedClient.setDateEdited(EPOCH_DATE_TIME); - expectedClient.setIdentifiers(identifier); - return expectedClient; - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java deleted file mode 100644 index e5562971c5..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java +++ /dev/null @@ -1,99 +0,0 @@ -package org.opensrp.service.it; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.getUser; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - -import java.util.Collections; -import java.util.List; - -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.User; -import org.opensrp.repository.couch.AllUsers; -import org.opensrp.service.UserService; -import org.springframework.beans.factory.annotation.Autowired; - -public class UserServiceTest extends BaseIntegrationTest { - - @Autowired - public AllUsers allUsers; - - @Autowired - public UserService userService; - - @Before - public void setUp() { - allUsers.removeAll(); - } - - @After - public void cleanUp() { - allUsers.removeAll(); - } - - @Test - public void shouldFindByBaseEntityId() { - User expectedUser = getUser(); - addObjectToRepository(Collections.singletonList(expectedUser), allUsers); - - User actualUser = userService.getUserByEntityId(BASE_ENTITY_ID); - - assertEquals(expectedUser, actualUser); - } - - @Test - public void shouldReturnAllUser() { - User user = getUser(); - User user1 = getUser(); - user1.setUsername(DIFFERENT_BASE_ENTITY_ID); - List expectedUsers = asList(user, user1); - addObjectToRepository(expectedUsers, allUsers); - - List actualUsers = userService.getAllUsers(); - - assertTwoListAreSameIgnoringOrder(expectedUsers, actualUsers); - - } - - @Test - public void shouldAddNewUser() { - User expectedUser = getUser(); - - userService.addUser(expectedUser); - - List actualUsers = allUsers.getAll(); - assertEquals(1, actualUsers.size()); - assertEquals(expectedUser, actualUsers.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfExistingUser() { - addObjectToRepository(Collections.singletonList(getUser()), allUsers); - userService.addUser(allUsers.getAll().get(0)); - } - - @Test - public void shouldUpdateExistingUser() { - addObjectToRepository(Collections.singletonList(getUser()), allUsers); - User updatedUser = allUsers.getAll().get(0); - updatedUser.setUsername(DIFFERENT_BASE_ENTITY_ID); - - userService.updateUser(updatedUser); - - List actualUsers = allUsers.getAll(); - assertEquals(1, actualUsers.size()); - assertEquals(updatedUser, actualUsers.get(0)); - } - - @Test(expected = IllegalArgumentException.class) - public void shouldThrowExceptionIfNewWhileUpdate() { - userService.updateUser(getUser()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/services/RapidProServiceTest.java b/opensrp-core/src/test/java/org/opensrp/services/RapidProServiceTest.java deleted file mode 100644 index 5b2911fb03..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/services/RapidProServiceTest.java +++ /dev/null @@ -1,163 +0,0 @@ -package org.opensrp.services; - -import static org.mockito.Matchers.anyMap; -import static org.mockito.Matchers.anyString; -import static org.mockito.Mockito.when; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.junit.After; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.mockito.Matchers; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.opensrp.SpringApplicationContextProvider; -import org.opensrp.service.RapidProService; -import org.springframework.beans.factory.annotation.Autowired; - -public class RapidProServiceTest extends SpringApplicationContextProvider{ - @Autowired - RapidProService rapidproService; - List urns; - List contacts; - List groups; - Map contact; - @Mock - RapidProService mockRapidProService; - String addFieldResponse; - String sendMessageResponse; - String createContactResponse; - - @SuppressWarnings("unchecked") - @Before - public void setup() { - urns = new ArrayList(); - urns.add("tel:+250788123123"); - groups = new ArrayList(); - contacts = new ArrayList(); - contacts.add("09d23a05-47fe-11e4-bfe9-b8f6b119e9ab"); - contact = new HashMap(); - Map fields = new HashMap(); - fields.put("lmp", "2016-09-30"); - fields.put("anc1", "2016-10-10"); - fields.put("anc2", "2016-10-20"); - fields.put("anc3", "2016-10-30"); - fields.put("anc4", "2016-11-10"); - contact.put("name", "Woman Three"); - List urns = new ArrayList(); - List groups = new ArrayList(); - groups.add("Pregnant Women"); - urns.add("telegram:207355745"); - contact.put("urns", urns); - contact.put("groups", groups); - contact.put("fields", fields); - MockitoAnnotations.initMocks(this); - addFieldResponse = "{\"key\": \"anc3\",\"label\": \"anc3\",\"value_type\": \"T\"}"; - sendMessageResponse = "{\"id\": 21170,\"urns\": [\"telegram:207355745\"],\"contacts\": [],\"groups\": [],\"text\": \"rapidpro test text2\",\"created_on\": \"2016-11-01T12:46:28.107Z\",\"status\": \"I\"}"; - createContactResponse = "{\"uuid\": \"4686bf60-a241-4b42-8102-27d9221aad5b\",\"name\": \"Xcv\",\"language\": null,\"group_uuids\": [\"bc5ef0d0-ce9d-4b52-adee-649a99927c8b\"]\"urns\": [\"tel:+254727812024\"]," - + "\"fields\": {\"anc1\": \"2016-10-27\",\"anc2\": \"2017-02-16\",\"anc3\": \"2017-04-13\",\"anc4\": \"2017-05-11\",},\"blocked\": false,\"failed\": false,\"modified_on\": \"2016-11-03T07:36:41.494Z\"," - + "\"phone\": \"+254727812024\",\"groups\": [\"Pregnant Women\"]}"; - - when(mockRapidProService.addField("anc3", "T")).thenReturn(addFieldResponse); - when(mockRapidProService.sendMessage(Matchers.anyListOf(String.class), Matchers.anyListOf(String.class), Matchers.anyListOf(String.class), anyString(), - anyString())).thenReturn(sendMessageResponse); - when(mockRapidProService.createContact(anyMap())).thenReturn(createContactResponse); - - } - - @After - public void tearDown() { - urns.clear(); - groups.clear(); - contacts.clear(); - contact.clear(); - } - - @Test - public void sendMessageShouldFailIfTextisNull() throws Exception { - String response = rapidproService.sendMessage(urns, contacts, groups, null, ""); - Assert.assertEquals("Empty text or text longer than 480 characters not allowed", response); - } - - @Test - public void sendMessageShouldFailIfTextisEmpty() throws Exception { - String response = rapidproService.sendMessage(urns, contacts, groups, "", ""); - Assert.assertEquals("Empty text or text longer than 480 characters not allowed", response); - } - - @Test - public void sendMessageShouldFailIfTextisTooLong() throws Exception { - String text = "When Aklima Begum was initially registered in OpenSRP during a census / enumeration round, her mobile phone (or family member’s phone) number was collected as part of her personal profile. Aklima Begum is found to be pregnant in week 20 of her pregnancy. As her pregnancy is recorded in OpenSRP, her health worker, Rokeya, receives a prompt asking whether Aklima would like to receive motivational messages and/or reminders. Aklima agrees, and this is recorded in the OpenSRP system. The server sends her a ‘test’ message to welcome her to the system and ensure the phone number is correct. Every week,"; - String response = rapidproService.sendMessage(urns, contacts, groups, text, ""); - Assert.assertEquals("Empty text or text longer than 480 characters not allowed", response); - } - - @Test - public void sendMessageShouldReturnJsonStringOnSuccess() throws Exception { - String response = mockRapidProService.sendMessage(urns, contacts, groups, "Test rapidpro text", ""); - Assert.assertEquals(sendMessageResponse, response); - - } - - @Test - public void sendMessageShouldFailIfEmptyUrnsAndContactsAndGroups() throws Exception { - tearDown(); - String response = rapidproService.sendMessage(urns, contacts, groups, "Test rapidpro text", ""); - Assert.assertEquals("No recipients specified", response); - } - - @Test - public void sendMessageShouldFailIfNullUrnsAndContactsAndGroups() throws Exception { - String response = rapidproService.sendMessage(null, null, null, "Test rapidpro text", ""); - Assert.assertEquals("No recipients specified", response); - } - - @Test - public void createContactShouldFailIfEmptyFieldValues() throws Exception { - tearDown(); - String response = rapidproService.createContact(contact); - Assert.assertEquals("Field values cannot be empty and must have urns", response); - } - - @Test - public void createContactShouldFailIfNullFieldValues() throws Exception { - String response = rapidproService.createContact(null); - Assert.assertEquals("Field values cannot be empty and must have urns", response); - } - - @Test - public void createContactShouldFailIfNullUrns() throws Exception { - contact.remove("urns"); - String response = rapidproService.createContact(contact); - Assert.assertEquals("Field values cannot be empty and must have urns", response); - } - - @Test - public void createContactShouldReturnJsonStringOnSuccess() throws Exception { - String response = mockRapidProService.createContact(contact); - Assert.assertEquals(createContactResponse, response); - } - - @Test - public void addFieldShouldFailIfNullLabel() throws Exception { - String response = rapidproService.addField(null, "T"); - Assert.assertEquals("Field label is required", response); - } - - @Test - public void addFieldShouldFailIfEmptyLabel() throws Exception { - String response = rapidproService.addField("", "T"); - Assert.assertEquals("Field label is required", response); - } - - @Test - public void addFieldShouldReturnJsonStringOnSuccess() throws Exception { - String response = mockRapidProService.addField("anc3", "T"); - Assert.assertEquals(addFieldResponse, response); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/services/it/RapidProServiceIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/services/it/RapidProServiceIntegrationTest.java deleted file mode 100644 index a84371b7c4..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/services/it/RapidProServiceIntegrationTest.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.opensrp.services.it; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.json.JSONException; -import org.json.JSONObject; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.opensrp.SpringApplicationContextProvider; -import org.opensrp.service.RapidProService; -import org.springframework.beans.factory.annotation.Autowired; - -@Ignore -public class RapidProServiceIntegrationTest extends SpringApplicationContextProvider{ - - @Autowired - RapidProService rapidproService; - Map contact = new HashMap(); - List urns = new ArrayList(); - List groups = new ArrayList(); - - @Before - public void setup() { - Map fields = new HashMap(); - fields.put("lmp", "2016-09-30"); - fields.put("anc1", "2016-10-10"); - fields.put("anc2", "2016-10-20"); - fields.put("anc3", "2016-10-30"); - fields.put("anc4", "2016-11-10"); - // set contact name - contact.put("name", "Test Woman"); - groups.add("Pregnant Women"); - urns.add("telegram:207355745"); - contact.put("urns", urns); - contact.put("groups", groups); - contact.put("fields", fields); - } - - @Test - public void shouldCreateContactAndReceiveContactObjectResponse() throws Exception { - String response = rapidproService.createContact(contact); - JSONObject jsonResponse = new JSONObject(response); - verify(jsonResponse); - Assert.assertEquals(204, rapidproService.deleteContact(jsonResponse.getString("uuid"))); - - } - - @Test - public void shouldUpdateContactAndReceiveContactObjectResponse() throws Exception { - String response = rapidproService.createContact(contact); - JSONObject jsonResponse = new JSONObject(response); - contact.put("uuid", jsonResponse.getString("uuid")); - contact.put("name", "Test Woman Updated"); - response = rapidproService.createContact(contact); - jsonResponse = new JSONObject(response); - Assert.assertEquals("Test Woman Updated", jsonResponse.getString("name")); - Assert.assertEquals(204, rapidproService.deleteContact(jsonResponse.getString("uuid"))); - - } - - @Test - public void shouldDeleteContactAndReceiveStatusResponse() throws Exception { - String response = rapidproService.createContact(contact); - JSONObject jsonResponse = new JSONObject(response); - Assert.assertEquals(204, rapidproService.deleteContact(jsonResponse.getString("uuid"))); - - } - - @Test - @Ignore // FIXME We might need a generic mobile no to test this one out - public void shouldSendMessageAndReceiveMessageBroadcastResponse() throws Exception { - // rapidproService.sendMessage(urns, contacts, groups, text, channel); - } - - @Test - public void shouldCreateFieldAndReceiveFieldKeyResponse() throws Exception { - String response = rapidproService.addField("Test Field", "T"); - JSONObject jsonResponse = new JSONObject(response); - Assert.assertEquals("test_field", jsonResponse.getString("key")); - Assert.assertEquals("Test Field", jsonResponse.getString("label")); - Assert.assertEquals("T", jsonResponse.getString("value_type")); - - } - - private void verify(JSONObject jsonResponse) throws JSONException { - Assert.assertTrue(jsonResponse.has("uuid")); - Assert.assertTrue(jsonResponse.has("name")); - Assert.assertTrue(jsonResponse.has("group_uuids")); - Assert.assertTrue(jsonResponse.has("urns")); - Assert.assertTrue(jsonResponse.has("fields")); - Assert.assertTrue(jsonResponse.has("groups")); - Assert.assertEquals("Test Woman", jsonResponse.getString("name")); - Assert.assertEquals("2016-10-10", jsonResponse.getJSONObject("fields").getString("anc1")); - Assert.assertEquals("2016-10-20", jsonResponse.getJSONObject("fields").getString("anc2")); - Assert.assertEquals("2016-10-30", jsonResponse.getJSONObject("fields").getString("anc3")); - Assert.assertEquals("2016-11-10", jsonResponse.getJSONObject("fields").getString("anc4")); - Assert.assertEquals("Pregnant Women", jsonResponse.getJSONArray("groups").getString(0)); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/Event.java b/opensrp-core/src/test/java/org/opensrp/util/Event.java deleted file mode 100644 index ce2583a32b..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/Event.java +++ /dev/null @@ -1,7 +0,0 @@ -package org.opensrp.util; - -public class Event{ - public static EventBuilder create() { - return new EventBuilder(); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/EventBuilder.java b/opensrp-core/src/test/java/org/opensrp/util/EventBuilder.java deleted file mode 100644 index 59d058407c..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/EventBuilder.java +++ /dev/null @@ -1,78 +0,0 @@ -package org.opensrp.util; - -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.EXTERNAL_ID; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.MILESTONE_NAME; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.SCHEDULE_NAME; -import static org.motechproject.scheduletracking.api.events.constants.EventDataKeys.WINDOW_NAME; - -import java.util.HashMap; -import java.util.Map; - -import org.joda.time.DateTime; -import org.motechproject.scheduler.domain.MotechEvent; -import org.motechproject.scheduletracking.api.domain.MilestoneAlert; -import org.motechproject.scheduletracking.api.domain.WindowName; - -public class EventBuilder { - private String scheduleName; - private String milestone; - private WindowName window; - private String externalID; - private DateTime maxWindowStartDate; - private DateTime lateWindowStartDate; - private DateTime dueWindowStartDate; - - public EventBuilder withSchedule(String scheduleName) { - this.scheduleName = scheduleName; - return this; - } - - public EventBuilder withMilestone(String milestone) { - this.milestone = milestone; - return this; - } - - public EventBuilder withWindow(WindowName window) { - this.window = window; - return this; - } - - public EventBuilder withExternalId(String externalID) { - this.externalID = externalID; - return this; - } - - public EventBuilder withDueWindowStartDate(DateTime dueWindowStartDate) { - this.dueWindowStartDate = dueWindowStartDate; - return this; - } - - public EventBuilder withLateWindowStartDate(DateTime lateWindowStartDate) { - this.lateWindowStartDate = lateWindowStartDate; - return this; - } - - public EventBuilder withMaxWindowStartDate(DateTime maxWindowStartDate) { - this.maxWindowStartDate = maxWindowStartDate; - return this; - } - - public MotechEvent build() { - MilestoneAlert alert = mock(MilestoneAlert.class); - when(alert.getMilestoneName()).thenReturn(milestone); - when(alert.getDueDateTime()).thenReturn(dueWindowStartDate); - when(alert.getLateDateTime()).thenReturn(lateWindowStartDate); - when(alert.getDefaultmentDateTime()).thenReturn(maxWindowStartDate); - - Map parameters = new HashMap<>(); - - parameters.put(SCHEDULE_NAME, scheduleName); - parameters.put(MILESTONE_NAME, alert); - parameters.put(WINDOW_NAME, window.toString()); - parameters.put(EXTERNAL_ID, externalID); - - return new MotechEvent("Subject", parameters); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/Matcher.java b/opensrp-core/src/test/java/org/opensrp/util/Matcher.java deleted file mode 100644 index a479877355..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/Matcher.java +++ /dev/null @@ -1,27 +0,0 @@ -package org.opensrp.util; - -import static org.mockito.Matchers.argThat; - -import org.apache.commons.lang.builder.EqualsBuilder; -import org.hamcrest.Description; -import org.mockito.ArgumentMatcher; - -public class Matcher { - public static T objectWithSameFieldsAs(final T other) { - return argThat(hasSameFieldsAs(other)); - } - - public static ArgumentMatcher hasSameFieldsAs(final T other) { - return new ArgumentMatcher() { - @Override - public boolean matches(Object o) { - return EqualsBuilder.reflectionEquals(other, o); - } - - @Override - public void describeTo(Description description) { - description.appendValue(other); - } - }; - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java b/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java deleted file mode 100644 index 08be0e9de3..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java +++ /dev/null @@ -1,305 +0,0 @@ -package org.opensrp.util; - -import static java.util.Arrays.asList; - -import java.util.Collections; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; - -import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; -import org.opensrp.domain.Address; -import org.opensrp.domain.AppStateToken; -import org.opensrp.domain.BaseEntity; -import org.opensrp.domain.Client; -import org.opensrp.domain.ErrorTrace; -import org.opensrp.domain.Event; -import org.opensrp.domain.Hia2Indicator; -import org.opensrp.domain.Location; -import org.opensrp.domain.Multimedia; -import org.opensrp.domain.Obs; -import org.opensrp.domain.Provider; -import org.opensrp.domain.Report; -import org.opensrp.domain.User; -import org.opensrp.dto.form.MultimediaDTO; - -public class SampleFullDomainObject { - - //*** ADDRESS RELATED - public static final String addressType = "addressType"; - - public static final String country = "country"; - - public static final String stateProvince = "stateProvince"; - - public static final String cityVillage = "cityVillage"; - - public static final String countryDistrict = "countryDistrict"; - - public static final String subDistrict = "subDistrict"; - - public static final String town = "town"; - //** - - public static final String name = "name"; - - public static final String male = "male"; - - public static final DateTime birthDate = new DateTime(0l, DateTimeZone.UTC); - - public static final DateTime deathDate = new DateTime(1l, DateTimeZone.UTC); - - public static final String FULL_NAME = "full name"; - - public static final String LOCATION_NAME = "locationName"; - - public static Map identifier = new HashMap<>(); - - public static final Map attributes = new HashMap<>(); - - public static final String IDENTIFIER_TYPE = "identifierType"; - - public static final String IDENTIFIER_VALUE = "identifierValue"; - - public static final String ATTRIBUTES_VALUE = "attributesValue"; - - public static final String ATTRIBUTES_TYPE = "attributesType"; - - static { - identifier.put(IDENTIFIER_TYPE, IDENTIFIER_VALUE); - attributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); - } - - public static final String BASE_ENTITY_ID = "baseEntityId"; - - public static final String DIFFERENT_BASE_ENTITY_ID = "differentBaseEntityId"; - - public static final String FIRST_NAME = "firstName"; - - public static final String MIDDLE_NAME = "middleName"; - - public static final String LAST_NAME = "lastName"; - - public static final boolean BIRTH_DATE_APPROX = true; - - public static final boolean DEATH_DATE_APPROX = false; - - public static final String FEMALE = "female"; - - //** EVENT RELATED - public static final String EVENT_TYPE = "eventType"; - - public static final DateTime EVENT_DATE = new DateTime(0l, DateTimeZone.UTC); - - public static final String ENTITY_TYPE = "entityType"; - - public static final String PROVIDER_ID = "providerId"; - - public static final String LOCATION_ID = "locationId"; - - public static final String FORM_SUBMISSION_ID = "formSubmissionId"; - - public static final Map DETAILS = new HashMap<>(); - - public static final String DETAIL_KEY = "detailKey"; - - public static final String DETAIL_VALUE = "detailValue"; - - static { - DETAILS.put(DETAIL_KEY, DETAIL_VALUE); - } - //** - - //** OBS RELATED - public static final String CONCEPT = "concept"; - - public static final String FIELD_DATA_TYPE = "fieldDataTyp"; - - public static final String FIELD_CODE = "fieldCode"; - - public static final String PARENT_CODE = null; - - public static final String VALUE = "value"; - - public static final String COMMENTS_TEST = "commentsTest"; - - public static final String FORM_SUBMISSION_FIELD = "formSubmissionField"; - //** - - //** ERROR TRACE RELATED - public static final String RECORD_ID = "recordId"; - - public static final DateTime EPOCH_DATE_TIME = new DateTime(0l, DateTimeZone.UTC); - - public static final String ERROR_NAME = "errorName"; - - public static final String OCCURED_AT = "occuredAt"; - - public static final String STACK_TRACE = "stackTrace"; - - public static final String SOLVED = "solved"; - - //** APP STATE TOKEN RELATED - public enum AppStateTokenName { - APP_STATE_TOKEN_NAME("appStateTokenName"), DIFFERENT_APP_STATE_TOKEN_NAME("differentAppStateToken"); - - String value; - - AppStateTokenName(String value) { - this.value = value; - } - - } - - public static final int LAST_EDIT_DATE = 1222; - - public static final String APP_STATE_TOKEN_DESCRIPTION = "description"; - //** - - //** LOCATION RELATED - public static Set locationTags = new HashSet<>(asList("tags1", "tags2")); - //** - - //** HIA2 INDICATOR RELATED - public static final String INDICATOR_CODE = "indicatorCode"; - - public static final String HIA2_INDICATOR_LABEL = "hia2IndicatorLabel"; - - public static final String DHIS_ID = "dhisId"; - - public static final String HIA_2_DESCRIPTION = "hia2Description"; - - public static final String HIA2_CATEGORY = "hia2Category"; - - public static final String HIA2_VALUE = "hia2Value"; - - public static final String HIA2_UPDATED_AT = "hia2UpdatedAt"; - //** - - //** REPORT RELATED - public static final String REPORT_TYPE = "reportType"; - - public static final String REPORT_STATUS = "reportStatus"; - - public static final int REPORT_VERSION = 222; - - public static final int REPORT_DURATION = 3434; - //** - - //** USER RELATED - public static final String USER_NAME = "userName"; - - public static final String PASSWORD = "password"; - - public static final String SALT = "salt"; - - public static final String USER_STATUS = "userStatus"; - - public static final List ROLES = asList("role1", "role2"); - - public static final List PERMISSIONS = asList("permission1", "permission2"); - //** - - //** MULTIMEDIA RELATED - public static final String FILE_CATEGORY = "fileCategory"; - - public static final String FILE_PATH = "filePath"; - - public static final String CONTENT_TYPE = "contentType"; - - public static final String CASE_ID = "caseId"; - //** - - public static Address getAddress() { - Address address = new Address().withAddressType(addressType).withCountry(country).withStateProvince(stateProvince) - .withCityVillage(cityVillage).withCountyDistrict(countryDistrict).withSubDistrict(subDistrict) - .withTown(town); - return address; - } - - public static Client getClient() { - Client client = new Client(BASE_ENTITY_ID, FIRST_NAME, MIDDLE_NAME, LAST_NAME, birthDate, deathDate, - BIRTH_DATE_APPROX, DEATH_DATE_APPROX, FEMALE, Collections.singletonList(getAddress()), identifier, - attributes); - return client; - } - - - public static Obs getObs() { - Obs obs = new Obs(CONCEPT, FIELD_DATA_TYPE, FIELD_CODE, PARENT_CODE, VALUE, COMMENTS_TEST, FORM_SUBMISSION_FIELD); - return obs; - } - - public static Event getEvent() { - Event event = new Event(BASE_ENTITY_ID, EVENT_TYPE, EVENT_DATE, ENTITY_TYPE, PROVIDER_ID, LOCATION_ID, - FORM_SUBMISSION_ID); - event.setIdentifiers(identifier); - event.setDetails(DETAILS); - event.addObs(getObs()); - return event; - } - - public static AppStateToken getAppStateToken() { - AppStateToken appStateToken = new AppStateToken(AppStateTokenName.APP_STATE_TOKEN_NAME.name(), VALUE, LAST_EDIT_DATE, - APP_STATE_TOKEN_DESCRIPTION); - return appStateToken; - } - - public static ErrorTrace getErrorTrace() { - ErrorTrace errorTrace = new ErrorTrace(RECORD_ID, EPOCH_DATE_TIME, ERROR_NAME, OCCURED_AT, STACK_TRACE, SOLVED); - return errorTrace; - } - - public static Provider getProvider() { - Provider provider = new Provider(BASE_ENTITY_ID, FULL_NAME); - return provider; - } - - public static Location getDomainLocation() { - Location location = new Location(LOCATION_ID, LOCATION_NAME, getAddress(), identifier, null, locationTags, - attributes); - return location; - } - - public static org.opensrp.api.domain.Location getApiLocation() { - org.opensrp.api.domain.Location location = new org.opensrp.api.domain.Location(LOCATION_ID, LOCATION_NAME, null, - identifier, null, locationTags, attributes); - return location; - } - - public static Hia2Indicator getHia2Indicator() { - Hia2Indicator hia2Indicator = new Hia2Indicator(INDICATOR_CODE, HIA2_INDICATOR_LABEL, DHIS_ID, HIA_2_DESCRIPTION, - HIA2_CATEGORY, HIA2_VALUE, PROVIDER_ID, HIA2_UPDATED_AT); - return hia2Indicator; - } - - public static Report getReport() { - Report report = new Report(BASE_ENTITY_ID, LOCATION_ID, EPOCH_DATE_TIME, REPORT_TYPE, FORM_SUBMISSION_ID, - PROVIDER_ID, REPORT_STATUS, REPORT_VERSION, REPORT_DURATION, asList(getHia2Indicator())); - report.setIdentifiers(identifier); - return report; - } - - public static User getUser() { - User user = new User(BASE_ENTITY_ID, USER_NAME, PASSWORD, SALT, USER_STATUS, ROLES, PERMISSIONS); - return user; - } - - public static BaseEntity getBaseEntity() { - BaseEntity baseEntity = new BaseEntity(BASE_ENTITY_ID, identifier, attributes, asList(getAddress())); - return baseEntity; - } - - public static Multimedia getMultimedia() { - Multimedia multimedia = new Multimedia(CASE_ID, PROVIDER_ID, CONTENT_TYPE, FILE_PATH, FILE_CATEGORY); - return multimedia; - } - - public static MultimediaDTO getMultimediaDTO(String contentType) { - MultimediaDTO multimediaDTO = new MultimediaDTO(CASE_ID, PROVIDER_ID, contentType, FILE_PATH, FILE_CATEGORY); - return multimediaDTO; - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/ScheduleBuilder.java b/opensrp-core/src/test/java/org/opensrp/util/ScheduleBuilder.java deleted file mode 100644 index 9e8265fc83..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/ScheduleBuilder.java +++ /dev/null @@ -1,52 +0,0 @@ -package org.opensrp.util; - -import org.joda.time.DateTime; -import org.mockito.ArgumentMatcher; -import org.motechproject.scheduletracking.api.domain.Enrollment; -import org.motechproject.scheduletracking.api.domain.EnrollmentStatus; -import org.motechproject.scheduletracking.api.domain.Schedule; -import org.motechproject.scheduletracking.api.domain.WindowName; -import org.motechproject.scheduletracking.api.service.EnrollmentRecord; -import org.motechproject.scheduletracking.api.service.EnrollmentRequest; -import org.opensrp.scheduler.HealthSchedulerService.MetadataField; -import org.opensrp.scheduler.MilestoneEvent; - -import java.util.HashMap; -import java.util.Map; - -import static org.joda.time.LocalDate.parse; -import static org.mockito.Matchers.argThat; - -public class ScheduleBuilder { - - public static EnrollmentRequest enrollmentFor(final String entityId, final String scheduleName, final String name, final String referenceDate) { - return argThat(new ArgumentMatcher() { - @Override - public boolean matches(Object o) { - EnrollmentRequest request = (EnrollmentRequest) o; - return entityId.equals(request.getExternalId()) - && parse(referenceDate).equals(request.getReferenceDate()) - && scheduleName.equals(request.getScheduleName()) - && (name == null ? request.getStartingMilestoneName() == null : name.equals(request.getStartingMilestoneName())); - } - }); - } - - public static EnrollmentRecord enrollmentRecord(String entityId, String scheduleName, String currentMilestone) { - return new EnrollmentRecord(entityId, scheduleName, currentMilestone, null, null, null, null, null, null, null); - } - - public static Enrollment enrollment(String entityId, String scheduleName, String currentMilestone, DateTime startOfSchedule, DateTime enrolledOn, EnrollmentStatus enrollmentStatus, String formSubmissionId) { - Schedule schedule = new Schedule(scheduleName); - Map map = new HashMap<>(); - - map.put(MetadataField.lastUpdate.name(), new DateTime().toString()); - map.put(MetadataField.enrollmentEvent.name(), formSubmissionId); - return new Enrollment(entityId, schedule, currentMilestone, startOfSchedule, enrolledOn, null, enrollmentStatus, map); - } - - public static MilestoneEvent event(String externalID, String scheduleName, String milestone, WindowName window, DateTime dueWindowStart, DateTime lateWindowStart, DateTime maxWindowStart) { - return new MilestoneEvent(Event.create().withSchedule(scheduleName).withMilestone(milestone).withWindow(window).withExternalId(externalID) - .withDueWindowStartDate(dueWindowStart).withLateWindowStartDate(lateWindowStart).withMaxWindowStartDate(maxWindowStart).build()); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/TestResourceLoader.java b/opensrp-core/src/test/java/org/opensrp/util/TestResourceLoader.java deleted file mode 100644 index fe1b654e83..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/TestResourceLoader.java +++ /dev/null @@ -1,60 +0,0 @@ -package org.opensrp.util; - -import com.google.gson.Gson; -import com.google.gson.JsonIOException; -import com.ibm.icu.impl.Assert; -import org.json.JSONObject; -import org.opensrp.form.domain.FormSubmission; -import org.springframework.core.io.ClassPathResource; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.Resource; -import org.springframework.core.io.ResourceLoader; -import org.springframework.core.io.support.PropertiesLoaderUtils; - -import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.util.Properties; - -public class TestResourceLoader { - protected String openmrsOpenmrsUrl; - protected String openmrsUsername; - protected String openmrsPassword; - protected String formDirPath; - protected boolean pushToOpenmrsForTest; - - public TestResourceLoader() { - try { - Resource resource = new ClassPathResource("/opensrp.properties"); - Properties props = PropertiesLoaderUtils.loadProperties(resource); - formDirPath = props.getProperty("form.directory.name"); - } catch (IOException e) { - Assert.fail(e); - } - - } - - protected FormSubmission getFormSubmissionFor(String formName, Integer number) throws JsonIOException, IOException { - ResourceLoader loader = new DefaultResourceLoader(); - String path = loader.getResource(formDirPath).getURI().getPath(); - File fsfile = new File(path + "/" + formName + "/form_submission" + (number == null ? "" : number) + ".json"); - return new Gson().fromJson(new FileReader(fsfile), FormSubmission.class); - } - - protected JSONObject getJsonFormSubmissionFor(String formName, Integer number) throws IOException { - ResourceLoader loader = new DefaultResourceLoader(); - String path = loader.getResource(formDirPath).getURI().getPath(); - File fsfile = new File(path + "/" + formName + "/form_submission" + (number == null ? "" : number) + ".json"); - return new JSONObject(new FileReader(fsfile)); - } - - protected String getFullPath(String fileName) throws IOException { - ResourceLoader loader = new DefaultResourceLoader(); - String path = loader.getResource(fileName).getURI().getPath(); - return path; - } - - protected FormSubmission getFormSubmissionFor(String formName) throws JsonIOException, IOException { - return getFormSubmissionFor(formName, null); - } -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/UtilTest.java b/opensrp-core/src/test/java/org/opensrp/util/UtilTest.java deleted file mode 100644 index 71927c2068..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/UtilTest.java +++ /dev/null @@ -1,86 +0,0 @@ -package org.opensrp.util; - - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; -import org.junit.Test; -import org.opensrp.form.domain.FormSubmission; - -import java.io.IOException; -import java.util.List; -import java.util.Map; - -import static junit.framework.Assert.*; - -public class UtilTest extends TestResourceLoader { - - public String declaredFieldOne; - public int declaredFieldTwo; - - @Test - public void testGetStringFromJson() throws IOException { - String formSubmission = "{\"_id\": \"1\",\n" + - " \"_rev\": \"2\"}"; - Map map = Utils.getStringMapFromJSON(formSubmission); - assertFalse(map.isEmpty()); - assertEquals(map.size(), 2); - assertEquals(map.get("_id"), "1"); - assertEquals(map.get("_rev"), "2"); - assertNull(map.get("sdf")); - } - - @Test(expected = Exception.class) - public void testErrorForInvalidJsonInGetStringFromJson() { - String formSubmission = "Invalid JSON"; - Map map = Utils.getStringMapFromJSON(formSubmission); - } - - @Test - public void testGetFieldsAsList() { - List fieldList = Utils.getFieldsAsList(UtilTest.class); - assertEquals(2, fieldList.size()); - assertEquals("declaredFieldOne", fieldList.get(0)); - assertEquals("declaredFieldTwo", fieldList.get(1)); - } - - @Test - public void testGetZiggyParam() throws IOException, JSONException { - FormSubmission formSubmission = getFormSubmissionFor("new_household_registration", 1); - String ziggyParams = Utils.getZiggyParams(formSubmission); - JSONObject jsonObject = new JSONObject(ziggyParams); - - assertEquals(formSubmission.anmId(), jsonObject.get("anmId")); - assertEquals(formSubmission.formName(), jsonObject.get("formName")); - assertEquals(formSubmission.serverVersion(), Long.parseLong((String)jsonObject.get("serverVersion"))); - assertEquals(formSubmission.entityId(), jsonObject.get("entityId")); - assertEquals(formSubmission.instanceId(), jsonObject.get("instanceId")); - assertEquals(formSubmission.clientVersion(), Long.parseLong((String)jsonObject.get("clientVersion"))); - } - - @Test - public void testGetXlsToJson() throws IOException, JSONException { - String path = getFullPath("sampleXLS/validXLS.xls"); - JSONArray jsonArray = Utils.getXlsToJson(path); - JSONObject jsonObject = jsonArray.getJSONObject(0); - assertEquals(2, jsonArray.length()); - assertEquals("f", jsonObject.get("first")); - assertEquals("s", jsonObject.get("second")); - assertEquals("t", jsonObject.get("third")); - - } - - @Test - public void testGetXlsToJsonForEmptyXls() throws IOException, JSONException{ - String path = getFullPath("sampleXLS/emptyXLS.xls"); - JSONArray jsonArray = Utils.getXlsToJson(path); - assertEquals(0, jsonArray.length()); - } - - @Test(expected = Exception.class) - public void testGetXlsToJsonForInvalidXls() throws IOException, JSONException{ - String path = getFullPath("sampleXLS/invalidXLS.xls"); - JSONArray jsonArray = Utils.getXlsToJson(path); - } - -} diff --git a/opensrp-core/src/test/java/org/opensrp/util/it/UtilsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/util/it/UtilsIntegrationTest.java deleted file mode 100644 index 0bd49df0bc..0000000000 --- a/opensrp-core/src/test/java/org/opensrp/util/it/UtilsIntegrationTest.java +++ /dev/null @@ -1,69 +0,0 @@ -package org.opensrp.util.it; - - -import org.ektorp.CouchDbConnector; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.opensrp.SpringApplicationContextProvider; -import org.opensrp.util.Utils; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; - -import java.net.MalformedURLException; - -import static junit.framework.Assert.assertEquals; - -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class UtilsIntegrationTest { - - @Value("#{opensrp['couchdb.server']}") - String url; - @Value("#{opensrp['couchdb.username']}") - String userName; - @Value("#{opensrp['couchdb.password']}") - String password; - @Value("#{opensrp['couchdb.port']}") - String portNumber; - - @Test - public void testConnectToDb() throws MalformedURLException { - Utils.DatabaseConnectionParams databaseConnectionParams = new Utils.DatabaseConnectionParams(); - databaseConnectionParams.url = "http://" + url; - databaseConnectionParams.dbName = "opensrp"; - databaseConnectionParams.password = password; - databaseConnectionParams.userName = userName; - databaseConnectionParams.portNumber = portNumber; - - CouchDbConnector couchDbConnector = Utils.connectToDB(databaseConnectionParams); - - assertEquals("opensrp", couchDbConnector.getDatabaseName()); - } - - @Test(expected = MalformedURLException.class) - public void testConnectDbMalFormedURLException() throws MalformedURLException { - Utils.DatabaseConnectionParams databaseConnectionParams = new Utils.DatabaseConnectionParams(); - databaseConnectionParams.url = "127.0.0.1"; - databaseConnectionParams.portNumber = portNumber; - - CouchDbConnector couchDbConnector = Utils.connectToDB(databaseConnectionParams); - } - - @Test(expected = NullPointerException.class) - public void testConnectDbNullPointerException() throws MalformedURLException { - Utils.DatabaseConnectionParams databaseConnectionParams = new Utils.DatabaseConnectionParams(); - CouchDbConnector couchDbConnector = Utils.connectToDB(databaseConnectionParams); - } - - @Test - public void testConnectDbWithOutUserNameAndPassword() throws MalformedURLException { - Utils.DatabaseConnectionParams databaseConnectionParams = new Utils.DatabaseConnectionParams(); - databaseConnectionParams.url = "http://" + url; - databaseConnectionParams.portNumber = portNumber; - databaseConnectionParams.dbName = "opensrp"; - - CouchDbConnector couchDbConnector = Utils.connectToDB(databaseConnectionParams); - assertEquals("opensrp", couchDbConnector.getDatabaseName()); - } -} diff --git a/opensrp-core/src/test/java/org/utils/AssertionUtil.java b/opensrp-core/src/test/java/org/utils/AssertionUtil.java deleted file mode 100644 index dadd64965b..0000000000 --- a/opensrp-core/src/test/java/org/utils/AssertionUtil.java +++ /dev/null @@ -1,56 +0,0 @@ -package org.utils; - -import org.opensrp.domain.BaseDataObject; -import org.opensrp.domain.BaseEntity; -import org.opensrp.domain.Location; - -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.utils.CouchDbAccessUtils.purgeDateCreatedEditedAndVoidedField; - -public final class AssertionUtil { - - private AssertionUtil() { - - } - - public static void assertTwoListAreSameIgnoringOrder(List expectedList, List actualList) { - assertEquals(expectedList.size(), actualList.size()); - assertTrue("expected: " + expectedList.toString() + "\n" + "actual: " + actualList.toString(), - expectedList.containsAll(actualList) && actualList.containsAll(expectedList)); - } - - public static void assertNewObjectCreation(T expectedObject, T actualObject) { - assertNotNull(actualObject.getDateCreated()); - - purgeDateCreatedEditedAndVoidedField(asList(expectedObject, actualObject)); - - assertEquals(expectedObject, actualObject); - - } - - public static void assertObjectUpdate(T expectedObject, T actualObject) { - assertNotNull(actualObject.getDateEdited()); - - purgeDateCreatedEditedAndVoidedField(asList(expectedObject, actualObject)); - assertEquals(expectedObject, actualObject); - - } - - public static void assertTwoDifferentTypeLocationSame(Location expectedLocation, - org.opensrp.api.domain.Location actualLocation) { - assertEquals(expectedLocation.getLocationId(), actualLocation.getLocationId()); - assertEquals(expectedLocation.getTags(), actualLocation.getTags()); - assertEquals(expectedLocation.getAttributes(), actualLocation.getAttributes()); - //assertEquals(expectedLocation.getAddress(), actualLocation.getAddress()); - assertEquals(expectedLocation.getName(), actualLocation.getName()); - assertEquals(expectedLocation.getIdentifiers(), actualLocation.getIdentifiers()); - if (expectedLocation.getParentLocation() != null) { - assertNotNull(actualLocation.getParentLocation()); - assertTwoDifferentTypeLocationSame(expectedLocation.getParentLocation(), actualLocation.getParentLocation()); - } - } - -} diff --git a/opensrp-core/src/test/java/org/utils/CouchDbAccessUtils.java b/opensrp-core/src/test/java/org/utils/CouchDbAccessUtils.java deleted file mode 100644 index 916a7ce392..0000000000 --- a/opensrp-core/src/test/java/org/utils/CouchDbAccessUtils.java +++ /dev/null @@ -1,42 +0,0 @@ -package org.utils; - -import com.github.ldriscoll.ektorplucene.LuceneAwareCouchDbConnector; -import org.ektorp.CouchDbConnector; -import org.ektorp.CouchDbInstance; -import org.ektorp.http.StdHttpClient; -import org.ektorp.impl.StdCouchDbInstance; -import org.motechproject.dao.MotechBaseRepository; -import org.opensrp.domain.BaseDataObject; - -import java.io.IOException; -import java.util.List; - -public final class CouchDbAccessUtils { - - public static final String TEST_REMOTE_URL = "http://localhost:5984"; - - private CouchDbAccessUtils() { - - } - - public static void addObjectToRepository(List objectList, R repository) { - for (T object : objectList) { - repository.add(object); - } - } - - public static CouchDbConnector getCouchDbConnector(String dbName) throws IOException { - org.ektorp.http.HttpClient httpClient = new StdHttpClient.Builder().url(TEST_REMOTE_URL).build(); - CouchDbInstance couchDbInstance = new StdCouchDbInstance(httpClient); - CouchDbConnector couchDbConnector = new LuceneAwareCouchDbConnector(dbName, couchDbInstance); - return couchDbConnector; - } - - public static void purgeDateCreatedEditedAndVoidedField(List objecstToPurge) { - for (T objectToPurge : objecstToPurge) { - objectToPurge.setDateCreated(null); - objectToPurge.setDateEdited(null); - objectToPurge.setDateVoided(null); - } - } -} diff --git a/opensrp-core/src/test/resources/form/basic_reg/form.json b/opensrp-core/src/test/resources/form/basic_reg/form.json deleted file mode 100644 index 1dcfa303dc..0000000000 --- a/opensrp-core/src/test/resources/form/basic_reg/form.json +++ /dev/null @@ -1,653 +0,0 @@ -{ - "default_language": "default", - "id_string": "patient_basic_reg", - "children": [ - { - "name": "woman_name", - "label": "First name", - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "name": "last_name", - "label": "Last name", - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "name": "gender", - "default": "female", - "label": "Gender", - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "name": "birthdate", - "label": "DOB", - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - }, - "type": "date" - }, - { - "children": [ - { - "name": "karachi", - "label": "Karachi", - "instance": { - "openmrs_code": "karachi" - } - }, - { - "name": "lahore", - "label": "Lahore", - "instance": { - "openmrs_code": "lahore" - } - } - ], - "name": "location", - "bind": { - "required": "yes" - }, - "label": "Location of ANC", - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "select one" - }, - { - "name": "anc_visit_date", - "bind": { - "required": "yes", - "constraint": ".<=${today}" - }, - "label": "ANC visit date?", - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "date" - }, - { - "name": "pulse_rate", - "bind": { - "constraint": ".>0" - }, - "label": "Pulse rate", - "instance": { - "openmrs_entity_id": "5087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "integer" - }, - { - "name": "temperature", - "bind": { - "constraint": ".>0" - }, - "label": "Temperature (C)", - "instance": { - "openmrs_entity_id": "5088AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "decimal" - }, - { - "children": [ - { - "name": "birthplace_lat", - "label": "Latitude", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "latitude", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_lon", - "label": "Longitude", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "longitute", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_postcode", - "label": "postalCode / postal_code", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "postalcode", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_house", - "label": "HOUSE_NUMBER / HOUSE / HOUSE_NO / UNIT / UNIT_NUMBER / UNIT_NO", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "house_number", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_street", - "label": "STREET / STREET_NUMBER / LANE", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "street", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_area", - "label": "SECTOR / AREA", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "area", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_town", - "label": "MUNICIPALITY / TOWN / LOCALITY / REGION", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "town", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_busroute", - "label": "Bus route custom field", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "bus_route", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_district", - "label": "COUNTY / DISTRICT", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "district", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_city", - "label": "CITY / VILLAGE", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "city", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_state", - "label": "state / state_province / stateProvince/ province", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "state", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "birthplace_country", - "label": "country", - "instance": { - "openmrs_entity_parent": "birthplace", - "openmrs_entity_id": "country", - "openmrs_entity": "person_address" - }, - "type": "text" - } - ], - "name": "birthplace_address", - "label": "Birthplace", - "type": "group" - }, - { - "children": [ - { - "name": "usual_residence_start", - "label": "When started (startDate / start_date)", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "startdate", - "openmrs_entity": "person_address" - }, - "type": "date" - }, - { - "name": "usual_residence_lat", - "label": "Latitude", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "latitude", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_lon", - "label": "Longitude", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "longitute", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_postcode", - "label": "postalCode / postal_code", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "postalcode", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_house", - "label": "HOUSE_NUMBER / HOUSE / HOUSE_NO / UNIT / UNIT_NUMBER / UNIT_NO", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "uniit", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_street", - "label": "STREET / STREET_NUMBER / LANE", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "lane", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_area", - "label": "SECTOR / AREA", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "sector", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_town", - "label": "MUNICIPALITY / TOWN / LOCALITY / REGION", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "municipality", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_district", - "label": "COUNTY / DISTRICT", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "district", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_city", - "label": "CITY / VILLAGE", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "city", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_state", - "label": "state / state_province / stateProvince/ province", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "province", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "usual_residence_country", - "label": "country", - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "country", - "openmrs_entity": "person_address" - }, - "type": "text" - } - ], - "name": "usual_residence_address", - "label": "Usual Residence", - "type": "group" - }, - { - "children": [ - { - "name": "previous_residence_start", - "label": "When started (startDate / start_date)", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "startdate", - "openmrs_entity": "person_address" - }, - "type": "date" - }, - { - "name": "previous_residence_end", - "label": "When ended (endDate/end_date)", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "enddate", - "openmrs_entity": "person_address" - }, - "type": "date" - }, - { - "name": "previous_residence_lat", - "label": "Latitude", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "latitude", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_lon", - "label": "Longitude", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "longitute", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_postcode", - "label": "postalCode / postal_code", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "postalcode", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_house", - "label": "HOUSE_NUMBER / HOUSE / HOUSE_NO / UNIT / UNIT_NUMBER / UNIT_NO", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "house", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_street", - "label": "STREET / STREET_NUMBER / LANE", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "street", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_area", - "label": "SECTOR / AREA", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "area", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_town", - "label": "MUNICIPALITY / TOWN / LOCALITY / REGION", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "region", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_district", - "label": "COUNTY / DISTRICT", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "county", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_city", - "label": "CITY / VILLAGE", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "village", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_state", - "label": "state / state_province / stateProvince/ province", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "state", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "previous_residence_country", - "label": "country", - "instance": { - "openmrs_entity_parent": "previous_residence", - "openmrs_entity_id": "country", - "openmrs_entity": "person_address" - }, - "type": "text" - } - ], - "name": "previous_residence_address", - "label": "Previous Residence", - "type": "group" - }, - { - "children": [ - { - "name": "deathplace_lat", - "label": "Latitude", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "latitude", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_lon", - "label": "Longitude", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "longitute", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_postcode", - "label": "postalCode / postal_code", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "postal_code", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_house", - "label": "HOUSE_NUMBER / HOUSE / HOUSE_NO / UNIT / UNIT_NUMBER / UNIT_NO", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "unit", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_street", - "label": "STREET / STREET_NUMBER / LANE", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "lane", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_area", - "label": "SECTOR / AREA", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "area", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_town", - "label": "MUNICIPALITY / TOWN / LOCALITY / REGION", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "region", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_district", - "label": "COUNTY / DISTRICT", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "district", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_city", - "label": "CITY / VILLAGE", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "city", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_state", - "label": "state / state_province / stateProvince/ province", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "state_province", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "deathplace_country", - "label": "country", - "instance": { - "openmrs_entity_parent": "deathplace", - "openmrs_entity_id": "country", - "openmrs_entity": "person_address" - }, - "type": "text" - } - ], - "name": "deathplace_address", - "label": "Death Place", - "type": "group" - }, - { - "name": "today", - "type": "today" - }, - { - "name": "start", - "type": "start" - }, - { - "name": "end", - "type": "end" - }, - { - "control": { - "bodyless": true - }, - "children": [ - { - "name": "instanceID", - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate" - } - ], - "name": "meta", - "type": "group" - } - ], - "instance": { - "encounter_type": "patient_register" - }, - "version": "201504030905", - "type": "survey", - "name": "register_with_address", - "sms_keyword": "patient_basic_reg", - "title": "Patient Registration" -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/basic_reg/form.xml b/opensrp-core/src/test/resources/form/basic_reg/form.xml deleted file mode 100644 index 8926f192ec..0000000000 --- a/opensrp-core/src/test/resources/form/basic_reg/form.xml +++ /dev/null @@ -1,287 +0,0 @@ -
- - -

Register with address

- - - - -
-
- - Location of ANC - * - -
- - -
-
-
- - - -
-

- Birthplace -

- - - - - - - - - - - - -
- -
-

- Usual Residence -

- - - - - - - - - - - - -
- -
-

- Previous Residence -

- - - - - - - - - - - - - -
- -
-

- Death Place -

- - - - - - - - - - - -
- - - -
\ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/basic_reg/form_definition.json b/opensrp-core/src/test/resources/form/basic_reg/form_definition.json deleted file mode 100644 index c6be057f92..0000000000 --- a/opensrp-core/src/test/resources/form/basic_reg/form_definition.json +++ /dev/null @@ -1,245 +0,0 @@ -{ - "form_data_definition_version": "1", - "form": { - "bind_type": "register_with_address", - "default_bind_path": "/model/instance/register_with_address/", - "fields": [ - { - "name": "woman_name", - "bind": "/model/instance/register_with_address/woman_name" - }, - { - "name": "last_name", - "bind": "/model/instance/register_with_address/last_name" - }, - { - "name": "gender", - "bind": "/model/instance/register_with_address/gender" - }, - { - "name": "birthdate", - "bind": "/model/instance/register_with_address/birthdate" - }, - { - "name": "location", - "bind": "/model/instance/register_with_address/location" - }, - { - "name": "anc_visit_date", - "bind": "/model/instance/register_with_address/anc_visit_date" - }, - { - "name": "pulse_rate", - "bind": "/model/instance/register_with_address/pulse_rate" - }, - { - "name": "temperature", - "bind": "/model/instance/register_with_address/temperature" - }, - { - "name": "birthplace_lat", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_lat" - }, - { - "name": "birthplace_lon", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_lon" - }, - { - "name": "birthplace_postcode", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_postcode" - }, - { - "name": "birthplace_house", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_house" - }, - { - "name": "birthplace_street", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_street" - }, - { - "name": "birthplace_area", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_area" - }, - { - "name": "birthplace_town", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_town" - }, - { - "name": "birthplace_busroute", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_busroute" - }, - { - "name": "birthplace_district", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_district" - }, - { - "name": "birthplace_city", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_city" - }, - { - "name": "birthplace_state", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_state" - }, - { - "name": "birthplace_country", - "bind": "/model/instance/register_with_address/birthplace_address/birthplace_country" - }, - { - "name": "usual_residence_start", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_start" - }, - { - "name": "usual_residence_lat", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_lat" - }, - { - "name": "usual_residence_lon", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_lon" - }, - { - "name": "usual_residence_postcode", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_postcode" - }, - { - "name": "usual_residence_house", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_house" - }, - { - "name": "usual_residence_street", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_street" - }, - { - "name": "usual_residence_area", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_area" - }, - { - "name": "usual_residence_town", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_town" - }, - { - "name": "usual_residence_district", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_district" - }, - { - "name": "usual_residence_city", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_city" - }, - { - "name": "usual_residence_state", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_state" - }, - { - "name": "usual_residence_country", - "bind": "/model/instance/register_with_address/usual_residence_address/usual_residence_country" - }, - { - "name": "previous_residence_start", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_start" - }, - { - "name": "previous_residence_end", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_end" - }, - { - "name": "previous_residence_lat", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_lat" - }, - { - "name": "previous_residence_lon", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_lon" - }, - { - "name": "previous_residence_postcode", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_postcode" - }, - { - "name": "previous_residence_house", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_house" - }, - { - "name": "previous_residence_street", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_street" - }, - { - "name": "previous_residence_area", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_area" - }, - { - "name": "previous_residence_town", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_town" - }, - { - "name": "previous_residence_district", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_district" - }, - { - "name": "previous_residence_city", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_city" - }, - { - "name": "previous_residence_state", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_state" - }, - { - "name": "previous_residence_country", - "bind": "/model/instance/register_with_address/previous_residence_address/previous_residence_country" - }, - { - "name": "deathplace_lat", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_lat" - }, - { - "name": "deathplace_lon", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_lon" - }, - { - "name": "deathplace_postcode", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_postcode" - }, - { - "name": "deathplace_house", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_house" - }, - { - "name": "deathplace_street", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_street" - }, - { - "name": "deathplace_area", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_area" - }, - { - "name": "deathplace_town", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_town" - }, - { - "name": "deathplace_district", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_district" - }, - { - "name": "deathplace_city", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_city" - }, - { - "name": "deathplace_state", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_state" - }, - { - "name": "deathplace_country", - "bind": "/model/instance/register_with_address/deathplace_address/deathplace_country" - }, - { - "name": "today", - "bind": "/model/instance/register_with_address/today" - }, - { - "name": "start", - "bind": "/model/instance/register_with_address/start" - }, - { - "name": "end", - "bind": "/model/instance/register_with_address/end" - } - ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/basic_reg/form_submission.json b/opensrp-core/src/test/resources/form/basic_reg/form_submission.json deleted file mode 100644 index 84c463821c..0000000000 --- a/opensrp-core/src/test/resources/form/basic_reg/form_submission.json +++ /dev/null @@ -1,254 +0,0 @@ -{ - "anmId": "admin", - "instanceId": "88ceee24-10b4-44c2-9429-754b8d823776", - "clientVersion": "1426830449320", - "entityId": "b716d938-1aea-40ae-a081-9ddddddcccc9", - "formDataDefinitionVersion": "1", - "formName": "basic_reg", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "register_with_address", - "default_bind_path": "/model/instance/register_with_address/", - "fields": [ - { - "name": "woman_name", - "value": "test woman_name" - }, - { - "name": "last_name", - "value": "test last_name" - }, - { - "name": "gender", - "value": "FEMALE" - }, - { - "name": "birthdate", - "value": "2015-02-01" - }, - { - "name": "location", - "value": "unknown location" - }, - { - "name": "anc_visit_date", - "value": "2015-02-01" - }, - { - "name": "pulse_rate", - "value": "55" - }, - { - "name": "temperature", - "value": "37" - }, - { - "name": "birthplace_lat", - "value": "test birthplace_lat" - }, - { - "name": "birthplace_lon", - "value": "test birthplace_lon" - }, - { - "name": "birthplace_postcode", - "value": "test birthplace_postcode" - }, - { - "name": "birthplace_house", - "value": "test birthplace_house" - }, - { - "name": "birthplace_street", - "value": "test birthplace_street" - }, - { - "name": "birthplace_area", - "value": "test birthplace_area" - }, - { - "name": "birthplace_town", - "value": "test birthplace_town" - }, - { - "name": "birthplace_busroute", - "value": "test birthplace_busroute" - }, - { - "name": "birthplace_district", - "value": "test birthplace_district" - }, - { - "name": "birthplace_city", - "value": "test birthplace_city" - }, - { - "name": "birthplace_state", - "value": "test birthplace_state" - }, - { - "name": "birthplace_country", - "value": "test birthplace_country" - }, - { - "name": "usual_residence_start", - "value": "2015-02-01" - }, - { - "name": "usual_residence_lat", - "value": "test usual_residence_lat" - }, - { - "name": "usual_residence_lon", - "value": "test usual_residence_lon" - }, - { - "name": "usual_residence_postcode", - "value": "test usual_residence_postcode" - }, - { - "name": "usual_residence_house", - "value": "test usual_residence_house" - }, - { - "name": "usual_residence_street", - "value": "test usual_residence_street" - }, - { - "name": "usual_residence_area", - "value": "test usual_residence_area" - }, - { - "name": "usual_residence_town", - "value": "test usual_residence_town" - }, - { - "name": "usual_residence_district", - "value": "test usual_residence_district" - }, - { - "name": "usual_residence_city", - "value": "test usual_residence_city" - }, - { - "name": "usual_residence_state", - "value": "test usual_residence_state" - }, - { - "name": "usual_residence_country", - "value": "test usual_residence_country" - }, - { - "name": "previous_residence_start", - "value": "2015-02-01" - }, - { - "name": "previous_residence_end", - "value": "2015-02-01" - }, - { - "name": "previous_residence_lat", - "value": "test previous_residence_lat" - }, - { - "name": "previous_residence_lon", - "value": "test previous_residence_lon" - }, - { - "name": "previous_residence_postcode", - "value": "test previous_residence_postcode" - }, - { - "name": "previous_residence_house", - "value": "test previous_residence_house" - }, - { - "name": "previous_residence_street", - "value": "test previous_residence_street" - }, - { - "name": "previous_residence_area", - "value": "test previous_residence_area" - }, - { - "name": "previous_residence_town", - "value": "test previous_residence_town" - }, - { - "name": "previous_residence_district", - "value": "test previous_residence_district" - }, - { - "name": "previous_residence_city", - "value": "test previous_residence_city" - }, - { - "name": "previous_residence_state", - "value": "test previous_residence_state" - }, - { - "name": "previous_residence_country", - "value": "test previous_residence_country" - }, - { - "name": "deathplace_lat", - "value": "test deathplace_lat" - }, - { - "name": "deathplace_lon", - "value": "test deathplace_lon" - }, - { - "name": "deathplace_postcode", - "value": "test deathplace_postcode" - }, - { - "name": "deathplace_house", - "value": "test deathplace_house" - }, - { - "name": "deathplace_street", - "value": "test deathplace_street" - }, - { - "name": "deathplace_area", - "value": "test deathplace_area" - }, - { - "name": "deathplace_town", - "value": "test deathplace_town" - }, - { - "name": "deathplace_district", - "value": "test deathplace_district" - }, - { - "name": "deathplace_city", - "value": "test deathplace_city" - }, - { - "name": "deathplace_state", - "value": "test deathplace_state" - }, - { - "name": "deathplace_country", - "value": "test deathplace_country" - }, - { - "name": "today", - "value": "2015-02-01" - }, - { - "name": "start", - "value": "2015-02-01" - }, - { - "name": "end", - "value": "2015-02-01" - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/basic_reg/model.xml b/opensrp-core/src/test/resources/form/basic_reg/model.xml deleted file mode 100644 index 06822afad1..0000000000 --- a/opensrp-core/src/test/resources/form/basic_reg/model.xml +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - female - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form.json b/opensrp-core/src/test/resources/form/child_enrollment/form.json deleted file mode 100644 index 98878c7e0e..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Child_Vaccination_Enrollment","title":"بچّوں کا انرولمنٹ رجسٹر برائے ٹیکاجات - Child Enrollment Vaccination Register","sms_keyword":"child_vaccination_enrollment","default_language":"English","choices":{"provinces":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}],"ucs":[{"province":"sindh","city":"karachi","town":"korangi","name":"bilal_colony","label":{"Urdu":"بلال کالونی","Roman Urdu":"Bilal Colony","English":"Bilal Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"nasir_colony","label":{"Urdu":"ناصر کالونی","Roman Urdu":"Nasir Colony","English":"Nasir Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"chakra_goth","label":{"Urdu":"چکرا گوٹھ","Roman Urdu":"Chakra Goth","English":"Chakra Goth"}},{"province":"sindh","city":"karachi","town":"korangi","name":"mustafa_taj_colony","label":{"Urdu":"مصطفی تاج کالونی","Roman Urdu":"Mustafa Taj Colony","English":"Mustafa Taj Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hundred_quarters","label":{"Urdu":"ہنڈریڈ کوارٹر","Roman Urdu":"Hundred Quarters","English":"Hundred Quarters"}},{"province":"sindh","city":"karachi","town":"korangi","name":"gulzar_colony","label":{"Urdu":"گلزار کالونی","Roman Urdu":"Gulzar Colony","English":"Gulzar Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"korangi_sector_33","label":{"Urdu":"کورنگی سیکٹر 33","Roman Urdu":"Korangi Sector 33","English":"Korangi Sector 33"}},{"province":"sindh","city":"karachi","town":"korangi","name":"zaman_town","label":{"Urdu":"زمان ٹاوَن","Roman Urdu":"Zaman Town","English":"Zaman Town"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hasrat_mohani_colony","label":{"Urdu":"حسرت موہانی کالونی","Roman Urdu":"Hasrat Mohani Colony","English":"Hasrat Mohani Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"gulshan_e_ghazi","label":{"Urdu":"گلشن غازی","Roman Urdu":"Gulshan-e-Ghazi","English":"Gulshan-e-Ghazi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"ittehad_town","label":{"Urdu":"اتحاد ٹاوَن","Roman Urdu":"Ittehad Town","English":"Ittehad Town"}},{"province":"sindh","city":"karachi","town":"baldia","name":"islam_nagar","label":{"Urdu":"اسلام نگر","Roman Urdu":"Islam Nagar","English":"Islam Nagar"}},{"province":"sindh","city":"karachi","town":"baldia","name":"nai_abadi","label":{"Urdu":"نئی آبادی","Roman Urdu":"Nai Abadi","English":"Nai Abadi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"saeedabad","label":{"Urdu":"سعید آباد","Roman Urdu":"Saeedabad","English":"Saeedabad"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muslim_mujahid_colony","label":{"Urdu":"مسلم مجاہد کالونی","Roman Urdu":"Muslim Mujahid Colony","English":"Muslim Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muhajir_camp","label":{"Urdu":"مہاجر کیمپ","Roman Urdu":"Muhajir Camp","English":"Muhajir Camp"}},{"province":"sindh","city":"karachi","town":"baldia","name":"rasheedabad","label":{"Urdu":"رشید آباد","Roman Urdu":"Rasheedabad","English":"Rasheedabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"ibrahim_hyderi","label":{"Urdu":"ابراہیم حیدری","Roman Urdu":"Ibrahim Hyderi","English":"Ibrahim Hyderi"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"rehri","label":{"Urdu":"رہڑی","Roman Urdu":"Rehri","English":"Rehri"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"cattle_colony","label":{"Urdu":"کیٹل کالونی","Roman Urdu":"Cattle Colony","English":"Cattle Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"qaidabad","label":{"Urdu":"قائدآباد","Roman Urdu":"Qaidabad","English":"Qaidabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"landhi_colony","label":{"Urdu":"لانڈھی کالونی","Roman Urdu":"Landhi Colony","English":"Landhi Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gulshan_e_hadeed","label":{"Urdu":"گلشن حدید","Roman Urdu":"Gulshan-e-Hadeed","English":"Gulshan-e-Hadeed"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gaghar","label":{"Urdu":"گگر","Roman Urdu":"Gaghar","English":"Gaghar"}},{"province":"sindh","city":"karachi","town":"gadap","name":"murad_memon_goth","label":{"Urdu":"مراد میمن گوٹھ","Roman Urdu":"Murad Memon Goth","English":"Murad Memon Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"darsano_chana","label":{"Urdu":"درشانو شنو","Roman Urdu":"Darsano Chana","English":"Darsano Chana"}},{"province":"sindh","city":"karachi","town":"gadap","name":"gujro","label":{"Urdu":"گجرو","Roman Urdu":"Gujro","English":"Gujro"}},{"province":"sindh","city":"karachi","town":"gadap","name":"songal","label":{"Urdu":"سنگل","Roman Urdu":"Songal","English":"Songal"}},{"province":"sindh","city":"karachi","town":"gadap","name":"maymarabad","label":{"Urdu":"معمار آباد","Roman Urdu":"Maymarabad","English":"Maymarabad"}},{"province":"sindh","city":"karachi","town":"gadap","name":"yousuf_goth","label":{"Urdu":"یوسف گوٹھ","Roman Urdu":"Yousuf Goth","English":"Yousuf Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"manghopir","label":{"Urdu":"منگھوپیر","Roman Urdu":"Manghopir","English":"Manghopir"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"azizabad","label":{"Urdu":"عزیز آباد","Roman Urdu":"Azizabad","English":"Azizabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"karimabad","label":{"Urdu":"کریم آباد","Roman Urdu":"Karimabad","English":"Karimabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"aisha_manzil","label":{"Urdu":"عائشہ منزل","Roman Urdu":"Aisha Manzil","English":"Aisha Manzil"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"ancholi","label":{"Urdu":"انچولی","Roman Urdu":"Ancholi","English":"Ancholi"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"naseerabad","label":{"Urdu":"نصیرآباد","Roman Urdu":"Naseerabad","English":"Naseerabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"yaseenabad","label":{"Urdu":"یاسین آباد","Roman Urdu":"Yaseenabad","English":"Yaseenabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"water_pump","label":{"Urdu":"واٹرپمپ","Roman Urdu":"Water Pump","English":"Water Pump"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"shafiq_mill_colony","label":{"Urdu":"شفیق مل کالونی","Roman Urdu":"Shafiq Mill Colony","English":"Shafiq Mill Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"delhi_mercantile_society","label":{"Urdu":"دہلی مرچنٹائل سوسائٹی","Roman Urdu":"Delhi Mercantile Society","English":"Delhi Mercantile Society"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"civic_centre","label":{"Urdu":"سوک سینٹر","Roman Urdu":"Civic Centre","English":"Civic Centre"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pir_ilahi_buksh_colony","label":{"Urdu":"پیر الہی بخش کالونی","Roman Urdu":"Pir Ilahi Buksh Colony","English":"Pir Ilahi Buksh Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"essa_nagri","label":{"Urdu":"عیسی نگری","Roman Urdu":"Essa Nagri","English":"Essa Nagri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal","label":{"Urdu":"گلشن اقبال","Roman Urdu":"Gulshan-e-Iqbal","English":"Gulshan-e-Iqbal"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gillani_railway_station","label":{"Urdu":"گیلانی ریلوے اسٹیشن","Roman Urdu":"Gillani Railway Station","English":"Gillani Railway Station"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"shanti_nagar","label":{"Urdu":"شانتی نگر","Roman Urdu":"Shanti Nagar","English":"Shanti Nagar"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"jamali_colony","label":{"Urdu":"جمالی کالونی","Roman Urdu":"Jamali Colony","English":"Jamali Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal_ii","label":{"Urdu":"گلشن اقبال 2","Roman Urdu":"Gulshan-e-Iqbal II","English":"Gulshan-e-Iqbal II"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pehlwan_goth","label":{"Urdu":"پہلوان گوٹھ","Roman Urdu":"Pehlwan Goth","English":"Pehlwan Goth"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"matrovil_colony","label":{"Urdu":"میٹروویل کالونی","Roman Urdu":"Matrovil Colony","English":"Matrovil Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulzar_e_hijri","label":{"Urdu":"گلزار ہجری","Roman Urdu":"Gulzar-e-Hijri","English":"Gulzar-e-Hijri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"safooran_goth","label":{"Urdu":"صفورا گوٹھ","Roman Urdu":"Safooran Goth","English":"Safooran Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"akhtar_colony","label":{"Urdu":"اختر کالونی","Roman Urdu":"Akhtar Colony","English":"Akhtar Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"manzoor_colony","label":{"Urdu":"منظور کالونی","Roman Urdu":"Manzoor Colony","English":"Manzoor Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"azam_basti","label":{"Urdu":"اعظم بستی","Roman Urdu":"Azam Basti","English":"Azam Basti"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"chanesar_goth","label":{"Urdu":"چنیسر گوٹھ","Roman Urdu":"Chanesar Goth","English":"Chanesar Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"mahmudabad","label":{"Urdu":"محمودآباد","Roman Urdu":"Mahmudabad","English":"Mahmudabad"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس","Roman Urdu":"P.E.C.H.S.","English":"P.E.C.H.S."}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs_ii","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس 2","Roman Urdu":"P.E.C.H.S. II","English":"P.E.C.H.S. II"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jut_line","label":{"Urdu":"جٹ لائن","Roman Urdu":"Jut Line","English":"Jut Line"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"central_jacob_lines","label":{"Urdu":"سینٹرل جیکب لائن","Roman Urdu":"Central Jacob Lines","English":"Central Jacob Lines"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jamshed_quarters","label":{"Urdu":"جمشید کوارٹر","Roman Urdu":"Jamshed Quarters","English":"Jamshed Quarters"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"garden_east","label":{"Urdu":"گارڈن ایسٹ","Roman Urdu":"Garden East","English":"Garden East"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"soldier_bazar","label":{"Urdu":"سولجر بازار","Roman Urdu":"Soldier Bazar","English":"Soldier Bazar"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pakistan_quarters","label":{"Urdu":"پاکستان کوارٹر","Roman Urdu":"Pakistan Quarters","English":"Pakistan Quarters"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"bhutta_village","label":{"Urdu":"بھٹا ولیج","Roman Urdu":"Bhutta Village","English":"Bhutta Village"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"sultanabad","label":{"Urdu":"سلطان آباد","Roman Urdu":"Sultanabad","English":"Sultanabad"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"kiamari_uc","label":{"Urdu":"کیماری یو- سی","Roman Urdu":"Kiamari UC","English":"Kiamari UC"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"baba_bhit","label":{"Urdu":"بابا بھٹ","Roman Urdu":"Baba Bhit","English":"Baba Bhit"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"machar_colony","label":{"Urdu":"مچھر کالونی","Roman Urdu":"Machar Colony","English":"Machar Colony"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"maripur","label":{"Urdu":"ماڑی پور","Roman Urdu":"Maripur","English":"Maripur"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"shershah","label":{"Urdu":"شیرشاہ","Roman Urdu":"SherShah","English":"SherShah"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"gabo_pat","label":{"Urdu":"گابو پٹ","Roman Urdu":"Gabo Pat","English":"Gabo Pat"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muzafarabad","label":{"Urdu":"مظفرآباد","Roman Urdu":"Muzafarabad","English":"Muzafarabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muslimabad","label":{"Urdu":"مسلم آباد","Roman Urdu":"Muslimabad","English":"Muslimabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"dawood_chowrangi","label":{"Urdu":"داوَد چورنگی","Roman Urdu":"Dawood Chowrangi","English":"Dawood Chowrangi"}},{"province":"sindh","city":"karachi","town":"landhi","name":"moinabad","label":{"Urdu":"معین آباد","Roman Urdu":"Moinabad","English":"Moinabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sharafi_goth","label":{"Urdu":"شرافی گوٹھ","Roman Urdu":"Sharafi Goth","English":"Sharafi Goth"}},{"province":"sindh","city":"karachi","town":"landhi","name":"bhutto_nagar","label":{"Urdu":"بھٹو نگر","Roman Urdu":"Bhutto Nagar","English":"Bhutto Nagar"}},{"province":"sindh","city":"karachi","town":"landhi","name":"khawaja_ajmeer_colony","label":{"Urdu":"خواجہ اجمیر کالونی","Roman Urdu":"Khawaja Ajmeer Colony","English":"Khawaja Ajmeer Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"landhi_uc","label":{"Urdu":"لانڈھی یوسی","Roman Urdu":"Landhi UC","English":"Landhi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"awami_colony","label":{"Urdu":"عوامی کالونی","Roman Urdu":"Awami Colony","English":"Awami Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"burmee_colony","label":{"Urdu":"برمی کالونی","Roman Urdu":"Burmee Colony","English":"Burmee Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"korangi_uc","label":{"Urdu":"کورنگی یوسی","Roman Urdu":"Korangi UC","English":"Korangi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sherabad","label":{"Urdu":"شیرآباد","Roman Urdu":"Sherabad","English":"Sherabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"rizvia_society","label":{"Urdu":"رضویہ سوسائٹی","Roman Urdu":"Rizvia Society","English":"Rizvia Society"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"firdous_colony","label":{"Urdu":"فردوس کالونی","Roman Urdu":"Firdous Colony","English":"Firdous Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"super_market","label":{"Urdu":"سپر مارکیٹ","Roman Urdu":"Super Market","English":"Super Market"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"dak_khana","label":{"Urdu":"دک کھانہ","Roman Urdu":"Dak Khana","English":"Dak Khana"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"qasimabad","label":{"Urdu":"قاسم آباد","Roman Urdu":"Qasimabad","English":"Qasimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"bandhani_colony","label":{"Urdu":"بندھانی کالونی","Roman Urdu":"Bandhani Colony","English":"Bandhani Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"sharifabad","label":{"Urdu":"شریف آباد","Roman Urdu":"Sharifabad","English":"Sharifabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"commercial_area","label":{"Urdu":"کمرشل ایریا","Roman Urdu":"Commercial Area","English":"Commercial Area"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"mujahid_colony","label":{"Urdu":"مجاہد کالونی","Roman Urdu":"Mujahid Colony","English":"Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"nazimabad","label":{"Urdu":"ناظم آباد","Roman Urdu":"Nazimabad","English":"Nazimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"abbasi_shaheed","label":{"Urdu":"عباسی شہید","Roman Urdu":"Abbasi Shaheed","English":"Abbasi Shaheed"}},{"province":"sindh","city":"karachi","town":"lyari","name":"agra_taj_colony","label":{"Urdu":"آگرہ تاج کالونی","Roman Urdu":"Agra Taj Colony","English":"Agra Taj Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"daryaabad","label":{"Urdu":"دریاآباد","Roman Urdu":"Daryaabad","English":"Daryaabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"nawabad","label":{"Urdu":"نواآباد","Roman Urdu":"Nawabad","English":"Nawabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"khada_memon_society","label":{"Urdu":"خدا- میمن- سوساَٹی","Roman Urdu":"Khada Memon Society","English":"Khada Memon Society"}},{"province":"sindh","city":"karachi","town":"lyari","name":"baghdadi","label":{"Urdu":"بغدادی","Roman Urdu":"Baghdadi","English":"Baghdadi"}},{"province":"sindh","city":"karachi","town":"lyari","name":"shah_baig_line","label":{"Urdu":"شاھ باغ لائن","Roman Urdu":"Shah Baig Line","English":"Shah Baig Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"bihar_colony","label":{"Urdu":"بہار کالونی","Roman Urdu":"Bihar Colony","English":"Bihar Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"ragiwara","label":{"Urdu":"راگی واڑا","Roman Urdu":"Ragiwara","English":"Ragiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"singo_line","label":{"Urdu":"سنگولائن","Roman Urdu":"Singo Line","English":"Singo Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"chakiwara","label":{"Urdu":"چاکی واڑا","Roman Urdu":"Chakiwara","English":"Chakiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"allama_iqbal_colony","label":{"Urdu":"علامہ اقبال کالونی","Roman Urdu":"Allama Iqbal Colony","English":"Allama Iqbal Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"model_colony","label":{"Urdu":"موڈل کالونی","Roman Urdu":"Model Colony","English":"Model Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"kala_board","label":{"Urdu":"کالا بورڈ","Roman Urdu":"Kala Board","English":"Kala Board"}},{"province":"sindh","city":"karachi","town":"malir","name":"saudabad","label":{"Urdu":"سعودآباد","Roman Urdu":"Saudabad","English":"Saudabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"khokhra_par","label":{"Urdu":"کھوکھرا پار","Roman Urdu":"Khokhra Par","English":"Khokhra Par"}},{"province":"sindh","city":"karachi","town":"malir","name":"jafar_e_tayyar","label":{"Urdu":"جعفر تیار","Roman Urdu":"Jafar-e-Tayyar","English":"Jafar-e-Tayyar"}},{"province":"sindh","city":"karachi","town":"malir","name":"gharibabad","label":{"Urdu":"غریب آباد","Roman Urdu":"Gharibabad","English":"Gharibabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"ghazi_brohi_goth","label":{"Urdu":"غازی بروہی گوٹھ","Roman Urdu":"Ghazi Brohi Goth","English":"Ghazi Brohi Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"kalyana","label":{"Urdu":"کالیانہ","Roman Urdu":"Kalyana","English":"Kalyana"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"sir_syed_colony","label":{"Urdu":"سر سید کالونی","Roman Urdu":"Sir Syed Colony","English":"Sir Syed Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"fatima_jinnah_colony","label":{"Urdu":"فاطمہ جناح کالونی","Roman Urdu":"Fatima Jinnah Colony","English":"Fatima Jinnah Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"godhra","label":{"Urdu":"گودھرا","Roman Urdu":"Godhra","English":"Godhra"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"abu_zar_ghaffari","label":{"Urdu":"ابو زر غفاری","Roman Urdu":"Abu Zar Ghaffari","English":"Abu Zar Ghaffari"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"hakim_ahsan","label":{"Urdu":"حاکم احسان","Roman Urdu":"Hakim Ahsan","English":"Hakim Ahsan"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"madina_colony","label":{"Urdu":"مدینہ کالونی","Roman Urdu":"Madina Colony","English":"Madina Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"faisal_colony","label":{"Urdu":"فیصل کالونی","Roman Urdu":"Faisal Colony","English":"Faisal Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khamiso_goth","label":{"Urdu":"خمیسو گوٹھ","Roman Urdu":"Khamiso Goth","English":"Khamiso Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"mustufa_colony","label":{"Urdu":"مصطفی کالونی","Roman Urdu":"Mustufa Colony","English":"Mustufa Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khawaja_ajmeer_nagri","label":{"Urdu":"خواجہ اجمیر نگری","Roman Urdu":"Khawaja Ajmeer Nagri","English":"Khawaja Ajmeer Nagri"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"gulshan_e_saeed","label":{"Urdu":"گلشن سعید","Roman Urdu":"Gulshan-e-Saeed","English":"Gulshan-e-Saeed"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"shah_nawaz_bhutto_colony","label":{"Urdu":"شاہ نواز بھٹو کالونی","Roman Urdu":"Shah Nawaz Bhutto Colony","English":"Shah Nawaz Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"paposh_nagar","label":{"Urdu":"پاپوش نگر","Roman Urdu":"Paposh Nagar","English":"Paposh Nagar"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"pahar_ganj","label":{"Urdu":"پہاڑ گنج","Roman Urdu":"Pahar Ganj","English":"Pahar Ganj"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"khandu_goth","label":{"Urdu":"کھنڑو گوٹھ","Roman Urdu":"Khandu Goth","English":"Khandu Goth"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"hyderi","label":{"Urdu":"حیدری","Roman Urdu":"Hyderi","English":"Hyderi"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"sakhi_hassan","label":{"Urdu":"سخی حسن","Roman Urdu":"Sakhi Hassan","English":"Sakhi Hassan"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"farooq_e_azam","label":{"Urdu":"فاروق اعظم","Roman Urdu":"Farooq-e-Azam","English":"Farooq-e-Azam"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"nusrat_bhutto_colony","label":{"Urdu":"نصرت بھٹو کالونی","Roman Urdu":"Nusrat Bhutto Colony","English":"Nusrat Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"shadman_town","label":{"Urdu":"شادمان ٹاوَن","Roman Urdu":"Shadman Town","English":"Shadman Town"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone","label":{"Urdu":"بفرزون","Roman Urdu":"Buffer Zone","English":"Buffer Zone"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone_ii","label":{"Urdu":"بفرزون 2","Roman Urdu":"Buffer Zone II","English":"Buffer Zone II"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mominabad","label":{"Urdu":"مومن آباد","Roman Urdu":"Mominabad","English":"Mominabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"haryana_colony","label":{"Urdu":"حریانہ کالونی","Roman Urdu":"Haryana Colony","English":"Haryana Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"hanifabad","label":{"Urdu":"حنیف آباد","Roman Urdu":"Hanifabad","English":"Hanifabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mohammad_nagar","label":{"Urdu":"محمد نگر","Roman Urdu":"Mohammad Nagar","English":"Mohammad Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"madina_colony_orangi","label":{"Urdu":"مدینہ کالونی اورنگی","Roman Urdu":"Madina Colony Orangi","English":"Madina Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghaziabad","label":{"Urdu":"غازی آباد","Roman Urdu":"Ghaziabad","English":"Ghaziabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"chisti_nagar","label":{"Urdu":"چشتی نگر","Roman Urdu":"Chisti Nagar","English":"Chisti Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"bilal_colony_orangi","label":{"Urdu":"بلال کالونی اورنگی","Roman Urdu":"Bilal Colony Orangi","English":"Bilal Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"iqbal_baloch_colony","label":{"Urdu":"اقبال بلوچ کالونی","Roman Urdu":"Iqbal Baloch Colony","English":"Iqbal Baloch Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghabool_town","label":{"Urdu":"گبول ٹاوَن","Roman Urdu":"Ghabool Town","English":"Ghabool Town"}},{"province":"sindh","city":"karachi","town":"orangi","name":"data_nagar","label":{"Urdu":"داتا نگر","Roman Urdu":"Data Nagar","English":"Data Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mujahidabad","label":{"Urdu":"مجاہد آباد","Roman Urdu":"Mujahidabad","English":"Mujahidabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"baloch_goth","label":{"Urdu":"بلوچ گوٹھ","Roman Urdu":"Baloch Goth","English":"Baloch Goth"}},{"province":"sindh","city":"karachi","town":"saddar","name":"old_haji_camp","label":{"Urdu":"پرانہ حاجی کیمپ","Roman Urdu":"Old Haji Camp","English":"Old Haji Camp"}},{"province":"sindh","city":"karachi","town":"saddar","name":"garden","label":{"Urdu":"گارڈن","Roman Urdu":"Garden","English":"Garden"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kharadar","label":{"Urdu":"کھارادر","Roman Urdu":"Kharadar","English":"Kharadar"}},{"province":"sindh","city":"karachi","town":"saddar","name":"city_railway_colony","label":{"Urdu":"سٹی ریلوے کالونی","Roman Urdu":"City Railway Colony","English":"City Railway Colony"}},{"province":"sindh","city":"karachi","town":"saddar","name":"nanak_wara","label":{"Urdu":"ناناک واڑا","Roman Urdu":"Nanak Wara","English":"Nanak Wara"}},{"province":"sindh","city":"karachi","town":"saddar","name":"gazdarabad","label":{"Urdu":"گزدرآباد","Roman Urdu":"Gazdarabad","English":"Gazdarabad"}},{"province":"sindh","city":"karachi","town":"saddar","name":"millat_nagar_islam_pura","label":{"Urdu":"ملت نگر اسلام پورا","Roman Urdu":"Millat Nagar/Islam Pura","English":"Millat Nagar/Islam Pura"}},{"province":"sindh","city":"karachi","town":"saddar","name":"saddar_uc","label":{"Urdu":"صدر یو سی","Roman Urdu":"Saddar UC","English":"Saddar UC"}},{"province":"sindh","city":"karachi","town":"saddar","name":"civil_line","label":{"Urdu":"سول لائن","Roman Urdu":"Civil Line","English":"Civil Line"}},{"province":"sindh","city":"karachi","town":"saddar","name":"clifton","label":{"Urdu":"کلفٹن","Roman Urdu":"Clifton","English":"Clifton"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kehkashan","label":{"Urdu":"کہکشان","Roman Urdu":"Kehkashan","English":"Kehkashan"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"natha_khan_goth","label":{"Urdu":"ناتھا خان گوٹھ","Roman Urdu":"Natha Khan Goth","English":"Natha Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"pak_sadat_colony","label":{"Urdu":"پاک صدر کالونی","Roman Urdu":"Pak Sadat Colony","English":"Pak Sadat Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"drigh_colony","label":{"Urdu":"ڈرگ کالونی","Roman Urdu":"Drigh Colony","English":"Drigh Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"raita_plot","label":{"Urdu":"رائتا پلاٹ","Roman Urdu":"Raita Plot","English":"Raita Plot"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"moria_khan_goth","label":{"Urdu":"موریا خان گوٹھ","Roman Urdu":"Moria Khan Goth","English":"Moria Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"rafa_e_aam_society","label":{"Urdu":"رفا عام سوسا ئٹی","Roman Urdu":"Rafa-e-Aam Society","English":"Rafa-e-Aam Society"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"al_falah_society","label":{"Urdu":"الفلاح سوسا ئٹی","Roman Urdu":"Al-Falah Society","English":"Al-Falah Society"}},{"province":"sindh","city":"karachi","town":"site","name":"pak_colony","label":{"Urdu":"پاک کالونی","Roman Urdu":"Pak Colony","English":"Pak Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"old_golimar","label":{"Urdu":"پرانہ گولی مار","Roman Urdu":"Old Golimar","English":"Old Golimar"}},{"province":"sindh","city":"karachi","town":"site","name":"jahanabad","label":{"Urdu":"جہان آباد","Roman Urdu":"Jahanabad","English":"Jahanabad"}},{"province":"sindh","city":"karachi","town":"site","name":"metrovil","label":{"Urdu":"میٹروویل","Roman Urdu":"Metrovil","English":"Metrovil"}},{"province":"sindh","city":"karachi","town":"site","name":"bhawani_chali","label":{"Urdu":"بہوانی چالی","Roman Urdu":"Bhawani Chali","English":"Bhawani Chali"}},{"province":"sindh","city":"karachi","town":"site","name":"frontier_colony","label":{"Urdu":"فرونٹر کالونی","Roman Urdu":"Frontier Colony","English":"Frontier Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"banaras_colony","label":{"Urdu":"بنارس کالونی","Roman Urdu":"Banaras Colony","English":"Banaras Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"qasba_colony","label":{"Urdu":"قصبہ کالونی","Roman Urdu":"Qasba Colony","English":"Qasba Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"islamia_colony","label":{"Urdu":"اسلامیہ کالونی","Roman Urdu":"Islamia Colony","English":"Islamia Colony"}},{"province":"na","city":"na","town":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","town":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"gender":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}],"vaccines":[{"instance":{"openmrs_code":"1570AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"bcg","label":{"Urdu":"بی سی جی","Roman Urdu":"BCG","English":"BCG"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv0","label":{"Urdu":"او پی وی 0","Roman Urdu":"OPV 0","English":"OPV 0"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv1","label":{"Urdu":"پی سی وی 1","Roman Urdu":"PCV 1","English":"PCV 1"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv1","label":{"Urdu":"او پی وی 1","Roman Urdu":"OPV 1","English":"OPV 1"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta1","label":{"Urdu":"پینٹا ویلنٹ 1","Roman Urdu":"Pentavalent 1","English":"Pentavalent 1"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv2","label":{"Urdu":"پی سی وی 2","Roman Urdu":"PCV 2","English":"PCV 2"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv2","label":{"Urdu":"او پی وی 2","Roman Urdu":"OPV 2","English":"OPV 2"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta2","label":{"Urdu":"پینٹا ویلنٹ 2","Roman Urdu":"Pentavalent 2","English":"Pentavalent 2"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv3","label":{"Urdu":"پی سی وی 3","Roman Urdu":"PCV 3","English":"PCV 3"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv3","label":{"Urdu":"او پی وی 3","Roman Urdu":"OPV 3","English":"OPV 3"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta3","label":{"Urdu":"پینٹا ویلنٹ 3","Roman Urdu":"Pentavalent 3","English":"Pentavalent 3"}},{"instance":{"openmrs_code":"82242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ipv","label":{"Urdu":"آئی پی وی","Roman Urdu":"IPV","English":"IPV"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles1","label":{"Urdu":"خسرہ 1","Roman Urdu":"Khasra 1","English":"Measles 1"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles2","label":{"Urdu":"خسرہ 2","Roman Urdu":"Khasra 2","English":"Measles 2"}}],"towns":[{"province":"sindh","city":"karachi","name":"korangi","label":{"Urdu":"کورنگی","Roman Urdu":"Korangi","English":"Korangi"}},{"province":"sindh","city":"karachi","name":"landhi","label":{"Urdu":"لانڈھی","Roman Urdu":"Landhi","English":"Landhi"}},{"province":"sindh","city":"karachi","name":"baldia","label":{"Urdu":"بلدیہ","Roman Urdu":"Baldia","English":"Baldia"}},{"province":"sindh","city":"karachi","name":"bin_qasim","label":{"Urdu":"بن قاسم","Roman Urdu":"Bin Qasim","English":"Bin Qasim"}},{"province":"sindh","city":"karachi","name":"gadap","label":{"Urdu":"گڈاپ","Roman Urdu":"Gadap","English":"Gadap"}},{"province":"sindh","city":"karachi","name":"gulberg","label":{"Urdu":"گلبرگ","Roman Urdu":"Gulberg","English":"Gulberg"}},{"province":"sindh","city":"karachi","name":"gulshan","label":{"Urdu":"گلشن","Roman Urdu":"Gulshan","English":"Gulshan"}},{"province":"sindh","city":"karachi","name":"jamshed","label":{"Urdu":"جمشید","Roman Urdu":"Jamshed","English":"Jamshed"}},{"province":"sindh","city":"karachi","name":"kiamari","label":{"Urdu":"کیماری","Roman Urdu":"Kiamari","English":"Kiamari"}},{"province":"sindh","city":"karachi","name":"liaquatabad","label":{"Urdu":"لیاقت آباد","Roman Urdu":"Liaquatabad","English":"Liaquatabad"}},{"province":"sindh","city":"karachi","name":"lyari","label":{"Urdu":"لیاری","Roman Urdu":"Lyari","English":"Lyari"}},{"province":"sindh","city":"karachi","name":"malir","label":{"Urdu":"ملیر","Roman Urdu":"Malir","English":"Malir"}},{"province":"sindh","city":"karachi","name":"new_karachi","label":{"Urdu":"نیو کراچی","Roman Urdu":"New Karachi","English":"New Karachi"}},{"province":"sindh","city":"karachi","name":"north_nazimabad","label":{"Urdu":"نارتھ ناظم آباد","Roman Urdu":"North Nazimabad","English":"North Nazimabad"}},{"province":"sindh","city":"karachi","name":"orangi","label":{"Urdu":"اورنگی","Roman Urdu":"Orangi","English":"Orangi"}},{"province":"sindh","city":"karachi","name":"saddar","label":{"Urdu":"صدر","Roman Urdu":"Saddar","English":"Saddar"}},{"province":"sindh","city":"karachi","name":"shah_faisal","label":{"Urdu":"شاہ فیصل","Roman Urdu":"Shah Faisal","English":"Shah Faisal"}},{"province":"sindh","city":"karachi","name":"site","label":{"Urdu":"سائٹ","Roman Urdu":"S.I.T.E.","English":"S.I.T.E."}},{"province":"na","city":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"cities":[{"province":"sindh","name":"karachi","label":{"Urdu":"کراچی","Roman Urdu":"Karachi","English":"Karachi"}},{"province":"punjab","name":"hafizabad","label":{"Urdu":"حافظ آباد","Roman Urdu":"Hafizabad","English":"Hafizabad"}},{"province":"punjab","name":"muzaffargarh","label":{"Urdu":"مظفر گڑھ","Roman Urdu":"Muzaffargarh","English":"Muzaffargarh"}},{"province":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Not Applicable","English":"Not Applicable"}}],"ethnicity":[{"instance":{"openmrs_code":"163215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"punjabi","label":{"Urdu":"پنجابی","Roman Urdu":"Punjabi","English":"Punjabi"}},{"instance":{"openmrs_code":"163216AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pushtuns","label":{"Urdu":"پشتون","Roman Urdu":"Pushtun","English":"Pushtun"}},{"instance":{"openmrs_code":"163217AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"sindhi","label":{"Urdu":"سندھی","Roman Urdu":"Sindhi","English":"Sindhi"}},{"instance":{"openmrs_code":"163218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"saraiki","label":{"Urdu":"سرائیکی","Roman Urdu":"Saraiki","English":"Saraiki"}},{"instance":{"openmrs_code":"163219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"muhajir","label":{"Urdu":"مہاجر","Roman Urdu":"Muhajir","English":"Muhajir"}},{"instance":{"openmrs_code":"163220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"balochi","label":{"Urdu":"بلوچی","Roman Urdu":"Balochi","English":"Balochi"}},{"instance":{"openmrs_code":"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}}],"yes_no":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},"instance":{"encounter_type":"Child Vaccination Enrollment"},"version":"201604080617","id_string":"child_vaccination_enrollment","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"instance":{"openmrs_entity_id":"Program Client ID","openmrs_entity":"person_identifier"},"type":"hidden","name":"existing_program_client_id"},{"type":"hidden","name":"provider_location_name"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}","Roman Urdu":"Shehr: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center ka naam: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"name":"client_reg_date","hint":{"Urdu":"بچے کو ویکسین لگنے کی تاریخ","English":"Date on which child was vaccinated","Roman Urdu":"Bachay ko vaccine lagnay ki tareekh"},"bind":{"jr:constraintMsg":{"Urdu":"بچے کی پروگرام میں اندراج کی تاریخ مستقبل کی نہیں ہوسکتی","English":"Child registration date cannot be in the future","Roman Urdu":"Bachay ki program mai andraaj ki tareekh mustaqbil ki nahi hosakti"},"required":"yes","constraint":".<=${today}"},"label":{"Urdu":"بچے کی پروگرام میں اندراج کی تاریخ","English":"Child Registration date","Roman Urdu":"Bachay ki Program mai andraj ki tareekh"},"instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"type":"date"},{"bind":{"required":"yes"},"type":"note","name":"program_client_id","label":{"Urdu":"کلائنٹ کی پروگرام آئی ڈی {existing_program_client_id}$","Roman Urdu":"Client ki program ID ${existing_program_client_id}","English":"Program Client ID ${existing_program_client_id}"}},{"bind":{"jr:constraintMsg":{"Urdu":"نمبر آٹھ ہندسوں پر مشتمل ہونا چاہئے","English":"Number should be 8 digits","Roman Urdu":"Number 8 hindason par mushtamil hona chahiye"},"required":"yes","constraint":"string-length(.) = 8"},"type":"integer","instance":{"openmrs_entity_id":"EPI Card Number","openmrs_entity":"person_attribute"},"name":"epi_card_number","label":{"Urdu":"کارڈ نمبر","English":"EPI Card Number","Roman Urdu":"EPI Card Number"}},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"required":"yes","constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"first_name","openmrs_entity":"person"},"name":"first_name","label":{"Urdu":"نام","English":"First Name","Roman Urdu":"Naam"}},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"required":"yes","constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"last_name","openmrs_entity":"person"},"name":"last_name","label":{"Urdu":"والد کا نام","English":"Last name","Roman Urdu":"Waalid ka naam"}},{"default":"yes","label":{"Urdu":"کیا تاریخ پیدائش معلوم ہے؟","Roman Urdu":"Kya tareekh-e-pedaaish maloom hai?","English":"Is birthdate known?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"member_birth_date_known"},{"bind":{"jr:constraintMsg":{"Urdu":"یہ تاریخ مستقبل کی نہیں ہو سکتی۔\nاندراج کے لیے بچے کی عمر پانچ سال سے کم ہونی چاہئے۔","Roman Urdu":"Ye tareekh mustaqbil ki nahi ho sakti.\nAndraaj ke liye bachay ki umar paanch saal se kam honi chahiye.","English":"This cannot be a date in the future.\nChild's age must be less than five years for enrollment."},"relevant":"selected(${member_birth_date_known}, 'yes')","constraint":".<=${today} and (int((${today} - ${member_birth_date}) div 365) < 5)"},"type":"date","name":"member_birth_date","label":{"Urdu":"تاریخ پیدائش","Roman Urdu":"Tareekh-e-pedaaish","English":"Birth date"}},{"bind":{"jr:constraintMsg":{"Urdu":"اندراج کے لیے بچے کی عمر پانچ سال سے کم ہونی چاہئے","Roman Urdu":"Andraaj ke liye bachay ki umar paanch saal se kam honi chahiye","English":"Child's age must be less than five years for enrollment"},"relevant":"selected(${member_birth_date_known}, 'no')","constraint":".<=60"},"type":"integer","name":"age","label":{"Urdu":"عمر (مہینوں میں)","Roman Urdu":"Umar (mahinon main)","English":"Age (months)"}},{"bind":{"calculate":"int((${today} - ${member_birth_date}) div 30.44)"},"type":"calculate","name":"calc_age"},{"bind":{"calculate":"date(${today} - int(${age} * 30.44))"},"type":"calculate","name":"calc_dob"},{"bind":{"calculate":"if(${member_birth_date_known}='yes', ${member_birth_date}, ${calc_dob})"},"type":"calculate","name":"calc_dob_confirm","instance":{"openmrs_entity_id":"birthdate","openmrs_entity":"person"}},{"bind":{"calculate":"if(${member_birth_date_known} = 'yes', '0', '1')"},"type":"calculate","name":"calc_dob_estimated","instance":{"openmrs_entity_id":"birthdate_estimated","openmrs_entity":"person"}},{"bind":{"calculate":"if(${member_birth_date_known}='yes', ${calc_age}, ${age})"},"type":"calculate","name":"calc_age_confirm","instance":{"openmrs_entity_id":"154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"type":"note","name":"member_birth_date_note","label":{"Urdu":"کلائنٹ کی تاریخ پیدائش:${calc_dob_confirm}","English":"Member Date of Birth: ${calc_dob_confirm}","Roman Urdu":"Member ki Tareekh-e-pedaaish: ${calc_dob_confirm}"}},{"type":"note","name":"note_age","label":{"Urdu":"عمر :{calc_age_confirm}$ مہینے","English":"Age: ${calc_age_confirm} months","Roman Urdu":"Umar: ${calc_age_confirm} mahinay"}},{"control":{"appearance":"minimal"},"name":"gender","bind":{"required":"yes"},"label":{"Urdu":"جنس","English":"Gender","Roman Urdu":"Jins"},"instance":{"openmrs_entity_id":"gender","openmrs_entity":"person"},"type":"select one","children":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"1593AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"mother_name","label":{"Urdu":"والدہ کا نام","English":"Mother's Name","Roman Urdu":"Waaldah ka naam"}},{"control":{"appearance":"minimal"},"name":"ethnicity","bind":{"required":"yes"},"label":{"Urdu":"قومیت","English":"Ethnicity","Roman Urdu":"Qomiat"},"instance":{"openmrs_entity_id":"163153AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"163215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"punjabi","label":{"Urdu":"پنجابی","Roman Urdu":"Punjabi","English":"Punjabi"}},{"instance":{"openmrs_code":"163216AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pushtuns","label":{"Urdu":"پشتون","Roman Urdu":"Pushtun","English":"Pushtun"}},{"instance":{"openmrs_code":"163217AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"sindhi","label":{"Urdu":"سندھی","Roman Urdu":"Sindhi","English":"Sindhi"}},{"instance":{"openmrs_code":"163218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"saraiki","label":{"Urdu":"سرائیکی","Roman Urdu":"Saraiki","English":"Saraiki"}},{"instance":{"openmrs_code":"163219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"muhajir","label":{"Urdu":"مہاجر","Roman Urdu":"Muhajir","English":"Muhajir"}},{"instance":{"openmrs_code":"163220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"balochi","label":{"Urdu":"بلوچی","Roman Urdu":"Balochi","English":"Balochi"}},{"instance":{"openmrs_code":"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}}]},{"bind":{"relevant":"selected(${ethnicity}, 'other')"},"type":"text","instance":{"openmrs_entity":"concept","openmrs_entity_id":"160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163330AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ethnicity_other","label":{"Urdu":"وضاحت کریں","Roman Urdu":"Wazaahat karain","English":"Please specify:"}},{"control":{"appearance":"minimal"},"name":"province","default":"${provider_province}","bind":{"required":"yes"},"label":{"Urdu":"صوبہ","Roman Urdu":"Suba","English":"Province"},"instance":{"openmrs_entity":"person_address","openmrs_entity_id":"stateProvince","openmrs_entity_parent":"usual_residence"},"type":"select one","children":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}]},{"control":{"appearance":"minimal"},"name":"city_village","choice_filter":"province=${province} or province='na'","default":"${provider_city}","bind":{"required":"yes"},"label":{"Urdu":"شہر","Roman Urdu":"Shehr","English":"City"},"itemset":"cities","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"cityVillage","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"town","choice_filter":"(province=${province} and city=${city_village} ) or city='na'","bind":{"required":"yes"},"label":{"Urdu":"ٹاٰئون/ قصبہ/ بستی","Roman Urdu":"Town / Qasbah / Basti","English":"Town"},"itemset":"towns","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"town","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"union_council","choice_filter":"(province=${province} and city=${city_village} and town=${town}) or town='na'","bind":{"required":"yes"},"label":{"Urdu":"یونین کونسل","Roman Urdu":"Union Council","English":"Union Council"},"itemset":"ucs","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"subTown","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"house","openmrs_entity_parent":"usual_residence"},"name":"house_number","label":{"Urdu":"گھر کا نمبر","Roman Urdu":"Ghar ka number","English":"House Number"}},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"street","openmrs_entity_parent":"usual_residence"},"name":"street","label":{"Urdu":"گلی/کالونی/محلہ","Roman Urdu":"Gali/Colony/Mohalla","English":"Street"}},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"landmark","openmrs_entity_parent":"usual_residence"},"name":"landmark","label":{"Urdu":"گھر کے قریب کوئی مشہور جگہ","Roman Urdu":"Ghar ke qareeb koi mashoor jagah","English":"Land Mark"}},{"bind":{"calculate":"jr:choice-name(${province}, '${province}')"},"type":"calculate","name":"provincename"},{"bind":{"calculate":"jr:choice-name(${city_village}, '${city_village}')"},"type":"calculate","name":"city_villagename"},{"bind":{"calculate":"jr:choice-name(${town}, '${town}')"},"type":"calculate","name":"townname"},{"bind":{"calculate":"jr:choice-name(${union_council}, '${union_council}')"},"type":"calculate","name":"union_councilname"},{"type":"note","name":"address","label":{"Urdu":"پتہ: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}","English":"Address: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}","Roman Urdu":"Pata: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}"}},{"instance":{"openmrs_entity_id":"163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"geopoint","name":"centre_gps","label":{"Urdu":"حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں","English":"Collect GPS coordinates of data entry location","Roman Urdu":"Hasil karda malomaat ki jaga ke GPS coordinates darj karain"}},{"control":{"appearance":"minimal"},"name":"child_was_suffering_from_a_disease_at_birth","bind":{"required":"yes"},"label":{"Urdu":"کیا بچہ پیدائش کے وقت کسی مرض میں مبتلا تھا؟","English":"Was the child suffering from a disease at birth?","Roman Urdu":"Kya bacha pedaaish ke waqt kissi marz mai mubtila tha?"},"instance":{"openmrs_entity_id":"159926AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"name":"reminders_approval","bind":{"required":"yes"},"label":{"Urdu":"کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟","English":"Are you willing to receive SMS reminders for your next visit?","Roman Urdu":"Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain?"},"instance":{"openmrs_entity_id":"163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03","English":"Phone number should be 11 digits in the following format: 03*********","Roman Urdu":"Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********"},"relevant":"${reminders_approval}='yes'","constraint":"regex(., '^03[0-9]{9}$')"},"type":"text","instance":{"openmrs_entity_id":"159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"contact_phone_number","label":{"Urdu":"موبائل نمبر:","English":"Mobile Number:","Roman Urdu":"Mobile number:"}},{"bind":{"calculate":"${calc_dob_confirm} + 42"},"type":"calculate","name":"six_weeks"},{"bind":{"calculate":"${calc_dob_confirm} + 70"},"type":"calculate","name":"ten_weeks"},{"bind":{"calculate":"${calc_dob_confirm} + 98"},"type":"calculate","name":"forteen_weeks"},{"bind":{"calculate":"${calc_dob_confirm} + 245"},"type":"calculate","name":"nine_months"},{"bind":{"calculate":"${calc_dob_confirm} + 458"},"type":"calculate","name":"fifteen_months"},{"control":{"appearance":"minimal"},"name":"vaccines","label":{"Urdu":"پچھلی تاریخ جب کسی اور سینٹر پر ٹیکے لگواِے گیے یا قطرے پلائے گئے","Roman Urdu":"Pichli tareekh jab kissi aur center par teekay lagwaye gaye ya katray pilaey gaye","English":"Retro vaccines"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply","children":[{"instance":{"openmrs_code":"1570AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"bcg","label":{"Urdu":"بی سی جی","Roman Urdu":"BCG","English":"BCG"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv0","label":{"Urdu":"او پی وی 0","Roman Urdu":"OPV 0","English":"OPV 0"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv1","label":{"Urdu":"پی سی وی 1","Roman Urdu":"PCV 1","English":"PCV 1"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv1","label":{"Urdu":"او پی وی 1","Roman Urdu":"OPV 1","English":"OPV 1"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta1","label":{"Urdu":"پینٹا ویلنٹ 1","Roman Urdu":"Pentavalent 1","English":"Pentavalent 1"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv2","label":{"Urdu":"پی سی وی 2","Roman Urdu":"PCV 2","English":"PCV 2"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv2","label":{"Urdu":"او پی وی 2","Roman Urdu":"OPV 2","English":"OPV 2"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta2","label":{"Urdu":"پینٹا ویلنٹ 2","Roman Urdu":"Pentavalent 2","English":"Pentavalent 2"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv3","label":{"Urdu":"پی سی وی 3","Roman Urdu":"PCV 3","English":"PCV 3"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv3","label":{"Urdu":"او پی وی 3","Roman Urdu":"OPV 3","English":"OPV 3"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta3","label":{"Urdu":"پینٹا ویلنٹ 3","Roman Urdu":"Pentavalent 3","English":"Pentavalent 3"}},{"instance":{"openmrs_code":"82242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ipv","label":{"Urdu":"آئی پی وی","Roman Urdu":"IPV","English":"IPV"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles1","label":{"Urdu":"خسرہ 1","Roman Urdu":"Khasra 1","English":"Measles 1"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles2","label":{"Urdu":"خسرہ 2","Roman Urdu":"Khasra 2","English":"Measles 2"}}]},{"bind":{"relevant":"${vaccines} != ''"},"type":"group","children":[{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'bcg')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"bcg_retro","label":{"Urdu":"بی سی جی","Roman Urdu":"BCG","English":"BCG"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv0')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv0_retro","label":{"Urdu":"او پی وی 0","Roman Urdu":"OPV 0","English":"OPV 0"}},{"bind":{"relevant":"selected(${vaccines}, 'opv0')","calculate":"0"},"type":"calculate","name":"opv0_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv1')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv1_retro","label":{"Urdu":"پی سی وی 1","Roman Urdu":"PCV1","English":"PCV1"}},{"bind":{"relevant":"selected(${vaccines}, 'pcv1')","calculate":"1"},"type":"calculate","name":"pcv1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv1')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv1_retro","label":{"Urdu":"او پی وی1","Roman Urdu":"OPV 1","English":"OPV 1"}},{"bind":{"relevant":"selected(${vaccines}, 'opv1')","calculate":"1"},"type":"calculate","name":"opv1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta1')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta1_retro","label":{"Urdu":"پینٹا ویلنٹ 1","Roman Urdu":"Pentavalent 1","English":"Pentavalent 1"}},{"bind":{"relevant":"selected(${vaccines}, 'penta1')","calculate":"1"},"type":"calculate","name":"penta1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv2')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv2_retro","label":{"Urdu":"پی سی وی 2","Roman Urdu":"PCV2","English":"PCV2"}},{"bind":{"relevant":"selected(${vaccines}, 'pcv2')","calculate":"2"},"type":"calculate","name":"pcv2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv2')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv2_retro","label":{"Urdu":"او پی وی 2","Roman Urdu":"OPV 2","English":"OPV 2"}},{"bind":{"relevant":"selected(${vaccines}, 'opv2')","calculate":"2"},"type":"calculate","name":"opv2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta2')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta2_retro","label":{"Urdu":"پینٹا ویلنٹ 2","Roman Urdu":"Pentavalent 2","English":"Pentavalent 2"}},{"bind":{"relevant":"selected(${vaccines}, 'penta2')","calculate":"2"},"type":"calculate","name":"penta2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv3')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv3_retro","label":{"Urdu":"پی سی وی 3","Roman Urdu":"PCV3","English":"PCV3"}},{"bind":{"relevant":"selected(${vaccines}, 'pcv3')","calculate":"3"},"type":"calculate","name":"pcv3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv3')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv3_retro","label":{"Urdu":"او پی وی3","Roman Urdu":"OPV 3","English":"OPV 3"}},{"bind":{"relevant":"selected(${vaccines}, 'opv3')","calculate":"3"},"type":"calculate","name":"opv3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta3')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta3_retro","label":{"Urdu":"پینٹا ویلنٹ 3","Roman Urdu":"Pentavalent 3","English":"Pentavalent 3"}},{"bind":{"relevant":"selected(${vaccines}, 'penta3')","calculate":"3"},"type":"calculate","name":"penta3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'ipv')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ipv_retro","label":{"Urdu":"آئی پی وی","Roman Urdu":"IPV","English":"IPV"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'measles1')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles1_retro","label":{"Urdu":"خسرہ 1","Roman Urdu":"Measles 1","English":"Measles 1"}},{"bind":{"relevant":"selected(${vaccines}, 'measles1')","calculate":"1"},"type":"calculate","name":"measles1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'measles2')","constraint":".>= ${calc_dob_confirm} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles2_retro","label":{"Urdu":"خسرہ 2","Roman Urdu":"Measles2","English":"Measles2"}},{"bind":{"relevant":"selected(${vaccines}, 'measles2')","calculate":"2"},"type":"calculate","name":"measles2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}}],"name":"vaccines_group"},{"name":"vaccines_2","choice_filter":"name = if(selected(${vaccines}, 'bcg'), '', 'bcg') or \nname = if(selected(${vaccines}, 'opv0'), '', 'opv0') or \nname = if(selected(${vaccines}, 'penta1'), '', 'penta1') or \nname = if(selected(${vaccines}, 'opv1'), '', 'opv1') or \nname = if(selected(${vaccines}, 'pcv1'), '', 'pcv1') or \nname = if(selected(${vaccines}, 'penta2'), '', 'penta2') or \nname = if(selected(${vaccines}, 'opv2'), '', 'opv2') or \nname = if(selected(${vaccines}, 'pcv2'), '', 'pcv2') or \nname = if(selected(${vaccines}, 'penta3'), '', 'penta3') or \nname = if(selected(${vaccines}, 'pcv3'), '', 'pcv3') or \nname = if(selected(${vaccines}, 'opv3'), '', 'opv3') or \nname = if(selected(${vaccines}, 'ipv'), '', 'ipv') or \nname = if(selected(${vaccines}, 'measles1'), '', 'measles1') or \nname = if(selected(${vaccines}, 'measles2'), '', 'measles2')","bind":{"required":"yes"},"label":{"Urdu":"آج کون کون سی ویکسین دی گئی ہیں؟","Roman Urdu":"Aaj kon kon si vaccine di gai hain?","English":"Vaccines administered today"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"calculate":"if(selected(${vaccines_2}, 'bcg'),${client_reg_date},'')"},"type":"calculate","name":"bcg","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv0'),${client_reg_date},'')"},"type":"calculate","name":"opv0","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv0')","calculate":"0"},"type":"calculate","name":"opv0_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv1'),${client_reg_date},'')"},"type":"calculate","name":"pcv1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv1')","calculate":"1"},"type":"calculate","name":"pcv1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv1'),${client_reg_date},'')"},"type":"calculate","name":"opv1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv1')","calculate":"1"},"type":"calculate","name":"opv1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta1'),${client_reg_date},'')"},"type":"calculate","name":"penta1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta1')","calculate":"1"},"type":"calculate","name":"penta1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv2'),${client_reg_date},'')"},"type":"calculate","name":"pcv2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv2')","calculate":"2"},"type":"calculate","name":"pcv2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv2'),${client_reg_date},'')"},"type":"calculate","name":"opv2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv2')","calculate":"2"},"type":"calculate","name":"opv2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta2'),${client_reg_date},'')"},"type":"calculate","name":"penta2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta2')","calculate":"2"},"type":"calculate","name":"penta2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv3'),${client_reg_date},'')"},"type":"calculate","name":"pcv3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv3')","calculate":"3"},"type":"calculate","name":"pcv3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv3'),${client_reg_date},'')"},"type":"calculate","name":"opv3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv3')","calculate":"3"},"type":"calculate","name":"opv3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta3'),${client_reg_date},'')"},"type":"calculate","name":"penta3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta3')","calculate":"3"},"type":"calculate","name":"penta3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines}, 'ipv')","calculate":"if(selected(${vaccines_2}, 'ipv'),${client_reg_date},'')"},"type":"calculate","name":"ipv","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'measles1'),${client_reg_date},'')"},"type":"calculate","name":"measles1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'measles1')","calculate":"1"},"type":"calculate","name":"measles1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'measles2'),${client_reg_date},'')"},"type":"calculate","name":"measles2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'measles2')","calculate":"2"},"type":"calculate","name":"measles2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form.xml b/opensrp-core/src/test/resources/form/child_enrollment/form.xml deleted file mode 100644 index f2bf538694..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form.xml +++ /dev/null @@ -1,1699 +0,0 @@ -
- - -

بچّوں کا انرولمنٹ رجسٹر برائے ٹیکاجات - Child Enrollment Vaccination Register

-
-
- - کیا تاریخ پیدائش معلوم ہے؟ - Is birthdate known? - - Kya tareekh-e-pedaaish maloom hai? -
- - -
-
-
-
- - کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ - Are you willing to receive SMS reminders for your next visit? - - Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? - * -
- - -
-
-
- - - - - - - - - - - - - -
-
-
- - آج کون کون سی ویکسین دی گئی ہیں؟ - Vaccines administered today - - Aaj kon kon si vaccine di gai hain? - * -
- - - بی سی جی - BCG - - BCG - او پی وی 0 - OPV 0 - - OPV 0 - پی سی وی 1 - PCV 1 - - PCV 1 - او پی وی 1 - OPV 1 - - OPV 1 - پینٹا ویلنٹ 1 - Pentavalent 1 - - Pentavalent 1 - پی سی وی 2 - PCV 2 - - PCV 2 - او پی وی 2 - OPV 2 - - OPV 2 - پینٹا ویلنٹ 2 - Pentavalent 2 - - Pentavalent 2 - پی سی وی 3 - PCV 3 - - PCV 3 - او پی وی 3 - OPV 3 - - OPV 3 - پینٹا ویلنٹ 3 - Pentavalent 3 - - Pentavalent 3 - آئی پی وی - IPV - - IPV - خسرہ 1 - Measles 1 - - Khasra 1 - خسرہ 2 - Measles 2 - - Khasra 2 -
-
-
- -
diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form_definition.json b/opensrp-core/src/test/resources/form/child_enrollment/form_definition.json deleted file mode 100644 index 1ce99a2b64..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form_definition.json +++ /dev/null @@ -1,346 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkchild", - "default_bind_path" : "/model/instance/Child_Vaccination_Enrollment/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_province", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Child_Vaccination_Enrollment/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Child_Vaccination_Enrollment/start" - }, { - "name" : "end", - "bind" : "/model/instance/Child_Vaccination_Enrollment/end" - }, { - "name" : "today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Child_Vaccination_Enrollment/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Child_Vaccination_Enrollment/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Child_Vaccination_Enrollment/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Child_Vaccination_Enrollment/phonenumber" - }, { - "name" : "client_reg_date", - "bind" : "/model/instance/Child_Vaccination_Enrollment/client_reg_date" - }, { - "name" : "program_client_id", - "bind" : "/model/instance/Child_Vaccination_Enrollment/program_client_id" - }, { - "name" : "epi_card_number", - "bind" : "/model/instance/Child_Vaccination_Enrollment/epi_card_number" - }, { - "name" : "first_name", - "bind" : "/model/instance/Child_Vaccination_Enrollment/first_name" - }, { - "name" : "last_name", - "bind" : "/model/instance/Child_Vaccination_Enrollment/last_name" - }, { - "name" : "birth_date_known", - "bind" : "/model/instance/Child_Vaccination_Enrollment/member_birth_date_known" - }, { - "name" : "birth_date", - "bind" : "/model/instance/Child_Vaccination_Enrollment/member_birth_date" - }, { - "name" : "age", - "bind" : "/model/instance/Child_Vaccination_Enrollment/age" - }, { - "name" : "calc_age", - "bind" : "/model/instance/Child_Vaccination_Enrollment/calc_age" - }, { - "name" : "calc_dob", - "bind" : "/model/instance/Child_Vaccination_Enrollment/calc_dob" - }, { - "name" : "dob", - "bind" : "/model/instance/Child_Vaccination_Enrollment/calc_dob_confirm" - }, { - "name" : "calc_dob_estimated", - "bind" : "/model/instance/Child_Vaccination_Enrollment/calc_dob_estimated" - }, { - "name" : "calc_age_confirm", - "bind" : "/model/instance/Child_Vaccination_Enrollment/calc_age_confirm" - }, { - "name" : "gender", - "bind" : "/model/instance/Child_Vaccination_Enrollment/gender" - }, { - "name" : "mother_name", - "bind" : "/model/instance/Child_Vaccination_Enrollment/mother_name" - }, { - "name" : "ethnicity", - "bind" : "/model/instance/Child_Vaccination_Enrollment/ethnicity" - }, { - "name" : "ethnicity_other", - "bind" : "/model/instance/Child_Vaccination_Enrollment/ethnicity_other" - }, { - "name" : "province", - "bind" : "/model/instance/Child_Vaccination_Enrollment/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Child_Vaccination_Enrollment/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Child_Vaccination_Enrollment/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Child_Vaccination_Enrollment/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Child_Vaccination_Enrollment/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Child_Vaccination_Enrollment/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Child_Vaccination_Enrollment/landmark" - }, { - "name" : "provincename", - "bind" : "/model/instance/Child_Vaccination_Enrollment/provincename" - }, { - "name" : "city_villagename", - "bind" : "/model/instance/Child_Vaccination_Enrollment/city_villagename" - }, { - "name" : "townname", - "bind" : "/model/instance/Child_Vaccination_Enrollment/townname" - }, { - "name" : "union_councilname", - "bind" : "/model/instance/Child_Vaccination_Enrollment/union_councilname" - }, { - "name" : "address", - "bind" : "/model/instance/Child_Vaccination_Enrollment/address" - }, { - "name" : "centre_gps", - "bind" : "/model/instance/Child_Vaccination_Enrollment/centre_gps" - }, { - "name" : "child_was_suffering_from_a_disease_at_birth", - "bind" : "/model/instance/Child_Vaccination_Enrollment/child_was_suffering_from_a_disease_at_birth" - }, { - "name" : "reminders_approval", - "bind" : "/model/instance/Child_Vaccination_Enrollment/reminders_approval" - }, { - "name" : "contact_phone_number", - "bind" : "/model/instance/Child_Vaccination_Enrollment/contact_phone_number" - }, { - "name" : "six_weeks", - "bind" : "/model/instance/Child_Vaccination_Enrollment/six_weeks" - }, { - "name" : "ten_weeks", - "bind" : "/model/instance/Child_Vaccination_Enrollment/ten_weeks" - }, { - "name" : "forteen_weeks", - "bind" : "/model/instance/Child_Vaccination_Enrollment/forteen_weeks" - }, { - "name" : "nine_months", - "bind" : "/model/instance/Child_Vaccination_Enrollment/nine_months" - }, { - "name" : "fifteen_months", - "bind" : "/model/instance/Child_Vaccination_Enrollment/fifteen_months" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines" - }, { - "name" : "bcg_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/bcg_retro" - }, { - "name" : "opv0_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv0_retro" - }, { - "name" : "opv0_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv0_dose" - }, { - "name" : "pcv1_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv1_retro" - }, { - "name" : "pcv1_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv1_dose" - }, { - "name" : "opv1_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv1_retro" - }, { - "name" : "opv1_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv1_dose" - }, { - "name" : "penta1_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta1_retro" - }, { - "name" : "penta1_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta1_dose" - }, { - "name" : "pcv2_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv2_retro" - }, { - "name" : "pcv2_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv2_dose" - }, { - "name" : "opv2_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv2_retro" - }, { - "name" : "opv2_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv2_dose" - }, { - "name" : "penta2_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta2_retro" - }, { - "name" : "penta2_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta2_dose" - }, { - "name" : "pcv3_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv3_retro" - }, { - "name" : "pcv3_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/pcv3_dose" - }, { - "name" : "opv3_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv3_retro" - }, { - "name" : "opv3_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/opv3_dose" - }, { - "name" : "penta3_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta3_retro" - }, { - "name" : "penta3_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/penta3_dose" - }, { - "name" : "ipv_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/ipv_retro" - }, { - "name" : "measles1_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/measles1_retro" - }, { - "name" : "measles1_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/measles1_dose" - }, { - "name" : "measles2_retro", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/measles2_retro" - }, { - "name" : "measles2_dose", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_group/measles2_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Child_Vaccination_Enrollment/vaccines_2" - }, { - "name" : "bcg", - "bind" : "/model/instance/Child_Vaccination_Enrollment/bcg" - }, { - "name" : "opv0", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv0" - }, { - "name" : "opv0_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv0_dose_today" - }, { - "name" : "pcv1", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv1" - }, { - "name" : "pcv1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv1_dose_today" - }, { - "name" : "opv1", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv1" - }, { - "name" : "opv1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv1_dose_today" - }, { - "name" : "penta1", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta1" - }, { - "name" : "penta1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta1_dose_today" - }, { - "name" : "pcv2", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv2" - }, { - "name" : "pcv2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv2_dose_today" - }, { - "name" : "opv2", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv2" - }, { - "name" : "opv2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv2_dose_today" - }, { - "name" : "penta2", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta2" - }, { - "name" : "penta2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta2_dose_today" - }, { - "name" : "pcv3", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv3" - }, { - "name" : "pcv3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/pcv3_dose_today" - }, { - "name" : "opv3", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv3" - }, { - "name" : "opv3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/opv3_dose_today" - }, { - "name" : "penta3", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta3" - }, { - "name" : "penta3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/penta3_dose_today" - }, { - "name" : "ipv", - "bind" : "/model/instance/Child_Vaccination_Enrollment/ipv" - }, { - "name" : "measles1", - "bind" : "/model/instance/Child_Vaccination_Enrollment/measles1" - }, { - "name" : "measles1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/measles1_dose_today" - }, { - "name" : "measles2", - "bind" : "/model/instance/Child_Vaccination_Enrollment/measles2" - }, { - "name" : "measles2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Enrollment/measles2_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Child_Vaccination_Enrollment/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form_submission1.json b/opensrp-core/src/test/resources/form/child_enrollment/form_submission1.json deleted file mode 100644 index bb4e03776f..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form_submission1.json +++ /dev/null @@ -1,427 +0,0 @@ -{ - "_id": "ff5311680dfc931b443c435e1703d8a8", - "_rev": "1-f0e0db153894af4d10be9b0217ac8c68", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "bb9a9683-018a-41b7-9dc6-af2fa88aba12", - "formName": "child_enrollment", - "entityId": "7976dc69-d749-4ec7-82ce-bda37f466f59", - "clientVersion": 1447133829039, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "pkchild", - "default_bind_path": "/model/instance/Child_Enrollment_Vaccination_Register", - "fields": [ - { - "name": "id", - "value": "7976dc69-d749-4ec7-82ce-bda37f466f59", - "source": "vaccine_child.id" - }, - { - "name": "provider_uc", - "value": "korangi", - "source": "vaccine_child.provider_uc" - }, - { - "name": "provider_town", - "value": "korangi", - "source": "vaccine_child.provider_town" - }, - { - "name": "provider_city", - "value": "karachi", - "source": "vaccine_child.provider_city" - }, - { - "name": "provider_province", - "value": "sindh", - "source": "vaccine_child.provider_province" - }, - { - "name": "existing_location", - "source": "vaccine_child.existing_location" - }, - { - "name": "location_name", - "source": "vaccine_child.location_name" - }, - { - "name": "provider_location_note", - "source": "vaccine_child.provider_location_note" - }, - { - "name": "child_reg_date", - "value": "2015-11-10", - "source": "vaccine_child.child_reg_date" - }, - { - "name": "existing_program_client_id", - "value": "0149-5", - "source": "vaccine_child.existing_program_client_id" - }, - { - "name": "epi_card_number", - "value": "12345", - "source": "vaccine_child.epi_card_number" - }, - { - "name": "first_name", - "value": "syed saad", - "source": "vaccine_child.first_name" - }, - { - "name": "last_name", - "value": "dddd", - "source": "vaccine_child.last_name" - }, - { - "name": "child_birth_date_known", - "value": "yes", - "source": "vaccine_child.child_birth_date_known" - }, - { - "name": "dob", - "value": "2015-11-10", - "source": "vaccine_child.child_birth_date" - }, - { - "name": "age", - "source": "vaccine_child.age" - }, - { - "name": "child_age", - "value": "0", - "source": "vaccine_child.child_age" - }, - { - "name": "child_dob", - "value": "2015-10-10", - "source": "vaccine_child.child_dob" - }, - { - "name": "chid_dob_confirm", - "value": "2015-10-10", - "source": "vaccine_child.chid_dob_confirm" - }, - { - "name": "child_dob_estimated", - "value": "0", - "source": "vaccine_child.child_dob_estimated" - }, - { - "name": "child_birth_date_note", - "source": "vaccine_child.child_birth_date_note" - }, - { - "name": "gender", - "value": "male", - "source": "vaccine_child.gender" - }, - { - "name": "father_name", - "value": "shamsher", - "source": "vaccine_child.father_name" - }, - { - "name": "mother_name", - "value": "ghbn", - "source": "vaccine_child.mother_name" - }, - { - "name": "ethnicity", - "value": "hhggg", - "source": "vaccine_child.ethnicity" - }, - { - "name": "province", - "value": "sindh", - "source": "vaccine_child.province" - }, - { - "name": "city_village", - "source": "vaccine_child.city_village" - }, - { - "name": "town", - "source": "vaccine_child.town" - }, - { - "name": "union_council", - "source": "vaccine_child.union_council" - }, - { - "name": "house_number", - "value": "152", - "source": "vaccine_child.house_number" - }, - { - "name": "street", - "value": "uhhh", - "source": "vaccine_child.street" - }, - { - "name": "landmark", - "source": "vaccine_child.landmark" - }, - { - "name": "center_gps", - "value": "24.8637 67.0757 0 30", - "source": "vaccine_child.center_gps" - }, - { - "name": "vaccines", - "source": "vaccine_child.vaccines" - }, - { - "name": "bcg", - "source": "vaccine_child.bcg" - }, - { - "name": "opv_0_retro", - "source": "vaccine_child.opv_0_retro" - }, - { - "name": "opv_0_dose", - "value": "0", - "source": "vaccine_child.opv_0_dose" - }, - { - "name": "pcv_1_retro", - "source": "vaccine_child.pcv_1_retro" - }, - { - "name": "pcv_1_dose", - "value": "1", - "source": "vaccine_child.pcv_1_dose" - }, - { - "name": "opv_1_retro", - "source": "vaccine_child.opv_1_retro" - }, - { - "name": "opv_1_dose", - "value": "1", - "source": "vaccine_child.opv_1_dose" - }, - { - "name": "pentavalent_1_retro", - "source": "vaccine_child.pentavalent_1_retro" - }, - { - "name": "pentavalent_1_dose", - "value": "1", - "source": "vaccine_child.pentavalent_1_dose" - }, - { - "name": "pcv_2_retro", - "source": "vaccine_child.pcv_2_retro" - }, - { - "name": "pcv_2_dose", - "value": "2", - "source": "vaccine_child.pcv_2_dose" - }, - { - "name": "opv_2_retro", - "source": "vaccine_child.opv_2_retro" - }, - { - "name": "opv_2_dose", - "value": "2", - "source": "vaccine_child.opv_2_dose" - }, - { - "name": "pentavalent_2_retro", - "source": "vaccine_child.pentavalent_2_retro" - }, - { - "name": "pentavalent_2_dose", - "value": "2", - "source": "vaccine_child.pentavalent_2_dose" - }, - { - "name": "pcv_3_retro", - "source": "vaccine_child.pcv_3_retro" - }, - { - "name": "pcv_3_dose", - "value": "3", - "source": "vaccine_child.pcv_3_dose" - }, - { - "name": "opv_3_retro", - "source": "vaccine_child.opv_3_retro" - }, - { - "name": "opv_3_dose", - "value": "3", - "source": "vaccine_child.opv_3_dose" - }, - { - "name": "pentavalent_3_retro", - "source": "vaccine_child.pentavalent_3_retro" - }, - { - "name": "pentavalent_3_dose", - "value": "3", - "source": "vaccine_child.pentavalent_3_dose" - }, - { - "name": "measles_1_retro", - "source": "vaccine_child.measles_1_retro" - }, - { - "name": "measles_1_dose", - "value": "1", - "source": "vaccine_child.measles_1_dose" - }, - { - "name": "measles_2_retro", - "source": "vaccine_child.measles_2_retro" - }, - { - "name": "measles_2_dose", - "value": "2", - "source": "vaccine_child.measles_2_dose" - }, - { - "name": "vaccines_2", - "value": "opv_0 pcv_1", - "source": "vaccine_child.vaccines_2" - }, - { - "name": "child_was_suffering_from_a_disease_at_birth", - "value": "no", - "source": "vaccine_child.child_was_suffering_from_a_disease_at_birth" - }, - { - "name": "reminders_approval", - "value": "no", - "source": "vaccine_child.reminders_approval" - }, - { - "name": "contact_phone_number", - "source": "vaccine_child.contact_phone_number" - }, - { - "name": "bcg_today", - "source": "vaccine_child.bcg_today" - }, - { - "name": "opv_0", - "value": "2015-11-10", - "source": "vaccine_child.opv_0" - }, - { - "name": "opv_0_dose_today", - "value": "0", - "source": "vaccine_child.opv_0_dose_today" - }, - { - "name": "pcv_1", - "value": "2015-11-10", - "source": "vaccine_child.pcv_1" - }, - { - "name": "pcv_1_dose_today", - "value": "1", - "source": "vaccine_child.pcv_1_dose_today" - }, - { - "name": "opv_1", - "source": "vaccine_child.opv_1" - }, - { - "name": "opv_1_dose_today", - "value": "1", - "source": "vaccine_child.opv_1_dose_today" - }, - { - "name": "pentavalent_1", - "source": "vaccine_child.pentavalent_1" - }, - { - "name": "pentavalent_1_dose_today", - "value": "1", - "source": "vaccine_child.pentavalent_1_dose_today" - }, - { - "name": "pcv_2", - "source": "vaccine_child.pcv_2" - }, - { - "name": "pcv_2_dose_today", - "value": "2", - "source": "vaccine_child.pcv_2_dose_today" - }, - { - "name": "opv_2", - "source": "vaccine_child.opv_2" - }, - { - "name": "opv_2_dose_today", - "value": "2", - "source": "vaccine_child.opv_2_dose_today" - }, - { - "name": "pentavalent_2", - "source": "vaccine_child.pentavalent_2" - }, - { - "name": "pentavalent_2_dose_today", - "value": "2", - "source": "vaccine_child.pentavalent_2_dose_today" - }, - { - "name": "pcv_3", - "source": "vaccine_child.pcv_3" - }, - { - "name": "pcv_3_dose_today", - "value": "3", - "source": "vaccine_child.pcv_3_dose_today" - }, - { - "name": "opv_3", - "source": "vaccine_child.opv_3" - }, - { - "name": "opv_3_dose_today", - "value": "3", - "source": "vaccine_child.opv_3_dose_today" - }, - { - "name": "pentavalent_3", - "source": "vaccine_child.pentavalent_3" - }, - { - "name": "pentavalent_3_dose_today", - "value": "3", - "source": "vaccine_child.pentavalent_3_dose_today" - }, - { - "name": "measles_1", - "source": "vaccine_child.measles_1" - }, - { - "name": "measles_1_dose_today", - "value": "1", - "source": "vaccine_child.measles_1_dose_today" - }, - { - "name": "measles_2", - "source": "vaccine_child.measles_2" - }, - { - "name": "measles_2_dose_today", - "value": "2", - "source": "vaccine_child.measles_2_dose_today" - } - ] - } - }, - "serverVersion": 1447133792547 -} - diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form_submission2.json b/opensrp-core/src/test/resources/form/child_enrollment/form_submission2.json deleted file mode 100644 index f4bd30636a..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form_submission2.json +++ /dev/null @@ -1,428 +0,0 @@ -{ - "_id": "ff5311680dfc931b443c435e1703d8a8", - "_rev": "1-f0e0db153894af4d10be9b0217ac8c68", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "bb9a9683-018a-41b7-9dc6-af2fa88aba12", - "formName": "child_enrollment", - "entityId": "7976dc69-d749-4ec7-82ce-bda37f466f59", - "clientVersion": 1447133829039, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "pkchild", - "default_bind_path": "/model/instance/Child_Enrollment_Vaccination_Register", - "fields": [ - { - "name": "id", - "value": "7976dc69-d749-4ec7-82ce-bda37f466f59", - "source": "vaccine_child.id" - }, - { - "name": "provider_uc", - "value": "korangi", - "source": "vaccine_child.provider_uc" - }, - { - "name": "provider_town", - "value": "korangi", - "source": "vaccine_child.provider_town" - }, - { - "name": "provider_city", - "value": "karachi", - "source": "vaccine_child.provider_city" - }, - { - "name": "provider_province", - "value": "sindh", - "source": "vaccine_child.provider_province" - }, - { - "name": "existing_location", - "source": "vaccine_child.existing_location" - }, - { - "name": "location_name", - "source": "vaccine_child.location_name" - }, - { - "name": "provider_location_note", - "source": "vaccine_child.provider_location_note" - }, - { - "name": "child_reg_date", - "value": "2015-11-10", - "source": "vaccine_child.child_reg_date" - }, - { - "name": "existing_program_client_id", - "value": "0149-5", - "source": "vaccine_child.existing_program_client_id" - }, - { - "name": "epi_card_number", - "value": "12345", - "source": "vaccine_child.epi_card_number" - }, - { - "name": "first_name", - "value": "syed saad", - "source": "vaccine_child.first_name" - }, - { - "name": "last_name", - "value": "dddd", - "source": "vaccine_child.last_name" - }, - { - "name": "child_birth_date_known", - "value": "yes", - "source": "vaccine_child.child_birth_date_known" - }, - { - "name": "dob", - "value": "2015-11-10", - "source": "vaccine_child.child_birth_date" - }, - { - "name": "age", - "source": "vaccine_child.age" - }, - { - "name": "child_age", - "value": "0", - "source": "vaccine_child.child_age" - }, - { - "name": "child_dob", - "value": "2015-10-10", - "source": "vaccine_child.child_dob" - }, - { - "name": "chid_dob_confirm", - "value": "2015-10-10", - "source": "vaccine_child.chid_dob_confirm" - }, - { - "name": "child_dob_estimated", - "value": "0", - "source": "vaccine_child.child_dob_estimated" - }, - { - "name": "child_birth_date_note", - "source": "vaccine_child.child_birth_date_note" - }, - { - "name": "gender", - "value": "male", - "source": "vaccine_child.gender" - }, - { - "name": "father_name", - "value": "shamsher", - "source": "vaccine_child.father_name" - }, - { - "name": "mother_name", - "value": "ghbn", - "source": "vaccine_child.mother_name" - }, - { - "name": "ethnicity", - "value": "hhggg", - "source": "vaccine_child.ethnicity" - }, - { - "name": "province", - "value": "sindh", - "source": "vaccine_child.province" - }, - { - "name": "city_village", - "source": "vaccine_child.city_village" - }, - { - "name": "town", - "source": "vaccine_child.town" - }, - { - "name": "union_council", - "source": "vaccine_child.union_council" - }, - { - "name": "house_number", - "value": "152", - "source": "vaccine_child.house_number" - }, - { - "name": "street", - "value": "uhhh", - "source": "vaccine_child.street" - }, - { - "name": "landmark", - "source": "vaccine_child.landmark" - }, - { - "name": "center_gps", - "value": "24.8637 67.0757 0 30", - "source": "vaccine_child.center_gps" - }, - { - "name": "vaccines", - "source": "vaccine_child.vaccines" - }, - { - "name": "bcg", - "source": "vaccine_child.bcg" - }, - { - "name": "opv_0_retro", - "source": "vaccine_child.opv_0_retro" - }, - { - "name": "opv_0_dose", - "value": "0", - "source": "vaccine_child.opv_0_dose" - }, - { - "name": "pcv_1_retro", - "source": "vaccine_child.pcv_1_retro" - }, - { - "name": "pcv_1_dose", - "value": "1", - "source": "vaccine_child.pcv_1_dose" - }, - { - "name": "opv_1_retro", - "source": "vaccine_child.opv_1_retro" - }, - { - "name": "opv_1_dose", - "value": "1", - "source": "vaccine_child.opv_1_dose" - }, - { - "name": "pentavalent_1_retro", - "value": "2015-11-09", - "source": "vaccine_child.pentavalent_1_retro" - }, - { - "name": "pentavalent_1_dose", - "value": "1", - "source": "vaccine_child.pentavalent_1_dose" - }, - { - "name": "pcv_2_retro", - "source": "vaccine_child.pcv_2_retro" - }, - { - "name": "pcv_2_dose", - "value": "2", - "source": "vaccine_child.pcv_2_dose" - }, - { - "name": "opv_2_retro", - "source": "vaccine_child.opv_2_retro" - }, - { - "name": "opv_2_dose", - "value": "2", - "source": "vaccine_child.opv_2_dose" - }, - { - "name": "pentavalent_2_retro", - "source": "vaccine_child.pentavalent_2_retro" - }, - { - "name": "pentavalent_2_dose", - "value": "2", - "source": "vaccine_child.pentavalent_2_dose" - }, - { - "name": "pcv_3_retro", - "source": "vaccine_child.pcv_3_retro" - }, - { - "name": "pcv_3_dose", - "value": "3", - "source": "vaccine_child.pcv_3_dose" - }, - { - "name": "opv_3_retro", - "source": "vaccine_child.opv_3_retro" - }, - { - "name": "opv_3_dose", - "value": "3", - "source": "vaccine_child.opv_3_dose" - }, - { - "name": "pentavalent_3_retro", - "source": "vaccine_child.pentavalent_3_retro" - }, - { - "name": "pentavalent_3_dose", - "value": "3", - "source": "vaccine_child.pentavalent_3_dose" - }, - { - "name": "measles_1_retro", - "source": "vaccine_child.measles_1_retro" - }, - { - "name": "measles_1_dose", - "value": "1", - "source": "vaccine_child.measles_1_dose" - }, - { - "name": "measles_2_retro", - "source": "vaccine_child.measles_2_retro" - }, - { - "name": "measles_2_dose", - "value": "2", - "source": "vaccine_child.measles_2_dose" - }, - { - "name": "vaccines_2", - "value": "opv_0 pcv_1", - "source": "vaccine_child.vaccines_2" - }, - { - "name": "child_was_suffering_from_a_disease_at_birth", - "value": "no", - "source": "vaccine_child.child_was_suffering_from_a_disease_at_birth" - }, - { - "name": "reminders_approval", - "value": "no", - "source": "vaccine_child.reminders_approval" - }, - { - "name": "contact_phone_number", - "source": "vaccine_child.contact_phone_number" - }, - { - "name": "bcg_today", - "source": "vaccine_child.bcg_today" - }, - { - "name": "opv_0", - "value": "2015-11-10", - "source": "vaccine_child.opv_0" - }, - { - "name": "opv_0_dose_today", - "value": "0", - "source": "vaccine_child.opv_0_dose_today" - }, - { - "name": "pcv_1", - "value": "2015-11-10", - "source": "vaccine_child.pcv_1" - }, - { - "name": "pcv_1_dose_today", - "value": "1", - "source": "vaccine_child.pcv_1_dose_today" - }, - { - "name": "opv_1", - "source": "vaccine_child.opv_1" - }, - { - "name": "opv_1_dose_today", - "value": "1", - "source": "vaccine_child.opv_1_dose_today" - }, - { - "name": "pentavalent_1", - "source": "vaccine_child.pentavalent_1" - }, - { - "name": "pentavalent_1_dose_today", - "value": "1", - "source": "vaccine_child.pentavalent_1_dose_today" - }, - { - "name": "pcv_2", - "source": "vaccine_child.pcv_2" - }, - { - "name": "pcv_2_dose_today", - "value": "2", - "source": "vaccine_child.pcv_2_dose_today" - }, - { - "name": "opv_2", - "source": "vaccine_child.opv_2" - }, - { - "name": "opv_2_dose_today", - "value": "2", - "source": "vaccine_child.opv_2_dose_today" - }, - { - "name": "pentavalent_2", - "source": "vaccine_child.pentavalent_2" - }, - { - "name": "pentavalent_2_dose_today", - "value": "2", - "source": "vaccine_child.pentavalent_2_dose_today" - }, - { - "name": "pcv_3", - "source": "vaccine_child.pcv_3" - }, - { - "name": "pcv_3_dose_today", - "value": "3", - "source": "vaccine_child.pcv_3_dose_today" - }, - { - "name": "opv_3", - "source": "vaccine_child.opv_3" - }, - { - "name": "opv_3_dose_today", - "value": "3", - "source": "vaccine_child.opv_3_dose_today" - }, - { - "name": "pentavalent_3", - "source": "vaccine_child.pentavalent_3" - }, - { - "name": "pentavalent_3_dose_today", - "value": "3", - "source": "vaccine_child.pentavalent_3_dose_today" - }, - { - "name": "measles_1", - "source": "vaccine_child.measles_1" - }, - { - "name": "measles_1_dose_today", - "value": "1", - "source": "vaccine_child.measles_1_dose_today" - }, - { - "name": "measles_2", - "source": "vaccine_child.measles_2" - }, - { - "name": "measles_2_dose_today", - "value": "2", - "source": "vaccine_child.measles_2_dose_today" - } - ] - } - }, - "serverVersion": 1447133792547 -} - diff --git a/opensrp-core/src/test/resources/form/child_enrollment/form_submission3.json b/opensrp-core/src/test/resources/form/child_enrollment/form_submission3.json deleted file mode 100644 index 495ef2b1cd..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/form_submission3.json +++ /dev/null @@ -1,261 +0,0 @@ -{ - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "1996b940-181e-46d5-bf8f-630bef2880a9", - "formName": "child_enrollment", - "entityId": "8cc8cbca-7c39-4c57-b8c7-5ccd5cf88af7", - "clientVersion": 1449572774009, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "pkchild", - "default_bind_path": "/model/instance/Child_Enrollment_Vaccination_Register", - "fields": [ - { - "name": "id", - "value": "8cc8cbca-7c39-4c57-b8c7-5ccd5cf88af7", - "source": "pkchild.id" - }, - { - "name": "child_reg_date", - "value": "2015-11-02", - "source": "pkchild.child_reg_date" - }, - { - "name": "dob", - "value": "2014-12-13", - "source": "pkchild.child_birth_date" - }, - { - "name": "age", - "value": "12", - "source": "pkchild.age" - }, - { - "name": "child_dob_estimated", - "value": "1", - "source": "pkchild.child_dob_estimated" - }, - { - "name": "vaccines", - "source": "pkchild.vaccines" - }, - { - "name": "bcg_retro", - "source": "pkchild.bcg_retro" - }, - { - "name": "opv_0_retro", - "source": "pkchild.opv_0_retro" - }, - { - "name": "opv_0_dose", - "source": "pkchild.opv_0_dose" - }, - { - "name": "pcv_1_retro", - "source": "pkchild.pcv_1_retro" - }, - { - "name": "pcv_1_dose", - "source": "pkchild.pcv_1_dose" - }, - { - "name": "opv_1_retro", - "source": "pkchild.opv_1_retro" - }, - { - "name": "opv_1_dose", - "source": "pkchild.opv_1_dose" - }, - { - "name": "pentavalent_1_retro", - "source": "pkchild.pentavalent_1_retro" - }, - { - "name": "pentavalent_1_dose", - "source": "pkchild.pentavalent_1_dose" - }, - { - "name": "pcv_2_retro", - "source": "pkchild.pcv_2_retro" - }, - { - "name": "pcv_2_dose", - "source": "pkchild.pcv_2_dose" - }, - { - "name": "opv_2_retro", - "source": "pkchild.opv_2_retro" - }, - { - "name": "opv_2_dose", - "source": "pkchild.opv_2_dose" - }, - { - "name": "pentavalent_2_retro", - "source": "pkchild.pentavalent_2_retro" - }, - { - "name": "pentavalent_2_dose", - "source": "pkchild.pentavalent_2_dose" - }, - { - "name": "pcv_3_retro", - "source": "pkchild.pcv_3_retro" - }, - { - "name": "pcv_3_dose", - "source": "pkchild.pcv_3_dose" - }, - { - "name": "opv_3_retro", - "source": "pkchild.opv_3_retro" - }, - { - "name": "opv_3_dose", - "source": "pkchild.opv_3_dose" - }, - { - "name": "pentavalent_3_retro", - "source": "pkchild.pentavalent_3_retro" - }, - { - "name": "pentavalent_3_dose", - "source": "pkchild.pentavalent_3_dose" - }, - { - "name": "measles_1_retro", - "source": "pkchild.measles_1_retro" - }, - { - "name": "measles_1_dose", - "source": "pkchild.measles_1_dose" - }, - { - "name": "measles_2_retro", - "source": "pkchild.measles_2_retro" - }, - { - "name": "measles_2_dose", - "source": "pkchild.measles_2_dose" - }, - { - "name": "vaccines2", - "value": "bcg opv_0", - "source": "pkchild.vaccines2" - }, - { - "name": "contact_phone_number", - "value": "3332525252", - "source": "pkchild.contact_phone_number" - }, - { - "name": "bcg", - "value": "2015-11-02", - "source": "pkchild.bcg" - }, - { - "name": "opv_0", - "value": "2015-11-02", - "source": "pkchild.opv_0" - }, - { - "name": "opv_0_dose_today", - "value": "0", - "source": "pkchild.opv_0_dose_today" - }, - { - "name": "pcv_1", - "source": "pkchild.pcv_1" - }, - { - "name": "pcv_1_dose_today", - "source": "pkchild.pcv_1_dose_today" - }, - { - "name": "opv_1", - "source": "pkchild.opv_1" - }, - { - "name": "opv_1_dose_today", - "source": "pkchild.opv_1_dose_today" - }, - { - "name": "pentavalent_1", - "source": "pkchild.pentavalent_1" - }, - { - "name": "pentavalent_1_dose_today", - "source": "pkchild.pentavalent_1_dose_today" - }, - { - "name": "pcv_2", - "source": "pkchild.pcv_2" - }, - { - "name": "pcv_2_dose_today", - "source": "pkchild.pcv_2_dose_today" - }, - { - "name": "opv_2", - "source": "pkchild.opv_2" - }, - { - "name": "opv_2_dose_today", - "source": "pkchild.opv_2_dose_today" - }, - { - "name": "pentavalent_2", - "source": "pkchild.pentavalent_2" - }, - { - "name": "pentavalent_2_dose_today", - "source": "pkchild.pentavalent_2_dose_today" - }, - { - "name": "pcv_3", - "source": "pkchild.pcv_3" - }, - { - "name": "pcv_3_dose_today", - "source": "pkchild.pcv_3_dose_today" - }, - { - "name": "opv_3", - "source": "pkchild.opv_3" - }, - { - "name": "opv_3_dose_today", - "source": "pkchild.opv_3_dose_today" - }, - { - "name": "pentavalent_3", - "source": "pkchild.pentavalent_3" - }, - { - "name": "pentavalent_3_dose_today", - "source": "pkchild.pentavalent_3_dose_today" - }, - { - "name": "measles_1", - "source": "pkchild.measles_1" - }, - { - "name": "measles_1_dose_today", - "source": "pkchild.measles_1_dose_today" - }, - { - "name": "measles_2", - "source": "pkchild.measles_2" - }, - { - "name": "measles_2_dose_today", - "source": "pkchild.measles_2_dose_today" - } - ] - } - }, - "serverVersion": 1449572944907 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_enrollment/model.xml b/opensrp-core/src/test/resources/form/child_enrollment/model.xml deleted file mode 100644 index 8a0f23a838..0000000000 --- a/opensrp-core/src/test/resources/form/child_enrollment/model.xml +++ /dev/null @@ -1,1691 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - yes - - - - - - - - - - - - - - ${provider_province} - ${provider_city} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - bcg - - - static_instance-vaccines-1 - opv0 - - - static_instance-vaccines-2 - pcv1 - - - static_instance-vaccines-3 - opv1 - - - static_instance-vaccines-4 - penta1 - - - static_instance-vaccines-5 - pcv2 - - - static_instance-vaccines-6 - opv2 - - - static_instance-vaccines-7 - penta2 - - - static_instance-vaccines-8 - pcv3 - - - static_instance-vaccines-9 - opv3 - - - static_instance-vaccines-10 - penta3 - - - static_instance-vaccines-11 - ipv - - - static_instance-vaccines-12 - measles1 - - - static_instance-vaccines-13 - measles2 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-ethnicity-0 - punjabi - - - static_instance-ethnicity-1 - pushtuns - - - static_instance-ethnicity-2 - sindhi - - - static_instance-ethnicity-3 - saraiki - - - static_instance-ethnicity-4 - muhajir - - - static_instance-ethnicity-5 - balochi - - - static_instance-ethnicity-6 - other - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/form/child_followup/form.json b/opensrp-core/src/test/resources/form/child_followup/form.json deleted file mode 100644 index 2b0c04a8e9..0000000000 --- a/opensrp-core/src/test/resources/form/child_followup/form.json +++ /dev/null @@ -1,4165 +0,0 @@ -{ - "name": "Child_Vaccination_Followup", - "title": "بچّوں کا فالو اپ رجسٹر برائے ٹیکاجات - Child Follow Up Vaccination Register", - "sms_keyword": "child_vaccination_followup", - "default_language": "English", - "choices": { - "provinces": [ - { - "name": "kpk", - "label": { - "Urdu": "خیبر پختون خواہ", - "English": "Khyber Pakhtunkhwa", - "Roman Urdu": "Khyber Pakhtunkhwa" - } - }, - { - "name": "sindh", - "label": { - "Urdu": "سندھ", - "English": "Sindh", - "Roman Urdu": "Sindh" - } - }, - { - "name": "balochistan", - "label": { - "Urdu": "بلوچستان", - "English": "Balochistan", - "Roman Urdu": "Balochistan" - } - }, - { - "name": "punjab", - "label": { - "Urdu": "پنجاب", - "English": "Punjab", - "Roman Urdu": "Punjab" - } - }, - { - "name": "gilgit_baltistan", - "label": { - "Urdu": "گلگت بلتستان", - "English": "Gilgit Baltistan", - "Roman Urdu": "Gilgit Baltistan" - } - }, - { - "name": "kashmir", - "label": { - "Urdu": "کشمیر", - "English": "Kashmir", - "Roman Urdu": "Kashmir" - } - }, - { - "name": "fata", - "label": { - "Urdu": "فاٹا", - "English": "FATA", - "Roman Urdu": "FATA" - } - }, - { - "name": "out_of_country", - "label": { - "Urdu": "ملک سے باہر", - "English": "Out of Country", - "Roman Urdu": "Out of Country" - } - } - ], - "ucs": [ - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "bilal_colony", - "label": { - "Urdu": "بلال کالونی", - "Roman Urdu": "Bilal Colony", - "English": "Bilal Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "nasir_colony", - "label": { - "Urdu": "ناصر کالونی", - "Roman Urdu": "Nasir Colony", - "English": "Nasir Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "chakra_goth", - "label": { - "Urdu": "چکرا گوٹھ", - "Roman Urdu": "Chakra Goth", - "English": "Chakra Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "mustafa_taj_colony", - "label": { - "Urdu": "مصطفی تاج کالونی", - "Roman Urdu": "Mustafa Taj Colony", - "English": "Mustafa Taj Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "hundred_quarters", - "label": { - "Urdu": "ہنڈریڈ کوارٹر", - "Roman Urdu": "Hundred Quarters", - "English": "Hundred Quarters" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "gulzar_colony", - "label": { - "Urdu": "گلزار کالونی", - "Roman Urdu": "Gulzar Colony", - "English": "Gulzar Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "korangi_sector_33", - "label": { - "Urdu": "کورنگی سیکٹر 33", - "Roman Urdu": "Korangi Sector 33", - "English": "Korangi Sector 33" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "zaman_town", - "label": { - "Urdu": "زمان ٹاوَن", - "Roman Urdu": "Zaman Town", - "English": "Zaman Town" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "korangi", - "name": "hasrat_mohani_colony", - "label": { - "Urdu": "حسرت موہانی کالونی", - "Roman Urdu": "Hasrat Mohani Colony", - "English": "Hasrat Mohani Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "gulshan_e_ghazi", - "label": { - "Urdu": "گلشن غازی", - "Roman Urdu": "Gulshan-e-Ghazi", - "English": "Gulshan-e-Ghazi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "ittehad_town", - "label": { - "Urdu": "اتحاد ٹاوَن", - "Roman Urdu": "Ittehad Town", - "English": "Ittehad Town" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "islam_nagar", - "label": { - "Urdu": "اسلام نگر", - "Roman Urdu": "Islam Nagar", - "English": "Islam Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "nai_abadi", - "label": { - "Urdu": "نئی آبادی", - "Roman Urdu": "Nai Abadi", - "English": "Nai Abadi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "saeedabad", - "label": { - "Urdu": "سعید آباد", - "Roman Urdu": "Saeedabad", - "English": "Saeedabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "muslim_mujahid_colony", - "label": { - "Urdu": "مسلم مجاہد کالونی", - "Roman Urdu": "Muslim Mujahid Colony", - "English": "Muslim Mujahid Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "muhajir_camp", - "label": { - "Urdu": "مہاجر کیمپ", - "Roman Urdu": "Muhajir Camp", - "English": "Muhajir Camp" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "baldia", - "name": "rasheedabad", - "label": { - "Urdu": "رشید آباد", - "Roman Urdu": "Rasheedabad", - "English": "Rasheedabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "ibrahim_hyderi", - "label": { - "Urdu": "ابراہیم حیدری", - "Roman Urdu": "Ibrahim Hyderi", - "English": "Ibrahim Hyderi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "rehri", - "label": { - "Urdu": "رہڑی", - "Roman Urdu": "Rehri", - "English": "Rehri" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "cattle_colony", - "label": { - "Urdu": "کیٹل کالونی", - "Roman Urdu": "Cattle Colony", - "English": "Cattle Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "qaidabad", - "label": { - "Urdu": "قائدآباد", - "Roman Urdu": "Qaidabad", - "English": "Qaidabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "landhi_colony", - "label": { - "Urdu": "لانڈھی کالونی", - "Roman Urdu": "Landhi Colony", - "English": "Landhi Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "gulshan_e_hadeed", - "label": { - "Urdu": "گلشن حدید", - "Roman Urdu": "Gulshan-e-Hadeed", - "English": "Gulshan-e-Hadeed" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "bin_qasim", - "name": "gaghar", - "label": { - "Urdu": "گگر", - "Roman Urdu": "Gaghar", - "English": "Gaghar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "murad_memon_goth", - "label": { - "Urdu": "مراد میمن گوٹھ", - "Roman Urdu": "Murad Memon Goth", - "English": "Murad Memon Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "darsano_chana", - "label": { - "Urdu": "درشانو شنو", - "Roman Urdu": "Darsano Chana", - "English": "Darsano Chana" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "gujro", - "label": { - "Urdu": "گجرو", - "Roman Urdu": "Gujro", - "English": "Gujro" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "songal", - "label": { - "Urdu": "سنگل", - "Roman Urdu": "Songal", - "English": "Songal" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "maymarabad", - "label": { - "Urdu": "معمار آباد", - "Roman Urdu": "Maymarabad", - "English": "Maymarabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "yousuf_goth", - "label": { - "Urdu": "یوسف گوٹھ", - "Roman Urdu": "Yousuf Goth", - "English": "Yousuf Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gadap", - "name": "manghopir", - "label": { - "Urdu": "منگھوپیر", - "Roman Urdu": "Manghopir", - "English": "Manghopir" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "azizabad", - "label": { - "Urdu": "عزیز آباد", - "Roman Urdu": "Azizabad", - "English": "Azizabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "karimabad", - "label": { - "Urdu": "کریم آباد", - "Roman Urdu": "Karimabad", - "English": "Karimabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "aisha_manzil", - "label": { - "Urdu": "عائشہ منزل", - "Roman Urdu": "Aisha Manzil", - "English": "Aisha Manzil" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "ancholi", - "label": { - "Urdu": "انچولی", - "Roman Urdu": "Ancholi", - "English": "Ancholi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "naseerabad", - "label": { - "Urdu": "نصیرآباد", - "Roman Urdu": "Naseerabad", - "English": "Naseerabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "yaseenabad", - "label": { - "Urdu": "یاسین آباد", - "Roman Urdu": "Yaseenabad", - "English": "Yaseenabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "water_pump", - "label": { - "Urdu": "واٹرپمپ", - "Roman Urdu": "Water Pump", - "English": "Water Pump" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulberg", - "name": "shafiq_mill_colony", - "label": { - "Urdu": "شفیق مل کالونی", - "Roman Urdu": "Shafiq Mill Colony", - "English": "Shafiq Mill Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "delhi_mercantile_society", - "label": { - "Urdu": "دہلی مرچنٹائل سوسائٹی", - "Roman Urdu": "Delhi Mercantile Society", - "English": "Delhi Mercantile Society" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "civic_centre", - "label": { - "Urdu": "سوک سینٹر", - "Roman Urdu": "Civic Centre", - "English": "Civic Centre" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "pir_ilahi_buksh_colony", - "label": { - "Urdu": "پیر الہی بخش کالونی", - "Roman Urdu": "Pir Ilahi Buksh Colony", - "English": "Pir Ilahi Buksh Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "essa_nagri", - "label": { - "Urdu": "عیسی نگری", - "Roman Urdu": "Essa Nagri", - "English": "Essa Nagri" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "gulshan_e_iqbal", - "label": { - "Urdu": "گلشن اقبال", - "Roman Urdu": "Gulshan-e-Iqbal", - "English": "Gulshan-e-Iqbal" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "gillani_railway_station", - "label": { - "Urdu": "گیلانی ریلوے اسٹیشن", - "Roman Urdu": "Gillani Railway Station", - "English": "Gillani Railway Station" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "shanti_nagar", - "label": { - "Urdu": "شانتی نگر", - "Roman Urdu": "Shanti Nagar", - "English": "Shanti Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "jamali_colony", - "label": { - "Urdu": "جمالی کالونی", - "Roman Urdu": "Jamali Colony", - "English": "Jamali Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "gulshan_e_iqbal_ii", - "label": { - "Urdu": "گلشن اقبال 2", - "Roman Urdu": "Gulshan-e-Iqbal II", - "English": "Gulshan-e-Iqbal II" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "pehlwan_goth", - "label": { - "Urdu": "پہلوان گوٹھ", - "Roman Urdu": "Pehlwan Goth", - "English": "Pehlwan Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "matrovil_colony", - "label": { - "Urdu": "میٹروویل کالونی", - "Roman Urdu": "Matrovil Colony", - "English": "Matrovil Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "gulzar_e_hijri", - "label": { - "Urdu": "گلزار ہجری", - "Roman Urdu": "Gulzar-e-Hijri", - "English": "Gulzar-e-Hijri" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "gulshan", - "name": "safooran_goth", - "label": { - "Urdu": "صفورا گوٹھ", - "Roman Urdu": "Safooran Goth", - "English": "Safooran Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "akhtar_colony", - "label": { - "Urdu": "اختر کالونی", - "Roman Urdu": "Akhtar Colony", - "English": "Akhtar Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "manzoor_colony", - "label": { - "Urdu": "منظور کالونی", - "Roman Urdu": "Manzoor Colony", - "English": "Manzoor Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "azam_basti", - "label": { - "Urdu": "اعظم بستی", - "Roman Urdu": "Azam Basti", - "English": "Azam Basti" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "chanesar_goth", - "label": { - "Urdu": "چنیسر گوٹھ", - "Roman Urdu": "Chanesar Goth", - "English": "Chanesar Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "mahmudabad", - "label": { - "Urdu": "محمودآباد", - "Roman Urdu": "Mahmudabad", - "English": "Mahmudabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "pechs", - "label": { - "Urdu": "پی۔ای۔سی۔ایچ۔ایس", - "Roman Urdu": "P.E.C.H.S.", - "English": "P.E.C.H.S." - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "pechs_ii", - "label": { - "Urdu": "پی۔ای۔سی۔ایچ۔ایس 2", - "Roman Urdu": "P.E.C.H.S. II", - "English": "P.E.C.H.S. II" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "jut_line", - "label": { - "Urdu": "جٹ لائن", - "Roman Urdu": "Jut Line", - "English": "Jut Line" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "central_jacob_lines", - "label": { - "Urdu": "سینٹرل جیکب لائن", - "Roman Urdu": "Central Jacob Lines", - "English": "Central Jacob Lines" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "jamshed_quarters", - "label": { - "Urdu": "جمشید کوارٹر", - "Roman Urdu": "Jamshed Quarters", - "English": "Jamshed Quarters" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "garden_east", - "label": { - "Urdu": "گارڈن ایسٹ", - "Roman Urdu": "Garden East", - "English": "Garden East" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "soldier_bazar", - "label": { - "Urdu": "سولجر بازار", - "Roman Urdu": "Soldier Bazar", - "English": "Soldier Bazar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "jamshed", - "name": "pakistan_quarters", - "label": { - "Urdu": "پاکستان کوارٹر", - "Roman Urdu": "Pakistan Quarters", - "English": "Pakistan Quarters" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "bhutta_village", - "label": { - "Urdu": "بھٹا ولیج", - "Roman Urdu": "Bhutta Village", - "English": "Bhutta Village" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "sultanabad", - "label": { - "Urdu": "سلطان آباد", - "Roman Urdu": "Sultanabad", - "English": "Sultanabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "kiamari_uc", - "label": { - "Urdu": "کیماری یو- سی", - "Roman Urdu": "Kiamari UC", - "English": "Kiamari UC" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "baba_bhit", - "label": { - "Urdu": "بابا بھٹ", - "Roman Urdu": "Baba Bhit", - "English": "Baba Bhit" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "machar_colony", - "label": { - "Urdu": "مچھر کالونی", - "Roman Urdu": "Machar Colony", - "English": "Machar Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "maripur", - "label": { - "Urdu": "ماڑی پور", - "Roman Urdu": "Maripur", - "English": "Maripur" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "shershah", - "label": { - "Urdu": "شیرشاہ", - "Roman Urdu": "SherShah", - "English": "SherShah" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "kiamari", - "name": "gabo_pat", - "label": { - "Urdu": "گابو پٹ", - "Roman Urdu": "Gabo Pat", - "English": "Gabo Pat" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "muzafarabad", - "label": { - "Urdu": "مظفرآباد", - "Roman Urdu": "Muzafarabad", - "English": "Muzafarabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "muslimabad", - "label": { - "Urdu": "مسلم آباد", - "Roman Urdu": "Muslimabad", - "English": "Muslimabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "dawood_chowrangi", - "label": { - "Urdu": "داوَد چورنگی", - "Roman Urdu": "Dawood Chowrangi", - "English": "Dawood Chowrangi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "moinabad", - "label": { - "Urdu": "معین آباد", - "Roman Urdu": "Moinabad", - "English": "Moinabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "sharafi_goth", - "label": { - "Urdu": "شرافی گوٹھ", - "Roman Urdu": "Sharafi Goth", - "English": "Sharafi Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "bhutto_nagar", - "label": { - "Urdu": "بھٹو نگر", - "Roman Urdu": "Bhutto Nagar", - "English": "Bhutto Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "khawaja_ajmeer_colony", - "label": { - "Urdu": "خواجہ اجمیر کالونی", - "Roman Urdu": "Khawaja Ajmeer Colony", - "English": "Khawaja Ajmeer Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "landhi_uc", - "label": { - "Urdu": "لانڈھی یوسی", - "Roman Urdu": "Landhi UC", - "English": "Landhi UC" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "awami_colony", - "label": { - "Urdu": "عوامی کالونی", - "Roman Urdu": "Awami Colony", - "English": "Awami Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "burmee_colony", - "label": { - "Urdu": "برمی کالونی", - "Roman Urdu": "Burmee Colony", - "English": "Burmee Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "korangi_uc", - "label": { - "Urdu": "کورنگی یوسی", - "Roman Urdu": "Korangi UC", - "English": "Korangi UC" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "landhi", - "name": "sherabad", - "label": { - "Urdu": "شیرآباد", - "Roman Urdu": "Sherabad", - "English": "Sherabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "rizvia_society", - "label": { - "Urdu": "رضویہ سوسائٹی", - "Roman Urdu": "Rizvia Society", - "English": "Rizvia Society" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "firdous_colony", - "label": { - "Urdu": "فردوس کالونی", - "Roman Urdu": "Firdous Colony", - "English": "Firdous Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "super_market", - "label": { - "Urdu": "سپر مارکیٹ", - "Roman Urdu": "Super Market", - "English": "Super Market" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "dak_khana", - "label": { - "Urdu": "دک کھانہ", - "Roman Urdu": "Dak Khana", - "English": "Dak Khana" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "qasimabad", - "label": { - "Urdu": "قاسم آباد", - "Roman Urdu": "Qasimabad", - "English": "Qasimabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "bandhani_colony", - "label": { - "Urdu": "بندھانی کالونی", - "Roman Urdu": "Bandhani Colony", - "English": "Bandhani Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "sharifabad", - "label": { - "Urdu": "شریف آباد", - "Roman Urdu": "Sharifabad", - "English": "Sharifabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "commercial_area", - "label": { - "Urdu": "کمرشل ایریا", - "Roman Urdu": "Commercial Area", - "English": "Commercial Area" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "mujahid_colony", - "label": { - "Urdu": "مجاہد کالونی", - "Roman Urdu": "Mujahid Colony", - "English": "Mujahid Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "nazimabad", - "label": { - "Urdu": "ناظم آباد", - "Roman Urdu": "Nazimabad", - "English": "Nazimabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "liaquatabad", - "name": "abbasi_shaheed", - "label": { - "Urdu": "عباسی شہید", - "Roman Urdu": "Abbasi Shaheed", - "English": "Abbasi Shaheed" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "agra_taj_colony", - "label": { - "Urdu": "آگرہ تاج کالونی", - "Roman Urdu": "Agra Taj Colony", - "English": "Agra Taj Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "daryaabad", - "label": { - "Urdu": "دریاآباد", - "Roman Urdu": "Daryaabad", - "English": "Daryaabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "nawabad", - "label": { - "Urdu": "نواآباد", - "Roman Urdu": "Nawabad", - "English": "Nawabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "khada_memon_society", - "label": { - "Urdu": "خدا- میمن- سوساَٹی", - "Roman Urdu": "Khada Memon Society", - "English": "Khada Memon Society" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "baghdadi", - "label": { - "Urdu": "بغدادی", - "Roman Urdu": "Baghdadi", - "English": "Baghdadi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "shah_baig_line", - "label": { - "Urdu": "شاھ باغ لائن", - "Roman Urdu": "Shah Baig Line", - "English": "Shah Baig Line" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "bihar_colony", - "label": { - "Urdu": "بہار کالونی", - "Roman Urdu": "Bihar Colony", - "English": "Bihar Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "ragiwara", - "label": { - "Urdu": "راگی واڑا", - "Roman Urdu": "Ragiwara", - "English": "Ragiwara" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "singo_line", - "label": { - "Urdu": "سنگولائن", - "Roman Urdu": "Singo Line", - "English": "Singo Line" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "chakiwara", - "label": { - "Urdu": "چاکی واڑا", - "Roman Urdu": "Chakiwara", - "English": "Chakiwara" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "lyari", - "name": "allama_iqbal_colony", - "label": { - "Urdu": "علامہ اقبال کالونی", - "Roman Urdu": "Allama Iqbal Colony", - "English": "Allama Iqbal Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "model_colony", - "label": { - "Urdu": "موڈل کالونی", - "Roman Urdu": "Model Colony", - "English": "Model Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "kala_board", - "label": { - "Urdu": "کالا بورڈ", - "Roman Urdu": "Kala Board", - "English": "Kala Board" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "saudabad", - "label": { - "Urdu": "سعودآباد", - "Roman Urdu": "Saudabad", - "English": "Saudabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "khokhra_par", - "label": { - "Urdu": "کھوکھرا پار", - "Roman Urdu": "Khokhra Par", - "English": "Khokhra Par" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "jafar_e_tayyar", - "label": { - "Urdu": "جعفر تیار", - "Roman Urdu": "Jafar-e-Tayyar", - "English": "Jafar-e-Tayyar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "gharibabad", - "label": { - "Urdu": "غریب آباد", - "Roman Urdu": "Gharibabad", - "English": "Gharibabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "malir", - "name": "ghazi_brohi_goth", - "label": { - "Urdu": "غازی بروہی گوٹھ", - "Roman Urdu": "Ghazi Brohi Goth", - "English": "Ghazi Brohi Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "kalyana", - "label": { - "Urdu": "کالیانہ", - "Roman Urdu": "Kalyana", - "English": "Kalyana" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "sir_syed_colony", - "label": { - "Urdu": "سر سید کالونی", - "Roman Urdu": "Sir Syed Colony", - "English": "Sir Syed Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "fatima_jinnah_colony", - "label": { - "Urdu": "فاطمہ جناح کالونی", - "Roman Urdu": "Fatima Jinnah Colony", - "English": "Fatima Jinnah Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "godhra", - "label": { - "Urdu": "گودھرا", - "Roman Urdu": "Godhra", - "English": "Godhra" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "abu_zar_ghaffari", - "label": { - "Urdu": "ابو زر غفاری", - "Roman Urdu": "Abu Zar Ghaffari", - "English": "Abu Zar Ghaffari" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "hakim_ahsan", - "label": { - "Urdu": "حاکم احسان", - "Roman Urdu": "Hakim Ahsan", - "English": "Hakim Ahsan" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "madina_colony", - "label": { - "Urdu": "مدینہ کالونی", - "Roman Urdu": "Madina Colony", - "English": "Madina Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "faisal_colony", - "label": { - "Urdu": "فیصل کالونی", - "Roman Urdu": "Faisal Colony", - "English": "Faisal Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "khamiso_goth", - "label": { - "Urdu": "خمیسو گوٹھ", - "Roman Urdu": "Khamiso Goth", - "English": "Khamiso Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "mustufa_colony", - "label": { - "Urdu": "مصطفی کالونی", - "Roman Urdu": "Mustufa Colony", - "English": "Mustufa Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "khawaja_ajmeer_nagri", - "label": { - "Urdu": "خواجہ اجمیر نگری", - "Roman Urdu": "Khawaja Ajmeer Nagri", - "English": "Khawaja Ajmeer Nagri" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "gulshan_e_saeed", - "label": { - "Urdu": "گلشن سعید", - "Roman Urdu": "Gulshan-e-Saeed", - "English": "Gulshan-e-Saeed" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "new_karachi", - "name": "shah_nawaz_bhutto_colony", - "label": { - "Urdu": "شاہ نواز بھٹو کالونی", - "Roman Urdu": "Shah Nawaz Bhutto Colony", - "English": "Shah Nawaz Bhutto Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "paposh_nagar", - "label": { - "Urdu": "پاپوش نگر", - "Roman Urdu": "Paposh Nagar", - "English": "Paposh Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "pahar_ganj", - "label": { - "Urdu": "پہاڑ گنج", - "Roman Urdu": "Pahar Ganj", - "English": "Pahar Ganj" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "khandu_goth", - "label": { - "Urdu": "کھنڑو گوٹھ", - "Roman Urdu": "Khandu Goth", - "English": "Khandu Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "hyderi", - "label": { - "Urdu": "حیدری", - "Roman Urdu": "Hyderi", - "English": "Hyderi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "sakhi_hassan", - "label": { - "Urdu": "سخی حسن", - "Roman Urdu": "Sakhi Hassan", - "English": "Sakhi Hassan" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "farooq_e_azam", - "label": { - "Urdu": "فاروق اعظم", - "Roman Urdu": "Farooq-e-Azam", - "English": "Farooq-e-Azam" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "nusrat_bhutto_colony", - "label": { - "Urdu": "نصرت بھٹو کالونی", - "Roman Urdu": "Nusrat Bhutto Colony", - "English": "Nusrat Bhutto Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "shadman_town", - "label": { - "Urdu": "شادمان ٹاوَن", - "Roman Urdu": "Shadman Town", - "English": "Shadman Town" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "buffer_zone", - "label": { - "Urdu": "بفرزون", - "Roman Urdu": "Buffer Zone", - "English": "Buffer Zone" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "north_nazimabad", - "name": "buffer_zone_ii", - "label": { - "Urdu": "بفرزون 2", - "Roman Urdu": "Buffer Zone II", - "English": "Buffer Zone II" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "mominabad", - "label": { - "Urdu": "مومن آباد", - "Roman Urdu": "Mominabad", - "English": "Mominabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "haryana_colony", - "label": { - "Urdu": "حریانہ کالونی", - "Roman Urdu": "Haryana Colony", - "English": "Haryana Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "hanifabad", - "label": { - "Urdu": "حنیف آباد", - "Roman Urdu": "Hanifabad", - "English": "Hanifabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "mohammad_nagar", - "label": { - "Urdu": "محمد نگر", - "Roman Urdu": "Mohammad Nagar", - "English": "Mohammad Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "madina_colony_orangi", - "label": { - "Urdu": "مدینہ کالونی اورنگی", - "Roman Urdu": "Madina Colony Orangi", - "English": "Madina Colony Orangi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "ghaziabad", - "label": { - "Urdu": "غازی آباد", - "Roman Urdu": "Ghaziabad", - "English": "Ghaziabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "chisti_nagar", - "label": { - "Urdu": "چشتی نگر", - "Roman Urdu": "Chisti Nagar", - "English": "Chisti Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "bilal_colony_orangi", - "label": { - "Urdu": "بلال کالونی اورنگی", - "Roman Urdu": "Bilal Colony Orangi", - "English": "Bilal Colony Orangi" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "iqbal_baloch_colony", - "label": { - "Urdu": "اقبال بلوچ کالونی", - "Roman Urdu": "Iqbal Baloch Colony", - "English": "Iqbal Baloch Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "ghabool_town", - "label": { - "Urdu": "گبول ٹاوَن", - "Roman Urdu": "Ghabool Town", - "English": "Ghabool Town" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "data_nagar", - "label": { - "Urdu": "داتا نگر", - "Roman Urdu": "Data Nagar", - "English": "Data Nagar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "mujahidabad", - "label": { - "Urdu": "مجاہد آباد", - "Roman Urdu": "Mujahidabad", - "English": "Mujahidabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "orangi", - "name": "baloch_goth", - "label": { - "Urdu": "بلوچ گوٹھ", - "Roman Urdu": "Baloch Goth", - "English": "Baloch Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "old_haji_camp", - "label": { - "Urdu": "پرانہ حاجی کیمپ", - "Roman Urdu": "Old Haji Camp", - "English": "Old Haji Camp" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "garden", - "label": { - "Urdu": "گارڈن", - "Roman Urdu": "Garden", - "English": "Garden" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "kharadar", - "label": { - "Urdu": "کھارادر", - "Roman Urdu": "Kharadar", - "English": "Kharadar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "city_railway_colony", - "label": { - "Urdu": "سٹی ریلوے کالونی", - "Roman Urdu": "City Railway Colony", - "English": "City Railway Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "nanak_wara", - "label": { - "Urdu": "ناناک واڑا", - "Roman Urdu": "Nanak Wara", - "English": "Nanak Wara" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "gazdarabad", - "label": { - "Urdu": "گزدرآباد", - "Roman Urdu": "Gazdarabad", - "English": "Gazdarabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "millat_nagar_islam_pura", - "label": { - "Urdu": "ملت نگر اسلام پورا", - "Roman Urdu": "Millat Nagar/Islam Pura", - "English": "Millat Nagar/Islam Pura" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "saddar_uc", - "label": { - "Urdu": "صدر یو سی", - "Roman Urdu": "Saddar UC", - "English": "Saddar UC" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "civil_line", - "label": { - "Urdu": "سول لائن", - "Roman Urdu": "Civil Line", - "English": "Civil Line" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "clifton", - "label": { - "Urdu": "کلفٹن", - "Roman Urdu": "Clifton", - "English": "Clifton" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "saddar", - "name": "kehkashan", - "label": { - "Urdu": "کہکشان", - "Roman Urdu": "Kehkashan", - "English": "Kehkashan" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "natha_khan_goth", - "label": { - "Urdu": "ناتھا خان گوٹھ", - "Roman Urdu": "Natha Khan Goth", - "English": "Natha Khan Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "pak_sadat_colony", - "label": { - "Urdu": "پاک صدر کالونی", - "Roman Urdu": "Pak Sadat Colony", - "English": "Pak Sadat Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "drigh_colony", - "label": { - "Urdu": "ڈرگ کالونی", - "Roman Urdu": "Drigh Colony", - "English": "Drigh Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "raita_plot", - "label": { - "Urdu": "رائتا پلاٹ", - "Roman Urdu": "Raita Plot", - "English": "Raita Plot" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "moria_khan_goth", - "label": { - "Urdu": "موریا خان گوٹھ", - "Roman Urdu": "Moria Khan Goth", - "English": "Moria Khan Goth" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "rafa_e_aam_society", - "label": { - "Urdu": "رفا عام سوسا ئٹی", - "Roman Urdu": "Rafa-e-Aam Society", - "English": "Rafa-e-Aam Society" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "shah_faisal", - "name": "al_falah_society", - "label": { - "Urdu": "الفلاح سوسا ئٹی", - "Roman Urdu": "Al-Falah Society", - "English": "Al-Falah Society" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "pak_colony", - "label": { - "Urdu": "پاک کالونی", - "Roman Urdu": "Pak Colony", - "English": "Pak Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "old_golimar", - "label": { - "Urdu": "پرانہ گولی مار", - "Roman Urdu": "Old Golimar", - "English": "Old Golimar" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "jahanabad", - "label": { - "Urdu": "جہان آباد", - "Roman Urdu": "Jahanabad", - "English": "Jahanabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "metrovil", - "label": { - "Urdu": "میٹروویل", - "Roman Urdu": "Metrovil", - "English": "Metrovil" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "bhawani_chali", - "label": { - "Urdu": "بہوانی چالی", - "Roman Urdu": "Bhawani Chali", - "English": "Bhawani Chali" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "frontier_colony", - "label": { - "Urdu": "فرونٹر کالونی", - "Roman Urdu": "Frontier Colony", - "English": "Frontier Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "banaras_colony", - "label": { - "Urdu": "بنارس کالونی", - "Roman Urdu": "Banaras Colony", - "English": "Banaras Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "qasba_colony", - "label": { - "Urdu": "قصبہ کالونی", - "Roman Urdu": "Qasba Colony", - "English": "Qasba Colony" - } - }, - { - "province": "sindh", - "city": "karachi", - "town": "site", - "name": "islamia_colony", - "label": { - "Urdu": "اسلامیہ کالونی", - "Roman Urdu": "Islamia Colony", - "English": "Islamia Colony" - } - }, - { - "province": "na", - "city": "na", - "town": "na", - "name": "other", - "label": { - "Urdu": "دیگر", - "Roman Urdu": "Deegar", - "English": "Other" - } - }, - { - "province": "na", - "city": "na", - "town": "na", - "name": "not_applicable", - "label": { - "Urdu": "قابل اطلاق نہیں", - "Roman Urdu": "Qaabil-e-atlaaq nahi", - "English": "Not Applicable" - } - } - ], - "gender": [ - { - "instance": { - "openmrs_code": "1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "male", - "label": { - "Urdu": "مرد/ لڑکا", - "Roman Urdu": "Mard/larka", - "English": "Male" - } - }, - { - "instance": { - "openmrs_code": "1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "female", - "label": { - "Urdu": "عورت/لڑکی", - "Roman Urdu": "Aurat/larki", - "English": "Female" - } - }, - { - "instance": { - "openmrs_code": "163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "transgender", - "label": { - "Urdu": "خواجہ سرہ", - "Roman Urdu": "Khwaja sira", - "English": "Transgender" - } - } - ], - "vaccines": [ - { - "instance": { - "openmrs_code": "1570AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "bcg", - "label": { - "Urdu": "بی سی جی", - "Roman Urdu": "BCG", - "English": "BCG" - } - }, - { - "instance": { - "openmrs_code": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv0", - "label": { - "Urdu": "او پی وی 0", - "Roman Urdu": "OPV 0", - "English": "OPV 0" - } - }, - { - "instance": { - "openmrs_code": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv1", - "label": { - "Urdu": "پی سی وی 1", - "Roman Urdu": "PCV 1", - "English": "PCV 1" - } - }, - { - "instance": { - "openmrs_code": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv1", - "label": { - "Urdu": "او پی وی 1", - "Roman Urdu": "OPV 1", - "English": "OPV 1" - } - }, - { - "instance": { - "openmrs_code": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta1", - "label": { - "Urdu": "پینٹا ویلنٹ 1", - "Roman Urdu": "Pentavalent 1", - "English": "Pentavalent 1" - } - }, - { - "instance": { - "openmrs_code": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv2", - "label": { - "Urdu": "پی سی وی 2", - "Roman Urdu": "PCV 2", - "English": "PCV 2" - } - }, - { - "instance": { - "openmrs_code": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv2", - "label": { - "Urdu": "او پی وی 2", - "Roman Urdu": "OPV 2", - "English": "OPV 2" - } - }, - { - "instance": { - "openmrs_code": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta2", - "label": { - "Urdu": "پینٹا ویلنٹ 2", - "Roman Urdu": "Pentavalent 2", - "English": "Pentavalent 2" - } - }, - { - "instance": { - "openmrs_code": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv3", - "label": { - "Urdu": "پی سی وی 3", - "Roman Urdu": "PCV 3", - "English": "PCV 3" - } - }, - { - "instance": { - "openmrs_code": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv3", - "label": { - "Urdu": "او پی وی 3", - "Roman Urdu": "OPV 3", - "English": "OPV 3" - } - }, - { - "instance": { - "openmrs_code": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta3", - "label": { - "Urdu": "پینٹا ویلنٹ 3", - "Roman Urdu": "Pentavalent 3", - "English": "Pentavalent 3" - } - }, - { - "instance": { - "openmrs_code": "82242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "ipv", - "label": { - "Urdu": "آئی پی وی", - "Roman Urdu": "IPV", - "English": "IPV" - } - }, - { - "instance": { - "openmrs_code": "79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "measles1", - "label": { - "Urdu": "خسرہ 1", - "Roman Urdu": "Khasra 1", - "English": "Measles 1" - } - }, - { - "instance": { - "openmrs_code": "79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "measles2", - "label": { - "Urdu": "خسرہ 2", - "Roman Urdu": "Khasra 2", - "English": "Measles 2" - } - } - ], - "towns": [ - { - "province": "sindh", - "city": "karachi", - "name": "korangi", - "label": { - "Urdu": "کورنگی", - "Roman Urdu": "Korangi", - "English": "Korangi" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "landhi", - "label": { - "Urdu": "لانڈھی", - "Roman Urdu": "Landhi", - "English": "Landhi" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "baldia", - "label": { - "Urdu": "بلدیہ", - "Roman Urdu": "Baldia", - "English": "Baldia" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "bin_qasim", - "label": { - "Urdu": "بن قاسم", - "Roman Urdu": "Bin Qasim", - "English": "Bin Qasim" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "gadap", - "label": { - "Urdu": "گڈاپ", - "Roman Urdu": "Gadap", - "English": "Gadap" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "gulberg", - "label": { - "Urdu": "گلبرگ", - "Roman Urdu": "Gulberg", - "English": "Gulberg" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "gulshan", - "label": { - "Urdu": "گلشن", - "Roman Urdu": "Gulshan", - "English": "Gulshan" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "jamshed", - "label": { - "Urdu": "جمشید", - "Roman Urdu": "Jamshed", - "English": "Jamshed" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "kiamari", - "label": { - "Urdu": "کیماری", - "Roman Urdu": "Kiamari", - "English": "Kiamari" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "liaquatabad", - "label": { - "Urdu": "لیاقت آباد", - "Roman Urdu": "Liaquatabad", - "English": "Liaquatabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "lyari", - "label": { - "Urdu": "لیاری", - "Roman Urdu": "Lyari", - "English": "Lyari" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "malir", - "label": { - "Urdu": "ملیر", - "Roman Urdu": "Malir", - "English": "Malir" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "new_karachi", - "label": { - "Urdu": "نیو کراچی", - "Roman Urdu": "New Karachi", - "English": "New Karachi" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "north_nazimabad", - "label": { - "Urdu": "نارتھ ناظم آباد", - "Roman Urdu": "North Nazimabad", - "English": "North Nazimabad" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "orangi", - "label": { - "Urdu": "اورنگی", - "Roman Urdu": "Orangi", - "English": "Orangi" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "saddar", - "label": { - "Urdu": "صدر", - "Roman Urdu": "Saddar", - "English": "Saddar" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "shah_faisal", - "label": { - "Urdu": "شاہ فیصل", - "Roman Urdu": "Shah Faisal", - "English": "Shah Faisal" - } - }, - { - "province": "sindh", - "city": "karachi", - "name": "site", - "label": { - "Urdu": "سائٹ", - "Roman Urdu": "S.I.T.E.", - "English": "S.I.T.E." - } - }, - { - "province": "na", - "city": "na", - "name": "other", - "label": { - "Urdu": "دیگر", - "Roman Urdu": "Deegar", - "English": "Other" - } - }, - { - "province": "na", - "city": "na", - "name": "not_applicable", - "label": { - "Urdu": "قابل اطلاق نہیں", - "Roman Urdu": "Qaabil-e-atlaaq nahi", - "English": "Not Applicable" - } - } - ], - "cities": [ - { - "province": "sindh", - "name": "karachi", - "label": { - "Urdu": "کراچی", - "Roman Urdu": "Karachi", - "English": "Karachi" - } - }, - { - "province": "punjab", - "name": "hafizabad", - "label": { - "Urdu": "حافظ آباد", - "Roman Urdu": "Hafizabad", - "English": "Hafizabad" - } - }, - { - "province": "punjab", - "name": "muzaffargarh", - "label": { - "Urdu": "مظفر گڑھ", - "Roman Urdu": "Muzaffargarh", - "English": "Muzaffargarh" - } - }, - { - "province": "na", - "name": "other", - "label": { - "Urdu": "دیگر", - "Roman Urdu": "Deegar", - "English": "Other" - } - }, - { - "province": "na", - "name": "not_applicable", - "label": { - "Urdu": "قابل اطلاق نہیں", - "Roman Urdu": "Qaabil-e-atlaaq nahi", - "English": "Not Applicable" - } - } - ], - "yes_no": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "yes", - "label": { - "Urdu": "ہاں", - "Roman Urdu": "Yes", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "no", - "label": { - "Urdu": "نہیں", - "Roman Urdu": "No", - "English": "No" - } - } - ] - }, - "instance": { - "encounter_type": "Child Vaccination Followup" - }, - "version": "201604080501", - "id_string": "child_vaccination_followup", - "type": "survey", - "children": [ - { - "type": "hidden", - "name": "provider_uc" - }, - { - "type": "hidden", - "name": "provider_town" - }, - { - "type": "hidden", - "name": "provider_city" - }, - { - "type": "hidden", - "name": "provider_province" - }, - { - "type": "hidden", - "name": "existing_first_name" - }, - { - "type": "hidden", - "name": "existing_last_name" - }, - { - "type": "hidden", - "name": "existing_mother_name" - }, - { - "type": "hidden", - "name": "existing_gender" - }, - { - "type": "hidden", - "name": "existing_client_birth_date" - }, - { - "type": "hidden", - "name": "existing_client_reg_date" - }, - { - "type": "hidden", - "name": "existing_landmark" - }, - { - "type": "hidden", - "name": "existing_house_number" - }, - { - "type": "hidden", - "name": "existing_street" - }, - { - "type": "hidden", - "name": "existing_union_council" - }, - { - "type": "hidden", - "name": "existing_town" - }, - { - "type": "hidden", - "name": "existing_city_village" - }, - { - "type": "hidden", - "name": "existing_province" - }, - { - "type": "hidden", - "name": "existing_union_councilname" - }, - { - "type": "hidden", - "name": "existing_townname" - }, - { - "type": "hidden", - "name": "existing_city_villagename" - }, - { - "type": "hidden", - "name": "existing_provincename" - }, - { - "type": "hidden", - "name": "existing_ethnicity" - }, - { - "type": "hidden", - "name": "existing_program_client_id" - }, - { - "type": "hidden", - "name": "existing_epi_card_number" - }, - { - "type": "hidden", - "name": "existing_child_was_suffering_from_a_disease_at_birth" - }, - { - "type": "hidden", - "name": "existing_reminders_approval" - }, - { - "type": "hidden", - "name": "existing_contact_phone_number" - }, - { - "type": "hidden", - "name": "e_bcg" - }, - { - "type": "hidden", - "name": "e_opv0" - }, - { - "type": "hidden", - "name": "e_penta2" - }, - { - "type": "hidden", - "name": "e_penta1" - }, - { - "type": "hidden", - "name": "e_penta3" - }, - { - "type": "hidden", - "name": "e_opv1" - }, - { - "type": "hidden", - "name": "e_opv2" - }, - { - "type": "hidden", - "name": "e_opv3" - }, - { - "type": "hidden", - "name": "e_pcv1" - }, - { - "type": "hidden", - "name": "e_pcv2" - }, - { - "type": "hidden", - "name": "e_pcv3" - }, - { - "type": "hidden", - "name": "e_ipv" - }, - { - "type": "hidden", - "name": "e_measles1" - }, - { - "type": "hidden", - "name": "e_measles2" - }, - { - "type": "hidden", - "name": "provider_id" - }, - { - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "hidden", - "name": "provider_location_id" - }, - { - "type": "hidden", - "name": "provider_location_name" - }, - { - "type": "note", - "name": "provider_location_note", - "label": { - "Urdu": "شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}", - "English": "City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}", - "Roman Urdu": "Shehr: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center ka Naam: ${provider_location_name}" - } - }, - { - "instance": { - "openmrs_entity_id": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "start", - "name": "start" - }, - { - "instance": { - "openmrs_entity_id": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "end", - "name": "end" - }, - { - "instance": { - "openmrs_entity_id": "163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "today", - "name": "today" - }, - { - "instance": { - "openmrs_entity_id": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "deviceid", - "name": "deviceid" - }, - { - "instance": { - "openmrs_entity_id": "163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "subscriberid", - "name": "subscriberid" - }, - { - "instance": { - "openmrs_entity_id": "163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "simserial", - "name": "simserial" - }, - { - "instance": { - "openmrs_entity_id": "163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "phonenumber", - "name": "phonenumber" - }, - { - "bind": { - "required": "yes" - }, - "label": { - "Urdu": "بچے کی پروگرام میں اندراج کی تاریخ: {existing_client_reg_date}$", - "Roman Urdu": "Bachay ki Program mai andraj ki tareekh: ${existing_client_reg_date}", - "English": "Child Registration date: ${existing_client_reg_date}" - }, - "type": "note", - "name": "existing_client_reg_date_note", - "hint": { - "Urdu": "بچے کو ویکسین لگنے کی تاریخ", - "Roman Urdu": "Bachay ko vaccine lagnay ki tareekh", - "English": "Date on which child was vaccinated" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "name": "program_client_id_note", - "label": { - "Urdu": "کلائنٹ کی پروگرام ائی ڈی: {existing_program_client_id}$", - "Roman Urdu": "Client ki program ID: ${existing_program_client_id}", - "English": "Program Client ID: ${existing_program_client_id}" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "instance": { - "openmrs_entity_id": "EPI Card Number", - "openmrs_entity": "person_attribute" - }, - "name": "epi_card_number_note", - "label": { - "Urdu": "کارڈ نمبر: {existing_epi_card_number}$", - "English": "Card Number: ${existing_epi_card_number}", - "Roman Urdu": "Card Number: ${existing_epi_card_number}" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "name": "first_name_note", - "label": { - "Urdu": "نام: {existing_first_name}$", - "Roman Urdu": "Naam: ${existing_first_name}", - "English": "First Name: ${existing_first_name}" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "name": "last_name_note", - "label": { - "Urdu": "والد کا نام: {existing_last_name}$", - "Roman Urdu": "Waalid ka naam: ${existing_last_name}", - "English": "Last name: ${existing_last_name}" - } - }, - { - "bind": { - "calculate": "int((${today} - ${existing_client_birth_date}) div 30.42)" - }, - "type": "calculate", - "name": "child_age", - "instance": { - "openmrs_entity_id": "154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - } - }, - { - "type": "note", - "name": "calc_dob_note", - "label": { - "Urdu": "بچے کی تاریخ پیدائش: {existing_client_birth_date}$ ({child_age}$) مہینے", - "English": "Child dob: ${existing_client_birth_date} (${child_age}) months", - "Roman Urdu": "Bachay ki tareekh-e-paidaish: ${existing_client_birth_date} (${child_age}) mahinay" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "name": "gender_note", - "label": { - "Urdu": "جنس: {existing_gender}$", - "Roman Urdu": "Jins:${existing_gender}", - "English": "Gender: ${existing_gender}" - } - }, - { - "type": "note", - "name": "mother_name_note", - "label": { - "Urdu": "ماں کا نام: {existing_mother_name}$", - "English": "Mother's Name: ${existing_mother_name}", - "Roman Urdu": "Maa ka naam: ${existing_mother_name}" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "note", - "name": "exisiting_ethnicity_note", - "label": { - "Urdu": "قومیت: {existing_ethnicity}$", - "Roman Urdu": "Qomiat: ${existing_ethnicity}", - "English": "Ethnicity: ${existing_ethnicity}" - } - }, - { - "type": "note", - "name": "address", - "label": { - "Urdu": "موجودہ پتہ: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}", - "English": "Current Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}", - "Roman Urdu": "Mojooda Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}" - } - }, - { - "label": { - "Urdu": "کیا آپ کا گھر کا پتہ بدلا ہے؟", - "English": "Has your home address changed?", - "Roman Urdu": "Kya aap ka ghar ka pata badla hai?" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "yes", - "label": { - "Urdu": "ہاں", - "Roman Urdu": "Yes", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "no", - "label": { - "Urdu": "نہیں", - "Roman Urdu": "No", - "English": "No" - } - } - ], - "name": "address_change" - }, - { - "control": { - "appearance": "minimal" - }, - "name": "province", - "default": "${provider_province}", - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "label": { - "Urdu": "صوبہ", - "Roman Urdu": "Suba", - "English": "Province" - }, - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "stateProvince", - "openmrs_entity_parent": "usual_residence" - }, - "type": "select one", - "children": [ - { - "name": "kpk", - "label": { - "Urdu": "خیبر پختون خواہ", - "English": "Khyber Pakhtunkhwa", - "Roman Urdu": "Khyber Pakhtunkhwa" - } - }, - { - "name": "sindh", - "label": { - "Urdu": "سندھ", - "English": "Sindh", - "Roman Urdu": "Sindh" - } - }, - { - "name": "balochistan", - "label": { - "Urdu": "بلوچستان", - "English": "Balochistan", - "Roman Urdu": "Balochistan" - } - }, - { - "name": "punjab", - "label": { - "Urdu": "پنجاب", - "English": "Punjab", - "Roman Urdu": "Punjab" - } - }, - { - "name": "gilgit_baltistan", - "label": { - "Urdu": "گلگت بلتستان", - "English": "Gilgit Baltistan", - "Roman Urdu": "Gilgit Baltistan" - } - }, - { - "name": "kashmir", - "label": { - "Urdu": "کشمیر", - "English": "Kashmir", - "Roman Urdu": "Kashmir" - } - }, - { - "name": "fata", - "label": { - "Urdu": "فاٹا", - "English": "FATA", - "Roman Urdu": "FATA" - } - }, - { - "name": "out_of_country", - "label": { - "Urdu": "ملک سے باہر", - "English": "Out of Country", - "Roman Urdu": "Out of Country" - } - } - ] - }, - { - "control": { - "appearance": "minimal" - }, - "name": "city_village", - "choice_filter": "province=${province} or province='na'", - "default": "${provider_city}", - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "label": { - "Urdu": "شہر", - "Roman Urdu": "Shehr", - "English": "City" - }, - "itemset": "cities", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "cityVillage", - "openmrs_entity_parent": "usual_residence" - }, - "type": "select one" - }, - { - "control": { - "appearance": "minimal" - }, - "name": "town", - "choice_filter": "(province=${province} and city=${city_village} ) or city='na'", - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "label": { - "Urdu": "ٹاٰئون/ قصبہ/ بستی", - "Roman Urdu": "Town / Qasbah / Basti", - "English": "Town" - }, - "itemset": "towns", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "town", - "openmrs_entity_parent": "usual_residence" - }, - "type": "select one" - }, - { - "control": { - "appearance": "minimal" - }, - "name": "union_council", - "choice_filter": "(province=${province} and city=${city_village} and town=${town}) or town='na'", - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "label": { - "Urdu": "یونین کونسل", - "Roman Urdu": "Union Council", - "English": "Union Council" - }, - "itemset": "ucs", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "subTown", - "openmrs_entity_parent": "usual_residence" - }, - "type": "select one" - }, - { - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "type": "text", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "house", - "openmrs_entity_parent": "usual_residence" - }, - "name": "house_number", - "label": { - "Urdu": "گھر کا نمبر", - "Roman Urdu": "Ghar ka number", - "English": "House Number" - } - }, - { - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "type": "text", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "street", - "openmrs_entity_parent": "usual_residence" - }, - "name": "street", - "label": { - "Urdu": "گلی/کالونی/محلہ", - "Roman Urdu": "Gali/Colony/Mohalla", - "English": "Street" - } - }, - { - "bind": { - "relevant": "selected(${address_change}, 'yes')", - "required": "yes" - }, - "type": "text", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "landmark", - "openmrs_entity_parent": "usual_residence" - }, - "name": "landmark", - "label": { - "Urdu": "گھر کے قریب کوئی مشہور جگہ", - "Roman Urdu": "Ghar ke qareeb koi mashoor jagah", - "English": "Land Mark" - } - }, - { - "instance": { - "openmrs_entity_id": "163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "geopoint", - "name": "center_gps", - "label": { - "Urdu": "حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں", - "English": "Collect GPS coordinates of data entry location:", - "Roman Urdu": "Hasil karda malomaat ki jaga ke GPS coordinates darj karain" - } - }, - { - "control": { - "appearance": "minimal" - }, - "bind": { - "required": "yes" - }, - "type": "note", - "name": "child_was_suffering_from_a_disease_at_birth_note", - "label": { - "Urdu": "کیا بچہ پیدائش کے وقت کسی مرض میں مبتلا تھا؟ {existing_child_was_suffering_from_a_disease_at_birth}$", - "Roman Urdu": "Kya bacha pedaaish k waqt kissi marz mai mubtila tha? ${existing_child_was_suffering_from_a_disease_at_birth}", - "English": "Child was suffering from a disease at birth: ${existing_child_was_suffering_from_a_disease_at_birth}" - } - }, - { - "instance": { - "openmrs_entity_id": "163162AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "text", - "name": "aefi", - "label": { - "Urdu": "حفاظتی ٹیکوں کے مضر اثرات", - "English": "The temporary side-effects of immunization shots", - "Roman Urdu": "Hifazati teekon ke muzr asraat" - } - }, - { - "control": { - "appearance": "minimal" - }, - "name": "reminders_approval", - "bind": { - "required": "yes" - }, - "label": { - "Urdu": "کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ {existing_reminders_approval}$", - "English": "Are you willing to receive SMS reminders for your next visit? ${existing_reminders_approval}", - "Roman Urdu": "Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? ${existing_reminders_approval}" - }, - "instance": { - "openmrs_entity_id": "163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "yes", - "label": { - "Urdu": "ہاں", - "Roman Urdu": "Yes", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "no", - "label": { - "Urdu": "نہیں", - "Roman Urdu": "No", - "English": "No" - } - } - ] - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03", - "English": "Phone number should be 11 digits in the following format: 03*********", - "Roman Urdu": "Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********" - }, - "relevant": "${existing_reminders_approval}='yes'", - "constraint": "regex(., '^03[0-9]{9}$')" - }, - "type": "text", - "instance": { - "openmrs_entity_id": "159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "name": "contact_phone_number", - "label": { - "Urdu": "موبائل نمبر:{existing_contact_phone_number}$", - "English": "Mobile Number: ${existing_contact_phone_number}", - "Roman Urdu": "Mobile Number: ${existing_contact_phone_number}" - } - }, - { - "bind": { - "calculate": "${existing_client_birth_date} + 42" - }, - "type": "calculate", - "name": "six_weeks" - }, - { - "bind": { - "calculate": "${existing_client_birth_date} + 70" - }, - "type": "calculate", - "name": "ten_weeks" - }, - { - "bind": { - "calculate": "${existing_client_birth_date} + 98" - }, - "type": "calculate", - "name": "forteen_weeks" - }, - { - "bind": { - "calculate": "${existing_client_birth_date} + 245" - }, - "type": "calculate", - "name": "nine_months" - }, - { - "bind": { - "calculate": "${existing_client_birth_date} + 458" - }, - "type": "calculate", - "name": "fifteen_months" - }, - { - "control": { - "appearance": "minimal" - }, - "name": "vaccines", - "choice_filter": "name != if( ${e_bcg} != '', 'bcg' , '') and \nname != if( ${e_opv0} != '', 'opv0' , '') and \nname != if( ${e_penta1} != '', 'penta1' , '') and \nname != if( ${e_penta2} != '', 'penta2' , '') and \nname != if( ${e_penta3} != '', 'penta3' , '') and \nname != if( ${e_opv1} != '', 'opv1' , '') and \nname != if( ${e_opv2} != '', 'opv2' , '') and \nname != if( ${e_opv3} != '', 'opv3' , '') and \nname != if( ${e_pcv1} != '', 'pcv1' , '') and \nname != if( ${e_pcv2} != '', 'pcv2' , '') and \nname != if( ${e_pcv3} != '', 'pcv3' , '') and \nname != if( ${e_ipv} != '', 'ipv' , '') and \nname != if( ${e_measles1} != '', 'measles1' , '') and \nname != if( ${e_measles2} != '', 'measles2' , '')", - "label": { - "Urdu": "پچھلی تاریخ جب کسی اور سینٹر پر ٹیکے لگواِے گیے یا قطرے پلائے گئے", - "Roman Urdu": "Pichli tareekh jab kissi aur center par teekay lagwaye gaye ya katray pilaey gaye", - "English": "Retro vaccines" - }, - "itemset": "vaccines", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "type": "select all that apply" - }, - { - "type": "group", - "children": [ - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'bcg')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "bcg_retro", - "label": { - "Urdu": "بی سی جی", - "Roman Urdu": "BCG", - "English": "BCG" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'opv0')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv0_retro", - "label": { - "Urdu": "او پی وی 0", - "Roman Urdu": "OPV 0", - "English": "OPV 0" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'opv0')", - "calculate": "0" - }, - "type": "calculate", - "name": "opv0_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'pcv1')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv1_retro", - "label": { - "Urdu": "پی سی وی 1", - "Roman Urdu": "PCV1", - "English": "PCV1" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'pcv1')", - "calculate": "1" - }, - "type": "calculate", - "name": "pcv1_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'opv1')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv1_retro", - "label": { - "Urdu": "او پی وی1", - "Roman Urdu": "OPV 1", - "English": "OPV 1" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'opv1')", - "calculate": "1" - }, - "type": "calculate", - "name": "opv1_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'penta1')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta1_retro", - "label": { - "Urdu": "پینٹا ویلنٹ 1", - "Roman Urdu": "Pentavalent 1", - "English": "Pentavalent 1" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'penta1')", - "calculate": "1" - }, - "type": "calculate", - "name": "penta1_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'pcv2')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv2_retro", - "label": { - "Urdu": "پی سی وی 2", - "Roman Urdu": "PCV2", - "English": "PCV2" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'pcv2')", - "calculate": "2" - }, - "type": "calculate", - "name": "pcv2_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'opv2')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv2_retro", - "label": { - "Urdu": "او پی وی 2", - "Roman Urdu": "OPV 2", - "English": "OPV 2" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'opv2')", - "calculate": "2" - }, - "type": "calculate", - "name": "opv2_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'penta2')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta2_retro", - "label": { - "Urdu": "پینٹا ویلنٹ 2", - "Roman Urdu": "Pentavalent 2", - "English": "Pentavalent 2" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'penta2')", - "calculate": "2" - }, - "type": "calculate", - "name": "penta2_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'pcv3')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "pcv3_retro", - "label": { - "Urdu": "پی سی وی 3", - "Roman Urdu": "PCV3", - "English": "PCV3" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'penta2')", - "calculate": "3" - }, - "type": "calculate", - "name": "pcv3_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'opv3')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "opv3_retro", - "label": { - "Urdu": "او پی وی3", - "Roman Urdu": "OPV 3", - "English": "OPV 3" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'opv3')", - "calculate": "3" - }, - "type": "calculate", - "name": "opv3_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'penta3')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "penta3_retro", - "label": { - "Urdu": "پینٹا ویلنٹ 3", - "Roman Urdu": "Pentavalent 3", - "English": "Pentavalent 3" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'penta3')", - "calculate": "3" - }, - "type": "calculate", - "name": "penta3_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'ipv')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "ipv_retro", - "label": { - "Urdu": "آئی پی وی", - "Roman Urdu": "IPV", - "English": "IPV" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'measles1')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "measles1_retro", - "label": { - "Urdu": "خسرہ 1", - "Roman Urdu": "Measles 1", - "English": "Measles 1" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'measles1')", - "calculate": "1" - }, - "type": "calculate", - "name": "measles1_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "jr:constraintMsg": { - "Urdu": "حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے", - "English": "The date of vaccination must be greater than the child's birthdate and less than today.", - "Roman Urdu": "Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye." - }, - "relevant": "selected(${vaccines}, 'measles2')", - "constraint": ".>= ${existing_client_birth_date} and .<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "measles2_retro", - "label": { - "Urdu": "خسرہ 2", - "Roman Urdu": "Measles2", - "English": "Measles2" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'measles2')", - "calculate": "2" - }, - "type": "calculate", - "name": "measles2_dose", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "vaccines_group" - }, - { - "control": { - "appearance": "minimal" - }, - "name": "vaccines_2", - "choice_filter": "name != if( ${e_bcg} != '', 'bcg' , '') and \nname != if( ${e_opv0} != '', 'opv0' , '') and \nname != if( ${e_penta2} != '', 'penta2' , '') and \nname != if( ${e_penta1} != '', 'penta1' , '') and \nname != if( ${e_penta3} != '', 'penta3' , '') and \nname != if( ${e_opv1} != '', 'opv1' , '') and \nname != if( ${e_opv2} != '', 'opv2' , '') and \nname != if( ${e_opv3} != '', 'opv3' , '') and \nname != if( ${e_pcv1} != '', 'pcv1' , '') and \nname != if( ${e_pcv2} != '', 'pcv2' , '') and \nname != if( ${e_pcv3} != '', 'pcv3' , '') and \nname != if( ${e_measles1} != '', 'measles1' , '') and \nname != if( ${e_measles2} != '', 'measles2' , '') and \nname != if(selected(${vaccines}, 'bcg'), 'bcg', '') and \nname != if(selected(${vaccines}, 'opv0'), 'opv0', '') and \nname != if(selected(${vaccines}, 'penta1'), 'penta1', '') and \nname != if(selected(${vaccines}, 'opv1'), 'opv1', '') and \nname != if(selected(${vaccines}, 'pcv1'), 'pcv1', '') and \nname != if(selected(${vaccines}, 'penta2'), 'penta2', '') and \nname != if(selected(${vaccines}, 'opv2'), 'opv2', '') and \nname != if(selected(${vaccines}, 'pcv2'), 'pcv2', '') and \nname != if(selected(${vaccines}, 'penta3'), 'penta3', '') and \nname != if(selected(${vaccines}, 'opv3'), 'opv3', '') and \nname != if(selected(${vaccines}, 'pcv3'), 'pcv3', '') and\nname != if(selected(${vaccines}, 'ipv'), 'ipv', '') and \nname != if(selected(${vaccines}, 'measles1'), 'measles1', '') and \nname != if(selected(${vaccines}, 'measles2'), 'measles2', '')", - "bind": { - "required": "yes", - "constraint": "if(selected(${vaccines_2}, 'bcg') or selected(${vaccines_2}, 'opv0') , .>= ${existing_client_birth_date} and .<=${today}, if(selected(${vaccines_2}, 'opv1') or selected(${vaccines_2}, 'penta1'), .>= ${six_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv2') or selected(${vaccines_2}, 'penta2'), .>=${ten_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv3') or selected(${vaccines_2}, 'penta3'), .>=${forteen_weeks} and .<=${today}, if(selected(${vaccines_2}, 'measles1'), .>=${nine_months} and .<=${today}, if(selected(${vaccines_2}, 'measles2'), .>= ${fifteen_months} and .<=${today}))))))" - }, - "label": { - "Urdu": "آج کون کون سی ویکسین دی گئی ہیں؟", - "Roman Urdu": "Aaj kon kon si vaccine di gai hain?", - "English": "Vaccines administered" - }, - "itemset": "vaccines", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "type": "select all that apply" - }, - { - "name": "vaccination_date", - "default": "${today}", - "bind": { - "required": "yes", - "constraint": "if(selected(${vaccines_2}, 'bcg') or selected(${vaccines_2}, 'opv0') , .>= ${existing_client_birth_date} and .<=${today}, if(selected(${vaccines_2}, 'opv1') or selected(${vaccines_2}, 'penta1'), .>= ${six_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv2') or selected(${vaccines_2}, 'penta2'), .>=${ten_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv3') or selected(${vaccines_2}, 'penta3'), .>=${forteen_weeks} and .<=${today}, if(selected(${vaccines_2}, 'measles1'), .>=${nine_months} and .<=${today}, if(selected(${vaccines_2}, 'measles2'), .>= ${fifteen_months} and .<=${today}))))))" - }, - "label": { - "Urdu": "تاریخ", - "English": "Vaccination date", - "Roman Urdu": "Tareekh" - }, - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "date" - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'bcg'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "bcg", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'opv0'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "opv0", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'opv0')", - "calculate": "0" - }, - "type": "calculate", - "name": "opv0_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'pcv1'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "pcv1", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'pcv1')", - "calculate": "1" - }, - "type": "calculate", - "name": "pcv1_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'opv1'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "opv1", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'opv1')", - "calculate": "1" - }, - "type": "calculate", - "name": "opv1_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'penta1'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "penta1", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'penta1')", - "calculate": "1" - }, - "type": "calculate", - "name": "penta1_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'pcv2'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "pcv2", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'pcv2')", - "calculate": "2" - }, - "type": "calculate", - "name": "pcv2_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'opv2'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "opv2", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'opv2')", - "calculate": "2" - }, - "type": "calculate", - "name": "opv2_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'penta2'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "penta2", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'penta2')", - "calculate": "2" - }, - "type": "calculate", - "name": "penta2_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'pcv3'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "pcv3", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'pcv3')", - "calculate": "3" - }, - "type": "calculate", - "name": "pcv3_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'opv3'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "opv3", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'opv3')", - "calculate": "3" - }, - "type": "calculate", - "name": "opv3_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'penta3'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "penta3", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'penta3')", - "calculate": "3" - }, - "type": "calculate", - "name": "penta3_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines}, 'ipv')", - "calculate": "if(selected(${vaccines_2}, 'ipv'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "ipv", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'measles1'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "measles1", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'measles1')", - "calculate": "1" - }, - "type": "calculate", - "name": "measles1_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "calculate": "if(selected(${vaccines_2}, 'measles2'),${vaccination_date},'')" - }, - "type": "calculate", - "name": "measles2", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "bind": { - "relevant": "selected(${vaccines_2}, 'measles2')", - "calculate": "2" - }, - "type": "calculate", - "name": "measles2_dose_today", - "instance": { - "openmrs_entity": "concept", - "openmrs_entity_id": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity_parent": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "control": { - "bodyless": true - }, - "type": "group", - "children": [ - { - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate", - "name": "instanceID" - } - ], - "name": "meta" - } - ] -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_followup/form.xml b/opensrp-core/src/test/resources/form/child_followup/form.xml deleted file mode 100644 index 88fbcb3586..0000000000 --- a/opensrp-core/src/test/resources/form/child_followup/form.xml +++ /dev/null @@ -1,2276 +0,0 @@ - -
- - -

بچّوں کا فالو اپ رجسٹر برائے ٹیکاجات - Child Follow Up Vaccination Register

- - - - - - - - - - - - -
-
- - کیا آپ کا گھر کا پتہ بدلا ہے؟ - - Has your home address changed? - - - Kya aap ka ghar ka pata badla - hai? - - -
- - -
-
-
- - - - - - - - - - - - - -
- - - - - - - - - - - - - - -
- - - - - -
diff --git a/opensrp-core/src/test/resources/form/child_followup/form_definition.json b/opensrp-core/src/test/resources/form/child_followup/form_definition.json deleted file mode 100644 index 38d578690e..0000000000 --- a/opensrp-core/src/test/resources/form/child_followup/form_definition.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkchild", - "default_bind_path" : "/model/instance/Child_Vaccination_Followup/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_province", - "shouldLoadValue" : true - }, { - "name" : "existing_first_name", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_first_name", - "shouldLoadValue" : true - }, { - "name" : "existing_last_name", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_last_name", - "shouldLoadValue" : true - }, { - "name" : "existing_mother_name", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_mother_name", - "shouldLoadValue" : true - }, { - "name" : "existing_gender", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_gender", - "shouldLoadValue" : true - }, { - "name" : "existing_birth_date", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_client_birth_date", - "shouldLoadValue" : true - }, { - "name" : "existing_client_reg_date", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_client_reg_date", - "shouldLoadValue" : true - }, { - "name" : "existing_landmark", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_landmark", - "shouldLoadValue" : true - }, { - "name" : "existing_house_number", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_house_number", - "shouldLoadValue" : true - }, { - "name" : "existing_street", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_street", - "shouldLoadValue" : true - }, { - "name" : "existing_union_council", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_union_council", - "shouldLoadValue" : true - }, { - "name" : "existing_town", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_town", - "shouldLoadValue" : true - }, { - "name" : "existing_city_village", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_city_village", - "shouldLoadValue" : true - }, { - "name" : "existing_province", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_province", - "shouldLoadValue" : true - }, { - "name" : "existing_union_councilname", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_union_councilname", - "shouldLoadValue" : true - }, { - "name" : "existing_townname", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_townname", - "shouldLoadValue" : true - }, { - "name" : "existing_city_villagename", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_city_villagename", - "shouldLoadValue" : true - }, { - "name" : "existing_provincename", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_provincename", - "shouldLoadValue" : true - }, { - "name" : "existing_ethnicity", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_ethnicity", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "existing_epi_card_number", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_epi_card_number", - "shouldLoadValue" : true - }, { - "name" : "existing_child_was_suffering_from_a_disease_at_birth", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_child_was_suffering_from_a_disease_at_birth", - "shouldLoadValue" : true - }, { - "name" : "existing_reminders_approval", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_reminders_approval", - "shouldLoadValue" : true - }, { - "name" : "existing_contact_phone_number", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_contact_phone_number", - "shouldLoadValue" : true - }, { - "name" : "e_bcg", - "bind" : "/model/instance/Child_Vaccination_Followup/e_bcg", - "shouldLoadValue" : true - }, { - "name" : "e_opv0", - "bind" : "/model/instance/Child_Vaccination_Followup/e_opv0", - "shouldLoadValue" : true - }, { - "name" : "e_penta2", - "bind" : "/model/instance/Child_Vaccination_Followup/e_penta2", - "shouldLoadValue" : true - }, { - "name" : "e_penta1", - "bind" : "/model/instance/Child_Vaccination_Followup/e_penta1", - "shouldLoadValue" : true - }, { - "name" : "e_penta3", - "bind" : "/model/instance/Child_Vaccination_Followup/e_penta3", - "shouldLoadValue" : true - }, { - "name" : "e_opv1", - "bind" : "/model/instance/Child_Vaccination_Followup/e_opv1", - "shouldLoadValue" : true - }, { - "name" : "e_opv2", - "bind" : "/model/instance/Child_Vaccination_Followup/e_opv2", - "shouldLoadValue" : true - }, { - "name" : "e_opv3", - "bind" : "/model/instance/Child_Vaccination_Followup/e_opv3", - "shouldLoadValue" : true - }, { - "name" : "e_pcv1", - "bind" : "/model/instance/Child_Vaccination_Followup/e_pcv1", - "shouldLoadValue" : true - }, { - "name" : "e_pcv2", - "bind" : "/model/instance/Child_Vaccination_Followup/e_pcv2", - "shouldLoadValue" : true - }, { - "name" : "e_pcv3", - "bind" : "/model/instance/Child_Vaccination_Followup/e_pcv3", - "shouldLoadValue" : true - }, { - "name" : "e_ipv", - "bind" : "/model/instance/Child_Vaccination_Followup/e_ipv", - "shouldLoadValue" : true - }, { - "name" : "e_measles1", - "bind" : "/model/instance/Child_Vaccination_Followup/e_measles1", - "shouldLoadValue" : true - }, { - "name" : "e_measles2", - "bind" : "/model/instance/Child_Vaccination_Followup/e_measles2", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Child_Vaccination_Followup/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Child_Vaccination_Followup/start" - }, { - "name" : "end", - "bind" : "/model/instance/Child_Vaccination_Followup/end" - }, { - "name" : "today", - "bind" : "/model/instance/Child_Vaccination_Followup/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Child_Vaccination_Followup/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Child_Vaccination_Followup/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Child_Vaccination_Followup/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Child_Vaccination_Followup/phonenumber" - }, { - "name" : "existing_client_reg_date_note", - "bind" : "/model/instance/Child_Vaccination_Followup/existing_client_reg_date_note" - }, { - "name" : "program_client_id_note", - "bind" : "/model/instance/Child_Vaccination_Followup/program_client_id_note" - }, { - "name" : "epi_card_number_note", - "bind" : "/model/instance/Child_Vaccination_Followup/epi_card_number_note" - }, { - "name" : "first_name_note", - "bind" : "/model/instance/Child_Vaccination_Followup/first_name_note" - }, { - "name" : "last_name_note", - "bind" : "/model/instance/Child_Vaccination_Followup/last_name_note" - }, { - "name" : "child_age", - "bind" : "/model/instance/Child_Vaccination_Followup/child_age" - }, { - "name" : "calc_dob_note", - "bind" : "/model/instance/Child_Vaccination_Followup/calc_dob_note" - }, { - "name" : "gender_note", - "bind" : "/model/instance/Child_Vaccination_Followup/gender_note" - }, { - "name" : "mother_name_note", - "bind" : "/model/instance/Child_Vaccination_Followup/mother_name_note" - }, { - "name" : "exisiting_ethnicity_note", - "bind" : "/model/instance/Child_Vaccination_Followup/exisiting_ethnicity_note" - }, { - "name" : "address", - "bind" : "/model/instance/Child_Vaccination_Followup/address" - }, { - "name" : "address_change", - "bind" : "/model/instance/Child_Vaccination_Followup/address_change" - }, { - "name" : "province", - "bind" : "/model/instance/Child_Vaccination_Followup/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Child_Vaccination_Followup/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Child_Vaccination_Followup/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Child_Vaccination_Followup/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Child_Vaccination_Followup/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Child_Vaccination_Followup/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Child_Vaccination_Followup/landmark" - }, { - "name" : "center_gps", - "bind" : "/model/instance/Child_Vaccination_Followup/center_gps" - }, { - "name" : "child_was_suffering_from_a_disease_at_birth_note", - "bind" : "/model/instance/Child_Vaccination_Followup/child_was_suffering_from_a_disease_at_birth_note" - }, { - "name" : "aefi", - "bind" : "/model/instance/Child_Vaccination_Followup/aefi" - }, { - "name" : "reminders_approval", - "bind" : "/model/instance/Child_Vaccination_Followup/reminders_approval" - }, { - "name" : "contact_phone_number", - "bind" : "/model/instance/Child_Vaccination_Followup/contact_phone_number" - }, { - "name" : "six_weeks", - "bind" : "/model/instance/Child_Vaccination_Followup/six_weeks" - }, { - "name" : "ten_weeks", - "bind" : "/model/instance/Child_Vaccination_Followup/ten_weeks" - }, { - "name" : "forteen_weeks", - "bind" : "/model/instance/Child_Vaccination_Followup/forteen_weeks" - }, { - "name" : "nine_months", - "bind" : "/model/instance/Child_Vaccination_Followup/nine_months" - }, { - "name" : "fifteen_months", - "bind" : "/model/instance/Child_Vaccination_Followup/fifteen_months" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines" - }, { - "name" : "bcg_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/bcg_retro" - }, { - "name" : "opv0_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv0_retro" - }, { - "name" : "opv0_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv0_dose" - }, { - "name" : "pcv1_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv1_retro" - }, { - "name" : "pcv1_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv1_dose" - }, { - "name" : "opv1_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv1_retro" - }, { - "name" : "opv1_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv1_dose" - }, { - "name" : "penta1_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta1_retro" - }, { - "name" : "penta1_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta1_dose" - }, { - "name" : "pcv2_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv2_retro" - }, { - "name" : "pcv2_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv2_dose" - }, { - "name" : "opv2_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv2_retro" - }, { - "name" : "opv2_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv2_dose" - }, { - "name" : "penta2_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta2_retro" - }, { - "name" : "penta2_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta2_dose" - }, { - "name" : "pcv3_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv3_retro" - }, { - "name" : "pcv3_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/pcv3_dose" - }, { - "name" : "opv3_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv3_retro" - }, { - "name" : "opv3_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/opv3_dose" - }, { - "name" : "penta3_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta3_retro" - }, { - "name" : "penta3_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/penta3_dose" - }, { - "name" : "ipv_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/ipv_retro" - }, { - "name" : "measles1_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/measles1_retro" - }, { - "name" : "measles1_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/measles1_dose" - }, { - "name" : "measles2_retro", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/measles2_retro" - }, { - "name" : "measles2_dose", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_group/measles2_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccines_2" - }, { - "name" : "vaccination_date", - "bind" : "/model/instance/Child_Vaccination_Followup/vaccination_date" - }, { - "name" : "bcg", - "bind" : "/model/instance/Child_Vaccination_Followup/bcg" - }, { - "name" : "opv0", - "bind" : "/model/instance/Child_Vaccination_Followup/opv0" - }, { - "name" : "opv0_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/opv0_dose_today" - }, { - "name" : "pcv1", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv1" - }, { - "name" : "pcv1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv1_dose_today" - }, { - "name" : "opv1", - "bind" : "/model/instance/Child_Vaccination_Followup/opv1" - }, { - "name" : "opv1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/opv1_dose_today" - }, { - "name" : "penta1", - "bind" : "/model/instance/Child_Vaccination_Followup/penta1" - }, { - "name" : "penta1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/penta1_dose_today" - }, { - "name" : "pcv2", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv2" - }, { - "name" : "pcv2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv2_dose_today" - }, { - "name" : "opv2", - "bind" : "/model/instance/Child_Vaccination_Followup/opv2" - }, { - "name" : "opv2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/opv2_dose_today" - }, { - "name" : "penta2", - "bind" : "/model/instance/Child_Vaccination_Followup/penta2" - }, { - "name" : "penta2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/penta2_dose_today" - }, { - "name" : "pcv3", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv3" - }, { - "name" : "pcv3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/pcv3_dose_today" - }, { - "name" : "opv3", - "bind" : "/model/instance/Child_Vaccination_Followup/opv3" - }, { - "name" : "opv3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/opv3_dose_today" - }, { - "name" : "penta3", - "bind" : "/model/instance/Child_Vaccination_Followup/penta3" - }, { - "name" : "penta3_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/penta3_dose_today" - }, { - "name" : "ipv", - "bind" : "/model/instance/Child_Vaccination_Followup/ipv" - }, { - "name" : "measles1", - "bind" : "/model/instance/Child_Vaccination_Followup/measles1" - }, { - "name" : "measles1_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/measles1_dose_today" - }, { - "name" : "measles2", - "bind" : "/model/instance/Child_Vaccination_Followup/measles2" - }, { - "name" : "measles2_dose_today", - "bind" : "/model/instance/Child_Vaccination_Followup/measles2_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Child_Vaccination_Followup/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_followup/form_submission.json b/opensrp-core/src/test/resources/form/child_followup/form_submission.json deleted file mode 100644 index c87aa72b38..0000000000 --- a/opensrp-core/src/test/resources/form/child_followup/form_submission.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "_id": "3958f907af3f2842a3945b4aa9fd70b1", - "_rev": "1-3ceb37b50c6fd42051f2a9c1f809bf4e", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "c9386e66-97d0-4c2e-8e72-3e0fe6981cbe", - "formName": "child_followup", - "entityId": "101aab44-5377-4846-95ad-442b857b54d2", - "clientVersion": 1476448247921, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "pkchild", - "default_bind_path": "/model/instance/Child_Vaccination_Followup/", - "fields": [ - { - "name": "id", - "value": "101aab44-5377-4846-95ad-442b857b54d2", - "source": "pkchild.id" - }, - { - "name": "instanceID", - "value": "uid:c9386e66-97d0-4c2e-8e72-3e0fe6981cbe", - "source": "pkchild.instanceID" - }, - { - "name": "provider_id", - "value": "demotest", - "source": "pkchild.provider_id" - }, - { - "name": "provider_location_id", - "value": "BHU 33C", - "source": "pkchild.provider_location_id" - }, - { - "name": "start", - "value": "2016-09-16 10:20:54", - "source": "pkchild.start" - }, - { - "name": "end", - "value": "2016-09-16 10:20:54", - "source": "pkchild.end" - }, - { - "name": "today", - "value": "2016-09-20", - "source": "pkchild.today" - }, - { - "name": "vaccination_date", - "value": "2016-09-20", - "source": "pkchild.vaccination_date" - }, - { - "name": "vaccines", - "value": "penta1", - "source": "pkchild.vaccines" - }, - { - "name": "pentavalent_1", - "value": "2016-09-20", - "source": "pkchild.penta1" - }, - { - "name": "pentavalent_1_retro", - "value": "2016-09-20", - "source": "pkchild.penta1" - }, - { - "name": "pentavalent_2", - "source": "pkchild.penta1" - }, - { - "name": "pentavalent_2_retro", - "source": "pkchild.penta1" - }, - { - "name": "penta1_dose_today", - "value": "1", - "source": "pkchild.penta1_dose_today" - } - ], - "fieldsAsMap": { - "id": "101aab44-5377-4846-95ad-442b857b54d2", - "vaccines": "penta1", - "penta1_dose_today": "1", - "pentavalent_1": "2016-09-20", - "pentavalent_1_retro": "2016-09-20", - "start": "2016-09-16 10:20:54", - "provider_id": "demotest", - "instanceID": "uid:c9386e66-97d0-4c2e-8e72-3e0fe6981cbe", - "vaccination_date": "2016-09-20", - "today": "2016-09-20", - "provider_location_id": "BHU 33C", - "end": "2016-09-16 10:20:54" - } - } - }, - "serverVersion": 1484828390836 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/child_followup/model.xml b/opensrp-core/src/test/resources/form/child_followup/model.xml deleted file mode 100644 index b8d42cd6ba..0000000000 --- a/opensrp-core/src/test/resources/form/child_followup/model.xml +++ /dev/null @@ -1,1685 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${provider_province} - ${provider_city} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${today} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - bcg - - - static_instance-vaccines-1 - opv0 - - - static_instance-vaccines-2 - pcv1 - - - static_instance-vaccines-3 - opv1 - - - static_instance-vaccines-4 - penta1 - - - static_instance-vaccines-5 - pcv2 - - - static_instance-vaccines-6 - opv2 - - - static_instance-vaccines-7 - penta2 - - - static_instance-vaccines-8 - pcv3 - - - static_instance-vaccines-9 - opv3 - - - static_instance-vaccines-10 - penta3 - - - static_instance-vaccines-11 - ipv - - - static_instance-vaccines-12 - measles1 - - - static_instance-vaccines-13 - measles2 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/form/entity_relationship.json b/opensrp-core/src/test/resources/form/entity_relationship.json deleted file mode 100644 index 136f8cee02..0000000000 --- a/opensrp-core/src/test/resources/form/entity_relationship.json +++ /dev/null @@ -1,34 +0,0 @@ -[ - { - "parent": "household", - "child": "elco", - "field": "wife", - "kind": "one_to_many", - "from": "household.id", - "to": "elco.relationalid" - }, - { - "parent": "elco", - "child": "child", - "field": "child", - "kind": "one_to_many", - "from": "elco.id", - "to": "child.motherCaseId" - }, - { - "parent": "eligible_couple", - "child": "mother", - "field": "wife", - "kind": "one_to_one", - "from": "eligible_couple.id", - "to": "mother.ecCaseId" - }, - { - "parent": "mother", - "child": "child", - "field": "children", - "kind": "one_to_many", - "from": "mother.id", - "to": "child.motherCaseId" - } -] \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form.json b/opensrp-core/src/test/resources/form/new_household_registration/form.json deleted file mode 100644 index 0288ac30df..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form.json +++ /dev/null @@ -1,655 +0,0 @@ -{ - "default_language": "Bengali", - "id_string": "FWNewHH_1", - "children": [ - { - "name": "existing_location", - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "hidden" - }, - { - "name": "today", - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "today" - }, - { - "name": "start", - "instance": { - "openmrs_entity_id": "encounter_start", - "openmrs_entity": "encounter" - }, - "type": "start" - }, - { - "name": "end", - "instance": { - "openmrs_entity_id": "encounter_end", - "openmrs_entity": "encounter" - }, - "type": "end" - }, - { - "name": "FWNHREGDATE", - "hint": { - "Bengali": "আজকের তারিখ দিন", - "English": "Confirm Today’s date is correct" - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "তারিখ আজকের তারিখের চেয়ে বেশী হতে পারবেনা", - "English": "Date cannot be greater than current date." - }, - "required": "yes", - "constraint": ".<=${today}" - }, - "label": { - "Bengali": "তথ্য সংগ্রহের তারিখ", - "English": "Date of Interview" - }, - "instance": { - "openmrs_entity_id": "160753AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "date" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWGOBHHID", - "hint": { - "Bengali": "অনুগ্রহ করে খানার দরজাতে লেখা কালো রঙের JiVitA/Study household ID (HHID) টি টাইপ করুন", - "English": "Please input the Black – painted Government household ID (HHID) as displayed on the door/wall of the HH." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "অনুগ্রহ করে ০০০১ থেকে ৯৯৯৯ এর মধ্যে ৪ ডিজিটের GoB HHID টাইপ করুন", - "English": "Please enter 4 digits of GoB HHID from 0001 to 9999" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{4})[0-9]{4}$')" - }, - "label": { - "Bengali": "GoB HHID", - "English": "GoB HHID" - }, - "instance": { - "openmrs_entity_id": "GOB HHID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWJIVHHID", - "hint": { - "Bengali": "অনুগ্রহ করে খানার দরজাতে লেখা লাল রঙের JiVitA/Study household ID (HHID) টি টাইপ করুন", - "English": "Please input the RED – painted JiVitA / Study household ID (HHID) as displayed on the door/wall of the HH." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "অনুগ্রহ করে ০০০১ থেকে ৯৯৯৯ এর মধ্যে ৪ ডিজিটের JiVitA HHID টাইপ করুন", - "English": "Please enter 4 digits of JiVitA HHID from 0001 to 9999" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{4})[0-9]{4}$')" - }, - "label": { - "Bengali": "JiVitA HHID", - "English": "JiVitA HHID" - }, - "instance": { - "openmrs_entity_id": "JiVitA HHID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "name": "FWNHNEARTO", - "label": { - "Bengali": "নিকটবর্তী স্থান", - "English": "Near to" - }, - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "landmark", - "openmrs_entity": "person_address" - }, - "type": "text" - }, - { - "name": "FWNHHHGPS", - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "জি পি এস", - "English": "Collect GPS Location of HH" - }, - "instance": { - "openmrs_entity_parent": "usual_residence", - "openmrs_entity_id": "geopoint", - "openmrs_entity": "person_address" - }, - "type": "geopoint" - }, - { - "name": "FWHOHFNAME", - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "খানা প্রধানের নাম-", - "English": "Head of Household Name" - }, - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "name": "FWHOHLNAME", - "bind": { - "calculate": "\".\"" - }, - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - }, - "type": "calculate" - }, - { - "name": "FWHOHBIRTHDATE", - "bind": { - "calculate": "\"1900-01-01\"" - }, - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - }, - "type": "calculate" - }, - { - "name": "FWHOHGENDER", - "bind": { - "calculate": "\"male\"" - }, - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - }, - "type": "calculate" - }, - { - "name": "FWNHHMBRNUM", - "label": { - "Bengali": "খানা সদস্যের সংখ্যা কত?", - "English": "How many people are currently living in this household?" - }, - "instance": { - "openmrs_entity_id": "5611AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "integer" - }, - { - "children": [ - { - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - }, - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - }, - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "9", - "label": { - "Bengali": "জানিনা", - "English": "Don't know" - }, - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "FWNHHMWRA", - "label": { - "Bengali": "এই খানায় কি প্রজনন বয়সী বিবাহিত মহিলা আছেন?", - "English": "Are there any MWRAs in this Household?" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "FWWOMFNAME", - "hint": { - "Bengali": "অনুগ্রহ করে মহিলার নাম টাইপ করুন", - "English": "Please type woman's name" - }, - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "মহিলার নাম-", - "English": "Woman Name" - }, - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "name": "FWWOMLNAME", - "bind": { - "calculate": "\".\"" - }, - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - }, - "type": "calculate" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMNID", - "hint": { - "Bengali": "অনুগ্রহ করে জাতীয় পরিচয়পত্র কার্ড দেখে সরকার প্রদত্ত আইডি টাইপ করুন", - "English": "Please input the Government ID as displayed on the national ID card" - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "জাতীয় পরিচয়পত্র নং ১৩ অথবা ১৭ ডিজিটের হবে", - "English": "National ID should be 13 or 17 digits" - }, - "constraint": "regex(., '^(?!0{13})[0-9]{13}$') or regex(., '^(?!0{17})[0-9]{17}$')" - }, - "label": { - "Bengali": "মহিলার জাতীয় পরিচয়পত্র নং-", - "English": "Woman's National ID Number" - }, - "instance": { - "openmrs_entity_id": "NID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMBID", - "hint": { - "Bengali": "অনুগ্রহ করে জন্ম নিবন্ধন সনদ দেখে সরকার প্রদত্ত আইডি টাইপ করুন", - "English": "Please input the Government ID as displayed on the birth certificate" - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "জন্ম নিবন্ধন সনদ নং ১৭ ডিজিটের হবে", - "English": "Birth Registration ID should be 17 digits" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{17})[0-9]{17}$')" - }, - "label": { - "Bengali": "মহিলার জন্ম নিবন্ধন সনদ নং-", - "English": "Woman's Birth Registration ID" - }, - "instance": { - "openmrs_entity_id": "Birth Registration ID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "name": "FWHUSNAME", - "hint": { - "Bengali": "অনুগ্রহ করে স্বামীর নাম টাইপ করুন", - "English": "Please type husband's name" - }, - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "স্বামীর নাম-", - "English": "Husband Name" - }, - "instance": { - "openmrs_entity_id": "161135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "text" - }, - { - "name": "FWBIRTHDATE", - "hint": { - "Bengali": "মহিলার জন্ম নিবন্ধন পত্র থাকলে সেখান থেকে জন্ম তারিখটি লিখে নিন। যদি জন্ম তারিখ জানা না থাকে তবে তারিখ ১৫ সিলেক্ট করুন, যদি মাস জানা না থাকে তবে মাস ৬ (জুন) সিলেক্ট করুন", - "English": "If birth certificate is available, take date of birth from the birth certificate. \nIf date of birth is unknown, choose 15th as the date of birth. If month is unknown, choose month 06 (June) as month of birth." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "মহিলার বয়স অবশ্যই ১৩ বছরের বেশী হবে", - "English": "Woman must be older than 13 years of age" - }, - "required": "yes", - "constraint": "((${FWBIRTHDATE})+4745) <= today()" - }, - "label": { - "Bengali": "মহিলার জন্ম তারিখ", - "English": "Woman's Date of Birth" - }, - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - }, - "type": "date" - }, - { - "name": "FWGENDER", - "bind": { - "calculate": "\"female\"" - }, - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - }, - "type": "calculate" - }, - { - "name": "FWWOMAGE", - "bind": { - "calculate": "round(((${today} - ${FWBIRTHDATE}) div 365.25),0)" - }, - "type": "calculate" - }, - { - "name": "display_age", - "label": { - "Bengali": "মহিলার বয়স ${FWWOMAGE}", - "English": "The woman's age is ${FWWOMAGE}." - }, - "type": "note" - }, - { - "children": [ - { - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - }, - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - }, - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "9", - "label": { - "Bengali": "জানিনা", - "English": "Don't know" - }, - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "FWNHWOMSTRMEN", - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "আপনার কি মাসিক একেবারে উঠে গেছে/আপনি কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?", - "English": "Are you currently menopausal or sterilized?" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "0", - "label": { - "Bengali": "মারা গেছেন", - "English": "Deceased" - }, - "instance": { - "openmrs_code": "159AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "1", - "label": { - "Bengali": "বেঁচে আছেন", - "English": "Alive" - }, - "instance": { - "openmrs_code": "160429AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "9", - "label": { - "Bengali": "জানিনা", - "English": "Don't know" - }, - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "FWNHWOMHUSALV", - "bind": { - "relevant": "${FWNHWOMSTRMEN}='0'", - "required": "yes" - }, - "label": { - "Bengali": "আপনার স্বামী কি বেঁচে আছেন?", - "English": "Is the husband alive?" - }, - "instance": { - "openmrs_entity_id": "5561AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - }, - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - }, - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "9", - "label": { - "Bengali": "জানিনা", - "English": "Don't know" - }, - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "FWNHWOMHUSLIV", - "bind": { - "relevant": "${FWNHWOMSTRMEN}='0' and ${FWNHWOMHUSALV}='1'", - "required": "yes" - }, - "label": { - "Bengali": "আপনি কি বর্তমানে আপনার স্বামীর সাথে বসবাস করছেন?", - "English": "Are you currently living with your husband?" - }, - "instance": { - "openmrs_entity_id": "1060AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - }, - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - }, - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - }, - { - "name": "9", - "label": { - "Bengali": "জানিনা", - "English": "Don't know" - }, - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - } - } - ], - "name": "FWNHWOMHUSSTR", - "bind": { - "relevant": "${FWNHWOMSTRMEN}='0' and ${FWNHWOMHUSLIV}='1'", - "required": "yes" - }, - "label": { - "Bengali": "আপনার স্বামী কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?", - "English": "Is the husband sterilized?" - }, - "type": "select one" - }, - { - "name": "FWELIGIBLE", - "bind": { - "calculate": "if(${FWNHWOMSTRMEN}='0' and ${FWNHWOMHUSLIV}='1' and ${FWNHWOMHUSSTR}='0',1,0)" - }, - "type": "calculate" - }, - { - "name": "add_women", - "label": { - "Bengali": "এই খানায় যদি আরও কোন মহিলা থাকে যাকে রেজিস্ট্রেশন করা হয়নি, তাহলে '+' অপশনটি বাছুন এবং একই প্রক্রিয়ায় পরবর্তী মহিলাকে রেজিস্ট্রেশন করুন", - "English": "If there are any additional unregistered women in this household, select the '+' to add them now." - }, - "type": "note" - } - ], - "name": "woman", - "hint": { - "Bengali": "আমরা এখন মহিলাটির রেজিস্ট্রেশন প্রক্রিয়া শুরু করতে যাচ্ছি। অনুগ্রহ করে মহিলাটিরে তার জন্ম নিবন্ধন স ও জাতীয় পরিচয়পত্র নিয়ে আসতে বলুন।", - "English": "We will now register the woman. Please ask her to bring her National ID Card and Birth Certificate." - }, - "bind": { - "relevant": "${FWNHHMWRA}='1'" - }, - "label": { - "Bengali": "মহিলা তথ্যঃ", - "English": "New Woman Registration" - }, - "instance": { - "openmrs_entity_id": "Census and New Woman Registration", - "openmrs_entity": "person" - }, - "type": "repeat" - }, - { - "name": "join_names", - "bind": { - "calculate": "join(' ', ${FWWOMFNAME})" - }, - "type": "calculate" - }, - { - "name": "MWRA", - "bind": { - "calculate": "if(${join_names} = '', 0, count(${woman}))" - }, - "type": "calculate" - }, - { - "control": { - "bodyless": true - }, - "children": [ - { - "name": "instanceID", - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate" - } - ], - "name": "meta", - "type": "group" - } - ], - "instance": { - "encounter_type": "New Household Registration" - }, - "version": "201505070930", - "type": "survey", - "name": "FWNewHH", - "sms_keyword": "FWNewHH", - "title": "FW new HH Reg" -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form.xml b/opensrp-core/src/test/resources/form/new_household_registration/form.xml deleted file mode 100644 index 85089deaa5..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form.xml +++ /dev/null @@ -1,26 +0,0 @@ - -
-

নতুন খানা রেজিস্ট্রেশন ফর্ম

- - - - - - - - - -
এই খানায় কি প্রজনন বয়সী বিবাহিত মহিলা আছেন?Are there any MWRAs in this Household? -
-

মহিলা তথ্যঃNew Woman Registration

আপনার কি মাসিক একেবারে উঠে গেছে/আপনি কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?Are you currently menopausal or sterilized?* -
আপনার স্বামী কি বেঁচে আছেন?Is the husband alive?* -
আপনি কি বর্তমানে আপনার স্বামীর সাথে বসবাস করছেন?Are you currently living with your husband?* -
আপনার স্বামী কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?Is the husband sterilized?* -
-
-
- -
XML to HTML transformation for form took 0.03 secondsThis validation is yet not functional.
diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_definition.json b/opensrp-core/src/test/resources/form/new_household_registration/form_definition.json deleted file mode 100644 index f1dea2a941..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_definition.json +++ /dev/null @@ -1,166 +0,0 @@ -{ - "form_data_definition_version": "1", - "form": { - "default_bind_path": "/model/instance/FWNewHH", - "bind_type": "household", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "existing_location", - "bind": "/model/instance/FWNewHH/existing_location" - }, - { - "name": "today", - "bind": "/model/instance/FWNewHH/today" - }, - { - "name": "start", - "bind": "/model/instance/FWNewHH/start" - }, - { - "name": "end", - "bind": "/model/instance/FWNewHH/end" - }, - { - "name": "FWNHREGDATE", - "bind": "/model/instance/FWNewHH/FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "bind": "/model/instance/FWNewHH/FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "bind": "/model/instance/FWNewHH/FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "bind": "/model/instance/FWNewHH/FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "bind": "/model/instance/FWNewHH/FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "bind": "/model/instance/FWNewHH/FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "bind": "/model/instance/FWNewHH/FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "bind": "/model/instance/FWNewHH/FWHOHBIRTHDATE" - }, - { - "name": "FWHOHBIRTHDATEAPPROX", - "bind": "/model/instance/FWNewHH/FWHOHBIRTHDATEAPPROX" - }, - { - "name": "FWHOHGENDER", - "bind": "/model/instance/FWNewHH/FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "bind": "/model/instance/FWNewHH/FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "bind": "/model/instance/FWNewHH/FWNHHMWRA" - }, - { - "name": "join_names", - "bind": "/model/instance/FWNewHH/join_names" - }, - { - "name": "MWRA", - "bind": "/model/instance/FWNewHH/MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "GOBHHID", - "bind": "/model/instance/FWNewHH/woman/GOBHHID" - }, - { - "name": "JiVitAHHID", - "bind": "/model/instance/FWNewHH/woman/JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "bind": "/model/instance/FWNewHH/woman/FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "bind": "/model/instance/FWNewHH/woman/FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "bind": "/model/instance/FWNewHH/woman/FWWOMNID" - }, - { - "name": "FWWOMBID", - "bind": "/model/instance/FWNewHH/woman/FWWOMBID" - }, - { - "name": "FWHUSNAME", - "bind": "/model/instance/FWNewHH/woman/FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "bind": "/model/instance/FWNewHH/woman/FWBIRTHDATE" - }, - { - "name": "FWBIRTHDATEAPPROX", - "bind": "/model/instance/FWNewHH/woman/FWBIRTHDATEAPPROX" - }, - { - "name": "FWGENDER", - "bind": "/model/instance/FWNewHH/woman/FWGENDER" - }, - { - "name": "FWWOMAGE", - "bind": "/model/instance/FWNewHH/woman/FWWOMAGE" - }, - { - "name": "display_age", - "bind": "/model/instance/FWNewHH/woman/display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "bind": "/model/instance/FWNewHH/woman/FWELIGIBLE" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission1.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission1.json deleted file mode 100644 index a6a2f189a5..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission1.json +++ /dev/null @@ -1,228 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "test", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "2", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "1", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "2", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "1234323", - "JiVitAHHID": "123465656", - "FWWOMFNAME": "shumi", - "FWWOMLNAME": ".", - "FWWOMNID": "", - "FWWOMBID": "54676545676787876", - "FWHUSNAME": "selim", - "FWBIRTHDATE": "1998-02-04", - "FWGENDER": "female", - "FWWOMAGE": "17", - "display_age": "", - "FWNHWOMSTRMEN": "1", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "0", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - }, - { - "GOBHHID": "1234121", - "JiVitAHHID": "12348787", - "FWWOMFNAME": "sumaita", - "FWWOMLNAME": ".", - "FWWOMNID": "", - "FWWOMBID": "56543456567654567", - "FWHUSNAME": "razzak", - "FWBIRTHDATE": "1989-08-18", - "FWGENDER": "female", - "FWWOMAGE": "26", - "display_age": "", - "FWNHWOMSTRMEN": "0", - "FWNHWOMHUSALV": "1", - "FWNHWOMHUSLIV": "1", - "FWNHWOMHUSSTR": "1", - "FWELIGIBLE": "0", - "id": "74eebb60-a1b9-4691-81a4-5c04ecce7ae9" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission2.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission2.json deleted file mode 100644 index 7141db6678..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission2.json +++ /dev/null @@ -1,207 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f18000df2", - "_rev": "1-0cec42380dce0fef7b1263aad8652c3f", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "916363c4-a10e-488d-8de4-9be7a05d43cd", - "formName": "new_household_registration", - "entityId": "0aac6d81-b51f-4096-b354-5a5786e406c8", - "clientVersion": 1430924780686, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "0aac6d81-b51f-4096-b354-5a5786e406c8", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-06", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-06T21:05:35.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-06T21:05:35.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-06", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "0002", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "0002", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "23.7984 90.4019 0 25", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "karim mia", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "1", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "0", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "0", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "0002", - "JiVitAHHID": "042002", - "FWWOMFNAME": "fana", - "FWWOMLNAME": ".", - "FWWOMNID": "", - "FWWOMBID": "9999999999999999", - "FWHUSNAME": "", - "FWBIRTHDATE": "2000-12-12", - "FWGENDER": "female", - "FWWOMAGE": "NaN", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "1", - "id": "b19db74f-6e96-4652-a765-5078beb12434" - } - ] - } - ] - } - }, - "serverVersion": 1430924937728 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission3.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission3.json deleted file mode 100644 index 113c3c0829..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission3.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f1800160d", - "_rev": "1-89988ca8cc2db0cd67afc292263137fe", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "1cdf1628-86f2-440b-b5b0-4bc612d2fd2f", - "formName": "new_household_registration", - "entityId": "baf59aa4-64e9-46fc-99e6-8cd8f01618ff", - "clientVersion": 1430925173098, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "baf59aa4-64e9-46fc-99e6-8cd8f01618ff", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "LAKSHMIPUR", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-06", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-06T21:09:22.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-06T21:09:22.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-06", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "0091", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "0091", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "23.7984 90.402 0 40", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "hasan ferox", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "1", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "1", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "mithila", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "1", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "0091", - "JiVitAHHID": "0524091", - "FWWOMFNAME": "mithila", - "FWWOMLNAME": ".", - "FWWOMNID": "1111111111111", - "FWWOMBID": "12345678912345678", - "FWHUSNAME": "hasan feroz", - "FWBIRTHDATE": "1989-01-01", - "FWGENDER": "female", - "FWWOMAGE": "26", - "display_age": "", - "FWNHWOMSTRMEN": "0", - "FWNHWOMHUSALV": "1", - "FWNHWOMHUSLIV": "1", - "FWNHWOMHUSSTR": "1", - "FWELIGIBLE": "0", - "id": "409b44c4-262a-40b8-ad7d-748c480c7c13" - } - ] - } - ] - } - }, - "serverVersion": 1430925176060 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission4.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission4.json deleted file mode 100644 index 7665de2411..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission4.json +++ /dev/null @@ -1,208 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f18001e50", - "_rev": "1-3a413b7428ae33aafd08898dc2c974d4", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "cad01d9c-9f7f-4e0b-a66a-2d1121bf8b8d", - "formName": "new_household_registration", - "entityId": "f92ee1b5-c3ce-42fb-bbc8-e01f474acc5a", - "clientVersion": 1430926871912, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "f92ee1b5-c3ce-42fb-bbc8-e01f474acc5a", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-06", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-06T21:38:52.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-06T21:38:52.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-06", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "4567", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "5678", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "23.7984 90.4021 0 37", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "jashim mia", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "5", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "1", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "razia sultana", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "1", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "4567", - "JiVitAHHID": "5678", - "FWWOMFNAME": "razia sultana", - "FWWOMLNAME": ".", - "FWWOMNID": "0987654321123", - "FWWOMBID": "09876543211234567", - "FWHUSNAME": "jashim mia", - "FWBIRTHDATE": "1991-02-27", - "FWGENDER": "female", - "FWWOMAGE": "24", - "display_age": "", - "FWNHWOMSTRMEN": "0", - "FWNHWOMHUSALV": "1", - "FWNHWOMHUSLIV": "1", - "FWNHWOMHUSSTR": "0", - "FWELIGIBLE": "1", - "id": "0036b7ca-36ec-4242-9885-a0a03a666cda" - } - ] - } - ] - } - }, - "serverVersion": 1430926886181 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission5.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission5.json deleted file mode 100644 index 8447c0ff4a..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission5.json +++ /dev/null @@ -1,209 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "test", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "2", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "1", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "2", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "", - "JiVitAHHID": "", - "FWWOMFNAME": "", - "FWWOMLNAME": "", - "FWWOMNID": "", - "FWWOMBID": "", - "FWHUSNAME": "", - "FWBIRTHDATE": "", - "FWGENDER": "", - "FWWOMAGE": "", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission6.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission6.json deleted file mode 100644 index 8f3ec6c5ad..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission6.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "admin", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "test", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHBIRTHDATEAPPROX", - "value": "1", - "source": "household.FWHOHBIRTHDATEAPPROX" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWBIRTHDATEAPPROX", - "source": "elco.FWBIRTHDATEAPPROX" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "48374", - "JiVitAHHID": "78748", - "FWWOMFNAME": "tEST First", - "FWWOMLNAME": " lastname", - "FWWOMNID": "", - "FWWOMBID": "", - "FWHUSNAME": "", - "FWBIRTHDATE": "2000-05-07", - "FWBIRTHDATEAPPROX":"1", - "FWGENDER": "Female", - "FWWOMAGE": "", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission7.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission7.json deleted file mode 100644 index 443ced2385..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission7.json +++ /dev/null @@ -1,216 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "admin", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "test", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHBIRTHDATEAPPROX", - "value": "1", - "source": "household.FWHOHBIRTHDATEAPPROX" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWBIRTHDATEAPPROX", - "source": "elco.FWBIRTHDATEAPPROX" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "48374", - "JiVitAHHID": "78748", - "FWWOMFNAME": "tEST First", - "FWWOMLNAME": " lastname", - "FWWOMNID": "5478549854895", - "FWWOMBID": "43030293029323", - "FWHUSNAME": "husb", - "FWBIRTHDATE": "2000-05-07", - "FWBIRTHDATEAPPROX":"0", - "FWGENDER": "Female", - "FWWOMAGE": "21", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission8.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission8.json deleted file mode 100644 index 0c1850d4ed..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission8.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "admin", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "test", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWBIRTHDATEAPPROX", - "source": "elco.FWBIRTHDATEAPPROX" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "48374", - "JiVitAHHID": "78748", - "FWWOMFNAME": "tEST First", - "FWWOMLNAME": " lastname", - "FWWOMNID": "", - "FWWOMBID": "", - "FWHUSNAME": "", - "FWBIRTHDATE": "2000-05-07", - "FWBIRTHDATEAPPROX":"", - "FWGENDER": "Female", - "FWWOMAGE": "", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/form_submission9.json b/opensrp-core/src/test/resources/form/new_household_registration/form_submission9.json deleted file mode 100644 index b1dd5bcb96..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/form_submission9.json +++ /dev/null @@ -1,206 +0,0 @@ -{ - "_id": "251ca0ef09df9af88f0e9d5f180115a3", - "_rev": "1-e73e1d93acdcdaeb1d41a738da5d9284", - "type": "FormSubmission", - "anmId": "admin", - "instanceId": "88c0e824-10b4-44c2-9429-754b8d823776", - "formName": "new_household_registration", - "entityId": "a3f2abf4-2699-4761-819a-cea739224164", - "clientVersion": 1430997074596, - "formDataDefinitionVersion": "1", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "a3f2abf4-2699-4761-819a-cea739224164", - "source": "household.id" - }, - { - "name": "existing_location", - "value": "KUPTALA", - "source": "household.existing_location" - }, - { - "name": "today", - "value": "2015-05-07", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-05-07T17:07:21.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-05-07", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "1234", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "1234", - "source": "household.FWJIVHHID" - }, - { - "name": "FWNHNEARTO", - "value": "nothing", - "source": "household.FWNHNEARTO" - }, - { - "name": "FWNHHHGPS", - "value": "34 34 0 0", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "male", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "shumi sumaita", - "source": "household.join_names" - }, - { - "name": "MWRA", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWBIRTHDATEAPPROX", - "source": "elco.FWBIRTHDATEAPPROX" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - } - ], - "instances": [ - { - "GOBHHID": "48374", - "JiVitAHHID": "78748", - "FWWOMFNAME": "tEST First", - "FWWOMLNAME": " lastname", - "FWWOMNID": "", - "FWWOMBID": "", - "FWHUSNAME": "", - "FWBIRTHDATE": "2000-05-07", - "FWBIRTHDATEAPPROX":"", - "FWGENDER": "Female", - "FWWOMAGE": "", - "display_age": "", - "FWNHWOMSTRMEN": "", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSLIV": "", - "FWNHWOMHUSSTR": "", - "FWELIGIBLE": "", - "id": "babcd9d2-b3e9-4f6d-8a06-2df8f5fbf01f" - } - ] - } - ] - } - }, - "serverVersion": 1430998001293 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration/model.xml b/opensrp-core/src/test/resources/form/new_household_registration/model.xml deleted file mode 100644 index a0cabcad26..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration/model.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.json b/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.json deleted file mode 100644 index 99dadab7ad..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.json +++ /dev/null @@ -1,1100 +0,0 @@ -{ - "name": "FWNewHH", - "title": "নতুন খানা নিবন্ধন ফর্ম", - "sms_keyword": "FWNewHH", - "default_language": "Bengali", - "instance": { - "encounter_type": "New Household Registration" - }, - "version": "201510181114", - "id_string": "FWNewHH", - "type": "survey", - "children": [ - { - "type": "hidden", - "name": "version", - "label": { - "English": "TechVersion: v1.4 Aug 26, 2015\nFormVersion: v1.0" - } - }, - { - "type": "hidden", - "name": "changes", - "label": { - "English": "NN: \n1. Added a calculation field 'REGDATE' under 'woman' group\n2. Removed the conceptIDs which have Datatype N/A\n3. Define NID as person_attribute\nKZ: Dropped 9=DK from Vitsts choices\nCG: Added person_address mappings and NN added Variable Names for these address fields\nCG: Change NID back to person_identifier\nCG: Delete location_name field - need to communicate this change to Raihan - mauzapara name coming from existing_Mauzapara instead.\nCG: Added concept IDs for woman and husband unable to have children.\nKZ: 9/9\n1. Added photo capture of ID cards\n2. Added double entry of both IDs\n3. Added the which ID? screening question\n4. Changed the number of MWRAs in HH question to integer.\n5. Moved eligibility screening questions above ID questions, as in Census.\nCG: Updated address mappings so address5 is mapped to HHID\nCG: Added id_type to choices sheet.\n15/9\nKZ: Added Bangla to id_type choices, What type of ID and Re-Type National ID.\nKZ: Made FWWOMANYID field hidden until we come to a final decision on how to do this image capture.\nKZ: Removed leading zero from the '01' on the labels in HH Inhabitant number question.\nNN: Updated the constraint of 'How many member....' from \"regex(., '^(?!0{2})[0-9]{2}$')\" to \" .< 31 or .=99\"\nNN: Updated the 'relevant' logic of NID/BRID questions. added 'selected' logic\nKH: 16/9\n1. Added datatype / leading zeroes question as comment for FWNHHMBRNUM\n2. Changed constraint for FWNHHMBRNUM to exclude 0 as option\n3. Added \"Respondent Age\" concept UID to FWWOMAGE for data collection/analysis.\n4. Added \"Meets eligibility criteria for clinical trial or study\" concept UID to FWELIGIBLE to match FD form\nNN: 22/9\n1. Added entity:concept for FWELIGIBLE\n---\nKZ: 27/9\n1. Changed HHNUMB to text, still need to update the constraint to match with text.\nNN: 28/9\nUpdated the constraint of 'How many member....' from \".< 3 1 or .=99\" to \"regex(., '^(?!0{2})[0-9]{2}$')\"\nKZ (28/9):\n1. Change NUMMWRA to select one with yesno responses. Removed hints and constraints\n2. Updated hints and constraints for HH INhabitants to include leading zeros\nNN (8/10):\nAdd DoB, Gender questions before 'eligible' group\nMade FWNHHMBRNUM and FWNHHMWRA required field\nUpdated the constraing of 'how many member....' --> (regex(., '^(?!0{2})[0-9]{2}$') and .<31) or .=99\nUpdated the logic of Age (should not accept less than 12 years\nUpdated the hint/constraint message with english numeric input e.g 13 instead of ১৩\nCG (15/10):\nAdd ELCO count calculation; strike-through MWRA calculation\nNN (18/10): \nRemoved the Strikethrough fields.\nAdded two hidden variables for developers use- user_type and external_user_ID" - } - }, - { - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "hidden", - "name": "existing_location" - }, - { - "type": "hidden", - "name": "existing_Country" - }, - { - "type": "hidden", - "name": "existing_Division" - }, - { - "type": "hidden", - "name": "existing_District" - }, - { - "type": "hidden", - "name": "existing_Upazilla" - }, - { - "type": "hidden", - "name": "existing_Union" - }, - { - "type": "hidden", - "name": "existing_Ward" - }, - { - "type": "hidden", - "name": "existing_Subunit" - }, - { - "type": "hidden", - "name": "existing_Mauzapara" - }, - { - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "today", - "name": "today" - }, - { - "instance": { - "openmrs_entity_id": "encounter_start", - "openmrs_entity": "encounter" - }, - "type": "start", - "name": "start" - }, - { - "instance": { - "openmrs_entity_id": "encounter_end", - "openmrs_entity": "encounter" - }, - "type": "end", - "name": "end" - }, - { - "name": "FWNHREGDATE", - "hint": { - "Bengali": "আজকের তারিখ দিন", - "English": "Please enter today's date." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "আজকের তারিখের পরের কোন তারিখ\nহতে পারবে না", - "English": "Date cannot be greater than current date." - }, - "required": "yes", - "constraint": ".<=${today}" - }, - "label": { - "Bengali": "সাক্ষাৎকারের তারিখ", - "English": "Date of Interview" - }, - "instance": { - "openmrs_entity_id": "160753AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "date" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWGOBHHID", - "hint": { - "Bengali": "কালো কালিতে লেখা সরকারী খানা নম্বর (HHID) যেভাবে ঘরের দেয়াল বা দরজায় দেওয়া আছে সেভাবেই ইনপুট দিন।\nসরকারী খানা নম্বর (HHID) পাওয়া না গেলে ৯৯৯৯ ইনপুট দিন", - "English": "Please input the Black – painted Government household ID (HHID) as displayed on the door/wall of the HH. If there is no Government HHID, enter 9999." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "অনুগ্রহ করে ০০০১ থেকে ৯৯৯৯ এর মধ্যে ৪ ডিজিটের GoB HHID টাইপ করুন", - "English": "Please enter 4 digits of GoB HHID from 0001 to 9999" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{4})[0-9]{4}$')" - }, - "label": { - "Bengali": "GoB HHID", - "English": "GoB HHID" - }, - "instance": { - "openmrs_entity_id": "GoB_HHID", - "openmrs_entity": "person_attribute" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWJIVHHID", - "hint": { - "Bengali": "লাল কালিতে দেয়া জীবিতা খানা নম্বর (HHID) যেভাবে দেয়ালে বা দরজায় দেওয়া আছে সেভাবেই ইনপুট দিন ।\nজীবিতা খানা নম্বর (HHID) পাওয়া না গেলে ৯৯৯৯ ইনপুট দিন", - "English": "Please input the RED – painted JiVitA / Study household ID (HHID) as displayed on the door/wall of the HH. Enter 9999 if JiVitA HHID is not found." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "অনুগ্রহ করে ০০০১ থেকে ৯৯৯৯ এর মধ্যে ৪ ডিজিটের JiVitA HHID টাইপ করুন", - "English": "Please enter 4 digits of JiVitA HHID from 0001 to 9999" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{4})[0-9]{4}$')" - }, - "label": { - "Bengali": "JiVitA HHID", - "English": "JiVitA HHID" - }, - "instance": { - "openmrs_entity_id": "JiVitA_HHID", - "openmrs_entity": "person_attribute" - }, - "type": "text" - }, - { - "bind": { - "calculate": "${existing_Country}" - }, - "type": "calculate", - "name": "FWCOUNTRY", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "country", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Division}" - }, - "type": "calculate", - "name": "FWDIVISION", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "stateProvince", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_District}" - }, - "type": "calculate", - "name": "FWDISTRICT", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "countyDistrict", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Upazilla}" - }, - "type": "calculate", - "name": "FWUPAZILLA", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "cityVillage", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Union}" - }, - "type": "calculate", - "name": "FWUNION", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address1", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Ward}" - }, - "type": "calculate", - "name": "FWWARD", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address2", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Subunit}" - }, - "type": "calculate", - "name": "FWSUBUNIT", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address3", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Mauzapara}" - }, - "type": "calculate", - "name": "FWMAUZA_PARA", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address4", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${FWGOBHHID}" - }, - "type": "calculate", - "name": "FWGOB_HHID", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address5", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "geopoint", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "geopoint", - "openmrs_entity_parent": "usual_residence" - }, - "name": "FWNHHHGPS", - "label": { - "Bengali": "জি পি এস", - "English": "Collect GPS Location of HH" - } - }, - { - "bind": { - "required": "yes" - }, - "type": "text", - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "name": "FWHOHFNAME", - "label": { - "Bengali": "খানা প্রধানের নাম-", - "English": "Head of Household Name" - } - }, - { - "bind": { - "calculate": "\".\"" - }, - "type": "calculate", - "name": "FWHOHLNAME", - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - } - }, - { - "bind": { - "calculate": "\"1900-01-01\"" - }, - "type": "calculate", - "name": "FWHOHBIRTHDATE", - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - } - }, - { - "name": "FWHOHGENDER", - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "খানা প্রধানের লিঙ্গ", - "English": "Head of Household Gender" - }, - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - }, - "type": "select one", - "children": [ - { - "name": "1", - "label": { - "Bengali": "ছেলে", - "English": "Male" - } - }, - { - "name": "2", - "label": { - "Bengali": "মেয়ে", - "English": "Female" - } - } - ] - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWNHHMBRNUM", - "hint": { - "Bengali": "খানার সদস্য সংখ্যা লিখতে 01-29 লিখুন । 30 বা তার বেশী হলে 30 লিখুন। খানার সদস্যের সংখ্যা জানা না থাকলে 99 লিখুন ।", - "English": "Enter 01-29 for the number of household members. Enter 30 if 30 or more. Enter 99 if the total number is unknown." - }, - "bind": { - "jr:constraintMsg": { - "Bengali": "খানার সদস্য সংখ্যাকে দুই ডিজিট হিসেবে এন্ট্রি করতে হবে। খানার সদস্য সংখ্যা লিখতে 01- 29 লিখুন । খানার সদস্যের সংখ্যা 30 বা তার বেশি হলে 30 লিখুন। খানার সদস্যের সংখ্যা জানা না থাকলে 99 লিখুন ।", - "English": "Number should be entered as two digits. Enter 01-29 for the number of household members. Enter 30 if there are 30 or more household members. Enter 99 if the total number is unknown." - }, - "required": "yes", - "constraint": "(regex(., '^(?!0{2})[0-9]{2}$') and .<31) or .=99" - }, - "label": { - "Bengali": "এই খানায় বর্তমানে কতজন মানুষ বসবাস করছে?", - "English": "How many people are currently living in this household?" - }, - "instance": { - "openmrs_entity_id": "5611AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "text" - }, - { - "name": "FWNHHMWRA", - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "এই খানায় কি ১৫ থেকে ৪৯ বছর বয়সের কোন বিবাহিত মহিলা আছেন?", - "English": "Are there any married women between the ages of 15 - 49 live in this household?" - }, - "instance": { - "openmrs_entity_id": "1901AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - } - }, - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "9", - "label": { - "Bengali": "জানি না", - "English": "Don't know" - } - } - ] - }, - { - "name": "woman", - "hint": { - "Bengali": "আমরা এখন মহিলাকে নিবন্ধন করব। তাকে জাতীয় পরিচয়পত্র এবং জন্ম নিবন্ধন সনদপত্র নিয়ে আসতে অনুরোধ করুন।", - "English": "We will now register the woman. Please ask her to bring her National ID Card and Birth Certificate." - }, - "bind": { - "relevant": "${FWNHHMWRA}='1'" - }, - "label": { - "Bengali": "মহিলার তথ্যঃ", - "English": "New Woman Registration" - }, - "instance": { - "openmrs_entity_id": "New Woman Registration", - "openmrs_entity": "person" - }, - "type": "repeat", - "children": [ - { - "bind": { - "calculate": "${FWGOBHHID}" - }, - "type": "calculate", - "name": "GOBHHID", - "instance": { - "openmrs_entity_id": "GoB_HHID", - "openmrs_entity": "person_attribute" - } - }, - { - "bind": { - "calculate": "${FWJIVHHID}" - }, - "type": "calculate", - "name": "JiVitAHHID", - "instance": { - "openmrs_entity_id": "JiVitA_HHID", - "openmrs_entity": "person_attribute" - } - }, - { - "bind": { - "calculate": "${FWNHREGDATE}" - }, - "type": "calculate", - "name": "REGDATE" - }, - { - "name": "FWWOMFNAME", - "hint": { - "Bengali": "মহিলার নাম টাইপ করুন", - "English": "Please type woman's name" - }, - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "মহিলার নাম-", - "English": "Woman Name" - }, - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "type": "text" - }, - { - "bind": { - "calculate": "\".\"" - }, - "type": "calculate", - "name": "FWWOMLNAME", - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - } - }, - { - "name": "FWBIRTHDATE", - "hint": { - "Bengali": "“যদি জন্মনিবন্ধন সনদপত্র থাকে তাহলে জন্মতারিখ সেখান থেকেই সংগ্রহ করুন। যদি জন্মতারিখ বলতে না পারে তাহলে মাসের ১৫ তারিখকে জন্মতারিখ হিসেবে বেছে নিন। যদি জন্মমাস বলতে না পারে তাহলে ৬ বা জুনকে মাস হিসেবে বেছে নিন এবং মহিলা যে বছরটিতে তার জন্ম বলবে সেটি এন্ট্রি করুন।”", - "English": "If birth certificate is available take date of birth from birth certificate. If date of birth is unknown choose 15 as the date of birth, if month is unknown choose 06 (June) as month of birth and enter the year of birth as mentioned by the woman." - }, - "default": "2000-01-02 00:00:00", - "bind": { - "jr:constraintMsg": { - "Bengali": "মহিলার বয়স অবশ্যই ১২ বছরের বেশী হবে", - "English": "Woman must be older than 12 years of age" - }, - "required": "yes", - "constraint": "((${FWBIRTHDATE})+4380) <= today()" - }, - "label": { - "Bengali": "মহিলার জন্ম তারিখ", - "English": "Woman's Date of Birth" - }, - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - }, - "type": "date" - }, - { - "bind": { - "calculate": "\"female\"" - }, - "type": "calculate", - "name": "FWGENDER", - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - } - }, - { - "bind": { - "calculate": "round(((${today} - ${FWBIRTHDATE}) div 365.25),0)" - }, - "type": "calculate", - "name": "FWWOMAGE", - "instance": { - "openmrs_entity_id": "1532AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - } - }, - { - "type": "note", - "name": "display_age", - "label": { - "Bengali": "মহিলার বয়স ${FWWOMAGE}", - "English": "The woman's age is ${FWWOMAGE}." - } - }, - { - "control": { - "appearance": "yes" - }, - "name": "FWNHWOMSTRMEN", - "label": { - "Bengali": "আপনার কি বর্তমানে মাসিক একেবারে উঠে গেছে বা আপনি কি বর্তমানে স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?", - "English": "Are you currently menopausal or sterilized?" - }, - "instance": { - "openmrs_entity_id": "163006AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - } - }, - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "9", - "label": { - "Bengali": "জানি না", - "English": "Don't know" - } - } - ] - }, - { - "control": { - "appearance": "yes" - }, - "name": "FWNHWOMHUSLIV", - "bind": { - "relevant": "selected(${FWNHWOMSTRMEN}, '0') or selected(${FWNHWOMSTRMEN}, '9')" - }, - "label": { - "Bengali": "আপনি কি বর্তমানে আপনার স্বামীর সাথে বসবাস করছেন?", - "English": "Are you currently living with your husband?" - }, - "instance": { - "openmrs_entity_id": "162994AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - } - }, - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "9", - "label": { - "Bengali": "জানি না", - "English": "Don't know" - } - } - ] - }, - { - "control": { - "appearance": "yes" - }, - "name": "FWNHWOMHUSALV", - "bind": { - "relevant": "selected(${FWNHWOMHUSLIV}, '0') or selected(${FWNHWOMHUSLIV}, '9')" - }, - "label": { - "Bengali": "আপনার স্বামী কি জীবিত আছেন?", - "English": "Is the husband alive?" - }, - "instance": { - "openmrs_entity_id": "5561AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - } - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - } - } - ] - }, - { - "control": { - "appearance": "yes" - }, - "name": "FWNHWOMHUSSTR", - "bind": { - "relevant": "selected(${FWNHWOMHUSLIV}, '1') or (selected(${FWNHWOMHUSLIV}, '9') and selected(${FWNHWOMHUSALV}, '1'))" - }, - "label": { - "Bengali": "আপনার স্বামী কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?", - "English": "Is the husband sterilized?" - }, - "instance": { - "openmrs_entity_id": "162959AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "0", - "label": { - "Bengali": "না", - "English": "No" - } - }, - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "হ্যাঁ", - "English": "Yes" - } - }, - { - "instance": { - "openmrs_code": "1067AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "9", - "label": { - "Bengali": "জানি না", - "English": "Don't know" - } - } - ] - }, - { - "bind": { - "calculate": "if(${FWNHWOMSTRMEN}='0' and ${FWNHWOMHUSLIV}='1' and ${FWNHWOMHUSSTR}='0','1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA','1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA')" - }, - "type": "calculate", - "name": "FWELIGIBLE", - "instance": { - "openmrs_entity_id": "162699AAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - } - }, - { - "bind": { - "relevant": "${FWELIGIBLE}='1'" - }, - "type": "group", - "children": [ - { - "name": "FWWOMANYID", - "hint": { - "Bengali": "প্রযোজ্য সবগুলো উত্তর নির্বাচন করুন", - "English": "Select all that apply." - }, - "label": { - "Bengali": "নিচের কোন পরিচয় পত্রটি মহিলার কাছে আছে?", - "English": "Which of the following IDs does the woman have?" - }, - "instance": { - "openmrs_entity_id": "163087AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select all that apply", - "children": [ - { - "instance": { - "openmrs_code": "163084AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "1", - "label": { - "Bengali": "জাতীয় পরিচয়পত্র নম্বর", - "English": "National ID Number" - } - }, - { - "instance": { - "openmrs_code": "163083AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "2", - "label": { - "Bengali": "জন্ম নিবন্ধন সনদপত্র নম্বর", - "English": "Birth Registration ID Number" - } - } - ] - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMNID", - "hint": { - "Bengali": "জাতীয় পরিচয়পত্রে দেওয়া সরকারী নম্বর যেভাবে দেওয়া আছে সেভাবেই প্রবেশ করান", - "English": "Please input the Government ID as displayed on the national ID card" - }, - "bind": { - "relevant": "selected(${FWWOMANYID},'1')", - "jr:constraintMsg": { - "Bengali": "জাতীয় পরিচয়পত্র নং ১৩ অথবা ১৭ ডিজিটের হবে", - "English": "National ID should be 13 or 17 digits" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{13})[0-9]{13}$') or regex(., '^(?!0{17})[0-9]{17}$')" - }, - "label": { - "Bengali": "মহিলার জাতীয় পরিচয়পত্র নং-", - "English": "Woman's National ID Number" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMRETYPENID", - "hint": { - "Bengali": "জাতীয় পরিচয়পত্রের নম্বরটি পুনরায় প্রবেশ করান", - "English": "Please re-input the National ID number" - }, - "bind": { - "relevant": "selected(${FWWOMANYID},'1')", - "jr:constraintMsg": { - "Bengali": "এই নম্বরটি ও পূর্বের স্ক্রিনে দেওয়া জন্ম নিবন্ধন নম্বরটি একই হতে হবে", - "English": "This number and the one in the previous screen should be same" - }, - "required": "yes", - "constraint": ".=${FWWOMNID}" - }, - "label": { - "Bengali": "মহিলার জাতীয় পরিচয়পত্র নম্বরটি পুনরায় লিখুন", - "English": "Re-Type Woman's National ID Number" - }, - "instance": { - "openmrs_entity_id": "NID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMBID", - "hint": { - "Bengali": "জন্ম নিবন্ধন সনদপত্রের সরকারী নম্বর যেভাবে দেওয়া আছে সেভাবেই ইনপুট দিন।", - "English": "Please input the Government ID as displayed on the birth certificate" - }, - "bind": { - "relevant": "selected(${FWWOMANYID},'2')", - "jr:constraintMsg": { - "Bengali": "জন্ম নিবন্ধন সনদ নং ১৭ ডিজিটের হবে", - "English": "Birth Registration ID should be 17 digits" - }, - "required": "yes", - "constraint": "regex(., '^(?!0{17})[0-9]{17}$')" - }, - "label": { - "Bengali": "মহিলার জন্ম নিবন্ধন সনদ নং-", - "English": "Woman's Birth Registration ID" - }, - "type": "text" - }, - { - "control": { - "appearance": "numbers" - }, - "name": "FWWOMRETYPEBID", - "hint": { - "Bengali": "জন্ম নিবন্ধন নম্বরটি পূনরায় প্রবেশ করান", - "English": "Please re-input the Birth Registration Number" - }, - "bind": { - "relevant": "selected(${FWWOMANYID},'2')", - "jr:constraintMsg": { - "Bengali": "এই নম্বরটি ও পূর্বের স্ক্রিনে দেওয়া জন্ম নিবন্ধন নম্বরটি একই হতে হবে", - "English": "This number and the one in the previous screen should be same" - }, - "required": "yes", - "constraint": ".=${FWWOMBID}" - }, - "label": { - "Bengali": "মহিলার জন্ম নিবন্ধন সনদ নং-", - "English": "Woman's Birth Registration ID" - }, - "instance": { - "openmrs_entity_id": "Birth Registration ID", - "openmrs_entity": "person_identifier" - }, - "type": "text" - }, - { - "name": "FWHUSNAME", - "hint": { - "Bengali": "স্বামীর নাম টাইপ করুন", - "English": "Please type husband's name" - }, - "bind": { - "required": "yes" - }, - "label": { - "Bengali": "স্বামীর নাম-", - "English": "Husband's Name" - }, - "instance": { - "openmrs_entity_id": "161135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "text" - }, - { - "bind": { - "calculate": "${existing_Country}" - }, - "type": "calculate", - "name": "FWWOMCOUNTRY", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "country", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Division}" - }, - "type": "calculate", - "name": "FWWOMDIVISION", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "stateProvince", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_District}" - }, - "type": "calculate", - "name": "FWWOMDISTRICT", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "countyDistrict", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Upazilla}" - }, - "type": "calculate", - "name": "FWWOMUPAZILLA", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "cityVillage", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Union}" - }, - "type": "calculate", - "name": "FWWOMUNION", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address1", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Ward}" - }, - "type": "calculate", - "name": "FWWOMWARD", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address2", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Subunit}" - }, - "type": "calculate", - "name": "FWWOMSUBUNIT", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address3", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${existing_Mauzapara}" - }, - "type": "calculate", - "name": "FWWOMMAUZA_PARA", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address4", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${FWGOBHHID}" - }, - "type": "calculate", - "name": "FWWOMGOBHHID", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "address5", - "openmrs_entity_parent": "usual_residence" - } - }, - { - "bind": { - "calculate": "${FWNHHHGPS}" - }, - "type": "calculate", - "name": "FWWOMGPS", - "instance": { - "openmrs_entity": "person_address", - "openmrs_entity_id": "geopoint", - "openmrs_entity_parent": "usual_residence" - } - } - ], - "name": "eligible" - }, - { - "type": "note", - "name": "add_women", - "label": { - "Bengali": "নির্দেশনাঃ এই খানায় যদি আরও কোন মহিলা থাকে যাকে রেজিস্ট্রেশন করা হয়নি, তাহলে '+' এ ক্লিক করুন এবং একই প্রক্রিয়ায় পরবর্তী মহিলাকে রেজিস্ট্রেশন করুন", - "English": "If there are any additional unregistered women in this household, select the '+' to add them now." - } - } - ] - }, - { - "bind": { - "calculate": "sum(${FWELIGIBLE})" - }, - "type": "calculate", - "name": "ELCO" - }, - { - "default": "FWA", - "type": "hidden", - "name": "user_type" - }, - { - "type": "hidden", - "name": "external_user_ID" - }, - { - "control": { - "bodyless": true - }, - "type": "group", - "children": [ - { - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate", - "name": "instanceID" - } - ], - "name": "meta" - } - ] -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.xml b/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.xml deleted file mode 100644 index bda24f905a..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form.xml +++ /dev/null @@ -1,31 +0,0 @@ - -
-

নতুন খানা নিবন্ধন ফর্ম

- - - - - - - -
খানা প্রধানের লিঙ্গHead of Household Gender* -
- -
এই খানায় কি ১৫ থেকে ৪৯ বছর বয়সের কোন বিবাহিত মহিলা আছেন?Are there any married women between the ages of 15 - 49 live in this household?* -
-

মহিলার তথ্যঃNew Woman Registration

আপনার কি বর্তমানে মাসিক একেবারে উঠে গেছে বা আপনি কি বর্তমানে স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?Are you currently menopausal or sterilized? -
আপনি কি বর্তমানে আপনার স্বামীর সাথে বসবাস করছেন?Are you currently living with your husband? -
আপনার স্বামী কি জীবিত আছেন?Is the husband alive? -
আপনার স্বামী কি স্থায়ী জন্মনিয়ন্ত্রন পদ্ধতি গ্রহণ করেছেন?Is the husband sterilized? -
নিচের কোন পরিচয় পত্রটি মহিলার কাছে আছে?Which of the following IDs does the woman have?প্রযোজ্য সবগুলো উত্তর নির্বাচন করুনSelect all that apply. -
-
-
-
- -
XML to HTML transformation for form took 0.05 secondsThis validation is yet not functional.
diff --git a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_definition.json b/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_definition.json deleted file mode 100644 index 916bdf7aa8..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_definition.json +++ /dev/null @@ -1,290 +0,0 @@ -{ - "form_data_definition_version": "13", - "form": { - "default_bind_path": "/model/instance/FWNewHH", - "bind_type": "household", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "location_name", - "bind": "/model/instance/FWNewHH/existing_Mauzapara" - }, - { - "name": "existing_location", - "bind": "/model/instance/FWNewHH/existing_location" - }, - { - "name": "existing_Country", - "bind": "/model/instance/FWNewHH/existing_Country" - }, - { - "name": "existing_Division", - "bind": "/model/instance/FWNewHH/existing_Division" - }, - { - "name": "existing_District", - "bind": "/model/instance/FWNewHH/existing_District" - }, - { - "name": "existing_Upazilla", - "bind": "/model/instance/FWNewHH/existing_Upazilla" - }, - { - "name": "existing_Union", - "bind": "/model/instance/FWNewHH/existing_Union" - }, - { - "name": "existing_Ward", - "bind": "/model/instance/FWNewHH/existing_Ward" - }, - { - "name": "existing_Subunit", - "bind": "/model/instance/FWNewHH/existing_Subunit" - }, - { - "name": "existing_Mauzapara", - "bind": "/model/instance/FWNewHH/existing_Mauzapara" - }, - { - "name": "today", - "bind": "/model/instance/FWNewHH/today" - }, - { - "name": "start", - "bind": "/model/instance/FWNewHH/start" - }, - { - "name": "end", - "bind": "/model/instance/FWNewHH/end" - }, - { - "name": "FWNHREGDATE", - "bind": "/model/instance/FWNewHH/FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "bind": "/model/instance/FWNewHH/FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "bind": "/model/instance/FWNewHH/FWJIVHHID" - }, - { - "name": "FWCOUNTRY", - "bind": "/model/instance/FWNewHH/FWCOUNTRY" - }, - { - "name": "FWDIVISION", - "bind": "/model/instance/FWNewHH/FWDIVISION" - }, - { - "name": "FWDISTRICT", - "bind": "/model/instance/FWNewHH/FWDISTRICT" - }, - { - "name": "FWUPAZILLA", - "bind": "/model/instance/FWNewHH/FWUPAZILLA" - }, - { - "name": "FWUNION", - "bind": "/model/instance/FWNewHH/FWUNION" - }, - { - "name": "FWWARD", - "bind": "/model/instance/FWNewHH/FWWARD" - }, - { - "name": "FWSUBUNIT", - "bind": "/model/instance/FWNewHH/FWSUBUNIT" - }, - { - "name": "FWMAUZA_PARA", - "bind": "/model/instance/FWNewHH/FWMAUZA_PARA" - }, - { - "name": "FWNHHHGPS", - "bind": "/model/instance/FWNewHH/FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "bind": "/model/instance/FWNewHH/FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "bind": "/model/instance/FWNewHH/FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "bind": "/model/instance/FWNewHH/FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "bind": "/model/instance/FWNewHH/FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "bind": "/model/instance/FWNewHH/FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "bind": "/model/instance/FWNewHH/FWNHHMWRA" - }, - { - "name": "join_names", - "bind": "/model/instance/FWNewHH/join_names" - }, - { - "name": "ELCO", - "bind": "/model/instance/FWNewHH/ELCO" - }, - { - "name": "user_type", - "bind": "/model/instance/FWNewHH/user_type" - }, - { - "name": "external_user_ID", - "bind": "/model/instance/FWNewHH/external_user_ID" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "relationalid", - "shouldLoadValue": true - }, - { - "name": "WomanREGDATE", - "bind": "/model/instance/FWNewHH/woman/REGDATE" - }, - { - "name": "GOBHHID", - "bind": "/model/instance/FWNewHH/woman/GOBHHID" - }, - { - "name": "JiVitAHHID", - "bind": "/model/instance/FWNewHH/woman/JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "bind": "/model/instance/FWNewHH/woman/FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "bind": "/model/instance/FWNewHH/woman/FWWOMLNAME" - }, - { - "name": "FWBIRTHDATE", - "bind": "/model/instance/FWNewHH/woman/FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "bind": "/model/instance/FWNewHH/woman/FWGENDER" - }, - { - "name": "FWWOMAGE", - "bind": "/model/instance/FWNewHH/woman/FWWOMAGE" - }, - { - "name": "display_age", - "bind": "/model/instance/FWNewHH/woman/display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "bind": "/model/instance/FWNewHH/woman/FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "bind": "/model/instance/FWNewHH/woman/FWELIGIBLE" - }, - { - "name": "FWWOMANYID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMANYID" - }, - { - "name": "FWWOMNID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMNID" - }, - { - "name": "FWWOMRETYPENID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMRETYPENID" - }, - { - "name": "FWWOMBID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMBID" - }, - { - "name": "FWWOMRETYPEBID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMRETYPEBID" - }, - { - "name": "FWHUSNAME", - "bind": "/model/instance/FWNewHH/woman/eligible/FWHUSNAME" - }, - { - "name": "FWWOMCOUNTRY", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMCOUNTRY" - }, - { - "name": "FWWOMDIVISION", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMDIVISION" - }, - { - "name": "FWWOMDISTRICT", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMDISTRICT" - }, - { - "name": "FWWOMUPAZILLA", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMUPAZILLA" - }, - { - "name": "FWWOMUNION", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMUNION" - }, - { - "name": "FWWOMWARD", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMWARD" - }, - { - "name": "FWWOMSUBUNIT", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMSUBUNIT" - }, - { - "name": "FWWOMMAUZA_PARA", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMMAUZA_PARA" - }, - { - "name": "FWWOMGOBHHID", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMGOBHHID" - }, - { - "name": "FWWOMGPS", - "bind": "/model/instance/FWNewHH/woman/eligible/FWWOMGPS" - } - ] - } - ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_submission1.json b/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_submission1.json deleted file mode 100644 index 75775ca8cd..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/form_submission1.json +++ /dev/null @@ -1,363 +0,0 @@ -{ - "id": "5ec11f03071ef0929839079530028992", - "_rev": "2-ddf675dd499e017538671b94843aeefc", - "type": "FormSubmission", - "anmId": "opensrp", - "instanceId": "d304dbr7-3998-434f-8c5b-55d6f5fa4252", - "formName": "new_household_registration_with_grouped_subform_data", - "entityId": "4237d267-d438-49f2-7822-8968t555447c", - "clientVersion": 1444562091545, - "formDataDefinitionVersion": "12", - "formInstance": { - "form_data_definition_version": "12", - "form": { - "bind_type": "household", - "default_bind_path": "/model/instance/FWNewHH", - "fields": [ - { - "name": "id", - "value": "4237d267-d438-49f2-7822-8968t555447c", - "source": "household.id" - }, - { - "name": "location_name", - "value": "DASLIA-_ALL_PARAS", - "source": "household.location_name" - }, - { - "name": "existing_location", - "value": "2fc43738-ace5-g961-8e8f-ab7dg0e5bc63", - "source": "household.existing_location" - }, - { - "name": "existing_Country", - "value": "Bangladesh", - "source": "household.existing_Country" - }, - { - "name": "existing_Division", - "value": "RANGPUR", - "source": "household.existing_Division" - }, - { - "name": "existing_District", - "value": "GAIBANDHA", - "source": "household.existing_District" - }, - { - "name": "existing_Upazilla", - "value": "SADULLAPUR", - "source": "household.existing_Upazilla" - }, - { - "name": "existing_Union", - "value": "NALDANGA", - "source": "household.existing_Union" - }, - { - "name": "existing_Ward", - "value": "Ward-3", - "source": "household.existing_Ward" - }, - { - "name": "existing_Subunit", - "value": "3-KHA", - "source": "household.existing_Subunit" - }, - { - "name": "existing_Mauzapara", - "value": "DASLIA+-+ALL+PARAS", - "source": "household.existing_Mauzapara" - }, - { - "name": "today", - "value": "2015-10-11", - "source": "household.today" - }, - { - "name": "start", - "value": "2015-10-11T17:12:34.000+06:00", - "source": "household.start" - }, - { - "name": "end", - "value": "2015-10-11T17:12:34.000+06:00", - "source": "household.end" - }, - { - "name": "FWNHREGDATE", - "value": "2015-10-11", - "source": "household.FWNHREGDATE" - }, - { - "name": "FWGOBHHID", - "value": "2322", - "source": "household.FWGOBHHID" - }, - { - "name": "FWJIVHHID", - "value": "9889", - "source": "household.FWJIVHHID" - }, - { - "name": "FWCOUNTRY", - "value": "Bangladesh", - "source": "household.FWCOUNTRY" - }, - { - "name": "FWDIVISION", - "value": "RANGPUR", - "source": "household.FWDIVISION" - }, - { - "name": "FWDISTRICT", - "value": "GAIBANDHA", - "source": "household.FWDISTRICT" - }, - { - "name": "FWUPAZILLA", - "value": "SADULLAPUR", - "source": "household.FWUPAZILLA" - }, - { - "name": "FWUNION", - "value": "NALDANGA", - "source": "household.FWUNION" - }, - { - "name": "FWWARD", - "value": "Ward-3", - "source": "household.FWWARD" - }, - { - "name": "FWSUBUNIT", - "value": "3-KHA", - "source": "household.FWSUBUNIT" - }, - { - "name": "FWMAUZA_PARA", - "value": "DASLIA+-+ALL+PARAS", - "source": "household.FWMAUZA_PARA" - }, - { - "name": "FWNHHHGPS", - "value": "23.8002 90.4068 0 10", - "source": "household.FWNHHHGPS" - }, - { - "name": "FWHOHFNAME", - "value": "mango", - "source": "household.FWHOHFNAME" - }, - { - "name": "FWHOHLNAME", - "value": ".", - "source": "household.FWHOHLNAME" - }, - { - "name": "FWHOHBIRTHDATE", - "value": "1900-01-01", - "source": "household.FWHOHBIRTHDATE" - }, - { - "name": "FWHOHGENDER", - "value": "2", - "source": "household.FWHOHGENDER" - }, - { - "name": "FWNHHMBRNUM", - "value": "23", - "source": "household.FWNHHMBRNUM" - }, - { - "name": "FWNHHMWRA", - "value": "1", - "source": "household.FWNHHMWRA" - }, - { - "name": "join_names", - "value": "hoby", - "source": "household.join_names" - }, - { - "name": "MWRA", - "value": "1", - "source": "household.MWRA" - } - ], - "sub_forms": [ - { - "name": "elco_registration", - "bind_type": "elco", - "default_bind_path": "/model/instance/FWNewHH/woman", - "fields": [ - { - "name": "id", - "source": "elco.id" - }, - { - "name": "relationalid", - "source": "elco.relationalid" - }, - { - "name": "WomanREGDATE", - "source": "elco.WomanREGDATE" - }, - { - "name": "GOBHHID", - "source": "elco.GOBHHID" - }, - { - "name": "JiVitAHHID", - "source": "elco.JiVitAHHID" - }, - { - "name": "FWWOMFNAME", - "source": "elco.FWWOMFNAME" - }, - { - "name": "FWWOMLNAME", - "source": "elco.FWWOMLNAME" - }, - { - "name": "FWBIRTHDATE", - "source": "elco.FWBIRTHDATE" - }, - { - "name": "FWGENDER", - "source": "elco.FWGENDER" - }, - { - "name": "FWWOMAGE", - "source": "elco.FWWOMAGE" - }, - { - "name": "display_age", - "source": "elco.display_age" - }, - { - "name": "FWNHWOMSTRMEN", - "source": "elco.FWNHWOMSTRMEN" - }, - { - "name": "FWNHWOMHUSALV", - "source": "elco.FWNHWOMHUSALV" - }, - { - "name": "FWNHWOMHUSLIV", - "source": "elco.FWNHWOMHUSLIV" - }, - { - "name": "FWNHWOMHUSSTR", - "source": "elco.FWNHWOMHUSSTR" - }, - { - "name": "FWELIGIBLE", - "source": "elco.FWELIGIBLE" - }, - { - "name": "FWWOMANYID", - "source": "elco.FWWOMANYID" - }, - { - "name": "FWWOMNID", - "source": "elco.FWWOMNID" - }, - { - "name": "FWWOMRETYPENID", - "source": "elco.FWWOMRETYPENID" - }, - { - "name": "FWWOMBID", - "source": "elco.FWWOMBID" - }, - { - "name": "FWWOMRETYPEBID", - "source": "elco.FWWOMRETYPEBID" - }, - { - "name": "FWHUSNAME", - "source": "elco.FWHUSNAME" - }, - { - "name": "FWWOMCOUNTRY", - "source": "elco.FWWOMCOUNTRY" - }, - { - "name": "FWWOMDIVISION", - "source": "elco.FWWOMDIVISION" - }, - { - "name": "FWWOMDISTRICT", - "source": "elco.FWWOMDISTRICT" - }, - { - "name": "FWWOMUPAZILLA", - "source": "elco.FWWOMUPAZILLA" - }, - { - "name": "FWWOMUNION", - "source": "elco.FWWOMUNION" - }, - { - "name": "FWWOMWARD", - "source": "elco.FWWOMWARD" - }, - { - "name": "FWWOMSUBUNIT", - "source": "elco.FWWOMSUBUNIT" - }, - { - "name": "FWWOMMAUZA_PARA", - "source": "elco.FWWOMMAUZA_PARA" - }, - { - "name": "FWWOMGOBHHID", - "source": "elco.FWWOMGOBHHID" - }, - { - "name": "FWWOMGPS", - "source": "elco.FWWOMGPS" - } - ], - "instances": [ - { - "GOBHHID": "2322", - "JiVitAHHID": "9889", - "WomanREGDATE": "2015-10-11", - "FWWOMFNAME": "jackfruit", - "FWWOMLNAME": ".", - "FWBIRTHDATE": "1988-10-08", - "FWGENDER": "female", - "FWWOMAGE": "27", - "display_age": "", - "FWNHWOMSTRMEN": "0", - "FWNHWOMHUSLIV": "1", - "FWNHWOMHUSALV": "", - "FWNHWOMHUSSTR": "0", - "FWELIGIBLE": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "FWWOMANYID": "1 2", - "FWWOMNID": "7675788777775", - "FWWOMRETYPENID": "7675788777775", - "FWWOMBID": "98899998888888888", - "FWWOMRETYPEBID": "98899998888888888", - "FWHUSNAME": "zoom", - "FWWOMCOUNTRY": "Bangladesh", - "FWWOMDIVISION": "RANGPUR", - "FWWOMDISTRICT": "GAIBANDHA", - "FWWOMUPAZILLA": "SADULLAPUR", - "FWWOMUNION": "NALDANGA", - "FWWOMWARD": "Ward-3", - "FWWOMSUBUNIT": "3-KHA", - "FWWOMMAUZA_PARA": "DASLIA+-+ALL+PARAS", - "FWWOMGOBHHID": "2322", - "FWWOMGPS": "23.8002 90.4068 0 10", - "id": "ce71572a-8oc5-u32f-9d3b-4a6b568d5g77" - } - ] - } - ] - } - }, - "serverVersion": 1444734863350 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/model.xml b/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/model.xml deleted file mode 100644 index 49e8d05084..0000000000 --- a/opensrp-core/src/test/resources/form/new_household_registration_with_grouped_subform_data/model.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 2000-01-02 00:00:00 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - FWA - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/offsite_child_followup/form.json b/opensrp-core/src/test/resources/form/offsite_child_followup/form.json deleted file mode 100644 index 03c91a8053..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_child_followup/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Offsite_Child_Vaccination_Followup","title":"دوسرے سینٹر میں رجسٹرڈ بچّوں کا فالو اپ رجسٹر برائے ٹیکاجات - Off Site Child Follow Up Vaccination Register","sms_keyword":"offsite_child_vaccination_followup","default_language":"English","choices":{"provinces":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Out of Country"}}],"ucs":[{"province":"sindh","city":"karachi","town":"korangi","name":"bilal_colony","label":{"Urdu":"بلال کالونی","Roman Urdu":"Bilal Colony","English":"Bilal Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"nasir_colony","label":{"Urdu":"ناصر کالونی","Roman Urdu":"Nasir Colony","English":"Nasir Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"chakra_goth","label":{"Urdu":"چکرا گوٹھ","Roman Urdu":"Chakra Goth","English":"Chakra Goth"}},{"province":"sindh","city":"karachi","town":"korangi","name":"mustafa_taj_colony","label":{"Urdu":"مصطفی تاج کالونی","Roman Urdu":"Mustafa Taj Colony","English":"Mustafa Taj Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hundred_quarters","label":{"Urdu":"ہنڈریڈ کوارٹر","Roman Urdu":"Hundred Quarters","English":"Hundred Quarters"}},{"province":"sindh","city":"karachi","town":"korangi","name":"gulzar_colony","label":{"Urdu":"گلزار کالونی","Roman Urdu":"Gulzar Colony","English":"Gulzar Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"korangi_sector_33","label":{"Urdu":"کورنگی سیکٹر 33","Roman Urdu":"Korangi Sector 33","English":"Korangi Sector 33"}},{"province":"sindh","city":"karachi","town":"korangi","name":"zaman_town","label":{"Urdu":"زمان ٹاوَن","Roman Urdu":"Zaman Town","English":"Zaman Town"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hasrat_mohani_colony","label":{"Urdu":"حسرت موہانی کالونی","Roman Urdu":"Hasrat Mohani Colony","English":"Hasrat Mohani Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"gulshan_e_ghazi","label":{"Urdu":"گلشن غازی","Roman Urdu":"Gulshan-e-Ghazi","English":"Gulshan-e-Ghazi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"ittehad_town","label":{"Urdu":"اتحاد ٹاوَن","Roman Urdu":"Ittehad Town","English":"Ittehad Town"}},{"province":"sindh","city":"karachi","town":"baldia","name":"islam_nagar","label":{"Urdu":"اسلام نگر","Roman Urdu":"Islam Nagar","English":"Islam Nagar"}},{"province":"sindh","city":"karachi","town":"baldia","name":"nai_abadi","label":{"Urdu":"نئی آبادی","Roman Urdu":"Nai Abadi","English":"Nai Abadi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"saeedabad","label":{"Urdu":"سعید آباد","Roman Urdu":"Saeedabad","English":"Saeedabad"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muslim_mujahid_colony","label":{"Urdu":"مسلم مجاہد کالونی","Roman Urdu":"Muslim Mujahid Colony","English":"Muslim Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muhajir_camp","label":{"Urdu":"مہاجر کیمپ","Roman Urdu":"Muhajir Camp","English":"Muhajir Camp"}},{"province":"sindh","city":"karachi","town":"baldia","name":"rasheedabad","label":{"Urdu":"رشید آباد","Roman Urdu":"Rasheedabad","English":"Rasheedabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"ibrahim_hyderi","label":{"Urdu":"ابراہیم حیدری","Roman Urdu":"Ibrahim Hyderi","English":"Ibrahim Hyderi"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"rehri","label":{"Urdu":"رہڑی","Roman Urdu":"Rehri","English":"Rehri"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"cattle_colony","label":{"Urdu":"کیٹل کالونی","Roman Urdu":"Cattle Colony","English":"Cattle Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"qaidabad","label":{"Urdu":"قائدآباد","Roman Urdu":"Qaidabad","English":"Qaidabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"landhi_colony","label":{"Urdu":"لانڈھی کالونی","Roman Urdu":"Landhi Colony","English":"Landhi Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gulshan_e_hadeed","label":{"Urdu":"گلشن حدید","Roman Urdu":"Gulshan-e-Hadeed","English":"Gulshan-e-Hadeed"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gaghar","label":{"Urdu":"گگر","Roman Urdu":"Gaghar","English":"Gaghar"}},{"province":"sindh","city":"karachi","town":"gadap","name":"murad_memon_goth","label":{"Urdu":"مراد میمن گوٹھ","Roman Urdu":"Murad Memon Goth","English":"Murad Memon Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"darsano_chana","label":{"Urdu":"درشانو شنو","Roman Urdu":"Darsano Chana","English":"Darsano Chana"}},{"province":"sindh","city":"karachi","town":"gadap","name":"gujro","label":{"Urdu":"گجرو","Roman Urdu":"Gujro","English":"Gujro"}},{"province":"sindh","city":"karachi","town":"gadap","name":"songal","label":{"Urdu":"سنگل","Roman Urdu":"Songal","English":"Songal"}},{"province":"sindh","city":"karachi","town":"gadap","name":"maymarabad","label":{"Urdu":"معمار آباد","Roman Urdu":"Maymarabad","English":"Maymarabad"}},{"province":"sindh","city":"karachi","town":"gadap","name":"yousuf_goth","label":{"Urdu":"یوسف گوٹھ","Roman Urdu":"Yousuf Goth","English":"Yousuf Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"manghopir","label":{"Urdu":"منگھوپیر","Roman Urdu":"Manghopir","English":"Manghopir"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"azizabad","label":{"Urdu":"عزیز آباد","Roman Urdu":"Azizabad","English":"Azizabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"karimabad","label":{"Urdu":"کریم آباد","Roman Urdu":"Karimabad","English":"Karimabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"aisha_manzil","label":{"Urdu":"عائشہ منزل","Roman Urdu":"Aisha Manzil","English":"Aisha Manzil"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"ancholi","label":{"Urdu":"انچولی","Roman Urdu":"Ancholi","English":"Ancholi"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"naseerabad","label":{"Urdu":"نصیرآباد","Roman Urdu":"Naseerabad","English":"Naseerabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"yaseenabad","label":{"Urdu":"یاسین آباد","Roman Urdu":"Yaseenabad","English":"Yaseenabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"water_pump","label":{"Urdu":"واٹرپمپ","Roman Urdu":"Water Pump","English":"Water Pump"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"shafiq_mill_colony","label":{"Urdu":"شفیق مل کالونی","Roman Urdu":"Shafiq Mill Colony","English":"Shafiq Mill Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"delhi_mercantile_society","label":{"Urdu":"دہلی مرچنٹائل سوسائٹی","Roman Urdu":"Delhi Mercantile Society","English":"Delhi Mercantile Society"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"civic_centre","label":{"Urdu":"سوک سینٹر","Roman Urdu":"Civic Centre","English":"Civic Centre"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pir_ilahi_buksh_colony","label":{"Urdu":"پیر الہی بخش کالونی","Roman Urdu":"Pir Ilahi Buksh Colony","English":"Pir Ilahi Buksh Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"essa_nagri","label":{"Urdu":"عیسی نگری","Roman Urdu":"Essa Nagri","English":"Essa Nagri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal","label":{"Urdu":"گلشن اقبال","Roman Urdu":"Gulshan-e-Iqbal","English":"Gulshan-e-Iqbal"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gillani_railway_station","label":{"Urdu":"گیلانی ریلوے اسٹیشن","Roman Urdu":"Gillani Railway Station","English":"Gillani Railway Station"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"shanti_nagar","label":{"Urdu":"شانتی نگر","Roman Urdu":"Shanti Nagar","English":"Shanti Nagar"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"jamali_colony","label":{"Urdu":"جمالی کالونی","Roman Urdu":"Jamali Colony","English":"Jamali Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal_ii","label":{"Urdu":"گلشن اقبال 2","Roman Urdu":"Gulshan-e-Iqbal II","English":"Gulshan-e-Iqbal II"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pehlwan_goth","label":{"Urdu":"پہلوان گوٹھ","Roman Urdu":"Pehlwan Goth","English":"Pehlwan Goth"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"matrovil_colony","label":{"Urdu":"میٹروویل کالونی","Roman Urdu":"Matrovil Colony","English":"Matrovil Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulzar_e_hijri","label":{"Urdu":"گلزار ہجری","Roman Urdu":"Gulzar-e-Hijri","English":"Gulzar-e-Hijri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"safooran_goth","label":{"Urdu":"صفورا گوٹھ","Roman Urdu":"Safooran Goth","English":"Safooran Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"akhtar_colony","label":{"Urdu":"اختر کالونی","Roman Urdu":"Akhtar Colony","English":"Akhtar Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"manzoor_colony","label":{"Urdu":"منظور کالونی","Roman Urdu":"Manzoor Colony","English":"Manzoor Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"azam_basti","label":{"Urdu":"اعظم بستی","Roman Urdu":"Azam Basti","English":"Azam Basti"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"chanesar_goth","label":{"Urdu":"چنیسر گوٹھ","Roman Urdu":"Chanesar Goth","English":"Chanesar Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"mahmudabad","label":{"Urdu":"محمودآباد","Roman Urdu":"Mahmudabad","English":"Mahmudabad"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس","Roman Urdu":"P.E.C.H.S.","English":"P.E.C.H.S."}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs_ii","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس 2","Roman Urdu":"P.E.C.H.S. II","English":"P.E.C.H.S. II"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jut_line","label":{"Urdu":"جٹ لائن","Roman Urdu":"Jut Line","English":"Jut Line"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"central_jacob_lines","label":{"Urdu":"سینٹرل جیکب لائن","Roman Urdu":"Central Jacob Lines","English":"Central Jacob Lines"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jamshed_quarters","label":{"Urdu":"جمشید کوارٹر","Roman Urdu":"Jamshed Quarters","English":"Jamshed Quarters"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"garden_east","label":{"Urdu":"گارڈن ایسٹ","Roman Urdu":"Garden East","English":"Garden East"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"soldier_bazar","label":{"Urdu":"سولجر بازار","Roman Urdu":"Soldier Bazar","English":"Soldier Bazar"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pakistan_quarters","label":{"Urdu":"پاکستان کوارٹر","Roman Urdu":"Pakistan Quarters","English":"Pakistan Quarters"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"bhutta_village","label":{"Urdu":"بھٹا ولیج","Roman Urdu":"Bhutta Village","English":"Bhutta Village"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"sultanabad","label":{"Urdu":"سلطان آباد","Roman Urdu":"Sultanabad","English":"Sultanabad"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"kiamari_uc","label":{"Urdu":"کیماری یو- سی","Roman Urdu":"Kiamari UC","English":"Kiamari UC"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"baba_bhit","label":{"Urdu":"بابا بھٹ","Roman Urdu":"Baba Bhit","English":"Baba Bhit"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"machar_colony","label":{"Urdu":"مچھر کالونی","Roman Urdu":"Machar Colony","English":"Machar Colony"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"maripur","label":{"Urdu":"ماڑی پور","Roman Urdu":"Maripur","English":"Maripur"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"shershah","label":{"Urdu":"شیرشاہ","Roman Urdu":"SherShah","English":"SherShah"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"gabo_pat","label":{"Urdu":"گابو پٹ","Roman Urdu":"Gabo Pat","English":"Gabo Pat"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muzafarabad","label":{"Urdu":"مظفرآباد","Roman Urdu":"Muzafarabad","English":"Muzafarabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muslimabad","label":{"Urdu":"مسلم آباد","Roman Urdu":"Muslimabad","English":"Muslimabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"dawood_chowrangi","label":{"Urdu":"داوَد چورنگی","Roman Urdu":"Dawood Chowrangi","English":"Dawood Chowrangi"}},{"province":"sindh","city":"karachi","town":"landhi","name":"moinabad","label":{"Urdu":"معین آباد","Roman Urdu":"Moinabad","English":"Moinabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sharafi_goth","label":{"Urdu":"شرافی گوٹھ","Roman Urdu":"Sharafi Goth","English":"Sharafi Goth"}},{"province":"sindh","city":"karachi","town":"landhi","name":"bhutto_nagar","label":{"Urdu":"بھٹو نگر","Roman Urdu":"Bhutto Nagar","English":"Bhutto Nagar"}},{"province":"sindh","city":"karachi","town":"landhi","name":"khawaja_ajmeer_colony","label":{"Urdu":"خواجہ اجمیر کالونی","Roman Urdu":"Khawaja Ajmeer Colony","English":"Khawaja Ajmeer Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"landhi_uc","label":{"Urdu":"لانڈھی یوسی","Roman Urdu":"Landhi UC","English":"Landhi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"awami_colony","label":{"Urdu":"عوامی کالونی","Roman Urdu":"Awami Colony","English":"Awami Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"burmee_colony","label":{"Urdu":"برمی کالونی","Roman Urdu":"Burmee Colony","English":"Burmee Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"korangi_uc","label":{"Urdu":"کورنگی یوسی","Roman Urdu":"Korangi UC","English":"Korangi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sherabad","label":{"Urdu":"شیرآباد","Roman Urdu":"Sherabad","English":"Sherabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"rizvia_society","label":{"Urdu":"رضویہ سوسائٹی","Roman Urdu":"Rizvia Society","English":"Rizvia Society"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"firdous_colony","label":{"Urdu":"فردوس کالونی","Roman Urdu":"Firdous Colony","English":"Firdous Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"super_market","label":{"Urdu":"سپر مارکیٹ","Roman Urdu":"Super Market","English":"Super Market"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"dak_khana","label":{"Urdu":"دک کھانہ","Roman Urdu":"Dak Khana","English":"Dak Khana"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"qasimabad","label":{"Urdu":"قاسم آباد","Roman Urdu":"Qasimabad","English":"Qasimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"bandhani_colony","label":{"Urdu":"بندھانی کالونی","Roman Urdu":"Bandhani Colony","English":"Bandhani Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"sharifabad","label":{"Urdu":"شریف آباد","Roman Urdu":"Sharifabad","English":"Sharifabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"commercial_area","label":{"Urdu":"کمرشل ایریا","Roman Urdu":"Commercial Area","English":"Commercial Area"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"mujahid_colony","label":{"Urdu":"مجاہد کالونی","Roman Urdu":"Mujahid Colony","English":"Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"nazimabad","label":{"Urdu":"ناظم آباد","Roman Urdu":"Nazimabad","English":"Nazimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"abbasi_shaheed","label":{"Urdu":"عباسی شہید","Roman Urdu":"Abbasi Shaheed","English":"Abbasi Shaheed"}},{"province":"sindh","city":"karachi","town":"lyari","name":"agra_taj_colony","label":{"Urdu":"آگرہ تاج کالونی","Roman Urdu":"Agra Taj Colony","English":"Agra Taj Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"daryaabad","label":{"Urdu":"دریاآباد","Roman Urdu":"Daryaabad","English":"Daryaabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"nawabad","label":{"Urdu":"نواآباد","Roman Urdu":"Nawabad","English":"Nawabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"khada_memon_society","label":{"Urdu":"خدا- میمن- سوساَٹی","Roman Urdu":"Khada Memon Society","English":"Khada Memon Society"}},{"province":"sindh","city":"karachi","town":"lyari","name":"baghdadi","label":{"Urdu":"بغدادی","Roman Urdu":"Baghdadi","English":"Baghdadi"}},{"province":"sindh","city":"karachi","town":"lyari","name":"shah_baig_line","label":{"Urdu":"شاھ باغ لائن","Roman Urdu":"Shah Baig Line","English":"Shah Baig Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"bihar_colony","label":{"Urdu":"بہار کالونی","Roman Urdu":"Bihar Colony","English":"Bihar Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"ragiwara","label":{"Urdu":"راگی واڑا","Roman Urdu":"Ragiwara","English":"Ragiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"singo_line","label":{"Urdu":"سنگولائن","Roman Urdu":"Singo Line","English":"Singo Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"chakiwara","label":{"Urdu":"چاکی واڑا","Roman Urdu":"Chakiwara","English":"Chakiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"allama_iqbal_colony","label":{"Urdu":"علامہ اقبال کالونی","Roman Urdu":"Allama Iqbal Colony","English":"Allama Iqbal Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"model_colony","label":{"Urdu":"موڈل کالونی","Roman Urdu":"Model Colony","English":"Model Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"kala_board","label":{"Urdu":"کالا بورڈ","Roman Urdu":"Kala Board","English":"Kala Board"}},{"province":"sindh","city":"karachi","town":"malir","name":"saudabad","label":{"Urdu":"سعودآباد","Roman Urdu":"Saudabad","English":"Saudabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"khokhra_par","label":{"Urdu":"کھوکھرا پار","Roman Urdu":"Khokhra Par","English":"Khokhra Par"}},{"province":"sindh","city":"karachi","town":"malir","name":"jafar_e_tayyar","label":{"Urdu":"جعفر تیار","Roman Urdu":"Jafar-e-Tayyar","English":"Jafar-e-Tayyar"}},{"province":"sindh","city":"karachi","town":"malir","name":"gharibabad","label":{"Urdu":"غریب آباد","Roman Urdu":"Gharibabad","English":"Gharibabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"ghazi_brohi_goth","label":{"Urdu":"غازی بروہی گوٹھ","Roman Urdu":"Ghazi Brohi Goth","English":"Ghazi Brohi Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"kalyana","label":{"Urdu":"کالیانہ","Roman Urdu":"Kalyana","English":"Kalyana"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"sir_syed_colony","label":{"Urdu":"سر سید کالونی","Roman Urdu":"Sir Syed Colony","English":"Sir Syed Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"fatima_jinnah_colony","label":{"Urdu":"فاطمہ جناح کالونی","Roman Urdu":"Fatima Jinnah Colony","English":"Fatima Jinnah Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"godhra","label":{"Urdu":"گودھرا","Roman Urdu":"Godhra","English":"Godhra"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"abu_zar_ghaffari","label":{"Urdu":"ابو زر غفاری","Roman Urdu":"Abu Zar Ghaffari","English":"Abu Zar Ghaffari"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"hakim_ahsan","label":{"Urdu":"حاکم احسان","Roman Urdu":"Hakim Ahsan","English":"Hakim Ahsan"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"madina_colony","label":{"Urdu":"مدینہ کالونی","Roman Urdu":"Madina Colony","English":"Madina Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"faisal_colony","label":{"Urdu":"فیصل کالونی","Roman Urdu":"Faisal Colony","English":"Faisal Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khamiso_goth","label":{"Urdu":"خمیسو گوٹھ","Roman Urdu":"Khamiso Goth","English":"Khamiso Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"mustufa_colony","label":{"Urdu":"مصطفی کالونی","Roman Urdu":"Mustufa Colony","English":"Mustufa Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khawaja_ajmeer_nagri","label":{"Urdu":"خواجہ اجمیر نگری","Roman Urdu":"Khawaja Ajmeer Nagri","English":"Khawaja Ajmeer Nagri"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"gulshan_e_saeed","label":{"Urdu":"گلشن سعید","Roman Urdu":"Gulshan-e-Saeed","English":"Gulshan-e-Saeed"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"shah_nawaz_bhutto_colony","label":{"Urdu":"شاہ نواز بھٹو کالونی","Roman Urdu":"Shah Nawaz Bhutto Colony","English":"Shah Nawaz Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"paposh_nagar","label":{"Urdu":"پاپوش نگر","Roman Urdu":"Paposh Nagar","English":"Paposh Nagar"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"pahar_ganj","label":{"Urdu":"پہاڑ گنج","Roman Urdu":"Pahar Ganj","English":"Pahar Ganj"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"khandu_goth","label":{"Urdu":"کھنڑو گوٹھ","Roman Urdu":"Khandu Goth","English":"Khandu Goth"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"hyderi","label":{"Urdu":"حیدری","Roman Urdu":"Hyderi","English":"Hyderi"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"sakhi_hassan","label":{"Urdu":"سخی حسن","Roman Urdu":"Sakhi Hassan","English":"Sakhi Hassan"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"farooq_e_azam","label":{"Urdu":"فاروق اعظم","Roman Urdu":"Farooq-e-Azam","English":"Farooq-e-Azam"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"nusrat_bhutto_colony","label":{"Urdu":"نصرت بھٹو کالونی","Roman Urdu":"Nusrat Bhutto Colony","English":"Nusrat Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"shadman_town","label":{"Urdu":"شادمان ٹاوَن","Roman Urdu":"Shadman Town","English":"Shadman Town"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone","label":{"Urdu":"بفرزون","Roman Urdu":"Buffer Zone","English":"Buffer Zone"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone_ii","label":{"Urdu":"بفرزون 2","Roman Urdu":"Buffer Zone II","English":"Buffer Zone II"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mominabad","label":{"Urdu":"مومن آباد","Roman Urdu":"Mominabad","English":"Mominabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"haryana_colony","label":{"Urdu":"حریانہ کالونی","Roman Urdu":"Haryana Colony","English":"Haryana Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"hanifabad","label":{"Urdu":"حنیف آباد","Roman Urdu":"Hanifabad","English":"Hanifabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mohammad_nagar","label":{"Urdu":"محمد نگر","Roman Urdu":"Mohammad Nagar","English":"Mohammad Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"madina_colony_orangi","label":{"Urdu":"مدینہ کالونی اورنگی","Roman Urdu":"Madina Colony Orangi","English":"Madina Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghaziabad","label":{"Urdu":"غازی آباد","Roman Urdu":"Ghaziabad","English":"Ghaziabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"chisti_nagar","label":{"Urdu":"چشتی نگر","Roman Urdu":"Chisti Nagar","English":"Chisti Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"bilal_colony_orangi","label":{"Urdu":"بلال کالونی اورنگی","Roman Urdu":"Bilal Colony Orangi","English":"Bilal Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"iqbal_baloch_colony","label":{"Urdu":"اقبال بلوچ کالونی","Roman Urdu":"Iqbal Baloch Colony","English":"Iqbal Baloch Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghabool_town","label":{"Urdu":"گبول ٹاوَن","Roman Urdu":"Ghabool Town","English":"Ghabool Town"}},{"province":"sindh","city":"karachi","town":"orangi","name":"data_nagar","label":{"Urdu":"داتا نگر","Roman Urdu":"Data Nagar","English":"Data Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mujahidabad","label":{"Urdu":"مجاہد آباد","Roman Urdu":"Mujahidabad","English":"Mujahidabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"baloch_goth","label":{"Urdu":"بلوچ گوٹھ","Roman Urdu":"Baloch Goth","English":"Baloch Goth"}},{"province":"sindh","city":"karachi","town":"saddar","name":"old_haji_camp","label":{"Urdu":"پرانہ حاجی کیمپ","Roman Urdu":"Old Haji Camp","English":"Old Haji Camp"}},{"province":"sindh","city":"karachi","town":"saddar","name":"garden","label":{"Urdu":"گارڈن","Roman Urdu":"Garden","English":"Garden"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kharadar","label":{"Urdu":"کھارادر","Roman Urdu":"Kharadar","English":"Kharadar"}},{"province":"sindh","city":"karachi","town":"saddar","name":"city_railway_colony","label":{"Urdu":"سٹی ریلوے کالونی","Roman Urdu":"City Railway Colony","English":"City Railway Colony"}},{"province":"sindh","city":"karachi","town":"saddar","name":"nanak_wara","label":{"Urdu":"ناناک واڑا","Roman Urdu":"Nanak Wara","English":"Nanak Wara"}},{"province":"sindh","city":"karachi","town":"saddar","name":"gazdarabad","label":{"Urdu":"گزدرآباد","Roman Urdu":"Gazdarabad","English":"Gazdarabad"}},{"province":"sindh","city":"karachi","town":"saddar","name":"millat_nagar_islam_pura","label":{"Urdu":"ملت نگر اسلام پورا","Roman Urdu":"Millat Nagar/Islam Pura","English":"Millat Nagar/Islam Pura"}},{"province":"sindh","city":"karachi","town":"saddar","name":"saddar_uc","label":{"Urdu":"صدر یو سی","Roman Urdu":"Saddar UC","English":"Saddar UC"}},{"province":"sindh","city":"karachi","town":"saddar","name":"civil_line","label":{"Urdu":"سول لائن","Roman Urdu":"Civil Line","English":"Civil Line"}},{"province":"sindh","city":"karachi","town":"saddar","name":"clifton","label":{"Urdu":"کلفٹن","Roman Urdu":"Clifton","English":"Clifton"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kehkashan","label":{"Urdu":"کہکشان","Roman Urdu":"Kehkashan","English":"Kehkashan"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"natha_khan_goth","label":{"Urdu":"ناتھا خان گوٹھ","Roman Urdu":"Natha Khan Goth","English":"Natha Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"pak_sadat_colony","label":{"Urdu":"پاک صدر کالونی","Roman Urdu":"Pak Sadat Colony","English":"Pak Sadat Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"drigh_colony","label":{"Urdu":"ڈرگ کالونی","Roman Urdu":"Drigh Colony","English":"Drigh Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"raita_plot","label":{"Urdu":"رائتا پلاٹ","Roman Urdu":"Raita Plot","English":"Raita Plot"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"moria_khan_goth","label":{"Urdu":"موریا خان گوٹھ","Roman Urdu":"Moria Khan Goth","English":"Moria Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"rafa_e_aam_society","label":{"Urdu":"رفا عام سوسا ئٹی","Roman Urdu":"Rafa-e-Aam Society","English":"Rafa-e-Aam Society"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"al_falah_society","label":{"Urdu":"الفلاح سوسا ئٹی","Roman Urdu":"Al-Falah Society","English":"Al-Falah Society"}},{"province":"sindh","city":"karachi","town":"site","name":"pak_colony","label":{"Urdu":"پاک کالونی","Roman Urdu":"Pak Colony","English":"Pak Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"old_golimar","label":{"Urdu":"پرانہ گولی مار","Roman Urdu":"Old Golimar","English":"Old Golimar"}},{"province":"sindh","city":"karachi","town":"site","name":"jahanabad","label":{"Urdu":"جہان آباد","Roman Urdu":"Jahanabad","English":"Jahanabad"}},{"province":"sindh","city":"karachi","town":"site","name":"metrovil","label":{"Urdu":"میٹروویل","Roman Urdu":"Metrovil","English":"Metrovil"}},{"province":"sindh","city":"karachi","town":"site","name":"bhawani_chali","label":{"Urdu":"بہوانی چالی","Roman Urdu":"Bhawani Chali","English":"Bhawani Chali"}},{"province":"sindh","city":"karachi","town":"site","name":"frontier_colony","label":{"Urdu":"فرونٹر کالونی","Roman Urdu":"Frontier Colony","English":"Frontier Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"banaras_colony","label":{"Urdu":"بنارس کالونی","Roman Urdu":"Banaras Colony","English":"Banaras Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"qasba_colony","label":{"Urdu":"قصبہ کالونی","Roman Urdu":"Qasba Colony","English":"Qasba Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"islamia_colony","label":{"Urdu":"اسلامیہ کالونی","Roman Urdu":"Islamia Colony","English":"Islamia Colony"}},{"province":"na","city":"na","town":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","town":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"gender":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}],"vaccines":[{"instance":{"openmrs_code":"1570AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"bcg","label":{"Urdu":"بی سی جی","Roman Urdu":"BCG","English":"BCG"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv0","label":{"Urdu":"او پی وی 0","Roman Urdu":"OPV 0","English":"OPV 0"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv1","label":{"Urdu":"پی سی وی 1","Roman Urdu":"PCV 1","English":"PCV 1"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv1","label":{"Urdu":"او پی وی 1","Roman Urdu":"OPV 1","English":"OPV 1"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta11","label":{"Urdu":"پینٹا ویلنٹ 1","Roman Urdu":"Pentavalent 1","English":"Pentavalent 1"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv2","label":{"Urdu":"پی سی وی 2","Roman Urdu":"PCV 2","English":"PCV 2"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv2","label":{"Urdu":"او پی وی 2","Roman Urdu":"OPV 2","English":"OPV 2"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta12","label":{"Urdu":"پینٹا ویلنٹ 2","Roman Urdu":"Pentavalent 2","English":"Pentavalent 2"}},{"instance":{"openmrs_code":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv3","label":{"Urdu":"پی سی وی 3","Roman Urdu":"PCV 3","English":"PCV 3"}},{"instance":{"openmrs_code":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv3","label":{"Urdu":"او پی وی 3","Roman Urdu":"OPV 3","English":"OPV 3"}},{"instance":{"openmrs_code":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta13","label":{"Urdu":"پینٹا ویلنٹ 3","Roman Urdu":"Pentavalent 3","English":"Pentavalent 3"}},{"instance":{"openmrs_code":"82242AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ipv","label":{"Urdu":"آئی پی وی","Roman Urdu":"IPV","English":"IPV"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles1","label":{"Urdu":"خسرہ 1","Roman Urdu":"Khasra 1","English":"Measles 1"}},{"instance":{"openmrs_code":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles2","label":{"Urdu":"خسرہ 2","Roman Urdu":"Khasra 2","English":"Measles 2"}}],"towns":[{"province":"sindh","city":"karachi","name":"korangi","label":{"Urdu":"کورنگی","Roman Urdu":"Korangi","English":"Korangi"}},{"province":"sindh","city":"karachi","name":"landhi","label":{"Urdu":"لانڈھی","Roman Urdu":"Landhi","English":"Landhi"}},{"province":"sindh","city":"karachi","name":"baldia","label":{"Urdu":"بلدیہ","Roman Urdu":"Baldia","English":"Baldia"}},{"province":"sindh","city":"karachi","name":"bin_qasim","label":{"Urdu":"بن قاسم","Roman Urdu":"Bin Qasim","English":"Bin Qasim"}},{"province":"sindh","city":"karachi","name":"gadap","label":{"Urdu":"گڈاپ","Roman Urdu":"Gadap","English":"Gadap"}},{"province":"sindh","city":"karachi","name":"gulberg","label":{"Urdu":"گلبرگ","Roman Urdu":"Gulberg","English":"Gulberg"}},{"province":"sindh","city":"karachi","name":"gulshan","label":{"Urdu":"گلشن","Roman Urdu":"Gulshan","English":"Gulshan"}},{"province":"sindh","city":"karachi","name":"jamshed","label":{"Urdu":"جمشید","Roman Urdu":"Jamshed","English":"Jamshed"}},{"province":"sindh","city":"karachi","name":"kiamari","label":{"Urdu":"کیماری","Roman Urdu":"Kiamari","English":"Kiamari"}},{"province":"sindh","city":"karachi","name":"liaquatabad","label":{"Urdu":"لیاقت آباد","Roman Urdu":"Liaquatabad","English":"Liaquatabad"}},{"province":"sindh","city":"karachi","name":"lyari","label":{"Urdu":"لیاری","Roman Urdu":"Lyari","English":"Lyari"}},{"province":"sindh","city":"karachi","name":"malir","label":{"Urdu":"ملیر","Roman Urdu":"Malir","English":"Malir"}},{"province":"sindh","city":"karachi","name":"new_karachi","label":{"Urdu":"نیو کراچی","Roman Urdu":"New Karachi","English":"New Karachi"}},{"province":"sindh","city":"karachi","name":"north_nazimabad","label":{"Urdu":"نارتھ ناظم آباد","Roman Urdu":"North Nazimabad","English":"North Nazimabad"}},{"province":"sindh","city":"karachi","name":"orangi","label":{"Urdu":"اورنگی","Roman Urdu":"Orangi","English":"Orangi"}},{"province":"sindh","city":"karachi","name":"saddar","label":{"Urdu":"صدر","Roman Urdu":"Saddar","English":"Saddar"}},{"province":"sindh","city":"karachi","name":"shah_faisal","label":{"Urdu":"شاہ فیصل","Roman Urdu":"Shah Faisal","English":"Shah Faisal"}},{"province":"sindh","city":"karachi","name":"site","label":{"Urdu":"سائٹ","Roman Urdu":"S.I.T.E.","English":"S.I.T.E."}},{"province":"na","city":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"cities":[{"province":"sindh","name":"karachi","label":{"Urdu":"کراچی","Roman Urdu":"Karachi","English":"Karachi"}},{"province":"punjab","name":"hafizabad","label":{"Urdu":"حافظ آباد","Roman Urdu":"Hafizabad","English":"Hafizabad"}},{"province":"punjab","name":"muzaffargarh","label":{"Urdu":"مظفر گڑھ","Roman Urdu":"Muzaffargarh","English":"Muzaffargarh"}},{"province":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"yes_no":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},"instance":{"encounter_type":"Off Site Child Vaccination Follow Up"},"version":"201604080501","id_string":"offsite_child_vaccination_followup","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"existing_first_name"},{"type":"hidden","name":"existing_last_name"},{"type":"hidden","name":"existing_mother_name"},{"type":"hidden","name":"existing_gender"},{"type":"hidden","name":"existing_client_birth_date"},{"type":"hidden","name":"existing_client_reg_date"},{"type":"hidden","name":"existing_landmark"},{"type":"hidden","name":"existing_house_number"},{"type":"hidden","name":"existing_street"},{"type":"hidden","name":"existing_union_council"},{"type":"hidden","name":"existing_town"},{"type":"hidden","name":"existing_city_village"},{"type":"hidden","name":"existing_province"},{"type":"hidden","name":"existing_union_councilname"},{"type":"hidden","name":"existing_townname"},{"type":"hidden","name":"existing_city_villagename"},{"type":"hidden","name":"existing_provincename"},{"type":"hidden","name":"existing_ethnicity"},{"type":"hidden","name":"existing_program_client_id"},{"type":"hidden","name":"existing_epi_card_number"},{"type":"hidden","name":"existing_child_was_suffering_from_a_disease_at_birth"},{"type":"hidden","name":"existing_reminders_approval"},{"type":"hidden","name":"existing_contact_phone_number"},{"type":"hidden","name":"e_bcg"},{"type":"hidden","name":"e_opv0"},{"type":"hidden","name":"e_penta2"},{"type":"hidden","name":"e_penta1"},{"type":"hidden","name":"e_penta3"},{"type":"hidden","name":"e_opv1"},{"type":"hidden","name":"e_opv2"},{"type":"hidden","name":"e_opv3"},{"type":"hidden","name":"e_pcv1"},{"type":"hidden","name":"e_pcv2"},{"type":"hidden","name":"e_pcv3"},{"type":"hidden","name":"e_measles1"},{"type":"hidden","name":"e_measles2"},{"type":"hidden","name":"e_ipv"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"type":"hidden","name":"provider_location_name"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}","Roman Urdu":"Shehr: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center ka Naam: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"bind":{"required":"yes"},"label":{"Urdu":"بچے کی پروگرام میں اندراج کی تاریخ: {existing_client_reg_date}$","Roman Urdu":"Bachay ki Program mai andraj ki tareekh: ${existing_client_reg_date}","English":"Child Registration date: ${existing_client_reg_date}"},"type":"note","name":"existing_client_reg_date_note","hint":{"Urdu":"بچے کو ویکسین لگنے کی تاریخ","Roman Urdu":"Bachay ko vaccine lagnay ki tareekh","English":"Date on which child was vaccinated"}},{"bind":{"required":"yes"},"type":"note","name":"program_client_id_note","label":{"Urdu":"کلائنٹ کی پروگرام ائی ڈی: {existing_program_client_id}$","Roman Urdu":"Client ki program ID: ${existing_program_client_id}","English":"Program Client ID: ${existing_program_client_id}"}},{"bind":{"jr:constraintMsg":{"Urdu":"نمبر آٹھ ہندسوں پر مشتمل ہونا چاہئے","English":"Number should be 8 digits","Roman Urdu":"Number 8 hindason par mushtamil hona chahiye"},"required":"yes","constraint":"string-length(.) = 8"},"type":"integer","instance":{"openmrs_entity_id":"EPI Card Number","openmrs_entity":"person_attribute"},"name":"epi_card_number","label":{"Urdu":"ای پی آئی کارڈ نمبر: {existing_epi_card_number}$","English":"EPI Card Number: ${existing_epi_card_number}","Roman Urdu":"EPI Card Number: ${existing_epi_card_number}"}},{"bind":{"required":"yes"},"type":"note","name":"first_name_note","label":{"Urdu":"نام: {existing_first_name}$","Roman Urdu":"Naam: ${existing_first_name}","English":"First Name: ${existing_first_name}"}},{"bind":{"required":"yes"},"type":"note","name":"last_name_note","label":{"Urdu":"والد کا نام: {existing_last_name}$","Roman Urdu":"Waalid ka naam: ${existing_last_name}","English":"Last name: ${existing_last_name}"}},{"bind":{"calculate":"int((${today} - ${existing_client_birth_date}) div 30.42)"},"type":"calculate","name":"child_age","instance":{"openmrs_entity_id":"154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"type":"note","name":"calc_dob_note","label":{"Urdu":"بچے کی تاریخ پیدائش: {existing_client_birth_date}$ ({child_age}$) مہینے","English":"Child dob: ${existing_client_birth_date} (${child_age}) months","Roman Urdu":"Bachay ki tareekh-e-paidaish: ${existing_client_birth_date} (${child_age}) mahinay"}},{"bind":{"required":"yes"},"type":"note","name":"gender_note","label":{"Urdu":"جنس: {existing_gender}$","Roman Urdu":"Jins:${existing_gender}","English":"Gender: ${existing_gender}"}},{"type":"note","name":"mother_name_note","label":{"Urdu":"ماں کا نام: {existing_mother_name}$","English":"Mother's Name: ${existing_mother_name}","Roman Urdu":"Maa ka naam: ${existing_mother_name}"}},{"bind":{"required":"yes"},"type":"note","name":"exisiting_ethnicity_note","label":{"Urdu":"قومیت: {existing_ethnicity}$","Roman Urdu":"Qomiat: ${existing_ethnicity}","English":"Ethnicity: ${existing_ethnicity}"}},{"type":"note","name":"address","label":{"Urdu":"موجودہ پتہ: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","English":"Current Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","Roman Urdu":"Mojooda Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}"}},{"label":{"Urdu":"کیا آپ کا گھر کا پتہ بدلا ہے؟","English":"Has your home address changed?","Roman Urdu":"Kya aap ka ghar ka pata badla hai?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"address_change"},{"control":{"appearance":"minimal"},"name":"province","default":"${provider_province}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"صوبہ","Roman Urdu":"Suba","English":"Province"},"instance":{"openmrs_entity":"person_address","openmrs_entity_id":"stateProvince","openmrs_entity_parent":"usual_residence"},"type":"select one","children":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Out of Country"}}]},{"control":{"appearance":"minimal"},"name":"city_village","choice_filter":"province=${province} or province='na'","default":"${provider_city}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"شہر","Roman Urdu":"Shehr","English":"City"},"itemset":"cities","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"cityVillage","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"town","choice_filter":"(province=${province} and city=${city_village} ) or city='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"ٹاٰئون/ قصبہ/ بستی","Roman Urdu":"Town / Qasbah / Basti","English":"Town"},"itemset":"towns","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"town","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"union_council","choice_filter":"(province=${province} and city=${city_village} and town=${town}) or town='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"یونین کونسل","Roman Urdu":"Union Council","English":"Union Council"},"itemset":"ucs","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"subTown","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"house","openmrs_entity_parent":"usual_residence"},"name":"house_number","label":{"Urdu":"گھر کا نمبر","Roman Urdu":"Ghar ka number","English":"House Number"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"street","openmrs_entity_parent":"usual_residence"},"name":"street","label":{"Urdu":"گلی/کالونی/محلہ","Roman Urdu":"Gali/Colony/Mohalla","English":"Street"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"landmark","openmrs_entity_parent":"usual_residence"},"name":"landmark","label":{"Urdu":"گھر کے قریب کوئی مشہور جگہ","Roman Urdu":"Ghar ke qareeb koi mashoor jagah","English":"Land Mark"}},{"instance":{"openmrs_entity_id":"163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"geopoint","name":"center_gps","label":{"Urdu":"حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں","English":"Collect GPS coordinates of data entry location:","Roman Urdu":"Hasil karda malomaat ki jaga ke GPS coordinates darj karain"}},{"control":{"appearance":"minimal"},"bind":{"required":"yes"},"type":"note","name":"child_was_suffering_from_a_disease_at_birth_note","label":{"Urdu":"کیا بچہ پیدائش کے وقت کسی مرض میں مبتلا تھا؟ {existing_child_was_suffering_from_a_disease_at_birth}$","Roman Urdu":"Kya bacha pedaaish k waqt kissi marz mai mubtila tha? ${existing_child_was_suffering_from_a_disease_at_birth}","English":"Child was suffering from a disease at birth: ${existing_child_was_suffering_from_a_disease_at_birth}"}},{"instance":{"openmrs_entity_id":"163162AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"text","name":"aefi","label":{"Urdu":"حفاظتی ٹیکوں کے مضر اثرات","English":"The temporary side-effects of immunization shots","Roman Urdu":"Hifazati teekon ke muzr asraat"}},{"control":{"appearance":"minimal"},"name":"reminders_approval","bind":{"required":"yes"},"label":{"Urdu":"کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ {existing_reminders_approval}$","English":"Are you willing to receive SMS reminders for your next visit? ${existing_reminders_approval}","Roman Urdu":"Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? ${existing_reminders_approval}"},"instance":{"openmrs_entity_id":"163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03","English":"Phone number should be 11 digits in the following format: 03*********","Roman Urdu":"Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********"},"relevant":"${existing_reminders_approval}='yes'","constraint":"regex(., '^03[0-9]{9}$')"},"type":"text","instance":{"openmrs_entity_id":"159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"contact_phone_number","label":{"Urdu":"موبائل نمبر:{existing_contact_phone_number}$","English":"Mobile Number: ${existing_contact_phone_number}","Roman Urdu":"Mobile Number: ${existing_contact_phone_number}"}},{"bind":{"calculate":"${existing_client_birth_date} + 42"},"type":"calculate","name":"six_weeks"},{"bind":{"calculate":"${existing_client_birth_date} + 70"},"type":"calculate","name":"ten_weeks"},{"bind":{"calculate":"${existing_client_birth_date} + 98"},"type":"calculate","name":"forteen_weeks"},{"bind":{"calculate":"${existing_client_birth_date} + 245"},"type":"calculate","name":"nine_months"},{"bind":{"calculate":"${existing_client_birth_date} + 458"},"type":"calculate","name":"fifteen_months"},{"control":{"appearance":"minimal"},"name":"vaccines","choice_filter":"name != if( ${e_bcg} != '', 'bcg' , '') and \nname != if( ${e_opv0} != '', 'opv0' , '') and \nname != if( ${e_penta1} != '', 'penta1' , '') and \nname != if( ${e_penta2} != '', 'penta2' , '') and \nname != if( ${e_penta3} != '', 'penta3' , '') and \nname != if( ${e_opv1} != '', 'opv1' , '') and \nname != if( ${e_opv2} != '', 'opv2' , '') and \nname != if( ${e_opv3} != '', 'opv3' , '') and \nname != if( ${e_pcv1} != '', 'pcv1' , '') and \nname != if( ${e_pcv2} != '', 'pcv2' , '') and \nname != if( ${e_pcv3} != '', 'pcv3' , '') and \nname != if( ${e_ipv} != '', 'ipv' , '') and \nname != if( ${e_measles1} != '', 'measles1' , '') and \nname != if( ${e_measles2} != '', 'measles2' , '')","label":{"Urdu":"پچھلی تاریخ جب کسی اور سینٹر پر ٹیکے لگواِے گیے یا قطرے پلائے گئے","Roman Urdu":"Pichli tareekh jab kissi aur center par teekay lagwaye gaye ya katray pilaey gaye","English":"Retro vaccines"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"type":"group","children":[{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'bcg')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"bcg_retro","label":{"Urdu":"بی سی جی","Roman Urdu":"BCG","English":"BCG"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv0')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv0_retro","label":{"Urdu":"او پی وی 0","Roman Urdu":"OPV 0","English":"OPV 0"}},{"bind":{"relevant":"selected(${vaccines}, 'opv0')","calculate":"0"},"type":"calculate","name":"opv0_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv1')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv1_retro","label":{"Urdu":"پی سی وی 1","Roman Urdu":"PCV1","English":"PCV1"}},{"bind":{"relevant":"selected(${vaccines}, 'pcv1')","calculate":"1"},"type":"calculate","name":"pcv1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv1')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv1_retro","label":{"Urdu":"او پی وی1","Roman Urdu":"OPV 1","English":"OPV 1"}},{"bind":{"relevant":"selected(${vaccines}, 'opv1')","calculate":"1"},"type":"calculate","name":"opv1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta11')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta11_retro","label":{"Urdu":"پینٹا ویلنٹ 1","Roman Urdu":"Pentavalent 1","English":"Pentavalent 1"}},{"bind":{"relevant":"selected(${vaccines}, 'penta11')","calculate":"1"},"type":"calculate","name":"penta11_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv2')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv2_retro","label":{"Urdu":"پی سی وی 2","Roman Urdu":"PCV2","English":"PCV2"}},{"bind":{"relevant":"selected(${vaccines}, 'pcv2')","calculate":"2"},"type":"calculate","name":"pcv2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv2')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv2_retro","label":{"Urdu":"او پی وی 2","Roman Urdu":"OPV 2","English":"OPV 2"}},{"bind":{"relevant":"selected(${vaccines}, 'opv2')","calculate":"2"},"type":"calculate","name":"opv2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta12')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta12_retro","label":{"Urdu":"پینٹا ویلنٹ 2","Roman Urdu":"Pentavalent 2","English":"Pentavalent 2"}},{"bind":{"relevant":"selected(${vaccines}, 'penta12')","calculate":"2"},"type":"calculate","name":"penta12_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'pcv3')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pcv3_retro","label":{"Urdu":"پی سی وی 3","Roman Urdu":"PCV3","English":"PCV3"}},{"bind":{"relevant":"selected(${vaccines}, 'penta12')","calculate":"3"},"type":"calculate","name":"pcv3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'opv3')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"opv3_retro","label":{"Urdu":"او پی وی3","Roman Urdu":"OPV 3","English":"OPV 3"}},{"bind":{"relevant":"selected(${vaccines}, 'opv3')","calculate":"3"},"type":"calculate","name":"opv3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'penta13')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"penta13_retro","label":{"Urdu":"پینٹا ویلنٹ 3","Roman Urdu":"Pentavalent 3","English":"Pentavalent 3"}},{"bind":{"relevant":"selected(${vaccines}, 'penta13')","calculate":"3"},"type":"calculate","name":"penta13_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'ipv')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ipv_retro","label":{"Urdu":"آئی پی وی","Roman Urdu":"IPV","English":"IPV"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'measles1')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles1_retro","label":{"Urdu":"خسرہ 1","Roman Urdu":"Measles 1","English":"Measles 1"}},{"bind":{"relevant":"selected(${vaccines}, 'measles1')","calculate":"1"},"type":"calculate","name":"measles1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"jr:constraintMsg":{"Urdu":"حفاظتی ٹیکا ملنے کی تاریخ، بچے کی تاریخ پیدائش کے بعد اور آج کی تاریخ سے پہلے کی ہونی چاہیے","English":"The date of vaccination must be greater than the child's birthdate and less than today.","Roman Urdu":"Hifaazati teeka milnay ki tareekh, bachay ki tareekh-e-pedaaish ke baad aur aaj ki tareekh se phlay ki honi chahiye."},"relevant":"selected(${vaccines}, 'measles2')","constraint":".>= ${existing_client_birth_date} and .<=${today}"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"measles2_retro","label":{"Urdu":"خسرہ 2","Roman Urdu":"Measles2","English":"Measles2"}},{"bind":{"relevant":"selected(${vaccines}, 'measles2')","calculate":"2"},"type":"calculate","name":"measles2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}}],"name":"vaccines_group"},{"control":{"appearance":"minimal"},"name":"vaccines_2","choice_filter":"name != if( ${e_bcg} != '', 'bcg' , '') and \nname != if( ${e_opv0} != '', 'opv0' , '') and \nname != if( ${e_penta2} != '', 'penta2' , '') and \nname != if( ${e_penta1} != '', 'penta1' , '') and \nname != if( ${e_penta3} != '', 'penta3' , '') and \nname != if( ${e_opv1} != '', 'opv1' , '') and \nname != if( ${e_opv2} != '', 'opv2' , '') and \nname != if( ${e_opv3} != '', 'opv3' , '') and \nname != if( ${e_pcv1} != '', 'pcv1' , '') and \nname != if( ${e_pcv2} != '', 'pcv2' , '') and \nname != if( ${e_pcv3} != '', 'pcv3' , '') and \nname != if( ${e_measles1} != '', 'measles1' , '') and \nname != if( ${e_measles2} != '', 'measles2' , '') and \nname != if(selected(${vaccines}, 'bcg'), 'bcg', '') and \nname != if(selected(${vaccines}, 'opv0'), 'opv0', '') and \nname != if(selected(${vaccines}, 'penta1'), 'penta1', '') and \nname != if(selected(${vaccines}, 'opv1'), 'opv1', '') and \nname != if(selected(${vaccines}, 'pcv1'), 'pcv1', '') and \nname != if(selected(${vaccines}, 'penta2'), 'penta2', '') and \nname != if(selected(${vaccines}, 'opv2'), 'opv2', '') and \nname != if(selected(${vaccines}, 'pcv2'), 'pcv2', '') and \nname != if(selected(${vaccines}, 'penta3'), 'penta3', '') and \nname != if(selected(${vaccines}, 'opv3'), 'opv3', '') and \nname != if(selected(${vaccines}, 'ipv'), 'ipv', '') and \nname != if(selected(${vaccines}, 'measles1'), 'measles1', '') and \nname != if(selected(${vaccines}, 'measles2'), 'measles2', '')","bind":{"required":"yes","constraint":"if(selected(${vaccines_2}, 'bcg') or selected(${vaccines_2}, 'opv0') , .>= ${existing_client_birth_date} and .<=${today}, if(selected(${vaccines_2}, 'opv1') or selected(${vaccines_2}, 'penta11'), .>= ${six_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv2') or selected(${vaccines_2}, 'penta12'), .>=${ten_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv3') or selected(${vaccines_2}, 'penta13'), .>=${forteen_weeks} and .<=${today}, if(selected(${vaccines_2}, 'measles1'), .>=${nine_months} and .<=${today}, if(selected(${vaccines_2}, 'measles2'), .>= ${fifteen_months} and .<=${today}))))))"},"label":{"Urdu":"آج کون کون سی ویکسین دی گئی ہیں؟","Roman Urdu":"Aaj kon kon si vaccine di gai hain?","English":"Vaccines administered"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"name":"vaccination_date","default":"${today}","bind":{"required":"yes","constraint":"if(selected(${vaccines_2}, 'bcg') or selected(${vaccines_2}, 'opv0') , .>= ${existing_client_birth_date} and .<=${today}, if(selected(${vaccines_2}, 'opv1') or selected(${vaccines_2}, 'penta11'), .>= ${six_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv2') or selected(${vaccines_2}, 'penta12'), .>=${ten_weeks} and .<=${today}, if(selected(${vaccines_2}, 'opv3') or selected(${vaccines_2}, 'penta13'), .>=${forteen_weeks} and .<=${today}, if(selected(${vaccines_2}, 'measles1'), .>=${nine_months} and .<=${today}, if(selected(${vaccines_2}, 'measles2'), .>= ${fifteen_months} and .<=${today}))))))"},"label":{"Urdu":"تاریخ","English":"Vaccination date","Roman Urdu":"Tareekh"},"instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"type":"date"},{"bind":{"calculate":"if(selected(${vaccines_2}, 'bcg'),${vaccination_date},'')"},"type":"calculate","name":"bcg","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv0'),${vaccination_date},'')"},"type":"calculate","name":"opv0","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv0')","calculate":"0"},"type":"calculate","name":"opv0_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv1'),${vaccination_date},'')"},"type":"calculate","name":"pcv1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv1')","calculate":"1"},"type":"calculate","name":"pcv1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv1'),${vaccination_date},'')"},"type":"calculate","name":"opv1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv1')","calculate":"1"},"type":"calculate","name":"opv1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta11'),${vaccination_date},'')"},"type":"calculate","name":"penta11","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta11')","calculate":"1"},"type":"calculate","name":"penta11_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv2'),${vaccination_date},'')"},"type":"calculate","name":"pcv2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv2')","calculate":"2"},"type":"calculate","name":"pcv2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv2'),${vaccination_date},'')"},"type":"calculate","name":"opv2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv2')","calculate":"2"},"type":"calculate","name":"opv2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta12'),${vaccination_date},'')"},"type":"calculate","name":"penta12","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta12')","calculate":"2"},"type":"calculate","name":"penta12_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'pcv3'),${vaccination_date},'')"},"type":"calculate","name":"pcv3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'pcv3')","calculate":"3"},"type":"calculate","name":"pcv3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'opv3'),${vaccination_date},'')"},"type":"calculate","name":"opv3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'opv3')","calculate":"3"},"type":"calculate","name":"opv3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'penta13'),${vaccination_date},'')"},"type":"calculate","name":"penta13","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'penta13')","calculate":"3"},"type":"calculate","name":"penta13_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines}, 'ipv')","calculate":"if(selected(${vaccines_2}, 'ipv'),${vaccination_date},'')"},"type":"calculate","name":"ipv","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'measles1'),${vaccination_date},'')"},"type":"calculate","name":"measles1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'measles1')","calculate":"1"},"type":"calculate","name":"measles1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'measles2'),${vaccination_date},'')"},"type":"calculate","name":"measles2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2}, 'measles2')","calculate":"2"},"type":"calculate","name":"measles2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/offsite_child_followup/form.xml b/opensrp-core/src/test/resources/form/offsite_child_followup/form.xml deleted file mode 100644 index 2042695a14..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_child_followup/form.xml +++ /dev/null @@ -1,1560 +0,0 @@ -
- - -

دوسرے سینٹر میں رجسٹرڈ بچّوں کا فالو اپ رجسٹر برائے ٹیکاجات - Off Site Child Follow Up Vaccination Register

-
-
- - کیا آپ کا گھر کا پتہ بدلا ہے؟ - Has your home address changed? - - Kya aap ka ghar ka pata badla hai? -
- - -
-
-
- - - - - - - - - - - - - -
- - -
diff --git a/opensrp-core/src/test/resources/form/offsite_child_followup/form_definition.json b/opensrp-core/src/test/resources/form/offsite_child_followup/form_definition.json deleted file mode 100644 index 04a8d9a538..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_child_followup/form_definition.json +++ /dev/null @@ -1,466 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkchild", - "default_bind_path" : "/model/instance/Offsite_Child_Vaccination_Followup/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_province", - "shouldLoadValue" : true - }, { - "name" : "existing_first_name", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_first_name", - "shouldLoadValue" : true - }, { - "name" : "existing_last_name", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_last_name", - "shouldLoadValue" : true - }, { - "name" : "existing_mother_name", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_mother_name", - "shouldLoadValue" : true - }, { - "name" : "existing_gender", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_gender", - "shouldLoadValue" : true - }, { - "name" : "existing_birth_date", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_client_birth_date", - "shouldLoadValue" : true - }, { - "name" : "existing_client_reg_date", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_client_reg_date", - "shouldLoadValue" : true - }, { - "name" : "existing_landmark", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_landmark", - "shouldLoadValue" : true - }, { - "name" : "existing_house_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_house_number", - "shouldLoadValue" : true - }, { - "name" : "existing_street", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_street", - "shouldLoadValue" : true - }, { - "name" : "existing_union_council", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_union_council", - "shouldLoadValue" : true - }, { - "name" : "existing_town", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_town", - "shouldLoadValue" : true - }, { - "name" : "existing_city_village", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_city_village", - "shouldLoadValue" : true - }, { - "name" : "existing_province", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_province", - "shouldLoadValue" : true - }, { - "name" : "existing_union_councilname", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_union_councilname", - "shouldLoadValue" : true - }, { - "name" : "existing_townname", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_townname", - "shouldLoadValue" : true - }, { - "name" : "existing_city_villagename", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_city_villagename", - "shouldLoadValue" : true - }, { - "name" : "existing_provincename", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_provincename", - "shouldLoadValue" : true - }, { - "name" : "existing_ethnicity", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_ethnicity", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "existing_epi_card_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_epi_card_number", - "shouldLoadValue" : true - }, { - "name" : "existing_child_was_suffering_from_a_disease_at_birth", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_child_was_suffering_from_a_disease_at_birth", - "shouldLoadValue" : true - }, { - "name" : "existing_reminders_approval", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_reminders_approval", - "shouldLoadValue" : true - }, { - "name" : "existing_contact_phone_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_contact_phone_number", - "shouldLoadValue" : true - }, { - "name" : "e_bcg", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_bcg", - "shouldLoadValue" : true - }, { - "name" : "e_opv0", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_opv0", - "shouldLoadValue" : true - }, { - "name" : "e_penta2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_penta2", - "shouldLoadValue" : true - }, { - "name" : "e_penta1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_penta1", - "shouldLoadValue" : true - }, { - "name" : "e_penta3", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_penta3", - "shouldLoadValue" : true - }, { - "name" : "e_opv1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_opv1", - "shouldLoadValue" : true - }, { - "name" : "e_opv2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_opv2", - "shouldLoadValue" : true - }, { - "name" : "e_opv3", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_opv3", - "shouldLoadValue" : true - }, { - "name" : "e_pcv1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_pcv1", - "shouldLoadValue" : true - }, { - "name" : "e_pcv2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_pcv2", - "shouldLoadValue" : true - }, { - "name" : "e_pcv3", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_pcv3", - "shouldLoadValue" : true - }, { - "name" : "e_measles1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_measles1", - "shouldLoadValue" : true - }, { - "name" : "e_measles2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_measles2", - "shouldLoadValue" : true - }, { - "name" : "e_ipv", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/e_ipv", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/start" - }, { - "name" : "end", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/end" - }, { - "name" : "today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/phonenumber" - }, { - "name" : "existing_client_reg_date_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/existing_client_reg_date_note" - }, { - "name" : "program_client_id_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/program_client_id_note" - }, { - "name" : "epi_card_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/epi_card_number" - }, { - "name" : "first_name_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/first_name_note" - }, { - "name" : "last_name_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/last_name_note" - }, { - "name" : "child_age", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/child_age" - }, { - "name" : "calc_dob_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/calc_dob_note" - }, { - "name" : "gender_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/gender_note" - }, { - "name" : "mother_name_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/mother_name_note" - }, { - "name" : "exisiting_ethnicity_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/exisiting_ethnicity_note" - }, { - "name" : "address", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/address" - }, { - "name" : "address_change", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/address_change" - }, { - "name" : "province", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/landmark" - }, { - "name" : "center_gps", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/center_gps" - }, { - "name" : "child_was_suffering_from_a_disease_at_birth_note", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/child_was_suffering_from_a_disease_at_birth_note" - }, { - "name" : "aefi", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/aefi" - }, { - "name" : "reminders_approval", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/reminders_approval" - }, { - "name" : "contact_phone_number", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/contact_phone_number" - }, { - "name" : "six_weeks", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/six_weeks" - }, { - "name" : "ten_weeks", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/ten_weeks" - }, { - "name" : "forteen_weeks", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/forteen_weeks" - }, { - "name" : "nine_months", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/nine_months" - }, { - "name" : "fifteen_months", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/fifteen_months" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines" - }, { - "name" : "bcg_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/bcg_retro" - }, { - "name" : "opv0_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv0_retro" - }, { - "name" : "opv0_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv0_dose" - }, { - "name" : "pcv1_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv1_retro" - }, { - "name" : "pcv1_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv1_dose" - }, { - "name" : "opv1_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv1_retro" - }, { - "name" : "opv1_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv1_dose" - }, { - "name" : "penta11_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta11_retro" - }, { - "name" : "penta11_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta11_dose" - }, { - "name" : "pcv2_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv2_retro" - }, { - "name" : "pcv2_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv2_dose" - }, { - "name" : "opv2_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv2_retro" - }, { - "name" : "opv2_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv2_dose" - }, { - "name" : "penta12_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta12_retro" - }, { - "name" : "penta12_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta12_dose" - }, { - "name" : "pcv3_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv3_retro" - }, { - "name" : "pcv3_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/pcv3_dose" - }, { - "name" : "opv3_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv3_retro" - }, { - "name" : "opv3_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/opv3_dose" - }, { - "name" : "penta13_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta13_retro" - }, { - "name" : "penta13_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/penta13_dose" - }, { - "name" : "ipv_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/ipv_retro" - }, { - "name" : "measles1_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/measles1_retro" - }, { - "name" : "measles1_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/measles1_dose" - }, { - "name" : "measles2_retro", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/measles2_retro" - }, { - "name" : "measles2_dose", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_group/measles2_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccines_2" - }, { - "name" : "vaccination_date", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/vaccination_date" - }, { - "name" : "bcg", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/bcg" - }, { - "name" : "opv0", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv0" - }, { - "name" : "opv0_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv0_dose_today" - }, { - "name" : "pcv1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv1" - }, { - "name" : "pcv1_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv1_dose_today" - }, { - "name" : "opv1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv1" - }, { - "name" : "opv1_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv1_dose_today" - }, { - "name" : "penta11", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta11" - }, { - "name" : "penta11_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta11_dose_today" - }, { - "name" : "pcv2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv2" - }, { - "name" : "pcv2_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv2_dose_today" - }, { - "name" : "opv2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv2" - }, { - "name" : "opv2_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv2_dose_today" - }, { - "name" : "penta12", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta12" - }, { - "name" : "penta12_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta12_dose_today" - }, { - "name" : "pcv3", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv3" - }, { - "name" : "pcv3_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/pcv3_dose_today" - }, { - "name" : "opv3", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv3" - }, { - "name" : "opv3_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/opv3_dose_today" - }, { - "name" : "penta13", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta13" - }, { - "name" : "penta13_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/penta13_dose_today" - }, { - "name" : "ipv", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/ipv" - }, { - "name" : "measles1", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/measles1" - }, { - "name" : "measles1_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/measles1_dose_today" - }, { - "name" : "measles2", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/measles2" - }, { - "name" : "measles2_dose_today", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/measles2_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Offsite_Child_Vaccination_Followup/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/offsite_child_followup/model.xml b/opensrp-core/src/test/resources/form/offsite_child_followup/model.xml deleted file mode 100644 index 93436952d8..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_child_followup/model.xml +++ /dev/null @@ -1,1685 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${provider_province} - ${provider_city} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ${today} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - bcg - - - static_instance-vaccines-1 - opv0 - - - static_instance-vaccines-2 - pcv1 - - - static_instance-vaccines-3 - opv1 - - - static_instance-vaccines-4 - penta11 - - - static_instance-vaccines-5 - pcv2 - - - static_instance-vaccines-6 - opv2 - - - static_instance-vaccines-7 - penta12 - - - static_instance-vaccines-8 - pcv3 - - - static_instance-vaccines-9 - opv3 - - - static_instance-vaccines-10 - penta13 - - - static_instance-vaccines-11 - ipv - - - static_instance-vaccines-12 - measles1 - - - static_instance-vaccines-13 - measles2 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/form/offsite_woman_followup/form.json b/opensrp-core/src/test/resources/form/offsite_woman_followup/form.json deleted file mode 100644 index c5c29a415b..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_woman_followup/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Offsite_Woman_Followup_Form","title":"دوسرے سینٹر میں رجسٹرڈ خواتین فالواپ رجسٹر - Off Site Woman Follow Up Form","sms_keyword":"offsite_woman_followup_form","default_language":"English","choices":{"provinces":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}],"ucs":[{"province":"sindh","city":"karachi","town":"korangi","name":"bilal_colony","label":{"Urdu":"بلال کالونی","Roman Urdu":"Bilal Colony","English":"Bilal Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"nasir_colony","label":{"Urdu":"ناصر کالونی","Roman Urdu":"Nasir Colony","English":"Nasir Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"chakra_goth","label":{"Urdu":"چکرا گوٹھ","Roman Urdu":"Chakra Goth","English":"Chakra Goth"}},{"province":"sindh","city":"karachi","town":"korangi","name":"mustafa_taj_colony","label":{"Urdu":"مصطفی تاج کالونی","Roman Urdu":"Mustafa Taj Colony","English":"Mustafa Taj Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hundred_quarters","label":{"Urdu":"ہنڈریڈ کوارٹر","Roman Urdu":"Hundred Quarters","English":"Hundred Quarters"}},{"province":"sindh","city":"karachi","town":"korangi","name":"gulzar_colony","label":{"Urdu":"گلزار کالونی","Roman Urdu":"Gulzar Colony","English":"Gulzar Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"korangi_sector_33","label":{"Urdu":"کورنگی سیکٹر 33","Roman Urdu":"Korangi Sector 33","English":"Korangi Sector 33"}},{"province":"sindh","city":"karachi","town":"korangi","name":"zaman_town","label":{"Urdu":"زمان ٹاوَن","Roman Urdu":"Zaman Town","English":"Zaman Town"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hasrat_mohani_colony","label":{"Urdu":"حسرت موہانی کالونی","Roman Urdu":"Hasrat Mohani Colony","English":"Hasrat Mohani Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"gulshan_e_ghazi","label":{"Urdu":"گلشن غازی","Roman Urdu":"Gulshan-e-Ghazi","English":"Gulshan-e-Ghazi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"ittehad_town","label":{"Urdu":"اتحاد ٹاوَن","Roman Urdu":"Ittehad Town","English":"Ittehad Town"}},{"province":"sindh","city":"karachi","town":"baldia","name":"islam_nagar","label":{"Urdu":"اسلام نگر","Roman Urdu":"Islam Nagar","English":"Islam Nagar"}},{"province":"sindh","city":"karachi","town":"baldia","name":"nai_abadi","label":{"Urdu":"نئی آبادی","Roman Urdu":"Nai Abadi","English":"Nai Abadi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"saeedabad","label":{"Urdu":"سعید آباد","Roman Urdu":"Saeedabad","English":"Saeedabad"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muslim_mujahid_colony","label":{"Urdu":"مسلم مجاہد کالونی","Roman Urdu":"Muslim Mujahid Colony","English":"Muslim Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muhajir_camp","label":{"Urdu":"مہاجر کیمپ","Roman Urdu":"Muhajir Camp","English":"Muhajir Camp"}},{"province":"sindh","city":"karachi","town":"baldia","name":"rasheedabad","label":{"Urdu":"رشید آباد","Roman Urdu":"Rasheedabad","English":"Rasheedabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"ibrahim_hyderi","label":{"Urdu":"ابراہیم حیدری","Roman Urdu":"Ibrahim Hyderi","English":"Ibrahim Hyderi"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"rehri","label":{"Urdu":"رہڑی","Roman Urdu":"Rehri","English":"Rehri"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"cattle_colony","label":{"Urdu":"کیٹل کالونی","Roman Urdu":"Cattle Colony","English":"Cattle Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"qaidabad","label":{"Urdu":"قائدآباد","Roman Urdu":"Qaidabad","English":"Qaidabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"landhi_colony","label":{"Urdu":"لانڈھی کالونی","Roman Urdu":"Landhi Colony","English":"Landhi Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gulshan_e_hadeed","label":{"Urdu":"گلشن حدید","Roman Urdu":"Gulshan-e-Hadeed","English":"Gulshan-e-Hadeed"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gaghar","label":{"Urdu":"گگر","Roman Urdu":"Gaghar","English":"Gaghar"}},{"province":"sindh","city":"karachi","town":"gadap","name":"murad_memon_goth","label":{"Urdu":"مراد میمن گوٹھ","Roman Urdu":"Murad Memon Goth","English":"Murad Memon Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"darsano_chana","label":{"Urdu":"درشانو شنو","Roman Urdu":"Darsano Chana","English":"Darsano Chana"}},{"province":"sindh","city":"karachi","town":"gadap","name":"gujro","label":{"Urdu":"گجرو","Roman Urdu":"Gujro","English":"Gujro"}},{"province":"sindh","city":"karachi","town":"gadap","name":"songal","label":{"Urdu":"سنگل","Roman Urdu":"Songal","English":"Songal"}},{"province":"sindh","city":"karachi","town":"gadap","name":"maymarabad","label":{"Urdu":"معمار آباد","Roman Urdu":"Maymarabad","English":"Maymarabad"}},{"province":"sindh","city":"karachi","town":"gadap","name":"yousuf_goth","label":{"Urdu":"یوسف گوٹھ","Roman Urdu":"Yousuf Goth","English":"Yousuf Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"manghopir","label":{"Urdu":"منگھوپیر","Roman Urdu":"Manghopir","English":"Manghopir"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"azizabad","label":{"Urdu":"عزیز آباد","Roman Urdu":"Azizabad","English":"Azizabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"karimabad","label":{"Urdu":"کریم آباد","Roman Urdu":"Karimabad","English":"Karimabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"aisha_manzil","label":{"Urdu":"عائشہ منزل","Roman Urdu":"Aisha Manzil","English":"Aisha Manzil"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"ancholi","label":{"Urdu":"انچولی","Roman Urdu":"Ancholi","English":"Ancholi"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"naseerabad","label":{"Urdu":"نصیرآباد","Roman Urdu":"Naseerabad","English":"Naseerabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"yaseenabad","label":{"Urdu":"یاسین آباد","Roman Urdu":"Yaseenabad","English":"Yaseenabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"water_pump","label":{"Urdu":"واٹرپمپ","Roman Urdu":"Water Pump","English":"Water Pump"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"shafiq_mill_colony","label":{"Urdu":"شفیق مل کالونی","Roman Urdu":"Shafiq Mill Colony","English":"Shafiq Mill Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"delhi_mercantile_society","label":{"Urdu":"دہلی مرچنٹائل سوسائٹی","Roman Urdu":"Delhi Mercantile Society","English":"Delhi Mercantile Society"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"civic_centre","label":{"Urdu":"سوک سینٹر","Roman Urdu":"Civic Centre","English":"Civic Centre"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pir_ilahi_buksh_colony","label":{"Urdu":"پیر الہی بخش کالونی","Roman Urdu":"Pir Ilahi Buksh Colony","English":"Pir Ilahi Buksh Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"essa_nagri","label":{"Urdu":"عیسی نگری","Roman Urdu":"Essa Nagri","English":"Essa Nagri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal","label":{"Urdu":"گلشن اقبال","Roman Urdu":"Gulshan-e-Iqbal","English":"Gulshan-e-Iqbal"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gillani_railway_station","label":{"Urdu":"گیلانی ریلوے اسٹیشن","Roman Urdu":"Gillani Railway Station","English":"Gillani Railway Station"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"shanti_nagar","label":{"Urdu":"شانتی نگر","Roman Urdu":"Shanti Nagar","English":"Shanti Nagar"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"jamali_colony","label":{"Urdu":"جمالی کالونی","Roman Urdu":"Jamali Colony","English":"Jamali Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal_ii","label":{"Urdu":"گلشن اقبال 2","Roman Urdu":"Gulshan-e-Iqbal II","English":"Gulshan-e-Iqbal II"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pehlwan_goth","label":{"Urdu":"پہلوان گوٹھ","Roman Urdu":"Pehlwan Goth","English":"Pehlwan Goth"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"matrovil_colony","label":{"Urdu":"میٹروویل کالونی","Roman Urdu":"Matrovil Colony","English":"Matrovil Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulzar_e_hijri","label":{"Urdu":"گلزار ہجری","Roman Urdu":"Gulzar-e-Hijri","English":"Gulzar-e-Hijri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"safooran_goth","label":{"Urdu":"صفورا گوٹھ","Roman Urdu":"Safooran Goth","English":"Safooran Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"akhtar_colony","label":{"Urdu":"اختر کالونی","Roman Urdu":"Akhtar Colony","English":"Akhtar Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"manzoor_colony","label":{"Urdu":"منظور کالونی","Roman Urdu":"Manzoor Colony","English":"Manzoor Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"azam_basti","label":{"Urdu":"اعظم بستی","Roman Urdu":"Azam Basti","English":"Azam Basti"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"chanesar_goth","label":{"Urdu":"چنیسر گوٹھ","Roman Urdu":"Chanesar Goth","English":"Chanesar Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"mahmudabad","label":{"Urdu":"محمودآباد","Roman Urdu":"Mahmudabad","English":"Mahmudabad"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس","Roman Urdu":"P.E.C.H.S.","English":"P.E.C.H.S."}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs_ii","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس 2","Roman Urdu":"P.E.C.H.S. II","English":"P.E.C.H.S. II"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jut_line","label":{"Urdu":"جٹ لائن","Roman Urdu":"Jut Line","English":"Jut Line"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"central_jacob_lines","label":{"Urdu":"سینٹرل جیکب لائن","Roman Urdu":"Central Jacob Lines","English":"Central Jacob Lines"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jamshed_quarters","label":{"Urdu":"جمشید کوارٹر","Roman Urdu":"Jamshed Quarters","English":"Jamshed Quarters"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"garden_east","label":{"Urdu":"گارڈن ایسٹ","Roman Urdu":"Garden East","English":"Garden East"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"soldier_bazar","label":{"Urdu":"سولجر بازار","Roman Urdu":"Soldier Bazar","English":"Soldier Bazar"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pakistan_quarters","label":{"Urdu":"پاکستان کوارٹر","Roman Urdu":"Pakistan Quarters","English":"Pakistan Quarters"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"bhutta_village","label":{"Urdu":"بھٹا ولیج","Roman Urdu":"Bhutta Village","English":"Bhutta Village"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"sultanabad","label":{"Urdu":"سلطان آباد","Roman Urdu":"Sultanabad","English":"Sultanabad"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"kiamari_uc","label":{"Urdu":"کیماری یوسی","Roman Urdu":"Kiamari UC","English":"Kiamari UC"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"baba_bhit","label":{"Urdu":"بابا بھٹ","Roman Urdu":"Baba Bhit","English":"Baba Bhit"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"machar_colony","label":{"Urdu":"مچھر کالونی","Roman Urdu":"Machar Colony","English":"Machar Colony"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"maripur","label":{"Urdu":"ماڑی پور","Roman Urdu":"Maripur","English":"Maripur"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"shershah","label":{"Urdu":"شیرشاہ","Roman Urdu":"SherShah","English":"SherShah"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"gabo_pat","label":{"Urdu":"گابو پٹ","Roman Urdu":"Gabo Pat","English":"Gabo Pat"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muzafarabad","label":{"Urdu":"مظفرآباد","Roman Urdu":"Muzafarabad","English":"Muzafarabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muslimabad","label":{"Urdu":"مسلم آباد","Roman Urdu":"Muslimabad","English":"Muslimabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"dawood_chowrangi","label":{"Urdu":"داوَد چورنگی","Roman Urdu":"Dawood Chowrangi","English":"Dawood Chowrangi"}},{"province":"sindh","city":"karachi","town":"landhi","name":"moinabad","label":{"Urdu":"معین آباد","Roman Urdu":"Moinabad","English":"Moinabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sharafi_goth","label":{"Urdu":"شرافی گوٹھ","Roman Urdu":"Sharafi Goth","English":"Sharafi Goth"}},{"province":"sindh","city":"karachi","town":"landhi","name":"bhutto_nagar","label":{"Urdu":"بھٹو نگر","Roman Urdu":"Bhutto Nagar","English":"Bhutto Nagar"}},{"province":"sindh","city":"karachi","town":"landhi","name":"khawaja_ajmeer_colony","label":{"Urdu":"خواجہ اجمیر کالونی","Roman Urdu":"Khawaja Ajmeer Colony","English":"Khawaja Ajmeer Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"landhi_uc","label":{"Urdu":"لانڈھی یوسی","Roman Urdu":"Landhi UC","English":"Landhi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"awami_colony","label":{"Urdu":"عوامی کالونی","Roman Urdu":"Awami Colony","English":"Awami Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"burmee_colony","label":{"Urdu":"برمی کالونی","Roman Urdu":"Burmee Colony","English":"Burmee Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"korangi_uc","label":{"Urdu":"کورنگی یوسی","Roman Urdu":"Korangi UC","English":"Korangi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sherabad","label":{"Urdu":"شیرآباد","Roman Urdu":"Sherabad","English":"Sherabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"rizvia_society","label":{"Urdu":"رضویہ سوسائٹی","Roman Urdu":"Rizvia Society","English":"Rizvia Society"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"firdous_colony","label":{"Urdu":"فردوس کالونی","Roman Urdu":"Firdous Colony","English":"Firdous Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"super_market","label":{"Urdu":"سپر مارکیٹ","Roman Urdu":"Super Market","English":"Super Market"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"dak_khana","label":{"Urdu":"دک کھانہ","Roman Urdu":"Dak Khana","English":"Dak Khana"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"qasimabad","label":{"Urdu":"قاسم آباد","Roman Urdu":"Qasimabad","English":"Qasimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"bandhani_colony","label":{"Urdu":"بندھانی کالونی","Roman Urdu":"Bandhani Colony","English":"Bandhani Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"sharifabad","label":{"Urdu":"شریف آباد","Roman Urdu":"Sharifabad","English":"Sharifabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"commercial_area","label":{"Urdu":"کمرشل ایریا","Roman Urdu":"Commercial Area","English":"Commercial Area"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"mujahid_colony","label":{"Urdu":"مجاہد کالونی","Roman Urdu":"Mujahid Colony","English":"Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"nazimabad","label":{"Urdu":"ناظم آباد","Roman Urdu":"Nazimabad","English":"Nazimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"abbasi_shaheed","label":{"Urdu":"عباسی شہید","Roman Urdu":"Abbasi Shaheed","English":"Abbasi Shaheed"}},{"province":"sindh","city":"karachi","town":"lyari","name":"agra_taj_colony","label":{"Urdu":"آگرہ تاج کالونی","Roman Urdu":"Agra Taj Colony","English":"Agra Taj Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"daryaabad","label":{"Urdu":"دریاآباد","Roman Urdu":"Daryaabad","English":"Daryaabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"nawabad","label":{"Urdu":"نواآباد","Roman Urdu":"Nawabad","English":"Nawabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"khada_memon_society","label":{"Urdu":"خدا- میمن- سوساَٹی","Roman Urdu":"Khada Memon Society","English":"Khada Memon Society"}},{"province":"sindh","city":"karachi","town":"lyari","name":"baghdadi","label":{"Urdu":"بغدادی","Roman Urdu":"Baghdadi","English":"Baghdadi"}},{"province":"sindh","city":"karachi","town":"lyari","name":"shah_baig_line","label":{"Urdu":"شاھ باغ لائن","Roman Urdu":"Shah Baig Line","English":"Shah Baig Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"bihar_colony","label":{"Urdu":"بہار کالونی","Roman Urdu":"Bihar Colony","English":"Bihar Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"ragiwara","label":{"Urdu":"راگی واڑا","Roman Urdu":"Ragiwara","English":"Ragiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"singo_line","label":{"Urdu":"سنگولائن","Roman Urdu":"Singo Line","English":"Singo Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"chakiwara","label":{"Urdu":"چاکی واڑا","Roman Urdu":"Chakiwara","English":"Chakiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"allama_iqbal_colony","label":{"Urdu":"علامہ اقبال کالونی","Roman Urdu":"Allama Iqbal Colony","English":"Allama Iqbal Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"model_colony","label":{"Urdu":"موڈل کالونی","Roman Urdu":"Model Colony","English":"Model Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"kala_board","label":{"Urdu":"کالا بورڈ","Roman Urdu":"Kala Board","English":"Kala Board"}},{"province":"sindh","city":"karachi","town":"malir","name":"saudabad","label":{"Urdu":"سعودآباد","Roman Urdu":"Saudabad","English":"Saudabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"khokhra_par","label":{"Urdu":"کھوکھرا پار","Roman Urdu":"Khokhra Par","English":"Khokhra Par"}},{"province":"sindh","city":"karachi","town":"malir","name":"jafar_e_tayyar","label":{"Urdu":"جعفر تیار","Roman Urdu":"Jafar-e-Tayyar","English":"Jafar-e-Tayyar"}},{"province":"sindh","city":"karachi","town":"malir","name":"gharibabad","label":{"Urdu":"غریب آباد","Roman Urdu":"Gharibabad","English":"Gharibabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"ghazi_brohi_goth","label":{"Urdu":"غازی بروہی گوٹھ","Roman Urdu":"Ghazi Brohi Goth","English":"Ghazi Brohi Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"kalyana","label":{"Urdu":"کالیانہ","Roman Urdu":"Kalyana","English":"Kalyana"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"sir_syed_colony","label":{"Urdu":"سر سید کالونی","Roman Urdu":"Sir Syed Colony","English":"Sir Syed Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"fatima_jinnah_colony","label":{"Urdu":"فاطمہ جناح کالونی","Roman Urdu":"Fatima Jinnah Colony","English":"Fatima Jinnah Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"godhra","label":{"Urdu":"گودھرا","Roman Urdu":"Godhra","English":"Godhra"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"abu_zar_ghaffari","label":{"Urdu":"ابو زر غفاری","Roman Urdu":"Abu Zar Ghaffari","English":"Abu Zar Ghaffari"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"hakim_ahsan","label":{"Urdu":"حاکم احسان","Roman Urdu":"Hakim Ahsan","English":"Hakim Ahsan"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"madina_colony","label":{"Urdu":"مدینہ کالونی","Roman Urdu":"Madina Colony","English":"Madina Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"faisal_colony","label":{"Urdu":"فیصل کالونی","Roman Urdu":"Faisal Colony","English":"Faisal Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khamiso_goth","label":{"Urdu":"خمیسو گوٹھ","Roman Urdu":"Khamiso Goth","English":"Khamiso Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"mustufa_colony","label":{"Urdu":"مصطفی کالونی","Roman Urdu":"Mustufa Colony","English":"Mustufa Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khawaja_ajmeer_nagri","label":{"Urdu":"خواجہ اجمیر نگری","Roman Urdu":"Khawaja Ajmeer Nagri","English":"Khawaja Ajmeer Nagri"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"gulshan_e_saeed","label":{"Urdu":"گلشن سعید","Roman Urdu":"Gulshan-e-Saeed","English":"Gulshan-e-Saeed"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"shah_nawaz_bhutto_colony","label":{"Urdu":"شاہ نواز بھٹو کالونی","Roman Urdu":"Shah Nawaz Bhutto Colony","English":"Shah Nawaz Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"paposh_nagar","label":{"Urdu":"پاپوش نگر","Roman Urdu":"Paposh Nagar","English":"Paposh Nagar"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"pahar_ganj","label":{"Urdu":"پہاڑ گنج","Roman Urdu":"Pahar Ganj","English":"Pahar Ganj"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"khandu_goth","label":{"Urdu":"کھنڑو گوٹھ","Roman Urdu":"Khandu Goth","English":"Khandu Goth"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"hyderi","label":{"Urdu":"حیدری","Roman Urdu":"Hyderi","English":"Hyderi"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"sakhi_hassan","label":{"Urdu":"سخی حسن","Roman Urdu":"Sakhi Hassan","English":"Sakhi Hassan"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"farooq_e_azam","label":{"Urdu":"فاروق اعظم","Roman Urdu":"Farooq-e-Azam","English":"Farooq-e-Azam"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"nusrat_bhutto_colony","label":{"Urdu":"نصرت بھٹو کالونی","Roman Urdu":"Nusrat Bhutto Colony","English":"Nusrat Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"shadman_town","label":{"Urdu":"شادمان ٹاوَن","Roman Urdu":"Shadman Town","English":"Shadman Town"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone","label":{"Urdu":"بفرزون","Roman Urdu":"Buffer Zone","English":"Buffer Zone"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone_ii","label":{"Urdu":"بفرزون 2","Roman Urdu":"Buffer Zone II","English":"Buffer Zone II"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mominabad","label":{"Urdu":"مومن آباد","Roman Urdu":"Mominabad","English":"Mominabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"haryana_colony","label":{"Urdu":"حریانہ کالونی","Roman Urdu":"Haryana Colony","English":"Haryana Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"hanifabad","label":{"Urdu":"حنیف آباد","Roman Urdu":"Hanifabad","English":"Hanifabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mohammad_nagar","label":{"Urdu":"محمد نگر","Roman Urdu":"Mohammad Nagar","English":"Mohammad Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"madina_colony_orangi","label":{"Urdu":"مدینہ کالونی اورنگی","Roman Urdu":"Madina Colony Orangi","English":"Madina Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghaziabad","label":{"Urdu":"غازی آباد","Roman Urdu":"Ghaziabad","English":"Ghaziabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"chisti_nagar","label":{"Urdu":"چشتی نگر","Roman Urdu":"Chisti Nagar","English":"Chisti Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"bilal_colony_orangi","label":{"Urdu":"بلال کالونی اورنگی","Roman Urdu":"Bilal Colony Orangi","English":"Bilal Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"iqbal_baloch_colony","label":{"Urdu":"اقبال بلوچ کالونی","Roman Urdu":"Iqbal Baloch Colony","English":"Iqbal Baloch Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghabool_town","label":{"Urdu":"گبول ٹاوَن","Roman Urdu":"Ghabool Town","English":"Ghabool Town"}},{"province":"sindh","city":"karachi","town":"orangi","name":"data_nagar","label":{"Urdu":"داتا نگر","Roman Urdu":"Data Nagar","English":"Data Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mujahidabad","label":{"Urdu":"مجاہد آباد","Roman Urdu":"Mujahidabad","English":"Mujahidabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"baloch_goth","label":{"Urdu":"بلوچ گوٹھ","Roman Urdu":"Baloch Goth","English":"Baloch Goth"}},{"province":"sindh","city":"karachi","town":"saddar","name":"old_haji_camp","label":{"Urdu":"پرانہ حاجی کیمپ","Roman Urdu":"Old Haji Camp","English":"Old Haji Camp"}},{"province":"sindh","city":"karachi","town":"saddar","name":"garden","label":{"Urdu":"گارڈن","Roman Urdu":"Garden","English":"Garden"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kharadar","label":{"Urdu":"کھارادر","Roman Urdu":"Kharadar","English":"Kharadar"}},{"province":"sindh","city":"karachi","town":"saddar","name":"city_railway_colony","label":{"Urdu":"سٹی ریلوے کالونی","Roman Urdu":"City Railway Colony","English":"City Railway Colony"}},{"province":"sindh","city":"karachi","town":"saddar","name":"nanak_wara","label":{"Urdu":"ناناک واڑا","Roman Urdu":"Nanak Wara","English":"Nanak Wara"}},{"province":"sindh","city":"karachi","town":"saddar","name":"gazdarabad","label":{"Urdu":"گزدرآباد","Roman Urdu":"Gazdarabad","English":"Gazdarabad"}},{"province":"sindh","city":"karachi","town":"saddar","name":"millat_nagar_islam_pura","label":{"Urdu":"ملت نگر اسلام پورا","Roman Urdu":"Millat Nagar/Islam Pura","English":"Millat Nagar/Islam Pura"}},{"province":"sindh","city":"karachi","town":"saddar","name":"saddar_uc","label":{"Urdu":"صدر یو سی","Roman Urdu":"Saddar UC","English":"Saddar UC"}},{"province":"sindh","city":"karachi","town":"saddar","name":"civil_line","label":{"Urdu":"سول لائن","Roman Urdu":"Civil Line","English":"Civil Line"}},{"province":"sindh","city":"karachi","town":"saddar","name":"clifton","label":{"Urdu":"کلفٹن","Roman Urdu":"Clifton","English":"Clifton"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kehkashan","label":{"Urdu":"کہکشان","Roman Urdu":"Kehkashan","English":"Kehkashan"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"natha_khan_goth","label":{"Urdu":"ناتھا خان گوٹھ","Roman Urdu":"Natha Khan Goth","English":"Natha Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"pak_sadat_colony","label":{"Urdu":"پاک صدر کالونی","Roman Urdu":"Pak Sadat Colony","English":"Pak Sadat Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"drigh_colony","label":{"Urdu":"ڈرگ کالونی","Roman Urdu":"Drigh Colony","English":"Drigh Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"raita_plot","label":{"Urdu":"رائتا پلاٹ","Roman Urdu":"Raita Plot","English":"Raita Plot"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"moria_khan_goth","label":{"Urdu":"موریا خان گوٹھ","Roman Urdu":"Moria Khan Goth","English":"Moria Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"rafa_e_aam_society","label":{"Urdu":"رفا عام سوسا ئٹی","Roman Urdu":"Rafa-e-Aam Society","English":"Rafa-e-Aam Society"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"al_falah_society","label":{"Urdu":"الفلاح سوسا ئٹی","Roman Urdu":"Al-Falah Society","English":"Al-Falah Society"}},{"province":"sindh","city":"karachi","town":"site","name":"pak_colony","label":{"Urdu":"پاک کالونی","Roman Urdu":"Pak Colony","English":"Pak Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"old_golimar","label":{"Urdu":"پرانہ گولی مار","Roman Urdu":"Old Golimar","English":"Old Golimar"}},{"province":"sindh","city":"karachi","town":"site","name":"jahanabad","label":{"Urdu":"جہان آباد","Roman Urdu":"Jahanabad","English":"Jahanabad"}},{"province":"sindh","city":"karachi","town":"site","name":"metrovil","label":{"Urdu":"میٹروویل","Roman Urdu":"Metrovil","English":"Metrovil"}},{"province":"sindh","city":"karachi","town":"site","name":"bhawani_chali","label":{"Urdu":"بہوانی چالی","Roman Urdu":"Bhawani Chali","English":"Bhawani Chali"}},{"province":"sindh","city":"karachi","town":"site","name":"frontier_colony","label":{"Urdu":"فرونٹر کالونی","Roman Urdu":"Frontier Colony","English":"Frontier Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"banaras_colony","label":{"Urdu":"بنارس کالونی","Roman Urdu":"Banaras Colony","English":"Banaras Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"qasba_colony","label":{"Urdu":"قصبہ کالونی","Roman Urdu":"Qasba Colony","English":"Qasba Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"islamia_colony","label":{"Urdu":"اسلامیہ کالونی","Roman Urdu":"Islamia Colony","English":"Islamia Colony"}},{"province":"na","city":"na","town":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","town":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"gender":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}],"vaccines":[{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT1","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT2","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT3","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT4","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT5","label":{"Urdu":"ٹی ٹی 5","Roman Urdu":"TT5","English":"TT5"}}],"towns":[{"province":"sindh","city":"karachi","name":"korangi","label":{"Urdu":"کورنگی","Roman Urdu":"Korangi","English":"Korangi"}},{"province":"sindh","city":"karachi","name":"landhi","label":{"Urdu":"لانڈھی","Roman Urdu":"Landhi","English":"Landhi"}},{"province":"sindh","city":"karachi","name":"baldia","label":{"Urdu":"بلدیہ","Roman Urdu":"Baldia","English":"Baldia"}},{"province":"sindh","city":"karachi","name":"bin_qasim","label":{"Urdu":"بن قاسم","Roman Urdu":"Bin Qasim","English":"Bin Qasim"}},{"province":"sindh","city":"karachi","name":"gadap","label":{"Urdu":"گڈاپ","Roman Urdu":"Gadap","English":"Gadap"}},{"province":"sindh","city":"karachi","name":"gulberg","label":{"Urdu":"گلبرگ","Roman Urdu":"Gulberg","English":"Gulberg"}},{"province":"sindh","city":"karachi","name":"gulshan","label":{"Urdu":"گلشن","Roman Urdu":"Gulshan","English":"Gulshan"}},{"province":"sindh","city":"karachi","name":"jamshed","label":{"Urdu":"جمشید","Roman Urdu":"Jamshed","English":"Jamshed"}},{"province":"sindh","city":"karachi","name":"kiamari","label":{"Urdu":"کیماری","Roman Urdu":"Kiamari","English":"Kiamari"}},{"province":"sindh","city":"karachi","name":"liaquatabad","label":{"Urdu":"لیاقت آباد","Roman Urdu":"Liaquatabad","English":"Liaquatabad"}},{"province":"sindh","city":"karachi","name":"lyari","label":{"Urdu":"لیاری","Roman Urdu":"Lyari","English":"Lyari"}},{"province":"sindh","city":"karachi","name":"malir","label":{"Urdu":"ملیر","Roman Urdu":"Malir","English":"Malir"}},{"province":"sindh","city":"karachi","name":"new_karachi","label":{"Urdu":"نیو کراچی","Roman Urdu":"New Karachi","English":"New Karachi"}},{"province":"sindh","city":"karachi","name":"north_nazimabad","label":{"Urdu":"نارتھ ناظم آباد","Roman Urdu":"North Nazimabad","English":"North Nazimabad"}},{"province":"sindh","city":"karachi","name":"orangi","label":{"Urdu":"اورنگی","Roman Urdu":"Orangi","English":"Orangi"}},{"province":"sindh","city":"karachi","name":"saddar","label":{"Urdu":"صدر","Roman Urdu":"Saddar","English":"Saddar"}},{"province":"sindh","city":"karachi","name":"shah_faisal","label":{"Urdu":"شاہ فیصل","Roman Urdu":"Shah Faisal","English":"Shah Faisal"}},{"province":"sindh","city":"karachi","name":"site","label":{"Urdu":"سائٹ","Roman Urdu":"S.I.T.E.","English":"S.I.T.E."}},{"province":"na","city":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"cities":[{"province":"sindh","name":"karachi","label":{"Urdu":"کراچی","Roman Urdu":"Karachi","English":"Karachi"}},{"province":"punjab","name":"hafizabad","label":{"Urdu":"حافظ آباد","Roman Urdu":"Hafizabad","English":"Hafizabad"}},{"province":"punjab","name":"muzaffargarh","label":{"Urdu":"مظفر گڑھ","Roman Urdu":"Muzaffargarh","English":"Muzaffargarh"}},{"province":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Not Applicable","English":"Not Applicable"}}],"edd_lmp":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}],"yes_no":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},"instance":{"encounter_type":"Off Site Woman Follow Up"},"version":"201604080459","id_string":"offsite_woman_followup_form","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"existing_landmark"},{"type":"hidden","name":"existing_house_number"},{"type":"hidden","name":"existing_street"},{"type":"hidden","name":"existing_union_council"},{"type":"hidden","name":"existing_town"},{"type":"hidden","name":"existing_city_village"},{"type":"hidden","name":"existing_province"},{"type":"hidden","name":"existing_union_councilname"},{"type":"hidden","name":"existing_townname"},{"type":"hidden","name":"existing_city_villagename"},{"type":"hidden","name":"existing_provincename"},{"type":"hidden","name":"existing_first_name"},{"type":"hidden","name":"existing_last_name"},{"type":"hidden","name":"existing_father_name"},{"type":"hidden","name":"existing_husband_name"},{"type":"hidden","name":"existing_marriage"},{"type":"hidden","name":"existing_calc_dob_confirm"},{"type":"hidden","name":"existing_gender"},{"type":"hidden","name":"existing_ethnicity"},{"type":"hidden","name":"existing_client_reg_date"},{"type":"hidden","name":"existing_program_client_id"},{"type":"hidden","name":"existing_epi_card_number"},{"type":"hidden","name":"existing_reminders_approval"},{"type":"hidden","name":"existing_contact_phone_number"},{"type":"hidden","name":"e_tt1"},{"type":"hidden","name":"e_tt2"},{"type":"hidden","name":"e_tt3"},{"type":"hidden","name":"e_tt4"},{"type":"hidden","name":"e_tt5"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"type":"hidden","name":"provider_location_name"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"bind":{"required":"yes"},"type":"note","name":"client_reg_date_note","label":{"Urdu":"${existing_client_reg_date} :پروگرام میں اندراج کی تاریخ","Roman Urdu":"Program main andraaj ki tareekh: ${existing_client_reg_date}","English":"Client Registration date: ${existing_client_reg_date}"}},{"bind":{"required":"yes"},"type":"note","name":"program_client_id_note","label":{"Urdu":"${existing_program_client_id}:کلائنٹ کی پروگرام ائی ڈی","Roman Urdu":"Client ki program ID: ${existing_program_client_id}","English":"Program Client ID: ${existing_program_client_id}"}},{"bind":{"jr:constraintMsg":{"Urdu":"نمبر آٹھ ہندسوں پر مشتمل ہونا چاہئے","English":"Number should be 8 digits","Roman Urdu":"Number 8 hindason par mushtamil hona chahiye"},"required":"yes","constraint":"string-length(.) = 8"},"type":"integer","instance":{"openmrs_entity_id":"EPI Card Number","openmrs_entity":"person_attribute"},"name":"epi_card_number","label":{"Urdu":"ای پی آئی کارڈ نمبر: {existing_epi_card_number}$","English":"EPI Card Number: ${existing_epi_card_number}","Roman Urdu":"EPI Card Number: ${existing_epi_card_number}"}},{"bind":{"required":"yes"},"type":"note","name":"first_name_note","label":{"Urdu":"${existing_first_name}: نام","Roman Urdu":"Naam: ${existing_first_name}","English":"First Name: ${existing_first_name}"}},{"bind":{"required":"yes"},"type":"note","name":"last_name_note","label":{"Urdu":"والد کا نام: ${existing_last_name}","Roman Urdu":"Waalid ka naam: ${existing_last_name}","English":"Last name: ${existing_last_name}"}},{"bind":{"calculate":"date( today() - (${existing_calc_dob_confirm} div 365))"},"type":"calculate","name":"client_age","instance":{"openmrs_entity_id":"154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"type":"note","name":"birth_date_note","label":{"Urdu":"تاریخِ پیدائش: {existing_calc_dob_confirm}$ ({client_age}$) سال","English":"Birth date: ${existing_calc_dob_confirm} (${client_age}) years","Roman Urdu":"Tareekh-e-pedaaish: ${existing_calc_dob_confirm} (${client_age}) years"}},{"bind":{"required":"yes"},"type":"note","name":"gender_note","label":{"Urdu":"${existing_gender}: جنس","Roman Urdu":"Jins:${existing_gender}","English":"Gender: ${existing_gender}"}},{"type":"note","name":"father_name_note","label":{"Urdu":"والد کا نام: {existing_father_name}$","English":"Father's Name: ${existing_father_name}","Roman Urdu":"Waalid ka naam: ${existing_father_name}"}},{"type":"note","name":"marriage_note","label":{"Urdu":"شادی شدہ: {existing_marriage}$","English":"Married: ${existing_marriage}","Roman Urdu":"Shaadi shuda: ${existing_marriage}"}},{"type":"note","name":"husband_name_note","label":{"Urdu":"شوہر کا نام: {existing_husband_name}$","English":"Husband's name: ${existing_husband_name}","Roman Urdu":"Shohar ka naam: ${existing_husband_name}"}},{"bind":{"required":"yes"},"type":"note","name":"ethnicity_note","label":{"Urdu":"قومیت: {existing_ethnicity}$","Roman Urdu":"Qomiat: ${existing_ethnicity}","English":"Ethnicity: ${existing_ethnicity}"}},{"type":"note","name":"address","label":{"Urdu":"موجودہ پتہ: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","English":"Current Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","Roman Urdu":"Mojooda Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}"}},{"label":{"Urdu":"کیا آپ کا گھر کا پتہ بدلا ہے؟","English":"Has your home address changed?","Roman Urdu":"Kya aap ka ghar ka pata badla hai?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"address_change"},{"control":{"appearance":"minimal"},"name":"province","default":"${provider_province}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"صوبہ","Roman Urdu":"Suba","English":"Province"},"instance":{"openmrs_entity":"person_address","openmrs_entity_id":"stateProvince","openmrs_entity_parent":"usual_residence"},"type":"select one","children":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}]},{"control":{"appearance":"minimal"},"name":"city_village","choice_filter":"province=${province} or province='na'","default":"${provider_city}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"شہر","Roman Urdu":"Shehr","English":"City"},"itemset":"cities","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"cityVillage","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"town","choice_filter":"(province=${province} and city=${city_village} ) or city='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"ٹاٰئون/ قصبہ/ بستی","Roman Urdu":"Town / Qasbah / Basti","English":"Town"},"itemset":"towns","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"town","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"union_council","choice_filter":"(province=${province} and city=${city_village} and town=${town}) or town='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"یونین کونسل","Roman Urdu":"Union Council","English":"Union Council"},"itemset":"ucs","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"subTown","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"house","openmrs_entity_parent":"usual_residence"},"name":"house_number","label":{"Urdu":"گھر کا نمبر","Roman Urdu":"Ghar ka number","English":"House Number"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"street","openmrs_entity_parent":"usual_residence"},"name":"street","label":{"Urdu":"گلی/کالونی/محلہ","Roman Urdu":"Gali/Colony/Mohalla","English":"Street"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"landmark","openmrs_entity_parent":"usual_residence"},"name":"landmark","label":{"Urdu":"گھر کے قریب کوئی مشہور جگہ","Roman Urdu":"Ghar ke qareeb koi mashoor jagah","English":"Land Mark"}},{"instance":{"openmrs_entity_id":"163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"geopoint","name":"center_gps","label":{"Urdu":"حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں","English":"Collect GPS coordinates of data entry location:","Roman Urdu":"Hasil karda malomaat ki jaga ke GPS coordinates darj karain"}},{"control":{"appearance":"minimal"},"name":"reminders_approval","bind":{"required":"yes"},"label":{"Urdu":"کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ {existing_reminders_approval}$","English":"Are you willing to receive SMS reminders for your next visit? ${existing_reminders_approval}","Roman Urdu":"Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? ${existing_reminders_approval}"},"instance":{"openmrs_entity_id":"163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03","English":"Phone number should be 11 digits in the following format: 03*********","Roman Urdu":"Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********"},"relevant":"${existing_reminders_approval}='yes'","constraint":"regex(., '^03[0-9]{9}$')"},"type":"text","instance":{"openmrs_entity_id":"159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"contact_phone_number","label":{"Urdu":"موبائل نمبر:{existing_contact_phone_number}$","English":"Mobile Number: ${existing_contact_phone_number}","Roman Urdu":"Mobile Number: ${existing_contact_phone_number}"}},{"instance":{"openmrs_entity_id":"5272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"label":{"Urdu":"کیا خا تون حاملہ ہیں؟","English":"Is female pregnant?","Roman Urdu":"Kia khatoon haamla hain?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"pregnant"},{"name":"edd_lmp","bind":{"relevant":"selected (${pregnant}, 'yes')"},"label":{"Urdu":"کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟","English":"Do you know your LMP, EDD or last Ultrasound information?","Roman Urdu":"Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai?"},"instance":{"openmrs_entity_id":"160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"زچگی کی متوقع تاریخ ماضی کی نہیں ہو سکتی","Roman Urdu":"Zachgi ki mutawaqqa tareekh maazi ki nahi hosakti","English":"EDD cannot be in the past"},"relevant":"selected (${edd_lmp}, 'edd')","constraint":".>=${today}"},"type":"date","name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh","English":"EDD"}},{"bind":{"jr:constraintMsg":{"Urdu":"پچھلی ماہواری کی تاریخ مستقبل کی نہیں ہوسکتی","Roman Urdu":"Pichli mahwaari ki tareekh mustaqbil ki nahi hosakti","English":"LMP cannot be in the future"},"relevant":"selected (${edd_lmp}, 'lmp')","constraint":".<=${today}"},"type":"date","name":"lmp","label":{"Urdu":"پچھلی ماہواری کی تاریخ","Roman Urdu":"Pichli mahwaari ki tareekh","English":"LMP"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"date","instance":{"openmrs_entity_id":"163165AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"ultrasound_date","label":{"Urdu":"الٹرا سائونڈ کی تاریخ","English":"Ultrasound Date","Roman Urdu":"Ultrasound ki tareekh"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"integer","name":"ultrasound_weeks","label":{"Urdu":"الٹرا سائونڈ کی مدد سے حمل کی مدت [ہفتوں میں]","Roman Urdu":"Ultrasound ki madad se hamal ki muddat (hafton me)","English":"Gestational age determined by ultrasound"}},{"bind":{"calculate":"date(${lmp}+280)"},"type":"calculate","name":"edd_calc_lmp"},{"bind":{"calculate":"date((280-(${ultrasound_weeks}*7)+${ultrasound_date} ))"},"type":"calculate","name":"edd_calc_ultrasound"},{"bind":{"calculate":"format-date(${edd_calc_lmp}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_lmp_formatted"},{"bind":{"calculate":"format-date(${edd_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_ultrasound_formatted"},{"bind":{"calculate":"date(${edd}-280)"},"type":"calculate","name":"lmp_calc_edd"},{"bind":{"calculate":"date(${ultrasound_date}-(${ultrasound_weeks}*7))"},"type":"calculate","name":"lmp_calc_ultrasound"},{"bind":{"calculate":"format-date(${lmp_calc_edd}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_edd_formatted"},{"bind":{"calculate":"format-date(${lmp_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_ultrasound_formatted"},{"bind":{"calculate":"if(${edd_lmp}='lmp',${edd_calc_lmp_formatted},if(${edd_lmp}='edd',${edd} ,if(${edd_lmp}='ultrasound',${edd_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_edd","instance":{"openmrs_entity_id":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${lmp},if(${edd_lmp}='edd',${lmp_calc_edd_formatted} ,if(${edd_lmp}='ultrasound',${lmp_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_lmp","instance":{"openmrs_entity_id":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"int((${vaccination_date} - (${edd}-280))div7)"},"type":"calculate","name":"ga_edd"},{"bind":{"calculate":"int((${vaccination_date} - ${lmp})div7)"},"type":"calculate","name":"ga_lmp"},{"bind":{"calculate":"int((${vaccination_date} -(${ultrasound_date}-(${ultrasound_weeks}*7)))div7)"},"type":"calculate","name":"ga_ult"},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_edd_note","label":{"Urdu":"${final_edd}: زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh: ${final_edd}","English":"EDD: ${final_edd}"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_lmp_note","label":{"Urdu":"پچھلی ماہواری کی تاریخ :{final_lmp}$","Roman Urdu":"Pichli mahwaari ki tareekh: ${final_lmp}","English":"LMP: ${final_lmp}"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${ga_lmp},if(${edd_lmp}='edd',${ga_edd} ,if(${edd_lmp}='ultrasound',${ga_ult},'')))"},"type":"calculate","name":"final_ga","instance":{"openmrs_entity_id":"163166AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_ga_note","label":{"Urdu":"حمل کی مُدّت: {final_ga}$ ہفتے","Roman Urdu":"Hamal ki muddat: ${final_ga} weeks","English":"GA: ${final_ga} weeks"}},{"name":"vaccines","choice_filter":"name != if( ${e_tt1} != '', 'TT1' , '') and \nname != if( ${e_tt2} != '', 'TT2' , '') and \nname != if( ${e_tt3} != '', 'TT3' , '') and \nname != if( ${e_tt4} != '', 'TT4' , '') and \nname != if( ${e_tt5} != '', 'TT5' , '')","default":"minimal","label":{"Urdu":"پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے","Roman Urdu":"Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye","English":"Retro vaccines"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"relevant":"selected(${vaccines},'TT1')","constraint":"(.<=${today} and .<=${existing_client_reg_date})"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt1_retro","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"bind":{"relevant":"selected(${vaccines},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","constraint":"(.<=${today} and .>=${tt1_retro} and ((selected(${vaccines}, 'TT1'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt2_retro","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","constraint":"(.<=${today} and .>=${tt2_retro} and ((selected(${vaccines}, 'TT2'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt3_retro","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","constraint":"(.<=${today} and .>=${tt3_retro} and ((selected(${vaccines}, 'TT3'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt4_retro","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"name":"vaccines_2","choice_filter":"name != if( ${e_tt1} != '', 'TT1' , '') and \nname != if( ${e_tt2} != '', 'TT2' , '') and \nname != if( ${e_tt3} != '', 'TT3' , '') and \nname != if( ${e_tt4} != '', 'TT4' , '') and \nname != if( ${e_tt5} != '', 'TT5' , '') and \nname != if( selected(${vaccines}, 'TT1') , 'TT1', '') and \nname != if( selected(${vaccines}, 'TT2') , 'TT2', '') and \nname != if( selected(${vaccines}, 'TT3') , 'TT3', '') and \nname != if( selected(${vaccines}, 'TT4') , 'TT4', '') and \nname != if( selected(${vaccines}, 'TT5') , 'TT5', '')","bind":{"required":"yes"},"label":{"Urdu":"آج کون کون سی ویکسین دی گئی ہیں؟","Roman Urdu":"Aaj kon kon si vaccine di gai hain?","English":"Vaccine administered today"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"required":"yes"},"type":"date","instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"name":"vaccination_date","label":{"Urdu":"تاریخ","English":"Vaccination date","Roman Urdu":"Tareekh"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT1'),${vaccination_date},'')"},"type":"calculate","name":"tt1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT2'),${vaccination_date},'')"},"type":"calculate","name":"tt2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT3'),${vaccination_date},'')"},"type":"calculate","name":"tt3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT4'),${vaccination_date},'')"},"type":"calculate","name":"tt4","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT5'),${vaccination_date},'')"},"type":"calculate","name":"tt5","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT5')","calculate":"5"},"type":"calculate","name":"tt_5_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/offsite_woman_followup/form.xml b/opensrp-core/src/test/resources/form/offsite_woman_followup/form.xml deleted file mode 100644 index a2f6cb48d4..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_woman_followup/form.xml +++ /dev/null @@ -1,1439 +0,0 @@ -
- - -

دوسرے سینٹر میں رجسٹرڈ خواتین فالواپ رجسٹر - Off Site Woman Follow Up Form

-
-
- - کیا آپ کا گھر کا پتہ بدلا ہے؟ - Kya aap ka ghar ka pata badla hai? - - Has your home address changed? -
- - -
-
-
-
- - کیا خا تون حاملہ ہیں؟ - Kia khatoon haamla hain? - - Is female pregnant? -
- - -
-
-
-
- - کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟ - Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai? - - Do you know your LMP, EDD or last Ultrasound information? -
- - - - -
-
-
-
- - پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے - Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye - - Retro vaccines -
- - - ٹی ٹی 1 - TT1 - - TT1 - ٹی ٹی 2 - TT2 - - TT2 - ٹی ٹی 3 - TT3 - - TT3 - ٹی ٹی 4 - TT4 - - TT4 - ٹی ٹی 5 - TT5 - - TT5 -
-
-
-
- - آج کون کون سی ویکسین دی گئی ہیں؟ - Aaj kon kon si vaccine di gai hain? - - Vaccine administered today - * -
- - - ٹی ٹی 1 - TT1 - - TT1 - ٹی ٹی 2 - TT2 - - TT2 - ٹی ٹی 3 - TT3 - - TT3 - ٹی ٹی 4 - TT4 - - TT4 - ٹی ٹی 5 - TT5 - - TT5 -
-
-
- -
diff --git a/opensrp-core/src/test/resources/form/offsite_woman_followup/form_definition.json b/opensrp-core/src/test/resources/form/offsite_woman_followup/form_definition.json deleted file mode 100644 index 4353ee25d1..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_woman_followup/form_definition.json +++ /dev/null @@ -1,372 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkwoman", - "default_bind_path" : "/model/instance/Offsite_Woman_Followup_Form/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_province", - "shouldLoadValue" : true - }, { - "name" : "existing_landmark", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_landmark", - "shouldLoadValue" : true - }, { - "name" : "existing_house_number", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_house_number", - "shouldLoadValue" : true - }, { - "name" : "existing_street", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_street", - "shouldLoadValue" : true - }, { - "name" : "existing_union_council", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_union_council", - "shouldLoadValue" : true - }, { - "name" : "existing_town", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_town", - "shouldLoadValue" : true - }, { - "name" : "existing_city_village", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_city_village", - "shouldLoadValue" : true - }, { - "name" : "existing_province", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_province", - "shouldLoadValue" : true - }, { - "name" : "existing_union_councilname", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_union_councilname", - "shouldLoadValue" : true - }, { - "name" : "existing_townname", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_townname", - "shouldLoadValue" : true - }, { - "name" : "existing_city_villagename", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_city_villagename", - "shouldLoadValue" : true - }, { - "name" : "existing_provincename", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_provincename", - "shouldLoadValue" : true - }, { - "name" : "existing_first_name", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_first_name", - "shouldLoadValue" : true - }, { - "name" : "existing_last_name", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_last_name", - "shouldLoadValue" : true - }, { - "name" : "existing_father_name", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_father_name", - "shouldLoadValue" : true - }, { - "name" : "existing_husband_name", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_husband_name", - "shouldLoadValue" : true - }, { - "name" : "existing_marriage", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_marriage", - "shouldLoadValue" : true - }, { - "name" : "existing_birthdate", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_calc_dob_confirm", - "shouldLoadValue" : true - }, { - "name" : "existing_gender", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_gender", - "shouldLoadValue" : true - }, { - "name" : "existing_ethnicity", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_ethnicity", - "shouldLoadValue" : true - }, { - "name" : "existing_client_reg_date", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_client_reg_date", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "existing_epi_card_number", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/existing_epi_card_number", - "shouldLoadValue" : true - }, { - "name" : "e_tt1", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/e_tt1", - "shouldLoadValue" : true - }, { - "name" : "e_tt2", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/e_tt2", - "shouldLoadValue" : true - }, { - "name" : "e_tt3", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/e_tt3", - "shouldLoadValue" : true - }, { - "name" : "e_tt4", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/e_tt4", - "shouldLoadValue" : true - }, { - "name" : "e_tt5", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/e_tt5", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/start" - }, { - "name" : "end", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/end" - }, { - "name" : "today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/phonenumber" - }, { - "name" : "client_reg_date_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/client_reg_date_note" - }, { - "name" : "program_client_id_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/program_client_id_note" - }, { - "name" : "epi_card_number", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/epi_card_number" - }, { - "name" : "first_name_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/first_name_note" - }, { - "name" : "last_name_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/last_name_note" - }, { - "name" : "client_age", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/client_age" - }, { - "name" : "birth_date_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/birth_date_note" - }, { - "name" : "gender_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/gender_note" - }, { - "name" : "father_name_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/father_name_note" - }, { - "name" : "marriage_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/marriage_note" - }, { - "name" : "husband_name_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/husband_name_note" - }, { - "name" : "ethnicity_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ethnicity_note" - }, { - "name" : "address", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/address" - }, { - "name" : "address_change", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/address_change" - }, { - "name" : "province", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/landmark" - }, { - "name" : "center_gps", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/center_gps" - }, { - "name" : "pregnant", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/pregnant" - }, { - "name" : "edd_lmp", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd_lmp" - }, { - "name" : "edd", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd" - }, { - "name" : "lmp", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/lmp" - }, { - "name" : "ultrasound_date", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ultrasound_date" - }, { - "name" : "ultrasound_weeks", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ultrasound_weeks" - }, { - "name" : "edd_calc_lmp", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd_calc_lmp" - }, { - "name" : "edd_calc_ultrasound", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd_calc_ultrasound" - }, { - "name" : "edd_calc_lmp_formatted", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd_calc_lmp_formatted" - }, { - "name" : "edd_calc_ultrasound_formatted", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/edd_calc_ultrasound_formatted" - }, { - "name" : "lmp_calc_edd", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/lmp_calc_edd" - }, { - "name" : "lmp_calc_ultrasound", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/lmp_calc_ultrasound" - }, { - "name" : "lmp_calc_edd_formatted", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/lmp_calc_edd_formatted" - }, { - "name" : "lmp_calc_ultrasound_formatted", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/lmp_calc_ultrasound_formatted" - }, { - "name" : "final_edd", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_edd" - }, { - "name" : "final_lmp", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_lmp" - }, { - "name" : "ga_edd", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ga_edd" - }, { - "name" : "ga_lmp", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ga_lmp" - }, { - "name" : "ga_ult", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/ga_ult" - }, { - "name" : "final_edd_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_edd_note" - }, { - "name" : "final_lmp_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_lmp_note" - }, { - "name" : "final_ga", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_ga" - }, { - "name" : "final_ga_note", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/final_ga_note" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/vaccines" - }, { - "name" : "tt1_retro", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt1_retro" - }, { - "name" : "tt_1_dose", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_1_dose" - }, { - "name" : "tt2_retro", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt2_retro" - }, { - "name" : "tt_2_dose", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_2_dose" - }, { - "name" : "tt3_retro", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt3_retro" - }, { - "name" : "tt_3_dose", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_3_dose" - }, { - "name" : "tt4_retro", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt4_retro" - }, { - "name" : "tt_4_dose", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_4_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/vaccines_2" - }, { - "name" : "vaccination_date", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/vaccination_date" - }, { - "name" : "tt1", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt1" - }, { - "name" : "tt_1_dose_today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_1_dose_today" - }, { - "name" : "tt2", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt2" - }, { - "name" : "tt_2_dose_today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_2_dose_today" - }, { - "name" : "tt3", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt3" - }, { - "name" : "tt_3_dose_today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_3_dose_today" - }, { - "name" : "tt4", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt4" - }, { - "name" : "tt_4_dose_today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_4_dose_today" - }, { - "name" : "tt5", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt5" - }, { - "name" : "tt_5_dose_today", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/tt_5_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Offsite_Woman_Followup_Form/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/offsite_woman_followup/model.xml b/opensrp-core/src/test/resources/form/offsite_woman_followup/model.xml deleted file mode 100644 index 2b5e6a2d81..0000000000 --- a/opensrp-core/src/test/resources/form/offsite_woman_followup/model.xml +++ /dev/null @@ -1,1643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${provider_province} - ${provider_city} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - minimal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - TT1 - - - static_instance-vaccines-1 - TT2 - - - static_instance-vaccines-2 - TT3 - - - static_instance-vaccines-3 - TT4 - - - static_instance-vaccines-4 - TT5 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-edd_lmp-0 - edd - - - static_instance-edd_lmp-1 - lmp - - - static_instance-edd_lmp-2 - ultrasound - - - static_instance-edd_lmp-3 - none - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/form/pnc_1st_registration/form.json b/opensrp-core/src/test/resources/form/pnc_1st_registration/form.json deleted file mode 100644 index ac61605e10..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_1st_registration/form.json +++ /dev/null @@ -1,373 +0,0 @@ -{ - "name": "pnc_first_registration_motherdetails", - "title": "PNC Registration", - "sms_keyword": "pnc_1st_registration", - "default_language": "default", - "instance": { - "encounter_type": "PNC Registration" - }, - "version": "201504011203", - "id_string": "pnc_1st_registration", - "type": "survey", - "children": [ - { - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "text", - "name": "location", - "label": "Location" - }, - { - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "today", - "name": "today" - }, - { - "instance": { - "openmrs_entity_id": "encounter_start", - "openmrs_entity": "encounter" - }, - "type": "start", - "name": "start" - }, - { - "instance": { - "openmrs_entity_id": "encounter_end", - "openmrs_entity": "encounter" - }, - "type": "end", - "name": "end" - }, - { - "instance": { - "openmrs_entity_id": "OpenSRPID", - "openmrs_entity": "person_identifier" - }, - "type": "integer", - "name": "mother_id", - "label": "Mother ID number:" - }, - { - "name": "gender", - "bind": { - "required": "yes" - }, - "label": "Gender? ಮಗುವಿನ ಲಿಂಗ?", - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "person" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "male", - "label": "Male ಗಂಡು" - }, - { - "instance": { - "openmrs_code": "1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "female", - "label": "Female ಹೆಣ್ಣು" - } - ] - }, - { - "instance": { - "openmrs_entity_id": "birthdate", - "openmrs_entity": "person" - }, - "type": "date", - "name": "mother_birthdate", - "label": "Mother's DOB?" - }, - { - "instance": { - "openmrs_entity_id": "first_name", - "openmrs_entity": "person" - }, - "type": "text", - "name": "mother_first_name", - "label": "Mother's first name?" - }, - { - "instance": { - "openmrs_entity_id": "last_name", - "openmrs_entity": "person" - }, - "type": "text", - "name": "mother_last_name", - "label": "Mother's last name?" - }, - { - "bind": { - "required": "yes", - "constraint": ".<=${today}" - }, - "type": "date", - "instance": { - "openmrs_entity_id": "5599AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "name": "delivery_date", - "label": "Delivery date? ಹೆರಿಗೆ ದಿನಾಂಕ?" - }, - { - "instance": { - "openmrs_entity_id": "162724AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "text", - "name": "delivery_facility_name", - "label": "Name of delivery facility? ಹೆರಿಗೆಯಾದ ಸ್ಥಳದ ಹೆಸರು?" - }, - { - "name": "delivery_skilled", - "bind": { - "required": "yes" - }, - "label": "Delivery attended by SBA? ತರಬೇತಿ ಹೊಂದಿದ ಹೆರಿಗೆ ಸಹಾಯಕರು ಹೆರಿಗೆಯಲ್ಲಿ ಹಾಜರಿದ್ದರೆ?", - "instance": { - "openmrs_entity_id": "160083AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "yes", - "label": "Yes ಹೌದು" - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "no", - "label": "No ಇಲ್ಲ" - } - ] - }, - { - "instance": { - "openmrs_entity_id": "5630AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "label": "Type of delivery? ಯಾವ ವಿಧದ ಹೆರಿಗೆ?", - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "normal", - "label": "Normal ಸಾಮಾನ್ಯ" - }, - { - "instance": { - "openmrs_code": "1171AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "cesarean", - "label": "Cesarean ಸಿಸೇರಿಯನ್" - }, - { - "instance": { - "openmrs_code": "118159AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "instrumental_forcep", - "label": "Instrumental / Forcep ಉಪಕರಣಗಳಿಂದ ಮಾಡುವ ಹೆರಿಗೆ" - } - ], - "name": "delivery_type" - }, - { - "name": "delivery_outcome", - "bind": { - "required": "yes" - }, - "label": "Delivery outcome? ಹೆರಿಗೆ ಫಲಿತಾಂಶವೇನು?", - "instance": { - "openmrs_entity_id": "159917AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "151849AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "live_birth", - "label": "Live Birth ಜೀವಂತ ಜನನ" - }, - { - "instance": { - "openmrs_code": "125872AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "still_birth", - "label": "Still Birth ನಿರ್ಜೀವ ಜನನ" - } - ] - }, - { - "instance": { - "openmrs_entity_id": "1053AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "int", - "name": "parity", - "label": "Parity" - }, - { - "bind": { - "relevant": "${delivery_outcome} = 'live_birth'" - }, - "type": "int", - "instance": { - "openmrs_entity_id": "160601AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "name": "num_livebirths", - "label": "Live births" - }, - { - "bind": { - "relevant": "${delivery_outcome} = 'still_birth'" - }, - "type": "int", - "instance": { - "openmrs_entity_id": "160077AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "name": "num_stillbirths", - "label": "Still births" - }, - { - "instance": { - "openmrs_entity_id": "1576AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "label": "What delivery complications were there? ಯಾವ ಹೆರಿಗೆ ತೊಂದರೆಗಳು ಉಂಟಾದವು?", - "type": "select all that apply", - "children": [ - { - "instance": { - "openmrs_code": "230AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "hemorrhage", - "label": "Hemorrhage ರಕ್ತಸ್ರಾವ" - }, - { - "instance": { - "openmrs_code": "114127AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "placenta_previa", - "label": "Placenta previa ಹಿಂದಿನ ಗರ್ಭದಲ್ಲಿ ಮಾಸು ಮುಂದಿರುವುದು" - }, - { - "instance": { - "openmrs_code": "128420AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "cord_prolapse", - "label": "Cord prolapse ಬಳ್ಳಿಯ ಸರಿತ" - }, - { - "instance": { - "openmrs_code": "115036AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "prolonged_labor", - "label": "Prolonged / obstructed labor ದೀರ್ಘಕಾಲೀನ / ಅಡಚಣೆಯನ್ನು ತಂದೊಡ್ಡುವ ಹೆರಿಗೆ ನೋವು" - }, - { - "instance": { - "openmrs_code": "1172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "abnormal_presentation", - "label": "Abnormal presentation ಅಪಸಾಮಾನ್ಯ ಪ್ರಸ್ತುತಿ" - }, - { - "instance": { - "openmrs_code": "126886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "perineal_tear_2nd_degree", - "label": "Perineal tear (2 degree)" - }, - { - "instance": { - "openmrs_code": "124857AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "perineal_tear_3rd_degree", - "label": "Perineal tear (3 degree)" - }, - { - "instance": { - "openmrs_code": "39911AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "perineal_tear_4th_degree", - "label": "Perineal tear (4 degree)" - }, - { - "instance": { - "openmrs_code": "120222AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "others", - "label": "Others ಇತರೆ" - } - ], - "name": "complications" - }, - { - "name": "woman_survived", - "bind": { - "required": "yes" - }, - "label": "Woman survived childbirth? ಮಗುವಿನ ಜನನದ ನಂತರ ಮಹಿಳೆ ಬದುಕುಳಿದರೆ?", - "instance": { - "openmrs_entity_id": "134612AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", - "openmrs_entity": "concept" - }, - "type": "select one", - "children": [ - { - "instance": { - "openmrs_code": "1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "yes", - "label": "Yes ಹೌದು" - }, - { - "instance": { - "openmrs_code": "1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }, - "name": "no", - "label": "No ಇಲ್ಲ" - } - ] - }, - { - "control": { - "bodyless": true - }, - "type": "group", - "children": [ - { - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate", - "name": "instanceID" - } - ], - "name": "meta" - } - ] -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_1st_registration/form.xml b/opensrp-core/src/test/resources/form/pnc_1st_registration/form.xml deleted file mode 100644 index d9501c2e3c..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_1st_registration/form.xml +++ /dev/null @@ -1,29 +0,0 @@ - -
-

PNC Registration

- - - - -
Gender? ಮಗುವಿನ ಲಿಂಗ?* -
- - - - - -
Delivery attended by SBA? ತರಬೇತಿ ಹೊಂದಿದ ಹೆರಿಗೆ ಸಹಾಯಕರು ಹೆರಿಗೆಯಲ್ಲಿ ಹಾಜರಿದ್ದರೆ?* -
-
Type of delivery? ಯಾವ ವಿಧದ ಹೆರಿಗೆ? -
-
Delivery outcome? ಹೆರಿಗೆ ಫಲಿತಾಂಶವೇನು?* -
- - - -
What delivery complications were there? ಯಾವ ಹೆರಿಗೆ ತೊಂದರೆಗಳು ಉಂಟಾದವು? -
-
Woman survived childbirth? ಮಗುವಿನ ಜನನದ ನಂತರ ಮಹಿಳೆ ಬದುಕುಳಿದರೆ?* -
- -
XML to HTML transformation for form took 0.03 secondsThis validation is yet not functional.
diff --git a/opensrp-core/src/test/resources/form/pnc_1st_registration/form_definition.json b/opensrp-core/src/test/resources/form/pnc_1st_registration/form_definition.json deleted file mode 100644 index f715275a86..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_1st_registration/form_definition.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "form_data_definition_version": "1", - "form": { - "default_bind_path": "/model/instance/pnc_first_registration_motherdetails", - "bind_type": "demo_mother", - "fields": [ - { - "name":"id", - "shouldLoadValue": true - }, - { - "name": "location", - "bind": "/model/instance/pnc_first_registration_motherdetails/location" - }, - { - "name": "today", - "bind": "/model/instance/pnc_first_registration_motherdetails/today" - }, - { - "name": "start", - "bind": "/model/instance/pnc_first_registration_motherdetails/start" - }, - { - "name": "end", - "bind": "/model/instance/pnc_first_registration_motherdetails/end" - }, - { - "name": "mother_id", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_id" - }, - { - "name": "gender", - "bind": "/model/instance/pnc_first_registration_motherdetails/gender" - }, - { - "name": "mother_birthdate", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_birthdate" - }, - { - "name": "mother_first_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_first_name" - }, - { - "name": "mother_last_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_last_name" - }, - { - "name": "delivery_date", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_date" - }, - { - "name": "delivery_facility_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_facility_name" - }, - { - "name": "delivery_skilled", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_skilled" - }, - { - "name": "delivery_type", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_type" - }, - { - "name": "delivery_outcome", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_outcome" - }, - { - "name": "parity", - "bind": "/model/instance/pnc_first_registration_motherdetails/parity" - }, - { - "name": "num_livebirths", - "bind": "/model/instance/pnc_first_registration_motherdetails/num_livebirths" - }, - { - "name": "num_stillbirths", - "bind": "/model/instance/pnc_first_registration_motherdetails/num_stillbirths" - }, - { - "name": "complications", - "bind": "/model/instance/pnc_first_registration_motherdetails/complications" - }, - { - "name": "woman_survived", - "bind": "/model/instance/pnc_first_registration_motherdetails/woman_survived" - } - ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_1st_registration/form_submission.json b/opensrp-core/src/test/resources/form/pnc_1st_registration/form_submission.json deleted file mode 100644 index 7cdcb1c63b..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_1st_registration/form_submission.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "anmId": "admin", - "clientVersion": "1426830449320", - "entityId": "b716d938-1aea-40ae-a081-9ddddddcccc9", - "formDataDefinitionVersion": "5", - "formName": "pnc_1st_registration", - "formInstance": { - "form_data_definition_version": "1", - "form": { - "default_bind_path": "/model/instance/pnc_first_registration_motherdetails", - "bind_type": "demo_mother", - "fields": [ - { - "name": "id", - "shouldLoadValue": true, - "source": "demo_mother.id", - "value": "aec8e1a5-ab11-47ac-8bc0-ff1e7146e342" - }, - { - "name": "location", - "bind": "/model/instance/pnc_first_registration_motherdetails/location", - "source": "demo_mother.location", - "value": "testloc" - }, - { - "name": "today", - "bind": "/model/instance/pnc_first_registration_motherdetails/today", - "source": "demo_mother.today", - "value": "2015-04-02" - }, - { - "name": "start", - "bind": "/model/instance/pnc_first_registration_motherdetails/start", - "source": "demo_mother.start", - "value": "2015-04-02T04:49:16.000-00:00" - }, - { - "name": "end", - "bind": "/model/instance/pnc_first_registration_motherdetails/end", - "source": "demo_mother.end", - "value": "2015-04-02T04:49:16.000-00:00" - }, - { - "name": "mother_id", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_id", - "source": "demo_mother.mother_id", - "value": "234" - }, - { - "name": "gender", - "bind": "/model/instance/pnc_first_registration_motherdetails/gender", - "source": "demo_mother.gender", - "value": "male" - }, - { - "name": "mother_birthdate", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_birthdate", - "source": "demo_mother.mother_birthdate", - "value": "1989-01-31" - }, - { - "name": "mother_first_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_first_name", - "source": "demo_mother.mother_first_name", - "value": "jamila" - }, - { - "name": "mother_last_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/mother_last_name", - "source": "demo_mother.mother_last_name", - "value": "rashid" - }, - { - "name": "delivery_date", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_date", - "source": "demo_mother.delivery_date", - "value": "2015-04-01" - }, - { - "name": "delivery_facility_name", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_facility_name", - "source": "demo_mother.delivery_facility_name", - "value": "moghbazar health center" - }, - { - "name": "delivery_skilled", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_skilled", - "source": "demo_mother.delivery_skilled", - "value": "yes" - }, - { - "name": "delivery_type", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_type", - "source": "demo_mother.delivery_type", - "value": "normal" - }, - { - "name": "delivery_outcome", - "bind": "/model/instance/pnc_first_registration_motherdetails/delivery_outcome", - "source": "demo_mother.delivery_outcome", - "value": "live_birth" - }, - { - "name": "parity", - "bind": "/model/instance/pnc_first_registration_motherdetails/parity", - "source": "demo_mother.parity", - "value": "1" - }, - { - "name": "num_livebirths", - "bind": "/model/instance/pnc_first_registration_motherdetails/num_livebirths", - "source": "demo_mother.num_livebirths", - "value": "1" - }, - { - "name": "num_stillbirths", - "bind": "/model/instance/pnc_first_registration_motherdetails/num_stillbirths", - "source": "demo_mother.num_stillbirths" - }, - { - "name": "complications", - "bind": "/model/instance/pnc_first_registration_motherdetails/complications", - "source": "demo_mother.complications", - "value": "hemorrhage" - }, - { - "name": "woman_survived", - "bind": "/model/instance/pnc_first_registration_motherdetails/woman_survived", - "source": "demo_mother.woman_survived", - "value": "yes" - } - ] - } - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_1st_registration/model.xml b/opensrp-core/src/test/resources/form/pnc_1st_registration/model.xml deleted file mode 100644 index 02529770ad..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_1st_registration/model.xml +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_reg_form/form.json b/opensrp-core/src/test/resources/form/pnc_reg_form/form.json deleted file mode 100644 index 5fd76f37d0..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_reg_form/form.json +++ /dev/null @@ -1,1381 +0,0 @@ -{ - "default_language": "default", - "id_string": "Delivery_Outcome_EngKan", - "children": [ - { - "name": "today", - "type": "today" - }, - { - "name": "case_lmp", - "instance": { - "openmrs_entity_id": "1100282", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "delivery_date", - "bind": { - "required": "yes", - "constraint": ".<=${today}" - }, - "label": "Delivery date? ಹೆರಿಗೆ ದಿನಾಂಕ?", - "instance": { - "openmrs_entity_id": "2129182", - "openmrs_entity": "concept" - }, - "type": "date" - }, - { - "name": "delivery_reg_date", - "bind": { - "required": "yes", - "constraint": ".<=${today} and .>= ${delivery_date}" - }, - "label": "PNC registration date? ಬಾಣಂತಿ ದಾಖಲಾತಿ ದಿನಾಂಕ?", - "instance": { - "openmrs_entity_id": "encounter_date", - "openmrs_entity": "encounter" - }, - "type": "date" - }, - { - "children": [ - { - "name": "home", - "label": "Home ಮನೆ", - "instance": { - "openmrs_code": "32323213" - } - }, - { - "name": "subcenter", - "label": "Sub Center ಉಪ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "2321321" - } - }, - { - "name": "phc", - "label": "PHC ಪ್ರಾಥಮಿಕ ಆರೋಗ್ಯ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "323213" - } - }, - { - "name": "chc", - "label": "CHC ಸಮುದಾಯ ಆರೋಗ್ಯ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "1213213" - } - }, - { - "name": "sdh", - "label": "SDH ಉಪ ಜಿಲ್ಲಾ ಆಸ್ಪತ್ರೆ", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "dh", - "label": "DH ಜಿಲ್ಲಾ ಆಸ್ಪತ್ರೆ", - "instance": { - "openmrs_code": "232113" - } - }, - { - "name": "private_facility", - "label": "Private ಖಾಸಗಿ", - "instance": { - "openmrs_code": "123123" - } - } - ], - "name": "place_delivery", - "bind": { - "required": "yes" - }, - "label": "Place of delivery? ಹೆರಿಗೆಯಾದ ಸ್ಥಳ?", - "instance": { - "openmrs_entity_id": "location_id", - "openmrs_entity": "encounter" - }, - "type": "select one" - }, - { - "name": "name_delivery_facility", - "bind": { - "relevant": "${place_delivery} != 'home'" - }, - "label": "Name of delivery place? ಹೆರಿಗೆಯಾದ ಸ್ಥಳದ ಹೆಸರು?", - "instance": { - "openmrs_entity_id": "4787232", - "openmrs_entity": "concept" - }, - "type": "text" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "only_delivery_facility", - "label": "Is this the only place woman went for delivery? ಹೆರಿಗೆಗೆ ಇದೊಂದೆ ಸ್ಥಳಕ್ಕೆ ಹೋಗಿದ್ದರೆ?", - "instance": { - "openmrs_entity_id": "120009", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "home", - "label": "Home ಮನೆ", - "instance": { - "openmrs_code": "32323213" - } - }, - { - "name": "subcenter", - "label": "Sub Center ಉಪ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "2321321" - } - }, - { - "name": "phc", - "label": "PHC ಪ್ರಾಥಮಿಕ ಆರೋಗ್ಯ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "323213" - } - }, - { - "name": "chc", - "label": "CHC ಸಮುದಾಯ ಆರೋಗ್ಯ ಕೇಂದ್ರ", - "instance": { - "openmrs_code": "1213213" - } - }, - { - "name": "sdh", - "label": "SDH ಉಪ ಜಿಲ್ಲಾ ಆಸ್ಪತ್ರೆ", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "dh", - "label": "DH ಜಿಲ್ಲಾ ಆಸ್ಪತ್ರೆ", - "instance": { - "openmrs_code": "232113" - } - }, - { - "name": "private_facility", - "label": "Private ಖಾಸಗಿ", - "instance": { - "openmrs_code": "123123" - } - } - ], - "name": "addl_delivery_facility", - "bind": { - "relevant": "${only_delivery_facility} = 'no'" - }, - "label": "Where else did she go for delivery? ಹೆರಿಗೆಗೆ ಇನ್ಯಾವ ಸ್ಥಳಕ್ಕೆ ಹೋಗಿದ್ದರೆ?", - "instance": { - "openmrs_entity_id": "124433", - "openmrs_entity": "concept" - }, - "type": "select all that apply" - }, - { - "children": [ - { - "name": "no_staff", - "label": "No staff available for delivery ಹೆರಿಗೆಗೆ ಸಿಬ್ಬಂಧಿಯು ಲಭ್ಯವಿಲ್ಲ", - "instance": { - "openmrs_code": "4123" - } - }, - { - "name": "referred_higher_facility", - "label": "Referred to higher facility ಹೆಚ್ಚಿನ ಸೌಲಭ್ಯಕ್ಕೆ ರೆಫರ್ ಮಾಡಲಾಗಿದೆ", - "instance": { - "openmrs_code": "21312312" - } - }, - { - "name": "lack_of_supplies", - "label": "Lack of supplies ಸರಬರಾಜು ಕೊರತೆ", - "instance": { - "openmrs_code": "134134" - } - }, - { - "name": "no_electricity", - "label": "No electricity ವಿದ್ಯುತ್ ಇಲ್ಲ", - "instance": { - "openmrs_code": "34134134" - } - }, - { - "name": "family_insisted_elsewhere", - "label": "Family insisted on going elsewhere ಕುಟುಂಬಕ್ಕೆ ಬೇರೇಡೆಗೆ ಹೋಗಲು ಒತ್ತಾಯಿಸಿದರು", - "instance": { - "openmrs_code": "341341" - } - }, - { - "name": "no_money", - "label": "Not enough money ಸಾಕಷ್ಟು ಹಣವಿಲ್ಲ", - "instance": { - "openmrs_code": "43434432" - } - }, - { - "name": "others", - "label": "Others ಇತರೆ", - "instance": { - "openmrs_code": "323243224" - } - } - ], - "name": "reasons_addl_delivery_facility", - "bind": { - "relevant": "${only_delivery_facility} = 'no'" - }, - "label": "Select the reasons why more than one place. ಬೇರೆ ಸ್ಥಳಕ್ಕೆ ಹೋಗಿದ್ದಕ್ಕೆ ಕಾರಣವನ್ನು ಆಯ್ಕೆ ಮಾಡಿ.", - "instance": { - "openmrs_entity_id": "100933", - "openmrs_entity": "concept" - }, - "type": "select all that apply" - }, - { - "name": "other_reasons_addl_delivery_facility", - "bind": { - "relevant": "selected(${reasons_addl_delivery_facility}, 'others')" - }, - "label": "Others ಇತರೆ:", - "instance": { - "openmrs_entity_id": "2323233", - "openmrs_entity": "concept" - }, - "type": "text" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "skilled_delivery", - "bind": { - "relevant": "${place_delivery} = 'home'", - "required": "yes" - }, - "label": "Delivery attended by SBA? ತರಬೇತಿ ಹೊಂದಿದ ಹೆರಿಗೆ ಸಹಾಯಕರು ಹೆರಿಗೆಯಲ್ಲಿ ಹಾಜರಿದ್ದರೆ?", - "instance": { - "openmrs_entity_id": "3231212", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "normal", - "label": "Normal ಸಾಮಾನ್ಯ", - "instance": { - "openmrs_code": "43123" - } - }, - { - "name": "cesarean", - "label": "Cesarean ಸಿಸೇರಿಯನ್", - "instance": { - "openmrs_code": "3232" - } - }, - { - "name": "instrumental_forcep", - "label": "Instrumental / Forcep ಉಪಕರಣಗಳಿಂದ ಮಾಡುವ ಹೆರಿಗೆ", - "instance": { - "openmrs_code": "4134123" - } - } - ], - "name": "type_delivery", - "label": "Type of delivery? ಯಾವ ವಿಧದ ಹೆರಿಗೆ?", - "instance": { - "openmrs_entity_id": "120009", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "live_birth", - "label": "Live Birth ಜೀವಂತ ಜನನ", - "instance": { - "openmrs_code": "38493849" - } - }, - { - "name": "still_birth", - "label": "Still Birth ನಿರ್ಜೀವ ಜನನ", - "instance": { - "openmrs_code": "343434" - } - } - ], - "name": "delivery_outcome", - "bind": { - "required": "yes" - }, - "label": "Delivery outcome? ಹೆರಿಗೆ ಫಲಿತಾಂಶವೇನು?", - "instance": { - "openmrs_entity_id": "124433", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "name": "case_parity", - "instance": { - "openmrs_entity_id": "100933", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "parity", - "bind": { - "calculate": "${case_parity} + 1" - }, - "instance": { - "openmrs_entity_id": "434343", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "case_num_livebirths", - "instance": { - "openmrs_entity_id": "34324234", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "num_livebirths", - "bind": { - "relevant": "${delivery_outcome} = 'live_birth'", - "calculate": "${case_num_livebirths} + 1" - }, - "instance": { - "openmrs_entity_id": "3423423", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "youngestchild_date_of_birth", - "bind": { - "relevant": "${delivery_outcome} = 'live_birth'", - "calculate": "${delivery_date}" - }, - "instance": { - "openmrs_entity_id": "120009", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "youngestchild_age", - "bind": { - "calculate": "int((${today} - ${youngestchild_date_of_birth}) div 30)" - }, - "instance": { - "openmrs_entity_id": "124433", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "case_num_stillbirths", - "instance": { - "openmrs_entity_id": "100933", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "num_stillbirths", - "bind": { - "relevant": "${delivery_outcome} = 'still_birth'", - "calculate": "${case_num_stillbirths} + 1" - }, - "instance": { - "openmrs_entity_id": "3432434", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "children": [ - { - "children": [ - { - "name": "infection_during_preg", - "label": "Infection during pregnancy ಗರ್ಭಾವಸ್ಥೆಯಲ್ಲಿ ಸೋಂಕು", - "instance": { - "openmrs_code": "2323" - } - }, - { - "name": "gest_hypertension", - "label": "Gestational hypertension ಗರ್ಭಾಧಾರಣೆಯಲ್ಲಿನ ಅಧಿಕ ರಕ್ತದೊತ್ತಡ", - "instance": { - "openmrs_code": "2323" - } - }, - { - "name": "gest_diabetes", - "label": "Gestational diabetes ಗರ್ಭಾಧಾರಣೆಯಲ್ಲಿನ ಸಕ್ಕರೆ ಕಾಯಿಲೆ", - "instance": { - "openmrs_code": "23213" - } - }, - { - "name": "fetal_growth_restriction", - "label": "Fetal growth restriction ಭ್ರೂಣದ ಬೆಳವಣಿಗೆಯಲ್ಲಿ ನಿರ್ಬಂಧ", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "birth_defects", - "label": "Birth defects ಜನ್ಮ ನ್ಯೂನ್ಯತೆಗಳು", - "instance": { - "openmrs_code": "23213" - } - }, - { - "name": "unknown", - "label": "Cause not identified ಕಾರಣವನ್ನು ಗುರುತಿಸಲ್ಪಟ್ಟಿಲ್ಲ", - "instance": { - "openmrs_code": "2323" - } - }, - { - "name": "others", - "label": "Others ಇತರೆ", - "instance": { - "openmrs_code": "23213" - } - } - ], - "name": "cause_of_still_birth", - "label": "Cause of still birth? ನಿರ್ಜೀವ ಜನನದ ಕಾರಣಗಳು?", - "instance": { - "openmrs_entity_parent": "65435", - "openmrs_entity_id": "4323232", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "woman_survived", - "bind": { - "required": "yes" - }, - "label": "Woman survived childbirth? ಮಗುವಿನ ಜನನದ ನಂತರ ಮಹಿಳೆ ಬದುಕುಳಿದರೆ?", - "instance": { - "openmrs_entity_parent": "65435", - "openmrs_entity_id": "100009", - "openmrs_entity": "concept" - }, - "type": "select one" - } - ], - "name": "still_birth_group", - "bind": { - "relevant": "${delivery_outcome} = 'still_birth'" - }, - "instance": { - "openmrs_entity_id": "65435", - "openmrs_entity": "concept" - }, - "type": "group" - }, - { - "children": [ - { - "children": [ - { - "children": [ - { - "name": "male", - "label": "Male ಗಂಡು", - "instance": { - "openmrs_code": "21321" - } - }, - { - "name": "female", - "label": "Female ಹೆಣ್ಣು", - "instance": { - "openmrs_code": "312312" - } - } - ], - "name": "sex_child", - "bind": { - "required": "yes" - }, - "label": "Sex of child? ಮಗುವಿನ ಲಿಂಗ?", - "instance": { - "openmrs_entity_id": "gender", - "openmrs_entity": "patient" - }, - "type": "select one" - }, - { - "name": "sex_child_female", - "bind": { - "calculate": "if(${sex_child} = 'female', 1, 0)" - }, - "type": "calculate" - }, - { - "name": "sex_child_male", - "bind": { - "calculate": "if(${sex_child} = 'male', 1, 0)" - }, - "type": "calculate" - }, - { - "name": "birthweight", - "label": "Child birthweight (in kgs)? ಹುಟ್ಟಿದ ಮಗುವಿನ ತೂಕ (ಕೆ.ಜಿ. ಗಳಲ್ಲಿ)?", - "instance": { - "openmrs_entity_id": "323232", - "openmrs_entity": "concept" - }, - "type": "decimal" - }, - { - "control": { - "appearance": "minimal" - }, - "children": [ - { - "name": "a_positive", - "label": "A+", - "instance": { - "openmrs_code": "34324" - } - }, - { - "name": "a_negative", - "label": "A-", - "instance": { - "openmrs_code": "34134" - } - }, - { - "name": "b_positive", - "label": "B+", - "instance": { - "openmrs_code": "1321312" - } - }, - { - "name": "b_negative", - "label": "B-", - "instance": { - "openmrs_code": "43434" - } - }, - { - "name": "ab_positive", - "label": "AB+", - "instance": { - "openmrs_code": "12323214" - } - }, - { - "name": "ab_negative", - "label": "AB-", - "instance": { - "openmrs_code": "11343141" - } - }, - { - "name": "o_positive", - "label": "O+", - "instance": { - "openmrs_code": "134343" - } - }, - { - "name": "o_negative", - "label": "O-", - "instance": { - "openmrs_code": "432434" - } - } - ], - "name": "child_blood_group", - "label": "Child blood group? ಮಗುವಿನ ರಕ್ತದ ಗುಂಪು?", - "instance": { - "openmrs_entity_id": "232112", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "bcg", - "label": "BCG ಬಿ.ಸಿ.ಜಿ", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "opv_0", - "label": "OPV 0 ಒ.ಪಿ.ವಿ 0", - "instance": { - "openmrs_code": "12312" - } - }, - { - "name": "hepb_0", - "label": "Hep B 0 ಹೆಪಟೆಟಿಸ್ ಬಿ 0", - "instance": { - "openmrs_code": "213123" - } - } - ], - "name": "immunizations_atbirth", - "label": "Immunizations provided at birth? ಹುಟ್ಟಿದ ಮಗುವಿಗೆ ಇಮ್ಯುನೈಜೇಷನ್ ನೀಡಲಾಯಿತೆ?", - "instance": { - "openmrs_entity_id": "199277", - "openmrs_entity": "concept" - }, - "type": "select all that apply" - }, - { - "name": "case_hepb", - "instance": { - "openmrs_entity_id": "100285", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "hepb_prophylaxis_provided", - "bind": { - "relevant": "${case_hepb} != ''" - }, - "label": "Hep B prophylaxis provided? ಹೆಪಟೆಟಿಸ್ ಬಿ ರೋಗನಿರೋಧಕ ಚಿಕಿತ್ಸೆ ನೀಡಲಾಗಿದೆತೇ?", - "instance": { - "openmrs_entity_id": "3321323", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "name": "lbw", - "bind": { - "calculate": "if(${birthweight} >= 1.5 and ${birthweight} < 2.5, 'Low_Birth_Weight','')" - }, - "instance": { - "openmrs_entity_id": "1232132", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "vlbw", - "bind": { - "calculate": "if(${birthweight} < 1.5, 'Very_Low_Birth_Weight', '')" - }, - "instance": { - "openmrs_entity_id": "232133", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "num_preg_days", - "bind": { - "calculate": "int(date(${delivery_date}) - date(${case_lmp}))" - }, - "instance": { - "openmrs_entity_id": "232323", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "premature", - "bind": { - "calculate": "if(${num_preg_days} < 259, 'Premature', '')" - }, - "instance": { - "openmrs_entity_id": "232323", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "premature_message1", - "bind": { - "relevant": "${premature} != ''" - }, - "label": "Baby is premature! Advise kangaroo care and rooming in. ಅವಧಿಗೆ ಮುನ್ನ ಜನಿಸಿದ ಮಗು! ಕಾಂಗರೋ ಆರೈಕೆ ಮತ್ತು ಒಂದೇ ರೂಮಿನಲ್ಲಿಡುವಂತೆ ಸಲಹೆ ನೀಡಿ.", - "type": "note" - }, - { - "name": "is_child_high_risk1", - "bind": { - "calculate": "if(${premature} != '' or ${lbw} != '' or ${vlbw} != '', 'yes', 'no')" - }, - "instance": { - "openmrs_entity_id": "342343", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "child_high_risk_reasons", - "bind": { - "calculate": "concat(${premature}, ' ', ${lbw}, ' ', ${vlbw})" - }, - "instance": { - "openmrs_entity_id": "423434", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "high_risk_note_child", - "bind": { - "relevant": "${is_child_high_risk1} = 'yes'" - }, - "label": "Child is at risk because of, ಈಗ ಮಗು ಅಪಾಯದಲ್ಲಿದೆ ಏಕೆಂದರೆ: ${child_high_risk_reasons}", - "type": "note" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "is_child_high_risk", - "bind": { - "required": "yes" - }, - "label": "Do you want to mark child as HR (High Risk)? \nನೀವು ಮಗುವನ್ನು HR (ಹೆಚ್ಚು ಅಪಾಯವಿದೆ) ಎಂದು ಗುರುತಿಸಲು ಬಯಸುವಿರಾ?", - "instance": { - "openmrs_entity_id": "4342343", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "name": "addl_pnc_visit_message", - "bind": { - "relevant": "${is_child_high_risk1} = 'yes'" - }, - "label": "Child needs 3 more PNC visits on days 14, 21, and 28 because of, 14, 21 ಮತ್ತು 28 ನೇ ದಿನಗಳೊಂದು ಮಗುವಿಗೆ 3 ಹೆಚ್ಚಿನ ಭೇಟಿಯ ಅಗತ್ಯವಿದೆ, ಏಕೆಂದರೆ: ${child_high_risk_reasons}", - "type": "note" - } - ], - "name": "child", - "label": "Please enter birth information for each child born. ಜನನವಾದ ಪ್ರತಿ ಮಗುವಿನ ಜನ್ಮ ಮಾಹಿತಿಯನ್ನು ದಯವಿಟ್ಟು ನಮೂದಿಸಿ.", - "instance": { - "openmrs_entity_id": "100029", - "openmrs_entity": "concept" - }, - "type": "repeat" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "mother_survived", - "bind": { - "required": "yes" - }, - "label": "Mother survived childbirth? ಮಗುವಿನ ಜನನದ ನಂತರ ಮಹಿಳೆ ಬದುಕುಳಿದರೆ?", - "instance": { - "openmrs_entity_id": "343434", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "breastfeeding_postbirth", - "bind": { - "relevant": "${mother_survived} = 'yes'", - "required": "yes" - }, - "label": "Was breastfeeding started within 1 hour of birth? ಹುಟ್ಟಿದ ಒಂದು ಗಂಟೆಯ ಒಳಗೆ ಎದೆಹಾಲು ನೀಡಲಾಯಿತೆ?", - "instance": { - "openmrs_entity_id": "434343", - "openmrs_entity": "concept" - }, - "type": "select one" - } - ], - "name": "live_birth_group", - "bind": { - "relevant": "${delivery_outcome} = 'live_birth'" - }, - "type": "group" - }, - { - "name": "case_num_livingchildren", - "instance": { - "openmrs_entity_id": "434344", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "num_children_born", - "bind": { - "calculate": "if(${delivery_outcome} = 'still_birth', 0, count(${sex_child}))" - }, - "instance": { - "openmrs_entity_id": "43432", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "num_livingchildren", - "bind": { - "calculate": "${case_num_livingchildren} + ${num_children_born}" - }, - "instance": { - "openmrs_entity_id": "54541", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "case_numlivingchildren_female", - "instance": { - "openmrs_entity_id": "57467", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "num_female_children_born", - "bind": { - "calculate": "sum(${sex_child_female})" - }, - "instance": { - "openmrs_entity_id": "687832", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "numlivingchildren_female", - "bind": { - "calculate": "${case_numlivingchildren_female} + ${num_female_children_born}" - }, - "instance": { - "openmrs_entity_id": "098343", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "case_numlivingchildren_male", - "instance": { - "openmrs_entity_id": "98664", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "num_male_children_born", - "bind": { - "calculate": "sum(${sex_child_male})" - }, - "instance": { - "openmrs_entity_id": "4343656", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "numlivingchildren_male", - "bind": { - "calculate": "${case_numlivingchildren_male} + ${num_male_children_born}" - }, - "instance": { - "openmrs_entity_id": "342325", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "children": [ - { - "children": [ - { - "name": "prolonged_obstructed_labor", - "label": "Prolonged / obstructed labor ದೀರ್ಘಕಾಲೀನ / ಅಡಚಣೆಯನ್ನು ತಂದೊಡ್ಡುವ ಹೆರಿಗೆ ನೋವು", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "hypertension_fits", - "label": "Severe hypertension / fits ತೀವ್ರತರವಾದ ಅಧಿಕ ರಕ್ತದೊತ್ತಡ / ಮೂರ್ಚೆರೋಗ", - "instance": { - "openmrs_code": "23213" - } - }, - { - "name": "bleeding_hemorrhage", - "label": "Bleeding / hemorrhage ರಕ್ತಸ್ರಾವ", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "fever_infection", - "label": "High fever / infection ಅಧಿಕ ಜ್ವರ / ಸೊಂಕು", - "instance": { - "openmrs_code": "2323" - } - }, - { - "name": "cause_not_identified", - "label": "Cause not identified ಕಾರಣವನ್ನು ಗುರುತಿಸಲ್ಪಟ್ಟಿಲ್ಲ", - "instance": { - "openmrs_code": "23213" - } - }, - { - "name": "others", - "label": "Others ಇತರೆ", - "instance": { - "openmrs_code": "23213" - } - } - ], - "name": "maternal_death_cause", - "label": "Cause of maternal death? ತಾಯಿಯ ಮರಣಕ್ಕೆ ಕಾರಣಗಳು?", - "instance": { - "openmrs_entity_id": "43434", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "name": "other_maternal_death_cause", - "bind": { - "relevant": "${maternal_death_cause} = 'others'" - }, - "label": "Others ಇತರೆ:", - "instance": { - "openmrs_entity_id": "43221", - "openmrs_entity": "concept" - }, - "type": "text" - } - ], - "name": "maternal_death_group", - "bind": { - "relevant": "(${woman_survived} = 'no' or ${mother_survived} = 'no')" - }, - "type": "group" - }, - { - "children": [ - { - "name": "case_w_rh_negative", - "instance": { - "openmrs_entity_id": "4324234", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "rh_injection_given", - "bind": { - "relevant": "${case_w_rh_negative} != ''" - }, - "label": "Rh injection given to woman? ಮಹಿಳೆಗೆ Rh ಚುಚ್ಚುಮದ್ದು ನೀಡಲಾಯಿತೆ?", - "instance": { - "openmrs_entity_id": "32323", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "had_delivery_complications", - "label": "Were there delivery complications? ಹೆರಿಗೆಯಲ್ಲಿ ತೊಡಕುಂಟಾಯಿತೆ?", - "instance": { - "openmrs_entity_id": "233234", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "children": [ - { - "name": "hemorrhage", - "label": "Hemorrhage ರಕ್ತಸ್ರಾವ", - "instance": { - "openmrs_code": "4123213" - } - }, - { - "name": "placenta_previa", - "label": "Placenta previa ಹಿಂದಿನ ಗರ್ಭದಲ್ಲಿ ಮಾಸು ಮುಂದಿರುವುದು", - "instance": { - "openmrs_code": "2131413" - } - }, - { - "name": "cord_prolapse", - "label": "Cord prolapse ಬಳ್ಳಿಯ ಸರಿತ", - "instance": { - "openmrs_code": "4134123" - } - }, - { - "name": "prolonged_labor", - "label": "Prolonged / obstructed labor ದೀರ್ಘಕಾಲೀನ / ಅಡಚಣೆಯನ್ನು ತಂದೊಡ್ಡುವ ಹೆರಿಗೆ ನೋವು", - "instance": { - "openmrs_code": "213124123" - } - }, - { - "name": "abnormal_presentation", - "label": "Abnormal presentation ಅಪಸಾಮಾನ್ಯ ಪ್ರಸ್ತುತಿ", - "instance": { - "openmrs_code": "14123123" - } - }, - { - "name": "perineal_tear", - "label": "Perineal tear (2, 3, or 4 degree)", - "instance": { - "openmrs_code": "23123" - } - }, - { - "name": "others", - "label": "Others ಇತರೆ", - "instance": { - "openmrs_code": "32123" - } - } - ], - "name": "complications", - "bind": { - "relevant": "${had_delivery_complications} = 'yes'" - }, - "label": "What delivery complications were there? ಯಾವ ಹೆರಿಗೆ ತೊಂದರೆಗಳು ಉಂಟಾದವು?", - "instance": { - "openmrs_entity_id": "25343", - "openmrs_entity": "concept" - }, - "type": "select all that apply" - }, - { - "name": "delivery_complications_other", - "bind": { - "relevant": "selected(${complications}, 'others')" - }, - "label": "Others ಇತರೆ:", - "instance": { - "openmrs_entity_id": "2355435", - "openmrs_entity": "concept" - }, - "type": "text" - } - ], - "name": "woman_survived_group", - "bind": { - "relevant": "(${woman_survived} = 'yes' or ${mother_survived} = 'yes')" - }, - "type": "group" - }, - { - "name": "case_is_high_risk_till_pnc_close", - "instance": { - "openmrs_entity_id": "8768767", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "case_is_high_risk_till_pnc_close_reason", - "instance": { - "openmrs_entity_id": "676576", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "case_anaemic_status", - "instance": { - "openmrs_entity_id": "76767", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "case_pih", - "instance": { - "openmrs_entity_id": "36787", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "case_pre_eclampsia", - "instance": { - "openmrs_entity_id": "376784", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "case_jaundice", - "instance": { - "openmrs_entity_id": "343434", - "openmrs_entity": "concept" - }, - "type": "hidden" - }, - { - "name": "is_high_risk1", - "bind": { - "calculate": "if(${case_is_high_risk_till_pnc_close} = 'yes' or ${case_anaemic_status} != '' or ${case_pih} != '' or ${case_pre_eclampsia} != '' or ${case_jaundice} != '', 'yes', 'no')" - }, - "instance": { - "openmrs_entity_id": "4746767", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "high_risk_reason", - "bind": { - "calculate": "concat(${case_is_high_risk_till_pnc_close_reason}, ' ', ${case_anaemic_status}, ' ', ${case_pih}, ' ', ${case_pre_eclampsia}, ' ', ${case_jaundice})" - }, - "instance": { - "openmrs_entity_id": "5656", - "openmrs_entity": "concept" - }, - "type": "calculate" - }, - { - "name": "high_risk_note_mother", - "bind": { - "relevant": "${is_high_risk1} = 'yes'" - }, - "label": "Woman is still at risk because of, ಮಹಿಳೆಯು ಈಗಲೂ ಅಪಾಯದಲ್ಲಿದ್ದಾಳೆ ಏಕೆಂದರೆ: ${high_risk_reason}", - "type": "note" - }, - { - "children": [ - { - "name": "yes", - "label": "Yes ಹೌದು", - "instance": { - "openmrs_code": "1065" - } - }, - { - "name": "no", - "label": "No ಇಲ್ಲ", - "instance": { - "openmrs_code": "1066" - } - } - ], - "name": "is_high_risk", - "bind": { - "relevant": "(${woman_survived} = 'yes' or ${mother_survived} = 'yes')", - "required": "yes" - }, - "label": "Do you want to mark woman as HR (High Risk)?\nನೀವು ಮಹಿಳೆಯನ್ನು HR (ಹೆಚ್ಚು ಅಪಾಯವಿದೆ) ಎಂದು ಗುರುತಿಸಲು ಬಯಸುವಿರಾ?", - "instance": { - "openmrs_entity_id": "424253", - "openmrs_entity": "concept" - }, - "type": "select one" - }, - { - "control": { - "bodyless": true - }, - "children": [ - { - "name": "instanceID", - "bind": { - "readonly": "true()", - "calculate": "concat('uuid:', uuid())" - }, - "type": "calculate" - } - ], - "name": "meta", - "type": "group" - } - ], - "instance": { - "encounter_type": "PNC Registration" - }, - "version": "201504300627", - "type": "survey", - "name": "PNC_Registration_EngKan", - "sms_keyword": "Delivery_Outcome_EngKan", - "title": "PNC Registration" -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_reg_form/form_definition.json b/opensrp-core/src/test/resources/form/pnc_reg_form/form_definition.json deleted file mode 100644 index c64ffdc42f..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_reg_form/form_definition.json +++ /dev/null @@ -1,315 +0,0 @@ -{ - "form_data_definition_version": "5", - "form": { - "bind_type": "mother", - "default_bind_path": "/model/instance/PNC_Registration_EngKan/", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "ecId", - "shouldLoadValue": true, - "source": "mother.eligible_couple.id" - }, - { - "name": "referenceDate", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_lmp" - }, - { - "name": "referenceDate", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_date" - }, - { - "name": "deliveryRegistrationDate", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_reg_date" - }, - { - "name": "deliveryPlace", - "bind": "/model/instance/PNC_Registration_EngKan/place_delivery" - }, - { - "name": "deliveryFacilityName", - "bind": "/model/instance/PNC_Registration_EngKan/name_delivery_facility" - }, - { - "name": "isThisOnlyDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/only_delivery_facility" - }, - { - "name": "additionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/addl_delivery_facility" - }, - { - "name": "reasonsForAdditionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/reasons_addl_delivery_facility" - }, - { - "name": "otherReasonsForAdditionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/other_reasons_addl_delivery_facility" - }, - { - "name": "isSkilledDelivery", - "bind": "/model/instance/PNC_Registration_EngKan/skilled_delivery" - }, - { - "name": "deliveryType", - "bind": "/model/instance/PNC_Registration_EngKan/type_delivery" - }, - { - "name": "deliveryOutcome", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_outcome" - }, - { - "name": "parity", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_parity", - "source": "mother.eligible_couple.parity" - }, - { - "name": "parity", - "bind": "/model/instance/PNC_Registration_EngKan/parity", - "source": "mother.eligible_couple.parity" - }, - { - "name": "numberOfLiveBirths", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_livebirths", - "source": "mother.eligible_couple.numberOfLiveBirths" - }, - { - "name": "numberOfLiveBirths", - "bind": "/model/instance/PNC_Registration_EngKan/num_livebirths", - "source": "mother.eligible_couple.numberOfLiveBirths" - }, - { - "name": "numberOfStillBirths", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_stillbirths", - "source": "mother.eligible_couple.numberOfStillBirths" - }, - { - "name": "numberOfStillBirths", - "bind": "/model/instance/PNC_Registration_EngKan/num_stillbirths", - "source": "mother.eligible_couple.numberOfStillBirths" - }, - { - "name": "causeOfStillBirth", - "bind": "/model/instance/PNC_Registration_EngKan/still_birth_group/cause_of_still_birth" - }, - { - "name": "didWomanSurvive", - "bind": "/model/instance/PNC_Registration_EngKan/still_birth_group/woman_survived" - }, - { - "name": "didMotherSurvive", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/mother_survived" - }, - { - "name": "didBreastfeedingStart", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/breastfeeding_postbirth" - }, - { - "name": "maternalDeathCause", - "bind": "/model/instance/PNC_Registration_EngKan/maternal_death_group/maternal_death_cause" - }, - { - "name": "otherMaternalDeathCause", - "bind": "/model/instance/PNC_Registration_EngKan/maternal_death_group/other_maternal_death_cause" - }, - { - "name": "isRHNegative", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/case_w_rh_negative" - }, - { - "name": "isRHInjectionGiven", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/rh_injection_given" - }, - { - "name": "hadDeliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/had_delivery_complications" - }, - { - "name": "deliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/complications" - }, - { - "name": "otherDeliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/delivery_complications_other" - }, - { - "name": "isHighRiskTillPNCClose", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_is_high_risk_till_pnc_close" - }, - { - "name": "highRiskTillPNCCloseReason", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_is_high_risk_till_pnc_close_reason" - }, - { - "name": "anemicStatus", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_anaemic_status" - }, - { - "name": "pih", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_pih" - }, - { - "name": "preEclampsia", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_pre_eclampsia" - }, - { - "name": "jaundice", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_jaundice" - }, - { - "name": "isHighRisk", - "bind": "/model/instance/PNC_Registration_EngKan/is_high_risk" - }, - { - "name": "isBirthPlanningDone", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_birth_planning" - }, - { - "name": "highRiskReason", - "bind": "/model/instance/PNC_Registration_EngKan/high_risk_reason" - }, - { - "name": "submissionDate", - "bind": "/model/instance/PNC_Registration_EngKan/today" - }, - { - "name": "type", - "value": "PNC", - "source": "mother.type" - }, - { - "name": "numberOfLivingChildren", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_livingchildren", - "source": "mother.eligible_couple.numberOfLivingChildren" - }, - { - "name": "numberOfLivingChildren", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/num_livingchildren", - "source": "mother.eligible_couple.numberOfLivingChildren" - }, - { - "name": "numberOfChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_children_born" - }, - { - "name": "numberOfFemaleChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_female_children_born" - }, - { - "name": "numberOfMaleChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_male_children_born" - }, - { - "name": "numberOfLivingFemaleChild", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_numlivingchildren_female", - "source": "mother.eligible_couple.numberOfLivingChildrenFemale" - }, - { - "name": "numberOfLivingFemaleChild", - "bind": "/model/instance/PNC_Registration_EngKan/numlivingchildren_female", - "source": "mother.eligible_couple.numberOfLivingChildrenFemale" - }, - { - "name": "numberOfLivingMaleChild", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_numlivingchildren_male", - "source": "mother.eligible_couple.numberOfLivingMaleChild" - }, - { - "name": "numberOfLivingMaleChild", - "bind": "/model/instance/PNC_Registration_EngKan/numlivingchildren_male", - "source": "mother.eligible_couple.numberOfLivingMaleChild" - }, - { - "name": "youngestChildDOB", - "bind": "/model/instance/PNC_Registration_EngKan/youngestchild_date_of_birth", - "source": "mother.eligible_couple.youngestChildDOB" - }, - { - "name": "youngestChildAge", - "bind": "/model/instance/PNC_Registration_EngKan/youngestchild_age", - "source": "mother.eligible_couple.youngestChildAge" - } - ], - "sub_forms": [ - { - "name": "child_registration", - "bind_type": "child", - "default_bind_path": "/model/instance/PNC_Registration_EngKan/live_birth_group/child", - "fields": [ - { - "name": "id", - "shouldLoadValue": true - }, - { - "name": "gender", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/sex_child" - }, - { - "name": "weight", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/birthweight" - }, - { - "name": "bloodGroup", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/child_blood_group" - }, - { - "name": "immunizationsGiven", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/immunizations_atbirth" - }, - { - "name": "hepB", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/case_hepb" - }, - { - "name": "isHepBProphylaxisProvided", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/hepb_prophylaxis_provided" - }, - { - "name": "isChildHighRisk1", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/is_child_high_risk1" - }, - { - "name": "childHighRiskReasons", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/child_high_risk_reasons" - }, - { - "name": "isChildHighRisk", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/is_child_high_risk" - }, - { - "name": "lbw", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/lbw" - }, - { - "name": "vlbw", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/vlbw" - }, - { - "name": "premature", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/premature" - } - ] - } - ] - } -} diff --git a/opensrp-core/src/test/resources/form/pnc_reg_form/form_submission.json b/opensrp-core/src/test/resources/form/pnc_reg_form/form_submission.json deleted file mode 100644 index 5ec548d617..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_reg_form/form_submission.json +++ /dev/null @@ -1,459 +0,0 @@ -{ - "anmId": "admin", - "clientVersion": "1426830449320", - "entityId": "b716d938-1aea-40ae-a081-9ddddddcccc9", - "formDataDefinitionVersion": "5", - "formName": "pnc_reg_form", - "formInstance": { - "form_data_definition_version": "5", - "form": { - "bind_type": "mother", - "default_bind_path": "/model/instance/PNC_Registration_EngKan/", - "fields": [ - { - "name": "id", - "shouldLoadValue": true, - "source": "mother.id", - "value": "7efb9e31-0e26-496e-bd16-e09a3b0d1a31" - }, - { - "name": "ecId", - "shouldLoadValue": true, - "source": "mother.eligible_couple.id", - "value": "aa786612-e7a8-4fea-b733-3de4d898f4d6" - }, - { - "name": "referenceDate", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_lmp", - "source": "mother.referenceDate", - "value": "2014-02-20" - }, - { - "name": "referenceDate", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_date", - "source": "mother.referenceDate", - "value": "2015-02-20" - }, - { - "name": "deliveryRegistrationDate", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_reg_date", - "source": "mother.deliveryRegistrationDate", - "value": "2015-03-20" - }, - { - "name": "deliveryPlace", - "bind": "/model/instance/PNC_Registration_EngKan/place_delivery", - "source": "mother.deliveryPlace", - "value": "home" - }, - { - "name": "deliveryFacilityName", - "bind": "/model/instance/PNC_Registration_EngKan/name_delivery_facility", - "source": "mother.deliveryFacilityName" - }, - { - "name": "isThisOnlyDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/only_delivery_facility", - "source": "mother.isThisOnlyDeliveryFacility", - "value": "yes" - }, - { - "name": "additionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/addl_delivery_facility", - "source": "mother.additionalDeliveryFacility" - }, - { - "name": "reasonsForAdditionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/reasons_addl_delivery_facility", - "source": "mother.reasonsForAdditionalDeliveryFacility" - }, - { - "name": "otherReasonsForAdditionalDeliveryFacility", - "bind": "/model/instance/PNC_Registration_EngKan/other_reasons_addl_delivery_facility", - "source": "mother.otherReasonsForAdditionalDeliveryFacility" - }, - { - "name": "isSkilledDelivery", - "bind": "/model/instance/PNC_Registration_EngKan/skilled_delivery", - "source": "mother.isSkilledDelivery", - "value": "yes" - }, - { - "name": "deliveryType", - "bind": "/model/instance/PNC_Registration_EngKan/type_delivery", - "source": "mother.deliveryType", - "value": "normal" - }, - { - "name": "deliveryOutcome", - "bind": "/model/instance/PNC_Registration_EngKan/delivery_outcome", - "source": "mother.deliveryOutcome", - "value": "live_birth" - }, - { - "name": "parity", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_parity", - "source": "mother.eligible_couple.parity", - "value": "0" - }, - { - "name": "parity", - "bind": "/model/instance/PNC_Registration_EngKan/parity", - "source": "mother.eligible_couple.parity", - "value": "1" - }, - { - "name": "numberOfLiveBirths", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_livebirths", - "source": "mother.eligible_couple.numberOfLiveBirths", - "value": "0" - }, - { - "name": "numberOfLiveBirths", - "bind": "/model/instance/PNC_Registration_EngKan/num_livebirths", - "source": "mother.eligible_couple.numberOfLiveBirths", - "value": "1" - }, - { - "name": "numberOfStillBirths", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_stillbirths", - "source": "mother.eligible_couple.numberOfStillBirths", - "value": "0" - }, - { - "name": "numberOfStillBirths", - "bind": "/model/instance/PNC_Registration_EngKan/num_stillbirths", - "source": "mother.eligible_couple.numberOfStillBirths" - }, - { - "name": "causeOfStillBirth", - "bind": "/model/instance/PNC_Registration_EngKan/still_birth_group/cause_of_still_birth", - "source": "mother.causeOfStillBirth" - }, - { - "name": "didWomanSurvive", - "bind": "/model/instance/PNC_Registration_EngKan/still_birth_group/woman_survived", - "source": "mother.didWomanSurvive" - }, - { - "name": "didMotherSurvive", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/mother_survived", - "source": "mother.didMotherSurvive", - "value": "yes" - }, - { - "name": "didBreastfeedingStart", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/breastfeeding_postbirth", - "source": "mother.didBreastfeedingStart", - "value": "yes" - }, - { - "name": "maternalDeathCause", - "bind": "/model/instance/PNC_Registration_EngKan/maternal_death_group/maternal_death_cause", - "source": "mother.maternalDeathCause" - }, - { - "name": "otherMaternalDeathCause", - "bind": "/model/instance/PNC_Registration_EngKan/maternal_death_group/other_maternal_death_cause", - "source": "mother.otherMaternalDeathCause" - }, - { - "name": "isRHNegative", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/case_w_rh_negative", - "source": "mother.isRHNegative" - }, - { - "name": "isRHInjectionGiven", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/rh_injection_given", - "source": "mother.isRHInjectionGiven" - }, - { - "name": "hadDeliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/had_delivery_complications", - "source": "mother.hadDeliveryComplications", - "value": "yes" - }, - { - "name": "deliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/complications", - "source": "mother.deliveryComplications", - "value": "hemorrhage placenta_previa" - }, - { - "name": "otherDeliveryComplications", - "bind": "/model/instance/PNC_Registration_EngKan/woman_survived_group/delivery_complications_other", - "source": "mother.otherDeliveryComplications" - }, - { - "name": "isHighRiskTillPNCClose", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_is_high_risk_till_pnc_close", - "source": "mother.isHighRiskTillPNCClose", - "value": "no" - }, - { - "name": "highRiskTillPNCCloseReason", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_is_high_risk_till_pnc_close_reason", - "source": "mother.highRiskTillPNCCloseReason" - }, - { - "name": "anemicStatus", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_anaemic_status", - "source": "mother.anemicStatus" - }, - { - "name": "pih", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_pih", - "source": "mother.pih" - }, - { - "name": "preEclampsia", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_pre_eclampsia", - "source": "mother.preEclampsia" - }, - { - "name": "jaundice", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_jaundice", - "source": "mother.jaundice" - }, - { - "name": "isHighRisk", - "bind": "/model/instance/PNC_Registration_EngKan/is_high_risk", - "source": "mother.isHighRisk", - "value": "yes" - }, - { - "name": "isBirthPlanningDone", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_birth_planning", - "source": "mother.isBirthPlanningDone" - }, - { - "name": "highRiskReason", - "bind": "/model/instance/PNC_Registration_EngKan/high_risk_reason", - "source": "mother.highRiskReason" - }, - { - "name": "submissionDate", - "bind": "/model/instance/PNC_Registration_EngKan/today", - "source": "mother.submissionDate", - "value": "2015-03-20" - }, - { - "name": "type", - "value": "PNC", - "source": "mother.type" - }, - { - "name": "numberOfLivingChildren", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_num_livingchildren", - "source": "mother.eligible_couple.numberOfLivingChildren", - "value": "0" - }, - { - "name": "numberOfLivingChildren", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/num_livingchildren", - "source": "mother.eligible_couple.numberOfLivingChildren", - "value": "3" - }, - { - "name": "numberOfChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_children_born", - "source": "mother.numberOfChildrenBorn", - "value": "3" - }, - { - "name": "numberOfFemaleChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_female_children_born", - "source": "mother.numberOfFemaleChildrenBorn", - "value": "1" - }, - { - "name": "numberOfMaleChildrenBorn", - "bind": "/model/instance/PNC_Registration_EngKan/num_male_children_born", - "source": "mother.numberOfMaleChildrenBorn", - "value": "2" - }, - { - "name": "numberOfLivingFemaleChild", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_numlivingchildren_female", - "source": "mother.eligible_couple.numberOfLivingChildrenFemale" - }, - { - "name": "numberOfLivingFemaleChild", - "bind": "/model/instance/PNC_Registration_EngKan/numlivingchildren_female", - "source": "mother.eligible_couple.numberOfLivingChildrenFemale", - "value": "NaN" - }, - { - "name": "numberOfLivingMaleChild", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/case_numlivingchildren_male", - "source": "mother.eligible_couple.numberOfLivingMaleChild" - }, - { - "name": "numberOfLivingMaleChild", - "bind": "/model/instance/PNC_Registration_EngKan/numlivingchildren_male", - "source": "mother.eligible_couple.numberOfLivingMaleChild", - "value": "NaN" - }, - { - "name": "youngestChildDOB", - "bind": "/model/instance/PNC_Registration_EngKan/youngestchild_date_of_birth", - "source": "mother.eligible_couple.youngestChildDOB", - "value": "2015-02-20" - }, - { - "name": "youngestChildAge", - "bind": "/model/instance/PNC_Registration_EngKan/youngestchild_age", - "source": "mother.eligible_couple.youngestChildAge", - "value": "0" - } - ], - "sub_forms": [ - { - "name": "child_registration", - "bind_type": "child", - "default_bind_path": "/model/instance/PNC_Registration_EngKan/live_birth_group/child", - "fields": [ - { - "name": "id", - "shouldLoadValue": true, - "source": "child.id" - }, - { - "name": "gender", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/sex_child", - "source": "child.gender" - }, - { - "name": "birthdate", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/birthdate", - "source": "child.birthdate" - }, - { - - "name": "weight", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/birthweight", - "source": "child.weight" - }, - { - "name": "bloodGroup", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/child_blood_group", - "source": "child.bloodGroup" - }, - { - "name": "immunizationsGiven", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/immunizations_atbirth", - "source": "child.immunizationsGiven" - }, - { - "name": "hepB", - "shouldLoadValue": true, - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/case_hepb", - "source": "child.hepB" - }, - { - "name": "isHepBProphylaxisProvided", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/hepb_prophylaxis_provided", - "source": "child.isHepBProphylaxisProvided" - }, - { - "name": "isChildHighRisk1", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/is_child_high_risk1", - "source": "child.isChildHighRisk1" - }, - { - "name": "childHighRiskReasons", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/child_high_risk_reasons", - "source": "child.childHighRiskReasons" - }, - { - "name": "isChildHighRisk", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/is_child_high_risk", - "source": "child.isChildHighRisk" - }, - { - "name": "lbw", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/lbw", - "source": "child.lbw" - }, - { - "name": "vlbw", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/vlbw", - "source": "child.vlbw" - }, - { - "name": "premature", - "bind": "/model/instance/PNC_Registration_EngKan/live_birth_group/child/premature", - "source": "child.premature" - } - ], - "instances": [ - { - "gender": "male", - "birthdate":"2015-03-05", - "weight": "2", - "bloodGroup": "a_negative", - "immunizationsGiven": "bcg", - "hepB": "", - "isHepBProphylaxisProvided": "", - "lbw": "Low_Birth_Weight", - "vlbw": "", - "premature": "", - "isChildHighRisk1": "yes", - "childHighRiskReasons": " Low_Birth_Weight ", - "isChildHighRisk": "yes", - "id": "e9a91c61-0d33-42d3-bf9b-560b4d08c74f" - }, - { - "gender": "male", - "birthdate":"2015-04-05", - "weight": "", - "bloodGroup": "a_negative", - "immunizationsGiven": "bcg", - "hepB": "", - "isHepBProphylaxisProvided": "", - "lbw": "", - "vlbw": "", - "premature": "", - "isChildHighRisk1": "no", - "childHighRiskReasons": "", - "isChildHighRisk": "yes", - "id": "c7305d21-0b90-4c15-a88f-b08338d3aed9" - }, - { - "gender": "female", - "birthdate":"2015-05-05", - "weight": "", - "bloodGroup": "a_negative", - "immunizationsGiven": "bcg", - "hepB": "", - "isHepBProphylaxisProvided": "", - "lbw": "", - "vlbw": "", - "premature": "", - "isChildHighRisk1": "no", - "childHighRiskReasons": "", - "isChildHighRisk": "no", - "id": "6c2d772b-7d6a-4a05-a83d-5168c183ef42" - } - ] - } - ] - } - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/pnc_reg_form/model.xml b/opensrp-core/src/test/resources/form/pnc_reg_form/model.xml deleted file mode 100644 index 21130a05e8..0000000000 --- a/opensrp-core/src/test/resources/form/pnc_reg_form/model.xml +++ /dev/null @@ -1,91 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/vaccine_stock_position/form.json b/opensrp-core/src/test/resources/form/vaccine_stock_position/form.json deleted file mode 100644 index 3405ad7da9..0000000000 --- a/opensrp-core/src/test/resources/form/vaccine_stock_position/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Vaccine_Stock_Position","title":"ویکسین اسٹاک پوزیشن - Vaccine Stock Position","sms_keyword":"vaccine_stock_position","default_language":"English","instance":{"encounter_type":"Vaccine stock position"},"version":"201604080502","id_string":"vaccine_stock_position","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"type":"hidden","name":"provider_location_name"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}","Roman Urdu":"Shehr: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"bind":{"calculate":"format-date(${today}, '%e-%n-%Y')"},"type":"calculate","name":"date_formatted"},{"type":"note","name":"vaccinator_name","label":{"Urdu":"${provider_id}","English":"${provider_id}","Roman Urdu":"${provider_id}"}},{"type":"note","name":"center_name","label":{"Urdu":"سینٹر کا نام: {provider_location_name}$","English":"Center Name: ${provider_location_name}","Roman Urdu":"Center ka naam: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"type":"date","name":"date","label":{"Urdu":"تاریخ","English":"Date","Roman Urdu":"Tareekh"}},{"name":"report","bind":{"required":"yes"},"label":{"Urdu":"رپورٹ کی قسم","English":"Report Type","Roman Urdu":"Report ki kism"},"instance":{"openmrs_entity_id":"163331AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"160862AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"daily","label":{"Urdu":"روزانہ کی رپورٹ","Roman Urdu":"Rozaana ki report","English":"Daily"}},{"instance":{"openmrs_code":"1098AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"monthly","label":{"Urdu":"ماہانہ رپورٹ","Roman Urdu":"Mahaana report","English":"Monthly"}}]},{"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"type":"integer","instance":{"openmrs_entity_id":"163174AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"Target_assigned_for_vaccination_at_each_month","label":{"Urdu":"ویکسین لگانے کا ماہانہ ہدف","English":"Monthly Target","Roman Urdu":"Vaccine laganay ka mahaana hadf"}},{"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"type":"integer","instance":{"openmrs_entity_id":"163175AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"Target_assigned_for_vaccination_for_the_year","label":{"Urdu":"ویکسین لگانے کا سالانہ ہدف","English":"Yearly Target","Roman Urdu":"Vaccine laganay ka salaana hadf"}},{"name":"bcg_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ بی سی جی کی تعداد","Roman Urdu":"Maujooda BCG ki taadaad","English":"BCG balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"bcg_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی بی سی جی کی تعداد","Roman Urdu":"Mausool honay wali BCG ki taadaad","English":"BCG received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"bcg_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی بی سی جی کی تعداد","Roman Urdu":"Zaya honay wali BCG ki taadaad","English":"BCG wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"opv_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ او پی وی کی تعداد","Roman Urdu":"Maujooda OPV ki taadaad","English":"OPV balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"opv_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی او پی وی کی تعداد","Roman Urdu":"Mausool honay wali OPV ki taadaad","English":"OPV received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"opv_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی او پی وی کی تعداد","Roman Urdu":"Zaya honay wali OPV ki taadaad","English":"OPV wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"ipv_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ آئی پی وی کی تعداد","Roman Urdu":"Maujooda IPV ki taadaad","English":"IPV balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"ipv_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی آئی پی وی کی تعداد","Roman Urdu":"Mausool honay wali IPV ki taadaad","English":"IPV received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"ipv_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی آئی پی وی کی تعداد","Roman Urdu":"Zaya honay wali IPV ki taadaad","English":"IPV wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1422AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"pcv_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ پی سی وی کی تعداد","Roman Urdu":"Maujooda PCV ki taadaad","English":"PCV balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"pcv_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی پی سی وی کی تعداد","Roman Urdu":"Mausool honay wali PCV ki taadaad","English":"PCV received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"pcv_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی پی سی وی کی تعداد","Roman Urdu":"Zaya honay wali PCV ki taadaad","English":"PCV wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"penta_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ پینٹاویلنٹ کی تعداد","Roman Urdu":"Maujooda Pentavalent ki taadaad","English":"Penta balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"penta_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی پینٹاویلنٹ کی تعداد","Roman Urdu":"Mausool honay wali Pentavalent ki taadaad","English":"Penta received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"penta_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی پینٹاویلنٹ کی تعداد","Roman Urdu":"Zaya honay wali Pentavalent ki taadaad","English":"Penta wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162339AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"measles_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ خسرے کے ٹیکوں کی تعداد","Roman Urdu":"Maujooda khasray ke teekon ki taadaad","English":"Measles balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"measles_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والے خسرے کے ٹیکوں کی تعداد","Roman Urdu":"Mausool honay walay khasray ke teekay ki taadaad","English":"Measles received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"measles_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والے خسرے کے ٹیکوں کی تعداد","Roman Urdu":"Zaya honay walay khasray ke teekay ki taadaad","English":"Measles wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"79409AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"tt_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ ٹی ٹی کی تعداد","Roman Urdu":"Maujooda TT ki taadaad","English":"TT balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"tt_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی ٹی ٹی کی تعداد","Roman Urdu":"Mausool honay wali TT ki taadaad","English":"TT received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"tt_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی ٹی ٹی کی تعداد","Roman Urdu":"Zaya honay wali TT ki taadaad","English":"TT wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"dilutants_balance_in_hand","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"انجیکشن کے لئے موجودہ جراثیم سے پاک پانی کی شیشیوں کی تعداد","Roman Urdu":"Injection ke liye maujooda jaraseem se paak paani ki sheeshion ki taadaad","English":"Dilutants balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163287AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"dilutants_received","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"انجیکشن کے لئے موصول ہونے والا جراثیم سے پاک پانی کی شیشیوں کی تعداد","Roman Urdu":"Injection ke liye mausool honay wala jaraseem se paak paani ki sheeshion ki taadaad","English":"Dilutants received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163287AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"dilutants_wasted","hint":{"Urdu":"شیشیوں کی تعداد","Roman Urdu":"Sheeshion ki taadaad","English":"Number of vials"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"انجیکشن کے لئے ضائع ہونے والا جراثیم سے پاک پانی کی شیشیوں کی تعداد","Roman Urdu":"Injection ke liye zaya honay wala jaraseem se paak paani ki sheeshion ki taadaad","English":"Dilutants wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163287AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"syringes_balance_in_hand","hint":{"Urdu":"سرنج کی تعداد","Roman Urdu":"Syringe ki taadaad","English":"Number of syringes"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ سرنج کی تعداد","Roman Urdu":"Maujooda siranj ki taadaad","English":"Syringes balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"syringes_received","hint":{"Urdu":"سرنج کی تعداد","Roman Urdu":"Syringe ki taadaad","English":"Number of syringes"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والی سرنج کی تعداد","Roman Urdu":"Mausool honay wali siranj ki taadaad","English":"Syringes received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"syringes_wasted","hint":{"Urdu":"سرنج کی تعداد","Roman Urdu":"Syringe ki taadaad","English":"Number of syringes"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والی سرنج کی تعداد","Roman Urdu":"Zaya honay wali siranj taadaad","English":"Syringes wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"162377AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"safety_boxes_balance_in_hand","hint":{"Urdu":"کنٹینر کی تعداد","Roman Urdu":"Container ki taadaad","English":"Number of containers"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موجودہ کنٹینر کی تعداد [جو تیز اوزار کو ضائع کرنے کے لیے استعمال ہوتے ہیں]","Roman Urdu":"Maujooda container ki taadaad [jo taiz auzaar ko zaya karne ke liye istamaal hotay hain]","English":"Sharp disposal container balance in hand"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163173AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163285AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"safety_boxes_received","hint":{"Urdu":"کنٹینر کی تعداد","Roman Urdu":"Container ki taadaad","English":"Number of containers"},"bind":{"relevant":"selected(${report}, 'monthly')","required":"yes"},"label":{"Urdu":"موصول ہونے والے کنٹینر کی تعداد [جو تیز اوزار کو ضائع کرنے کے لیے استعمال ہوتے ہیں]","Roman Urdu":"Mausool honay walay container ki taadaad [jo taiz auzaar ko zaya karne ke liye istamaal hotay hain]","English":"Sharp disposal container received"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163170AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163285AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"name":"safety_boxes_wasted","hint":{"Urdu":"کنٹینر کی تعداد","Roman Urdu":"Container ki taadaad","English":"Number of containers"},"bind":{"relevant":"selected(${report}, 'daily')","required":"yes"},"label":{"Urdu":"ضائع ہونے والے کنٹینر کی تعداد [جو تیز اوزار کو ضائع کرنے کے لیے استعمال ہوتے ہیں]","Roman Urdu":"Zaya honay walay container ki taadaad [jo taiz auzaar ko zaya karne ke liye istamaal hotay hain]","English":"Sharp disposal container wasted"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"163172AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163285AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"integer"},{"bind":{"jr:constraintMsg":{"Urdu":"یہ تعداد موصول ہونے والی کل تعداد سے کم یا برابر ہونی چاہئیے","Roman Urdu":"Ye taadaad mausool honay wali kul taadaad se kam ya baraber honi chahiye","English":"This quantity should be less than or equal to the total quantity received"},"calculate":"${bcg_wasted}+${opv_wasted}+${ipv_wasted}+${pcv_wasted}+${penta_wasted}+${measles_wasted}+${tt_wasted}+${dilutants_wasted}+${syringes_wasted}+${safety_boxes_wasted}","constraint":".<=${total_received}"},"type":"calculate","name":"total_wasted","label":{"Urdu":"ضائع ہونے والی اشیاء کی مکمل تعداد","Roman Urdu":"Zaya honay wali ashia ki mukammal taadaad","English":"Total wasted"}},{"bind":{"calculate":"${bcg_received}+${opv_received}+${ipv_received}+${pcv_received}+${penta_received}+${measles_received}+${tt_received}+${dilutants_received}+${syringes_received}+${safety_boxes_received}"},"type":"calculate","name":"total_received","label":{"Urdu":"موصول ہونے والی اشیاء کی مکمل تعداد","Roman Urdu":"Mausool honay wali ashia ki mukammal taadaad","English":"Total received"}},{"bind":{"calculate":"${bcg_balance_in_hand}+${opv_balance_in_hand}+${ipv_balance_in_hand}+${pcv_balance_in_hand}+${penta_balance_in_hand}+${measles_balance_in_hand}+${tt_balance_in_hand}+${dilutants_balance_in_hand}+${syringes_balance_in_hand}+${safety_boxes_balance_in_hand}"},"type":"calculate","name":"total_balanceInHand","label":{"Urdu":"موجودہ اشیاء کی مکمل تعداد","Roman Urdu":"Maujooda ashia ki mukammal taadaad","English":"Total balance in hand"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/vaccine_stock_position/form.xml b/opensrp-core/src/test/resources/form/vaccine_stock_position/form.xml deleted file mode 100644 index 713d5efd97..0000000000 --- a/opensrp-core/src/test/resources/form/vaccine_stock_position/form.xml +++ /dev/null @@ -1,381 +0,0 @@ -
- - -

ویکسین اسٹاک پوزیشن - Vaccine Stock Position

-
-
- - رپورٹ کی قسم - Report Type - Report ki kism - * -
- - -
-
-
- -
diff --git a/opensrp-core/src/test/resources/form/vaccine_stock_position/form_definition.json b/opensrp-core/src/test/resources/form/vaccine_stock_position/form_definition.json deleted file mode 100644 index f6b50a149e..0000000000 --- a/opensrp-core/src/test/resources/form/vaccine_stock_position/form_definition.json +++ /dev/null @@ -1,186 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "stock", - "default_bind_path" : "/model/instance/Vaccine_Stock_Position/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_province", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Vaccine_Stock_Position/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Vaccine_Stock_Position/start" - }, { - "name" : "end", - "bind" : "/model/instance/Vaccine_Stock_Position/end" - }, { - "name" : "today", - "bind" : "/model/instance/Vaccine_Stock_Position/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Vaccine_Stock_Position/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Vaccine_Stock_Position/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Vaccine_Stock_Position/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Vaccine_Stock_Position/phonenumber" - }, { - "name" : "date_formatted", - "bind" : "/model/instance/Vaccine_Stock_Position/date_formatted" - }, { - "name" : "vaccinator_name", - "bind" : "/model/instance/Vaccine_Stock_Position/vaccinator_name" - }, { - "name" : "center_name", - "bind" : "/model/instance/Vaccine_Stock_Position/center_name" - }, { - "name" : "date", - "bind" : "/model/instance/Vaccine_Stock_Position/date" - }, { - "name" : "report", - "bind" : "/model/instance/Vaccine_Stock_Position/report" - }, { - "name" : "Target_assigned_for_vaccination_at_each_month", - "bind" : "/model/instance/Vaccine_Stock_Position/Target_assigned_for_vaccination_at_each_month" - }, { - "name" : "Target_assigned_for_vaccination_for_the_year", - "bind" : "/model/instance/Vaccine_Stock_Position/Target_assigned_for_vaccination_for_the_year" - }, { - "name" : "bcg_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/bcg_balance_in_hand" - }, { - "name" : "bcg_received", - "bind" : "/model/instance/Vaccine_Stock_Position/bcg_received" - }, { - "name" : "bcg_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/bcg_wasted" - }, { - "name" : "opv_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/opv_balance_in_hand" - }, { - "name" : "opv_received", - "bind" : "/model/instance/Vaccine_Stock_Position/opv_received" - }, { - "name" : "opv_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/opv_wasted" - }, { - "name" : "ipv_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/ipv_balance_in_hand" - }, { - "name" : "ipv_received", - "bind" : "/model/instance/Vaccine_Stock_Position/ipv_received" - }, { - "name" : "ipv_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/ipv_wasted" - }, { - "name" : "pcv_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/pcv_balance_in_hand" - }, { - "name" : "pcv_received", - "bind" : "/model/instance/Vaccine_Stock_Position/pcv_received" - }, { - "name" : "pcv_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/pcv_wasted" - }, { - "name" : "penta_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/penta_balance_in_hand" - }, { - "name" : "penta_received", - "bind" : "/model/instance/Vaccine_Stock_Position/penta_received" - }, { - "name" : "penta_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/penta_wasted" - }, { - "name" : "measles_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/measles_balance_in_hand" - }, { - "name" : "measles_received", - "bind" : "/model/instance/Vaccine_Stock_Position/measles_received" - }, { - "name" : "measles_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/measles_wasted" - }, { - "name" : "tt_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/tt_balance_in_hand" - }, { - "name" : "tt_received", - "bind" : "/model/instance/Vaccine_Stock_Position/tt_received" - }, { - "name" : "tt_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/tt_wasted" - }, { - "name" : "dilutants_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/dilutants_balance_in_hand" - }, { - "name" : "dilutants_received", - "bind" : "/model/instance/Vaccine_Stock_Position/dilutants_received" - }, { - "name" : "dilutants_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/dilutants_wasted" - }, { - "name" : "syringes_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/syringes_balance_in_hand" - }, { - "name" : "syringes_received", - "bind" : "/model/instance/Vaccine_Stock_Position/syringes_received" - }, { - "name" : "syringes_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/syringes_wasted" - }, { - "name" : "safety_boxes_balance_in_hand", - "bind" : "/model/instance/Vaccine_Stock_Position/safety_boxes_balance_in_hand" - }, { - "name" : "safety_boxes_received", - "bind" : "/model/instance/Vaccine_Stock_Position/safety_boxes_received" - }, { - "name" : "safety_boxes_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/safety_boxes_wasted" - }, { - "name" : "total_wasted", - "bind" : "/model/instance/Vaccine_Stock_Position/total_wasted" - }, { - "name" : "total_received", - "bind" : "/model/instance/Vaccine_Stock_Position/total_received" - }, { - "name" : "total_balanceInHand", - "bind" : "/model/instance/Vaccine_Stock_Position/total_balanceInHand" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Vaccine_Stock_Position/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/vaccine_stock_position/model.xml b/opensrp-core/src/test/resources/form/vaccine_stock_position/model.xml deleted file mode 100644 index faec7c2e5c..0000000000 --- a/opensrp-core/src/test/resources/form/vaccine_stock_position/model.xml +++ /dev/null @@ -1,68 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/opensrp-core/src/test/resources/form/woman_enrollment/form.json b/opensrp-core/src/test/resources/form/woman_enrollment/form.json deleted file mode 100644 index fe3f23a6a2..0000000000 --- a/opensrp-core/src/test/resources/form/woman_enrollment/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Woman_TT_Enrollment_Form","title":"خواتین انرولمنٹ فارم برائے ٹی ٹی ٹیکاجات - Woman TT Enrollment Form","sms_keyword":"woman_tt_enrollement_form","default_language":"English","choices":{"provinces":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}],"ucs":[{"province":"sindh","city":"karachi","town":"korangi","name":"bilal_colony","label":{"Urdu":"بلال کالونی","Roman Urdu":"Bilal Colony","English":"Bilal Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"nasir_colony","label":{"Urdu":"ناصر کالونی","Roman Urdu":"Nasir Colony","English":"Nasir Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"chakra_goth","label":{"Urdu":"چکرا گوٹھ","Roman Urdu":"Chakra Goth","English":"Chakra Goth"}},{"province":"sindh","city":"karachi","town":"korangi","name":"mustafa_taj_colony","label":{"Urdu":"مصطفی تاج کالونی","Roman Urdu":"Mustafa Taj Colony","English":"Mustafa Taj Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hundred_quarters","label":{"Urdu":"ہنڈریڈ کوارٹر","Roman Urdu":"Hundred Quarters","English":"Hundred Quarters"}},{"province":"sindh","city":"karachi","town":"korangi","name":"gulzar_colony","label":{"Urdu":"گلزار کالونی","Roman Urdu":"Gulzar Colony","English":"Gulzar Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"korangi_sector_33","label":{"Urdu":"کورنگی سیکٹر 33","Roman Urdu":"Korangi Sector 33","English":"Korangi Sector 33"}},{"province":"sindh","city":"karachi","town":"korangi","name":"zaman_town","label":{"Urdu":"زمان ٹاوَن","Roman Urdu":"Zaman Town","English":"Zaman Town"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hasrat_mohani_colony","label":{"Urdu":"حسرت موہانی کالونی","Roman Urdu":"Hasrat Mohani Colony","English":"Hasrat Mohani Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"gulshan_e_ghazi","label":{"Urdu":"گلشن غازی","Roman Urdu":"Gulshan-e-Ghazi","English":"Gulshan-e-Ghazi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"ittehad_town","label":{"Urdu":"اتحاد ٹاوَن","Roman Urdu":"Ittehad Town","English":"Ittehad Town"}},{"province":"sindh","city":"karachi","town":"baldia","name":"islam_nagar","label":{"Urdu":"اسلام نگر","Roman Urdu":"Islam Nagar","English":"Islam Nagar"}},{"province":"sindh","city":"karachi","town":"baldia","name":"nai_abadi","label":{"Urdu":"نئی آبادی","Roman Urdu":"Nai Abadi","English":"Nai Abadi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"saeedabad","label":{"Urdu":"سعید آباد","Roman Urdu":"Saeedabad","English":"Saeedabad"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muslim_mujahid_colony","label":{"Urdu":"مسلم مجاہد کالونی","Roman Urdu":"Muslim Mujahid Colony","English":"Muslim Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muhajir_camp","label":{"Urdu":"مہاجر کیمپ","Roman Urdu":"Muhajir Camp","English":"Muhajir Camp"}},{"province":"sindh","city":"karachi","town":"baldia","name":"rasheedabad","label":{"Urdu":"رشید آباد","Roman Urdu":"Rasheedabad","English":"Rasheedabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"ibrahim_hyderi","label":{"Urdu":"ابراہیم حیدری","Roman Urdu":"Ibrahim Hyderi","English":"Ibrahim Hyderi"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"rehri","label":{"Urdu":"رہڑی","Roman Urdu":"Rehri","English":"Rehri"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"cattle_colony","label":{"Urdu":"کیٹل کالونی","Roman Urdu":"Cattle Colony","English":"Cattle Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"qaidabad","label":{"Urdu":"قائدآباد","Roman Urdu":"Qaidabad","English":"Qaidabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"landhi_colony","label":{"Urdu":"لانڈھی کالونی","Roman Urdu":"Landhi Colony","English":"Landhi Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gulshan_e_hadeed","label":{"Urdu":"گلشن حدید","Roman Urdu":"Gulshan-e-Hadeed","English":"Gulshan-e-Hadeed"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gaghar","label":{"Urdu":"گگر","Roman Urdu":"Gaghar","English":"Gaghar"}},{"province":"sindh","city":"karachi","town":"gadap","name":"murad_memon_goth","label":{"Urdu":"مراد میمن گوٹھ","Roman Urdu":"Murad Memon Goth","English":"Murad Memon Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"darsano_chana","label":{"Urdu":"درشانو شنو","Roman Urdu":"Darsano Chana","English":"Darsano Chana"}},{"province":"sindh","city":"karachi","town":"gadap","name":"gujro","label":{"Urdu":"گجرو","Roman Urdu":"Gujro","English":"Gujro"}},{"province":"sindh","city":"karachi","town":"gadap","name":"songal","label":{"Urdu":"سنگل","Roman Urdu":"Songal","English":"Songal"}},{"province":"sindh","city":"karachi","town":"gadap","name":"maymarabad","label":{"Urdu":"معمار آباد","Roman Urdu":"Maymarabad","English":"Maymarabad"}},{"province":"sindh","city":"karachi","town":"gadap","name":"yousuf_goth","label":{"Urdu":"یوسف گوٹھ","Roman Urdu":"Yousuf Goth","English":"Yousuf Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"manghopir","label":{"Urdu":"منگھوپیر","Roman Urdu":"Manghopir","English":"Manghopir"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"azizabad","label":{"Urdu":"عزیز آباد","Roman Urdu":"Azizabad","English":"Azizabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"karimabad","label":{"Urdu":"کریم آباد","Roman Urdu":"Karimabad","English":"Karimabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"aisha_manzil","label":{"Urdu":"عائشہ منزل","Roman Urdu":"Aisha Manzil","English":"Aisha Manzil"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"ancholi","label":{"Urdu":"انچولی","Roman Urdu":"Ancholi","English":"Ancholi"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"naseerabad","label":{"Urdu":"نصیرآباد","Roman Urdu":"Naseerabad","English":"Naseerabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"yaseenabad","label":{"Urdu":"یاسین آباد","Roman Urdu":"Yaseenabad","English":"Yaseenabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"water_pump","label":{"Urdu":"واٹرپمپ","Roman Urdu":"Water Pump","English":"Water Pump"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"shafiq_mill_colony","label":{"Urdu":"شفیق مل کالونی","Roman Urdu":"Shafiq Mill Colony","English":"Shafiq Mill Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"delhi_mercantile_society","label":{"Urdu":"دہلی مرچنٹائل سوسائٹی","Roman Urdu":"Delhi Mercantile Society","English":"Delhi Mercantile Society"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"civic_centre","label":{"Urdu":"سوک سینٹر","Roman Urdu":"Civic Centre","English":"Civic Centre"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pir_ilahi_buksh_colony","label":{"Urdu":"پیر الہی بخش کالونی","Roman Urdu":"Pir Ilahi Buksh Colony","English":"Pir Ilahi Buksh Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"essa_nagri","label":{"Urdu":"عیسی نگری","Roman Urdu":"Essa Nagri","English":"Essa Nagri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal","label":{"Urdu":"گلشن اقبال","Roman Urdu":"Gulshan-e-Iqbal","English":"Gulshan-e-Iqbal"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gillani_railway_station","label":{"Urdu":"گیلانی ریلوے اسٹیشن","Roman Urdu":"Gillani Railway Station","English":"Gillani Railway Station"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"shanti_nagar","label":{"Urdu":"شانتی نگر","Roman Urdu":"Shanti Nagar","English":"Shanti Nagar"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"jamali_colony","label":{"Urdu":"جمالی کالونی","Roman Urdu":"Jamali Colony","English":"Jamali Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal_ii","label":{"Urdu":"گلشن اقبال 2","Roman Urdu":"Gulshan-e-Iqbal II","English":"Gulshan-e-Iqbal II"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pehlwan_goth","label":{"Urdu":"پہلوان گوٹھ","Roman Urdu":"Pehlwan Goth","English":"Pehlwan Goth"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"matrovil_colony","label":{"Urdu":"میٹروویل کالونی","Roman Urdu":"Matrovil Colony","English":"Matrovil Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulzar_e_hijri","label":{"Urdu":"گلزار ہجری","Roman Urdu":"Gulzar-e-Hijri","English":"Gulzar-e-Hijri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"safooran_goth","label":{"Urdu":"صفورا گوٹھ","Roman Urdu":"Safooran Goth","English":"Safooran Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"akhtar_colony","label":{"Urdu":"اختر کالونی","Roman Urdu":"Akhtar Colony","English":"Akhtar Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"manzoor_colony","label":{"Urdu":"منظور کالونی","Roman Urdu":"Manzoor Colony","English":"Manzoor Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"azam_basti","label":{"Urdu":"اعظم بستی","Roman Urdu":"Azam Basti","English":"Azam Basti"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"chanesar_goth","label":{"Urdu":"چنیسر گوٹھ","Roman Urdu":"Chanesar Goth","English":"Chanesar Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"mahmudabad","label":{"Urdu":"محمودآباد","Roman Urdu":"Mahmudabad","English":"Mahmudabad"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس","Roman Urdu":"P.E.C.H.S.","English":"P.E.C.H.S."}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs_ii","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس 2","Roman Urdu":"P.E.C.H.S. II","English":"P.E.C.H.S. II"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jut_line","label":{"Urdu":"جٹ لائن","Roman Urdu":"Jut Line","English":"Jut Line"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"central_jacob_lines","label":{"Urdu":"سینٹرل جیکب لائن","Roman Urdu":"Central Jacob Lines","English":"Central Jacob Lines"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jamshed_quarters","label":{"Urdu":"جمشید کوارٹر","Roman Urdu":"Jamshed Quarters","English":"Jamshed Quarters"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"garden_east","label":{"Urdu":"گارڈن ایسٹ","Roman Urdu":"Garden East","English":"Garden East"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"soldier_bazar","label":{"Urdu":"سولجر بازار","Roman Urdu":"Soldier Bazar","English":"Soldier Bazar"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pakistan_quarters","label":{"Urdu":"پاکستان کوارٹر","Roman Urdu":"Pakistan Quarters","English":"Pakistan Quarters"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"bhutta_village","label":{"Urdu":"بھٹا ولیج","Roman Urdu":"Bhutta Village","English":"Bhutta Village"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"sultanabad","label":{"Urdu":"سلطان آباد","Roman Urdu":"Sultanabad","English":"Sultanabad"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"kiamari_uc","label":{"Urdu":"کیماری یوسی","Roman Urdu":"Kiamari UC","English":"Kiamari UC"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"baba_bhit","label":{"Urdu":"بابا بھٹ","Roman Urdu":"Baba Bhit","English":"Baba Bhit"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"machar_colony","label":{"Urdu":"مچھر کالونی","Roman Urdu":"Machar Colony","English":"Machar Colony"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"maripur","label":{"Urdu":"ماڑی پور","Roman Urdu":"Maripur","English":"Maripur"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"shershah","label":{"Urdu":"شیرشاہ","Roman Urdu":"SherShah","English":"SherShah"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"gabo_pat","label":{"Urdu":"گابو پٹ","Roman Urdu":"Gabo Pat","English":"Gabo Pat"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muzafarabad","label":{"Urdu":"مظفرآباد","Roman Urdu":"Muzafarabad","English":"Muzafarabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muslimabad","label":{"Urdu":"مسلم آباد","Roman Urdu":"Muslimabad","English":"Muslimabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"dawood_chowrangi","label":{"Urdu":"داوَد چورنگی","Roman Urdu":"Dawood Chowrangi","English":"Dawood Chowrangi"}},{"province":"sindh","city":"karachi","town":"landhi","name":"moinabad","label":{"Urdu":"معین آباد","Roman Urdu":"Moinabad","English":"Moinabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sharafi_goth","label":{"Urdu":"شرافی گوٹھ","Roman Urdu":"Sharafi Goth","English":"Sharafi Goth"}},{"province":"sindh","city":"karachi","town":"landhi","name":"bhutto_nagar","label":{"Urdu":"بھٹو نگر","Roman Urdu":"Bhutto Nagar","English":"Bhutto Nagar"}},{"province":"sindh","city":"karachi","town":"landhi","name":"khawaja_ajmeer_colony","label":{"Urdu":"خواجہ اجمیر کالونی","Roman Urdu":"Khawaja Ajmeer Colony","English":"Khawaja Ajmeer Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"landhi_uc","label":{"Urdu":"لانڈھی یوسی","Roman Urdu":"Landhi UC","English":"Landhi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"awami_colony","label":{"Urdu":"عوامی کالونی","Roman Urdu":"Awami Colony","English":"Awami Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"burmee_colony","label":{"Urdu":"برمی کالونی","Roman Urdu":"Burmee Colony","English":"Burmee Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"korangi_uc","label":{"Urdu":"کورنگی یوسی","Roman Urdu":"Korangi UC","English":"Korangi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sherabad","label":{"Urdu":"شیرآباد","Roman Urdu":"Sherabad","English":"Sherabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"rizvia_society","label":{"Urdu":"رضویہ سوسائٹی","Roman Urdu":"Rizvia Society","English":"Rizvia Society"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"firdous_colony","label":{"Urdu":"فردوس کالونی","Roman Urdu":"Firdous Colony","English":"Firdous Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"super_market","label":{"Urdu":"سپر مارکیٹ","Roman Urdu":"Super Market","English":"Super Market"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"dak_khana","label":{"Urdu":"دک کھانہ","Roman Urdu":"Dak Khana","English":"Dak Khana"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"qasimabad","label":{"Urdu":"قاسم آباد","Roman Urdu":"Qasimabad","English":"Qasimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"bandhani_colony","label":{"Urdu":"بندھانی کالونی","Roman Urdu":"Bandhani Colony","English":"Bandhani Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"sharifabad","label":{"Urdu":"شریف آباد","Roman Urdu":"Sharifabad","English":"Sharifabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"commercial_area","label":{"Urdu":"کمرشل ایریا","Roman Urdu":"Commercial Area","English":"Commercial Area"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"mujahid_colony","label":{"Urdu":"مجاہد کالونی","Roman Urdu":"Mujahid Colony","English":"Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"nazimabad","label":{"Urdu":"ناظم آباد","Roman Urdu":"Nazimabad","English":"Nazimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"abbasi_shaheed","label":{"Urdu":"عباسی شہید","Roman Urdu":"Abbasi Shaheed","English":"Abbasi Shaheed"}},{"province":"sindh","city":"karachi","town":"lyari","name":"agra_taj_colony","label":{"Urdu":"آگرہ تاج کالونی","Roman Urdu":"Agra Taj Colony","English":"Agra Taj Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"daryaabad","label":{"Urdu":"دریاآباد","Roman Urdu":"Daryaabad","English":"Daryaabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"nawabad","label":{"Urdu":"نواآباد","Roman Urdu":"Nawabad","English":"Nawabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"khada_memon_society","label":{"Urdu":"خدا- میمن- سوساَٹی","Roman Urdu":"Khada Memon Society","English":"Khada Memon Society"}},{"province":"sindh","city":"karachi","town":"lyari","name":"baghdadi","label":{"Urdu":"بغدادی","Roman Urdu":"Baghdadi","English":"Baghdadi"}},{"province":"sindh","city":"karachi","town":"lyari","name":"shah_baig_line","label":{"Urdu":"شاھ باغ لائن","Roman Urdu":"Shah Baig Line","English":"Shah Baig Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"bihar_colony","label":{"Urdu":"بہار کالونی","Roman Urdu":"Bihar Colony","English":"Bihar Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"ragiwara","label":{"Urdu":"راگی واڑا","Roman Urdu":"Ragiwara","English":"Ragiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"singo_line","label":{"Urdu":"سنگولائن","Roman Urdu":"Singo Line","English":"Singo Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"chakiwara","label":{"Urdu":"چاکی واڑا","Roman Urdu":"Chakiwara","English":"Chakiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"allama_iqbal_colony","label":{"Urdu":"علامہ اقبال کالونی","Roman Urdu":"Allama Iqbal Colony","English":"Allama Iqbal Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"model_colony","label":{"Urdu":"موڈل کالونی","Roman Urdu":"Model Colony","English":"Model Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"kala_board","label":{"Urdu":"کالا بورڈ","Roman Urdu":"Kala Board","English":"Kala Board"}},{"province":"sindh","city":"karachi","town":"malir","name":"saudabad","label":{"Urdu":"سعودآباد","Roman Urdu":"Saudabad","English":"Saudabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"khokhra_par","label":{"Urdu":"کھوکھرا پار","Roman Urdu":"Khokhra Par","English":"Khokhra Par"}},{"province":"sindh","city":"karachi","town":"malir","name":"jafar_e_tayyar","label":{"Urdu":"جعفر تیار","Roman Urdu":"Jafar-e-Tayyar","English":"Jafar-e-Tayyar"}},{"province":"sindh","city":"karachi","town":"malir","name":"gharibabad","label":{"Urdu":"غریب آباد","Roman Urdu":"Gharibabad","English":"Gharibabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"ghazi_brohi_goth","label":{"Urdu":"غازی بروہی گوٹھ","Roman Urdu":"Ghazi Brohi Goth","English":"Ghazi Brohi Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"kalyana","label":{"Urdu":"کالیانہ","Roman Urdu":"Kalyana","English":"Kalyana"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"sir_syed_colony","label":{"Urdu":"سر سید کالونی","Roman Urdu":"Sir Syed Colony","English":"Sir Syed Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"fatima_jinnah_colony","label":{"Urdu":"فاطمہ جناح کالونی","Roman Urdu":"Fatima Jinnah Colony","English":"Fatima Jinnah Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"godhra","label":{"Urdu":"گودھرا","Roman Urdu":"Godhra","English":"Godhra"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"abu_zar_ghaffari","label":{"Urdu":"ابو زر غفاری","Roman Urdu":"Abu Zar Ghaffari","English":"Abu Zar Ghaffari"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"hakim_ahsan","label":{"Urdu":"حاکم احسان","Roman Urdu":"Hakim Ahsan","English":"Hakim Ahsan"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"madina_colony","label":{"Urdu":"مدینہ کالونی","Roman Urdu":"Madina Colony","English":"Madina Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"faisal_colony","label":{"Urdu":"فیصل کالونی","Roman Urdu":"Faisal Colony","English":"Faisal Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khamiso_goth","label":{"Urdu":"خمیسو گوٹھ","Roman Urdu":"Khamiso Goth","English":"Khamiso Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"mustufa_colony","label":{"Urdu":"مصطفی کالونی","Roman Urdu":"Mustufa Colony","English":"Mustufa Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khawaja_ajmeer_nagri","label":{"Urdu":"خواجہ اجمیر نگری","Roman Urdu":"Khawaja Ajmeer Nagri","English":"Khawaja Ajmeer Nagri"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"gulshan_e_saeed","label":{"Urdu":"گلشن سعید","Roman Urdu":"Gulshan-e-Saeed","English":"Gulshan-e-Saeed"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"shah_nawaz_bhutto_colony","label":{"Urdu":"شاہ نواز بھٹو کالونی","Roman Urdu":"Shah Nawaz Bhutto Colony","English":"Shah Nawaz Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"paposh_nagar","label":{"Urdu":"پاپوش نگر","Roman Urdu":"Paposh Nagar","English":"Paposh Nagar"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"pahar_ganj","label":{"Urdu":"پہاڑ گنج","Roman Urdu":"Pahar Ganj","English":"Pahar Ganj"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"khandu_goth","label":{"Urdu":"کھنڑو گوٹھ","Roman Urdu":"Khandu Goth","English":"Khandu Goth"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"hyderi","label":{"Urdu":"حیدری","Roman Urdu":"Hyderi","English":"Hyderi"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"sakhi_hassan","label":{"Urdu":"سخی حسن","Roman Urdu":"Sakhi Hassan","English":"Sakhi Hassan"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"farooq_e_azam","label":{"Urdu":"فاروق اعظم","Roman Urdu":"Farooq-e-Azam","English":"Farooq-e-Azam"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"nusrat_bhutto_colony","label":{"Urdu":"نصرت بھٹو کالونی","Roman Urdu":"Nusrat Bhutto Colony","English":"Nusrat Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"shadman_town","label":{"Urdu":"شادمان ٹاوَن","Roman Urdu":"Shadman Town","English":"Shadman Town"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone","label":{"Urdu":"بفرزون","Roman Urdu":"Buffer Zone","English":"Buffer Zone"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone_ii","label":{"Urdu":"بفرزون 2","Roman Urdu":"Buffer Zone II","English":"Buffer Zone II"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mominabad","label":{"Urdu":"مومن آباد","Roman Urdu":"Mominabad","English":"Mominabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"haryana_colony","label":{"Urdu":"حریانہ کالونی","Roman Urdu":"Haryana Colony","English":"Haryana Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"hanifabad","label":{"Urdu":"حنیف آباد","Roman Urdu":"Hanifabad","English":"Hanifabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mohammad_nagar","label":{"Urdu":"محمد نگر","Roman Urdu":"Mohammad Nagar","English":"Mohammad Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"madina_colony_orangi","label":{"Urdu":"مدینہ کالونی اورنگی","Roman Urdu":"Madina Colony Orangi","English":"Madina Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghaziabad","label":{"Urdu":"غازی آباد","Roman Urdu":"Ghaziabad","English":"Ghaziabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"chisti_nagar","label":{"Urdu":"چشتی نگر","Roman Urdu":"Chisti Nagar","English":"Chisti Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"bilal_colony_orangi","label":{"Urdu":"بلال کالونی اورنگی","Roman Urdu":"Bilal Colony Orangi","English":"Bilal Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"iqbal_baloch_colony","label":{"Urdu":"اقبال بلوچ کالونی","Roman Urdu":"Iqbal Baloch Colony","English":"Iqbal Baloch Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghabool_town","label":{"Urdu":"گبول ٹاوَن","Roman Urdu":"Ghabool Town","English":"Ghabool Town"}},{"province":"sindh","city":"karachi","town":"orangi","name":"data_nagar","label":{"Urdu":"داتا نگر","Roman Urdu":"Data Nagar","English":"Data Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mujahidabad","label":{"Urdu":"مجاہد آباد","Roman Urdu":"Mujahidabad","English":"Mujahidabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"baloch_goth","label":{"Urdu":"بلوچ گوٹھ","Roman Urdu":"Baloch Goth","English":"Baloch Goth"}},{"province":"sindh","city":"karachi","town":"saddar","name":"old_haji_camp","label":{"Urdu":"پرانہ حاجی کیمپ","Roman Urdu":"Old Haji Camp","English":"Old Haji Camp"}},{"province":"sindh","city":"karachi","town":"saddar","name":"garden","label":{"Urdu":"گارڈن","Roman Urdu":"Garden","English":"Garden"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kharadar","label":{"Urdu":"کھارادر","Roman Urdu":"Kharadar","English":"Kharadar"}},{"province":"sindh","city":"karachi","town":"saddar","name":"city_railway_colony","label":{"Urdu":"سٹی ریلوے کالونی","Roman Urdu":"City Railway Colony","English":"City Railway Colony"}},{"province":"sindh","city":"karachi","town":"saddar","name":"nanak_wara","label":{"Urdu":"ناناک واڑا","Roman Urdu":"Nanak Wara","English":"Nanak Wara"}},{"province":"sindh","city":"karachi","town":"saddar","name":"gazdarabad","label":{"Urdu":"گزدرآباد","Roman Urdu":"Gazdarabad","English":"Gazdarabad"}},{"province":"sindh","city":"karachi","town":"saddar","name":"millat_nagar_islam_pura","label":{"Urdu":"ملت نگر اسلام پورا","Roman Urdu":"Millat Nagar/Islam Pura","English":"Millat Nagar/Islam Pura"}},{"province":"sindh","city":"karachi","town":"saddar","name":"saddar_uc","label":{"Urdu":"صدر یو سی","Roman Urdu":"Saddar UC","English":"Saddar UC"}},{"province":"sindh","city":"karachi","town":"saddar","name":"civil_line","label":{"Urdu":"سول لائن","Roman Urdu":"Civil Line","English":"Civil Line"}},{"province":"sindh","city":"karachi","town":"saddar","name":"clifton","label":{"Urdu":"کلفٹن","Roman Urdu":"Clifton","English":"Clifton"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kehkashan","label":{"Urdu":"کہکشان","Roman Urdu":"Kehkashan","English":"Kehkashan"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"natha_khan_goth","label":{"Urdu":"ناتھا خان گوٹھ","Roman Urdu":"Natha Khan Goth","English":"Natha Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"pak_sadat_colony","label":{"Urdu":"پاک صدر کالونی","Roman Urdu":"Pak Sadat Colony","English":"Pak Sadat Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"drigh_colony","label":{"Urdu":"ڈرگ کالونی","Roman Urdu":"Drigh Colony","English":"Drigh Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"raita_plot","label":{"Urdu":"رائتا پلاٹ","Roman Urdu":"Raita Plot","English":"Raita Plot"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"moria_khan_goth","label":{"Urdu":"موریا خان گوٹھ","Roman Urdu":"Moria Khan Goth","English":"Moria Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"rafa_e_aam_society","label":{"Urdu":"رفا عام سوسا ئٹی","Roman Urdu":"Rafa-e-Aam Society","English":"Rafa-e-Aam Society"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"al_falah_society","label":{"Urdu":"الفلاح سوسا ئٹی","Roman Urdu":"Al-Falah Society","English":"Al-Falah Society"}},{"province":"sindh","city":"karachi","town":"site","name":"pak_colony","label":{"Urdu":"پاک کالونی","Roman Urdu":"Pak Colony","English":"Pak Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"old_golimar","label":{"Urdu":"پرانہ گولی مار","Roman Urdu":"Old Golimar","English":"Old Golimar"}},{"province":"sindh","city":"karachi","town":"site","name":"jahanabad","label":{"Urdu":"جہان آباد","Roman Urdu":"Jahanabad","English":"Jahanabad"}},{"province":"sindh","city":"karachi","town":"site","name":"metrovil","label":{"Urdu":"میٹروویل","Roman Urdu":"Metrovil","English":"Metrovil"}},{"province":"sindh","city":"karachi","town":"site","name":"bhawani_chali","label":{"Urdu":"بہوانی چالی","Roman Urdu":"Bhawani Chali","English":"Bhawani Chali"}},{"province":"sindh","city":"karachi","town":"site","name":"frontier_colony","label":{"Urdu":"فرونٹر کالونی","Roman Urdu":"Frontier Colony","English":"Frontier Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"banaras_colony","label":{"Urdu":"بنارس کالونی","Roman Urdu":"Banaras Colony","English":"Banaras Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"qasba_colony","label":{"Urdu":"قصبہ کالونی","Roman Urdu":"Qasba Colony","English":"Qasba Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"islamia_colony","label":{"Urdu":"اسلامیہ کالونی","Roman Urdu":"Islamia Colony","English":"Islamia Colony"}},{"province":"na","city":"na","town":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","town":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"gender":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}],"vaccines":[{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT1","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT2","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT3","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT4","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT5","label":{"Urdu":"ٹی ٹی 5","Roman Urdu":"TT5","English":"TT5"}}],"towns":[{"province":"sindh","city":"karachi","name":"korangi","label":{"Urdu":"کورنگی","Roman Urdu":"Korangi","English":"Korangi"}},{"province":"sindh","city":"karachi","name":"landhi","label":{"Urdu":"لانڈھی","Roman Urdu":"Landhi","English":"Landhi"}},{"province":"sindh","city":"karachi","name":"baldia","label":{"Urdu":"بلدیہ","Roman Urdu":"Baldia","English":"Baldia"}},{"province":"sindh","city":"karachi","name":"bin_qasim","label":{"Urdu":"بن قاسم","Roman Urdu":"Bin Qasim","English":"Bin Qasim"}},{"province":"sindh","city":"karachi","name":"gadap","label":{"Urdu":"گڈاپ","Roman Urdu":"Gadap","English":"Gadap"}},{"province":"sindh","city":"karachi","name":"gulberg","label":{"Urdu":"گلبرگ","Roman Urdu":"Gulberg","English":"Gulberg"}},{"province":"sindh","city":"karachi","name":"gulshan","label":{"Urdu":"گلشن","Roman Urdu":"Gulshan","English":"Gulshan"}},{"province":"sindh","city":"karachi","name":"jamshed","label":{"Urdu":"جمشید","Roman Urdu":"Jamshed","English":"Jamshed"}},{"province":"sindh","city":"karachi","name":"kiamari","label":{"Urdu":"کیماری","Roman Urdu":"Kiamari","English":"Kiamari"}},{"province":"sindh","city":"karachi","name":"liaquatabad","label":{"Urdu":"لیاقت آباد","Roman Urdu":"Liaquatabad","English":"Liaquatabad"}},{"province":"sindh","city":"karachi","name":"lyari","label":{"Urdu":"لیاری","Roman Urdu":"Lyari","English":"Lyari"}},{"province":"sindh","city":"karachi","name":"malir","label":{"Urdu":"ملیر","Roman Urdu":"Malir","English":"Malir"}},{"province":"sindh","city":"karachi","name":"new_karachi","label":{"Urdu":"نیو کراچی","Roman Urdu":"New Karachi","English":"New Karachi"}},{"province":"sindh","city":"karachi","name":"north_nazimabad","label":{"Urdu":"نارتھ ناظم آباد","Roman Urdu":"North Nazimabad","English":"North Nazimabad"}},{"province":"sindh","city":"karachi","name":"orangi","label":{"Urdu":"اورنگی","Roman Urdu":"Orangi","English":"Orangi"}},{"province":"sindh","city":"karachi","name":"saddar","label":{"Urdu":"صدر","Roman Urdu":"Saddar","English":"Saddar"}},{"province":"sindh","city":"karachi","name":"shah_faisal","label":{"Urdu":"شاہ فیصل","Roman Urdu":"Shah Faisal","English":"Shah Faisal"}},{"province":"sindh","city":"karachi","name":"site","label":{"Urdu":"سائٹ","Roman Urdu":"S.I.T.E.","English":"S.I.T.E."}},{"province":"na","city":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"cities":[{"province":"sindh","name":"karachi","label":{"Urdu":"کراچی","Roman Urdu":"Karachi","English":"Karachi"}},{"province":"punjab","name":"hafizabad","label":{"Urdu":"حافظ آباد","Roman Urdu":"Hafizabad","English":"Hafizabad"}},{"province":"punjab","name":"muzaffargarh","label":{"Urdu":"مظفر گڑھ","Roman Urdu":"Muzaffargarh","English":"Muzaffargarh"}},{"province":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Not Applicable","English":"Not Applicable"}}],"edd_lmp":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}],"ethnicity":[{"instance":{"openmrs_code":"163215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"punjabi","label":{"Urdu":"پنجابی","Roman Urdu":"Punjabi","English":"Punjabi"}},{"instance":{"openmrs_code":"163216AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pushtuns","label":{"Urdu":"پشتون","Roman Urdu":"Pushtun","English":"Pushtun"}},{"instance":{"openmrs_code":"163217AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"sindhi","label":{"Urdu":"سندھی","Roman Urdu":"Sindhi","English":"Sindhi"}},{"instance":{"openmrs_code":"163218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"saraiki","label":{"Urdu":"سرائیکی","Roman Urdu":"Saraiki","English":"Saraiki"}},{"instance":{"openmrs_code":"163219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"muhajir","label":{"Urdu":"مہاجر","Roman Urdu":"Muhajir","English":"Muhajir"}},{"instance":{"openmrs_code":"163220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"balochi","label":{"Urdu":"بلوچی","Roman Urdu":"Balochi","English":"Balochi"}},{"instance":{"openmrs_code":"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}}],"yes_no":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},"instance":{"encounter_type":"Woman TT enrollment"},"version":"201604080500","id_string":"woman_tt_enrollement_form","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"instance":{"openmrs_entity_id":"Program Client ID","openmrs_entity":"person_identifier"},"type":"hidden","name":"existing_program_client_id"},{"type":"hidden","name":"provider_location_name"},{"instance":{"openmrs_entity_id":"gender","openmrs_entity":"person"},"type":"hidden","name":"gender"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}","Roman Urdu":"Shehr: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center ka naam: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"name":"client_reg_date","hint":{"Urdu":"خاتون کو ویکسین لگنے کی تاریخ","English":"Date on which woman was vaccinated","Roman Urdu":"Khatoon ko vaccine lagnay ki tareekh"},"bind":{"jr:constraintMsg":{"Urdu":"پروگرام مین اندراج کی تاریخ مستقبل کی نہیں ہوسکتی","English":"Client registration date cannot be in the future","Roman Urdu":"Program mai andraaj ki tareekh mustaqbil ki nahi hosakti"},"required":"yes","constraint":".<=${today}"},"label":{"Urdu":"پروگرام میں اندراج کی تاریخ","English":"Client Registration date","Roman Urdu":"Program mai andraj ki tareekh"},"instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"type":"date"},{"bind":{"required":"yes"},"type":"note","name":"program_client_id","label":{"Urdu":"کلائنٹ کی پروگرام آئی ڈی {existing_program_client_id}$","Roman Urdu":"Client ki program ID ${existing_program_client_id}","English":"Program Client ID ${existing_program_client_id}"}},{"bind":{"jr:constraintMsg":{"Urdu":"نمبر آٹھ ہندسوں پر مشتمل ہونا چاہئے","English":"Number should be 8 digits","Roman Urdu":"Number 8 hindason par mushtamil hona chahiye"},"required":"yes","constraint":"string-length(.) = 8"},"type":"integer","instance":{"openmrs_entity_id":"EPI Card Number","openmrs_entity":"person_attribute"},"name":"epi_card_number","label":{"Urdu":"کارڈ نمبر","English":"EPI Card Number","Roman Urdu":"EPI Card Number"}},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"required":"yes","constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"first_name","openmrs_entity":"person"},"name":"first_name","label":{"Urdu":"نام","English":"First Name","Roman Urdu":"Naam"}},{"default":"yes","label":{"Urdu":"کیا تاریخ پیدائش معلوم ہے؟","Roman Urdu":"Kya tareekh-e-pedaaish maloom hai?","English":"Is birthdate known?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"member_birth_date_known"},{"bind":{"jr:constraintMsg":{"Urdu":"یہ تاریخ مستقبل کی نہیں ہوسکتی","Roman Urdu":"Ye tareekh mustaqbil ki nahi hosakti","English":"This date cannot be in the future"},"relevant":"selected(${member_birth_date_known}, 'yes')","constraint":".<=${today}"},"type":"date","name":"member_birth_date","label":{"Urdu":"تاریخ پیدائش","Roman Urdu":"Tareekh-e-pedaaish","English":"Birth date"}},{"bind":{"relevant":"selected(${member_birth_date_known}, 'no')"},"type":"integer","name":"age","label":{"Urdu":"عمر (سالوں میں)","Roman Urdu":"Umar (saalon me)","English":"Age (years)"}},{"bind":{"calculate":"int((${today} - ${member_birth_date}) div 365.25)"},"type":"calculate","name":"calc_age"},{"bind":{"calculate":"date(${today} - int(${age} * 365.25))"},"type":"calculate","name":"calc_dob"},{"bind":{"calculate":"if(${member_birth_date_known}='yes', ${member_birth_date}, ${calc_dob})"},"type":"calculate","name":"calc_dob_confirm","instance":{"openmrs_entity_id":"birthdate","openmrs_entity":"person"}},{"bind":{"calculate":"if(${member_birth_date_known} = 'yes', '0', '1')"},"type":"calculate","name":"calc_dob_estimated","instance":{"openmrs_entity_id":"birthdate_estimated","openmrs_entity":"person"}},{"bind":{"calculate":"if(${member_birth_date_known}='yes', ${calc_age}, ${age})"},"type":"calculate","name":"calc_age_confirm","instance":{"openmrs_entity_id":"154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"type":"note","name":"birth_date_note","label":{"Urdu":"کلائنٹ کی تاریخ پیدائش:${calc_dob_confirm}","English":"Date of Birth: ${calc_dob_confirm}","Roman Urdu":"Member ki Tareekh-e-pedaaish: ${calc_dob_confirm}"}},{"type":"note","name":"note_age","label":{"Urdu":"عمر :{calc_age_confirm}$ سال","English":"Age: ${calc_age_confirm} years","Roman Urdu":"Umar: ${calc_age_confirm} saal"}},{"default":"female","bind":{"required":"yes","calculate":"concat(\"female\",\"\")"},"type":"calculate","name":"gender1","label":{"Urdu":"جنس","Roman Urdu":"Jins","English":"Gender"}},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"1594AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"father_name","label":{"Urdu":"والد کا نام","English":"Father's Name","Roman Urdu":"Waalid ka naam"}},{"label":{"Urdu":"کیا آپ شادی شدہ ہیں؟","English":"Are you married?","Roman Urdu":"Kya aap shaadi shuda hain?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"marriage"},{"bind":{"jr:constraintMsg":{"Urdu":"نام تین سے پچیس حروف پر مشتمل ہونا چاہئے","English":"Name should be 3 to 25 characters long","Roman Urdu":"Naam 3 say 25 huroof par mushtamil hona chahiye"},"relevant":"selected(${marriage}, 'yes')","constraint":"regex(., '^[a-zA-Z\\s\\.\\-]{3,25}$')"},"type":"text","instance":{"openmrs_entity_id":"161135AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"husband_name","label":{"Urdu":"شوہر کا نام","English":"Husband's Name","Roman Urdu":"Shohar ka naam"}},{"bind":{"calculate":"if(${marriage} = 'no', ${father_name}, ${husband_name})"},"type":"calculate","name":"last_name","instance":{"openmrs_entity_id":"last_name","openmrs_entity":"person"}},{"control":{"appearance":"minimal"},"name":"ethnicity","bind":{"required":"yes"},"label":{"Urdu":"قومیت","English":"Ethnicity","Roman Urdu":"Qomiat"},"instance":{"openmrs_entity_id":"163153AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"163215AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"punjabi","label":{"Urdu":"پنجابی","Roman Urdu":"Punjabi","English":"Punjabi"}},{"instance":{"openmrs_code":"163216AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"pushtuns","label":{"Urdu":"پشتون","Roman Urdu":"Pushtun","English":"Pushtun"}},{"instance":{"openmrs_code":"163217AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"sindhi","label":{"Urdu":"سندھی","Roman Urdu":"Sindhi","English":"Sindhi"}},{"instance":{"openmrs_code":"163218AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"saraiki","label":{"Urdu":"سرائیکی","Roman Urdu":"Saraiki","English":"Saraiki"}},{"instance":{"openmrs_code":"163219AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"muhajir","label":{"Urdu":"مہاجر","Roman Urdu":"Muhajir","English":"Muhajir"}},{"instance":{"openmrs_code":"163220AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"balochi","label":{"Urdu":"بلوچی","Roman Urdu":"Balochi","English":"Balochi"}},{"instance":{"openmrs_code":"5622AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}}]},{"bind":{"relevant":"selected(${ethnicity}, 'other')"},"type":"text","instance":{"openmrs_entity":"concept","openmrs_entity_id":"160632AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"163330AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ethnicity_other","label":{"Urdu":"وضاحت کریں","Roman Urdu":"Wazaahat karain","English":"Please specify:"}},{"control":{"appearance":"minimal"},"name":"province","default":"${provider_province}","bind":{"required":"yes"},"label":{"Urdu":"صوبہ","Roman Urdu":"Suba","English":"Province"},"instance":{"openmrs_entity":"person_address","openmrs_entity_id":"stateProvince","openmrs_entity_parent":"usual_residence"},"type":"select one","children":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}]},{"control":{"appearance":"minimal"},"name":"city_village","choice_filter":"province=${province} or province='na'","default":"${provider_city}","bind":{"required":"yes"},"label":{"Urdu":"شہر","Roman Urdu":"Shehr","English":"City"},"itemset":"cities","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"cityVillage","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"town","choice_filter":"(province=${province} and city=${city_village} ) or city='na'","bind":{"required":"yes"},"label":{"Urdu":"ٹاٰئون/ قصبہ/ بستی","Roman Urdu":"Town / Qasbah / Basti","English":"Town"},"itemset":"towns","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"town","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"union_council","choice_filter":"(province=${province} and city=${city_village} and town=${town}) or town='na'","bind":{"required":"yes"},"label":{"Urdu":"یونین کونسل","Roman Urdu":"Union Council","English":"Union Council"},"itemset":"ucs","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"subTown","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"house","openmrs_entity_parent":"usual_residence"},"name":"house_number","label":{"Urdu":"گھر کا نمبر","Roman Urdu":"Ghar ka number","English":"House Number"}},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"street","openmrs_entity_parent":"usual_residence"},"name":"street","label":{"Urdu":"گلی/کالونی/محلہ","Roman Urdu":"Gali/Colony/Mohalla","English":"Street"}},{"bind":{"required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"landmark","openmrs_entity_parent":"usual_residence"},"name":"landmark","label":{"Urdu":"گھر کے قریب کوئی مشہور جگہ","Roman Urdu":"Ghar ke qareeb koi mashoor jagah","English":"Land Mark"}},{"bind":{"calculate":"jr:choice-name(${province}, '${province}')"},"type":"calculate","name":"provincename"},{"bind":{"calculate":"jr:choice-name(${city_village}, '${city_village}')"},"type":"calculate","name":"city_villagename"},{"bind":{"calculate":"jr:choice-name(${town}, '${town}')"},"type":"calculate","name":"townname"},{"bind":{"calculate":"jr:choice-name(${union_council}, '${union_council}')"},"type":"calculate","name":"union_councilname"},{"type":"note","name":"address","label":{"Urdu":"پتہ: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}","English":"Address: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}","Roman Urdu":"Pata: ${house_number}, ${street}, ${landmark}, ${union_councilname}, ${townname}, ${city_villagename}, ${provincename}"}},{"instance":{"openmrs_entity_id":"163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"geopoint","name":"centre_gps","label":{"Urdu":"حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں","English":"Collect GPS coordinates of data entry location","Roman Urdu":"Hasil karda malomaat ki jaga ke GPS coordinates darj karain"}},{"name":"reminders_approval","bind":{"required":"yes"},"label":{"Urdu":"کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟","English":"Are you willing to receive SMS reminders for your next visit?","Roman Urdu":"Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain?"},"instance":{"openmrs_entity_id":"163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03","English":"Phone number should be 11 digits in the following format: 03*********","Roman Urdu":"Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********"},"relevant":"${reminders_approval}='yes'","constraint":"regex(., '^03[0-9]{9}$')"},"type":"text","instance":{"openmrs_entity_id":"159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"contact_phone_number","label":{"Urdu":"موبائل نمبر:","English":"Mobile Number:","Roman Urdu":"Mobile number:"}},{"instance":{"openmrs_entity_id":"5272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"label":{"Urdu":"کیا خا تون حاملہ ہیں؟","English":"Is female pregnant?","Roman Urdu":"Kia khatoon haamla hain?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"pregnant"},{"name":"edd_lmp","bind":{"relevant":"selected (${pregnant}, 'yes')"},"label":{"Urdu":"کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟","English":"Do you know your LMP, EDD or last Ultrasound information?","Roman Urdu":"Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai?"},"instance":{"openmrs_entity_id":"160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"زچگی کی متوقع تاریخ ماضی کی نہیں ہو سکتی","Roman Urdu":"Zachgi ki mutawaqqa tareekh maazi ki nahi hosakti","English":"EDD cannot be in the past"},"relevant":"selected (${edd_lmp}, 'edd')","constraint":".>=${today}"},"type":"date","name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh","English":"EDD"}},{"bind":{"jr:constraintMsg":{"Urdu":"پچھلی ماہواری کی تاریخ مستقبل کی نہیں ہوسکتی","Roman Urdu":"Pichli mahwaari ki tareekh mustaqbil ki nahi hosakti","English":"LMP cannot be in the future"},"relevant":"selected (${edd_lmp}, 'lmp')","constraint":".<=${today}"},"type":"date","name":"lmp","label":{"Urdu":"پچھلی ماہواری کی تاریخ","Roman Urdu":"Pichli mahwaari ki tareekh","English":"LMP"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"date","instance":{"openmrs_entity_id":"163165AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"ultrasound_date","label":{"Urdu":"الٹرا سائونڈ کی تاریخ","English":"Ultrasound Date","Roman Urdu":"Ultrasound ki tareekh"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"integer","name":"ultrasound_weeks","label":{"Urdu":"الٹرا سائونڈ کی مدد سے حمل کی مدت [ہفتوں میں]","Roman Urdu":"Ultrasound ki madad se hamal ki muddat (hafton me)","English":"Gestational age determined by ultrasound"}},{"bind":{"calculate":"date(${lmp}+280)"},"type":"calculate","name":"edd_calc_lmp"},{"bind":{"calculate":"date((280-(${ultrasound_weeks}*7)+${ultrasound_date} ))"},"type":"calculate","name":"edd_calc_ultrasound"},{"bind":{"calculate":"format-date(${edd_calc_lmp}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_lmp_formatted"},{"bind":{"calculate":"format-date(${edd_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_ultrasound_formatted"},{"bind":{"calculate":"date(${edd}-280)"},"type":"calculate","name":"lmp_calc_edd"},{"bind":{"calculate":"date(${ultrasound_date}-(${ultrasound_weeks}*7))"},"type":"calculate","name":"lmp_calc_ultrasound"},{"bind":{"calculate":"format-date(${lmp_calc_edd}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_edd_formatted"},{"bind":{"calculate":"format-date(${lmp_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_ultrasound_formatted"},{"bind":{"calculate":"if(${edd_lmp}='lmp',${edd_calc_lmp_formatted},if(${edd_lmp}='edd',${edd} ,if(${edd_lmp}='ultrasound',${edd_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_edd","instance":{"openmrs_entity_id":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${lmp},if(${edd_lmp}='edd',${lmp_calc_edd_formatted} ,if(${edd_lmp}='ultrasound',${lmp_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_lmp","instance":{"openmrs_entity_id":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"int((${today} - (${edd}-280))div7)"},"type":"calculate","name":"ga_edd"},{"bind":{"calculate":"int((${today} - ${lmp})div7)"},"type":"calculate","name":"ga_lmp"},{"bind":{"calculate":"int((${today} -(${ultrasound_date}-(${ultrasound_weeks}*7)))div7)"},"type":"calculate","name":"ga_ult"},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_edd_note","label":{"Urdu":"${final_edd}: زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh: ${final_edd}","English":"EDD: ${final_edd}"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_lmp_note","label":{"Urdu":"پچھلی ماہواری کی تاریخ :{final_lmp}$","Roman Urdu":"Pichli mahwaari ki tareekh: ${final_lmp}","English":"LMP: ${final_lmp}"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${ga_lmp},if(${edd_lmp}='edd',${ga_edd} ,if(${edd_lmp}='ultrasound',${ga_ult},'')))"},"type":"calculate","name":"final_ga","instance":{"openmrs_entity_id":"163166AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_ga_note","label":{"Urdu":"حمل کی مُدّت: {final_ga}$ ہفتے","Roman Urdu":"Hamal ki muddat: ${final_ga} weeks","English":"GA: ${final_ga} weeks"}},{"name":"vaccines","bind":{"calculate":"minimal"},"label":{"Urdu":"پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے","Roman Urdu":"Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye","English":"Retro vaccines"},"instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply","children":[{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT1","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT2","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT3","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT4","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT5","label":{"Urdu":"ٹی ٹی 5","Roman Urdu":"TT5","English":"TT5"}}]},{"bind":{"relevant":"selected(${vaccines},'TT1')","constraint":"(.<=${today} and .<=${client_reg_date})"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt1_retro","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"bind":{"relevant":"selected(${vaccines},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","constraint":"(.<=${today} and .>=${tt1_retro} and ((selected(${vaccines}, 'TT1'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt2_retro","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","constraint":"(.<=${today} and .>=${tt2_retro} and ((selected(${vaccines}, 'TT2'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt3_retro","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","constraint":"(.<=${today} and .>=${tt3_retro} and ((selected(${vaccines}, 'TT3'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt4_retro","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"name":"vaccines_2","choice_filter":"name = if(selected(${vaccines}, 'TT1'), '', 'TT1') or \nname = if(selected(${vaccines}, 'TT2'), '', 'TT2') or \nname = if(selected(${vaccines}, 'TT3'), '', 'TT3') or \nname = if(selected(${vaccines}, 'TT4'), '', 'TT4') or \nname = if(selected(${vaccines}, 'TT5'), '', 'TT5')","bind":{"required":"yes"},"label":{"Urdu":"آج کون کون سی ویکسین دی گئی ہیں؟","Roman Urdu":"Aaj kon kon si vaccine di gai hain?","English":"Vaccine administered today"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT1'),${client_reg_date},'')"},"type":"calculate","name":"tt1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT2'),${client_reg_date},'')"},"type":"calculate","name":"tt2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT3'),${client_reg_date},'')"},"type":"calculate","name":"tt3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT4'),${client_reg_date},'')"},"type":"calculate","name":"tt4","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT5'),${client_reg_date},'')"},"type":"calculate","name":"tt5","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT5')","calculate":"5"},"type":"calculate","name":"tt_5_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/woman_enrollment/form.xml b/opensrp-core/src/test/resources/form/woman_enrollment/form.xml deleted file mode 100644 index ebbd597bbb..0000000000 --- a/opensrp-core/src/test/resources/form/woman_enrollment/form.xml +++ /dev/null @@ -1,1550 +0,0 @@ -
- - -

خواتین انرولمنٹ فارم برائے ٹی ٹی ٹیکاجات - Woman TT Enrollment Form

-
-
- - کیا تاریخ پیدائش معلوم ہے؟ - Is birthdate known? - - Kya tareekh-e-pedaaish maloom hai? -
- - -
-
-
-
- - کیا آپ شادی شدہ ہیں؟ - Are you married? - - Kya aap shaadi shuda hain? -
- - -
-
-
-
- - کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ - Are you willing to receive SMS reminders for your next visit? - - Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? - * -
- - -
-
-
-
- - کیا خا تون حاملہ ہیں؟ - Is female pregnant? - - Kia khatoon haamla hain? -
- - -
-
-
-
- - کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟ - Do you know your LMP, EDD or last Ultrasound information? - - Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai? -
- - - - -
-
-
-
- - پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے - Retro vaccines - - Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye -
- - - - - -
-
-
-
- - آج کون کون سی ویکسین دی گئی ہیں؟ - Vaccine administered today - - Aaj kon kon si vaccine di gai hain? - * -
- - - ٹی ٹی 1 - TT1 - - TT1 - ٹی ٹی 2 - TT2 - - TT2 - ٹی ٹی 3 - TT3 - - TT3 - ٹی ٹی 4 - TT4 - - TT4 - ٹی ٹی 5 - TT5 - - TT5 -
-
-
- -
diff --git a/opensrp-core/src/test/resources/form/woman_enrollment/form_definition.json b/opensrp-core/src/test/resources/form/woman_enrollment/form_definition.json deleted file mode 100644 index 5d6cbabe33..0000000000 --- a/opensrp-core/src/test/resources/form/woman_enrollment/form_definition.json +++ /dev/null @@ -1,311 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkwoman", - "default_bind_path" : "/model/instance/Woman_TT_Enrollment_Form/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_province", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "gender", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/gender", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/start" - }, { - "name" : "end", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/end" - }, { - "name" : "today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/phonenumber" - }, { - "name" : "client_reg_date", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/client_reg_date" - }, { - "name" : "program_client_id", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/program_client_id" - }, { - "name" : "epi_card_number", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/epi_card_number" - }, { - "name" : "first_name", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/first_name" - }, { - "name" : "birth_date_known", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/member_birth_date_known" - }, { - "name" : "birth_date", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/member_birth_date" - }, { - "name" : "age", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/age" - }, { - "name" : "calc_age", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/calc_age" - }, { - "name" : "calc_dob", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/calc_dob" - }, { - "name" : "dob", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/calc_dob_confirm" - }, { - "name" : "calc_dob_estimated", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/calc_dob_estimated" - }, { - "name" : "calc_age_confirm", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/calc_age_confirm" - }, { - "name" : "birth_date_note", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/birth_date_note" - }, { - "name" : "note_age", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/note_age" - }, { - "name" : "gender1", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/gender1" - }, { - "name" : "father_name", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/father_name" - }, { - "name" : "marriage", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/marriage" - }, { - "name" : "husband_name", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/husband_name" - }, { - "name" : "last_name", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/last_name" - }, { - "name" : "ethnicity", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ethnicity" - }, { - "name" : "ethnicity_other", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ethnicity_other" - }, { - "name" : "province", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/landmark" - }, { - "name" : "provincename", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/provincename" - }, { - "name" : "city_villagename", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/city_villagename" - }, { - "name" : "townname", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/townname" - }, { - "name" : "union_councilname", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/union_councilname" - }, { - "name" : "address", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/address" - }, { - "name" : "centre_gps", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/centre_gps" - }, { - "name" : "reminders_approval", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/reminders_approval" - }, { - "name" : "contact_phone_number", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/contact_phone_number" - }, { - "name" : "pregnant", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/pregnant" - }, { - "name" : "edd_lmp", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd_lmp" - }, { - "name" : "edd", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd" - }, { - "name" : "lmp", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/lmp" - }, { - "name" : "ultrasound_date", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ultrasound_date" - }, { - "name" : "ultrasound_weeks", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ultrasound_weeks" - }, { - "name" : "edd_calc_lmp", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd_calc_lmp" - }, { - "name" : "edd_calc_ultrasound", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd_calc_ultrasound" - }, { - "name" : "edd_calc_lmp_formatted", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd_calc_lmp_formatted" - }, { - "name" : "edd_calc_ultrasound_formatted", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/edd_calc_ultrasound_formatted" - }, { - "name" : "lmp_calc_edd", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/lmp_calc_edd" - }, { - "name" : "lmp_calc_ultrasound", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/lmp_calc_ultrasound" - }, { - "name" : "lmp_calc_edd_formatted", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/lmp_calc_edd_formatted" - }, { - "name" : "lmp_calc_ultrasound_formatted", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/lmp_calc_ultrasound_formatted" - }, { - "name" : "final_edd", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_edd" - }, { - "name" : "final_lmp", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_lmp" - }, { - "name" : "ga_edd", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ga_edd" - }, { - "name" : "ga_lmp", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ga_lmp" - }, { - "name" : "ga_ult", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/ga_ult" - }, { - "name" : "final_edd_note", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_edd_note" - }, { - "name" : "final_lmp_note", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_lmp_note" - }, { - "name" : "final_ga", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_ga" - }, { - "name" : "final_ga_note", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/final_ga_note" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/vaccines" - }, { - "name" : "tt1_retro", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt1_retro" - }, { - "name" : "tt_1_dose", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_1_dose" - }, { - "name" : "tt2_retro", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt2_retro" - }, { - "name" : "tt_2_dose", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_2_dose" - }, { - "name" : "tt3_retro", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt3_retro" - }, { - "name" : "tt_3_dose", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_3_dose" - }, { - "name" : "tt4_retro", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt4_retro" - }, { - "name" : "tt_4_dose", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_4_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/vaccines_2" - }, { - "name" : "tt1", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt1" - }, { - "name" : "tt_1_dose_today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_1_dose_today" - }, { - "name" : "tt2", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt2" - }, { - "name" : "tt_2_dose_today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_2_dose_today" - }, { - "name" : "tt3", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt3" - }, { - "name" : "tt_3_dose_today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_3_dose_today" - }, { - "name" : "tt4", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt4" - }, { - "name" : "tt_4_dose_today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_4_dose_today" - }, { - "name" : "tt5", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt5" - }, { - "name" : "tt_5_dose_today", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/tt_5_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Woman_TT_Enrollment_Form/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/woman_enrollment/form_submission.json b/opensrp-core/src/test/resources/form/woman_enrollment/form_submission.json deleted file mode 100644 index d12e572222..0000000000 --- a/opensrp-core/src/test/resources/form/woman_enrollment/form_submission.json +++ /dev/null @@ -1,350 +0,0 @@ -{ - "_id": "5710d57eac4377dea3cbbb96005b6efc", - "_rev": "1-f38e0fadc71b86a7f5dfc27cabe43fa4", - "type": "FormSubmission", - "anmId": "demotest", - "instanceId": "c12d8e42-a230-415f-a513-9117f4c9db6a", - "formName": "woman_enrollment", - "entityId": "cd082cb2-abe1-4c78-a370-bd955d58e0ba", - "clientVersion": 1458899024110, - "formDataDefinitionVersion": "2", - "formInstance": { - "form_data_definition_version": "2", - "form": { - "bind_type": "pkwoman", - "default_bind_path": "/model/instance/Woman_TT_Enrollment_Form/", - "fields": [{ - "name": "id", - "value": "cd082cb2-abe1-4c78-a370-bd955d58e0ba", - "source": "pkwoman.id" - }, { - "name": "provider_uc", - "value": "Zaman Town", - "source": "pkwoman.provider_uc" - }, { - "name": "provider_town", - "value": "Korangi", - "source": "pkwoman.provider_town" - }, { - "name": "provider_city", - "value": "Karachi", - "source": "pkwoman.provider_city" - }, { - "name": "provider_province", - "value": "Sindh", - "source": "pkwoman.provider_province" - }, { - "name": "provider_id", - "value": "demotest", - "source": "pkwoman.provider_id" - }, { - "name": "provider_location_id", - "value": "null", - "source": "pkwoman.provider_location_id" - }, { - "name": "provider_location_name", - "value": "null", - "source": "pkwoman.provider_location_name" - }, { - "name": "existing_program_client_id", - "value": "11338235", - "source": "pkwoman.existing_program_client_id" - }, { - "name": "gender", - "value": "female", - "source": "pkwoman.gender" - }, { - "name": "provider_location_note", - "value": "", - "source": "pkwoman.provider_location_note" - }, { - "name": "start", - "value": "2016-03-25 14:39:36", - "source": "pkwoman.start" - }, { - "name": "end", - "value": "2016-03-25 14:43:43", - "source": "pkwoman.end" - }, { - "name": "today", - "value": "2016-03-25", - "source": "pkwoman.today" - }, { - "name": "deviceid", - "value": "Error: could not determine deviceID", - "source": "pkwoman.deviceid" - }, { - "name": "subscriberid", - "value": "no subscriberid property in enketo", - "source": "pkwoman.subscriberid" - }, { - "name": "simserial", - "value": "no simserial property in enketo", - "source": "pkwoman.simserial" - }, { - "name": "phonenumber", - "value": "no phonenumber property in enketo", - "source": "pkwoman.phonenumber" - }, { - "name": "client_reg_date", - "value": "2016-03-25", - "source": "pkwoman.client_reg_date" - }, { - "name": "program_client_id", - "value": "11338235", - "source": "pkwoman.program_client_id" - }, { - "name": "epi_card_number", - "value": "2015", - "source": "pkwoman.epi_card_number" - }, { - "name": "first_name", - "value": "mehrina", - "source": "pkwoman.first_name" - }, { - "name": "member_birth_date_known", - "value": "yes", - "source": "pkwoman.member_birth_date_known" - }, { - "name": "member_birth_date", - "value": "1986-03-04", - "source": "pkwoman.member_birth_date" - }, { - "name": "age", - "value": "", - "source": "pkwoman.age" - }, { - "name": "dob", - "value": "1986-03-04", - "source": "pkwoman.dob" - }, { - "name": "dob_estimated", - "value": "0", - "source": "pkwoman.dob_estimated" - }, { - "name": "age", - "value": "30", - "source": "pkwoman.age" - }, { - "name": "gender1", - "value": "female", - "source": "pkwoman.gender1" - }, { - "name": "father_name", - "value": "papa", - "source": "pkwoman.father_name" - }, { - "name": "marriage", - "value": "yes", - "source": "pkwoman.marriage" - }, { - "name": "husband_name", - "value": "husbi", - "source": "pkwoman.husband_name" - }, { - "name": "last_name", - "value": "husbi", - "source": "pkwoman.last_name" - }, { - "name": "ethnicity", - "value": "pushtuns", - "source": "pkwoman.ethnicity" - }, { - "name": "ethnicity_other", - "value": "", - "source": "pkwoman.ethnicity_other" - }, { - "name": "province", - "value": "sindh", - "source": "pkwoman.province" - }, { - "name": "city_village", - "value": "karachi", - "source": "pkwoman.city_village" - }, { - "name": "town", - "value": "gadap", - "source": "pkwoman.town" - }, { - "name": "union_council", - "value": "gujro", - "source": "pkwoman.union_council" - }, { - "name": "house_number", - "value": "34 k", - "source": "pkwoman.house_number" - }, { - "name": "street", - "value": "jim", - "source": "pkwoman.street" - }, { - "name": "landmark", - "value": "nishni", - "source": "pkwoman.landmark" - }, { - "name": "address", - "value": "", - "source": "pkwoman.address" - }, { - "name": "centre_gps", - "source": "pkwoman.centre_gps" - }, { - "name": "pregnant", - "value": "yes", - "source": "pkwoman.pregnant" - }, { - "name": "edd_lmp", - "value": "edd", - "source": "pkwoman.edd_lmp" - }, { - "name": "edd", - "value": "2016-04-28", - "source": "pkwoman.edd" - }, { - "name": "lmp", - "value": "", - "source": "pkwoman.lmp" - }, { - "name": "ultrasound_date", - "source": "pkwoman.ultrasound_date" - }, { - "name": "ultrasound_weeks", - "value": "", - "source": "pkwoman.ultrasound_weeks" - }, { - "name": "edd_calc_lmp", - "value": "Invalid Date", - "source": "pkwoman.edd_calc_lmp" - }, { - "name": "edd_calc_ultrasound", - "value": "Invalid Date", - "source": "pkwoman.edd_calc_ultrasound" - }, { - "name": "edd_calc_lmp_formatted", - "value": "Invalid Date", - "source": "pkwoman.edd_calc_lmp_formatted" - }, { - "name": "edd_calc_ultrasound_formatted", - "value": "Invalid Date", - "source": "pkwoman.edd_calc_ultrasound_formatted" - }, { - "name": "lmp_calc_edd", - "value": "Thu, 23 Jul 2015 00:00:00 GMT", - "source": "pkwoman.lmp_calc_edd" - }, { - "name": "lmp_calc_ultrasound", - "value": "Invalid Date", - "source": "pkwoman.lmp_calc_ultrasound" - }, { - "name": "final_edd", - "value": "2016-04-28", - "source": "pkwoman.final_edd" - }, { - "name": "final_lmp", - "value": "Thu, 23 Jul 2015 00:00:00 GMT", - "source": "pkwoman.final_lmp" - }, { - "name": "ga_edd", - "value": "35", - "source": "pkwoman.ga_edd" - }, { - "name": "ga_lmp", - "value": "NaN", - "source": "pkwoman.ga_lmp" - }, { - "name": "ga_ult", - "value": "NaN", - "source": "pkwoman.ga_ult" - }, { - "name": "final_edd_note", - "value": "", - "source": "pkwoman.final_edd_note" - }, { - "name": "final_lmp_note", - "value": "", - "source": "pkwoman.final_lmp_note" - }, { - "name": "final_ga", - "value": "35", - "source": "pkwoman.final_ga" - }, { - "name": "final_ga_note", - "value": "", - "source": "pkwoman.final_ga_note" - }, { - "name": "vaccines", - "value": "TT1 TT2", - "source": "pkwoman.vaccines" - }, { - "name": "tt1_retro", - "value": "2015-03-03", - "source": "pkwoman.tt1_retro" - }, { - "name": "tt_1_dose", - "value": "1", - "source": "pkwoman.tt_1_dose" - }, { - "name": "tt2_retro", - "value": "2015-11-24", - "source": "pkwoman.tt2_retro" - }, { - "name": "tt_2_dose", - "value": "2", - "source": "pkwoman.tt_2_dose" - }, { - "name": "tt3_retro", - "source": "pkwoman.tt3_retro" - }, { - "name": "tt_3_dose", - "source": "pkwoman.tt_3_dose" - }, { - "name": "tt4_retro", - "source": "pkwoman.tt4_retro" - }, { - "name": "tt_4_dose", - "source": "pkwoman.tt_4_dose" - }, { - "name": "vaccines_2", - "value": "TT3", - "source": "pkwoman.vaccines_2" - }, { - "name": "tt1", - "source": "pkwoman.tt1" - }, { - "name": "tt_1_dose_today", - "source": "pkwoman.tt_1_dose_today" - }, { - "name": "tt2", - "source": "pkwoman.tt2" - }, { - "name": "tt_2_dose_today", - "source": "pkwoman.tt_2_dose_today" - }, { - "name": "tt3", - "value": "2016-03-25", - "source": "pkwoman.tt3" - }, { - "name": "tt_3_dose_today", - "value": "3", - "source": "pkwoman.tt_3_dose_today" - }, { - "name": "tt4", - "source": "pkwoman.tt4" - }, { - "name": "tt_4_dose_today", - "source": "pkwoman.tt_4_dose_today" - }, { - "name": "tt5", - "source": "pkwoman.tt5" - }, { - "name": "tt_5_dose_today", - "source": "pkwoman.tt_5_dose_today" - }, { - "name": "instanceID", - "value": "uuid:67fd050a-b528-4de2-b382-c168730bf0df", - "source": "pkwoman.instanceID" - }] - } - }, - "serverVersion": 1458898979653 -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/woman_enrollment/model.xml b/opensrp-core/src/test/resources/form/woman_enrollment/model.xml deleted file mode 100644 index 8422c9b6c1..0000000000 --- a/opensrp-core/src/test/resources/form/woman_enrollment/model.xml +++ /dev/null @@ -1,1659 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - yes - - - - - - - - - - female - - - - - - - ${provider_province} - ${provider_city} - - - - - - - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - TT1 - - - static_instance-vaccines-1 - TT2 - - - static_instance-vaccines-2 - TT3 - - - static_instance-vaccines-3 - TT4 - - - static_instance-vaccines-4 - TT5 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-edd_lmp-0 - edd - - - static_instance-edd_lmp-1 - lmp - - - static_instance-edd_lmp-2 - ultrasound - - - static_instance-edd_lmp-3 - none - - - - - - - static_instance-ethnicity-0 - punjabi - - - static_instance-ethnicity-1 - pushtuns - - - static_instance-ethnicity-2 - sindhi - - - static_instance-ethnicity-3 - saraiki - - - static_instance-ethnicity-4 - muhajir - - - static_instance-ethnicity-5 - balochi - - - static_instance-ethnicity-6 - other - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/form/woman_followup/form.json b/opensrp-core/src/test/resources/form/woman_followup/form.json deleted file mode 100644 index 73ab628765..0000000000 --- a/opensrp-core/src/test/resources/form/woman_followup/form.json +++ /dev/null @@ -1 +0,0 @@ -{"name":"Woman_TT_Followup_Form","title":"خواتین فالواپ رجسٹر برائے ٹیکاجات - Woman TT Follow Up Form","sms_keyword":"woman_tt_followup_form","default_language":"English","choices":{"provinces":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}],"ucs":[{"province":"sindh","city":"karachi","town":"korangi","name":"bilal_colony","label":{"Urdu":"بلال کالونی","Roman Urdu":"Bilal Colony","English":"Bilal Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"nasir_colony","label":{"Urdu":"ناصر کالونی","Roman Urdu":"Nasir Colony","English":"Nasir Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"chakra_goth","label":{"Urdu":"چکرا گوٹھ","Roman Urdu":"Chakra Goth","English":"Chakra Goth"}},{"province":"sindh","city":"karachi","town":"korangi","name":"mustafa_taj_colony","label":{"Urdu":"مصطفی تاج کالونی","Roman Urdu":"Mustafa Taj Colony","English":"Mustafa Taj Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hundred_quarters","label":{"Urdu":"ہنڈریڈ کوارٹر","Roman Urdu":"Hundred Quarters","English":"Hundred Quarters"}},{"province":"sindh","city":"karachi","town":"korangi","name":"gulzar_colony","label":{"Urdu":"گلزار کالونی","Roman Urdu":"Gulzar Colony","English":"Gulzar Colony"}},{"province":"sindh","city":"karachi","town":"korangi","name":"korangi_sector_33","label":{"Urdu":"کورنگی سیکٹر 33","Roman Urdu":"Korangi Sector 33","English":"Korangi Sector 33"}},{"province":"sindh","city":"karachi","town":"korangi","name":"zaman_town","label":{"Urdu":"زمان ٹاوَن","Roman Urdu":"Zaman Town","English":"Zaman Town"}},{"province":"sindh","city":"karachi","town":"korangi","name":"hasrat_mohani_colony","label":{"Urdu":"حسرت موہانی کالونی","Roman Urdu":"Hasrat Mohani Colony","English":"Hasrat Mohani Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"gulshan_e_ghazi","label":{"Urdu":"گلشن غازی","Roman Urdu":"Gulshan-e-Ghazi","English":"Gulshan-e-Ghazi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"ittehad_town","label":{"Urdu":"اتحاد ٹاوَن","Roman Urdu":"Ittehad Town","English":"Ittehad Town"}},{"province":"sindh","city":"karachi","town":"baldia","name":"islam_nagar","label":{"Urdu":"اسلام نگر","Roman Urdu":"Islam Nagar","English":"Islam Nagar"}},{"province":"sindh","city":"karachi","town":"baldia","name":"nai_abadi","label":{"Urdu":"نئی آبادی","Roman Urdu":"Nai Abadi","English":"Nai Abadi"}},{"province":"sindh","city":"karachi","town":"baldia","name":"saeedabad","label":{"Urdu":"سعید آباد","Roman Urdu":"Saeedabad","English":"Saeedabad"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muslim_mujahid_colony","label":{"Urdu":"مسلم مجاہد کالونی","Roman Urdu":"Muslim Mujahid Colony","English":"Muslim Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"baldia","name":"muhajir_camp","label":{"Urdu":"مہاجر کیمپ","Roman Urdu":"Muhajir Camp","English":"Muhajir Camp"}},{"province":"sindh","city":"karachi","town":"baldia","name":"rasheedabad","label":{"Urdu":"رشید آباد","Roman Urdu":"Rasheedabad","English":"Rasheedabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"ibrahim_hyderi","label":{"Urdu":"ابراہیم حیدری","Roman Urdu":"Ibrahim Hyderi","English":"Ibrahim Hyderi"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"rehri","label":{"Urdu":"رہڑی","Roman Urdu":"Rehri","English":"Rehri"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"cattle_colony","label":{"Urdu":"کیٹل کالونی","Roman Urdu":"Cattle Colony","English":"Cattle Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"qaidabad","label":{"Urdu":"قائدآباد","Roman Urdu":"Qaidabad","English":"Qaidabad"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"landhi_colony","label":{"Urdu":"لانڈھی کالونی","Roman Urdu":"Landhi Colony","English":"Landhi Colony"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gulshan_e_hadeed","label":{"Urdu":"گلشن حدید","Roman Urdu":"Gulshan-e-Hadeed","English":"Gulshan-e-Hadeed"}},{"province":"sindh","city":"karachi","town":"bin_qasim","name":"gaghar","label":{"Urdu":"گگر","Roman Urdu":"Gaghar","English":"Gaghar"}},{"province":"sindh","city":"karachi","town":"gadap","name":"murad_memon_goth","label":{"Urdu":"مراد میمن گوٹھ","Roman Urdu":"Murad Memon Goth","English":"Murad Memon Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"darsano_chana","label":{"Urdu":"درشانو شنو","Roman Urdu":"Darsano Chana","English":"Darsano Chana"}},{"province":"sindh","city":"karachi","town":"gadap","name":"gujro","label":{"Urdu":"گجرو","Roman Urdu":"Gujro","English":"Gujro"}},{"province":"sindh","city":"karachi","town":"gadap","name":"songal","label":{"Urdu":"سنگل","Roman Urdu":"Songal","English":"Songal"}},{"province":"sindh","city":"karachi","town":"gadap","name":"maymarabad","label":{"Urdu":"معمار آباد","Roman Urdu":"Maymarabad","English":"Maymarabad"}},{"province":"sindh","city":"karachi","town":"gadap","name":"yousuf_goth","label":{"Urdu":"یوسف گوٹھ","Roman Urdu":"Yousuf Goth","English":"Yousuf Goth"}},{"province":"sindh","city":"karachi","town":"gadap","name":"manghopir","label":{"Urdu":"منگھوپیر","Roman Urdu":"Manghopir","English":"Manghopir"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"azizabad","label":{"Urdu":"عزیز آباد","Roman Urdu":"Azizabad","English":"Azizabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"karimabad","label":{"Urdu":"کریم آباد","Roman Urdu":"Karimabad","English":"Karimabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"aisha_manzil","label":{"Urdu":"عائشہ منزل","Roman Urdu":"Aisha Manzil","English":"Aisha Manzil"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"ancholi","label":{"Urdu":"انچولی","Roman Urdu":"Ancholi","English":"Ancholi"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"naseerabad","label":{"Urdu":"نصیرآباد","Roman Urdu":"Naseerabad","English":"Naseerabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"yaseenabad","label":{"Urdu":"یاسین آباد","Roman Urdu":"Yaseenabad","English":"Yaseenabad"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"water_pump","label":{"Urdu":"واٹرپمپ","Roman Urdu":"Water Pump","English":"Water Pump"}},{"province":"sindh","city":"karachi","town":"gulberg","name":"shafiq_mill_colony","label":{"Urdu":"شفیق مل کالونی","Roman Urdu":"Shafiq Mill Colony","English":"Shafiq Mill Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"delhi_mercantile_society","label":{"Urdu":"دہلی مرچنٹائل سوسائٹی","Roman Urdu":"Delhi Mercantile Society","English":"Delhi Mercantile Society"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"civic_centre","label":{"Urdu":"سوک سینٹر","Roman Urdu":"Civic Centre","English":"Civic Centre"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pir_ilahi_buksh_colony","label":{"Urdu":"پیر الہی بخش کالونی","Roman Urdu":"Pir Ilahi Buksh Colony","English":"Pir Ilahi Buksh Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"essa_nagri","label":{"Urdu":"عیسی نگری","Roman Urdu":"Essa Nagri","English":"Essa Nagri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal","label":{"Urdu":"گلشن اقبال","Roman Urdu":"Gulshan-e-Iqbal","English":"Gulshan-e-Iqbal"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gillani_railway_station","label":{"Urdu":"گیلانی ریلوے اسٹیشن","Roman Urdu":"Gillani Railway Station","English":"Gillani Railway Station"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"shanti_nagar","label":{"Urdu":"شانتی نگر","Roman Urdu":"Shanti Nagar","English":"Shanti Nagar"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"jamali_colony","label":{"Urdu":"جمالی کالونی","Roman Urdu":"Jamali Colony","English":"Jamali Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulshan_e_iqbal_ii","label":{"Urdu":"گلشن اقبال 2","Roman Urdu":"Gulshan-e-Iqbal II","English":"Gulshan-e-Iqbal II"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"pehlwan_goth","label":{"Urdu":"پہلوان گوٹھ","Roman Urdu":"Pehlwan Goth","English":"Pehlwan Goth"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"matrovil_colony","label":{"Urdu":"میٹروویل کالونی","Roman Urdu":"Matrovil Colony","English":"Matrovil Colony"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"gulzar_e_hijri","label":{"Urdu":"گلزار ہجری","Roman Urdu":"Gulzar-e-Hijri","English":"Gulzar-e-Hijri"}},{"province":"sindh","city":"karachi","town":"gulshan","name":"safooran_goth","label":{"Urdu":"صفورا گوٹھ","Roman Urdu":"Safooran Goth","English":"Safooran Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"akhtar_colony","label":{"Urdu":"اختر کالونی","Roman Urdu":"Akhtar Colony","English":"Akhtar Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"manzoor_colony","label":{"Urdu":"منظور کالونی","Roman Urdu":"Manzoor Colony","English":"Manzoor Colony"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"azam_basti","label":{"Urdu":"اعظم بستی","Roman Urdu":"Azam Basti","English":"Azam Basti"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"chanesar_goth","label":{"Urdu":"چنیسر گوٹھ","Roman Urdu":"Chanesar Goth","English":"Chanesar Goth"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"mahmudabad","label":{"Urdu":"محمودآباد","Roman Urdu":"Mahmudabad","English":"Mahmudabad"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس","Roman Urdu":"P.E.C.H.S.","English":"P.E.C.H.S."}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pechs_ii","label":{"Urdu":"پی۔ای۔سی۔ایچ۔ایس 2","Roman Urdu":"P.E.C.H.S. II","English":"P.E.C.H.S. II"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jut_line","label":{"Urdu":"جٹ لائن","Roman Urdu":"Jut Line","English":"Jut Line"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"central_jacob_lines","label":{"Urdu":"سینٹرل جیکب لائن","Roman Urdu":"Central Jacob Lines","English":"Central Jacob Lines"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"jamshed_quarters","label":{"Urdu":"جمشید کوارٹر","Roman Urdu":"Jamshed Quarters","English":"Jamshed Quarters"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"garden_east","label":{"Urdu":"گارڈن ایسٹ","Roman Urdu":"Garden East","English":"Garden East"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"soldier_bazar","label":{"Urdu":"سولجر بازار","Roman Urdu":"Soldier Bazar","English":"Soldier Bazar"}},{"province":"sindh","city":"karachi","town":"jamshed","name":"pakistan_quarters","label":{"Urdu":"پاکستان کوارٹر","Roman Urdu":"Pakistan Quarters","English":"Pakistan Quarters"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"bhutta_village","label":{"Urdu":"بھٹا ولیج","Roman Urdu":"Bhutta Village","English":"Bhutta Village"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"sultanabad","label":{"Urdu":"سلطان آباد","Roman Urdu":"Sultanabad","English":"Sultanabad"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"kiamari_uc","label":{"Urdu":"کیماری یوسی","Roman Urdu":"Kiamari UC","English":"Kiamari UC"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"baba_bhit","label":{"Urdu":"بابا بھٹ","Roman Urdu":"Baba Bhit","English":"Baba Bhit"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"machar_colony","label":{"Urdu":"مچھر کالونی","Roman Urdu":"Machar Colony","English":"Machar Colony"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"maripur","label":{"Urdu":"ماڑی پور","Roman Urdu":"Maripur","English":"Maripur"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"shershah","label":{"Urdu":"شیرشاہ","Roman Urdu":"SherShah","English":"SherShah"}},{"province":"sindh","city":"karachi","town":"kiamari","name":"gabo_pat","label":{"Urdu":"گابو پٹ","Roman Urdu":"Gabo Pat","English":"Gabo Pat"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muzafarabad","label":{"Urdu":"مظفرآباد","Roman Urdu":"Muzafarabad","English":"Muzafarabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"muslimabad","label":{"Urdu":"مسلم آباد","Roman Urdu":"Muslimabad","English":"Muslimabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"dawood_chowrangi","label":{"Urdu":"داوَد چورنگی","Roman Urdu":"Dawood Chowrangi","English":"Dawood Chowrangi"}},{"province":"sindh","city":"karachi","town":"landhi","name":"moinabad","label":{"Urdu":"معین آباد","Roman Urdu":"Moinabad","English":"Moinabad"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sharafi_goth","label":{"Urdu":"شرافی گوٹھ","Roman Urdu":"Sharafi Goth","English":"Sharafi Goth"}},{"province":"sindh","city":"karachi","town":"landhi","name":"bhutto_nagar","label":{"Urdu":"بھٹو نگر","Roman Urdu":"Bhutto Nagar","English":"Bhutto Nagar"}},{"province":"sindh","city":"karachi","town":"landhi","name":"khawaja_ajmeer_colony","label":{"Urdu":"خواجہ اجمیر کالونی","Roman Urdu":"Khawaja Ajmeer Colony","English":"Khawaja Ajmeer Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"landhi_uc","label":{"Urdu":"لانڈھی یوسی","Roman Urdu":"Landhi UC","English":"Landhi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"awami_colony","label":{"Urdu":"عوامی کالونی","Roman Urdu":"Awami Colony","English":"Awami Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"burmee_colony","label":{"Urdu":"برمی کالونی","Roman Urdu":"Burmee Colony","English":"Burmee Colony"}},{"province":"sindh","city":"karachi","town":"landhi","name":"korangi_uc","label":{"Urdu":"کورنگی یوسی","Roman Urdu":"Korangi UC","English":"Korangi UC"}},{"province":"sindh","city":"karachi","town":"landhi","name":"sherabad","label":{"Urdu":"شیرآباد","Roman Urdu":"Sherabad","English":"Sherabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"rizvia_society","label":{"Urdu":"رضویہ سوسائٹی","Roman Urdu":"Rizvia Society","English":"Rizvia Society"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"firdous_colony","label":{"Urdu":"فردوس کالونی","Roman Urdu":"Firdous Colony","English":"Firdous Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"super_market","label":{"Urdu":"سپر مارکیٹ","Roman Urdu":"Super Market","English":"Super Market"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"dak_khana","label":{"Urdu":"دک کھانہ","Roman Urdu":"Dak Khana","English":"Dak Khana"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"qasimabad","label":{"Urdu":"قاسم آباد","Roman Urdu":"Qasimabad","English":"Qasimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"bandhani_colony","label":{"Urdu":"بندھانی کالونی","Roman Urdu":"Bandhani Colony","English":"Bandhani Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"sharifabad","label":{"Urdu":"شریف آباد","Roman Urdu":"Sharifabad","English":"Sharifabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"commercial_area","label":{"Urdu":"کمرشل ایریا","Roman Urdu":"Commercial Area","English":"Commercial Area"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"mujahid_colony","label":{"Urdu":"مجاہد کالونی","Roman Urdu":"Mujahid Colony","English":"Mujahid Colony"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"nazimabad","label":{"Urdu":"ناظم آباد","Roman Urdu":"Nazimabad","English":"Nazimabad"}},{"province":"sindh","city":"karachi","town":"liaquatabad","name":"abbasi_shaheed","label":{"Urdu":"عباسی شہید","Roman Urdu":"Abbasi Shaheed","English":"Abbasi Shaheed"}},{"province":"sindh","city":"karachi","town":"lyari","name":"agra_taj_colony","label":{"Urdu":"آگرہ تاج کالونی","Roman Urdu":"Agra Taj Colony","English":"Agra Taj Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"daryaabad","label":{"Urdu":"دریاآباد","Roman Urdu":"Daryaabad","English":"Daryaabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"nawabad","label":{"Urdu":"نواآباد","Roman Urdu":"Nawabad","English":"Nawabad"}},{"province":"sindh","city":"karachi","town":"lyari","name":"khada_memon_society","label":{"Urdu":"خدا- میمن- سوساَٹی","Roman Urdu":"Khada Memon Society","English":"Khada Memon Society"}},{"province":"sindh","city":"karachi","town":"lyari","name":"baghdadi","label":{"Urdu":"بغدادی","Roman Urdu":"Baghdadi","English":"Baghdadi"}},{"province":"sindh","city":"karachi","town":"lyari","name":"shah_baig_line","label":{"Urdu":"شاھ باغ لائن","Roman Urdu":"Shah Baig Line","English":"Shah Baig Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"bihar_colony","label":{"Urdu":"بہار کالونی","Roman Urdu":"Bihar Colony","English":"Bihar Colony"}},{"province":"sindh","city":"karachi","town":"lyari","name":"ragiwara","label":{"Urdu":"راگی واڑا","Roman Urdu":"Ragiwara","English":"Ragiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"singo_line","label":{"Urdu":"سنگولائن","Roman Urdu":"Singo Line","English":"Singo Line"}},{"province":"sindh","city":"karachi","town":"lyari","name":"chakiwara","label":{"Urdu":"چاکی واڑا","Roman Urdu":"Chakiwara","English":"Chakiwara"}},{"province":"sindh","city":"karachi","town":"lyari","name":"allama_iqbal_colony","label":{"Urdu":"علامہ اقبال کالونی","Roman Urdu":"Allama Iqbal Colony","English":"Allama Iqbal Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"model_colony","label":{"Urdu":"موڈل کالونی","Roman Urdu":"Model Colony","English":"Model Colony"}},{"province":"sindh","city":"karachi","town":"malir","name":"kala_board","label":{"Urdu":"کالا بورڈ","Roman Urdu":"Kala Board","English":"Kala Board"}},{"province":"sindh","city":"karachi","town":"malir","name":"saudabad","label":{"Urdu":"سعودآباد","Roman Urdu":"Saudabad","English":"Saudabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"khokhra_par","label":{"Urdu":"کھوکھرا پار","Roman Urdu":"Khokhra Par","English":"Khokhra Par"}},{"province":"sindh","city":"karachi","town":"malir","name":"jafar_e_tayyar","label":{"Urdu":"جعفر تیار","Roman Urdu":"Jafar-e-Tayyar","English":"Jafar-e-Tayyar"}},{"province":"sindh","city":"karachi","town":"malir","name":"gharibabad","label":{"Urdu":"غریب آباد","Roman Urdu":"Gharibabad","English":"Gharibabad"}},{"province":"sindh","city":"karachi","town":"malir","name":"ghazi_brohi_goth","label":{"Urdu":"غازی بروہی گوٹھ","Roman Urdu":"Ghazi Brohi Goth","English":"Ghazi Brohi Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"kalyana","label":{"Urdu":"کالیانہ","Roman Urdu":"Kalyana","English":"Kalyana"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"sir_syed_colony","label":{"Urdu":"سر سید کالونی","Roman Urdu":"Sir Syed Colony","English":"Sir Syed Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"fatima_jinnah_colony","label":{"Urdu":"فاطمہ جناح کالونی","Roman Urdu":"Fatima Jinnah Colony","English":"Fatima Jinnah Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"godhra","label":{"Urdu":"گودھرا","Roman Urdu":"Godhra","English":"Godhra"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"abu_zar_ghaffari","label":{"Urdu":"ابو زر غفاری","Roman Urdu":"Abu Zar Ghaffari","English":"Abu Zar Ghaffari"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"hakim_ahsan","label":{"Urdu":"حاکم احسان","Roman Urdu":"Hakim Ahsan","English":"Hakim Ahsan"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"madina_colony","label":{"Urdu":"مدینہ کالونی","Roman Urdu":"Madina Colony","English":"Madina Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"faisal_colony","label":{"Urdu":"فیصل کالونی","Roman Urdu":"Faisal Colony","English":"Faisal Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khamiso_goth","label":{"Urdu":"خمیسو گوٹھ","Roman Urdu":"Khamiso Goth","English":"Khamiso Goth"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"mustufa_colony","label":{"Urdu":"مصطفی کالونی","Roman Urdu":"Mustufa Colony","English":"Mustufa Colony"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"khawaja_ajmeer_nagri","label":{"Urdu":"خواجہ اجمیر نگری","Roman Urdu":"Khawaja Ajmeer Nagri","English":"Khawaja Ajmeer Nagri"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"gulshan_e_saeed","label":{"Urdu":"گلشن سعید","Roman Urdu":"Gulshan-e-Saeed","English":"Gulshan-e-Saeed"}},{"province":"sindh","city":"karachi","town":"new_karachi","name":"shah_nawaz_bhutto_colony","label":{"Urdu":"شاہ نواز بھٹو کالونی","Roman Urdu":"Shah Nawaz Bhutto Colony","English":"Shah Nawaz Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"paposh_nagar","label":{"Urdu":"پاپوش نگر","Roman Urdu":"Paposh Nagar","English":"Paposh Nagar"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"pahar_ganj","label":{"Urdu":"پہاڑ گنج","Roman Urdu":"Pahar Ganj","English":"Pahar Ganj"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"khandu_goth","label":{"Urdu":"کھنڑو گوٹھ","Roman Urdu":"Khandu Goth","English":"Khandu Goth"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"hyderi","label":{"Urdu":"حیدری","Roman Urdu":"Hyderi","English":"Hyderi"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"sakhi_hassan","label":{"Urdu":"سخی حسن","Roman Urdu":"Sakhi Hassan","English":"Sakhi Hassan"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"farooq_e_azam","label":{"Urdu":"فاروق اعظم","Roman Urdu":"Farooq-e-Azam","English":"Farooq-e-Azam"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"nusrat_bhutto_colony","label":{"Urdu":"نصرت بھٹو کالونی","Roman Urdu":"Nusrat Bhutto Colony","English":"Nusrat Bhutto Colony"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"shadman_town","label":{"Urdu":"شادمان ٹاوَن","Roman Urdu":"Shadman Town","English":"Shadman Town"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone","label":{"Urdu":"بفرزون","Roman Urdu":"Buffer Zone","English":"Buffer Zone"}},{"province":"sindh","city":"karachi","town":"north_nazimabad","name":"buffer_zone_ii","label":{"Urdu":"بفرزون 2","Roman Urdu":"Buffer Zone II","English":"Buffer Zone II"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mominabad","label":{"Urdu":"مومن آباد","Roman Urdu":"Mominabad","English":"Mominabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"haryana_colony","label":{"Urdu":"حریانہ کالونی","Roman Urdu":"Haryana Colony","English":"Haryana Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"hanifabad","label":{"Urdu":"حنیف آباد","Roman Urdu":"Hanifabad","English":"Hanifabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mohammad_nagar","label":{"Urdu":"محمد نگر","Roman Urdu":"Mohammad Nagar","English":"Mohammad Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"madina_colony_orangi","label":{"Urdu":"مدینہ کالونی اورنگی","Roman Urdu":"Madina Colony Orangi","English":"Madina Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghaziabad","label":{"Urdu":"غازی آباد","Roman Urdu":"Ghaziabad","English":"Ghaziabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"chisti_nagar","label":{"Urdu":"چشتی نگر","Roman Urdu":"Chisti Nagar","English":"Chisti Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"bilal_colony_orangi","label":{"Urdu":"بلال کالونی اورنگی","Roman Urdu":"Bilal Colony Orangi","English":"Bilal Colony Orangi"}},{"province":"sindh","city":"karachi","town":"orangi","name":"iqbal_baloch_colony","label":{"Urdu":"اقبال بلوچ کالونی","Roman Urdu":"Iqbal Baloch Colony","English":"Iqbal Baloch Colony"}},{"province":"sindh","city":"karachi","town":"orangi","name":"ghabool_town","label":{"Urdu":"گبول ٹاوَن","Roman Urdu":"Ghabool Town","English":"Ghabool Town"}},{"province":"sindh","city":"karachi","town":"orangi","name":"data_nagar","label":{"Urdu":"داتا نگر","Roman Urdu":"Data Nagar","English":"Data Nagar"}},{"province":"sindh","city":"karachi","town":"orangi","name":"mujahidabad","label":{"Urdu":"مجاہد آباد","Roman Urdu":"Mujahidabad","English":"Mujahidabad"}},{"province":"sindh","city":"karachi","town":"orangi","name":"baloch_goth","label":{"Urdu":"بلوچ گوٹھ","Roman Urdu":"Baloch Goth","English":"Baloch Goth"}},{"province":"sindh","city":"karachi","town":"saddar","name":"old_haji_camp","label":{"Urdu":"پرانہ حاجی کیمپ","Roman Urdu":"Old Haji Camp","English":"Old Haji Camp"}},{"province":"sindh","city":"karachi","town":"saddar","name":"garden","label":{"Urdu":"گارڈن","Roman Urdu":"Garden","English":"Garden"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kharadar","label":{"Urdu":"کھارادر","Roman Urdu":"Kharadar","English":"Kharadar"}},{"province":"sindh","city":"karachi","town":"saddar","name":"city_railway_colony","label":{"Urdu":"سٹی ریلوے کالونی","Roman Urdu":"City Railway Colony","English":"City Railway Colony"}},{"province":"sindh","city":"karachi","town":"saddar","name":"nanak_wara","label":{"Urdu":"ناناک واڑا","Roman Urdu":"Nanak Wara","English":"Nanak Wara"}},{"province":"sindh","city":"karachi","town":"saddar","name":"gazdarabad","label":{"Urdu":"گزدرآباد","Roman Urdu":"Gazdarabad","English":"Gazdarabad"}},{"province":"sindh","city":"karachi","town":"saddar","name":"millat_nagar_islam_pura","label":{"Urdu":"ملت نگر اسلام پورا","Roman Urdu":"Millat Nagar/Islam Pura","English":"Millat Nagar/Islam Pura"}},{"province":"sindh","city":"karachi","town":"saddar","name":"saddar_uc","label":{"Urdu":"صدر یو سی","Roman Urdu":"Saddar UC","English":"Saddar UC"}},{"province":"sindh","city":"karachi","town":"saddar","name":"civil_line","label":{"Urdu":"سول لائن","Roman Urdu":"Civil Line","English":"Civil Line"}},{"province":"sindh","city":"karachi","town":"saddar","name":"clifton","label":{"Urdu":"کلفٹن","Roman Urdu":"Clifton","English":"Clifton"}},{"province":"sindh","city":"karachi","town":"saddar","name":"kehkashan","label":{"Urdu":"کہکشان","Roman Urdu":"Kehkashan","English":"Kehkashan"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"natha_khan_goth","label":{"Urdu":"ناتھا خان گوٹھ","Roman Urdu":"Natha Khan Goth","English":"Natha Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"pak_sadat_colony","label":{"Urdu":"پاک صدر کالونی","Roman Urdu":"Pak Sadat Colony","English":"Pak Sadat Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"drigh_colony","label":{"Urdu":"ڈرگ کالونی","Roman Urdu":"Drigh Colony","English":"Drigh Colony"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"raita_plot","label":{"Urdu":"رائتا پلاٹ","Roman Urdu":"Raita Plot","English":"Raita Plot"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"moria_khan_goth","label":{"Urdu":"موریا خان گوٹھ","Roman Urdu":"Moria Khan Goth","English":"Moria Khan Goth"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"rafa_e_aam_society","label":{"Urdu":"رفا عام سوسا ئٹی","Roman Urdu":"Rafa-e-Aam Society","English":"Rafa-e-Aam Society"}},{"province":"sindh","city":"karachi","town":"shah_faisal","name":"al_falah_society","label":{"Urdu":"الفلاح سوسا ئٹی","Roman Urdu":"Al-Falah Society","English":"Al-Falah Society"}},{"province":"sindh","city":"karachi","town":"site","name":"pak_colony","label":{"Urdu":"پاک کالونی","Roman Urdu":"Pak Colony","English":"Pak Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"old_golimar","label":{"Urdu":"پرانہ گولی مار","Roman Urdu":"Old Golimar","English":"Old Golimar"}},{"province":"sindh","city":"karachi","town":"site","name":"jahanabad","label":{"Urdu":"جہان آباد","Roman Urdu":"Jahanabad","English":"Jahanabad"}},{"province":"sindh","city":"karachi","town":"site","name":"metrovil","label":{"Urdu":"میٹروویل","Roman Urdu":"Metrovil","English":"Metrovil"}},{"province":"sindh","city":"karachi","town":"site","name":"bhawani_chali","label":{"Urdu":"بہوانی چالی","Roman Urdu":"Bhawani Chali","English":"Bhawani Chali"}},{"province":"sindh","city":"karachi","town":"site","name":"frontier_colony","label":{"Urdu":"فرونٹر کالونی","Roman Urdu":"Frontier Colony","English":"Frontier Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"banaras_colony","label":{"Urdu":"بنارس کالونی","Roman Urdu":"Banaras Colony","English":"Banaras Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"qasba_colony","label":{"Urdu":"قصبہ کالونی","Roman Urdu":"Qasba Colony","English":"Qasba Colony"}},{"province":"sindh","city":"karachi","town":"site","name":"islamia_colony","label":{"Urdu":"اسلامیہ کالونی","Roman Urdu":"Islamia Colony","English":"Islamia Colony"}},{"province":"na","city":"na","town":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","town":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"gender":[{"instance":{"openmrs_code":"1534AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"male","label":{"Urdu":"مرد/ لڑکا","Roman Urdu":"Mard/larka","English":"Male"}},{"instance":{"openmrs_code":"1535AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"female","label":{"Urdu":"عورت/لڑکی","Roman Urdu":"Aurat/larki","English":"Female"}},{"instance":{"openmrs_code":"163163AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"transgender","label":{"Urdu":"خواجہ سرہ","Roman Urdu":"Khwaja sira","English":"Transgender"}}],"vaccines":[{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT1","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT2","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT3","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT4","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"instance":{"openmrs_code":"84880AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"TT5","label":{"Urdu":"ٹی ٹی 5","Roman Urdu":"TT5","English":"TT5"}}],"towns":[{"province":"sindh","city":"karachi","name":"korangi","label":{"Urdu":"کورنگی","Roman Urdu":"Korangi","English":"Korangi"}},{"province":"sindh","city":"karachi","name":"landhi","label":{"Urdu":"لانڈھی","Roman Urdu":"Landhi","English":"Landhi"}},{"province":"sindh","city":"karachi","name":"baldia","label":{"Urdu":"بلدیہ","Roman Urdu":"Baldia","English":"Baldia"}},{"province":"sindh","city":"karachi","name":"bin_qasim","label":{"Urdu":"بن قاسم","Roman Urdu":"Bin Qasim","English":"Bin Qasim"}},{"province":"sindh","city":"karachi","name":"gadap","label":{"Urdu":"گڈاپ","Roman Urdu":"Gadap","English":"Gadap"}},{"province":"sindh","city":"karachi","name":"gulberg","label":{"Urdu":"گلبرگ","Roman Urdu":"Gulberg","English":"Gulberg"}},{"province":"sindh","city":"karachi","name":"gulshan","label":{"Urdu":"گلشن","Roman Urdu":"Gulshan","English":"Gulshan"}},{"province":"sindh","city":"karachi","name":"jamshed","label":{"Urdu":"جمشید","Roman Urdu":"Jamshed","English":"Jamshed"}},{"province":"sindh","city":"karachi","name":"kiamari","label":{"Urdu":"کیماری","Roman Urdu":"Kiamari","English":"Kiamari"}},{"province":"sindh","city":"karachi","name":"liaquatabad","label":{"Urdu":"لیاقت آباد","Roman Urdu":"Liaquatabad","English":"Liaquatabad"}},{"province":"sindh","city":"karachi","name":"lyari","label":{"Urdu":"لیاری","Roman Urdu":"Lyari","English":"Lyari"}},{"province":"sindh","city":"karachi","name":"malir","label":{"Urdu":"ملیر","Roman Urdu":"Malir","English":"Malir"}},{"province":"sindh","city":"karachi","name":"new_karachi","label":{"Urdu":"نیو کراچی","Roman Urdu":"New Karachi","English":"New Karachi"}},{"province":"sindh","city":"karachi","name":"north_nazimabad","label":{"Urdu":"نارتھ ناظم آباد","Roman Urdu":"North Nazimabad","English":"North Nazimabad"}},{"province":"sindh","city":"karachi","name":"orangi","label":{"Urdu":"اورنگی","Roman Urdu":"Orangi","English":"Orangi"}},{"province":"sindh","city":"karachi","name":"saddar","label":{"Urdu":"صدر","Roman Urdu":"Saddar","English":"Saddar"}},{"province":"sindh","city":"karachi","name":"shah_faisal","label":{"Urdu":"شاہ فیصل","Roman Urdu":"Shah Faisal","English":"Shah Faisal"}},{"province":"sindh","city":"karachi","name":"site","label":{"Urdu":"سائٹ","Roman Urdu":"S.I.T.E.","English":"S.I.T.E."}},{"province":"na","city":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","city":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Qaabil-e-atlaaq nahi","English":"Not Applicable"}}],"cities":[{"province":"sindh","name":"karachi","label":{"Urdu":"کراچی","Roman Urdu":"Karachi","English":"Karachi"}},{"province":"punjab","name":"hafizabad","label":{"Urdu":"حافظ آباد","Roman Urdu":"Hafizabad","English":"Hafizabad"}},{"province":"punjab","name":"muzaffargarh","label":{"Urdu":"مظفر گڑھ","Roman Urdu":"Muzaffargarh","English":"Muzaffargarh"}},{"province":"na","name":"other","label":{"Urdu":"دیگر","Roman Urdu":"Deegar","English":"Other"}},{"province":"na","name":"not_applicable","label":{"Urdu":"قابل اطلاق نہیں","Roman Urdu":"Not Applicable","English":"Not Applicable"}}],"edd_lmp":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}],"yes_no":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},"instance":{"encounter_type":"Woman TT Follow Up"},"version":"201604080459","id_string":"woman_tt_followup_form","type":"survey","children":[{"type":"hidden","name":"provider_uc"},{"type":"hidden","name":"provider_town"},{"type":"hidden","name":"provider_city"},{"type":"hidden","name":"provider_province"},{"type":"hidden","name":"existing_landmark"},{"type":"hidden","name":"existing_house_number"},{"type":"hidden","name":"existing_street"},{"type":"hidden","name":"existing_union_council"},{"type":"hidden","name":"existing_town"},{"type":"hidden","name":"existing_city_village"},{"type":"hidden","name":"existing_province"},{"type":"hidden","name":"existing_union_councilname"},{"type":"hidden","name":"existing_townname"},{"type":"hidden","name":"existing_city_villagename"},{"type":"hidden","name":"existing_provincename"},{"type":"hidden","name":"existing_first_name"},{"type":"hidden","name":"existing_last_name"},{"type":"hidden","name":"existing_father_name"},{"type":"hidden","name":"existing_husband_name"},{"type":"hidden","name":"existing_marriage"},{"type":"hidden","name":"existing_calc_dob_confirm"},{"type":"hidden","name":"existing_gender"},{"type":"hidden","name":"existing_ethnicity"},{"type":"hidden","name":"existing_client_reg_date"},{"type":"hidden","name":"existing_program_client_id"},{"type":"hidden","name":"existing_epi_card_number"},{"type":"hidden","name":"existing_reminders_approval"},{"type":"hidden","name":"existing_contact_phone_number"},{"type":"hidden","name":"e_tt1"},{"type":"hidden","name":"e_tt2"},{"type":"hidden","name":"e_tt3"},{"type":"hidden","name":"e_tt4"},{"type":"hidden","name":"e_tt5"},{"type":"hidden","name":"provider_id"},{"instance":{"openmrs_entity_id":"location_id","openmrs_entity":"encounter"},"type":"hidden","name":"provider_location_id"},{"type":"hidden","name":"provider_location_name"},{"type":"note","name":"provider_location_note","label":{"Urdu":"شہر: ${provider_city} ; ٹائون: ${provider_town} ; یوسی: ${provider_uc} ; سینٹرکا نام: ${provider_location_name}","English":"City: ${provider_city} ; Town: ${provider_town} ; UC: ${provider_uc} ; Center Name: ${provider_location_name}"}},{"instance":{"openmrs_entity_id":"163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"start","name":"start"},{"instance":{"openmrs_entity_id":"163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"end","name":"end"},{"instance":{"openmrs_entity_id":"163286AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"today","name":"today"},{"instance":{"openmrs_entity_id":"163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"deviceid","name":"deviceid"},{"instance":{"openmrs_entity_id":"163150AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"subscriberid","name":"subscriberid"},{"instance":{"openmrs_entity_id":"163151AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"simserial","name":"simserial"},{"instance":{"openmrs_entity_id":"163152AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"phonenumber","name":"phonenumber"},{"bind":{"required":"yes"},"type":"note","name":"client_reg_date_note","label":{"Urdu":"${existing_client_reg_date} :پروگرام میں اندراج کی تاریخ","Roman Urdu":"Program main andraaj ki tareekh: ${existing_client_reg_date}","English":"Client Registration date: ${existing_client_reg_date}"}},{"bind":{"required":"yes"},"type":"note","name":"program_client_id_note","label":{"Urdu":"${existing_program_client_id}:کلائنٹ کی پروگرام ائی ڈی","Roman Urdu":"Client ki program ID: ${existing_program_client_id}","English":"Program Client ID: ${existing_program_client_id}"}},{"bind":{"required":"yes"},"type":"note","name":"epi_card_number_note","label":{"Urdu":"${existing_epi_card_number}: کارڈ نمبر","Roman Urdu":"Card Number: ${existing_epi_card_number}","English":"EPI Card Number: ${existing_epi_card_number}"}},{"bind":{"required":"yes"},"type":"note","name":"first_name_note","label":{"Urdu":"${existing_first_name}: نام","Roman Urdu":"Naam: ${existing_first_name}","English":"First Name: ${existing_first_name}"}},{"bind":{"required":"yes"},"type":"note","name":"last_name_note","label":{"Urdu":"والد کا نام: ${existing_last_name}","Roman Urdu":"Waalid ka naam: ${existing_last_name}","English":"Last name: ${existing_last_name}"}},{"bind":{"calculate":"date( today() - (${existing_calc_dob_confirm} div 365))"},"type":"calculate","name":"client_age","instance":{"openmrs_entity_id":"154384AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"type":"note","name":"member_birth_date_note","label":{"Urdu":"کلائنٹ کی تاریخِ پیدائش: {existing_calc_dob_confirm}$ ({client_age}$) سال","English":"Client birth date: ${existing_calc_dob_confirm} (${client_age}) years","Roman Urdu":"Client ki tareekh-e-pedaaish: ${existing_calc_dob_confirm} (${client_age}) years"}},{"bind":{"required":"yes"},"type":"note","name":"gender_note","label":{"Urdu":"${existing_gender}: جنس","Roman Urdu":"Jins:${existing_gender}","English":"Gender: ${existing_gender}"}},{"type":"note","name":"father_name_note","label":{"Urdu":"والد کا نام: {existing_father_name}$","English":"Father's Name: ${existing_father_name}","Roman Urdu":"Waalid ka naam: ${existing_father_name}"}},{"type":"note","name":"marriage_note","label":{"Urdu":"کیا آپ شادی شدہ ہیں: {existing_marriage}$","English":"Are you married: ${existing_marriage}","Roman Urdu":"Kya aap shaadi shuda hain: ${existing_marriage}"}},{"type":"note","name":"husband_name_note","label":{"Urdu":"شوہر کا نام: {existing_husband_name}$","English":"Husband's name: ${existing_husband_name}","Roman Urdu":"Shohar ka naam: ${existing_husband_name}"}},{"bind":{"required":"yes"},"type":"note","name":"ethnicity_note","label":{"Urdu":"قومیت: {existing_ethnicity}$","Roman Urdu":"Qomiat: ${existing_ethnicity}","English":"Ethnicity: ${existing_ethnicity}"}},{"type":"note","name":"address","label":{"Urdu":"موجودہ پتہ: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","English":"Current Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}","Roman Urdu":"Mojooda Address: ${existing_house_number}, ${existing_street}, ${existing_landmark}, ${existing_union_councilname}, ${existing_townname}, ${existing_city_villagename}, ${existing_provincename}"}},{"label":{"Urdu":"کیا آپ کا گھر کا پتہ بدلا ہے؟","English":"Has your home address changed?","Roman Urdu":"Kya aap ka ghar ka pata badla hai?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"address_change"},{"control":{"appearance":"minimal"},"name":"province","default":"${provider_province}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"صوبہ","Roman Urdu":"Suba","English":"Province"},"instance":{"openmrs_entity":"person_address","openmrs_entity_id":"stateProvince","openmrs_entity_parent":"usual_residence"},"type":"select one","children":[{"name":"kpk","label":{"Urdu":"خیبر پختون خواہ","English":"Khyber Pakhtunkhwa","Roman Urdu":"Khyber Pakhtunkhwa"}},{"name":"sindh","label":{"Urdu":"سندھ","English":"Sindh","Roman Urdu":"Sindh"}},{"name":"balochistan","label":{"Urdu":"بلوچستان","English":"Balochistan","Roman Urdu":"Balochistan"}},{"name":"punjab","label":{"Urdu":"پنجاب","English":"Punjab","Roman Urdu":"Punjab"}},{"name":"gilgit_baltistan","label":{"Urdu":"گلگت بلتستان","English":"Gilgit Baltistan","Roman Urdu":"Gilgit Baltistan"}},{"name":"kashmir","label":{"Urdu":"کشمیر","English":"Kashmir","Roman Urdu":"Kashmir"}},{"name":"fata","label":{"Urdu":"فاٹا","English":"FATA","Roman Urdu":"FATA"}},{"name":"out_of_country","label":{"Urdu":"ملک سے باہر","English":"Out of Country","Roman Urdu":"Mulk se baahir"}}]},{"control":{"appearance":"minimal"},"name":"city_village","choice_filter":"province=${province} or province='na'","default":"${provider_city}","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"شہر","Roman Urdu":"Shehr","English":"City"},"itemset":"cities","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"cityVillage","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"town","choice_filter":"(province=${province} and city=${city_village} ) or city='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"ٹاٰئون/ قصبہ/ بستی","Roman Urdu":"Town / Qasbah / Basti","English":"Town"},"itemset":"towns","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"town","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"control":{"appearance":"minimal"},"name":"union_council","choice_filter":"(province=${province} and city=${city_village} and town=${town}) or town='na'","bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"label":{"Urdu":"یونین کونسل","Roman Urdu":"Union Council","English":"Union Council"},"itemset":"ucs","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"subTown","openmrs_entity_parent":"usual_residence"},"type":"select one"},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"house","openmrs_entity_parent":"usual_residence"},"name":"house_number","label":{"Urdu":"گھر کا نمبر","Roman Urdu":"Ghar ka number","English":"House Number"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"street","openmrs_entity_parent":"usual_residence"},"name":"street","label":{"Urdu":"گلی/کالونی/محلہ","Roman Urdu":"Gali/Colony/Mohalla","English":"Street"}},{"bind":{"relevant":"selected(${address_change}, 'yes')","required":"yes"},"type":"text","instance":{"openmrs_entity":"person_address","openmrs_entity_id":"landmark","openmrs_entity_parent":"usual_residence"},"name":"landmark","label":{"Urdu":"گھر کے قریب کوئی مشہور جگہ","Roman Urdu":"Ghar ke qareeb koi mashoor jagah","English":"Land Mark"}},{"instance":{"openmrs_entity_id":"163277AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"geopoint","name":"center_gps","label":{"Urdu":"حاصل کردہ معلومات کی جگہ کے GPS کارڈینیٹس درج کریں","English":"Collect GPS coordinates of data entry location:","Roman Urdu":"Hasil karda malomaat ki jaga ke GPS coordinates darj karain"}},{"control":{"appearance":"minimal"},"name":"reminders_approval","bind":{"required":"yes"},"label":{"Urdu":"کیا آپ اپنے بچے کی اگلی ویکسین کی تاریخ کے لیے SMS موصول کرنا چاہتے ہیں؟ {existing_reminders_approval}$","English":"Are you willing to receive SMS reminders for your next visit? ${existing_reminders_approval}","Roman Urdu":"Kya aap apnay bachay ki agli vaccine ki tareekh ke liye SMS mausool karna chahtay hain? ${existing_reminders_approval}"},"instance":{"openmrs_entity_id":"163089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"فون نمبر گیارہ ہندسوں پر مشتمل اور مندرجہ ذیل شکل میں ہونا چاہئے: *********03","English":"Phone number should be 11 digits in the following format: 03*********","Roman Urdu":"Phone number 11 hindason par mushtamil aur mundarja zail shakal main hona chahiey: 03*********"},"relevant":"${existing_reminders_approval}='yes'","constraint":"regex(., '^03[0-9]{9}$')"},"type":"text","instance":{"openmrs_entity_id":"159635AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"contact_phone_number","label":{"Urdu":"موبائل نمبر:{existing_contact_phone_number}$","English":"Mobile Number: ${existing_contact_phone_number}","Roman Urdu":"Mobile Number: ${existing_contact_phone_number}"}},{"instance":{"openmrs_entity_id":"5272AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"label":{"Urdu":"کیا خا تون حاملہ ہیں؟","English":"Is female pregnant?","Roman Urdu":"Kia khatoon haamla hain?"},"type":"select one","children":[{"instance":{"openmrs_code":"1065AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"yes","label":{"Urdu":"ہاں","Roman Urdu":"Yes","English":"Yes"}},{"instance":{"openmrs_code":"1066AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"no","label":{"Urdu":"نہیں","Roman Urdu":"No","English":"No"}}],"name":"pregnant"},{"name":"edd_lmp","bind":{"relevant":"selected (${pregnant}, 'yes')"},"label":{"Urdu":"کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟","English":"Do you know your LMP, EDD or last Ultrasound information?","Roman Urdu":"Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai?"},"instance":{"openmrs_entity_id":"160697AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"type":"select one","children":[{"instance":{"openmrs_code":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"EDD","English":"EDD"}},{"instance":{"openmrs_code":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"lmp","label":{"Urdu":"پچھلی مہواری کی تاریخ","Roman Urdu":"LMP","English":"LMP"}},{"instance":{"openmrs_code":"159617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"ultrasound","label":{"Urdu":"الٹرا سائونڈ","Roman Urdu":"Ultrasound","English":"Ultrasound"}},{"instance":{"openmrs_code":"1107AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"none","label":{"Urdu":"کوئی بھی نہیں","Roman Urdu":"Koi bhi nahi","English":"None of the above"}}]},{"bind":{"jr:constraintMsg":{"Urdu":"زچگی کی متوقع تاریخ ماضی کی نہیں ہو سکتی","Roman Urdu":"Zachgi ki mutawaqqa tareekh maazi ki nahi hosakti","English":"EDD cannot be in the past"},"relevant":"selected (${edd_lmp}, 'edd')","constraint":".>=${today}"},"type":"date","name":"edd","label":{"Urdu":"زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh","English":"EDD"}},{"bind":{"jr:constraintMsg":{"Urdu":"پچھلی ماہواری کی تاریخ مستقبل کی نہیں ہوسکتی","Roman Urdu":"Pichli mahwaari ki tareekh mustaqbil ki nahi hosakti","English":"LMP cannot be in the future"},"relevant":"selected (${edd_lmp}, 'lmp')","constraint":".<=${today}"},"type":"date","name":"lmp","label":{"Urdu":"پچھلی ماہواری کی تاریخ","Roman Urdu":"Pichli mahwaari ki tareekh","English":"LMP"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"date","instance":{"openmrs_entity_id":"163165AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"},"name":"ultrasound_date","label":{"Urdu":"الٹرا سائونڈ کی تاریخ","English":"Ultrasound Date","Roman Urdu":"Ultrasound ki tareekh"}},{"bind":{"relevant":"selected (${edd_lmp}, 'ultrasound')"},"type":"integer","name":"ultrasound_weeks","label":{"Urdu":"الٹرا سائونڈ کی مدد سے حمل کی مدت [ہفتوں میں]","Roman Urdu":"Ultrasound ki madad se hamal ki muddat (hafton me)","English":"Gestational age determined by ultrasound"}},{"bind":{"calculate":"date(${lmp}+280)"},"type":"calculate","name":"edd_calc_lmp"},{"bind":{"calculate":"date((280-(${ultrasound_weeks}*7)+${ultrasound_date} ))"},"type":"calculate","name":"edd_calc_ultrasound"},{"bind":{"calculate":"format-date(${edd_calc_lmp}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_lmp_formatted"},{"bind":{"calculate":"format-date(${edd_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"edd_calc_ultrasound_formatted"},{"bind":{"calculate":"date(${edd}-280)"},"type":"calculate","name":"lmp_calc_edd"},{"bind":{"calculate":"date(${ultrasound_date}-(${ultrasound_weeks}*7))"},"type":"calculate","name":"lmp_calc_ultrasound"},{"bind":{"calculate":"format-date(${lmp_calc_edd}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_edd_formatted"},{"bind":{"calculate":"format-date(${lmp_calc_ultrasound}, '%Y-%n-%e')"},"type":"calculate","name":"lmp_calc_ultrasound_formatted"},{"bind":{"calculate":"if(${edd_lmp}='lmp',${edd_calc_lmp_formatted},if(${edd_lmp}='edd',${edd} ,if(${edd_lmp}='ultrasound',${edd_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_edd","instance":{"openmrs_entity_id":"5596AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${lmp},if(${edd_lmp}='edd',${lmp_calc_edd_formatted} ,if(${edd_lmp}='ultrasound',${lmp_calc_ultrasound_formatted},'')))"},"type":"calculate","name":"final_lmp","instance":{"openmrs_entity_id":"1427AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"calculate":"int((${vaccination_date} - (${edd}-280))div7)"},"type":"calculate","name":"ga_edd"},{"bind":{"calculate":"int((${vaccination_date} - ${lmp})div7)"},"type":"calculate","name":"ga_lmp"},{"bind":{"calculate":"int((${vaccination_date} -(${ultrasound_date}-(${ultrasound_weeks}*7)))div7)"},"type":"calculate","name":"ga_ult"},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_edd_note","label":{"Urdu":"${final_edd}: زچگی کی متوقع تاریخ","Roman Urdu":"Zachgi ki mutawaqqa tareekh: ${final_edd}","English":"EDD: ${final_edd}"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_lmp_note","label":{"Urdu":"پچھلی ماہواری کی تاریخ :{final_lmp}$","Roman Urdu":"Pichli mahwaari ki tareekh: ${final_lmp}","English":"LMP: ${final_lmp}"}},{"bind":{"calculate":"if(${edd_lmp}='lmp',${ga_lmp},if(${edd_lmp}='edd',${ga_edd} ,if(${edd_lmp}='ultrasound',${ga_ult},'')))"},"type":"calculate","name":"final_ga","instance":{"openmrs_entity_id":"163166AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity":"concept"}},{"bind":{"relevant":"selected (${pregnant}, 'yes')"},"type":"note","name":"final_ga_note","label":{"Urdu":"حمل کی مُدّت: {final_ga}$ ہفتے","Roman Urdu":"Hamal ki muddat: ${final_ga} weeks","English":"GA: ${final_ga} weeks"}},{"name":"vaccines","choice_filter":"name != if( ${e_tt1} != '', 'TT1' , '') and \nname != if( ${e_tt2} != '', 'TT2' , '') and \nname != if( ${e_tt3} != '', 'TT3' , '') and \nname != if( ${e_tt4} != '', 'TT4' , '') and \nname != if( ${e_tt5} != '', 'TT5' , '')","default":"minimal","label":{"Urdu":"پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے","Roman Urdu":"Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye","English":"Retro vaccines"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1421AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"relevant":"selected(${vaccines},'TT1')","constraint":"(.<=${today} and .<=${existing_client_reg_date})"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt1_retro","label":{"Urdu":"ٹی ٹی 1","Roman Urdu":"TT1","English":"TT1"}},{"bind":{"relevant":"selected(${vaccines},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","constraint":"(.<=${today} and .>=${tt1_retro} and ((selected(${vaccines}, 'TT1'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt2_retro","label":{"Urdu":"ٹی ٹی 2","Roman Urdu":"TT2","English":"TT2"}},{"bind":{"relevant":"selected(${vaccines},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","constraint":"(.<=${today} and .>=${tt2_retro} and ((selected(${vaccines}, 'TT2'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt3_retro","label":{"Urdu":"ٹی ٹی 3","Roman Urdu":"TT3","English":"TT3"}},{"bind":{"relevant":"selected(${vaccines},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","constraint":"(.<=${today} and .>=${tt3_retro} and ((selected(${vaccines}, 'TT3'))))"},"type":"date","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"name":"tt4_retro","label":{"Urdu":"ٹی ٹی 4","Roman Urdu":"TT4","English":"TT4"}},{"bind":{"relevant":"selected(${vaccines},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"name":"vaccines_2","choice_filter":"name != if( ${e_tt1} != '', 'TT1' , '') and \nname != if( ${e_tt2} != '', 'TT2' , '') and \nname != if( ${e_tt3} != '', 'TT3' , '') and \nname != if( ${e_tt4} != '', 'TT4' , '') and \nname != if( ${e_tt5} != '', 'TT5' , '') and \nname != if( selected(${vaccines}, 'TT1') , 'TT1', '') and \nname != if( selected(${vaccines}, 'TT2') , 'TT2', '') and \nname != if( selected(${vaccines}, 'TT3') , 'TT3', '') and \nname != if( selected(${vaccines}, 'TT4') , 'TT4', '') and \nname != if( selected(${vaccines}, 'TT5') , 'TT5', '')","bind":{"required":"yes"},"label":{"Urdu":"آج کون کون سی ویکسین دی گئی ہیں؟","Roman Urdu":"Aaj kon kon si vaccine di gai hain?","English":"Vaccine administered today"},"itemset":"vaccines","instance":{"openmrs_entity":"concept","openmrs_entity_id":"984AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"1441AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"},"type":"select all that apply"},{"bind":{"required":"yes"},"type":"date","instance":{"openmrs_entity_id":"encounter_date","openmrs_entity":"encounter"},"name":"vaccination_date","label":{"Urdu":"تاریخ","English":"Vaccination date","Roman Urdu":"Tareekh"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT1'),${vaccination_date},'')"},"type":"calculate","name":"tt1","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT1')","calculate":"1"},"type":"calculate","name":"tt_1_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT2'),${vaccination_date},'')"},"type":"calculate","name":"tt2","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT2')","calculate":"2"},"type":"calculate","name":"tt_2_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT3'),${vaccination_date},'')"},"type":"calculate","name":"tt3","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT3')","calculate":"3"},"type":"calculate","name":"tt_3_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT4'),${vaccination_date},'')"},"type":"calculate","name":"tt4","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT4')","calculate":"4"},"type":"calculate","name":"tt_4_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"calculate":"if(selected(${vaccines_2}, 'TT5'),${vaccination_date},'')"},"type":"calculate","name":"tt5","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"bind":{"relevant":"selected(${vaccines_2},'TT5')","calculate":"5"},"type":"calculate","name":"tt_5_dose_today","instance":{"openmrs_entity":"concept","openmrs_entity_id":"1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA","openmrs_entity_parent":"104528AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"}},{"control":{"bodyless":true},"type":"group","children":[{"bind":{"readonly":"true()","calculate":"concat('uuid:', uuid())"},"type":"calculate","name":"instanceID"}],"name":"meta"}]} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/woman_followup/form.xml b/opensrp-core/src/test/resources/form/woman_followup/form.xml deleted file mode 100644 index 678d93463a..0000000000 --- a/opensrp-core/src/test/resources/form/woman_followup/form.xml +++ /dev/null @@ -1,1435 +0,0 @@ -
- - -

خواتین فالواپ رجسٹر برائے ٹیکاجات - Woman TT Follow Up Form

-
-
- - کیا آپ کا گھر کا پتہ بدلا ہے؟ - Kya aap ka ghar ka pata badla hai? - - Has your home address changed? -
- - -
-
-
-
- - کیا خا تون حاملہ ہیں؟ - Kia khatoon haamla hain? - - Is female pregnant? -
- - -
-
-
-
- - کیا آپ کو اپنی پچھلی ماہواری کی تاریخ، زچگی کی متوقع تاریخ، یا الٹرا سائونڈ کا علم ہے؟ - Kya aap ko apni pichli mahwaari ki tareekh, zachgi ki mutawaqqa tareekh ya ultrasound ka ilm hai? - - Do you know your LMP, EDD or last Ultrasound information? -
- - - - -
-
-
-
- - پچھلی تاریخ جب کسی اور سینٹر پر ٹیکہ لگوایا گیا یا قطرے پلائے گئے - Pichli tareekh jab kissi aur center par teeka lagwaya gaya ya katray pilaey gaye - - Retro vaccines -
- - - ٹی ٹی 1 - TT1 - - TT1 - ٹی ٹی 2 - TT2 - - TT2 - ٹی ٹی 3 - TT3 - - TT3 - ٹی ٹی 4 - TT4 - - TT4 - ٹی ٹی 5 - TT5 - - TT5 -
-
-
-
- - آج کون کون سی ویکسین دی گئی ہیں؟ - Aaj kon kon si vaccine di gai hain? - - Vaccine administered today - * -
- - - ٹی ٹی 1 - TT1 - - TT1 - ٹی ٹی 2 - TT2 - - TT2 - ٹی ٹی 3 - TT3 - - TT3 - ٹی ٹی 4 - TT4 - - TT4 - ٹی ٹی 5 - TT5 - - TT5 -
-
-
- -
diff --git a/opensrp-core/src/test/resources/form/woman_followup/form_definition.json b/opensrp-core/src/test/resources/form/woman_followup/form_definition.json deleted file mode 100644 index b1d257f7a1..0000000000 --- a/opensrp-core/src/test/resources/form/woman_followup/form_definition.json +++ /dev/null @@ -1,384 +0,0 @@ -{ - "form_data_definition_version" : "1", - "form" : { - "bind_type" : "pkwoman", - "default_bind_path" : "/model/instance/Woman_TT_Followup_Form/", - "fields" : [ { - "name" : "id", - "shouldLoadValue" : true - }, { - "name" : "provider_uc", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_uc", - "shouldLoadValue" : true - }, { - "name" : "provider_town", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_town", - "shouldLoadValue" : true - }, { - "name" : "provider_city", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_city", - "shouldLoadValue" : true - }, { - "name" : "provider_province", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_province", - "shouldLoadValue" : true - }, { - "name" : "existing_landmark", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_landmark", - "shouldLoadValue" : true - }, { - "name" : "existing_house_number", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_house_number", - "shouldLoadValue" : true - }, { - "name" : "existing_street", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_street", - "shouldLoadValue" : true - }, { - "name" : "existing_union_council", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_union_council", - "shouldLoadValue" : true - }, { - "name" : "existing_town", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_town", - "shouldLoadValue" : true - }, { - "name" : "existing_city_village", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_city_village", - "shouldLoadValue" : true - }, { - "name" : "existing_province", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_province", - "shouldLoadValue" : true - }, { - "name" : "existing_union_councilname", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_union_councilname", - "shouldLoadValue" : true - }, { - "name" : "existing_townname", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_townname", - "shouldLoadValue" : true - }, { - "name" : "existing_city_villagename", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_city_villagename", - "shouldLoadValue" : true - }, { - "name" : "existing_provincename", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_provincename", - "shouldLoadValue" : true - }, { - "name" : "existing_first_name", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_first_name", - "shouldLoadValue" : true - }, { - "name" : "existing_last_name", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_last_name", - "shouldLoadValue" : true - }, { - "name" : "existing_father_name", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_father_name", - "shouldLoadValue" : true - }, { - "name" : "existing_husband_name", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_husband_name", - "shouldLoadValue" : true - }, { - "name" : "existing_marriage", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_marriage", - "shouldLoadValue" : true - }, { - "name" : "existing_birthdate", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_calc_dob_confirm", - "shouldLoadValue" : true - }, { - "name" : "existing_gender", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_gender", - "shouldLoadValue" : true - }, { - "name" : "existing_ethnicity", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_ethnicity", - "shouldLoadValue" : true - }, { - "name" : "existing_client_reg_date", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_client_reg_date", - "shouldLoadValue" : true - }, { - "name" : "existing_program_client_id", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_program_client_id", - "shouldLoadValue" : true - }, { - "name" : "existing_epi_card_number", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_epi_card_number", - "shouldLoadValue" : true - }, { - "name" : "existing_reminders_approval", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_reminders_approval" - }, { - "name" : "existing_contact_phone_number", - "bind" : "/model/instance/Woman_TT_Followup_Form/existing_contact_phone_number" - }, { - "name" : "e_tt1", - "bind" : "/model/instance/Woman_TT_Followup_Form/e_tt1", - "shouldLoadValue" : true - }, { - "name" : "e_tt2", - "bind" : "/model/instance/Woman_TT_Followup_Form/e_tt2", - "shouldLoadValue" : true - }, { - "name" : "e_tt3", - "bind" : "/model/instance/Woman_TT_Followup_Form/e_tt3", - "shouldLoadValue" : true - }, { - "name" : "e_tt4", - "bind" : "/model/instance/Woman_TT_Followup_Form/e_tt4", - "shouldLoadValue" : true - }, { - "name" : "e_tt5", - "bind" : "/model/instance/Woman_TT_Followup_Form/e_tt5", - "shouldLoadValue" : true - }, { - "name" : "provider_id", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_id", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_location_id", - "shouldLoadValue" : true - }, { - "name" : "provider_location_name", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_location_name", - "shouldLoadValue" : true - }, { - "name" : "provider_location_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/provider_location_note" - }, { - "name" : "start", - "bind" : "/model/instance/Woman_TT_Followup_Form/start" - }, { - "name" : "end", - "bind" : "/model/instance/Woman_TT_Followup_Form/end" - }, { - "name" : "today", - "bind" : "/model/instance/Woman_TT_Followup_Form/today" - }, { - "name" : "deviceid", - "bind" : "/model/instance/Woman_TT_Followup_Form/deviceid" - }, { - "name" : "subscriberid", - "bind" : "/model/instance/Woman_TT_Followup_Form/subscriberid" - }, { - "name" : "simserial", - "bind" : "/model/instance/Woman_TT_Followup_Form/simserial" - }, { - "name" : "phonenumber", - "bind" : "/model/instance/Woman_TT_Followup_Form/phonenumber" - }, { - "name" : "client_reg_date_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/client_reg_date_note" - }, { - "name" : "program_client_id_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/program_client_id_note" - }, { - "name" : "epi_card_number_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/epi_card_number_note" - }, { - "name" : "first_name_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/first_name_note" - }, { - "name" : "last_name_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/last_name_note" - }, { - "name" : "client_age", - "bind" : "/model/instance/Woman_TT_Followup_Form/client_age" - }, { - "name" : "member_birth_date_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/member_birth_date_note" - }, { - "name" : "gender_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/gender_note" - }, { - "name" : "father_name_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/father_name_note" - }, { - "name" : "marriage_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/marriage_note" - }, { - "name" : "husband_name_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/husband_name_note" - }, { - "name" : "ethnicity_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/ethnicity_note" - }, { - "name" : "address", - "bind" : "/model/instance/Woman_TT_Followup_Form/address" - }, { - "name" : "address_change", - "bind" : "/model/instance/Woman_TT_Followup_Form/address_change" - }, { - "name" : "province", - "bind" : "/model/instance/Woman_TT_Followup_Form/province" - }, { - "name" : "city_village", - "bind" : "/model/instance/Woman_TT_Followup_Form/city_village" - }, { - "name" : "town", - "bind" : "/model/instance/Woman_TT_Followup_Form/town" - }, { - "name" : "union_council", - "bind" : "/model/instance/Woman_TT_Followup_Form/union_council" - }, { - "name" : "house_number", - "bind" : "/model/instance/Woman_TT_Followup_Form/house_number" - }, { - "name" : "street", - "bind" : "/model/instance/Woman_TT_Followup_Form/street" - }, { - "name" : "landmark", - "bind" : "/model/instance/Woman_TT_Followup_Form/landmark" - }, { - "name" : "center_gps", - "bind" : "/model/instance/Woman_TT_Followup_Form/center_gps" - }, { - "name" : "reminders_approval", - "bind" : "/model/instance/Woman_TT_Followup_Form/reminders_approval" - }, { - "name" : "contact_phone_number", - "bind" : "/model/instance/Woman_TT_Followup_Form/contact_phone_number" - }, { - "name" : "pregnant", - "bind" : "/model/instance/Woman_TT_Followup_Form/pregnant" - }, { - "name" : "edd_lmp", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd_lmp" - }, { - "name" : "edd", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd" - }, { - "name" : "lmp", - "bind" : "/model/instance/Woman_TT_Followup_Form/lmp" - }, { - "name" : "ultrasound_date", - "bind" : "/model/instance/Woman_TT_Followup_Form/ultrasound_date" - }, { - "name" : "ultrasound_weeks", - "bind" : "/model/instance/Woman_TT_Followup_Form/ultrasound_weeks" - }, { - "name" : "edd_calc_lmp", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd_calc_lmp" - }, { - "name" : "edd_calc_ultrasound", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd_calc_ultrasound" - }, { - "name" : "edd_calc_lmp_formatted", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd_calc_lmp_formatted" - }, { - "name" : "edd_calc_ultrasound_formatted", - "bind" : "/model/instance/Woman_TT_Followup_Form/edd_calc_ultrasound_formatted" - }, { - "name" : "lmp_calc_edd", - "bind" : "/model/instance/Woman_TT_Followup_Form/lmp_calc_edd" - }, { - "name" : "lmp_calc_ultrasound", - "bind" : "/model/instance/Woman_TT_Followup_Form/lmp_calc_ultrasound" - }, { - "name" : "lmp_calc_edd_formatted", - "bind" : "/model/instance/Woman_TT_Followup_Form/lmp_calc_edd_formatted" - }, { - "name" : "lmp_calc_ultrasound_formatted", - "bind" : "/model/instance/Woman_TT_Followup_Form/lmp_calc_ultrasound_formatted" - }, { - "name" : "final_edd", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_edd" - }, { - "name" : "final_lmp", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_lmp" - }, { - "name" : "ga_edd", - "bind" : "/model/instance/Woman_TT_Followup_Form/ga_edd" - }, { - "name" : "ga_lmp", - "bind" : "/model/instance/Woman_TT_Followup_Form/ga_lmp" - }, { - "name" : "ga_ult", - "bind" : "/model/instance/Woman_TT_Followup_Form/ga_ult" - }, { - "name" : "final_edd_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_edd_note" - }, { - "name" : "final_lmp_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_lmp_note" - }, { - "name" : "final_ga", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_ga" - }, { - "name" : "final_ga_note", - "bind" : "/model/instance/Woman_TT_Followup_Form/final_ga_note" - }, { - "name" : "vaccines", - "bind" : "/model/instance/Woman_TT_Followup_Form/vaccines" - }, { - "name" : "tt1_retro", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt1_retro" - }, { - "name" : "tt_1_dose", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_1_dose" - }, { - "name" : "tt2_retro", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt2_retro" - }, { - "name" : "tt_2_dose", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_2_dose" - }, { - "name" : "tt3_retro", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt3_retro" - }, { - "name" : "tt_3_dose", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_3_dose" - }, { - "name" : "tt4_retro", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt4_retro" - }, { - "name" : "tt_4_dose", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_4_dose" - }, { - "name" : "vaccines_2", - "bind" : "/model/instance/Woman_TT_Followup_Form/vaccines_2" - }, { - "name" : "vaccination_date", - "bind" : "/model/instance/Woman_TT_Followup_Form/vaccination_date" - }, { - "name" : "tt1", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt1" - }, { - "name" : "tt_1_dose_today", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_1_dose_today" - }, { - "name" : "tt2", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt2" - }, { - "name" : "tt_2_dose_today", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_2_dose_today" - }, { - "name" : "tt3", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt3" - }, { - "name" : "tt_3_dose_today", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_3_dose_today" - }, { - "name" : "tt4", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt4" - }, { - "name" : "tt_4_dose_today", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_4_dose_today" - }, { - "name" : "tt5", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt5" - }, { - "name" : "tt_5_dose_today", - "bind" : "/model/instance/Woman_TT_Followup_Form/tt_5_dose_today" - }, { - "name" : "instanceID", - "bind" : "/model/instance/Woman_TT_Followup_Form/meta/instanceID" - } ] - } -} \ No newline at end of file diff --git a/opensrp-core/src/test/resources/form/woman_followup/model.xml b/opensrp-core/src/test/resources/form/woman_followup/model.xml deleted file mode 100644 index e914536dda..0000000000 --- a/opensrp-core/src/test/resources/form/woman_followup/model.xml +++ /dev/null @@ -1,1643 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - ${provider_province} - ${provider_city} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - minimal - - - - - - - - - - - - - - - - - - - - - - - - - - - - - static_instance-provinces-0 - kpk - - - static_instance-provinces-1 - sindh - - - static_instance-provinces-2 - balochistan - - - static_instance-provinces-3 - punjab - - - static_instance-provinces-4 - gilgit_baltistan - - - static_instance-provinces-5 - kashmir - - - static_instance-provinces-6 - fata - - - static_instance-provinces-7 - out_of_country - - - - - - - static_instance-ucs-0 - sindh - karachi - korangi - bilal_colony - - - static_instance-ucs-1 - sindh - karachi - korangi - nasir_colony - - - static_instance-ucs-2 - sindh - karachi - korangi - chakra_goth - - - static_instance-ucs-3 - sindh - karachi - korangi - mustafa_taj_colony - - - static_instance-ucs-4 - sindh - karachi - korangi - hundred_quarters - - - static_instance-ucs-5 - sindh - karachi - korangi - gulzar_colony - - - static_instance-ucs-6 - sindh - karachi - korangi - korangi_sector_33 - - - static_instance-ucs-7 - sindh - karachi - korangi - zaman_town - - - static_instance-ucs-8 - sindh - karachi - korangi - hasrat_mohani_colony - - - static_instance-ucs-9 - sindh - karachi - baldia - gulshan_e_ghazi - - - static_instance-ucs-10 - sindh - karachi - baldia - ittehad_town - - - static_instance-ucs-11 - sindh - karachi - baldia - islam_nagar - - - static_instance-ucs-12 - sindh - karachi - baldia - nai_abadi - - - static_instance-ucs-13 - sindh - karachi - baldia - saeedabad - - - static_instance-ucs-14 - sindh - karachi - baldia - muslim_mujahid_colony - - - static_instance-ucs-15 - sindh - karachi - baldia - muhajir_camp - - - static_instance-ucs-16 - sindh - karachi - baldia - rasheedabad - - - static_instance-ucs-17 - sindh - karachi - bin_qasim - ibrahim_hyderi - - - static_instance-ucs-18 - sindh - karachi - bin_qasim - rehri - - - static_instance-ucs-19 - sindh - karachi - bin_qasim - cattle_colony - - - static_instance-ucs-20 - sindh - karachi - bin_qasim - qaidabad - - - static_instance-ucs-21 - sindh - karachi - bin_qasim - landhi_colony - - - static_instance-ucs-22 - sindh - karachi - bin_qasim - gulshan_e_hadeed - - - static_instance-ucs-23 - sindh - karachi - bin_qasim - gaghar - - - static_instance-ucs-24 - sindh - karachi - gadap - murad_memon_goth - - - static_instance-ucs-25 - sindh - karachi - gadap - darsano_chana - - - static_instance-ucs-26 - sindh - karachi - gadap - gujro - - - static_instance-ucs-27 - sindh - karachi - gadap - songal - - - static_instance-ucs-28 - sindh - karachi - gadap - maymarabad - - - static_instance-ucs-29 - sindh - karachi - gadap - yousuf_goth - - - static_instance-ucs-30 - sindh - karachi - gadap - manghopir - - - static_instance-ucs-31 - sindh - karachi - gulberg - azizabad - - - static_instance-ucs-32 - sindh - karachi - gulberg - karimabad - - - static_instance-ucs-33 - sindh - karachi - gulberg - aisha_manzil - - - static_instance-ucs-34 - sindh - karachi - gulberg - ancholi - - - static_instance-ucs-35 - sindh - karachi - gulberg - naseerabad - - - static_instance-ucs-36 - sindh - karachi - gulberg - yaseenabad - - - static_instance-ucs-37 - sindh - karachi - gulberg - water_pump - - - static_instance-ucs-38 - sindh - karachi - gulberg - shafiq_mill_colony - - - static_instance-ucs-39 - sindh - karachi - gulshan - delhi_mercantile_society - - - static_instance-ucs-40 - sindh - karachi - gulshan - civic_centre - - - static_instance-ucs-41 - sindh - karachi - gulshan - pir_ilahi_buksh_colony - - - static_instance-ucs-42 - sindh - karachi - gulshan - essa_nagri - - - static_instance-ucs-43 - sindh - karachi - gulshan - gulshan_e_iqbal - - - static_instance-ucs-44 - sindh - karachi - gulshan - gillani_railway_station - - - static_instance-ucs-45 - sindh - karachi - gulshan - shanti_nagar - - - static_instance-ucs-46 - sindh - karachi - gulshan - jamali_colony - - - static_instance-ucs-47 - sindh - karachi - gulshan - gulshan_e_iqbal_ii - - - static_instance-ucs-48 - sindh - karachi - gulshan - pehlwan_goth - - - static_instance-ucs-49 - sindh - karachi - gulshan - matrovil_colony - - - static_instance-ucs-50 - sindh - karachi - gulshan - gulzar_e_hijri - - - static_instance-ucs-51 - sindh - karachi - gulshan - safooran_goth - - - static_instance-ucs-52 - sindh - karachi - jamshed - akhtar_colony - - - static_instance-ucs-53 - sindh - karachi - jamshed - manzoor_colony - - - static_instance-ucs-54 - sindh - karachi - jamshed - azam_basti - - - static_instance-ucs-55 - sindh - karachi - jamshed - chanesar_goth - - - static_instance-ucs-56 - sindh - karachi - jamshed - mahmudabad - - - static_instance-ucs-57 - sindh - karachi - jamshed - pechs - - - static_instance-ucs-58 - sindh - karachi - jamshed - pechs_ii - - - static_instance-ucs-59 - sindh - karachi - jamshed - jut_line - - - static_instance-ucs-60 - sindh - karachi - jamshed - central_jacob_lines - - - static_instance-ucs-61 - sindh - karachi - jamshed - jamshed_quarters - - - static_instance-ucs-62 - sindh - karachi - jamshed - garden_east - - - static_instance-ucs-63 - sindh - karachi - jamshed - soldier_bazar - - - static_instance-ucs-64 - sindh - karachi - jamshed - pakistan_quarters - - - static_instance-ucs-65 - sindh - karachi - kiamari - bhutta_village - - - static_instance-ucs-66 - sindh - karachi - kiamari - sultanabad - - - static_instance-ucs-67 - sindh - karachi - kiamari - kiamari_uc - - - static_instance-ucs-68 - sindh - karachi - kiamari - baba_bhit - - - static_instance-ucs-69 - sindh - karachi - kiamari - machar_colony - - - static_instance-ucs-70 - sindh - karachi - kiamari - maripur - - - static_instance-ucs-71 - sindh - karachi - kiamari - shershah - - - static_instance-ucs-72 - sindh - karachi - kiamari - gabo_pat - - - static_instance-ucs-73 - sindh - karachi - landhi - muzafarabad - - - static_instance-ucs-74 - sindh - karachi - landhi - muslimabad - - - static_instance-ucs-75 - sindh - karachi - landhi - dawood_chowrangi - - - static_instance-ucs-76 - sindh - karachi - landhi - moinabad - - - static_instance-ucs-77 - sindh - karachi - landhi - sharafi_goth - - - static_instance-ucs-78 - sindh - karachi - landhi - bhutto_nagar - - - static_instance-ucs-79 - sindh - karachi - landhi - khawaja_ajmeer_colony - - - static_instance-ucs-80 - sindh - karachi - landhi - landhi_uc - - - static_instance-ucs-81 - sindh - karachi - landhi - awami_colony - - - static_instance-ucs-82 - sindh - karachi - landhi - burmee_colony - - - static_instance-ucs-83 - sindh - karachi - landhi - korangi_uc - - - static_instance-ucs-84 - sindh - karachi - landhi - sherabad - - - static_instance-ucs-85 - sindh - karachi - liaquatabad - rizvia_society - - - static_instance-ucs-86 - sindh - karachi - liaquatabad - firdous_colony - - - static_instance-ucs-87 - sindh - karachi - liaquatabad - super_market - - - static_instance-ucs-88 - sindh - karachi - liaquatabad - dak_khana - - - static_instance-ucs-89 - sindh - karachi - liaquatabad - qasimabad - - - static_instance-ucs-90 - sindh - karachi - liaquatabad - bandhani_colony - - - static_instance-ucs-91 - sindh - karachi - liaquatabad - sharifabad - - - static_instance-ucs-92 - sindh - karachi - liaquatabad - commercial_area - - - static_instance-ucs-93 - sindh - karachi - liaquatabad - mujahid_colony - - - static_instance-ucs-94 - sindh - karachi - liaquatabad - nazimabad - - - static_instance-ucs-95 - sindh - karachi - liaquatabad - abbasi_shaheed - - - static_instance-ucs-96 - sindh - karachi - lyari - agra_taj_colony - - - static_instance-ucs-97 - sindh - karachi - lyari - daryaabad - - - static_instance-ucs-98 - sindh - karachi - lyari - nawabad - - - static_instance-ucs-99 - sindh - karachi - lyari - khada_memon_society - - - static_instance-ucs-100 - sindh - karachi - lyari - baghdadi - - - static_instance-ucs-101 - sindh - karachi - lyari - shah_baig_line - - - static_instance-ucs-102 - sindh - karachi - lyari - bihar_colony - - - static_instance-ucs-103 - sindh - karachi - lyari - ragiwara - - - static_instance-ucs-104 - sindh - karachi - lyari - singo_line - - - static_instance-ucs-105 - sindh - karachi - lyari - chakiwara - - - static_instance-ucs-106 - sindh - karachi - lyari - allama_iqbal_colony - - - static_instance-ucs-107 - sindh - karachi - malir - model_colony - - - static_instance-ucs-108 - sindh - karachi - malir - kala_board - - - static_instance-ucs-109 - sindh - karachi - malir - saudabad - - - static_instance-ucs-110 - sindh - karachi - malir - khokhra_par - - - static_instance-ucs-111 - sindh - karachi - malir - jafar_e_tayyar - - - static_instance-ucs-112 - sindh - karachi - malir - gharibabad - - - static_instance-ucs-113 - sindh - karachi - malir - ghazi_brohi_goth - - - static_instance-ucs-114 - sindh - karachi - new_karachi - kalyana - - - static_instance-ucs-115 - sindh - karachi - new_karachi - sir_syed_colony - - - static_instance-ucs-116 - sindh - karachi - new_karachi - fatima_jinnah_colony - - - static_instance-ucs-117 - sindh - karachi - new_karachi - godhra - - - static_instance-ucs-118 - sindh - karachi - new_karachi - abu_zar_ghaffari - - - static_instance-ucs-119 - sindh - karachi - new_karachi - hakim_ahsan - - - static_instance-ucs-120 - sindh - karachi - new_karachi - madina_colony - - - static_instance-ucs-121 - sindh - karachi - new_karachi - faisal_colony - - - static_instance-ucs-122 - sindh - karachi - new_karachi - khamiso_goth - - - static_instance-ucs-123 - sindh - karachi - new_karachi - mustufa_colony - - - static_instance-ucs-124 - sindh - karachi - new_karachi - khawaja_ajmeer_nagri - - - static_instance-ucs-125 - sindh - karachi - new_karachi - gulshan_e_saeed - - - static_instance-ucs-126 - sindh - karachi - new_karachi - shah_nawaz_bhutto_colony - - - static_instance-ucs-127 - sindh - karachi - north_nazimabad - paposh_nagar - - - static_instance-ucs-128 - sindh - karachi - north_nazimabad - pahar_ganj - - - static_instance-ucs-129 - sindh - karachi - north_nazimabad - khandu_goth - - - static_instance-ucs-130 - sindh - karachi - north_nazimabad - hyderi - - - static_instance-ucs-131 - sindh - karachi - north_nazimabad - sakhi_hassan - - - static_instance-ucs-132 - sindh - karachi - north_nazimabad - farooq_e_azam - - - static_instance-ucs-133 - sindh - karachi - north_nazimabad - nusrat_bhutto_colony - - - static_instance-ucs-134 - sindh - karachi - north_nazimabad - shadman_town - - - static_instance-ucs-135 - sindh - karachi - north_nazimabad - buffer_zone - - - static_instance-ucs-136 - sindh - karachi - north_nazimabad - buffer_zone_ii - - - static_instance-ucs-137 - sindh - karachi - orangi - mominabad - - - static_instance-ucs-138 - sindh - karachi - orangi - haryana_colony - - - static_instance-ucs-139 - sindh - karachi - orangi - hanifabad - - - static_instance-ucs-140 - sindh - karachi - orangi - mohammad_nagar - - - static_instance-ucs-141 - sindh - karachi - orangi - madina_colony_orangi - - - static_instance-ucs-142 - sindh - karachi - orangi - ghaziabad - - - static_instance-ucs-143 - sindh - karachi - orangi - chisti_nagar - - - static_instance-ucs-144 - sindh - karachi - orangi - bilal_colony_orangi - - - static_instance-ucs-145 - sindh - karachi - orangi - iqbal_baloch_colony - - - static_instance-ucs-146 - sindh - karachi - orangi - ghabool_town - - - static_instance-ucs-147 - sindh - karachi - orangi - data_nagar - - - static_instance-ucs-148 - sindh - karachi - orangi - mujahidabad - - - static_instance-ucs-149 - sindh - karachi - orangi - baloch_goth - - - static_instance-ucs-150 - sindh - karachi - saddar - old_haji_camp - - - static_instance-ucs-151 - sindh - karachi - saddar - garden - - - static_instance-ucs-152 - sindh - karachi - saddar - kharadar - - - static_instance-ucs-153 - sindh - karachi - saddar - city_railway_colony - - - static_instance-ucs-154 - sindh - karachi - saddar - nanak_wara - - - static_instance-ucs-155 - sindh - karachi - saddar - gazdarabad - - - static_instance-ucs-156 - sindh - karachi - saddar - millat_nagar_islam_pura - - - static_instance-ucs-157 - sindh - karachi - saddar - saddar_uc - - - static_instance-ucs-158 - sindh - karachi - saddar - civil_line - - - static_instance-ucs-159 - sindh - karachi - saddar - clifton - - - static_instance-ucs-160 - sindh - karachi - saddar - kehkashan - - - static_instance-ucs-161 - sindh - karachi - shah_faisal - natha_khan_goth - - - static_instance-ucs-162 - sindh - karachi - shah_faisal - pak_sadat_colony - - - static_instance-ucs-163 - sindh - karachi - shah_faisal - drigh_colony - - - static_instance-ucs-164 - sindh - karachi - shah_faisal - raita_plot - - - static_instance-ucs-165 - sindh - karachi - shah_faisal - moria_khan_goth - - - static_instance-ucs-166 - sindh - karachi - shah_faisal - rafa_e_aam_society - - - static_instance-ucs-167 - sindh - karachi - shah_faisal - al_falah_society - - - static_instance-ucs-168 - sindh - karachi - site - pak_colony - - - static_instance-ucs-169 - sindh - karachi - site - old_golimar - - - static_instance-ucs-170 - sindh - karachi - site - jahanabad - - - static_instance-ucs-171 - sindh - karachi - site - metrovil - - - static_instance-ucs-172 - sindh - karachi - site - bhawani_chali - - - static_instance-ucs-173 - sindh - karachi - site - frontier_colony - - - static_instance-ucs-174 - sindh - karachi - site - banaras_colony - - - static_instance-ucs-175 - sindh - karachi - site - qasba_colony - - - static_instance-ucs-176 - sindh - karachi - site - islamia_colony - - - static_instance-ucs-177 - na - na - na - other - - - static_instance-ucs-178 - na - na - na - not_applicable - - - - - - - static_instance-gender-0 - male - - - static_instance-gender-1 - female - - - static_instance-gender-2 - transgender - - - - - - - static_instance-vaccines-0 - TT1 - - - static_instance-vaccines-1 - TT2 - - - static_instance-vaccines-2 - TT3 - - - static_instance-vaccines-3 - TT4 - - - static_instance-vaccines-4 - TT5 - - - - - - - static_instance-towns-0 - sindh - karachi - korangi - - - static_instance-towns-1 - sindh - karachi - landhi - - - static_instance-towns-2 - sindh - karachi - baldia - - - static_instance-towns-3 - sindh - karachi - bin_qasim - - - static_instance-towns-4 - sindh - karachi - gadap - - - static_instance-towns-5 - sindh - karachi - gulberg - - - static_instance-towns-6 - sindh - karachi - gulshan - - - static_instance-towns-7 - sindh - karachi - jamshed - - - static_instance-towns-8 - sindh - karachi - kiamari - - - static_instance-towns-9 - sindh - karachi - liaquatabad - - - static_instance-towns-10 - sindh - karachi - lyari - - - static_instance-towns-11 - sindh - karachi - malir - - - static_instance-towns-12 - sindh - karachi - new_karachi - - - static_instance-towns-13 - sindh - karachi - north_nazimabad - - - static_instance-towns-14 - sindh - karachi - orangi - - - static_instance-towns-15 - sindh - karachi - saddar - - - static_instance-towns-16 - sindh - karachi - shah_faisal - - - static_instance-towns-17 - sindh - karachi - site - - - static_instance-towns-18 - na - na - other - - - static_instance-towns-19 - na - na - not_applicable - - - - - - - static_instance-cities-0 - sindh - karachi - - - static_instance-cities-1 - punjab - hafizabad - - - static_instance-cities-2 - punjab - muzaffargarh - - - static_instance-cities-3 - na - other - - - static_instance-cities-4 - na - not_applicable - - - - - - - static_instance-edd_lmp-0 - edd - - - static_instance-edd_lmp-1 - lmp - - - static_instance-edd_lmp-2 - ultrasound - - - static_instance-edd_lmp-3 - none - - - - - - - static_instance-yes_no-0 - yes - - - static_instance-yes_no-1 - no - - - - diff --git a/opensrp-core/src/test/resources/report-definition.json b/opensrp-core/src/test/resources/report-definition.json deleted file mode 100644 index adb4932b8a..0000000000 --- a/opensrp-core/src/test/resources/report-definition.json +++ /dev/null @@ -1,29 +0,0 @@ -{ - "formIndicators": [ - { - "form": "child_close", - "indicators": [ - { - "indicator": "INFANT_LEFT", - "formFields": [ - "id", - "closeReason", - "submissionDate" - ], - "referenceData": { - "type": "child", - "idField": "id", - "fields": [ - "dateOfBirth" - ] - }, - "reportWhen": [ - "IsChildLessThanOneYearOldRule", - "RelocationIsPermanentRule" - ], - "bindType": "child" - } - ] - } - ] -} diff --git a/opensrp-core/src/test/resources/report-fields-definition.json b/opensrp-core/src/test/resources/report-fields-definition.json deleted file mode 100644 index 1de01ae204..0000000000 --- a/opensrp-core/src/test/resources/report-fields-definition.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "form1": [ - "field1", - "field2" - ], - "form2": [ - "field3", - "field4" - ] -} diff --git a/opensrp-core/src/test/resources/sampleXLS/emptyXLS.xls b/opensrp-core/src/test/resources/sampleXLS/emptyXLS.xls deleted file mode 100644 index a0c2798b795da087e602e1fdaa77d41a4f9f8c6d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5632 zcmeHLO=w(I6h3c$k~c}3Owy#**2dS^PLpOL)(S?XX4!bbjA8?{WE?uj(dUJ{m)p>{a*o80#(2opc<$Fa0Ey#PzS69>VXDe z9dHM*9=H?O08r*#>73=eQMQ21KodaTmUOK3X<1y?1qCGl?s6pRM!bx|bWXL4A)$)OIKi71ZdLJ4^#A-*z8_5se zh|c|trcIhwBQ@kR?eo2IcEB&cMEle$XE8omeq%S{-+)9VE;+Smuu`>+zABmK`TCeW zWRFJUbGmP)<&TsFDH%#yDCpMISj_!#dHO_RW^1?rNbcp1+Mp|oG=jd z&7=`Q8j;4U4D$&4Cc?joux|c|$R9HsB)0GtaKk>DiHB!}8&iTe#gr-tK8y)*7uM<| zf)I86-K!T5^mcVTr~Jg?>q53tJDBAO)Xey{YmZh~|(q0UfK&%mHPW<6oQ zXmt+{Mu)=PcK@+>bhIh7_pqF)6tSuo{}ak?J&UKgoKT-k?Ehw4S5POKBrmv0Vg9Jp9_SQYCn1%pB0aI>f}>>Pe!!Okfv{;x)M6s#Bp6A=@l6L zaJT*}Cxh?sIAk}vnUaBZ@94fl;(`;N!#xb@J3Z9UOm zJ07?7sM|Bp*XJG^Zl97<%+(cIa!Y9H0SD0o*lb0V;eFpuXP$c({K8P@PGD_qq!J6*&v=e)ki=JDvkj#&v+> zU%4UDh@3J>D_Q3F4*(HB-d=x%S%gWNBAEhmmXm#D-v)oXn3)Q!pI?6**K_HsOOy9* z44!)f`U_use=m6c9Nr=D7#cYs5d_$mYc9k`^=(5d`TkS=iWch&ibH71Mp84drt^lucTwSfaqV zv_D;MKyF;@C0Z|CRRQ^~WH(*9wOhLh8Q*FozdR|&u>L{ZdinO>kADIB)F$MN<2F1D zPGM?J%V)ePcKwVW?dcutm%We>(>d7s4@7D6Y5xc7zX$Ti3oohUno{+j{r)alSe_35 GM*d$MpeBC+ diff --git a/opensrp-core/src/test/resources/sampleXLS/invalidXLS.xls b/opensrp-core/src/test/resources/sampleXLS/invalidXLS.xls deleted file mode 100644 index 054321618001eb8ca730908fea72d43b4522ef43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5632 zcmeHLO=w(I6h7}|CVBa3GD(xFt&OkIOwuM1YY`(-Gi_RJ7d0V96e;Lr@+O^jk_j_Y ztcW^I8+2iz(uJFV2C}FK{-EeW!DQ#6q7(|zg{0!9=;GBMq>^O(zWd&g$(SKCbrdQ& z!*_qq{W9^{V91!%`;8=}IZj;%g`ynYvFzN143kbUK}3qqsr0 zkOr3AwbF(j7|{#R<`n>Wm2Q3uZE0hvMQC6^V)!M+l!G#cJT5Q5;)T-|cucmqLPloC zi$eOZ*JnfiiU!ux72C7*&-l$aUIyfzf5v*A|0TNzR??uhRpwp_Nz4nHTvc(oOCZrnoNOPEAK1r=PKQ+ybqlMVs<0r zi{$&VfLi-GmA0s~7O5tmsxjXw&TjbSm*}5<<-B_cyxKm*zla1SDmks_SE|-#PmRp* zetpauv*N+%f;u-d@_X8Zlnl+9uw1s!K9C28iqRGG@_Q{^geNO@GgIaQ(Z#*{bxobugCMBGUX zWMobRN5`Yq)6vB1IG!4QbD9B&44%{ECwYcJ+8$6lDz_Pod5Y-@bgOLak!qVk{0ltq z4LPkL=o_>CLG2Ew}W2O|HXv~e;8JQ>50cp`~sW5No>#)iR29*e|> zai@fb6KRMvBxE!J7~vA{36jps#R)>bRY9l*!-lZ~9@~1gY9FRqeCPV*BSZZ?&nkWj zoD8*6o!HiCw9I*SsSzD2olt!nalPyi@%Q>$1|y?Z!hGC%-W-UH2FE%FtdWz^V7$e@ z`+onvCfO;tfY#~P9~`kvfBzXJ;H*mhSj-+p*LvEr%Izqh>6)MDnzws)W|gO<1zQ^i z_?wVUty9a4&*YjsiMgxfC3W|TOnZ3mimG$e@rsqYj-EB%l{&Pqy;kkiMdzLE7~i?; z4V`9Xxs{%PzI8$#D|!}hN!|X=eJ|qFG?<0`oSLqTmVWlK z51}1qv}raa7B)kF`#v?!W49}QrR}T@l`MiD)HwPazfvC28{`vysvz`}##H(?nyazq z?VMM`Rw#%+T_1t>j;uHg+BDv(97ZR+InwZ=DZ_BiV&VOx5gl|U5B$cwv`5yoRfE@bsMP>meE(J0LSt@ zu>RWm(4m@ zYb}(%GD`;lJ%z8&xSWt7^&NV`VHS}#KwH!o{VsEw3mIOeUc1zJFC>q`m;11Wxp zA4VJvE1Qs$#A`U_MpmbPZrbk3=Xo!5|0eo&yC=vi2OuG&)?lfBAc|X0_f71-74nln Rsi;`}XMcZ}Vh#U9{$H#$EoJ}! diff --git a/opensrp-core/src/test/resources/sampleXLS/validXLS.xls b/opensrp-core/src/test/resources/sampleXLS/validXLS.xls deleted file mode 100644 index 3fe68201c4586487591aa7d2c1f11c587453bd80..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5632 zcmeHLUrd`-6hB`};VUp&7);$9b|?h~7$*;6bkdDYUE&-;jK<7pfv>EiP||jBJ{UX3 z5+7VLGZPa-q9iS*1aMQl*wC4r_)(BiW_tj zSzs|UR<2D_%Tpfyd;kE2d{| zyeLL~HJJ_l%NAJ8R&39;KjSy!xD&|V|BUtA|K&ghPzh`TssImwBS5Nw8elU}3)BHy zfLnlDf!lzsz&7A^U^_tlcVu#w8&JLzxC>~^@S8IE^2|0$|AqzJCRVZ3C7*3N&ycUN z{}MdngOXYGiyy%|EMxSI?qFoV_g~Ro9YfHdZ_dC;ccWy;B)C=bzH&d;bhmmRgaYF0 zM8+G*56*y&{j{bHnpPn-fQJFTa9(`sFj3P2e*2ApV6VC=tnPh1`0z)|XVu zG|$&ZtWhf#jLhr4nU>$vK4{6(jE{T{O!>bR$EURl$*;ucR}0DifBDm}sgKjkP}a_^ zwjEOW{FW8?Z7cA1uE2Nyg@4w8J(ZL+b8phAd3CZ>^O|Id=9`mcn%5>>>F3pVPa)#I ziH?lS@!-f<#Ckdse-+!)z;D(t0g=AbhWsqgFi59*bw;Hr24n7Gx&qxQ7adZOVi5lV z*Lzb=7zq02j1fQ@koqeO^9cJU!oP{IZvKJDzaS6l(ZJ&YSH@5{7Ej>X7`FzZqk~{1 zj)Y@_P!R&+Kmuw*AtdoQl0+hnakyo`tOM|g4Ds+FIe6mOk;!{QWU55BK}?H#xmu^< z#ef&yy>j7Te^1wQ%1kdd(x|ZuW z=8ab>?7BF3klV+;eE~2XTx%_3%|M1n$YaGRjW_UkVc^#&M!7}3CfFAP$IqbS2AQsn8- z@KNYV-Ge$bq?(oQPTBKBC5K>B?Z<)e8T62&Mn2K^Z$PC+HGLb+6&Tlce%GmsY+#Tm zIfk%3hNwA1@KPSxtkIzhl7ZWh6Ri~Vn%tZ??=+Q%d1pEp9*9Nb(NMy-|M-9v@!fx4 zdtb2MibO26$=+}%WFLEWpEaj2lC5;jJ?#!lm>w4_pJ@E~Q*Zrx?a&eLd#{<&+Vs(P zTm%yhyhE~m3}DaW0GD|Jpc9+{xB!y??f(wICI1+pd1n9yp7Q_=I|uN7`V+uAY6_r^ z1%ThbyeLwSoH|MCS?2dUfB=wu?Dc1nX_+}GpsAg({N=f;6W*&AvO~e@7q%b2>$v#! z#mT$3dC$H9`?Xy=w+}p59`7)C4DI|N;RV>2b6$y$=IgYc??2U_=fl?(C!O!8&~dk_Q&(3SRDD1n!Sz;8Zc?fh z*VJ8ISy}PaxV(9MiX!ll%e4*@7(vs42DGJ5slIo-?;jgMJHKvLj+#g zR_qVPzafEDTpw3IZ~P^fysZ6qR8+khdjp?Jy^HpUT4ZfFo+)Il|J89!IAkK^a2XGo z!?=p5m!aLFek|J8<@2yq9~g})>rR~bMEXs#Cp*u9a_!1+LD#f`sIG6Z z7XKZw&FT^>`6;_-motScstwLAsei6mID5xsi+YAY^#53&p0sP(ucaqyE&I=|{t{wp zad__G#rc2}hvl$--x~V9HT3(}&^Of7$1(51hYxi*96t4H=$R*CKkAyt8k@cR5&dab zuN<5Wo_z@4#|h|PjG~$>sTH1^mg?l(yi_memZg}STbDM-xos)F@~EuZXH~oUKDQv) zdsMRX_Uwg%-JdNLbNRXNpgcwJ_eLavrqtAP5%o9qFgGd7lftupxr1l;Wr8x`?*z6riGN||^PxJup#=~*^kKV{$yW2F zB8KP@1HwYSU{|W8q7A3HQh5O|)pCAr&Mu$GRPB>_yD$r@#Z0AgrZkt&Vv}VTtNH51 zsf&v?AnjtgR44%QSgBO0+T{u^C&$i?Pn;N=1e3*LcDiiOO%oX~Gx>6Leipdczh&q1 zg;`i%C^{Gz*{q$Z&eJ|$sg^V3ihD%KdvHBfhQ$I1(2Kp0FV5O!jCsLcn6bisM7>N32V0Uh8V(REaN6+A74IyNU;GY=+F^Rym zGkOjRo7>sa%yFf9zLBfkE@qEs3h0;~ddfO{*s>QEs~4?Ian@RGfT&f=C2fX5E zFi6Ky4ii;+;=&>*8QA!KWXKLwh^mUk~Lrh(JB*s}gQ^A6>hLFJv&h^mU?u@%~?b-G_!>$49 z_o0&b*N$DlWlFnDA)9@}KFhy!?g{g$IdR@St0pbLCl%o1+M&u!O<5_VdbOImRjDUR z3z=eI4fHvRK(1D+Lw#rtwE;I&xVhFGK^+c{ECd0?LNLJ{E@|PCMi$|2cybZ6r<&PN zt**)e2X0v4h6OGSIM+a46hICyrYaD8!ip zurtLhYYaC!EfK^N^S;OPm3%enKsmxRtEK~< zs)>;vbnH{B?9;XFM;!a~D*Iu4g%5MQ=dhJ_Zx{~TfV`iz3wc&`a64Bi=WtrYNy_%I z@yV&vEZZL7$@61p#!rnOJ2NJs9fGl4$d*>{OwOrn;ubVKPThkq5_m-U_QCm<(qw!~ z*^Jv}@rdWXzF8jYO?Y^J_=ES~Iy-aj$h7E}pz)49+;ynF$kXU~Beq}eI3Sq;OOabdN5RvnNK$m%CWUoK;Z-`uG;GIrNMRkG9nc*Tzn%}yP1p`A zV3m#;5Vqq+Fs#E`UZrCU!gh>TSjYERVI8-GVIALjhIP!Gu#WFZ!#chb3+uQo4eRg> zS*7c$q1#?V*Ih%0r-6a@k-X7!vRx@hiXitnIgS*C#0+qxI!K&*M~Xq>tUFR1Z-hDD zj#Q66&NL;WCE?eTB9J)aPG1xf=h~6#AaRx*DFz7@L`9#ch_vG&ZeYd@%(!4O7s(|qn9M>)3Sx5B^w=5q zq+)K;vR*K?#IbMl`^b|S>sS(#xk`z%tuYgV$((iiI7iG@M$5AIufk=NwvqdWYtfqUSA4EVzbQHZGImkvDcS^9$5RdhepFgqv4@Za>9#5 zqv4?uIifu@8e?E3)v?}Uc;MSLJ%%ktT((GD_PMOL7?@m#I@U=8lTUVynKUqyg1O(t zOd6P6qdF4Jf_cETt=~Wzu(75-0n-kSaaQL4=sj=7Q;h}5$hJiLyN@P z^Uz|9fwe@(y4CQ|YItZhJhY030he{Ffys)bW6d{yN#(_*&A@CkFxv!k(8X*sFj-l2 zB(@6XkZZYBFjKx1jP+Jv>J`o>NK&PJ%V4Zot#l;X4G-;xhjxQ?yRaU1G20E+tYkV8 z9R_BHf!SeTb_nK(i`ijdvI6QzbPDDju4SiS9`vPPBsvB2PQQz1{Gz-SDv8@UUGxe8FYC-N0o1)v@k2FuM)RZUeJh zF!6<1o&ntkCZ7yC61NKGA=mO&!946sjP*Uf6vLD1h%YhLqrSvgABDtSvW0VaSH@>f zSjQ?F*72zl*72zj*0KJFb$kkhb*!9W9V=g0$Ep_Av6_W-tPWuvS9e&)l^fP^jfQnx z4`Cg1J-FNFbKHVXXP0Hnnq|zIC7Eyx_Rf9WVR$oYNhWZf*vC21nXpqZkNbVB^(TBO zm`#*YMD5c<43w_lgI4C;wibf3LxxD@ya< zC+PRNJoX9tIbS0G`+bR-IO$8||9~%%|CB3neQN&u4G()vE@r>P+KU9M zjb=SyU=9f8!|r_p2IhdldO%oz#kUNyX6@3f2MrH{hKE7J!=QM0#KjymShMzN)+qxs zC754z?@Jk&DT8%NSbxp846dYJVkj@E|s9&#Of`DIoWyrEl8;2c52 z&Cu5^JM$M?-YfcsBmI4 zinYu)?csxYedXEj{r!Xc=9_-_-Gn-D+fRSbO4EdnMx5Edh{ijgL}Sr-290arc{Em; zOK2SAt7u#gucNV+yottj@jEnDkt=9?U-=%|X0(5!(MQZ3++ROZ@@|VhdGI|~@S0d> zGx>#5shFwNAGBTTn*4__z)_r+?w@~&ym{>%qrAA|-b0-`ejDL+g|_r?`nGSCB(1qgCCuME*{eH`Po4{w>9C+dpYK{^yt2M{GUYNzxn%5=0LcH z)EZ_RluJw!9Ov=t)3SODzqsS?P#<%YH}J{#ZG_^wWer=;t+c;tIhGN8n=7dW)PnoK z;p^+U-LRp5u08tZVRT+Y7 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-persistence-postgres.xml b/opensrp-core/src/test/resources/test-persistence-postgres.xml deleted file mode 100644 index 52da328195..0000000000 --- a/opensrp-core/src/test/resources/test-persistence-postgres.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/action.sql b/opensrp-core/src/test/resources/test-scripts/action.sql deleted file mode 100644 index 768cd5bf89..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/action.sql +++ /dev/null @@ -1,78 +0,0 @@ ---clear data -TRUNCATE TABLE core.action CASCADE; - -ALTER SEQUENCE core.action_id_seq RESTART WITH 35; - -ALTER SEQUENCE core.action_metadata_id_seq RESTART WITH 35; - -INSERT INTO core.action (id, json) VALUES -(1, '{"_id": "05934ae338431f28bf6793b241642462", "data": {"visitCode": "OPV 0", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2879a3a80caa0ab8c599b766496b8234", "timeStamp": 1520932697689, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(2, '{"_id": "05934ae338431f28bf6793b2416433c9", "data": {"visitCode": "BCG", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6136b587025c608f3d4f41731eefb157", "timeStamp": 1520932698005, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(3, '{"_id": "05934ae338431f28bf6793b241643a7e", "data": {"visitCode": "PENTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2f64b198e90652c816a01b59b15d10c9", "timeStamp": 1520932698821, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(4, '{"_id": "05934ae338431f28bf6793b241644dd7", "data": {"visitCode": "OPV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6fda14ca820ed569269b81cc28832619", "timeStamp": 1520932699621, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(5, '{"_id": "05934ae338431f28bf6793b241645535", "data": {"visitCode": "ROTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f00737fd2a6354d243c161c161a886fd", "timeStamp": 1520932700149, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(6, '{"_id": "05934ae338431f28bf6793b241645f1f", "data": {"visitCode": "PCV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-c66dfedbaf6582dc04c209c467f8a057", "timeStamp": 1520932700973, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(7, '{"_id": "05934ae338431f28bf6793b2416473e0", "data": {"visitCode": "PENTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-02c3a00f308e4ce385ce558cf0d944d8", "timeStamp": 1520932701845, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(8, '{"_id": "05934ae338431f28bf6793b2416481aa", "data": {"visitCode": "OPV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8c95d366cfe85f1b2dbfb3ca8c80fa60", "timeStamp": 1520932702653, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(9, '{"_id": "05934ae338431f28bf6793b241648e9d", "data": {"visitCode": "ROTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9ad54ee7aea405a883c41203f42b7102", "timeStamp": 1520932703185, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(10, '{"_id": "05934ae338431f28bf6793b241649473", "data": {"visitCode": "PCV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-660bbaae08f13bd1901bf0916c85d7f1", "timeStamp": 1520932703825, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(11, '{"_id": "05934ae338431f28bf6793b24164a5d7", "data": {"visitCode": "PENTA 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6a87e5caa57732fd5c3fef5dc5a4ba71", "timeStamp": 1520932704673, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(12, '{"_id": "05934ae338431f28bf6793b24164b4ce", "data": {"visitCode": "OPV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9a13ae05df3839ea97d54d42150cf294", "timeStamp": 1520932705277, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(13, '{"_id": "05934ae338431f28bf6793b24164c069", "data": {"visitCode": "PCV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2cab2feb95c70dcaabecb6f9eed6ddf2", "timeStamp": 1520932705889, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(14, '{"_id": "05934ae338431f28bf6793b241651160", "data": {"visitCode": "MEASLES 1", "completionDate": "2017-11-14"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8a96e017d3f3772d1fceeda32360af03", "timeStamp": 1520933247737, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(15, '{"_id": "05934ae338431f28bf6793b241663fcd", "data": {"visitCode": "BCG", "completionDate": "2016-04-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-14792d0f46a0883ad712b1579229e327", "timeStamp": 1520933431893, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "isActionActive": true}'), -(16, '{"_id": "05934ae338431f28bf6793b2417bfe8f", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6356c0c4202703c768764a3475d7ce3b", "timeStamp": 1520978413525, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(17, '{"_id": "05934ae338431f28bf6793b2417bf883", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-076a5315cb585348af4335f3392f3f3d", "timeStamp": 1520978413537, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(18, '{"_id": "05934ae338431f28bf6793b2417bf3c3", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-5d69b3061e54074f4e280ed3b0b06181", "timeStamp": 1520978413541, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(19, '{"_id": "05934ae338431f28bf6793b2417c671b", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-35d72bbd1769bd66675997ac9e79164e", "timeStamp": 1520978413737, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(20, '{"_id": "05934ae338431f28bf6793b2417c4bae", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-232d50fcd2a7a7801633b5a0546cb753", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(21, '{"_id": "05934ae338431f28bf6793b2417c4d6c", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2871da12dbce3cb16e0746f30cbc26fa", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(22, '{"_id": "05934ae338431f28bf6793b2417c5aae", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9c72f8f01fd21ae36e84a2def4db8732", "timeStamp": 1520978413765, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(23, '{"_id": "05934ae338431f28bf6793b2417c705e", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f72851fdbaac0f4f091054bbf60b8ed3", "timeStamp": 1520978413880, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(24, '{"_id": "05934ae338431f28bf6793b2417c98f9", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-fc9c73741eee67f6b71c84333ad6eb25", "timeStamp": 1520978413884, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(25, '{"_id": "05934ae338431f28bf6793b2417c7d94", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-ea88434f62397611c8e794eedbca74e4", "timeStamp": 1520978413894, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(26, '{"_id": "05934ae338431f28bf6793b2417ca6cd", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6db5f0e05e5e69aa5f33429f6cdc75a7", "timeStamp": 1520978413945, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(27, '{"_id": "05934ae338431f28bf6793b2417d0103", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-a28be37e4572a5e77a92461c76d0885e", "timeStamp": 1520978414164, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(28, '{"_id": "05934ae338431f28bf6793b2417d1390", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8da27b44f49e08574f5b8a7ad746a88c", "timeStamp": 1520978414184, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(29, '{"_id": "05934ae338431f28bf6793b2417d0b1c", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-87165e743ef46e7bfbdfea5d9e81d049", "timeStamp": 1520978414186, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(30, '{"_id": "05934ae338431f28bf6793b2417d2ec2", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8506e63790993901b69708e013df5a8e", "timeStamp": 1520978414292, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(31, '{"_id": "05934ae338431f28bf6793b2417d3aa0", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-636eec945c3c237fd8e90fe854dce081", "timeStamp": 1520978414313, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(32, '{"_id": "05934ae338431f28bf6793b2417db6ca", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-a8177920ff1fbef63a63f03851a343ee", "timeStamp": 1520978414508, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(33, '{"_id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "normal", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(34, '{"_id": "05934ae338431f28bf6793b2417da475", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f18f7d27909a2cc3e3e27c5b4c116075", "timeStamp": 1520978414514, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'); - -INSERT INTO core.action_metadata (id, action_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id) VALUES -(1, 1, '05934ae338431f28bf6793b241642462', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932697689, 'biddemo', null, null, null), -(2, 2, '05934ae338431f28bf6793b2416433c9', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932698005, 'biddemo', null, null, null), -(3, 3, '05934ae338431f28bf6793b241643a7e', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932698821, 'biddemo', null, null, null), -(4, 4, '05934ae338431f28bf6793b241644dd7', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932699621, 'biddemo', null, null, null), -(5, 5, '05934ae338431f28bf6793b241645535', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932700149, 'biddemo', null, null, null), -(6, 6, '05934ae338431f28bf6793b241645f1f', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932700973, 'biddemo', null, null, null), -(7, 7, '05934ae338431f28bf6793b2416473e0', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932701845, 'biddemo', null, null, null), -(8, 8, '05934ae338431f28bf6793b2416481aa', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932702653, 'biddemo', null, null, null), -(9, 9, '05934ae338431f28bf6793b241648e9d', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932703185, 'biddemo', null, null, null), -(10, 10, '05934ae338431f28bf6793b241649473', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932703825, 'biddemo', null, null, null), -(11, 11, '05934ae338431f28bf6793b24164a5d7', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932704673, 'biddemo', null, null, null), -(12, 12, '05934ae338431f28bf6793b24164b4ce', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932705277, 'biddemo', null, null, null), -(13, 13, '05934ae338431f28bf6793b24164c069', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932705889, 'biddemo', null, null, null), -(14, 14, '05934ae338431f28bf6793b241651160', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520933247737, 'biddemo', null, null, null), -(15, 15, '05934ae338431f28bf6793b241663fcd', '86c039a2-0b68-4166-849e-f49897e3a510', 1520933431893, 'biddemo', null, null, null), -(16, 16, '05934ae338431f28bf6793b2417bfe8f', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413525, 'biddemo', null, null, null), -(17, 17, '05934ae338431f28bf6793b2417bf883', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413537, 'biddemo', null, null, null), -(18, 18, '05934ae338431f28bf6793b2417bf3c3', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413541, 'biddemo', null, null, null), -(19, 19, '05934ae338431f28bf6793b2417c671b', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413737, 'biddemo', null, null, null), -(20, 20, '05934ae338431f28bf6793b2417c4bae', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413764, 'biddemo', null, null, null), -(21, 21, '05934ae338431f28bf6793b2417c4d6c', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413764, 'biddemo', null, null, null), -(22, 22, '05934ae338431f28bf6793b2417c5aae', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413765, 'biddemo', null, null, null), -(23, 23, '05934ae338431f28bf6793b2417c705e', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413880, 'biddemo', null, null, null), -(24, 24, '05934ae338431f28bf6793b2417c98f9', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413884, 'biddemo', null, null, null), -(25, 25, '05934ae338431f28bf6793b2417c7d94', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413894, 'biddemo', null, null, null), -(26, 26, '05934ae338431f28bf6793b2417ca6cd', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978413945, 'biddemo', null, null, null), -(27, 27, '05934ae338431f28bf6793b2417d0103', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414164, 'biddemo', null, null, null), -(28, 28, '05934ae338431f28bf6793b2417d1390', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414184, 'biddemo', null, null, null), -(29, 29, '05934ae338431f28bf6793b2417d0b1c', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414186, 'biddemo', null, null, null), -(30, 30, '05934ae338431f28bf6793b2417d2ec2', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414292, 'biddemo', null, null, null), -(31, 31, '05934ae338431f28bf6793b2417d3aa0', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414313, 'biddemo', null, null, null), -(32, 32, '05934ae338431f28bf6793b2417db6ca', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414508, 'biddemo', null, null, null), -(33, 33, '05934ae338431f28bf6793b2417dba2d', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414513, 'biddemo', null, null, null), -(34, 34, '05934ae338431f28bf6793b2417da475', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414514, 'biddemo', null, null, null); diff --git a/opensrp-core/src/test/resources/test-scripts/alert.sql b/opensrp-core/src/test/resources/test-scripts/alert.sql deleted file mode 100644 index 9c751e43c2..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/alert.sql +++ /dev/null @@ -1,41 +0,0 @@ ---clear data -TRUNCATE TABLE core.alert CASCADE; - -ALTER SEQUENCE core.alert_id_seq RESTART WITH 16; - -ALTER SEQUENCE core.alert_metadata_id_seq RESTART WITH 16; - -INSERT INTO core.alert (id, json) VALUES -(1, '{"_id": "a6159ce3-c93c-4339-9766-d814a10ca2db", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv2", "triggerName": "PCV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(2, '{"_id": "758aaf63-324e-4ccc-95f2-894be012dc25", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403900, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "opv2", "triggerName": "OPV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(3, '{"_id": "f210392d-2905-458a-8301-5a7fb844c448", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(4, '{"_id": "52e33167-4b64-4189-bf0c-e7a916815bc9", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403837, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "penta2", "triggerName": "PENTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(5, '{"_id": "07a17c79-1e96-478b-ab23-a56a748df09e", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403913, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "rota2", "triggerName": "ROTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(6, '{"_id": "89bcc696-9491-4b03-8064-d7752b0cb12a", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813469, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "opv3", "triggerName": "OPV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(7, '{"_id": "3aa476f0-50e3-489e-9778-5ae3dcea8640", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813617, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "penta3", "triggerName": "PENTA 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(8, '{"_id": "170c64f5-a187-4c90-b76d-09ff14d5e280", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": false, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521756016156, "dateClosed": "2018-03-27", "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "dateComplete": "2018-03-27", "closingPeriod": "urgent", "beneficiaryType": "vaccination"}'), -(9, '{"_id": "80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813385, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(10, '{"_id": "1b7ed001-201b-4503-a098-4b1cd509470d", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413376, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "itn1", "triggerName": "ITN 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(11, '{"_id": "32e7d8cd-28e6-4361-9a39-bee732e61d93", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413593, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "bcg", "triggerName": "BCG", "triggerType": "schedule", "beneficiaryType": "child"}'), -(12, '{"_id": "01741058-588c-4105-b2e4-6e5ae47f4880", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2017-04-06T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2017-04-06T00:00:00.000+02:00", "timeStamp": 1522188003909, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "deworming1", "triggerName": "DEWORMING 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(13, '{"_id": "4ba278a4-7d91-4cae-a54d-8353c63e2940", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2016-10-07T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2016-10-07T00:00:00.000+02:00", "timeStamp": 1522188003905, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "vita1", "triggerName": "VIT A 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(14, '{"_id": "950d34d1-a374-47aa-91ac-09a62373e624", "type": "Alert", "details": {"normal:end": "2018-07-01T00:00:00.000+02:00", "normal:start": "2018-01-01T00:00:00.000+02:00"}, "entityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActive": true, "alertType": "notification", "startDate": "2018-01-01T00:00:00.000+02:00", "timeStamp": 1520978414377, "expiryDate": "2018-07-01T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "normal", "triggerCode": "vitaifc2", "triggerName": "VIT A IFC 2", "triggerType": "schedule", "beneficiaryType": "child"}'), -(15, '{"_id": "59bf074a-0415-40bb-9b15-d681613673d9", "type": "Alert", "entityId": "fe7b6350-16d2-41d0-8574-c194088705df", "isActive": false, "alertType": "notification", "startDate": "2018-02-22", "timeStamp": 1520978414781, "dateClosed": "2018-03-14", "expiryDate": "2022-11-01", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "dateComplete": "2018-02-12", "closingPeriod": "urgent", "beneficiaryType": "child"}'); - - -INSERT INTO core.alert_metadata (id, alert_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name) VALUES -(1, 1, 'a6159ce3-c93c-4339-9766-d814a10ca2db', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403899, 'biddemo', null, null, null, true, 'PCV 2'), -(2, 2, '758aaf63-324e-4ccc-95f2-894be012dc25', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403900, 'biddemo', null, null, null, true, 'OPV 2'), -(3, 3, 'f210392d-2905-458a-8301-5a7fb844c448', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403899, 'biddemo', null, null, null, true, 'PCV 1'), -(4, 4, '52e33167-4b64-4189-bf0c-e7a916815bc9', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403837, 'biddemo', null, null, null, true, 'PENTA 2'), -(5, 5, '07a17c79-1e96-478b-ab23-a56a748df09e', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403913, 'biddemo', null, null, null, true, 'ROTA 2'), -(6, 6, '89bcc696-9491-4b03-8064-d7752b0cb12a', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813469, 'DYuyi', null, null, null, true, 'OPV 3'), -(7, 7, '3aa476f0-50e3-489e-9778-5ae3dcea8640', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813617, 'DYuyi', null, null, null, true, 'PENTA 3'), -(8, 8, '170c64f5-a187-4c90-b76d-09ff14d5e280', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521756016156, 'biddemo', null, null, null, false, 'PCV 3'), -(9, 9, '80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813385, 'DYuyi', null, null, null, true, 'PCV 3'), -(10, 10, '1b7ed001-201b-4503-a098-4b1cd509470d', '7583329e-340e-4f64-8d6e-a7cbcf334455', 1520978413376, 'DYuyi', null, null, null, true, 'ITN 1'), -(11, 11, '32e7d8cd-28e6-4361-9a39-bee732e61d93', '7583329e-340e-4f64-8d6e-a7cbcf334455', 1520978413593, 'DYuyi', null, null, null, true, 'BCG'), -(12, 12, '01741058-588c-4105-b2e4-6e5ae47f4880', '980d55f5-60d8-4488-b75b-f511c3c839f7', 1522188003909, 'biddemo', null, null, null, true, 'DEWORMING 1'), -(13, 13, '4ba278a4-7d91-4cae-a54d-8353c63e2940', '980d55f5-60d8-4488-b75b-f511c3c839f7', 1522188003905, 'biddemo', null, null, null, true, 'VIT A 1'), -(14, 14, '950d34d1-a374-47aa-91ac-09a62373e624', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414377, 'biddemo', null, null, null, true, 'VIT A IFC 2'), -(15, 15, '59bf074a-0415-40bb-9b15-d681613673d9', 'fe7b6350-16d2-41d0-8574-c194088705df', 1520978414781, 'biddemo', null, null, null, false, 'PCV 1'); diff --git a/opensrp-core/src/test/resources/test-scripts/app_state_token.sql b/opensrp-core/src/test/resources/test-scripts/app_state_token.sql deleted file mode 100644 index e80e056e89..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/app_state_token.sql +++ /dev/null @@ -1,12 +0,0 @@ ---clear data -TRUNCATE TABLE core.app_state_token; - -ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 6; - ---insert data -INSERT INTO core.app_state_token (id, name, description, value, last_edited_date) VALUES -(1, 'sync_schedule_tracker_by_last_update_enrollment', 'ScheduleTracker token to keep track of enrollment', '34343', 1521017416), -(2, 'sync_client_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated clients', '65765', 1521217416), -(3, 'sync_client_by_date_voided', 'OpenMRS data pusher token to keep track of voided clients synced ', '122001', 1521017416), -(4, 'sync_event_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated events synced ', '343232', 1521017416), -(5, 'sync_event_by_date_voided', 'OpenMRS data pusher token to keep track of voided events synced ', '23432', 1521017416); diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql deleted file mode 100644 index a066b0701a..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ /dev/null @@ -1,40 +0,0 @@ ---clear data -TRUNCATE TABLE core.client CASCADE; - -ALTER SEQUENCE core.client_id_seq RESTART WITH 16; - -ALTER SEQUENCE core.client_metadata_id_seq RESTART WITH 16; - -INSERT INTO core.client (id, json) VALUES -(1, '{"_id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942", "dateCreated": "2018-03-13T00:48:59.829", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(2, '{"_id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "_rev": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675", "dateCreated": "2018-03-13T00:52:01.121", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(3, '{"_id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "_rev": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873", "dateCreated": "2018-03-13T00:54:42.889", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(4, '{"_id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "_rev": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971", "dateCreated": "2018-03-13T02:20:08.984", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(5, '{"_id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879", "dateCreated": "2018-03-13T00:42:58.436", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(6, '{"_id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "_rev": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223", "dateCreated": "2018-03-13T12:26:43.857", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(7, '{"_id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "_rev": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(8, '{"_id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "_rev": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027", "dateCreated": "2018-03-13T13:11:18.725", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(9, '{"_id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "_rev": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257", "dateCreated": "2018-03-13T13:11:19.005", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(10, '{"_id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225", "dateCreated": "2018-03-13T12:53:04.188", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(11, '{"_id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "_rev": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "deathdate": "2018-02-13T03:00:00.000", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417", "dateCreated": "2018-03-13T12:53:04.453", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(12, '{"_id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "_rev": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652", "dateCreated": "2018-03-13T12:54:42.456", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(13, '{"_id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "_rev": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277", "dateCreated": "2018-03-13T11:42:01.573", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(14, '{"_id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "_rev": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606", "dateCreated": "2018-03-14T07:52:16.620", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), -(15, '{"_id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "_rev": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496", "dateCreated": "2018-03-14T07:52:16.757", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); - -INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date) VALUES -(1, 1, '05934ae338431f28bf6793b24159ce5d', '287be17c-30a7-4482-8816-e2382ec502f1', '22b8570a-3207-4af7-8da7-8a1c5b84d3ff', 1520891339766, '8796f967-2f7a-40f7-8586-d63dbc81b709', '218221-0', 'Second', null, 'Child', '2018-03-01'), -(2, 2, '05934ae338431f28bf6793b24159dea7', '9289b401-fbc6-4231-a59c-127dac40df74', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891521078, '99621619-688a-4f0f-b93e-68ab1b8cf49e', '218222-8', 'Third', null, ' Child', '2018-03-01'), -(3, 3, '05934ae338431f28bf6793b24159ebc2', '219655bb-a733-4d7a-8b1f-ecc5ff3af6cc', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891682846, '07880fcb-0061-43b0-8ae8-6b52372b1a6b', '218223-6', 'Fourth', null, 'Child', '2018-03-01'), -(4, 4, '05934ae338431f28bf6793b2415a0374', '94f3e8fb-2f05-4fca-8119-2b593d1962eb', '3abdb25a-f151-4a95-9311-bd30bf935085', 1520896808942, 'cf58894b-71c6-41e0-a977-7283f2411cd5', '218224-4', 'Fith', null, 'Child', '2018-03-01'), -(5, 5, '05934ae338431f28bf6793b24159c647', '33d9a17f-d729-4276-9891-b43e8b60fd12', 'd0ecee83-6ccd-4096-9188-f63a40fa2f63', 1520890978382, '9c4260f2-d296-4af1-b771-debda1b6cfd1', '218220-2', 'First', null, 'Child', '2018-01-04'), -(6, 6, '05934ae338431f28bf6793b24164cbd9', '86c039a2-0b68-4166-849e-f49897e3a510', '758dab58-7629-4da9-882f-ae5110bcd240', 1520933203799, 'ab91df5d-e433-40f3-b44f-427b73c9ae2a', '218923-1', 'Sally', null, 'Mtini ', '2016-04-13'), -(7, 7, '05934ae338431f28bf6793b241692648', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '9ac3fac4-a74c-45d5-bedb-da357cec3779', 1520935878137, '825b4d23-a3ea-4c58-a95b-d0df2f9c1690', '218229-3', 'Januar', null, 'Babbyfour', '2018-01-01'), -(8, 8, '05934ae338431f28bf6793b241693a2f', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', '41d1841b-4d6c-4f06-b5e8-b55907892ee6', 1520935878137, '11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8', '218230-1', 'January', null, 'Babyfive', '2018-01-01'), -(9, 9, '05934ae338431f28bf6793b2416946b7', '469597f0-eefe-4171-afef-f7234cbb2859', '7bce6b9a-e575-4cc6-b987-a12284912e84', 1520935878137, 'eb4b258c-7558-436c-a1fe-e91d9e12f849', '218231-9', 'January ', null, 'Babysix', '2018-01-01'), -(10, 10, '05934ae338431f28bf6793b24167817d', '28caef27-d1b3-497b-8a55-954f2f0f6e24', 'ab1eda08-2185-4d5f-9301-abb17d376ded', 1520934784144, '43397e39-0a11-4bb7-ba2d-3820436bef85', '218225-1', 'Sixth', null, 'Child', '2018-03-01'), -(11, 11, '05934ae338431f28bf6793b241679500', 'f33c71c7-a9a4-495d-8028-b6d59e4034b3', '7289296d-9ec9-450e-9389-88b5b0d329a0', 1520934784145, '7a8926a9-f35a-41ba-adbf-87712333d5c2', '218226-9', 'Jan', null, 'Baby', '2018-01-01'), -(12, 12, '05934ae338431f28bf6793b24167b6d1', 'fe7b6350-16d2-41d0-8574-c194088705df', '14715b97-f0d5-4515-813b-5698934dbf1d', 1520934882395, 'ba5d3927-414f-4796-ae1e-9b73b50a5573', '218227-7', 'Janu', null, 'Babytwo', '2018-01-01'), -(13, 13, '05934ae338431f28bf6793b24162ca7e', '67007c17-97bb-4732-a1b8-3a0c292b5432', '14f94928-ef60-4d1c-a6be-f46b3b844268', 1520930521516, 'c5780597-3d54-4298-b39f-9d38dfd14970', '218922-3', 'George', null, 'Owino', '2017-02-13'), -(14, 14, '05934ae338431f28bf6793b2418380ce', 'cc127350-c1cd-4c3a-99d4-4d632882f522', null, 1521003136407, '2ca99239-ba6e-42d6-92a5-a889d2de50c0', '218232-7_mother', 'Gg', null, 'Gchf', '1960-01-01'), -(15, 15, '05934ae338431f28bf6793b241839005', 'd4eda055-60c6-44a4-ba48-61dfe6485bea', '17a1f5ed-a4cd-4427-ad9f-6471f4fc963d', 1521003136407, '02d89e05-64ad-4fa3-86d9-93b669ec02c5', '218233-5', 'Fully', null, 'Immunisedtwo', '2017-06-13'); \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/error.sql b/opensrp-core/src/test/resources/test-scripts/error.sql deleted file mode 100644 index d7acf4525d..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/error.sql +++ /dev/null @@ -1,84 +0,0 @@ ---clear data -TRUNCATE TABLE error.error_trace; - -ALTER SEQUENCE error.error_trace_id_seq RESTART WITH 9; - ---insert test data -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (1, '85ed95b2-8436-4a93-9ae7-ab104d65edd7', '2018-03-14 07:53:11.152000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.GeneratedMethodAccessor985.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Client', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (2, 'd41ba935-c8f6-4d3d-8432-8e8059ae39ca', '2018-03-14 11:24:30.643000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Client', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (3, 'f4bb0d37-0f08-44e2-822f-87d81983eefb', '2018-03-15 16:16:09.571000', 'OPENMRS FAILED EVENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Event', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (4, '8798ae98-4f71-4bbb-8391-bfbda783b2d9', '2018-03-19 16:31:47.916000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Client', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (5, 'ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f', '2018-03-22 15:59:30.791000', 'OPENMRS FAILED EVENT PUSH', null, 'at sun.reflect.GeneratedMethodAccessor985.invoke(Unknown Source) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Event', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (6, '911c7520-f701-419e-b225-5e21286b585b', '2018-01-11 11:14:07.655000', 'OPENMRS FAILED EVENT VALIDATION', null, 'at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) - at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) - at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) - at java.lang.reflect.Method.invoke(Method.java:498) - at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) - at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) - at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) - at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) - at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) - at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) - at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) - at java.lang.Thread.run(Thread.java:748) -', null, null, null, 'org.opensrp.domain.Event', ''); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (7, '48106c03-8900-4156-a7bf-93226e1d3e58', '2018-01-03 11:20:52.467000', 'FormSubmissionProcessor', 'org.opensrp.service.formSubmission.FormSubmissionListener', '[Ljava.lang.StackTraceElement;@22cdbe2', 'solved', null, null, 'org.opensrp.form.domain.FormSubmission', null); -INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (8, '07c32814-d7d1-48a5-8320-ed80435a4606', '2018-01-03 17:06:11.166000', 'FormSubmissionProcessor', 'org.opensrp.service.formSubmission.FormSubmissionListener', '[Ljava.lang.StackTraceElement;@50ef4583', 'solved', null, null, 'org.opensrp.form.domain.FormSubmission', null); \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/event.sql b/opensrp-core/src/test/resources/test-scripts/event.sql deleted file mode 100644 index f2baef729c..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/event.sql +++ /dev/null @@ -1,42 +0,0 @@ ---clear data -TRUNCATE TABLE core.event CASCADE; - -ALTER SEQUENCE core.event_id_seq RESTART WITH 16; - -ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 16; - ---insert data -INSERT INTO core.event (id, json, date_deleted) VALUES -(1, '{"_id": "05934ae338431f28bf6793b2417696bf", "obs": [{"values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "mr_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "mr_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1520941739448, "duration": 0, "_rev": "1-069bfb5078ff17f922c0bba799222878", "eventDate": "2018-03-13T17:42:03.326+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:26.477+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1520945634380, "formSubmissionId": "29243014-48df-4165-a82d-f4878f6a830e"}', null), -(2, '{"_id": "05934ae338431f28bf6793b24199e690", "obs": [{"values": ["2018-03-14 10:31:33"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"values": ["2018-03-14 10:39:56"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"values": ["867104020634913"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521016796414, "duration": 0, "_rev": "2-615390b17f8f2f9e9aa92f5f4a8a7aaf", "eventDate": "2018-03-14T03:00:00.000+03:00", "eventType": "New Woman Registration", "dateEdited": "2018-03-14T11:39:35.826+03:00", "entityType": "mother", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.717+03:00", "identifiers": {"OPENMRS_UUID": "d3630a60-a1f4-4267-9225-f4cb728f4178"}, "baseEntityId": "43930c23-c787-4ddb-ab76-770f77e7b17d", "serverVersion": 1521016638453, "formSubmissionId": "6b3243e9-3d45-495c-af69-f012061def01"}', null), -(3, '{"_id": "05934ae338431f28bf6793b2419c64fb", "obs": [{"values": ["2018-03-14"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521033238310, "duration": 0, "_rev": "1-dff06b7575a5177c7200b08570d14f4b", "eventDate": "2018-03-14T19:09:51.379+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.750+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521033533700, "formSubmissionId": "bfbfabe8-d4ae-4db2-940f-a6f126ef7829"}', null), -(4, '{"_id": "05934ae338431f28bf6793b2419c319a", "obs": [{"values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1_", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1__dose", "humanReadableValues": []}], "type": "Event", "version": 1521044035486, "duration": 0, "_rev": "3-2d669093b06c73fcd5c0fa7c4782e21d", "eventDate": "2018-03-13T22:10:00.321+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-14T19:21:38.401+03:00", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.019+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521044588444, "formSubmissionId": "d960046a-e2a0-4bbf-b687-d41c2a52d8c8"}', null), -(5, '{"_id": "05934ae338431f28bf6793b241bdb88c", "obs": [{"values": ["42abc582-6658-488b-922e-7be500c070f3"], "fieldCode": "Home_Facility", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Home_Facility", "humanReadableValues": []}, {"values": ["2018-02-16"], "fieldCode": "163260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "date", "formSubmissionField": "First_Health_Facility_Contact", "humanReadableValues": []}, {"values": ["2.5"], "fieldCode": "5916AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Weight", "humanReadableValues": []}, {"values": ["1588AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1572AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "select one", "formSubmissionField": "Place_Birth", "humanReadableValues": ["Health facility"]}, {"values": ["Happy Kids Clinic"], "fieldCode": "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Facility_Name", "humanReadableValues": []}, {"values": ["664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1396AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "PMTCT_Status", "humanReadableValues": ["CNE"]}, {"values": ["2018-03-16 08:57:43"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"values": ["2018-03-16 08:59:04"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"values": ["867104020633980"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521183544980, "duration": 0, "_rev": "2-04d992d294837437d5fc099fae979049", "eventDate": "2018-03-16T03:00:00.000+03:00", "eventType": "Birth Registration", "dateEdited": "2018-03-16T10:03:00.759+03:00", "entityType": "child", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.364+03:00", "identifiers": {"OPENMRS_UUID": "06c8644b-b560-45fd-9af5-b6b1484e3504"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183592609, "formSubmissionId": "d59504cc-09ef-4d09-9dc3-8f7eb65882fd"}', null), -(6, '{"_id": "05934ae338431f28bf6793b241bdbb60", "obs": [{"values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_0", "humanReadableValues": []}, {"values": ["0"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_0_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602537, "duration": 0, "_rev": "2-45e4b7c82520480edbc1adecec55f6ae", "eventDate": "2018-01-10T11:59:37.380+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:00.949+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.371+03:00", "identifiers": {"OPENMRS_UUID": "35d6a414-a379-4ada-97ee-39f680eecb91"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"}', null), -(7, '{"_id": "05934ae338431f28bf6793b241bdbc55", "obs": [{"values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "bcg", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "bcg_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602575, "duration": 0, "_rev": "2-1f5e07f8e65a09d5ca34cb21e6a29b41", "eventDate": "2018-01-10T11:59:41.058+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.148+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.376+03:00", "identifiers": {"OPENMRS_UUID": "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "014413c8-4dbf-4876-977d-0c1dfb9e4d05"}', null), -(8, '{"_id": "05934ae338431f28bf6793b241bdc231", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "penta_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "penta_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602635, "duration": 0, "_rev": "2-ad81df44c1f2eaba862585dd8918a16e", "eventDate": "2018-02-21T11:59:50.145+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.341+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.385+03:00", "identifiers": {"OPENMRS_UUID": "85abab15-0be3-4a9d-962d-de99a920d3cb"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "5f1b201d-2132-4eb9-8fa1-3169a61cc50a"}', null), -(9, '{"_id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "_rev": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), -(10, '{"_id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "_rev": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8","team":"ATeam", "teamId":"3453hgb454-4j345n-llk345", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), -(11, '{"_id": "05934ae338431f28bf6793b241be69a5", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "_rev": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), -(12, '{"_id": "05934ae338431f28bf6793b24177a1dc", "obs": [{"values": ["8.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["-0.3160736521259359"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468856705, "duration": 0, "_rev": "65-9ed92fd61bd67d89325ee3ea35c3f3cb", "eventDate": "2018-01-13T19:37:11.954+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.649+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.255+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045587, "formSubmissionId": "306b6dc2-fa15-4e48-9ac3-4f8044899051"}', null), -(13, '{"_id": "05934ae338431f28bf6793b241780bac", "obs": [{"values": ["11.8"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["2.0903075436287146"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857114, "duration": 0, "_rev": "65-81466693915e45bc1feb1f8ccc466475", "eventDate": "2018-03-12T19:40:01.023+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.789+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.260+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045588, "formSubmissionId": "9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3"}', null), -(14, '{"_id": "05934ae338431f28bf6793b241781149", "obs": [{"values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "_rev": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), -(15, '{"_id": "05934ae338431f28bf6793b241781a1e", "obs": [{"values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "_rev": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); - - -INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type ,provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES -(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'Vaccination', '2018-03-13 17:42:03.326000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:26.477000', null, null), -(2, 2, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'Vaccination', '2018-03-14 03:00:00.000000', 'mother', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:28.717000', '2018-03-14 11:39:35.826000', null), -(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'Vaccination', '2018-03-14 19:09:51.379000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:28.750000', null, null), -(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'Vaccination', '2018-03-13 22:10:00.321000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:29.019000', '2018-03-14 19:21:38.401000', null), -(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'Birth Registration', '2018-03-16 03:00:00.000000', 'child', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.364000', '2018-03-16 10:03:00.759000', null), -(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'Vaccination', '2018-01-10 11:59:37.380000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.371000', '2018-03-16 10:03:00.949000', null), -(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'Vaccination', '2018-01-10 11:59:41.058000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.376000', '2018-03-16 10:03:01.148000', null), -(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'Vaccination', '2018-02-21 11:59:50.145000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.385000', '2018-03-16 10:03:01.341000', null), -(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'Vaccination', '2018-02-21 11:59:55.977000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19 17:27:29.390000', '2018-03-16 10:03:01.537000', null), -(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'Vaccination', '2018-02-21 12:00:02.298000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19 17:27:29.394000', '2018-03-16 10:03:01.729000', null), -(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'Vaccination', '2018-02-21 12:00:08.788000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'BTeam', '3453hgb454-4j345n-llk348', '2018-03-19 17:27:29.398000', '2018-03-16 10:13:03.469000', null), -(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'Growth Monitoring', '2018-01-13 19:37:11.954000', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:28:40.255000', '2018-03-19 17:17:15.649000', null), -(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'Growth Monitoring', '2018-03-12 19:40:01.023000', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:28:40.260000', '2018-03-19 17:17:15.789000', null), -(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'Growth Monitoring', '2017-09-06 19:40:24.702000', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19 17:28:40.264000', '2018-03-19 17:17:15.929000', null), -(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'Growth Monitoring', '2017-11-06 19:42:02.327000', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19 17:28:40.268000', '2018-03-19 17:17:16.069000', null); \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/multimedia.sql b/opensrp-core/src/test/resources/test-scripts/multimedia.sql deleted file mode 100644 index c598af60e5..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/multimedia.sql +++ /dev/null @@ -1,11 +0,0 @@ ---clear data -TRUNCATE TABLE core.multi_media; - -ALTER SEQUENCE core.multi_media_id_seq RESTART WITH 6; - -INSERT INTO core.multi_media (id, document_id, case_id, provider_id, content_type, file_path, file_category) VALUES -(1, '05934ae338431f28bf6793b241f0c5ca', '040d4f18-8140-479c-aa21-725612073490', 'biddemo', 'image/jpeg', '/opt/patient_images/040d4f18-8140-479c-aa21-725612073490.jpg', 'profilepic'), -(2, '317f8db1bb6cc4b15ecc9993a282bc2f', '3c07c42c-6aee-4eb9-8db3-0aae3eac8f6d', 'biddemo', 'image/jpeg', '/opt/patient_images/3c07c42c-6aee-4eb9-8db3-0aae3eac8f6d.jpg', 'profilepic'), -(3, '091488163b6ecd589a915372a0ad3b0d', '87dc3230-84f7-4088-b257-e8b3130ab86b', 'biddemo', 'image/jpeg', '/opt/patient_images/87dc3230-84f7-4088-b257-e8b3130ab86b.jpg', 'profilepic'), -(4, '3157f9339bf0c948dd5d12aff82111e1', '01503901-5acb-45fb-affe-839ac39d200d', 'biddemo', 'image/jpeg', '/opt/patient_images/01503901-5acb-45fb-affe-839ac39d200d.jpg', 'profilepic'), -(5, '317f8db1bb6cc4b15ecc9993a2922f47', '24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf', 'tester11', 'image/jpeg', '/opt/patient_images/24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf.jpg', 'profilepic'); diff --git a/opensrp-core/src/test/resources/test-scripts/report.sql b/opensrp-core/src/test/resources/test-scripts/report.sql deleted file mode 100644 index c7e0575cde..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/report.sql +++ /dev/null @@ -1,22 +0,0 @@ ---clear data -TRUNCATE TABLE core.report CASCADE; - -ALTER SEQUENCE core.report_id_seq RESTART WITH 6; - -ALTER SEQUENCE core.report_metadata_id_seq RESTART WITH 6; - ---insert data - -INSERT INTO core.report (id, json) VALUES -(1, '{"_id": "07271855-4018-497a-b180-6af01f0fa62b", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645" , "type": "Report", "status": "ERROR", "version": 1503312366265, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-08-21T13:46:32.331+03:00", "locationId": "b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", "providerId": "biddemo", "reportDate": "2017-06-28T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"1121K"}, "serverVersion": 1503312366265, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "2", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "2", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "10", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "1", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "43", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "22", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "2", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "14", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "2", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "1", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "21", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "10", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "1", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "43", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "2", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "1", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "2", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "7073cef4-b974-4910-afa7-dd2ccadba089"}'), -(2, '{"_id": "ecafd20f-c95b-4046-9355-9512e1908da4", "baseEntityId": "678343544-nhj7-jghdfgfd-mkjdkfg" ,"type": "Report", "status": "WARNING", "version": 1500056613263, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T18:38:43.492+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-07-14T21:23:52.478+03:00", "reportType": "HIA2", "identifiers": {"WHO_R":"5934343"}, "serverVersion": 1500056613263, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "88", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "54", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "34", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "88", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "1aea74ac-b737-477a-99d3-728011fbae3f"}'), -(3, '{"_id": "c57ba49f-34b9-4986-9b87-69f48b1830c5", "type": "Report", "status": "WARNING", "version": 1500307579516, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T19:06:42.787+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": 1500307579516, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "4", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "4", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "4", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "88f9fe90-1e45-46b3-8056-e932574dcbd9"}'), -(4, '{"_id": "cd09a3d4-01d9-485c-a1c5-a2eb078a61be", "type": "Report", "status": "SUCCESS", "version": 1500394719661, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-18T19:18:41.822+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-06-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {}, "serverVersion": 1500394719661, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "100", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "100", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "100", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "100", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "100", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "100", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "100", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "Weight below -3Z scores 24-59 months", "value": "100", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "100", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Attendance child health 12-59 months (total)", "value": "200", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "100", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "100", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health 12-59 months (male)", "value": "100", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Attendance child health (total)", "value": "400", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Total weight below -3Z scores < five years", "value": "200", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "200", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "100", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "100", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "100", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "100", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "100", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "100", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "200", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "100", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "100", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "100", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "Weight below -3Z scores 0-23 months", "value": "100", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "100", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Total not gaining weight age < five years", "value": "200", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "100", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "100", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "100", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "100", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "100", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "100", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "Attendance child health < 12 months (total)", "value": "200", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "100", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "100", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "100", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "100", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "100", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "100", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "200", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "100", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "100", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "100", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "d78a8105-f808-488a-b67a-0c4c46845194"}'), -(5, '{"_id": "60ab7d5c-a051-4633-b0b3-f52b701cb261", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645", "type": "Report", "status": "WARNING", "version": 1500445930478, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-19T09:32:41.737+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": null, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "1000000", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100000", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "10000", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "03b5d0b8-4f72-4415-9909-ce03b5802c75"}'); - -INSERT INTO core.report_metadata (id, report_id, document_id, form_submission_id, base_entity_id, server_version, report_type, report_date, provider_id, location_id, team, team_id, date_edited) VALUES -(1, 1, '07271855-4018-497a-b180-6af01f0fa62b', '7073cef4-b974-4910-afa7-dd2ccadba089', '6654kk-mnj45-mmnfgd-l45645', 1503312366265, 'HIA2', '2017-06-28', 'biddemo', 'b0781dd2-e1b1-4878-8e6c-fba488eb9fa3', null, null, '2017-08-21'), -(2, 2, 'ecafd20f-c95b-4046-9355-9512e1908da4', '1aea74ac-b737-477a-99d3-728011fbae3f', '678343544-nhj7-jghdfgfd-mkjdkfg', 1500056613263, 'HIA2', '2017-07-14', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-17'), -(3, 3, 'c57ba49f-34b9-4986-9b87-69f48b1830c5', '88f9fe90-1e45-46b3-8056-e932574dcbd9', null, 1500307579516, 'HIA2', '2017-05-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-17'), -(4, 4, 'cd09a3d4-01d9-485c-a1c5-a2eb078a61be', 'd78a8105-f808-488a-b67a-0c4c46845194', null, 1500394719661, 'HIA2', '2017-06-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-18'), -(5, 5, '60ab7d5c-a051-4633-b0b3-f52b701cb261', '03b5d0b8-4f72-4415-9909-ce03b5802c75', '6654kk-mnj45-mmnfgd-l45645', null, 'HIA2', '2017-05-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-19'); \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/stock.sql b/opensrp-core/src/test/resources/test-scripts/stock.sql deleted file mode 100644 index 61c159f267..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/stock.sql +++ /dev/null @@ -1,42 +0,0 @@ ---clear data -TRUNCATE TABLE core.stock CASCADE; - -ALTER SEQUENCE core.stock_id_seq RESTART WITH 16; - -ALTER SEQUENCE core.stock_metadata_id_seq RESTART WITH 16; - ---insert data -INSERT INTO core.stock (id, json) VALUES -(1, '{"_id": "05934ae338431f28bf6793b24181ea5e", "type": "Stock", "value": -3, "to_from": "C/C", "version": 1521003030510, "_rev": "1-4f090916632e2ae10f1ef7f972aaf6d2", "identifier": 1, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.515+03:00", "date_created": 1520892000000, "date_updated": 1520939303991, "serverVersion": 1521003030510, "vaccine_type_id": "2", "transaction_type": "issued"}'), -(2, '{"_id": "05934ae338431f28bf6793b241974356", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521007341010, "_rev": "1-f24ec853ded69d25028985069960f71a", "identifier": 2, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.587+03:00", "date_created": 1518559200000, "date_updated": 1521007053945, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "received"}'), -(3, '{"_id": "05934ae338431f28bf6793b241974f0e", "type": "Stock", "value": -1, "to_from": "C/C", "version": 1521007341010, "_rev": "1-6e7a4b9ee84403f5fa25c5d83269149b", "identifier": 3, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.633+03:00", "date_created": 1520892000000, "date_updated": 1521007153528, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(4, '{"_id": "05934ae338431f28bf6793b241975c6c", "type": "Stock", "value": 12, "to_from": "Physical_recount", "version": 1521007342323, "_rev": "1-a57ae3bf0a9d652f00dc33c23e2c7a52", "identifier": 4, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.655+03:00", "date_created": 1518559200000, "date_updated": 1521007339163, "serverVersion": 1521007342323, "vaccine_type_id": "2", "transaction_type": "loss_adjustment"}'), -(5, '{"_id": "05934ae338431f28bf6793b241978ad9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521009418783, "_rev": "1-1421e42faf02e9fe5a65279ee3b199c3", "identifier": 5, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.672+03:00", "date_created": 1521000000000, "date_updated": 1521009346585, "serverVersion": 1521009418783, "vaccine_type_id": "1", "transaction_type": "received"}'), -(6, '{"_id": "05934ae338431f28bf6793b2419a4bd9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521022620903, "_rev": "1-aba3734a871fb2b88deab7bb7e7f3a60", "identifier": 6, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.683+03:00", "date_created": 1519855200000, "date_updated": 1521022504878, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "received"}'), -(7, '{"_id": "05934ae338431f28bf6793b2419a590b", "type": "Stock", "value": -27, "to_from": "C/C", "version": 1521022620903, "_rev": "1-5f6fdd394f6c34143f07798dd7fe74b0", "identifier": 7, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.689+03:00", "date_created": 1520632800000, "date_updated": 1521022571660, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(8, '{"_id": "05934ae338431f28bf6793b2419a606f", "type": "Stock", "value": 1, "to_from": "Physical_recount", "version": 1521023046990, "_rev": "1-872a0dd1e50ea9437786f69fad2d182a", "identifier": 8, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.693+03:00", "date_created": 1518559200000, "date_updated": 1521022962706, "serverVersion": 1521023046990, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), -(9, '{"_id": "05934ae338431f28bf6793b2419a6dc7", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521030501655, "_rev": "1-a3846a988777e252c6f9aba383300b78", "identifier": 9, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.705+03:00", "date_created": 1518559200000, "date_updated": 1521027411881, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "received"}'), -(10, '{"_id": "05934ae338431f28bf6793b2419a72da", "type": "Stock", "value": -19, "to_from": "C/C", "version": 1521030501655, "_rev": "1-42168381f27525e3c9022fbc46358a4b", "identifier": 10, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.735+03:00", "date_created": 1519164000000, "date_updated": 1521027466540, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "issued"}'), -(11, '{"_id": "05934ae338431f28bf6793b241b2daa6", "type": "Stock", "value": -7, "to_from": "C/C", "version": 1521074546344, "_rev": "1-65d5197a96e17a8febf61324fbe5d454", "identifier": 11, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.755+03:00", "date_created": 1521064800000, "date_updated": 1521074321594, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(12, '{"_id": "05934ae338431f28bf6793b241b2df09", "type": "Stock", "value": -2, "to_from": "Physical_recount", "version": 1521074546344, "_rev": "1-4069d28441029c88717f71d622eab412", "identifier": 12, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.771+03:00", "date_created": 1521064800000, "date_updated": 1521074352741, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), -(13, '{"_id": "05934ae338431f28bf6793b241b3c445", "type": "Stock", "value": -6, "to_from": "C/C", "version": 1521112141441, "_rev": "1-509d0919039dc1b0f9180aa187a87b75", "identifier": 13, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.787+03:00", "date_created": 1520632800000, "date_updated": 1521111867821, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(14, '{"_id": "05934ae338431f28bf6793b241b3c6f9", "type": "Stock", "value": 2, "to_from": "DHO", "version": 1521112141441, "_rev": "1-7e45403108a172bd63486e35ec99ce79", "identifier": 14, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.804+03:00", "date_created": 1518645600000, "date_updated": 1521111912719, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "received"}'), -(15, '{"_id": "05934ae338431f28bf6793b241b3cd6f", "type": "Stock", "value": -55, "to_from": "C/C", "version": 1521112141441, "_rev": "1-83e0bc2abeda38e5aa282d1f8d75e6bc", "identifier": 15, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.809+03:00", "date_created": 1520460000000, "date_updated": 1521111967331, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'); - - -INSERT INTO core.stock_metadata (id, stock_id, document_id, server_version, provider_id, location_id, team, team_id) VALUES -(1, 1, '05934ae338431f28bf6793b24181ea5e', 1521003030510, 'biddemo', null, null, null), -(2, 2, '05934ae338431f28bf6793b241974356', 1521007341010, 'biddemo', null, null, null), -(3, 3, '05934ae338431f28bf6793b241974f0e', 1521007341010, 'biddemo', null, null, null), -(4, 4, '05934ae338431f28bf6793b241975c6c', 1521007342323, 'biddemo', null, null, null), -(5, 5, '05934ae338431f28bf6793b241978ad9', 1521009418783, 'biddemo', null, null, null), -(6, 6, '05934ae338431f28bf6793b2419a4bd9', 1521022620903, 'biddemo', null, null, null), -(7, 7, '05934ae338431f28bf6793b2419a590b', 1521022620903, 'biddemo', null, null, null), -(8, 8, '05934ae338431f28bf6793b2419a606f', 1521023046990, 'biddemo', null, null, null), -(9, 9, '05934ae338431f28bf6793b2419a6dc7', 1521030501655, 'biddemo', null, null, null), -(10, 10, '05934ae338431f28bf6793b2419a72da', 1521030501655, 'biddemo', null, null, null), -(11, 11, '05934ae338431f28bf6793b241b2daa6', 1521074546344, 'biddemo', null, null, null), -(12, 12, '05934ae338431f28bf6793b241b2df09', 1521074546344, 'biddemo', null, null, null), -(13, 13, '05934ae338431f28bf6793b241b3c445', 1521112141441, 'biddemo1', null, null, null), -(14, 14, '05934ae338431f28bf6793b241b3c6f9', 1521112141441, 'biddemo1', null, null, null), -(15, 15, '05934ae338431f28bf6793b241b3cd6f', 1521112141441, 'biddemo1', null, null, null); \ No newline at end of file diff --git a/opensrp-core/src/test/resources/test-scripts/view_configuration.sql b/opensrp-core/src/test/resources/test-scripts/view_configuration.sql deleted file mode 100644 index 9752ef53ef..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/view_configuration.sql +++ /dev/null @@ -1,21 +0,0 @@ ---clear data -TRUNCATE TABLE core.view_configuration CASCADE; - -ALTER SEQUENCE core.view_configuration_id_seq RESTART WITH 6; - -ALTER SEQUENCE core.view_configuration_metadata_id_seq RESTART WITH 6; - ---insert data -INSERT INTO core.view_configuration (id, json) VALUES -(1, '{"_id": "92141b17040021a7ce326194ff0029f7", "_rev": "19-004e54d1f1cd1b29ac681ec74cc672d2", "type": "ViewConfiguration", "metadata": {"type": "Login", "background": {"orientation": "BOTTOM_TOP"}, "showPasswordCheckbox": true}, "identifier": "login", "serverVersion": 1515152954114}'), -(2, '{"_id": "19a2e8aa6739d77a2b780199c6122867", "_rev": "60-9eaf54f5e5aa77f399f746401feaaab6", "type": "ViewConfiguration", "metadata": {"type": "Main", "language": "en", "applicationName": "TB REACH", "enableJsonViews": true}, "identifier": "main", "serverVersion": 1516890951253}'), -(3, '{"_id": "3a065d7c3354eb2bc23c8a3bc303ba20", "_rev": "2-e7c21d42edca554d9b1fb500381ded8d", "type": "ViewConfiguration", "views": [{"label": "column_patient", "visible": true, "residence": {"position": 0, "layout_weight": "2"}, "identifier": "patient"}, {"label": "column_results", "visible": true, "residence": {"position": 1, "layout_weight": "2"}, "identifier": "results"}, {"label": "column_treat", "visible": true, "residence": {"position": 3, "layout_weight": "1.5"}, "identifier": "treat"}, {"label": "column_smr_results", "visible": true, "residence": {"position": 2, "layout_weight": "1.5"}, "identifier": "smr_results"}, {"label": "column_xpert_results", "visible": true, "residence": {"position": 2, "layout_weight": "1.5"}, "identifier": "xpert_results"}, {"label": "column_diagnosis", "visible": true, "residence": {"position": 4, "layout_weight": "1.5"}, "identifier": "diagnosis"}], "metadata": {"type": "Register", "searchBarText": "Name and Participant ID", "enableSortList": false, "enableFilterList": false, "enableAdvancedSearch": true}, "identifier": "positive_register", "serverVersion": 1516605871345}'), -(4, '{"_id": "3a065d7c3354eb2bc23c8a3bc303ef62", "_rev": "4-44df2edb68f7fd2d416c3d24e0966abd", "type": "ViewConfiguration", "jsonView": {"views": [{"views": [], "widget": "org.smartregister.view.customcontrols.CustomFontTextView", "properties": [{"name": "id", "type": "ref", "value": "results_header"}, {"name": "style", "type": "ref", "value": "@style/CustomFontTextViewStyle.ClientList.Medium"}, {"name": "layout_width", "type": "dimen", "value": "0dp"}, {"name": "layout_height", "type": "dimen", "value": "wrap_content"}, {"name": "layout_alignParentRight", "type": "BOOLEAN", "value": "true"}, {"name": "layout_marginRight", "type": "dimen", "value": "7dp"}, {"name": "layout_weight", "type": "float", "value": "3.4"}, {"name": "text", "type": "ref", "value": "@string/results"}, {"name": "textAllCaps", "type": "BOOLEAN", "value": "true"}, {"name": "textColor", "type": "ref", "value": "@color/client_list_grey"}, {"name": "textSize", "type": "dimen", "value": "16sp"}]}, {"views": [], "widget": "org.smartregister.view.customcontrols.CustomFontTextView", "properties": [{"name": "id", "type": "ref", "value": "treat_header"}, {"name": "style", "type": "ref", "value": "@style/CustomFontTextViewStyle.ClientList.Medium"}, {"name": "layout_width", "type": "dimen", "value": "0dp"}, {"name": "layout_height", "type": "dimen", "value": "wrap_content"}, {"name": "layout_centerHorizontal", "type": "BOOLEAN", "value": "true"}, {"name": "layout_weight", "type": "float", "value": "2.6"}, {"name": "text", "type": "ref", "value": "@string/treat"}, {"name": "textAllCaps", "type": "BOOLEAN", "value": "true"}, {"name": "textColor", "type": "ref", "value": "@color/client_list_grey"}, {"name": "textSize", "type": "dimen", "value": "16sp"}]}, {"views": [], "widget": "org.smartregister.view.customcontrols.CustomFontTextView", "properties": [{"name": "id", "type": "ref", "value": "diagnosis_header"}, {"name": "style", "type": "ref", "value": "@style/CustomFontTextViewStyle.ClientList.Medium"}, {"name": "layout_width", "type": "dimen", "value": "0dp"}, {"name": "layout_height", "type": "dimen", "value": "wrap_content"}, {"name": "layout_centerHorizontal", "type": "BOOLEAN", "value": "true"}, {"name": "layout_weight", "type": "float", "value": "2.6"}, {"name": "text", "type": "ref", "value": "@string/diagnosis"}, {"name": "textAllCaps", "type": "BOOLEAN", "value": "true"}, {"name": "textColor", "type": "ref", "value": "@color/client_list_grey"}, {"name": "textSize", "type": "dimen", "value": "16sp"}, {"name": "visibility", "type": "string", "value": "gone"}]}], "widget": "LinearLayout", "properties": [{"name": "id", "type": "ref", "value": "register_headers"}, {"name": "layout_width", "type": "dimen", "value": "fill_parent"}, {"name": "layout_height", "type": "dimen", "value": "wrap_content"}, {"name": "background", "type": "ref", "value": "@color/client_list_header_dark_grey"}, {"name": "baselineAligned", "type": "string", "value": "false"}, {"name": "orientation", "type": "string", "value": "horizontal"}]}, "identifier": "positive_register_header", "serverVersion": 1516614392971}'), -(5, '{"_id": "d243bc5737fb389e52601cb850299541", "_rev": "46-7fa67d54ca9938f5400a2eb8fbf7a54e", "type": "ViewConfiguration", "labels": {"date": "Tarehe", "form": "Fomu", "contacts": "Anwani", "record_results": "REKODI MATOKEO", "remove_patient": "Toa Mgonjwa", "first_encounter": "Makutano ya Kwanza", "service_history": "Historia ya Huduma", "positive_results": "Matokeo ya Kudhibitishwa", "positive_patients": "Wangonjwa Wa Kudhibitishwa", "no_results_recorded": "Hakuna Matokeo", "presumptive_patients": "Wagonjwa Watakaopimwa", "in_treatment_patients": "Wagonjwa Wanaotibiwa"}, "identifier": "lang_sw", "serverVersion": 1515152954118}'); - -INSERT INTO core.view_configuration_metadata (id, view_configuration_id, document_id, identifier, server_version) VALUES -(1, 1, '92141b17040021a7ce326194ff0029f7', 'login', 1515152954114), -(2, 2, '19a2e8aa6739d77a2b780199c6122867', 'main', 1516890951253), -(3, 3, '3a065d7c3354eb2bc23c8a3bc303ba20', 'positive_register', 1516605871345), -(4, 4, '3a065d7c3354eb2bc23c8a3bc303ef62', 'positive_register_header', 1516614392971), -(5, 5, 'd243bc5737fb389e52601cb850299541', 'lang_sw', 1515152954118); \ No newline at end of file