25 | | === 3. Adding referral form template info for referral form generation === |
26 | | |
27 | | The referral form generation uses template PDF files for creating the forms. A template contains all information except SCAN-B ID text and barcodes, which are added, when the complete form is generated. In order for the patient curator to be able to replace templates with new versions, the template files are placed in the BASE file system. Also, in order to support variations in the text and layout of templates for different sites (other than the SCAN-B text and barcodes), templates for different sites are placed in separate sub-directories: |
28 | | * The template top directory is `/home/SCANB/ReferralFormTemplatesInUse/`. |
29 | | * Each site has a sub-directory named after the site's SCAN-B prefix. e.g. `/home/SCANB/ReferralFormTemplatesInUse/88/` for Uppsala with prefix "`88`". |
30 | | |
31 | | The application identifies a template's type based on the start of its filename: |
32 | | * For a template file to be used, the filename must begin with a string defined for its referral form type in `reggie-config.xml`, tag `referral-form-generation`, sub-tag `template-filename-start`. |
33 | | * A start string should be unique and not be a sub-string of another start string. |
34 | | * A start string should not include version information, and normally not site-specific information. |
35 | | * A form template filename, however, is recommended to contain version information in part of the filename following the start string, since the complete filenames of used templates for a referral form generation session are included in an entry in the referral form generation log file. |
36 | | * When generating referral forms for a site, the application looks for templates of all type of forms. If no template file with a valid filename is found for a specific form type and site, that form type is skipped in the output. |
37 | | |
38 | | === 3.1. Update `reggie-config.xml` with start of referral form template filenames for different form types === |
39 | | |
40 | | In `reggie-config.xml`, tag `referral-form-generation`, sub-tag `template-filename-start`, add start of template filenames for the following tags: |
41 | | |
42 | | || '''Form type XML Tag''' || '''Example of start of template filenames''' || |
43 | | || `<patient-info>` || `Patinfo` || |
44 | | || `<clinical-chemistry-biopsy>` || `KlinKemBiopsy-SCAN-B-remiss` || |
45 | | || `<clinical-chemistry-blood>` || `KlinKem-SCAN-B-blood-biobanken_remiss` || |
46 | | || `<clinical-chemistry-blood-lundcopy>` || `KlinKem-SCAN-B-blood-biobanken-lundkopia_remiss` || |
47 | | || `<clinical-chemistry-bcblood>` || `KlinKem-SCAN-B-bcblood-remiss` || |
48 | | || `<middle-needle-biopsy>` || `PathBiopsy-SCAN-B-remiss` || |
49 | | || `<clinical-chemistry>` || `Klinkem-SCAN-B-remiss` || |
50 | | || `<clinical-pathology>` || `Path-SCAN-B-remiss` || |
51 | | || `<consent-report>` || `Consent-SCAN-B-remiss` || |
52 | | |
53 | | As an example, the patient info form template may have the full filename "`Patinfo_3_0_120109_SCAN-B.pdf`", and the clinical pathology form template the full filename "`Path-SCAN-B-remiss_v7.pdf`". |
54 | | |
55 | | === 3.2. Copy referral form template files to use to sub-directory for each site === |
56 | | For all form types supported for a site, copy the corresponding form template PDF file to the sub-directory for the site. For the first release, the following table may be of help: |
57 | | |
58 | | || '''Form type XML''' || '''Supported by site[s]''' || |
59 | | || patient-info || All || |
60 | | || clinical-chemistry-biopsy || All || |
61 | | || clinical-chemistry-blood || Uppsala (88) only || |
62 | | || clinical-chemistry-blood-lundcopy || Uppsala (88) only || |
63 | | || clinical-chemistry-bcblood || Lund (11) only || |
64 | | || middle-needle-biopsy || All || |
65 | | || clinical-chemistry || All except Uppsala (88) || |
66 | | || clinical-pathology || All || |
67 | | || consent-report || All || |