-
Notifications
You must be signed in to change notification settings - Fork 12
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-4357: Add Allergy Recording to Patient Visit Scenario #54
Changes from 1 commit
6e932cc
dd5d198
f15c26a
ab1172c
6f98645
3149a6c
c7dbd34
82d0bd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -60,6 +60,8 @@ public HttpRequestActionBuilder getActiveVisitOfPatient(String patientUuid) { | |||||
return http("Get Active Visits of Patient") | ||||||
.get("/openmrs/ws/rest/v1/visit?patient=" + patientUuid + "&v=" + customRepresentation + "&includeInactive=false"); | ||||||
} | ||||||
|
||||||
|
||||||
|
||||||
public HttpRequestActionBuilder getProgramEnrollments(String patientUuid) { | ||||||
String customRepresentation = "custom:(uuid,display,program,dateEnrolled,dateCompleted," + | ||||||
|
@@ -148,11 +150,52 @@ public HttpRequestActionBuilder getDrugOrders(String patientUuid) { | |||||
"&status=any&orderType=" + DRUG_ORDER + | ||||||
"&v=" + customRepresentation); | ||||||
} | ||||||
|
||||||
public HttpRequestActionBuilder searchPatient(String searchQuery) { | ||||||
String customRepresentation = """ | ||||||
custom:(patientId,uuid,identifiers,display,patientIdentifier:(uuid,identifier),person:(gender,age,birthdate,birthdateEstimated,personName,addresses,display,dead,deathDate),attributes:(value,attributeType:(uuid,display))) | ||||||
"""; | ||||||
return http("Get Orders") | ||||||
.get("/openmrs/ws/rest/v1/patient" + | ||||||
"?q=" + searchQuery + | ||||||
"&v=" + customRepresentation + | ||||||
"&includeDead=" + true + | ||||||
"&limit=" + 10); | ||||||
} | ||||||
|
||||||
|
||||||
public HttpRequestActionBuilder getAllergies(String patientUuid) { | ||||||
return http("Get Allergies of Patient") | ||||||
.get("/openmrs/ws/fhir2/R4/AllergyIntolerance?patient=" + patientUuid + "&_summary=data"); | ||||||
} | ||||||
|
||||||
public HttpRequestActionBuilder saveAllergies(String patientUuid) { | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
String payload = "{\n" + | ||||||
" \"allergen\": {\n" + | ||||||
" \"allergenType\": \"DRUG\",\n" + | ||||||
" \"codedAllergen\": {\n" + | ||||||
" \"uuid\": \"71617AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n" + | ||||||
" }\n" + | ||||||
" },\n" + | ||||||
" \"severity\": {\n" + | ||||||
" \"uuid\": \"1498AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n" + | ||||||
" },\n" + | ||||||
" \"comment\": \"test\",\n" + | ||||||
" \"reactions\": [\n" + | ||||||
" {\n" + | ||||||
" \"reaction\": {\n" + | ||||||
" \"uuid\": \"121677AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\"\n" + | ||||||
" }\n" + | ||||||
" }\n" + | ||||||
" ]\n" + | ||||||
"}"; | ||||||
|
||||||
return http("Save Allergies of Patient") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.get("/openmrs/ws/rest/v1/patient/"+ patientUuid +"/allergy") | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.body(StringBody(payload)); | ||||||
|
||||||
|
||||||
} | ||||||
|
||||||
public HttpRequestActionBuilder getConditions(String patientUuid) { | ||||||
return http("Get Conditions of Patient") | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -29,6 +29,7 @@ public ScenarioBuilder getScenarioBuilder() { | |||||
.exec(registry.openOrdersTab("#{patient_uuid}")) | ||||||
.exec(registry.openLabResultsTab("#{patient_uuid}")) | ||||||
.exec(registry.openAllergiesTab("#{patient_uuid}")) | ||||||
.exec(registry.addAllergies("#{patient_uuid}")) | ||||||
jayasanka-sack marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
.exec(registry.openConditionsTab("#{patient_uuid}")) | ||||||
.exec(registry.openImmunizationsTab("#{patient_uuid}")) | ||||||
.exec(registry.openAttachmentsTab("#{patient_uuid}")) | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused method