ppazos / cabolabs-ehrserver

Open platform to manage and share standardized clinical data, designed by @ppazos at CaboLabs Health Informatics.
https://cabolabs.com
Apache License 2.0
181 stars 110 forks source link

DataValueIndex table is empty after intexing #48

Closed ppazos closed 10 years ago

ppazos commented 10 years ago

This happened after OPT support was added, might have something to do with OPTs and paths.

ppazos commented 10 years ago

The problem is on IndexDataJob line 119

´´´ def dataidx = ehr.clinical_documents.DataIndex.findByArchetypeIdAndPath(archetypeId, idxpath) ´´´

Because archetypeId is null right now.

  1. verify that the archetypeId is set
  2. try do the query by templateId and path
ppazos commented 10 years ago

The problem is the path is created as: /content[at0000]/data[at0001]/events[at0002]/data[at0003]/items[at0004] in OperationalTemplateIndexer

Instead of /content[archetype_id=openEHR-EHR-OBSERVATION.height.v1]/data[at0001]/events[at0002]/data[at0003]/items[at0004] as the template path is.

ppazos commented 10 years ago

DataValueIndex now has both, the archetype path (used for querying) and the template path (used for indexing).