Skip to content

Commit

Permalink
Merge pull request #103 from IsantePlus/isanteplus_version_february_2022
Browse files Browse the repository at this point in the history
Isanteplus version february 2022
  • Loading branch information
jeandaboul authored Jun 21, 2022
2 parents 81ee674 + ec15689 commit 9894796
Show file tree
Hide file tree
Showing 29 changed files with 1,491 additions and 1,243 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,5 +141,4 @@ public class ConfigurableGlobalProperties {
public static final String XDSSENDER_REPOSITORY_PASSWORD = "xdssender.xdsrepository.password";

public static final String XDSSENDER_REPOSITORY_PASSWORD_VALUE = "1234";

}
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,8 @@ public class IsantePlusConstants {
public static final Integer IMMUNIZATION_NUMBER_QUESTION_CONCEPT = 1418;

public static final Integer IMMUNIZATION_DATE_QUESTION_CONCEPT = 1410;

public static final Integer DIAGNOSIS_CONCEPT_ID = 1284;

public static final Integer NO_DIAGNOSIS_CONCEPT_ID = 133010;
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ public class IsantePlusGlobalProps {

public boolean ENABLE_ISANTEPLUS_UI = "true".equals(
Context.getAdministrationService().getGlobalProperty(ConfigurableGlobalProperties.ENABLE_ISANTEPLUS_UI));

}
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,6 @@ public interface IsantePlusService extends OpenmrsService {
List<Obs> getAllergiesForPatient(Patient patient);

String getEncounterImmunizationUuidByPatient(Patient patient);

List<Obs> getAllDiagnosisByPatient(Patient patient);
}
Original file line number Diff line number Diff line change
Expand Up @@ -1221,4 +1221,21 @@ public String getEncounterImmunizationUuidByPatient(Patient patient) {
return encounterUuid;
}

@Override
public List<Obs> getAllDiagnosisByPatient(Patient patient) {

List<Obs> listDiagnosis = new ArrayList<Obs>();
Integer diagnosisConceptId = IsantePlusConstants.DIAGNOSIS_CONCEPT_ID;
Concept diagnosis = Context.getConceptService().getConcept(diagnosisConceptId);

for (Obs obs : Context.getObsService().getObservationsByPersonAndConcept(patient.getPerson(), diagnosis)) {
if (obs != null) {
if(!obs.getValueCoded().getConceptId().equals(IsantePlusConstants.NO_DIAGNOSIS_CONCEPT_ID))
listDiagnosis.add(obs);
}
}
return listDiagnosis;

}

}
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public String getProvider(EncounterRole role) {
return encounter.getProvidersByRole(role)!= null
? encounter.getProvidersByRole(role).iterator().next().getPerson().getGivenName() + " " + encounter.getProvidersByRole(role).iterator().next().getPerson().getFamilyName() : "";
}


public Date getDate() {
return encounter.getDateCreated();
Expand Down Expand Up @@ -198,4 +197,5 @@ public Encounter getEncounter() {
public void setEncounter(Encounter encounter) {
this.encounter = encounter;
}

}
2 changes: 2 additions & 0 deletions api/src/main/resources/isanteplus_site_list_20171211.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1079,3 +1079,5 @@ Centre,Hinche,1ère Juanaria^611-01,Prison Civile de Hinche,CS,Public,61120,6112
Ouest,Port-au-Prince,6ème Turgeau^111-01,Prison Civile de Port Au Prince,CS,Public,11170,11170,HTW,18.54,-72.32
Artibonite,Gros Morne,5ème Pendu^521-05,Centre de sant� Esp�rance de Terre Blanche,CSL,Mixte,52108,52108,CDS,,
Ouest,Croix-des-Bouquets,2ème Varreux^131-02,Prison Civile de la Croix-des-Bouquets,CS,Public,13130,13130,HTW,,
Ouest,Port-au-Prince,6ème Turgeau^111-01,Clinique J.C. Menard,CSL,Privé à but lucratif,11160,11160,Non associée,,
Ouest,Port-au-Prince,6ème Turgeau^111-01,Clinique Solidarité,CSL,Privé,11199,11199,HTW,,
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import java.util.List;

import org.json.JSONObject;
import org.openmrs.Obs;
import org.openmrs.Patient;
import org.openmrs.api.context.Context;
import org.openmrs.module.isanteplus.IsantePlusObs;
Expand All @@ -17,7 +18,10 @@ public void controller(PageModel model, @RequestParam("patientId") Patient patie
patientOpts.put("name", patient.getPersonName().getFullName());
model.addAttribute("patientPropts", patientOpts);
List<IsantePlusObs> allDiagnosis = Context.getService(IsantePlusService.class).getAllDiagnosis(patient);
List<Obs> otherDiagnosis = Context.getService(IsantePlusService.class).getAllDiagnosisByPatient(patient);
model.addAttribute("allDiagnosis", allDiagnosis);
model.addAttribute("diagnosisByPatient", otherDiagnosis);

}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{
"id": "isanteplus.registration.fingerprint.enrollupdate",
"description": "isanteplus.registration.fingerprint.description",
"label": "isanteplus.registration.fingerprint.label",
"icon": "icon-user",
"order": 1,
"extensions": [
{
"id": "isanteplus.registration.fingerprintSecondColumn",
"appId": "isanteplus.registration.fingerprint",
"extensionPointId": "patientDashboard.firstColumnFragments",
"extensionParams": {
"provider": "registrationapp",
"fragment": "field/m2sysEnrollOrUpdate"

},
"order": 3
}
]
}
]
2 changes: 1 addition & 1 deletion omod/src/main/webapp/fragments/formsHistory.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ ${ ui.includeFragment("isanteplus", "isantePlusForms") }
<a href="/${appName}/htmlformentryui/htmlform/editHtmlFormWithStandardUi.page?patientId=${ ui.format(it.encounter.patient.uuid) }&encounterId=${ ui.format(it.encounter.uuid) }">${ ui.format(it.encounter.form.name) }</a>
</td>
<td>${ ui.format(it.formStatus) }</td>
<td>${ ui.format(it.provider) }</td>
<td>${ ui.format(it.enteredBy) }</td>
<td>${ ui.format(it.encounter.dateCreated) }</td>
<td>${ ui.format(it.dateChanged) }</td>
<td>${ ui.format(it.enteredBy) }</td>
Expand Down
11 changes: 11 additions & 0 deletions omod/src/main/webapp/pages/getAllDiagnosis.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,15 @@ ${ ui.includeFragment("coreapps", "patientHeader", [ patient: patient ]) }
</tr>
<% } %>
</div>
</table>
<br/>
<table>
<tr><th>${ ui.message("isanteplus.diagnoses.label") }</th><th>${ ui.message("isanteplus.allergy.date") }</th></tr>
<% diagnosisByPatient.each { %>
<tr>
<td>${ui.format(it.valueCoded)}</td>
<td>${ui.format(it.obsDatetime)}</td>
</tr>
<% } %>
</table>
</div>
Loading

0 comments on commit 9894796

Please sign in to comment.