Skip to content

Commit

Permalink
GSoC 2019: Patient search criteria module
Browse files Browse the repository at this point in the history
  • Loading branch information
Reyano132 committed Aug 31, 2019
1 parent 7c48d7a commit 4f1d29c
Show file tree
Hide file tree
Showing 4 changed files with 354 additions and 23 deletions.
23 changes: 23 additions & 0 deletions omod/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,15 @@
<gem.path>${basedir}/.rubygems</gem.path>
</properties>

<!-- Repository for patient search criteria -->
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>


<dependencies>

<!--
Expand Down Expand Up @@ -255,6 +264,20 @@
<scope>provided</scope>
</dependency>

<!-- Patient search criteria module -->
<dependency>
<groupId>com.github.Reyano132.openmrs-module-patientsearchcriteria</groupId>
<artifactId>patientsearch-api</artifactId>
<version>v1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.github.Reyano132.openmrs-module-patientsearchcriteria</groupId>
<artifactId>patientsearch-omod</artifactId>
<version>v1.0.0</version>
<scope>provided</scope>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,26 +90,61 @@
patientSearchWidget = new PatientSearchWidget(widgetConfig);
});
</script>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<form method="get" id="patient-search-form" onsubmit="return false">
<input class="form-control input-sm input-lg" type="text" id="patient-search" placeholder="${ ui.message("coreapps.findPatient.search.placeholder") }" autocomplete="off" <% if (doInitialSearch) { %>value="${doInitialSearch}"<% } %>/><i id="patient-search-clear-button" class="small icon-remove-sign"></i>
<select id="patient-gender-search">
<option value="" selected>${ ui.message("coreapps.gender") }</option>
<option value="M">${ ui.message("coreapps.gender.M") }</option>
<option value="F">${ ui.message("coreapps.gender.F") }</option>
</select>
<input type="checkbox" id="getAgeAndBirthdateFilter" >Search with age or birthdate<br>

<form method="get" id="patient-search-form" onsubmit="return false">
<input type="text" id="patient-search" placeholder="${ ui.message("coreapps.findPatient.search.placeholder") }" autocomplete="off" <% if (doInitialSearch) { %>value="${doInitialSearch}"<% } %>/><i id="patient-search-clear-button" class="small icon-remove-sign"></i>
<% if(patientSearchExtensions){
<div id="patient-search-age-birthdate" style="display:none">
<input type="radio" name ="patient-age-birthdate" value="patient-age"> Search by range of age
<br>
<input type="radio" name ="patient-age-birthdate" value="patient-birthdate"> Search by birthdate

<p id="patient-age-range-search" style="display:none">
<label>Range of Age</label>
From:<input type="text" id="patient-age-range-from" placeholder="From" maxlength="2" style="min-width: 5px" onkeypress="return event.charCode >= 48 && event.charCode <= 57">
To:<input type="text" id="patient-age-range-to" placeholder="To" maxlength="2"
style="min-width: 5px" onkeypress="return event.charCode >= 48 && event.charCode <= 57">
</p>

<p id="patient-birthdate-search" style="display:none">
Birthdate:<input type="date" id="patient-birthdate" style="min-width: 5px"/>
</p>
</div>

patientSearchExtensions.each {
// create a base map from the fragmentConfig if it exists, otherwise just create an empty map
def configs = [:];
if(it.extensionParams.fragmentConfig != null){
configs = it.extensionParams.fragmentConfig;
}
%>
${ ui.includeFragment(it.extensionParams.provider, it.extensionParams.fragment, configs) }
<%}
} %>
</form>

<% if(patientSearchExtensions){
<div id="patient-search-results"></div>
<% if (registrationAppLink ?: false) { %>
<div id="register-patient-link">
<label>${ ui.message("coreapps.findPatient.registerPatient.label") }&nbsp;&nbsp;</label><a id="patient-search-register-patient" class="button" href="/${contextPath}/${registrationAppLink}">${ui.message("registrationapp.registration.label")}</a>
patientSearchExtensions.each {
// create a base map from the fragmentConfig if it exists, otherwise just create an empty map
def configs = [:];
if(it.extensionParams.fragmentConfig != null){
configs = it.extensionParams.fragmentConfig;
}
%>
${ ui.includeFragment(it.extensionParams.provider, it.extensionParams.fragment, configs) }
<%}
} %>
</form>
</div>
</div>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<div id="patient-search-results"></div>
</div>
</div>
<% } %>
<div class="row">
<div class="col-md-12 col-sm-12 col-xs-12">
<% if (registrationAppLink ?: false) { %>
<div id="register-patient-link">
<label>${ ui.message("coreapps.findPatient.registerPatient.label") }&nbsp;&nbsp;</label><a id="patient-search-register-patient" class="button" href="/${contextPath}/${registrationAppLink}">${ui.message("registrationapp.registration.label")}</a>
</div>
<% } %>
</div>
</div>
Loading

0 comments on commit 4f1d29c

Please sign in to comment.