How to handle dynamic CSV-files with (future) Enketo

We are using ODK Collect and Central for a clinical application. Tablet works fine, with the exception that tables are missing. Data entry where an overview is important, such as O2/Blood Pressure time series during anesthesia; are in a repeat block which requires paging. A table would be preferred, and Enketo has it. I have tested Enketo 0.9 today, it would be ok, with the exception of the huge wasted empty space in page layout - hopefully I can customize some CSS

The workflow is as follows:

  • One patient at a time is assigned to a room and a tablet. The clinical system creates a exchange file with patient data and stores it in a directory named after the room.
  • In the XLS Form, we use pulldata to retrieve the patient data (name, DOB, Quick-Value). Initially, the file patient.csv has one dummy patient in it.
  • The directory where the clinical system stores the patient data is monitored by a Python-program. On changes, the file is formatted to CSV and uploaded to all projects on the tablet via SSHelper in subdirectories of /sdcard/android/data/

This is not very elegant and needs some tricky precautions, e.g. when the tablet is not available, but works reasonably.

Assume we want to use Enketo for some forms requiring a table layout: How could I handle such dynamic CSV files? Note that each browser has its own patient.csv or alternative.

Ok, that was too long, nobody read it:

Short: How do I change a media file programmatically with Enketo without user intervention? In ODK Collect, I can copy the CSV to the Android Device, and in more recent versions the SQLite is automatically updated.