Darius,

 

You're correct, it required org.openmrs.api.ObsService.

 

Now, when I try the following groovy code...

return new
Result(org.openmrs.api.ObsService.getObservations(6407,"mostRecentN=1
sort="valueNumeric desc""))

 

I get...

Hl7inQueue.queueList.errorMessage.header: Invalid Logic Rule. 

Caused by:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:

script13164429085571793441641.groovy: 10: expecting ')', found
'valueNumeric' @ line 10, column 88.

   ons(6407,"mostRecentN=1 sort="valueNumer

 

When I try the following groovy code...

return new
Result(org.openmrs.api.ObsService.getObservations(6407,"mostRecentN=1
sort="desc""))

 

I get...

Hl7inQueue.queueList.errorMessage.header: Invalid Logic Rule. 

Caused by:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:

script13164431339642031039791.groovy: 10: expecting ')', found 'desc' @
line 10, column 88.

   ons(6407,"mostRecentN=1 sort="desc""))

 

When I try the following groovy code...

return new
Result(org.openmrs.api.ObsService.getObservations(6407,"mostRecentN=1
and sort="valueNumeric desc""))

 

I get...

Hl7inQueue.queueList.errorMessage.header: Invalid Logic Rule. 

Caused by:
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
failed:

script13164431339642031039791.groovy: 10: expecting ')', found 'desc' @
line 10, column 88.

   ons(6407,"mostRecentN=1 sort="desc""))

 

WhenI try the following groovy code...

return new
Result(org.openmrs.api.ObsService.getObservations(6407,"mostRecentN=1
and sort=valueNumeric desc"))

 

I get...

Hl7inQueue.queueList.errorMessage.header:
groovy.lang.MissingMethodException: No signature of method: static
org.openmrs.api.ObsService.getObservations() is applicable for argument
types: (java.lang.Integer, java.lang.String) values: [6407,
mostRecentN=1 and sort=valueNumeric desc]

 

What am I doing wrong with the getObservations()? Any idea why the SQL
Groovy code doesn't work?

 

Roger and Darius,

Thanks for your concerns on blood banking standards.  I took up your
suggestions with our medical director concerning the abnormal usage of a
serial number for blood bank baggies.  She said "We shouldn't change the
coding system, as it is done like this in every blood bank in Haiti." If
we used a different serial number system, it would confuse them when we
send the blood to Port-au-Prince (I initially suggested using the
encounter_id). The Red Cross is implementing a software system in Haiti,
but it doesn't have a registry for our donors in it, it is essentially
to find out where what kind of blood is in stock, so that it can be
ordered from this hospital if needed. Your concerns on standard practice
should to be taken up at a higher level.

 

Thanks,

James

 

From: [email protected] [mailto:[email protected]] On
Behalf Of Darius Jazayeri
Sent: Friday, September 16, 2011 11:25 AM
To: [email protected]
Subject: Re: [OPENMRS-IMPLEMENTERS] Auto-Incrementing Numeric
Observation

 

James,

You need to do org.openmrs.api.ObsService I think.

-Darius (by phone)

        On Sep 16, 2011 8:20 AM, "Friedman, Roger (CDC/CGH/DGHA) (CTR)"
<[email protected]> wrote:

        James --

                        Because of the criticality of blood tracking,
it's important that there be a check digit on your blood bag ID.  So
maybe you should use the algorithm from ID generation rather than just a
sequence number.  

                        Also I don't know if you are tracking the blood
after it's processed into different products and then into the patient,
but that's the standard of care for blood.  Certainly it would be good
at least to check the blood against your testing records before use,
that's where discrepancies would appear.  You'd be better off printing
barcodes and avoid rewriting.  There are also standards for that.

                        I know that we here at CDC are doing blood bank
system strengthening in Haiti and that hospital-based collection and
processing is not the international norm, especially when presence of
transmissible disease is high.  Rather, collection efforts are based
around community drives, particularly where young as-yet-uninfected
people can be found, with processing at high-volume centers which
warehouse the products and distribute them to hospitals, with only a few
days supply stored at the hospital.  

                        In short, there are lots of international
standards around bloodbanking that are important and which I can send if
you're interested.  There are also commercial solutions which might do
the job cheaper, faster and with better compliance with international
standards than you can. 

        Saludos, Roger

         

        From: [email protected] [mailto:[email protected]]
On Behalf Of James Arbaugh
        Sent: Thursday, September 15, 2011 11:20 PM

        
        To: [email protected]
        Subject: Re: [OPENMRS-IMPLEMENTERS] Auto-Incrementing Nu...

        
        
         
        
        Thanks Darius (and Daniel)!
        
         
        
        I'm trying to write my Groovy rule, and it's not working like
I...

        
        
        ________________________________
        Click here to unsubscribe from OpenMRS Implementers' mailing
list

________________________________

Click here to unsubscribe
<mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l>
from OpenMRS Implementers' mailing list 


_________________________________________

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

[mailto:[email protected]?body=SIGNOFF%20openmrs-implement-l]

Reply via email to