Closed ppazos closed 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.
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.
DataValueIndex now has both, the archetype path (used for querying) and the template path (used for indexing).
This happened after OPT support was added, might have something to do with OPTs and paths.