diff --git a/api/src/main/resources/messages.properties b/api/src/main/resources/messages.properties index 71f52028..af50dc2d 100644 --- a/api/src/main/resources/messages.properties +++ b/api/src/main/resources/messages.properties @@ -132,10 +132,8 @@ registrationapp.person.relationship.selectRelationshipType=Select Relationship T #Continuity of Care registrationapp.continuityOfCare.label=Continuity of Care registrationapp.continuityOfCare.info=This Patient already has demographic information and fingerprints recorded in SEDISH -registrationapp.continuityOfCare.info.missing=This Patient does not have a locally stored CCD! registrationapp.continuityOfCare.document.date=Document Date registrationapp.continuityOfCare.document.import=Import registrationapp.continuityOfCare.document.view=View -registrationapp.continuityOfCare.document.refresh=Re-Import registrationapp.continuityOfCare.document.import.dialog.label=Continuity of Care Document Import registrationapp.continuityOfCare.document.import.dialog.message=Do you want to download this information? diff --git a/api/src/main/resources/messages_fr.properties b/api/src/main/resources/messages_fr.properties index f5b21515..a95dac49 100644 --- a/api/src/main/resources/messages_fr.properties +++ b/api/src/main/resources/messages_fr.properties @@ -132,10 +132,8 @@ registrationapp.dateCreated=Date créée #Continuity of Care registrationapp.continuityOfCare.label=Continuité des Soins registrationapp.continuityOfCare.info=Ce Patient a deja des informations demographiques et des empreinter enregistrées sur SEDISH -registrationapp.continuityOfCare.info.missing=Ce patient n'a pas de CCD stocké localement! registrationapp.continuityOfCare.document.date=Document Date registrationapp.continuityOfCare.document.import=Importer registrationapp.continuityOfCare.document.view=Vue -registrationapp.continuityOfCare.document.refresh=Réimporter registrationapp.continuityOfCare.document.import.dialog.label=Continuité des Soins Document Importer registrationapp.continuityOfCare.document.import.dialog.message=Voulez vous telechargez ces information? diff --git a/omod/pom.xml b/omod/pom.xml index 4f02638f..2f1461d6 100644 --- a/omod/pom.xml +++ b/omod/pom.xml @@ -232,23 +232,23 @@ - - - - - - - - - - - - - - - - - + + de.saumya.mojo + gem-maven-plugin + true + + + + exec + + generate-resources + + + + 1.7.10 + ${gem.home}/bin/compass compile ${basedir}/src/main/compass + + @@ -259,23 +259,23 @@ watch-sass - - - - - - - - - - - - - - - - - + + de.saumya.mojo + gem-maven-plugin + true + + + + exec + + generate-resources + + + + 1.7.10 + ${gem.home}/bin/compass watch ${basedir}/src/main/compass + + diff --git a/omod/src/main/compass/sass/registerPatient.scss b/omod/src/main/compass/sass/registerPatient.scss index 43eb18ef..99cb4abb 100644 --- a/omod/src/main/compass/sass/registerPatient.scss +++ b/omod/src/main/compass/sass/registerPatient.scss @@ -2,14 +2,3 @@ #simplemodal-container, .dialog { width: 1000px !important; } - -.loader { - fill: #363463; - -webkit-animation: spin 2s linear infinite; /* Safari */ - animation: spin 2s linear infinite; -} - -@keyframes spin { - 0% { transform: rotate(0deg); } - 100% { transform: rotate(360deg); } -} diff --git a/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/MatchingPatientsFragmentController.java b/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/MatchingPatientsFragmentController.java index d4e0e6f9..9cb38126 100644 --- a/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/MatchingPatientsFragmentController.java +++ b/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/MatchingPatientsFragmentController.java @@ -13,8 +13,6 @@ */ package org.openmrs.module.registrationapp.fragment.controller; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.codehaus.jackson.JsonNode; import org.openmrs.Patient; import org.openmrs.PatientIdentifier; @@ -57,13 +55,12 @@ public class MatchingPatientsFragmentController { public static final int MAX_RESULTS = 10; public static final double CUTOFF = 2.0; - private final Log log = LogFactory.getLog(this.getClass()); public static final String[] PATIENT_PROPERTIES = new String[]{"uuid", "givenName", "familyName", "gender", "birthdate", "personAddress"}; public static final String[] MPI_PATIENT_PROPERTIES = new String[]{"uuid", "givenName", "familyName", - "gender", "birthdate", "personAddress", "mpiPatient", "sourceLocation"}; + "gender", "birthdate", "personAddress", "mpiPatient"}; public List getSimilarPatients(@RequestParam("appId") AppDescriptor app, @SpringBean("registrationCoreService") RegistrationCoreService service, @@ -80,16 +77,8 @@ public List getSimilarPatients(@RequestParam("appId") AppDescripto NavigableFormStructure formStructure = RegisterPatientFormBuilder.buildFormStructure(app); RegisterPatientFormBuilder.resolvePatientIdentifierFields(formStructure, patient, request.getParameterMap()); - List matches = new ArrayList(); - List fastSimilarPatients = service.findFastSimilarPatients(patient, otherDataPoints, CUTOFF, determineMaxResults(app)); - for(PatientAndMatchQuality pm:fastSimilarPatients){ - log.error("VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVvv"); - log.error(pm.getSourceLocation()); - log.error("VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVvv"); - } - if(fastSimilarPatients!=null && fastSimilarPatients.size() > 0){ - matches.addAll(fastSimilarPatients) ; - } + + List matches = service.findFastSimilarPatients(patient, otherDataPoints, CUTOFF, determineMaxResults(app)); return getSimpleObjects(app, ui, matches); } @@ -201,9 +190,6 @@ private void addIdentifiersToPatientSimple(Patient patientEntry, SimpleObject pa if (Arrays.asList(defaultProperties).contains("mpiPatient")) { propertiesToIncludeList.add("mpiPatient"); } - if (Arrays.asList(defaultProperties).contains("sourceLocation")) { - propertiesToIncludeList.add("sourceLocation"); - } Iterator i = app.getConfig().get("matchingPatientsPropertiesToDisplay").getElements(); while (i.hasNext()) { propertiesToIncludeList.add(i.next().getTextValue()); @@ -229,7 +215,6 @@ private void addRequiredPropertiesToInclude(List propertiesToInclude) { addIfMissing("gender", propertiesToInclude); addIfMissing("personAddress", propertiesToInclude); addIfMissing("birthdate", propertiesToInclude); - addIfMissing("sourceLocation", propertiesToInclude); } private void addIfMissing(String property, List propertiesToInclude) { diff --git a/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/summary/ContinuityOfCareFragmentController.java b/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/summary/ContinuityOfCareFragmentController.java index 99dff1ff..edc05762 100644 --- a/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/summary/ContinuityOfCareFragmentController.java +++ b/omod/src/main/java/org/openmrs/module/registrationapp/fragment/controller/summary/ContinuityOfCareFragmentController.java @@ -1,6 +1,5 @@ package org.openmrs.module.registrationapp.fragment.controller.summary; -import org.dcm4chee.xds2.common.exception.XDSException; import org.openmrs.Patient; import org.openmrs.api.context.Context; import org.openmrs.module.xdssender.api.domain.Ccd; @@ -33,15 +32,13 @@ public void controller(FragmentModel model, @FragmentParam("patientId") Integer public String viewCCD(@RequestParam("patientId") Integer patientId) { Patient patient = Context.getPatientService().getPatient(patientId); - return getCcdService().getHtmlParsedLocallyStoredCcd(patient); + return getCcdService().getLocallyStoredCcd(patient).getDocument(); } - public String importCCD(@RequestParam("patientId") Integer patientId, HttpServletResponse response) throws IOException, XDSException { - Patient patient = Context.getPatientService().getPatient(patientId); - Ccd ccd = getCcdService().downloadAndSaveCcd(patient); - return getCcdService().getHtmlParsedLocallyStoredCcd(ccd); + public void importCCD(@RequestParam("patientId") Integer patientId, HttpServletResponse response) throws IOException { + getCcdService().downloadCcdAsPDF(response.getOutputStream(), Context.getPatientService().getPatient(patientId)); } - + private CcdService getCcdService() { return Context.getRegisteredComponent("xdsSender.CcdService", CcdService.class); } diff --git a/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp b/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp index 03755300..e741833f 100644 --- a/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp +++ b/omod/src/main/webapp/fragments/summary/continuityOfCare.gsp @@ -1,70 +1,44 @@ <% ui.includeJavascript("registrationapp", "summary/continuityOfCare.js") - ui.includeCss("registrationapp","continuityOfCare.css") %> <% if (isCCDAvailable) { %> -
-
- -

${ ui.message("registrationapp.continuityOfCare.label") }

-
-
-
-
-

${ ui.message("registrationapp.continuityOfCare.document.date") }

-

${ ui.message(CCDDate) }

-
-
-

-

${ ui.message("registrationapp.continuityOfCare.info") }

-
+
+
+ +

${ ui.message("registrationapp.continuityOfCare.label") }

-
- - - ${ ui.message("registrationapp.continuityOfCare.document.refresh") } - - -
-
-
-<% } else{%> -
-
- -

${ ui.message("registrationapp.continuityOfCare.label") }

-
-
-
-
-

-

${ ui.message("registrationapp.continuityOfCare.info.missing") }

+
+
+
+

${ ui.message("registrationapp.continuityOfCare.document.date") }

+

${ ui.message(CCDDate) }

+
+
+

+

${ ui.message("registrationapp.continuityOfCare.info") }

+
+
+
+
-
- -
-
-