Resumo:
Apache Cassandra’s scalability makes it an attractive option for healthcare ecosystems;
however, its primary key-restricted query model hinders flexibility with FHIR-defined search
operations, such as range queries, wildcard text searches, and the combination of multiple
attributes. To overcome this fundamental limitation, this work presents and validates
CLiF-Arch (Cassandra Lucene-indexed FHIR Architecture), a database architecture that
enables advanced queries directly within Cassandra. The architecture implements a custom
secondary index that integrates the HAPI FHIR library for semantic analysis of resources
with the Apache Lucene search engine for parameter indexing. Experiments with 10
million records demonstrated that CLiF-Arch supports FHIR-required searches directly via
CQL. This flexibility, however, comes at a performance cost: the synchronous analysis and
indexing process increased the average insertion latency from approximately 1 ms to the 3-4
ms range. The results demonstrate that CLiF-Arch is a functional solution that establishes
an explicit compromise between write latency and query flexibility—an indispensable
requirement for adopting Cassandra in environments that demand full compliance with
the FHIR standard.