Changes between Version 4 and Version 5 of BluePrint/OCRIntegration


Ignore:
Timestamp:
08/21/11 10:29:03 (10 years ago)
Author:
Shiv Deepak
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/OCRIntegration

    v4 v5  
    11== Sahana Eden OCR Integration ==
    22
    3 This module consists of two phases:
    4 1. Download a OCR-able PDF Form.
    5 2. Upload a Scanned Form for OCR.
     3The Optical Character Recognition Software of Sahana Eden has some additional dependencies as well as can be configured according to the needs.
    64
     5If OCR module is not enabled, it can be enabled by un-commenting the ocr block in `models/000_config.py` in `eden` directory.
    76
    87== Dependecies ==
     
    16155. Tesseract 3.00-1
    1716
    18 == Data Import Workflow ==
    19 [[Image(http://eden.sahanafoundation.org/raw-attachment/wiki/BluePrint/OCRIntegration/importflow.png)]]
     17== Configuration ==
     18
     19'''Exclude Component Tables'''
     20
     21Each Resource table in Sahana Eden can have several component tables. Many a times when generating paper based PDF Form for including some components makes a little sense.
     22
     23For example, for hospital registry Form, if the staff component table is included then it makes very little sense because no one would like to add single staff to a hospital and therefore he/she would like to exclude that component and have the Form associated to component table separately.
     24
     25This exclusion of component table for Resource can be done inside method `get_pdf_excluded_fields` which is present in `modules/s3/s3cfg.py`, so before generating a PDF Form s3pdf.py reads this configuration.
     26
     27Example Configuration:
     28
     29{{{
     30    def get_pdf_excluded_fields(self, resourcename):
     31        excluded_fields_dict = {
     32            "hms_hospital" : [
     33                "hrm_human_resource",
     34                ],
     35
     36            "pr_group" : [
     37                "pr_group_membership",
     38                ],
     39            }
     40        excluded_fields =\
     41                excluded_fields_dict.get(resourcename, [])
     42
     43        return excluded_fields
     44}}}
     45
     46In the above configuration, we have excluded `hrm_human_resource` component of `hms_hospital` and `pr_group_membership` component of `pr_group`