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.
Hello Pablo!
I run both EHRServer and EHRCommitter on one server.
IP address in EHRCommitter/grails-app/conf/Config.groovy(development) configured to EHRServer.
1. To generate document/composition from operational template and use it on EHRCommitter Do I need:
a. to generate instance of template (opt) with openEHR-OPT;
b. put in EHRCommitter/sample_instances directory ?
2. The second question why can't I commit composition from EHRCommitter?
a. I choose template instance
http://prntscr.com/gtxpfzb. I choose Simple_Vaccination_Record_20170211035229_1 and fill form
http://prntscr.com/gtxqjmc. it fails to commit (
https://codepaste.net/zn2fv6,
https://gist.github.com/anonymous/7af368e5e5dbb36a8159bf8c56d4066a)
3. I generate instance of sample template Vital Signs (../cabolabs-ehrserver-master/opts/base_opts/Vital_Signs_Summary.EN.v1.opt) with openEHR-OPT and put sample_instances, then commit to EHRServer
but got message in EHRserver UI:
'The OPT Vital Signs referenced by the composition a7c043c1-82ad-44e8-a9c4-f5ceb28183a3 is not loaded. Please load the OPT to allow data indexing. '
Thanks in advance,
Valentine
Comments
There might be something not generated correctly on the file.
You can test committing that directly using Insomnia REST Client using the POST /ehrs/$uid/compositions request importing this in Insomnia https://github.com/ppazos/cabolabs-ehrserver/blob/master/api/EHRServer_v1.1_insomnia_5.4.json
https://gist.github.com/anonymous/3214d368c1beb68f3be05d7a92d0e4a1
P.S. opt is uploaded to EHRServer with UI
< category >
< value / > this cant be empty
You can use this XSD to check the generated XML is correct https://github.com/ppazos/cabolabs-ehrserver/blob/master/xsd/Version.xsd
The issue might be related to the russian terminology usage on the openEHR-OPT ingen.
Did you validated that XML against the schema?
--- 1 ---
ok did it with
./opt.sh ingen ../openEHR-EHR-COMPOSITION.common_examination.opt . 1 version_committer
This is what was generated: https://gist.github.com/vig/90de5fbbb39589b1b25bd43f9af75872 and it's not valid
< time_committed >
< value >[[TIME_COMMITTED:::DATETIME:::NOW]]< /value >
(DATETIME Iso8601DateTime error)
so I cant commit it in EHRCommiter http://prntscr.com/gwm2v1
--- 2 ---
When I'm trying to POST my composition (https://gist.github.com/vig/974288064458c4b8b67351c1c0459594 , same as from 9th October above)
curl -H 'Authorization: Bearer ...' -d @openEHR-EHR-COMPOSITION.common_examination.v1_20171009114038_1.xml -X POST 'http://192.168.158.124:8090/ehr/api/v1/ehrs/11111111-1111-1111-1111-111111111111/compositions?format=xml'
i/m getting mysql error com.mysql.jdbc.MysqlDataTruncationMessageData truncation: Data too long for column 'params_elt' at row 1
https://gist.github.com/vig/94d383feb7be8055d9ac3607ada28c80
--- 2 UPDATE a ---
I've done
alter table commit_params modify params_elt VARCHAR(20844);
so now I can see request in this column.
but I have error:
< result >
< type >AR< /type >
< message >rest.error.auditSystemId_required</ message >
EHR_SERVER::API::RESPONSE_CODES::400< /code >
< /result >
--- 2 UPDATE b ---
I've added ?&auditSystemId=popo&auditCommitter=pepe to POST 'http://192.168.158.124:8090/ehr/api/v1/ehrs/11111111-1111-1111-1111-111111111111/compositions?&auditSystemId=popo&auditCommitter=pepe
< result >
< type >AR< /type >
< message >No data was received, the request is empty</ message >
EHR_SERVER::API::RESPONSE_CODES::4012< /code >
< /result >
thanks in advance,
Valentine.
I've added header 'Content-type: application/xml' to curl
I now i've got 402.1 error
< message >versions should have one or more items and has none< /message >
< code >EHR_SERVER::API::RESPONSE_CODES::402.1< /code >
P.S. generated composition https://gist.github.com/vig/90de5fbbb39589b1b25bd43f9af75872
Инфо._о_листе_нетрудоспособности.
That makes Grails generate a structured parameter as a Map, but the EHRCommitter is waiting a String. The solution is to remove the periods on openEHR-OPT ingen. I have updated the code, please pull the changes from the master branch of openEHR-OPT and try ingen again, the keys should not contain "."
By the way, you can't validate something generated using version_committer or tagged options, since those will contain placeholder tags instead of valid data, so it won't validate against the schema. What should validate are XMLs generated using the version or composition options for ingen.