Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

O3-4521 : Add program tab to the visit patient scenario #77

Merged
merged 7 commits into from
Mar 15, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update the changes
  • Loading branch information
dilankavishka committed Mar 14, 2025
commit 5fc19dc97872c7cab79b9608b2ec4265f6f76b6f
Original file line number Diff line number Diff line change
@@ -247,15 +247,10 @@ public HttpRequestActionBuilder getImmunizations(String patientUuid) {
}

public HttpRequestActionBuilder getPrograms() {
return http("Get Programs of Patient")
return http("Get Programs")
.get("/openmrs/ws/rest/v1/program?v=custom:(uuid,display,allWorkflows,concept:(uuid,display))");
}

public HttpRequestActionBuilder getProgramEnrollment(String patientUuid) {
return http("Get Program Enrollment of Patient")
.get("/openmrs/ws/rest/v1/programenrollment?patient=" + patientUuid + "&v=custom:(uuid,display,program,dateEnrolled,dateCompleted,location:(uuid,display),states:(startDate,endDate,voided,state:(uuid,concept:(display))))");
}

public HttpRequestActionBuilder searchForDrug(String searchQuery) {
String customRepresentation = """
custom:(uuid,display,name,strength,
Original file line number Diff line number Diff line change
@@ -132,7 +132,7 @@ public ChainBuilder openAttachmentsTab(String patientUuid) {

public ChainBuilder openProgramsTab(String patientUuid) {
return exec(httpService.getPrograms())
.exec(httpService.getProgramEnrollment(patientUuid));
.exec(httpService.getProgramEnrollments(patientUuid));
}

public ChainBuilder openVisitsTab(String patientUuid) {