Skip to content

Commit

Permalink
Add modifications according to reviews
Browse files Browse the repository at this point in the history
  • Loading branch information
mherman22 committed Oct 1, 2024
1 parent b0fbac3 commit 94c4504
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
3 changes: 1 addition & 2 deletions frontend/src/components/patient/SearchPatientForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,7 @@ function SearchPatientForm(props) {
/>
</Button>
</Column>
{configurationProperties.MAKE_CLIENT_REGISTRY_CONFIGURABLE ===
"true" && (
{configurationProperties.ENABLE_CLIENT_REGISTRY === "true" && (
<Column lg={4} md={4} sm={2}>
<Toggle
labelText="Client Registry Search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,8 @@ private Map<String, String> getOpenConfigurationProperties() {
ConfigurationProperties.getInstance().getPropertyValue(Property.configurationName));
configs.put(Property.REQUIRE_LAB_UNIT_AT_LOGIN.toString(),
ConfigurationProperties.getInstance().getPropertyValue(Property.REQUIRE_LAB_UNIT_AT_LOGIN));
configs.put(Property.MAKE_CLIENT_REGISTRY_CONFIGURABLE.toString(),
ConfigurationProperties.getInstance().getPropertyValue(Property.MAKE_CLIENT_REGISTRY_CONFIGURABLE));
configs.put(Property.ENABLE_CLIENT_REGISTRY.toString(),
ConfigurationProperties.getInstance().getPropertyValue(Property.ENABLE_CLIENT_REGISTRY));
return configs;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public PatientSearchResultsForm getPatientResults(HttpServletRequest request,
}
}

if (ConfigurationProperties.getInstance().getPropertyValue(Property.MAKE_CLIENT_REGISTRY_CONFIGURABLE)
if (ConfigurationProperties.getInstance().getPropertyValue(Property.ENABLE_CLIENT_REGISTRY)
.equals("true")) {
String crSearchParam = request.getParameter("crSearch");
if (crSearchParam != null && crSearchParam.contains("true")) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ public enum Property {
PATIENT_RESULTS_SMTP_ENABLED("patientresultssmtp.enabled"), //
CONTACT_TRACING("contactTracingEnabled"), //
REQUIRE_LAB_UNIT_AT_LOGIN("requireLabUnitAtLogin"), //
MAKE_CLIENT_REGISTRY_CONFIGURABLE("clientRegistryConfigurable");
ENABLE_CLIENT_REGISTRY("Enable Client Registry"); // if true, then client registry search option is visible on
// the ui

private String name;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ public class DefaultConfigurationProperties extends ConfigurationProperties {
Property.USE_ALPHANUM_ACCESSION_PREFIX.getName(), "false");
setDBPropertyMappingAndDefault(Property.REQUIRE_LAB_UNIT_AT_LOGIN, Property.REQUIRE_LAB_UNIT_AT_LOGIN.getName(),
"false");
setDBPropertyMappingAndDefault(Property.MAKE_CLIENT_REGISTRY_CONFIGURABLE,
Property.MAKE_CLIENT_REGISTRY_CONFIGURABLE.getName(), "false");
setDBPropertyMappingAndDefault(Property.ENABLE_CLIENT_REGISTRY, Property.ENABLE_CLIENT_REGISTRY.getName(),
"false");
}

private void setDBPropertyMappingAndDefault(Property property, String dbName, String defaultValue) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/liquibase/2.8.x.x/base.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@
<include relativeToChangelogFile="true" file="notification_subscriptions.xml" />
<include relativeToChangelogFile="true" file="method.xml" />
<include relativeToChangelogFile="true" file="landing_page_config.xml" />
<include relativeToChangelogFile="true" file="client_registry_search_configurable.xml" />
<include relativeToChangelogFile="true" file="enable_client_registry_search.xml" />
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@

<changeSet author="mherman22" id="1">
<preConditions onFail="MARK_RAN">
<sqlCheck expectedResult="0">select count(*) from clinlims.site_information where name = 'clientRegistryConfigurable'; </sqlCheck>
<sqlCheck expectedResult="0">select count(*) from clinlims.site_information where name = 'Enable Client Registry'; </sqlCheck>
</preConditions>
<comment>add Config to make client registry search configurable</comment>
<comment>add Config to enable client registry search</comment>
<insert schemaName="clinlims" tableName="site_information">
<column name="id" valueSequenceNext="site_information_seq" />
<column name="name" value="clientRegistryConfigurable" />
<column name="name" value="Enable Client Registry" />
<column name="lastupdated" valueComputed="${now}" />
<column name="description" value="Enable Client Registry Search" />
<column name="encrypted" value="false" />
<column name="domain_id" valueComputed="(SELECT id FROM site_information_domain WHERE name = 'siteIdentity')" />
<column name="domain_id" valueComputed="(SELECT id FROM site_information_domain WHERE name = 'patientEntryConfig')" />
<column name="value_type" value="boolean" />
<column name="value" value="false" />
<column name="group" value="0" />
Expand Down

0 comments on commit 94c4504

Please sign in to comment.