Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Twitter

Categories

In this Discussion

El fin de este foro es dar soporte gratuito y comercial a los distintos productos y servicios de CaboLabs.com. El soporte gratuito se brinda en los foros de acceso público y no tiene garantía de tiempo mínimo de respuesta. El soporte comercial se brinda en foros privados donde se garantiza una respuesta dentro de las 24 horas.

LoadEHR

Hi!
I watched the presentation about the LoadEHR and I have 2 issues:
1-There is running over a Windows virtual machine. I tested in a ubuntu machine and it is not running. I made modifications too in the commands. But in all cases, not run. Basicaly, ocour the error below:
ubuntu@test-001:~/loaderEHR$ ./loadehr.bat
Error: Could not find or load main class com.cabolabs.loadehr.Main
ubuntu@test-001:~/loaderEHR$ java -jar cabolabs-loadehr.jar
no main manifest attribute, in cabolabs-loadehr.jar

2- Can I use the loadEHR to load a previous data set? I have one data set - may in CSV format.

Thanks for the help!

Comments

  • Hi Jorge,

    The loadehr.bat needs to location of the current version of groovy:

    java -cp "./lib/*;%GROOVY_HOME%/embeddable/groovy-all-2.4.7.jar;%GROOVY_HOME%/lib/*;cabolabs-loadehr.jar" com.cabolabs.loadehr.Main %1 %2 %3 %4 %5 %6

    1. You need to set the GROOVY_HOME, I guess you have that already :)
    2. The right version in the groovy-all-X.Y.Z.jar file

    Let me try on linux since that was for a linux build.

    In order to get your data into loader you need to do the mappings from any data source to a valid openEHR composition XML. You can see the code on https://github.com/ppazos/cabolabs-loadehr/blob/master/src/com/cabolabs/loadehr/LoadEhr.groovy

    That has 3 or 4 methods for each composition do to different tasks like get/generate sample data, do the data mapping to the composition, prepare the commit, and do the commit. Repeating the same pattern you can create your own methods to map your data set. Consider that to work with openEHR you need archetypes and templates to model your data set structure. The operational templates should be loaded into the EHRServer to be able to index and query data.
  • You can also use the EHRServer groovy client directly, but the loadEHR gives you some structure to start with, and uses the Groovy client underneath.

  • Thanks you Pablo, but I did not understand very well. I made this changes in the .bat file. And I tested executing directly that command (java -cp...), but the error persisted.
    The rest of the text I really not understand. If you can explain in another form, I am thankfull - and sorry if I am in "noob mode":)
  • I added the linux files for openEHR-OPT, should be the same for loadEHR check https://github.com/ppazos/openEHR-OPT/commit/656765df13fa490978059b8e239bc3638f68528e

    The rest I was just explaining how loadEHR works, is better if you can check the source code and follow my explanation.
  • Hi Pablo, once again I tested it - executing the file test.sh, but not worked. Instead, displayed "Error: Could not find or load main class groovy.util.GroovyTestSuite"
    I got read more about this kind of error. And I have some questions:
    1 - I neet to compile this first? - I said before and repeat, I am new in Java and OOP;
    2 - I tried to compile Main.groovy in openEHR-OPT-master/src/com/cabolabs/openehr/opt and not worked. Instead, returned "error: Class names, 'Main.groovy', are only accepted if annotation processing is explicitly requested
    1 error".

    One more time, thank you!

  • The process should be build, jargen, opt/test

    In the test, the classpath to the test libraries is specified, that path depends on the Groovy version that you have and needs to be updated accordingly with the right path and JAR filenames (that contains the version).
  • Hi Pablo, thanks for all support. This problems above were solved :)
    But new problems has been born :(
    The loadEHR create the EHRs. But when he goes to committ, went an error. In the loadEHR shows:
    Bad Request
    [status:-1, message:groovyx.net.http.HttpResponseException: Bad Request]
    class groovyx.net.http.HttpResponseException
    and
    Internal Server Error
    groovyx.net.http.HttpResponseException: Internal Server Error
    class groovyx.net.http.HttpResponseException

    Into the EHRServer shows:
    Error 2018-05-04 22:47:15,921 [http-bio-8090-exec-4] ERROR errors.GrailsExceptionResolver  - HibernateException occurred when processing request: [POST] /ehr/api/v1/ehrs/45e496ce-bde1-408b-a722-c09b4bbc7a30/compositions - parameters:
    auditSystemId: CABOLABS-LOADEHR
    format: xml
    auditCommitter: Karney Minihane
    reassociated object has dirty collection. Stacktrace follows:
    Message: reassociated object has dirty collection
        Line | Method
    ->>  510 | commit    in com.cabolabs.ehrserver.api.RestController
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    |    198 | doFilter  in grails.plugin.cache.web.filter.PageFragmentCachingFilter
    |     63 | doFilter  in grails.plugin.cache.web.filter.AbstractFilter
    |     53 | doFilter  in grails.plugin.springsecurity.web.filter.GrailsAnonymousAuthenticationFilter
    |     62 | doFilter  in grails.plugin.springsecurity.web.authentication.logout.MutableLogoutFilter
    |     82 | doFilter  in com.brandseye.cors.CorsFilter
    |   1149 | runWorker in java.util.concurrent.ThreadPoolExecutor
    |    624 | run       in java.util.concurrent.ThreadPoolExecutor$Worker
    ^    748 | run . . . in java.lang.Thread

    Before I buzz you, I searched on the web, but I not finded anything similar.
    And one more time, thank you for the help!
  • Hi Jorge, I improved the Groovy client and the LoadEHR to show more detailed feedback and fixed some errors.

    Just in case, try to validate the XML committed with the version.xsd provided in the EHRServer repo and update the EHRServer code to the latest master.
Sign In or Register to comment.