Создание итогов и промежуточных итогов столбцов и строк в пользовательских формах для DHIS2 с использованием кода - PullRequest
0 голосов
/ 21 октября 2019

Я новичок во всем этом, и это мой первый пост. Я использую конструктор форм в DHIS2 и использую конструктор пользовательских форм для проектирования форм сбора данных. Я ищу способ выполнения итоговых строк, итогов столбцов и промежуточных итогов столбцов с использованием кода. Ниже приведен пример кода от дизайнера:

<table style="border-collapse:collapse; width:648pt; border:undefined" width="867">
<colgroup>
    <col span="5" style="width: 30pt; text-align: center;" width="40" />
    <col style="width: 38pt; text-align: center;" width="51" />
    <col span="2" style="width: 30pt; text-align: center;" width="40" />
    <col style="width: 35pt; text-align: center;" width="47" />
    <col span="2" style="width: 30pt; text-align: center;" width="40" />
    <col span="4" style="width: 35pt; text-align: center;" width="47" />
    <col style="width: 30pt; text-align: center;" width="40" />
    <col span="3" style="width: 35pt; text-align: center;" width="47" />
    <col style="width: 30pt; text-align: center;" width="40" />
</colgroup>
<tbody>
    <tr height="19" style="height:14.45pt">
        <td class="xl66" height="19" style="height: 14.45pt; width: 30pt; text-align: center; background-color: rgb(32, 55, 100);" width="40">&nbsp;</td>
        <td class="xl67" colspan="13" style="width: 418pt; text-align: center; background-color: rgb(32, 55, 100);" width="559"><span style="color:#ffffff;"><strong><span style="font-size:14px;">Services Provided</span></strong></span></td>
        <td class="xl68" colspan="2" style="width: 65pt; text-align: center; background-color: rgb(32, 55, 100);" width="87"><span style="color:#ffffff;"><strong><span style="font-size:14px;">Male</span></strong></span></td>
        <td class="xl68" colspan="2" style="width: 70pt; text-align: center; background-color: rgb(32, 55, 100);" width="94"><span style="color:#ffffff;"><strong><span style="font-size:14px;">Female</span></strong></span></td>
        <td class="xl68" colspan="2" style="width: 65pt; text-align: center; background-color: rgb(32, 55, 100);" width="87"><span style="color:#ffffff;"><strong><span style="font-size:14px;">Total</span></strong></span></td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Routine radiography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-G7w2A8NoPpZ-val" name="entryfield" title="Radiological services provided Routine radiography, Male" value="[ Radiological services provided Routine radiography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-JZXqxZVU3Tq-val" name="entryfield" title="Radiological services provided Routine radiography, Female" value="[ Radiological services provided Routine radiography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Sialography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-POUQiohZxjW-val" name="entryfield" title="Radiological services provided Sialography, Male" value="[ Radiological services provided Sialography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-WAQch6zWamp-val" name="entryfield" title="Radiological services provided Sialography, Female" value="[ Radiological services provided Sialography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Barium swallow</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-D0r9IHPIOp0-val" name="entryfield" title="Radiological services provided Barium swallow, Male" value="[ Radiological services provided Barium swallow, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-FKstemFPzIJ-val" name="entryfield" title="Radiological services provided Barium swallow, Female" value="[ Radiological services provided Barium swallow, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Barium meal/follow through</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-XGfcQLECbKv-val" name="entryfield" title="Radiological services provided Barium meal/follow through, Male" value="[ Radiological services provided Barium meal/follow through, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-iWskwdMRQ6r-val" name="entryfield" title="Radiological services provided Barium meal/follow through, Female" value="[ Radiological services provided Barium meal/follow through, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Barium enema</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-QdKcETwiD1Z-val" name="entryfield" title="Radiological services provided Barium enema, Male" value="[ Radiological services provided Barium enema, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-veqMHRqrMcM-val" name="entryfield" title="Radiological services provided Barium enema, Female" value="[ Radiological services provided Barium enema, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Intravenous urography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-aCG3YeRhzli-val" name="entryfield" title="Radiological services provided Intravenous urography, Male" value="[ Radiological services provided Intravenous urography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-OOfZLa44dXa-val" name="entryfield" title="Radiological services provided Intravenous urography, Female" value="[ Radiological services provided Intravenous urography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Micturating cystourethrography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-bERk6xgjmzm-val" name="entryfield" title="Radiological services provided Micturating cystourethrography, Male" value="[ Radiological services provided Micturating cystourethrography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-ITQuSY2Zewx-val" name="entryfield" title="Radiological services provided Micturating cystourethrography, Female" value="[ Radiological services provided Micturating cystourethrography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Retrograde uretocystography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-HJFAetvAjd5-val" name="entryfield" title="Radiological services provided Retrograde uretocystography, Male" value="[ Radiological services provided Retrograde uretocystography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-CpWMHJQe5yQ-val" name="entryfield" title="Radiological services provided Retrograde uretocystography, Female" value="[ Radiological services provided Retrograde uretocystography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Hysterosalpingography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input disabled="disabled" id="t9vDcZyyATG-xd1zBhnxG0I-val" name="entryfield" title="Radiological services provided Hysterosalpingography, Male" value="[ Radiological services provided Hysterosalpingography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-ppAyRqKxet7-val" name="entryfield" title="Radiological services provided Hysterosalpingography, Female" value="[ Radiological services provided Hysterosalpingography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Orthopantomography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-XGLsMyi47aX-val" name="entryfield" title="Radiological services provided Orthopantomography, Male" value="[ Radiological services provided Orthopantomography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-pZBl1NUVpYf-val" name="entryfield" title="Radiological services provided Orthopantomography, Female" value="[ Radiological services provided Orthopantomography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Ultrasound services</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-rd9KwhS9fOy-val" name="entryfield" title="Radiological services provided Ultrasound services, Male" value="[ Radiological services provided Ultrasound services, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-RwjCbvJtpvH-val" name="entryfield" title="Radiological services provided Ultrasound services, Female" value="[ Radiological services provided Ultrasound services, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Echocardiography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-X5LjtqbSPfA-val" name="entryfield" title="Radiological services provided Echocardiography, Male" value="[ Radiological services provided Echocardiography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-A2tulzFVk4x-val" name="entryfield" title="Radiological services provided Echocardiography, Female" value="[ Radiological services provided Echocardiography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Mammography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input disabled="disabled" id="t9vDcZyyATG-F4iMH9U5Ha1-val" name="entryfield" title="Radiological services provided Mammography, Male" value="[ Radiological services provided Mammography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-XkbjgbjJruT-val" name="entryfield" title="Radiological services provided Mammography, Female" value="[ Radiological services provided Mammography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Ductography</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-vKjzBrjEG4o-val" name="entryfield" title="Radiological services provided Ductography, Male" value="[ Radiological services provided Ductography, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-RPxlQAtILr3-val" name="entryfield" title="Radiological services provided Ductography, Female" value="[ Radiological services provided Ductography, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Computed Tomography (CT) without contrast</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-dnz7MhA0tLm-val" name="entryfield" title="Radiological services provided Computed Tomography (CT) without contrast, Male" value="[ Radiological services provided Computed Tomography (CT) without contrast, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-vKGTqRjVF6q-val" name="entryfield" title="Radiological services provided Computed Tomography (CT) without contrast, Female" value="[ Radiological services provided Computed Tomography (CT) without contrast, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Computed Tomography (CT) with contrast</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-gpvi0P3ecEk-val" name="entryfield" title="Radiological services provided Computed Tomography (CT) with contrast, Male" value="[ Radiological services provided Computed Tomography (CT) with contrast, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-TgPyqW0foyU-val" name="entryfield" title="Radiological services provided Computed Tomography (CT) with contrast, Female" value="[ Radiological services provided Computed Tomography (CT) with contrast, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Magnetic Resonance Imaging (MRI) without contrast</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-Jyofro59BHR-val" name="entryfield" title="Radiological services provided Magnetic Resonance Imaging (MRI) without contrast, Male" value="[ Radiological services provided Magnetic Resonance Imaging (MRI) without contrast, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-YOAth0cGRE1-val" name="entryfield" title="Radiological services provided Magnetic Resonance Imaging (MRI) without contrast, Female" value="[ Radiological services provided Magnetic Resonance Imaging (MRI) without contrast, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="19" style="height:14.45pt">
        <td class="xl69" height="19" style="height: 14.45pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="13" style="width: 418pt;" width="559"><span style="font-size:14px;">Magnetic Resonance Imaging (MRI) with contrast</span></td>
        <td class="xl70" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="t9vDcZyyATG-eStApPKwib4-val" name="entryfield" title="Radiological services provided Magnetic Resonance Imaging (MRI) with contrast, Male" value="[ Radiological services provided Magnetic Resonance Imaging (MRI) with contrast, Male ]" /></td>
        <td class="xl70" colspan="2" style="width: 70pt; text-align: center;" width="94"><input id="t9vDcZyyATG-HTrTvGwDNjp-val" name="entryfield" title="Radiological services provided Magnetic Resonance Imaging (MRI) with contrast, Female" value="[ Radiological services provided Magnetic Resonance Imaging (MRI) with contrast, Female ]" /></td>
        <td class="xl69" colspan="2" style="width: 65pt; text-align: center;" width="87">&nbsp;</td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="xl69" height="20" style="height: 15pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="17" style="width: 553pt;" width="740"><span style="font-size:14px;">Duration of service interruption due to equipment downtime (in hours)</span></td>
        <td class="xl71" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="NGfAYzCFw6X-pug8IMd3mmZ-val" name="entryfield" title="Duration of service interruption due to equipment downtime (in hours) Radiology" value="[ Duration of service interruption due to equipment downtime (in hours) Radiology ]" /></td>
    </tr>
    <tr height="20" style="height:15.0pt">
        <td class="xl69" height="20" style="height: 15pt; width: 30pt; text-align: center;" width="40">&nbsp;</td>
        <td class="xl70" colspan="17" style="width: 553pt;" width="740"><span style="font-size:14px;">Duration of service interruption due to stock out of consumables (in hours)</span></td>
        <td class="xl71" colspan="2" style="width: 65pt; text-align: center;" width="87"><input id="fJtworjMSKY-pug8IMd3mmZ-val" name="entryfield" title="Duration of service interruption due to reagent/consumables stock out (in hours) Radiology" value="[ Duration of service interruption due to reagent/consumables stock out (in hours) Radiology ]" /></td>
    </tr>
</tbody>

Буду признателен за любую помощь в этом.

Спасибо

...