-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Trunk-5225:Get list of OrderGroups by patient or encounter is missing in openmrs… #3084
Conversation
@Test | ||
public void getOrderGroupsByEncounter_shouldGetOrderGroupsFrommMultipleEncounters() { | ||
Encounter existingEncounter1 = Context.getEncounterService().getEncounter(3); | ||
Encounter existingEncounter2 = Context.getEncounterService().getEncounter(6); |
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.
What is the use of this test? Do we have any such tests in the existing code?
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.
the purpose of this test is to create instances of multiple encounters and they do exist in the existing code
public void getOrderGroupsByPatient_shouldGetOrderGroupsFromMultiplePatients() { | ||
|
||
Patient existingPatient1 = Context.getPatientService().getPatient(7); | ||
Patient existingPatient2 = Context.getPatientService().getPatient(2); |
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.
What is the use of this test? Do we have any such tests in the existing code?
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.
the purpose of this test is to create instances of multiple patients and they do exist in the existing code
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.
Can you point me to any tests that you found doing the same?
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.
your right @dkayiwa the tests are not there, am going to remove them and only maintain the tests relating to getting order groups from a patient
Can you include the ticket id in your commit message as recommended at? https://wiki.openmrs.org/display/docs/Pull+Request+Tips |
oh sorry about this, had forgotten it,,, |
@Test | ||
public void getOrderGroupsByEncounter_shouldGetOrderGroupsFromAnEncounter() { | ||
Encounter existingEncounter = Context.getEncounterService().getEncounter(4); | ||
List<OrderGroup> ordergroups1 = Context.getOrderService().getOrderGroupsByEncounter(existingEncounter); |
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.
What is the reason for appending 1
to the variable name?
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.
i have fixed it
public void getOrderGroupsByPatient_shouldGetOrderGroupsGivenPatient() { | ||
|
||
Patient existingPatient1 = Context.getPatientService().getPatient(8); | ||
List<OrderGroup> ordergroups1 = Context.getOrderService().getOrderGroupsByPatient(existingPatient1); |
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.
What is the reason for appending 1 to the variable name?
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.
i have fixed it
|
||
Patient existingPatient1 = Context.getPatientService().getPatient(8); | ||
List<OrderGroup> ordergroups1 = Context.getOrderService().getOrderGroupsByPatient(existingPatient1); | ||
|
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.
Is this empty line intentional?
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.
No, i have fixed it
@Test | ||
public void getOrderGroupsByPatient_shouldGetOrderGroupsGivenPatient() { | ||
Patient existingPatient = Context.getPatientService().getPatient(8); | ||
List<OrderGroup> ordergroups1 = Context.getOrderService().getOrderGroupsByPatient(existingPatient); |
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.
Why ordergroups1
?
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.
i have fixed it
link:https://issues.openmrs.org/browse/TRUNK-5225
Get list of OrderGroups by patient or encounter is missing in openmrs…