Skip to content

Commit 1cd50f0

Browse files
authored
Make installation of ovc forms optional via gp (#2342)
1 parent c65e34d commit 1cd50f0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

api/src/main/java/org/openmrs/module/kenyaemr/metadata/OVCMetadata.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
import org.openmrs.module.metadatadeploy.bundle.Requires;
1616
import org.springframework.stereotype.Component;
1717

18+
import static org.openmrs.module.kenyaemr.metadata.MetadataUtils.shouldInstallForms;
1819
import static org.openmrs.module.metadatadeploy.bundle.CoreConstructors.encounterType;
1920
import static org.openmrs.module.metadatadeploy.bundle.CoreConstructors.form;
2021
import static org.openmrs.module.metadatadeploy.bundle.CoreConstructors.patientIdentifierType;
@@ -66,9 +67,11 @@ public void install() {
6667
install(encounterType("OVC Enrollment", "Enrollment onto OVC program", _EncounterType.OVC_ENROLLMENT));
6768
install(encounterType("OVC Discontinuation", "Discontinuation from OVC program", _EncounterType.OVC_DISCONTINUATION));
6869

69-
install(form("OVC Enrollment Form", null, _EncounterType.OVC_ENROLLMENT, "1", _Form.OVC_ENROLLMENT_FORM));
70-
install(form("OVC Discontinuation Form", null, _EncounterType.OVC_DISCONTINUATION, "1", _Form.OVC_DISCONTINUATION_FORM));
71-
70+
boolean installForms = shouldInstallForms();
71+
if(installForms) {
72+
install(form("OVC Discontinuation Form", null, _EncounterType.OVC_DISCONTINUATION, "1", _Form.OVC_DISCONTINUATION_FORM));
73+
install(form("OVC Enrollment Form", null, _EncounterType.OVC_ENROLLMENT, "1", _Form.OVC_ENROLLMENT_FORM));
74+
}
7275

7376
//Installing identifiers
7477

0 commit comments

Comments
 (0)