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.

Composition generation

1. Is that right step by step instruction to upload composition to ehrserver:
a. create ehr with POST /ehrs;
b. create opt with designer;
c. create xml instance with openEHR-OPT-master;
d. create composition (json/xml) from xml instance with ehrcommiter;
e. POST /ehrs/$ehrUid/compositions ?

2. Is it a must to make xml instance with openEHR-OPT?
3. Is it a command line tool for creating compositions from operational template(.opt) direct without xml instance? if not, is it cmd line tool for xml instance to composition?

4. I've tried my template (in attachment) to make xml instance, but I got errors (attached). Any ideas? how could we add russian lang and 431 to dictionary/terminology?
code for ru and 431 is not defined in the openEHR terminology
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 1

P.S. I've attached opt.sh for linux. found windows opt.bat version only

Files: https://nofile.io/f/Qz1SwrjedsH/opt.zip

Comments

  • Hi Valentine,

    The steps are correct, just some context info:

    + An EHR should exist to be able to commit clinical documents (compositions).
    + EHRs can be created from the REST API or the Web Console.
    + openEHR-OPT is just a toolbox to help testing, you can program your own app that generates clinical documents based on openEHR Operational Templates. Since that takes a while and with one command line the openEHR-OPT can generate valid instances with random data, it is a good tool help on the learning process. My goal is to make it available in SaaS soon.
    + EHRCommitter is another test tool that simulates an EMR, has a UI, form generator from OPT and commit to the EHRServer. Right now it generates XML compositions not JSON ones.
    + openEHR-OPT is a command line tool and doesn't have integrations, like commit, to the EHRServer, it just works with OPTs.
    + You can just copy one of the terminology files and rename it to have the "ru" suffix to have it working https://github.com/ppazos/openEHR-OPT/tree/master/resources/terminology at some point in the future you can do the actual translation, the contribution will be very welcome!

    Please send a PR with the .sh to the project so I can add it to the base code.

    Thanks!
  • thanks for the answer, Pablo!

    I've added new openehr_terminology_ru.xml (copied from en and changed the language )

    Added new parseTerms:
    ./src/com/cabolabs/openehr/opt/instance_generator/XmlInstanceGeneratorForCommitter.groovy: terminology.parseTerms(new File("resources"+ PS +"terminology"+ PS +"openehr_terminology_ru.xml"))
    ./src/com/cabolabs/openehr/opt/instance_generator/XmlInstanceGenerator.groovy: terminology.parseTerms(new File("resources"+ PS +"terminology"+ PS +"openehr_terminology_ru.xml"))
    ./src/com/cabolabs/openehr/opt/instance_generator/XmlInstanceGeneratorTagged.groovy: terminology.parseTerms(new File("resources"+ PS +"terminology"+ PS +"openehr_terminology_ru.xml"))

    ..and got the same error:
    $ ./opt.sh ingen ../openEHR-EHR-COMPOSITION.t_diagnosis_list.opt . 1
    code for ru and 431 is not defined in the openEHR terminology
  • Gotcha, the issue is I'm not loading those files dynamically, check the constructor https://github.com/ppazos/openEHR-OPT/blob/master/src/com/cabolabs/openehr/opt/instance_generator/XmlInstanceGenerator.groovy

    I need to update that to grab all the files in the terminology folder.
  • By the way, if you change the code, you need to build and generate the jar for it to work from the command line.
  • >
    By the way, if you change the code, you need to build and generate the jar for it to work from the command line.

    how do you rebuild openEHR_OPT.jar ?
  • check the .bats on the project root: 1. build, 2. jargen, 3. opt with the command (ingen, uigen, inval, ...) optionally you can run the tests and even write your own.
  • vigvig
    edited October 2017
    done. thanks!

    after rebuilding generation the warning 'code for ru and 431 is not defined in the openEHR terminology' disappear.

    P.S. here is linux scripts https://gist.github.com/vig/235df09adb8f24c328d399d20f3af51b
  • can you send a pull request to the repo with the shell scripts to include them into the code? thanks!
  • ok, when I figure out how to do PR :)
  • You need to fork the repo, then https://help.github.com/articles/creating-a-pull-request-from-a-fork/

    This will allow you to contribute other things in the future :)
Sign In or Register to comment.