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

Fixed odoo.dob.field and odoo.weight.field properties and 'patientVoided' → 'voided'. #23

Merged
merged 4 commits into from
Jun 25, 2024

Conversation

icrc-loliveira
Copy link
Contributor

Fixed property access for:

  • odoo.dob.field
  • odoo.weight.field

Fixed property name for patient voided.

@icrc-loliveira
Copy link
Contributor Author

cc: @icrc-fdeniger

@@ -23,7 +23,7 @@

<choice>
<when>
<simple>${exchangeProperty.patient-odoo-id} == null &amp;&amp; ${exchangeProperty.patient.get('patientVoided')} == true</simple>
<simple>${exchangeProperty.patient-odoo-id} == null &amp;&amp; ${exchangeProperty.patient.get('voided')} == true</simple>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you might want to check both voided and patientVoided, a person can be linked to more than one entity e.g. User, Provider and Patient. Therefore, a patient account can get voided but not necessarily their person record, or user or provider accounts.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wluyima it seems like we have voided attribute in patient model but AFAIK we don't have any attribute as patientVoided
We have personVoided in person model.
CMIIW

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry! That's what I meant to check both Person.personVoided and Patient.voided

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VaishSiddharth @wluyima why doing test on both properties personVoided and Patient.voided as in this route we deal with patient data only ( and with patient identifier,...) and only patient are synchronized with Odoo.

IMHO, The use case "a patient is voided but the person is not voided" should be ignored as well as this route need patients only. If a paitent is voided, we will have an error when trying to get the patient identifier and it causes erros in this route when a patient is voided.

Why should the use case "a patient is voided but the person is not voided" be processed in this route ?

Copy link

@wluyima20 wluyima20 Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was definitely a bug that this PR seems to address. And in fact, these changes aligns with what am saying so I guess it's all good.

@@ -10,10 +10,10 @@
<simple>${properties:odoo.weight.field:null} != null &amp;&amp; ${properties:odoo.weight.field:null} != ''</simple>

<setProperty name="odooWeightField">
<simple>{{odoo.weight.field}}</simple>
<simple>{{properties:odoo.weight.field}}</simple>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to address a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above...

@@ -10,7 +10,7 @@
<simple>${properties:odoo.dob.field:null} != null &amp;&amp; ${properties:odoo.dob.field:null} != ''</simple>

<setProperty name="odooDobField">
<simple>{{odoo.dob.field}}</simple>
<simple>{{properties:odoo.dob.field}}</simple>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to address a bug?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually introducing a bug... @icrc-loliveira have you tested this? Or did you intend to do as below?

Suggested change
<simple>{{properties:odoo.dob.field}}</simple>
<simple>${properties:odoo.dob.field}</simple>

Which kind of bug is being fixed here though?

</setProperty>

<toD cacheSize="-1" uri="{{openmrs.baseUrl}}/ws/rest/v1/obs?concept={{emr.weight.concept}}&amp;patient=${exchangeProperty.patient.get('uuid')}" />
<toD cacheSize="-1" uri="{{openmrs.baseUrl}}/ws/rest/v1/obs?concept=${exchangeProperty.odooWeightField}&amp;patient=${exchangeProperty.patient.get('uuid')}" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to address a bug?

Copy link
Contributor Author

@icrc-loliveira icrc-loliveira May 21, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, everything I have done on this PR is to address bugs that I have encounter.

Copy link
Contributor

@wluyima wluyima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some comments

Copy link
Contributor

@Ruhanga Ruhanga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @icrc-loliveira, thanks for the PR. I just have a few concerns below.

@@ -10,7 +10,7 @@
<simple>${properties:odoo.dob.field:null} != null &amp;&amp; ${properties:odoo.dob.field:null} != ''</simple>

<setProperty name="odooDobField">
<simple>{{odoo.dob.field}}</simple>
<simple>{{properties:odoo.dob.field}}</simple>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is actually introducing a bug... @icrc-loliveira have you tested this? Or did you intend to do as below?

Suggested change
<simple>{{properties:odoo.dob.field}}</simple>
<simple>${properties:odoo.dob.field}</simple>

Which kind of bug is being fixed here though?

@@ -10,10 +10,10 @@
<simple>${properties:odoo.weight.field:null} != null &amp;&amp; ${properties:odoo.weight.field:null} != ''</simple>

<setProperty name="odooWeightField">
<simple>{{odoo.weight.field}}</simple>
<simple>{{properties:odoo.weight.field}}</simple>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment above...

@icrc-loliveira
Copy link
Contributor Author

Hello @Ruhanga and @wluyima,
I have done the requested changes, can you please finalize the review?

@delphinepas
Copy link

@wluyima @Ruhanga could you please review the changes done by @icrc-loliveira and confirm if it's ok now? thank you cc @icrc-fdeniger

Copy link
Contributor

@wluyima wluyima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Responded to comment

@icrc-fdeniger
Copy link
Contributor

@wluyima20 @Ruhanga does it seems all good for you ? Do we need to modify other points :)

@rbuisson rbuisson requested a review from wluyima June 13, 2024 12:33
@wluyima20
Copy link

Looks good to me

@icrc-fdeniger
Copy link
Contributor

@rbuisson do you believe we can merge so that I can test the integration in our deployments ?

@icrc-fdeniger
Copy link
Contributor

@wluyima I believe you should add your review here ( it seems you have 2 accounts :))

Copy link
Contributor

@wluyima wluyima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good

@icrc-fdeniger
Copy link
Contributor

Thanks. We still need an approval from a maintainer. @Ruhanga @VaishSiddharth @wluyima or @rbuisson is it on you ?

@mks-d mks-d changed the title Fixed properties Fixed odoo.dob.field and odoo.weight.field properties and 'patientVoided' → 'voided'. Jun 25, 2024
@mks-d mks-d merged commit 52f9c84 into ozone-his:main Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
8 participants