epihandy module problem

13 messages Options
Embed this post
Permalink
Nicholas Koch

epihandy module problem

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
hi,
i need some help getting the epihandy module started. i corrected the error in config.xml that was pointed out in the forum, but now i get the following error when installing the module.
please let me know if you can help.
thanks!
nick


Nicholas J. Koch
Director of Information Technology
Global Brigades, Inc.


Unable to refresh the WebApplicationContext
Error creating bean with name 'accessLogPurgeController' defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/temp/1256416230203.openmrs-lib-cache/accesslogging/accesslogging.jar!/org/openmrs/module/accesslogging/web/AccessLogPurgeController.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.openmrs.module.accesslogging.web.AccessLogPurgeValidator]: : Cannot find class [org.openmrs.module.epihandy.web.controller.InitDatabaseListController] for bean with name 'initDatabaseList' defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/temp/1256416230203.openmrs-lib-cache/epihandy/epihandy.jar!/moduleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.module.epihandy.web.controller.InitDatabaseListController; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.openmrs.module.epihandy.web.controller.InitDatabaseListController] for bean with name 'initDatabaseList' defined in URL [jar:file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%206.0/temp/1256416230203.openmrs-lib-cache/epihandy/epihandy.jar!/moduleApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: org.openmrs.module.epihandy.web.controller.InitDatabaseListController
org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:591)
org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:193)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:429)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)
 ** org.openmrs.module.ModuleUtil.refreshApplicationContext(ModuleUtil.java:563)
 ** org.openmrs.module.web.WebModuleUtil.refreshWAC(WebModuleUtil.java:726)
 ** org.openmrs.module.web.WebModuleUtil.startModule(WebModuleUtil.java:312)
 ** org.openmrs.module.web.controller.ModuleListController.onSubmit(ModuleListController.java:130)
org.springframework.web.servlet.mvc.SimpleFormController.processFormSubmission(SimpleFormController.java:267)
org.springframework.web.servlet.mvc.AbstractFormController.handleRequestInternal(AbstractFormController.java:265)
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:511)
javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 ** org.openmrs.module.web.filter.ModuleFilterChain.doFilter(ModuleFilterChain.java:76)
 ** org.openmrs.module.web.filter.ModuleFilter.doFilter(ModuleFilter.java:58)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 ** org.openmrs.web.filter.OpenmrsFilter.doFilterInternal(OpenmrsFilter.java:112)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 ** org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
 ** org.openmrs.web.filter.StartupFilter.doFilter(StartupFilter.java:82)
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
java.lang.Thread.run(Unknown Source)


[hidden email] from OpenMRS Implementers' mailing list
Daniel Kayiwa

Re: epihandy module problem

Reply Threaded More More options
Print post
Permalink
Hi Nicholas, what exactly do u want to use the epihandy module for? Is
it for mobile data collection? If yes, what kind of mobile devices do
u have? Is it cell phones, PDAs, Android devices, or something else?
The reason am asking is because that module has been replaced by
better ones and basing on your answers to the above questions, we
shall guide you accordingly.

--
If we keep uppermost in our minds the unkind and unjust acts of
others, we shall find it impossible to love them as Christ has loved
us; but if our thoughts dwell upon the wondrous love and pity of
Christ for us, the same spirit will flow out to others.

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Nicholas Koch

Re: epihandy module problem

Reply Threaded More More options
Print post
Permalink
hi daniel,
i need something for mobile data collection on j2me cell phones,  
mostly blackberrys.
what would you suggest?
thanks!
nick


Nicholas J. Koch
Director of Information Technology
Global Brigades, Inc.
[hidden email]
www.brigadesblog.org






On Oct 25, 2009, at 2:06 AM, Daniel Kayiwa wrote:

> Hi Nicholas, what exactly do u want to use the epihandy module for? Is
> it for mobile data collection? If yes, what kind of mobile devices do
> u have? Is it cell phones, PDAs, Android devices, or something else?
> The reason am asking is because that module has been replaced by
> better ones and basing on your answers to the above questions, we
> shall guide you accordingly.
>
> --
> If we keep uppermost in our minds the unkind and unjust acts of
> others, we shall find it impossible to love them as Christ has loved
> us; but if our thoughts dwell upon the wondrous love and pity of
> Christ for us, the same spirit will flow out to others.
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)

FormEntry Problems

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel Kayiwa
I am having some problems with FormEntry.  Perhaps some of you can help.
 
I am having trouble with concept sets with max=-1 being displayed in repeating tables with sections.  In each case, I have a button and an expression box in the first section.  
The button uses a taskpane widget (either concept.htm or getAnswer.htm).  
The nodePath is //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente where elemento_de_enfermedades is the concept set and historia_de_enfermedades_segun_paciente is the first member of the set.  
historia_de_enfermedades_segun_paciente is coded, not multi not set, and can be seen in the data source panel to have a value element.  
The concept.htm call has createConceptList=true
The expression box is pointed at //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente/value (or just value if I use the InfoPath expression generator) with an expression to strip off the unwanted code subfields.  
The problem is that it works the first time I use it, but fails thereafter whether I am trying to change the selection on the first row or make a new selection on the second row.  
The message is "Element 'historia_de_enfermedades' is unexpected according to the content model of parent element 'elemento_de_historia_de_enfermedades'."  
The error occurs in function cloneAndInsertNode in the command node.parentNode.appendChild(newNode); which is being called from the very last else block in function pickConcept.
Is it possible that the problem is that I have changed the column headers for the section from the name of the element (historia_de_enfermedades_segun_paciente) to something else (historia_de_enfermedades)?
 
I am also having trouble with a JScript function I have written to calculate age (in days, months or years depending on age).  The only way I have figured out how to call it is to use the form::load event and the date of service::afterChange event.  I need to pick the date of birth and date of service elements out of the DOM and stuff the result back into the DOM (I have age as a concept at the encounter level).  I think I am not having any problem pointing at the right nodes (they are both table fields), I think my problem is getting the text of the node into an object of date type.  
 
Any suggestions?
 
Thanks, Roger
 

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Daniel Kayiwa

Re: epihandy module problem

Reply Threaded More More options
Print post
Permalink
In reply to this post by Nicholas Koch
Hi Nicholas,  in that case u can use the openmrs xforms module. For
the phone, you  have a number of options like JavaRosa, OpenMrs mobile
based on epihandy j2me engine, and possibly more. Which phone client
to chose will depend on more details of your requirements.

--
If we keep uppermost in our minds the unkind and unjust acts of
others, we shall find it impossible to love them as Christ has loved
us; but if our thoughts dwell upon the wondrous love and pity of
Christ for us, the same spirit will flow out to others.

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
In reply to this post by Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
OK, nobody answered me, so I had to figure out the second one myself.

Attached please find the components for an InfoPath form to calculate the time between two dates.  Periods up to 1 month are reported in days (D suffix), from 1 month to 2 years in months (M suffix), and thereafter in years (A suffix, this is Spanish).  The first snippet is the calling sequence, it goes in the change event for the start and end date fields (edad is Spanish for age, it's a text concept).  The second section is a function to extract the date from either the XML tree or the control whose value changed.  The third section is a function to store the results back into the XML data.  The fourth section is the function that computes the difference.

So now can anybody help me with the first problem?

Thanks, Roger

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
Sent: Sunday, October 25, 2009 7:37 PM
To: [hidden email]
Subject: [OPENMRS-IMPLEMENTERS] FormEntry Problems

I am having some problems with FormEntry.  Perhaps some of you can help.
 
I am having trouble with concept sets with max=-1 being displayed in repeating tables with sections.  In each case, I have a button and an expression box in the first section.  
The button uses a taskpane widget (either concept.htm or getAnswer.htm).  
The nodePath is //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente where elemento_de_enfermedades is the concept set and historia_de_enfermedades_segun_paciente is the first member of the set.  
historia_de_enfermedades_segun_paciente is coded, not multi not set, and can be seen in the data source panel to have a value element.  
The concept.htm call has createConceptList=true The expression box is pointed at //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente/value (or just value if I use the InfoPath expression generator) with an expression to strip off the unwanted code subfields.  
The problem is that it works the first time I use it, but fails thereafter whether I am trying to change the selection on the first row or make a new selection on the second row.  
The message is "Element 'historia_de_enfermedades' is unexpected according to the content model of parent element 'elemento_de_historia_de_enfermedades'."  
The error occurs in function cloneAndInsertNode in the command node.parentNode.appendChild(newNode); which is being called from the very last else block in function pickConcept.
Is it possible that the problem is that I have changed the column headers for the section from the name of the element (historia_de_enfermedades_segun_paciente) to something else (historia_de_enfermedades)?
 
I am also having trouble with a JScript function I have written to calculate age (in days, months or years depending on age).  The only way I have figured out how to call it is to use the form::load event and the date of service::afterChange event.  I need to pick the date of birth and date of service elements out of the DOM and stuff the result back into the DOM (I have age as a concept at the encounter level).  I think I am not having any problem pointing at the right nodes (they are both table fields), I think my problem is getting the text of the node into an object of date type.  
 
Any suggestions?
 
Thanks, Roger
 

_________________________________________

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

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


_________________________________________

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

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

// A field change has occurred and the DOM is writable. Write code here to respond to the changes.
        var d1, d2, node;
        node = eventObj.XDocument.DOM.selectSingleNode("//encounter/edad/value");
        d1 = dateExtract(eventObj,"//patient/patient.birthdate");
        d2 = dateExtract(eventObj,"");
        stow(node, toAge(d1,d2));
}
//=======
// This function extracts the date from the event object or the xml tree
// The first argument is the eventObj of the event triggering the recalculation
// If the data source is the control which triggered the event, the 2nd argument=""
// If the data source is the XML tree, the second argument is the node name
// The function returns a date
//=======
function dateExtract(eventObj,xpath) {
        var node;
        var su = new String();
        var sp = new String();
        var re = new RegExp("[0-9]{8}");
        if (xpath)
// we are getting out of the tree, so get the specified node
        {
                node = eventObj.XDocument.DOM.selectSingleNode(xpath);
                if (node) // if the node doesn't exist, su is empty string
                        su = node.text;
        }
        else
// we are getting out of the control
                su = eventObj.NewValue;
// build the mdy string depending on whether there is punctuation in the source string
        if (re.test(su))
                sp = su.substr(4,2) + "/" + su.substr(6,2) + "/" + su.substr(0,4);
        else
                sp = su.substr(5,2) + "/" + su.substr(8,2) + "/" + su.substr(0,4);
// convert the mdy string to a date and return it
        var d = new Date(sp);
        return d;
}
//=======
// This function puts the second argument into the xml of the first argument.
// If the first argument doesn't exist, it returns 0
// If the second argument is null, it returns -1
// If the second argument is not-null, it returns +1
//=======
function stow(node, value) {
        if (node==null) return 0;
        var i;
        for (i=0;i<node.attributes.length;i++)
        {
                if (node.attributes(i).nodeName=="xsi:nil"){
                        if (value==null) {
                                node.attributes(i).text="true";
                                node.text="";
                                return -1;
                        } else {
                                node.attributes(i).text="false";
                                node.text=value.toString();
                                return 1;
                        }
                }
        }
}

//=======
// This function takes a start date and an end date and computes the interval.
// Intervals up to 1 month are reported in days, 1-24 months in months, thereafter in years
//=======
function toAge(dob,t) {
        var s=new String();
        var d=new Date();
        var n=new Number();
        if ((dob==null) || (t==null) || !isFinite(dob) || !isFinite(t))
                return "";
        else {
                if (dob>t)
                        return "";
                d=new Date(dob.getFullYear(),dob.getMonth()+1,dob.getDate())
                if (t<d) {
                        n=Math.floor((t-dob)/86400000); //milliseconds/day
                        return n.toString() + " D";
                }
                else {
                        d=new Date(dob.getFullYear()+2,dob.getMonth(),dob.getDate())
                        if (t<d) {
                                n=12*(t.getFullYear()-dob.getFullYear()) + t.getMonth() - dob.getMonth();
                                return n.toString() + " M";
                }
                        else {
                                n=t.getFullYear() - dob.getFullYear();
                                if (t.getMonth()<dob.getMonth())
                                        n=n-1;
                                else
                                        if ((t.getMonth()==dob.getMonth()) && (t.getDate()<dob.getDate()))
                                                n=n-1;
                                return n.toString() + " A";
                        }
                }
        }
}
Burke Mamlin

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
Roger,

Thanks for sharing your code.  Would it be possible for you to share a  
small sample form that demonstrates your first problem?  If your form  
is much more than 5-10K, then post it somewhere and link to it in an e-
mail (if you need a temporary upload link, e-mail me directly and I  
can send you one).

-Burke

On Oct 26, 2009, at 4:16 PM, Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)  
wrote:

> OK, nobody answered me, so I had to figure out the second one myself.
>
> Attached please find the components for an InfoPath form to  
> calculate the time between two dates.  Periods up to 1 month are  
> reported in days (D suffix), from 1 month to 2 years in months (M  
> suffix), and thereafter in years (A suffix, this is Spanish).  The  
> first snippet is the calling sequence, it goes in the change event  
> for the start and end date fields (edad is Spanish for age, it's a  
> text concept).  The second section is a function to extract the date  
> from either the XML tree or the control whose value changed.  The  
> third section is a function to store the results back into the XML  
> data.  The fourth section is the function that computes the  
> difference.
>
> So now can anybody help me with the first problem?
>
> Thanks, Roger
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On  
> Behalf Of Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
> Sent: Sunday, October 25, 2009 7:37 PM
> To: [hidden email]
> Subject: [OPENMRS-IMPLEMENTERS] FormEntry Problems
>
> I am having some problems with FormEntry.  Perhaps some of you can  
> help.
>
> I am having trouble with concept sets with max=-1 being displayed in  
> repeating tables with sections.  In each case, I have a button and  
> an expression box in the first section.
> The button uses a taskpane widget (either concept.htm or  
> getAnswer.htm).
> The nodePath is //obs/elemento_de_historia_de_enfermedades/
> historia_de_enfermedades_segun_paciente where  
> elemento_de_enfermedades is the concept set and  
> historia_de_enfermedades_segun_paciente is the first member of the  
> set.
> historia_de_enfermedades_segun_paciente is coded, not multi not set,  
> and can be seen in the data source panel to have a value element.
> The concept.htm call has createConceptList=true The expression box  
> is pointed at //obs/elemento_de_historia_de_enfermedades/
> historia_de_enfermedades_segun_paciente/value (or just value if I  
> use the InfoPath expression generator) with an expression to strip  
> off the unwanted code subfields.
> The problem is that it works the first time I use it, but fails  
> thereafter whether I am trying to change the selection on the first  
> row or make a new selection on the second row.
> The message is "Element 'historia_de_enfermedades' is unexpected  
> according to the content model of parent element  
> 'elemento_de_historia_de_enfermedades'."
> The error occurs in function cloneAndInsertNode in the command  
> node.parentNode.appendChild(newNode); which is being called from the  
> very last else block in function pickConcept.
> Is it possible that the problem is that I have changed the column  
> headers for the section from the name of the element  
> (historia_de_enfermedades_segun_paciente) to something else  
> (historia_de_enfermedades)?
>
> I am also having trouble with a JScript function I have written to  
> calculate age (in days, months or years depending on age).  The only  
> way I have figured out how to call it is to use the form::load event  
> and the date of service::afterChange event.  I need to pick the date  
> of birth and date of service elements out of the DOM and stuff the  
> result back into the DOM (I have age as a concept at the encounter  
> level).  I think I am not having any problem pointing at the right  
> nodes (they are both table fields), I think my problem is getting  
> the text of the node into an object of date type.
>
> Any suggestions?
>
> Thanks, Roger
>
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]
>
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-
> mail to [hidden email] with "SIGNOFF openmrs-implement-
> l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-
> l]
> <toAge.txt>

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Isaac Holeman

Re: epihandy module problem

Reply Threaded More More options
Print post
Permalink
In reply to this post by Daniel Kayiwa
Some javascript/style in this post has been disabled (why?)
Hi Nicholas and Daniel,

I started a mobile page on the OpenMRS wiki to try to give implementers like you an overview of all the options out there. I think every tool you should look into is on the list, but some of them have very little background. Daniel and others, perhaps you could help completing this page? 


cheers
Isaac


Isaac Holeman, Field Director
FrontlineSMS:Medic ~ http://medic.frontlinesms.com
(malawi mobile) 256 99.364.3347
twitter @isaacholeman

On Oct 26, 2009, at 9:08 AM, Daniel Kayiwa wrote:

Hi Nicholas,  in that case u can use the openmrs xforms module. For
the phone, you  have a number of options like JavaRosa, OpenMrs mobile
based on epihandy j2me engine, and possibly more. Which phone client
to chose will depend on more details of your requirements.

-- 
If we keep uppermost in our minds the unkind and unjust acts of
others, we shall find it impossible to love them as Christ has loved
us; but if our thoughts dwell upon the wondrous love and pity of
Christ for us, the same spirit will flow out to others.

_________________________________________

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



[hidden email] from OpenMRS Implementers' mailing list
Andrew Kanter

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
In reply to this post by Burke Mamlin
Roger,

I typically have this problem as well... and ultimately just copy a working version from other forms and editing it. However, I do know that to look at the issue, we need to have the form and the schema (or at least a screenshot of the relevant metadata).

Thanks!
Andy
 --------------------
Andrew S. Kanter, MD MPH


- Director of Health Information Systems/Medical Informatics
Millennium Villages Project, Earth Institute, Columbia University
- Asst. Prof. of Clinical Biomedical Informatics and Clinical Epidemiology
Columbia University


Email: [hidden email]
Mobile: +1 (646) 469-2421
Office: +1 (212) 305-4842
Skype: akanter-ippnw
Yahoo: andy_kanter



----- Original Message ----
From: Burke Mamlin <[hidden email]>
To: [hidden email]
Sent: Mon, October 26, 2009 6:22:38 PM
Subject: Re: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Roger,

Thanks for sharing your code.  Would it be possible for you to share a small sample form that demonstrates your first problem?  If your form is much more than 5-10K, then post it somewhere and link to it in an e-mail (if you need a temporary upload link, e-mail me directly and I can send you one).

-Burke

On Oct 26, 2009, at 4:16 PM, Friedman, Roger (CDC/CCID/NCHHSTP) (CTR) wrote:

> OK, nobody answered me, so I had to figure out the second one myself.
>
> Attached please find the components for an InfoPath form to calculate the time between two dates.  Periods up to 1 month are reported in days (D suffix), from 1 month to 2 years in months (M suffix), and thereafter in years (A suffix, this is Spanish).  The first snippet is the calling sequence, it goes in the change event for the start and end date fields (edad is Spanish for age, it's a text concept).  The second section is a function to extract the date from either the XML tree or the control whose value changed.  The third section is a function to store the results back into the XML data.  The fourth section is the function that computes the difference.
>
> So now can anybody help me with the first problem?
>
> Thanks, Roger
>
> -----Original Message-----
> From: [hidden email] [mailto:[hidden email]] On Behalf Of Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
> Sent: Sunday, October 25, 2009 7:37 PM
> To: [hidden email]
> Subject: [OPENMRS-IMPLEMENTERS] FormEntry Problems
>
> I am having some problems with FormEntry.  Perhaps some of you can help.
>
> I am having trouble with concept sets with max=-1 being displayed in repeating tables with sections.  In each case, I have a button and an expression box in the first section.
> The button uses a taskpane widget (either concept.htm or getAnswer.htm).
> The nodePath is //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente where elemento_de_enfermedades is the concept set and historia_de_enfermedades_segun_paciente is the first member of the set.
> historia_de_enfermedades_segun_paciente is coded, not multi not set, and can be seen in the data source panel to have a value element.
> The concept.htm call has createConceptList=true The expression box is pointed at //obs/elemento_de_historia_de_enfermedades/historia_de_enfermedades_segun_paciente/value (or just value if I use the InfoPath expression generator) with an expression to strip off the unwanted code subfields.
> The problem is that it works the first time I use it, but fails thereafter whether I am trying to change the selection on the first row or make a new selection on the second row.
> The message is "Element 'historia_de_enfermedades' is unexpected according to the content model of parent element 'elemento_de_historia_de_enfermedades'."
> The error occurs in function cloneAndInsertNode in the command node.parentNode.appendChild(newNode); which is being called from the very last else block in function pickConcept.
> Is it possible that the problem is that I have changed the column headers for the section from the name of the element (historia_de_enfermedades_segun_paciente) to something else (historia_de_enfermedades)?
>
> I am also having trouble with a JScript function I have written to calculate age (in days, months or years depending on age).  The only way I have figured out how to call it is to use the form::load event and the date of service::afterChange event.  I need to pick the date of birth and date of service elements out of the DOM and stuff the result back into the DOM (I have age as a concept at the encounter level).  I think I am not having any problem pointing at the right nodes (they are both table fields), I think my problem is getting the text of the node into an object of date type.
>
> Any suggestions?
>
> Thanks, Roger
>
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
>
>
> _________________________________________
>
> To unsubscribe from OpenMRS Implementers' mailing list, send an e-mail to [hidden email] with "SIGNOFF openmrs-implement-l" in the  body (not the subject) of your e-mail.
>
> [mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
> <toAge.txt>

_________________________________________

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

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

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Nicholas Koch

Re: epihandy module problem

Reply Threaded More More options
Print post
Permalink
In reply to this post by Isaac Holeman
Some javascript/style in this post has been disabled (why?)
thanks guys! i found the openmrs midlet which i think should meet my needs. i'm trying it out right now.


Nicholas J. Koch
Director of Information Technology
Global Brigades, Inc.






On Oct 27, 2009, at 5:52 AM, Isaac Holeman wrote:

Hi Nicholas and Daniel,

I started a mobile page on the OpenMRS wiki to try to give implementers like you an overview of all the options out there. I think every tool you should look into is on the list, but some of them have very little background. Daniel and others, perhaps you could help completing this page? 


cheers
Isaac


Isaac Holeman, Field Director
FrontlineSMS:Medic ~ http://medic.frontlinesms.com
(malawi mobile) 256 99.364.3347
twitter @isaacholeman

On Oct 26, 2009, at 9:08 AM, Daniel Kayiwa wrote:

Hi Nicholas,  in that case u can use the openmrs xforms module. For
the phone, you  have a number of options like JavaRosa, OpenMrs mobile
based on epihandy j2me engine, and possibly more. Which phone client
to chose will depend on more details of your requirements.

-- 
If we keep uppermost in our minds the unkind and unjust acts of
others, we shall find it impossible to love them as Christ has loved
us; but if our thoughts dwell upon the wondrous love and pity of
Christ for us, the same spirit will flow out to others.

_________________________________________

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



[hidden email] from OpenMRS Implementers' mailing list


[hidden email] from OpenMRS Implementers' mailing list
Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
In reply to this post by Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
Ada --
  Thanks for your help, the nodeHasSiblings parameter did the trick.  Sorry not to get back to you sooner.
Thanks, Roger

All --
  For those who downloaded my toAge materials, I have made a small change to the stow function, it is below.  I have added a fall-through case for where there is no xsi:nil attribute and have changed the form of the null tests.
  I don't know how many of you consider this a problem, maybe I am just missing something, but after selecting something through the taskpane, I couldn't find any easy way to clear the field.  I now have a code snippet that does it, it's below.
Thanks, Roger

function stow(node, value) {
        if (!node) return 0;
        var i;
        for (i=0;i<node.attributes.length;i++)
        {
                if (node.attributes(i).nodeName=="xsi:nil"){
                        if (!value) {
                                node.attributes(i).text="true";
                                node.text="";
                                return -1;
                        } else {
                                node.attributes(i).text="false";
                                node.text=value.toString();
                                return 1;
                        }
                }
        }
        if (!value) {
                node.text="";
                return -1;
        } else {
                node.text=value.toString();
                return 1;
        }
}

Code snippets for having a button that clears a field if it's not empty and does a taskpane lookup if it is (note this is not for repeating tables, just single instances) (stuff you have to change appropriately in <<>>):
(1) At the top of the script, just after the namespaces definition, you will need to create a variable for each field which is the target of the taskpane lookup:
        //</namespacesDefinition>  {this line generated by InfoPath}
var <<nullDiagVIHUDS>> = XDocument.DOM.selectSingleNode("<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>").cloneNode(false);
(2) In the button click event script, you will need to use your variable thusly (normally you would just have the last line of the function):
function cmdDiagVIHUdS::OnClick(eventObj)
{
        // Write your code here {through here generated by InfoPath}
        var node = eventObj.XDocument.DOM.selectSingleNode("<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>");
        if (node.xml != <<nullDiagVIHUDS>>.xml)
                node.parentNode.replaceChild(<<nullDiagVIHUDS>>.cloneNode(false),node);
        else
                taskPaneNavigateTo("/location.htm?nodePath=<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>");
} // {this line generated by InfoPath}

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Andrew Kanter

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
So, you're good now, Roger?
 --------------------
Andrew S. Kanter, MD MPH


- Director of Health Information Systems/Medical Informatics
Millennium Villages Project, Earth Institute, Columbia University
- Asst. Prof. of Clinical Biomedical Informatics and Clinical Epidemiology
Columbia University


Email: [hidden email]
Mobile: +1 (646) 469-2421
Office: +1 (212) 305-4842
Skype: akanter-ippnw
Yahoo: andy_kanter



----- Original Message ----
From: "Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)" <[hidden email]>
To: [hidden email]
Sent: Wed, October 28, 2009 5:51:56 PM
Subject: Re: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Ada --
  Thanks for your help, the nodeHasSiblings parameter did the trick.  Sorry not to get back to you sooner.
Thanks, Roger

All --
  For those who downloaded my toAge materials, I have made a small change to the stow function, it is below.  I have added a fall-through case for where there is no xsi:nil attribute and have changed the form of the null tests.
  I don't know how many of you consider this a problem, maybe I am just missing something, but after selecting something through the taskpane, I couldn't find any easy way to clear the field.  I now have a code snippet that does it, it's below.
Thanks, Roger    

function stow(node, value) {
    if (!node) return 0;
    var i;
    for (i=0;i<node.attributes.length;i++)
    {
        if (node.attributes(i).nodeName=="xsi:nil"){
            if (!value) {
                node.attributes(i).text="true";
                node.text="";
                return -1;
            } else {
                node.attributes(i).text="false";
                node.text=value.toString();
                return 1;
            }
        }
    }
    if (!value) {
        node.text="";
        return -1;
    } else {
        node.text=value.toString();
        return 1;
    }
}

Code snippets for having a button that clears a field if it's not empty and does a taskpane lookup if it is (note this is not for repeating tables, just single instances) (stuff you have to change appropriately in <<>>):
(1) At the top of the script, just after the namespaces definition, you will need to create a variable for each field which is the target of the taskpane lookup:
    //</namespacesDefinition>  {this line generated by InfoPath}
var <<nullDiagVIHUDS>> = XDocument.DOM.selectSingleNode("<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>").cloneNode(false);
(2) In the button click event script, you will need to use your variable thusly (normally you would just have the last line of the function):
function cmdDiagVIHUdS::OnClick(eventObj)
{
    // Write your code here        {through here generated by InfoPath}
    var node = eventObj.XDocument.DOM.selectSingleNode("<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>");
    if (node.xml != <<nullDiagVIHUDS>>.xml)
        node.parentNode.replaceChild(<<nullDiagVIHUDS>>.cloneNode(false),node);
    else    
        taskPaneNavigateTo("/location.htm?nodePath=<<//obs/uds_de_diagnosis_de_vih_segun_paciente/value>>");
}            //    {this line generated by InfoPath}

_________________________________________

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

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

_________________________________________

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

[mailto:[hidden email]?body=SIGNOFF%20openmrs-implement-l]
Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)

Re: FormEntry Problems

Reply Threaded More More options
Print post
Permalink
In reply to this post by Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
I wanted to put the go-to-page buttons outside the form itself.  But seeing as how buttons don't print anyway, it's probably less of a worry.

-----Original Message-----
From: Yeung, Ada K. [mailto:[hidden email]]
Sent: Friday, October 30, 2009 9:02 AM
To: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Morning, Roger!  I am curious why you are interested in having the buttons outside the form margins.  :)

--Ada

-----Original Message-----
From: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR) [mailto:[hidden email]]
Sent: Thursday, October 29, 2009 6:03 PM
To: Yeung, Ada K.
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Thanks, Ada.  My parentheticals were just meant to be illustrative, not technically correct.  So I agree that user roles and form types are appropriate solutions.  I was coming from the point of view of the InfoPath documentation, not Open MRS.

We have a 4-page adult visit form, I was concerned about the number of variables and the time to complete, from your reply that should not be a problem.  Ped visits also have a 1-page immunization report/form, which suspect I will keep separate because it's more pediatric than HIV.  We have a 1-page adult registration form with a 1-page supplement for peds, I will probably put those into a single registration form.  We have a 1-page exposed infant form which will stay separate.  We have a 1-page history form which normally will be administered at registration, but can also come from hospital consults, I might make that part of registration and also keep it separate.  We have 1-page lab form, which I will probably keep separate until we can get approval to use it instead of the current lab request form, also we have a lot of history to capture, it will be useful for organizing that.

Have you found any way to move the Submit button, or to put other buttons outside the form margins (e.g. page buttons)?  

-----Original Message-----
From: Yeung, Ada K. [mailto:[hidden email]]
Sent: Thursday, October 29, 2009 10:51 AM
To: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Hey, Roger, even if you have one-page long form or a multi-page (multiple views) form, the same timeouts for the forms would apply.  You can also apply data validation for data elements from different views within the same form.  

The best way to handle Adult/Peds forms would be to separate them into two different forms/encounter types.  For example, it would be better to have one form for Adult and another form for Peds.  I would even go further to separate them into Adult Initial, Adult Return, Peds Initial, and Peds Return.  This would make report generation less painful.  For example, when they want to know how many new Peds enrollment in the month of September, 2009, your data manager can just query the encounter table with encounter type=Peds Initial.  If not, you will have to go through all the data elements corresponding to Peds Initial visit and then sort them out whether those obs were first stored in the month of September.  

For different roles, you can assign the nurses and providers by different roles in Users.  It's always better to get the specific information instead of the general information.  For example, we categorize medical officer, clinical officer, and consultant physician as "clinician" in OpenMRS Role.  Later on, we find out that it doesn't serve what our program needs because our program director would like to know whether the consultant physician perform their tasks so that they can receive incentives accordingly.  We don't know whether they work as a consultant physician or clinical officer since we group all of them as clinician.  So, we are in the process of going back to re-categorize them which is quite a bit of work.  

So, rule of thumb, it's better to collect the lowest level data which you can always aggregate it later if needed.  Not sure if it makes sense or if I answer your question.  You can always call me (317-423-5661) for discussions.  Thanks!

--Ada  

-----Original Message-----
From: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR) [mailto:[hidden email]]
Sent: Thursday, October 29, 2009 10:00 AM
To: Yeung, Ada K.
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Ada, thanks for the discussion of views as the way to do pages, I had been thinking of them in terms of different roles (doctor/nurse) or data subsetting (adult/ped).  Are there any bad consequences to having giant data objects or forms, such as connection timeouts or form-level validations being unable to display the offending element because it's in a different view?

-----Original Message-----
From: Yeung, Ada K. [mailto:[hidden email]]
Sent: Wednesday, October 28, 2009 9:04 PM
To: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR)
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

You are welcome, Roger and I am glad it works.

For multi-page form, you can create new page.  [Under Design Tasks->Click Views->Under Actions, Click "Add New View"]  Then, you can add buttons to allow users to move from page 1 to page 2 or from page 2 back to page 1 or from page 2 to page 3.  You don't have to write code for the button to move from pages.  You can right click the button and choose "Button Properties".  Then, click "Rules" and then "Add Rule".  In the Rule pop-up box, click "Add Action".  Choose "Switch Views" and then under "View", choose the page you want this button to turn to.  That's it.

Some of our forms are quite long (like six pages).  It would not make sense for our data enterers to scroll down so long which they might miss entering some data.  Also, they prefer to have the electronic forms look like the paper forms which they feel more comfortable.  :)

Let me know what you think.  Thanks!

--Ada  

-----Original Message-----
From: Friedman, Roger (CDC/CCID/NCHHSTP) (CTR) [mailto:[hidden email]]
Sent: Wednesday, October 28, 2009 6:04 PM
To: Yeung, Ada K.
Subject: RE: [OPENMRS-IMPLEMENTERS] FormEntry Problems

Ada --
        Thanks again.  I'm not a Skype user, USG pays for my phone calls. :-))
        I'm interested in how you handle multi-page forms like the one you sent me.  Does the user have to click on a new form for each page, do you link them, or do you have a gigantic form with pages?  Why?  Is timing out of OpenMRS or Tomcat a problem?
Thanks, Roger

_________________________________________

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

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