From af4463d97c5f90828681a57b4d0f20fe12959a51 Mon Sep 17 00:00:00 2001 From: "Stephen S. Musoke" Date: Fri, 2 Feb 2018 09:49:30 +0300 Subject: [PATCH] EMTCT Module Integration forms (#326) * Added follow--up encounter type * Updated modules to match Reference Application 2.7 release * Added custom concepts for EMTCT module * First draft of the follow-up form * Updated concept IDs to start from 165100 * Merge branch 'master' of https://github.com/METS-Programme/openmrs-module-aijar into emtct_module # Conflicts: # api/src/main/resources/metadata/Concepts_ART-1.xml * Concept name definitions * Updated ordering of concept to match the existing style * Added validations for the data capture form * Updated pom.xml for html form entry update to 3.6.0 which fixes a javascript issue --- .../deploy/bundle/CommonMetadataBundle.java | 1 + .../aijar/metadata/core/EncounterTypes.java | 16 ++ .../resources/metadata/Custom_Concepts.xml | 104 ++++++++ omod/pom.xml | 5 + .../htmlforms/053-AppointmentBook.xml | 231 ++++++++++++++++++ omod/src/main/webapp/resources/js/aijar.js | 9 +- pom.xml | 18 +- 7 files changed, 369 insertions(+), 15 deletions(-) create mode 100755 omod/src/main/webapp/resources/htmlforms/053-AppointmentBook.xml diff --git a/api/src/main/java/org/openmrs/module/aijar/api/deploy/bundle/CommonMetadataBundle.java b/api/src/main/java/org/openmrs/module/aijar/api/deploy/bundle/CommonMetadataBundle.java index 83f1e85c5..5e867c020 100644 --- a/api/src/main/java/org/openmrs/module/aijar/api/deploy/bundle/CommonMetadataBundle.java +++ b/api/src/main/java/org/openmrs/module/aijar/api/deploy/bundle/CommonMetadataBundle.java @@ -55,6 +55,7 @@ public void install() throws Exception { install(EncounterTypes.OPD_ENCOUNTER); install(EncounterTypes.TB_SUMMARY_ENCOUNTER); install(EncounterTypes.VIRAL_LOAD_NON_SUPPRESSED); + install(EncounterTypes.APPOINTMENT_FOLLOW_UP); //installing programs metadata log.info("Installing Programs"); diff --git a/api/src/main/java/org/openmrs/module/aijar/metadata/core/EncounterTypes.java b/api/src/main/java/org/openmrs/module/aijar/metadata/core/EncounterTypes.java index 3af7304d5..851a3542f 100644 --- a/api/src/main/java/org/openmrs/module/aijar/metadata/core/EncounterTypes.java +++ b/api/src/main/java/org/openmrs/module/aijar/metadata/core/EncounterTypes.java @@ -86,4 +86,20 @@ public String uuid() { return "38cb2232-30fc-4b1f-8df1-47c795771ee9"; } }; + + public static EncounterTypeDescriptor APPOINTMENT_FOLLOW_UP = new EncounterTypeDescriptor() { + @Override + public String name() { + return "Appointment Follow-up "; + } + + @Override + public String description() { + return "Followup actions for patients especially after missing a facility visit"; + } + + public String uuid() { + return "dc551efc-024d-4c40-aeb8-2147c4033778"; + } + }; } diff --git a/api/src/main/resources/metadata/Custom_Concepts.xml b/api/src/main/resources/metadata/Custom_Concepts.xml index d3ac24c96..c4981b3de 100644 --- a/api/src/main/resources/metadata/Custom_Concepts.xml +++ b/api/src/main/resources/metadata/Custom_Concepts.xml @@ -689,6 +689,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3093,6 +3124,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3695,6 +3771,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/omod/pom.xml b/omod/pom.xml index f494cd50d..c06ee8b63 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -120,6 +120,11 @@ htmlformentry-api-1.10 + + org.openmrs.module + htmlformentry-api-2.0 + + org.openmrs.module htmlformentry-api-2.0 diff --git a/omod/src/main/webapp/resources/htmlforms/053-AppointmentBook.xml b/omod/src/main/webapp/resources/htmlforms/053-AppointmentBook.xml new file mode 100755 index 000000000..2f9df8328 --- /dev/null +++ b/omod/src/main/webapp/resources/htmlforms/053-AppointmentBook.xml @@ -0,0 +1,231 @@ + + + + + +
+
+

HMIS 053 Appointment Book - Followup

+
+ + + + + + + + + + + + + + + + + + + + + +
+

+ +

+
+ + + + +
+

+ +

+
+ +
+
+ +
+
+ +
+
+ +
+

+ + +

+
+

+
+
+

+ +

+
+

+ + + +

+
+

+
+
+ +
+
+
+

+ +

+
+

+ + +

+
+

+
+ + +

+
+
+ +
+
+
\ No newline at end of file diff --git a/omod/src/main/webapp/resources/js/aijar.js b/omod/src/main/webapp/resources/js/aijar.js index 41264c39e..193eca9d3 100755 --- a/omod/src/main/webapp/resources/js/aijar.js +++ b/omod/src/main/webapp/resources/js/aijar.js @@ -37,12 +37,11 @@ jq(document).ready(function () { }); /** - * Changes a field date in the format yy-mm-dd to dd/mm/yy which eas + * Changes a field date in the format yy-mm-dd to dd/mm/yy which is easier to read * @param dateValue */ function changeFieldDateToJavascriptDate(dateValue) { - new Date(); - return new Date(dateValue); + return jq.datepicker.formatDate('dd/mm/yy', jq.datepicker.parseDate('yy-mm-dd', dateValue)); } @@ -222,7 +221,7 @@ var fieldHelper = { this.$jqObj = jq(args); } - this.$jqObj.attr('disabled', true); + this.$jqObj.attr('disabled', true).fadeTo(250, 0.25); }, enable: function (args) { @@ -232,7 +231,7 @@ var fieldHelper = { this.$jqObj = jq(args); } - this.$jqObj.removeAttr('disabled'); + this.$jqObj.removeAttr('disabled').fadeTo(250, 1); }, makeReadonly: function (args) { if (args instanceof jQuery) { diff --git a/pom.xml b/pom.xml index d0646a40c..c697ff6c4 100644 --- a/pom.xml +++ b/pom.xml @@ -76,8 +76,6 @@ 1.4.2 1.0.0 1.6.4 - 3.3.2 - 1.6.3 3.6.0 1.9.0 4.4.0 @@ -124,7 +122,7 @@ compile
--> - + javax.servlet javax.servlet-api @@ -221,7 +219,7 @@ ${dataexchangeVersion} provided - + org.openmrs.module dataintegrity-api @@ -265,7 +263,7 @@ ${htmlformentryVersion} provided - + org.openmrs.module htmlformentry-api-1.10 @@ -286,7 +284,7 @@ ${idgenVersion} provided - + org.openmrs.module legacyui-omod @@ -342,7 +340,7 @@ ${registrationcoreVersion} provided - + org.openmrs.module registrationapp-api @@ -363,7 +361,7 @@ ${reportingVersion} test - + org.openmrs.module reportingcompatibility-api @@ -377,7 +375,7 @@ ${serializationxstreamVersion} provided - + org.openmrs.module serialization.xstream-api-2.0 @@ -565,4 +563,4 @@ - + \ No newline at end of file