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 | |
| 21 | Each 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 | |
| 23 | For 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 | |
| 25 | This 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 | |
| 27 | Example 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 | |
| 46 | In the above configuration, we have excluded `hrm_human_resource` component of `hms_hospital` and `pr_group_membership` component of `pr_group` |