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
Next Next commit
Add program tab to the visit patient scenario
  • Loading branch information
dilankavishka committed Mar 7, 2025
commit c0669977c76d5efecb4305465991baa61ad1ca1f
Original file line number Diff line number Diff line change
@@ -246,6 +246,11 @@ public HttpRequestActionBuilder getImmunizations(String patientUuid) {
.get("/openmrs/ws/fhir2/R4/Immunization?patient=" + patientUuid + "&_summary=data");
}

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

public HttpRequestActionBuilder searchForDrug(String searchQuery) {
String customRepresentation = """
custom:(uuid,display,name,strength,
Original file line number Diff line number Diff line change
@@ -132,6 +132,8 @@ public ChainBuilder openAttachmentsTab(String patientUuid) {
.exec(httpService.getAllowedFileExtensions());
}

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

public ChainBuilder openVisitsTab(String patientUuid) {
return exec(httpService.getVisitsOfPatient(patientUuid));
}
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ public ScenarioBuilder getScenarioBuilder() {
.pause(5)
.exec(registry.openAttachmentsTab("#{patient_uuid}"))
.pause(5)
.exec(registry.openProgramsTab("#{patient_uuid}"))
.pause(5)
.exec(registry.addDrugOrder("#{patient_uuid}", "#{visitUuid}", "#{currentUserUuid}"))
.pause(5)
.exec(registry.addVisitNote("#{patient_uuid}", "#{currentUserUuid}"))