OpenMRS Implementers' Guide

Appendix B: Example HTML Form Source

<htmlform>
        <!-- Autogenerated example form  (template from 01-Nov-2010 -->
  <macros>
                paperFormId = (Fill this in)
                headerColor =#009d8e
                fontOnHeaderColor = white
  </macros>

  <style>
                .section {
                        border: 1px solid $headerColor;
                        padding: 2px;
                        text-align: left;
                        margin-bottom: 1em;
                }
                .sectionHeader {
                        background-color: $headerColor;
                        color: $fontOnHeaderColor;
                        display: block;
                        padding: 2px;
                        font-weight: bold;
                }
                table.baseline-aligned td {
                        vertical-align: baseline;
                }
  </style>

  <span style="float:right">Paper Form ID: $paperFormId</span>
  <h2>Amani Antenatal History (v1.0)</h2>

  <section headerLabel="1. Encounter Details">
    <table class="baseline-aligned">
      <tr>
        <td>Date:</td>
        <td>
          <encounterDate default="today"/>
        </td>
      </tr>
      <tr>
        <td>Location:</td>
        <td>
          <encounterLocation/>
        </td>
      </tr>
      <tr>
        <td>Provider:</td>
        <td>
          <encounterProvider/>
        </td>
      </tr>
      <tr>
        <td>Patient Name:</td>
        <td>
          <lookup class="value" expression="patient.personName"/>
        </td>
      </tr>
    </table>
  </section>

  <section headerLabel="2. Antenatal History">
    <table border="1" cellspacing="0" class="baseline-aligned">
      <tr>
        <td>
          <table border="1" cellspacing="0">
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Reason For Visit:</b>
                    </td>

                    <td>
                      <obs conceptId="1433" style="radio" answerConceptIds="1435,1434,5622" answerLabels="Planning Pregnancy&lt;br \/ &gt;, Currently Pregnant&lt;br \/ &gt;, Other"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Antenatal Visits #:</b>
                    </td>

                    <td>
                      <obs conceptId="1425"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>If Pregnant, was
                        <br />pregnancy intended?</b>
                    </td>

                    <td>
                      <obs conceptId="1426" style="radio" answerConceptIds="1065,1066,1067" answerLabels="Yes&lt;br \/ &gt;, No&lt;br \/ &gt;, Unknown"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Last Menstrual Period:</b>
                    </td>

                    <td>
                      <obs conceptId="1427"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Date of Delivery:</b>
                    </td>

                    <td>
                      <obs conceptId="1596"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Blood Type:</b>
                    </td>

                    <td>
                      <obs conceptId="1426" style="radio" answerConceptIds="152674, 152675, 152676, 152677, 152678,152679, 152680,152681" answerLabels="A+, A-&lt;br \/ &gt;, B+, B-&lt;br \/ &gt;, 0+, 0-&lt;br \/ &gt;,AB+, AB-&lt;br \/ &gt;"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </td>
        <td>
          <table border="1" cellspacing="0">
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>High-Risk Sex:</b>
                    </td>

                    <td>
                      <obs conceptId="1355" style="yes_no"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>HIV Test:</b>
                    </td>

                    <td>
                      <obs conceptId="1356" style="yes_no" dateLabel="&lt;br \/ &gt;Date:"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Partner's HIV Status:</b>
                    </td>

                    <td>
                      <obs conceptId="1436" style="radio" answerConceptIds="664,703,1067" answerLabels="Negative&lt;br \/ &gt;, Positive&lt;br \/ &gt;, Unknown"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>STI Treatment:</b>
                    </td>

                    <td>
                      <obs conceptId="1428"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>RPR/VDRL:</b>
                    </td>

                    <td>
                      <obs conceptId="299" style="radio" answerConceptIds="1228, 1229" answerLabels="Reactive&lt;br \/ &gt;, NR"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
            <tr>
              <td>
                <table>
                  <tr>
                    <td>
                      <b>Last Tetnus:</b>
                    </td>

                    <td>
                      <obs conceptId="1428"/>
                    </td>
                  </tr>
                </table>
              </td>
            </tr>
          </table>
        </td>
        <td>
          <table>
            <tr>
              <td>
                <b>Recent Contraceptive Use:</b>
                <br/>

                <obs conceptId="1635" answerConceptId="1107" answerLabel="None" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="780" answerLabel="Oral Contraception" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="190" answerLabel="Condoms" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="5277" answerLabel="Natural Planning / Rhythm" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="5278" answerLabel="Diaphragm" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="1378" answerLabel="Depo-Provera" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="1359" answerLabel="Norplant" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="1388" answerLabel="Surgery" style="checkbox"/>
                <br/>
                <obs conceptId="1635" answerConceptId="5622" answerLabel="Other" style="checkbox"/>
                <br/>

              </td>
            </tr>
          </table>
        </td>
        <td>
          <table>
            <tr>
              <td>
                <b>Previous Complications:</b>
                <br/>

                <obs conceptId="1430" answerConceptId="113859" answerLabel="Hypertension" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="1431" answerLabel="Low Birth Weight Baby" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="119481" answerLabel="Diabetes Mellitus" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="48" answerLabel="Miscarriage" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="1171" answerLabel="Cesarean Section" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="228" answerLabel="Antepartum Hemorrhage" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="230" answerLabel="Postpartum Hemorrhage" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="130" answerLabel="Puerperal Sepsis" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="113602" answerLabel="Prolonged Labor" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="127847" answerLabel="Recto-vaginal Fistula" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="49" answerLabel="Vesico-vaginal Fistula" style="checkbox"/>
                <br/>
                <obs conceptId="1430" answerConceptId="5622" answerLabel="Other" style="checkbox"/>
                <br/>
              </td>
            </tr>
          </table>
        </td>
      </tr>
    </table>
  </section>
  <submit/>
</htmlform>