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

RCM-109 Added patient verification to return Cohorts objects for the serviceMethods #39

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@suthagar23
Member

suthagar23 commented Aug 6, 2018

Descriptions

In reporting compatibility module used the org.openmrs.cohort.Cohort class instead of org.openmrs.Cohort class. So other modules which are using these service methods needed to add the reporting compatibility module as the required module.

To avoid this requirement, A patient verification is added to the Cohort Membership methods.

Ticket Information

Ticket : https://issues.openmrs.org/browse/RCM-109

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 6, 2018

Member

Instead of removing the patient ids from the collection, can't we just filter them at source? Where they are loaded from the database?

Member

dkayiwa commented Aug 6, 2018

Instead of removing the patient ids from the collection, can't we just filter them at source? Where they are loaded from the database?

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 6, 2018

Member

Instead of adding this to the DAO resource (we might also need to add for multiple lines), why we do not add this to the Cohort constructor here (just some places will be affected - Constructor,setMemberIds and addMember methods) ?
https://github.com/openmrs/openmrs-module-reportingcompatibility/blob/master/api/src/main/java/org/openmrs/cohort/Cohort.java#L70

Member

suthagar23 commented Aug 6, 2018

Instead of adding this to the DAO resource (we might also need to add for multiple lines), why we do not add this to the Cohort constructor here (just some places will be affected - Constructor,setMemberIds and addMember methods) ?
https://github.com/openmrs/openmrs-module-reportingcompatibility/blob/master/api/src/main/java/org/openmrs/cohort/Cohort.java#L70

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 6, 2018

Member

Looks fine to me for now. As long as those who do not have our module installed will not be affected.

Member

dkayiwa commented Aug 6, 2018

Looks fine to me for now. As long as those who do not have our module installed will not be affected.

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 6, 2018

Member

@dkayiwa Do we only use the Cohort objects for Patients? If we are using the Cohorts for other members then We can't add this patient verification to the Cohort Class. Because it will caused the problems for other members.
If we are using Cohort for other members(like for persons and users) , then we should add these to the DAO resource, otherwise, we can add this to the Cohort class. What do you think?

Member

suthagar23 commented Aug 6, 2018

@dkayiwa Do we only use the Cohort objects for Patients? If we are using the Cohorts for other members then We can't add this patient verification to the Cohort Class. Because it will caused the problems for other members.
If we are using Cohort for other members(like for persons and users) , then we should add these to the DAO resource, otherwise, we can add this to the Cohort class. What do you think?

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 6, 2018

Member

Are there any major disadvantages of adding this to the DAO layer?

Member

dkayiwa commented Aug 6, 2018

Are there any major disadvantages of adding this to the DAO layer?

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 6, 2018

Member

We need to change multiple lines to make the changes in multiple class files. But going for the Cohort will only need to change few lines.
But the parameters and the methods are contained "patients" in their names in the Cohort Class. So I think mostly we will use the Cohorts for the patients. Is it Right?

Member

suthagar23 commented Aug 6, 2018

We need to change multiple lines to make the changes in multiple class files. But going for the Cohort will only need to change few lines.
But the parameters and the methods are contained "patients" in their names in the Cohort Class. So I think mostly we will use the Cohorts for the patients. Is it Right?

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 6, 2018

Member

Yes that is right.

Member

dkayiwa commented Aug 6, 2018

Yes that is right.

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 6, 2018

Member

@dkayiwa I have changed the implementation. Please review again THanks.

Member

suthagar23 commented Aug 6, 2018

@dkayiwa I have changed the implementation. Please review again THanks.

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 6, 2018

Member

Is it worth making all these extra calls when our module is not installed?

Member

dkayiwa commented Aug 6, 2018

Is it worth making all these extra calls when our module is not installed?

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 7, 2018

Member

Yes, I also thought this.
I have added Global Property("Cohorts.checkForNullPatients") to track this extra work. If the GP points to true, then do the extra works else just ignore them by default.
The GP value should be created/set to True while starting our module.

Member

suthagar23 commented Aug 7, 2018

Yes, I also thought this.
I have added Global Property("Cohorts.checkForNullPatients") to track this extra work. If the GP points to true, then do the extra works else just ignore them by default.
The GP value should be created/set to True while starting our module.

Suthagar23
RCM-109 Added patient verification to the Cohorts
RCM-109 Added patient verification to the Cohorts

RCM-109 Added patient verification to the Cohorts

RCM-109 Added patient verification to the Cohorts
@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 7, 2018

Member

Why create an extra gp? Can't you use the same logic like you used for the reference application?

Member

dkayiwa commented Aug 7, 2018

Why create an extra gp? Can't you use the same logic like you used for the reference application?

@suthagar23

This comment has been minimized.

Show comment
Hide comment
@suthagar23

suthagar23 Aug 7, 2018

Member

In the reference application also, we have created a GP through our module and used that. What do you mean by the logic?
If you have meant about the same GP, then we might not use that here since the name of that GP doesn't relate to this requirement (See here).

Member

suthagar23 commented Aug 7, 2018

In the reference application also, we have created a GP through our module and used that. What do you mean by the logic?
If you have meant about the same GP, then we might not use that here since the name of that GP doesn't relate to this requirement (See here).

@dkayiwa

This comment has been minimized.

Show comment
Hide comment
@dkayiwa

dkayiwa Aug 15, 2018

Member

Closing this for now until when we get feedback from the 0.1.0 release

Member

dkayiwa commented Aug 15, 2018

Closing this for now until when we get feedback from the 0.1.0 release

@dkayiwa dkayiwa closed this Aug 15, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment