This topic / page is to guide the development of an importer for BC CA but may also guide importer development more generally.

Modules or stages

  1. (Fetcher / downloader - this can be skipped for version 0.1)
  2. Importer (35% of development work?)
    • appends rows (one HL7 ORU message per row) to clin.incoming_data_unmatched (.data column)
    • writes a comment in .comment if a non-fatal semantic flaw was encountered in the message
    • performs ImporterLogging
  3. Column updater (10% of development work?)
    • updates other columns, based on the HL7 contained in the .data column
  4. Match tester (10% of development work?)
    • evaluates rows as to patient identifiability and – where patients do not yet exist – the appropriateness of creating them
  5. Result writer (45% of development work?)
    • resolves green-lit (adequately-matched) data in into a variety of tables in GNUmed
      • auto-create test_orgs and test_types where necessary
      • auto-create patients where necessary
      • import the patient's results, deprecating any pre-existing results as required
    • tags successfully-processed clin.incoming_data_unmatched records for deletion
  6. Testing (x% of the development work, but may have been done along the way)

Separately, while there will afterward need to be a GNUmed widget that will allow / assist dealing with unmatched rows in clin.incoming_data_unmatched, getting the above done as a "first step" will be hugely helpful.


  1. you will need a suitable postgres installed and configured, see Server install
    1. the current production database schema is v15
    2. the bootstrapper will bring you up to v15
    3. the git repository (see below) will contain a v15 to v16 updater, v16 being current development
    4. on gaining Karsten's agreement on table / column changes, he can roll them into the v15 --> v16 updater
  2. install the GNUmed client for the OS on which you would do development, since this may help assure you have the needed dependencies
    • you might like run the GNUmed client, in order to get a sense of possible end results, from /.../master/gnumed/gnumed/client/
  3. from a suitable directory (into which to clone a copy of the git source code)
    • do something like
      sudo /usr/local/git/bin/git clone git://
    • likewise sudo /usr/local/git/bin/git clone git:// or
      sudo /usr/local/git/bin/git clone
  4. you should then be able to
Topic revision: 07 Nov 2011, JamesBusser
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback
Powered by Olark