Void handler

classic Classic list List threaded Threaded
8 messages Options
Wyclif Luyima Wyclif Luyima
Reply | Threaded
Open this post in threaded view
|

Void handler

When I void a synonym (and I guess any concept name), the void handler and the AOP around it doesn’t seem to magically  populate the  fields  ‘date_voided’ and ‘voided_by’ as I expected. Did the community agree to leave the fields empty or it‘s a bug?  If  it ‘s a bug, can I go ahead and create a ticket for it?

 

Wyclif


[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

How are you voiding a ConceptName?  If we had a method called
voidConceptName(ConceptName) then it would happen magically.  However,
I'm guessing that you're doing saveConcept(Concept) that has the name
marked as voided.  The handlers do not (and cannot easily) handle this
second way.

Ben

On 05/11/2010 10:42 AM, Wyclif Luyima wrote:

> When I void a synonym (and I guess any concept name), the void handler
> and the AOP around it doesn’t seem to magically populate the fields
> ‘date_voided’ and ‘voided_by’ as I expected. Did the community agree to
> leave the fields empty or it‘s a bug? If it ‘s a bug, can I go ahead and
> create a ticket for it?
>
> Wyclif
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Wyclif Luyima Wyclif Luyima
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

Thanx Ben, actually I'm not doing it programmatically, am just trying to test voiding of a synonym from the web app. So it is not that am calling any method, and that is why I think there is a problem somewhere.
Wyclif

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Tuesday, May 11, 2010 10:56
To: [hidden email]
Subject: Re: [OPENMRS-DEV] Void handler

How are you voiding a ConceptName?  If we had a method called
voidConceptName(ConceptName) then it would happen magically.  However,
I'm guessing that you're doing saveConcept(Concept) that has the name
marked as voided.  The handlers do not (and cannot easily) handle this
second way.

Ben

On 05/11/2010 10:42 AM, Wyclif Luyima wrote:

> When I void a synonym (and I guess any concept name), the void handler
> and the AOP around it doesn't seem to magically populate the fields
> 'date_voided' and 'voided_by' as I expected. Did the community agree to
> leave the fields empty or it's a bug? If it 's a bug, can I go ahead and
> create a ticket for it?
>
> Wyclif
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

I remember seeing another comment to this effect recently. Is it possible that between 1.5 and 1.6 our handlers aren't firing right anymore?

-Darius

On Tue, May 11, 2010 at 8:01 AM, Wyclif Luyima <[hidden email]> wrote:
Thanx Ben, actually I'm not doing it programmatically, am just trying to test voiding of a synonym from the web app. So it is not that am calling any method, and that is why I think there is a problem somewhere.
Wyclif

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Tuesday, May 11, 2010 10:56
To: [hidden email]
Subject: Re: [OPENMRS-DEV] Void handler

How are you voiding a ConceptName?  If we had a method called
voidConceptName(ConceptName) then it would happen magically.  However,
I'm guessing that you're doing saveConcept(Concept) that has the name
marked as voided.  The handlers do not (and cannot easily) handle this
second way.

Ben

On 05/11/2010 10:42 AM, Wyclif Luyima wrote:
> When I void a synonym (and I guess any concept name), the void handler
> and the AOP around it doesn't seem to magically populate the fields
> 'date_voided' and 'voided_by' as I expected. Did the community agree to
> leave the fields empty or it's a bug? If it 's a bug, can I go ahead and
> create a ticket for it?
>
> Wyclif
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list
Ben Wolfe Ben Wolfe
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

If the save handlers were failing we would see /a lot/ more errors than
just these few.  They're used for all creator/changedBy/etc columns
being populated and propagated.

I assume you're referring to this ticket: http://dev.openmrs.org/ticket/2277

The save handlers only recurse on the properties of the current object,
so the obs/encounters/etc of a patient aren't designed to do that
automatically.  The better place for that is in the actual voidPatient
method.

Ben

On 05/11/2010 01:02 PM, Darius Jazayeri wrote:

> I remember seeing another comment to this effect recently. Is it
> possible that between 1.5 and 1.6 our handlers aren't firing right anymore?
>
> -Darius
>
> On Tue, May 11, 2010 at 8:01 AM, Wyclif Luyima <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanx Ben, actually I'm not doing it programmatically, am just
>     trying to test voiding of a synonym from the web app. So it is not
>     that am calling any method, and that is why I think there is a
>     problem somewhere.
>     Wyclif
>
>     -----Original Message-----
>     From: [hidden email] <mailto:[hidden email]>
>     [mailto:[hidden email] <mailto:[hidden email]>] On Behalf Of Ben Wolfe
>     Sent: Tuesday, May 11, 2010 10:56
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [OPENMRS-DEV] Void handler
>
>     How are you voiding a ConceptName?  If we had a method called
>     voidConceptName(ConceptName) then it would happen magically.  However,
>     I'm guessing that you're doing saveConcept(Concept) that has the name
>     marked as voided.  The handlers do not (and cannot easily) handle this
>     second way.
>
>     Ben
>
>     On 05/11/2010 10:42 AM, Wyclif Luyima wrote:
>      > When I void a synonym (and I guess any concept name), the void
>     handler
>      > and the AOP around it doesn't seem to magically populate the fields
>      > 'date_voided' and 'voided_by' as I expected. Did the community
>     agree to
>      > leave the fields empty or it's a bug? If it 's a bug, can I go
>     ahead and
>      > create a ticket for it?
>      >
>      > Wyclif
>      >
>      >
>     ------------------------------------------------------------------------
>      > Click here to unsubscribe
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>     from
>      > OpenMRS Developers' mailing list
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Wyclif Luyima Wyclif Luyima
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

But I doubt if there is a method called voidConceptName(ConceptName), the current code calls the conceptFormController which calls saveConcept() and this explains why those fields aren't getting populated, so the conceptNames are not voided individually. Can some one who has access to a production database  check if those fields are populated for all voided conceptnames? This is different from ticket http://dev.openmrs.org/ticket/2277

Wyclif

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Tuesday, May 11, 2010 13:41
To: [hidden email]
Subject: Re: [OPENMRS-DEV] Void handler

If the save handlers were failing we would see /a lot/ more errors than
just these few.  They're used for all creator/changedBy/etc columns
being populated and propagated.

I assume you're referring to this ticket: http://dev.openmrs.org/ticket/2277

The save handlers only recurse on the properties of the current object,
so the obs/encounters/etc of a patient aren't designed to do that
automatically.  The better place for that is in the actual voidPatient
method.

Ben

On 05/11/2010 01:02 PM, Darius Jazayeri wrote:

> I remember seeing another comment to this effect recently. Is it
> possible that between 1.5 and 1.6 our handlers aren't firing right anymore?
>
> -Darius
>
> On Tue, May 11, 2010 at 8:01 AM, Wyclif Luyima <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanx Ben, actually I'm not doing it programmatically, am just
>     trying to test voiding of a synonym from the web app. So it is not
>     that am calling any method, and that is why I think there is a
>     problem somewhere.
>     Wyclif
>
>     -----Original Message-----
>     From: [hidden email] <mailto:[hidden email]>
>     [mailto:[hidden email] <mailto:[hidden email]>] On Behalf Of Ben Wolfe
>     Sent: Tuesday, May 11, 2010 10:56
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [OPENMRS-DEV] Void handler
>
>     How are you voiding a ConceptName?  If we had a method called
>     voidConceptName(ConceptName) then it would happen magically.  However,
>     I'm guessing that you're doing saveConcept(Concept) that has the name
>     marked as voided.  The handlers do not (and cannot easily) handle this
>     second way.
>
>     Ben
>
>     On 05/11/2010 10:42 AM, Wyclif Luyima wrote:
>      > When I void a synonym (and I guess any concept name), the void
>     handler
>      > and the AOP around it doesn't seem to magically populate the fields
>      > 'date_voided' and 'voided_by' as I expected. Did the community
>     agree to
>      > leave the fields empty or it's a bug? If it 's a bug, can I go
>     ahead and
>      > create a ticket for it?
>      >
>      > Wyclif
>      >
>      >
>     ------------------------------------------------------------------------
>      > Click here to unsubscribe
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>     from
>      > OpenMRS Developers' mailing list
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]
Darius Jazayeri-3 Darius Jazayeri-3
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

Right, we consider ConceptName to be a dependent object of Concept, so there's no saveConceptName in ConceptService.

Not sure what the right solution here is.

-Darius

On Tue, May 11, 2010 at 11:22 AM, Wyclif Luyima <[hidden email]> wrote:
But I doubt if there is a method called voidConceptName(ConceptName), the current code calls the conceptFormController which calls saveConcept() and this explains why those fields aren't getting populated, so the conceptNames are not voided individually. Can some one who has access to a production database  check if those fields are populated for all voided conceptnames? This is different from ticket http://dev.openmrs.org/ticket/2277

Wyclif

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Tuesday, May 11, 2010 13:41
To: [hidden email]
Subject: Re: [OPENMRS-DEV] Void handler

If the save handlers were failing we would see /a lot/ more errors than
just these few.  They're used for all creator/changedBy/etc columns
being populated and propagated.

I assume you're referring to this ticket: http://dev.openmrs.org/ticket/2277

The save handlers only recurse on the properties of the current object,
so the obs/encounters/etc of a patient aren't designed to do that
automatically.  The better place for that is in the actual voidPatient
method.

Ben

On 05/11/2010 01:02 PM, Darius Jazayeri wrote:
> I remember seeing another comment to this effect recently. Is it
> possible that between 1.5 and 1.6 our handlers aren't firing right anymore?
>
> -Darius
>
> On Tue, May 11, 2010 at 8:01 AM, Wyclif Luyima <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanx Ben, actually I'm not doing it programmatically, am just
>     trying to test voiding of a synonym from the web app. So it is not
>     that am calling any method, and that is why I think there is a
>     problem somewhere.
>     Wyclif
>
>     -----Original Message-----
>     From: [hidden email] <mailto:[hidden email]>
>     [mailto:[hidden email] <mailto:[hidden email]>] On Behalf Of Ben Wolfe
>     Sent: Tuesday, May 11, 2010 10:56
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [OPENMRS-DEV] Void handler
>
>     How are you voiding a ConceptName?  If we had a method called
>     voidConceptName(ConceptName) then it would happen magically.  However,
>     I'm guessing that you're doing saveConcept(Concept) that has the name
>     marked as voided.  The handlers do not (and cannot easily) handle this
>     second way.
>
>     Ben
>
>     On 05/11/2010 10:42 AM, Wyclif Luyima wrote:
>      > When I void a synonym (and I guess any concept name), the void
>     handler
>      > and the AOP around it doesn't seem to magically populate the fields
>      > 'date_voided' and 'voided_by' as I expected. Did the community
>     agree to
>      > leave the fields empty or it's a bug? If it 's a bug, can I go
>     ahead and
>      > create a ticket for it?
>      >
>      > Wyclif
>      >
>      >
>     ------------------------------------------------------------------------
>      > Click here to unsubscribe
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>     from
>      > OpenMRS Developers' mailing list
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list
Burke Mamlin Burke Mamlin
Reply | Threaded
Open this post in threaded view
|

Re: Void handler

As a newbie user of the API, I would expect either or both of these to work...

Concept c = Context.getConceptService.getConcept(123);
c.getName().setVoided(true);
Context.getConceptService.saveConcept(c);

or

Concept c = Context.getConceptService.getConcept(123);
c.voidName(c.getName());
Context.getConceptService.saveConcept(c);

(The last line in each possible throwing an exception if I'm voiding the last name or only fully-specified name for a concept.)

-Burke

On May 11, 2010, at 2:39 PM, Darius Jazayeri wrote:

Right, we consider ConceptName to be a dependent object of Concept, so there's no saveConceptName in ConceptService.

Not sure what the right solution here is.

-Darius

On Tue, May 11, 2010 at 11:22 AM, Wyclif Luyima <[hidden email]> wrote:
But I doubt if there is a method called voidConceptName(ConceptName), the current code calls the conceptFormController which calls saveConcept() and this explains why those fields aren't getting populated, so the conceptNames are not voided individually. Can some one who has access to a production database  check if those fields are populated for all voided conceptnames? This is different from ticket http://dev.openmrs.org/ticket/2277

Wyclif

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Ben Wolfe
Sent: Tuesday, May 11, 2010 13:41
To: [hidden email]
Subject: Re: [OPENMRS-DEV] Void handler

If the save handlers were failing we would see /a lot/ more errors than
just these few.  They're used for all creator/changedBy/etc columns
being populated and propagated.

I assume you're referring to this ticket: http://dev.openmrs.org/ticket/2277

The save handlers only recurse on the properties of the current object,
so the obs/encounters/etc of a patient aren't designed to do that
automatically.  The better place for that is in the actual voidPatient
method.

Ben

On 05/11/2010 01:02 PM, Darius Jazayeri wrote:
> I remember seeing another comment to this effect recently. Is it
> possible that between 1.5 and 1.6 our handlers aren't firing right anymore?
>
> -Darius
>
> On Tue, May 11, 2010 at 8:01 AM, Wyclif Luyima <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanx Ben, actually I'm not doing it programmatically, am just
>     trying to test voiding of a synonym from the web app. So it is not
>     that am calling any method, and that is why I think there is a
>     problem somewhere.
>     Wyclif
>
>     -----Original Message-----
>     From: [hidden email] <mailto:[hidden email]>
>     [mailto:[hidden email] <mailto:[hidden email]>] On Behalf Of Ben Wolfe
>     Sent: Tuesday, May 11, 2010 10:56
>     To: [hidden email]
>     <mailto:[hidden email]>
>     Subject: Re: [OPENMRS-DEV] Void handler
>
>     How are you voiding a ConceptName?  If we had a method called
>     voidConceptName(ConceptName) then it would happen magically.  However,
>     I'm guessing that you're doing saveConcept(Concept) that has the name
>     marked as voided.  The handlers do not (and cannot easily) handle this
>     second way.
>
>     Ben
>
>     On 05/11/2010 10:42 AM, Wyclif Luyima wrote:
>      > When I void a synonym (and I guess any concept name), the void
>     handler
>      > and the AOP around it doesn't seem to magically populate the fields
>      > 'date_voided' and 'voided_by' as I expected. Did the community
>     agree to
>      > leave the fields empty or it's a bug? If it 's a bug, can I go
>     ahead and
>      > create a ticket for it?
>      >
>      > Wyclif
>      >
>      >
>     ------------------------------------------------------------------------
>      > Click here to unsubscribe
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l>
>     from
>      > OpenMRS Developers' mailing list
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>     _________________________________________
>
>     To unsubscribe from OpenMRS Developers' mailing list, send an e-mail
>     to [hidden email] <mailto:[hidden email]>
>     with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of
>     your e-mail.
>
>     [mailto:[hidden email]
>     <mailto:[hidden email]>?body=SIGNOFF%20openmrs-devel-l]
>
>
> ------------------------------------------------------------------------
> Click here to unsubscribe
> <mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l> from
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-devel-l" in the  body (not the subject) of your e-mail.

[mailto:[hidden email]?body=SIGNOFF%20openmrs-devel-l]


[hidden email] from OpenMRS Developers' mailing list


[hidden email] from OpenMRS Developers' mailing list