Abstract:
Level 5 referral hospitals in Kenya hold large volumes of digitised patient information on local servers, yet clinicians still depend on keyword search and manual navigation to locate it. Retrieval-Augmented Generation (RAG) offers a semantic alternative, but prevailing cloud-hosted implementations conflict with the data-localisation obligations of the Kenya Data Protection Act, 2019 and with the intermittent connectivity typical of county facilities. This article reports the first objective of a larger design science study: the design of an On-Premises RAG architecture for electronic health records retrieval in Level 5 hospitals in Nyeri
County, Kenya. Design requirements were elicited through structured questionnaires administered to a purposive sample of thirteen healthcare administrators, information technology personnel, and clinical staff at two Level 5 hospitals, and analysed using descriptive statistics and non-parametric group comparisons. Respondents strongly agreed that record fragmentation impedes retrieval (Md = 5, IQR = 1) and that trust in an artificial intelligence tool would be greater if data
remained on hospital servers (Md = 5, IQR = 0), while disagreeing that existing keyword search is sufficient (Md = 2, IQR = 1); perceptions did not differ significantly by facility or cadre. These requirements were translated into a five-layer architecture — ingestion and indexing, vector storage, local inference, orchestration, and presentation — specified in the C4 notation and bounded entirely within the hospital trust boundary. The study concludes that privacy in clinical artificial intelligence can be realised as an architectural property rather than a procedural undertaking.