Skip to content

Commit 4bd94b3

Browse files
committed
SL-1257: add Children action to registration summary
1 parent 61bd6d9 commit 4bd94b3

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

api/src/main/java/org/openmrs/module/pihcore/apploader/CustomAppLoaderConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -282,6 +282,7 @@ public static final class Extensions {
282282
public static final String PRINT_WRISTBAND_OVERALL_ACTION = "pih.wristband.print";
283283
public static final String PRINT_WRISTBAND_OVERALL_REGISTRATION_ACTION = "pih.registration.wristband.print";
284284
public static final String PATIENT_CHILDREN_OVERALL_ACTION = "pih.patient.children";
285+
public static final String PATIENT_CHILDREN_OVERALL_REGISTRATION_ACTION = "pih.registration.patient.children";
285286
public static final String CREATE_VISIT_OVERALL_ACTION = "coreapps.createVisit";
286287
public static final String CREATE_HIV_VISIT_OVERALL_ACTION = "coreapps.hiv.createVisit";
287288
public static final String CREATE_RETROSPECTIVE_VISIT_OVERALL_ACTION = "coreapps.createRetrospectiveVisit";

api/src/main/java/org/openmrs/module/pihcore/apploader/CustomAppLoaderFactory.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1421,14 +1421,22 @@ private void enableArchives() {
14211421
addPaperRecordActionsIncludesIfNeeded();
14221422
}
14231423

1424-
public void enableChildren() {
1424+
public void enableChildren() throws UnsupportedEncodingException {
14251425
extensions.add(overallAction(CustomAppLoaderConstants.Extensions.PATIENT_CHILDREN_OVERALL_ACTION,
14261426
"registration.patient.children.label",
14271427
"fas fa-fw fa-child",
14281428
"link",
14291429
"pihcore/children/children.page?patientId={{patient.patientId}}&returnUrl=/" + WebConstants.CONTEXT_PATH + "/" + config.getDashboardUrl() ,
14301430
"App: registrationapp.registerPatient",
14311431
and(patientIsFemale(), patientIsReproductiveAge())));
1432+
1433+
extensions.add(overallRegistrationAction(CustomAppLoaderConstants.Extensions.PATIENT_CHILDREN_OVERALL_REGISTRATION_ACTION,
1434+
"registration.patient.children.label",
1435+
"fas fa-fw fa-child",
1436+
"link",
1437+
"pihcore/children/children.page?patientId={{patient.patientId}}&returnUrl=" + "/" + WebConstants.CONTEXT_PATH + "/registrationapp/registrationSummary.page?patientId={{patient.uuid}}" + URLEncoder.encode("&appId=registrationapp.registerPatient", "UTF-8") ,
1438+
"App: registrationapp.registerPatient",
1439+
and(patientIsFemale(), patientIsReproductiveAge())));
14321440
}
14331441
public void enableWristbands() {
14341442

0 commit comments

Comments
 (0)