Have you implemented OpenMRS? Please participate in the Implementation Site Survey. If you already have, thank you!
Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagexml
titleSample Report Template
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<reportTemplates>
    <dataElements>
        <dataElement code="ANC8146" uid="zajzl4FQFoI" name="ANC Insecticide Treated Bed nets distributed"/>
        <dataElement code="ANC8139" uid="Y5PjM4bF5rx" name="ANC 4th standard visit"/>
        <dataElement code="ANC8147" uid="pRqsvVsrDJV" name="ANC deworming performed"/>
        <dataElement code="ANC8137" uid="A2JDrKjR3nr" name="ANC First standard visit 1st trimester"/>
        <dataElement code="ANC8142" uid="Arr4LIIOlo4" name="ANC high risk pregnancies referred"/>
        <dataElement code="ANC8140" uid="FWuzAt99w1y"                      name="ANC high risk pregnancy detected_including pregnancy under 15 years"/>
        <dataElement code="ANC8153" uid="oSLpODeimyD" name="ANC HIV tested "/>
        <dataElement code="ANC8154" uid="z7BziiaCvq3" name="ANC HIV tested positive "/>
        <dataElement code="ANC8409" uid="LrqWgXVEIo5" name="ANC HIV tested who recieved their results"/>
        <dataElement code="ANC8136" uid="ri0XrmXSpEC" name="ANC New Registrations"/>
        <dataElement code="ANC8152" uid="jimOjhBpQlC" name="ANC new registrations anaemia Severe &lt;7gm /dl"/>
        <dataElement code="ANC8149" uid="D702xSW9bHo" name="ANC new registrations screened for malnutrition_MUAC"/>
        <dataElement code="ANC8150" uid="MTe1TWLuUAv"                      name="ANC new registrations screened who were malnourished_MUAC &lt; 21 cm"/>
        <dataElement code="ANC8151" uid="Y4xlw0XUzhR" name="ANC new registrations tested for anaemia"/>        
		<dataElement code="ANC8145" uid="viftAbwOnMH"                      name="ANC new registrations who received full course of Iron and Folic Acid supplements _90 tablets"/>
        <dataElement code="ANC8615" uid="IJClrFpibZP"                      name="ANC new registrations with anaemia Moderate 7 to 9.9 gm/dl"/>
        <dataElement code="ANC8138" uid="MRXI1XoFG1G" name="ANC standard visit during 9th month"/>
        <dataElement code="ANC8156" uid="FqDAfzXHRJo" name="ANC syphilis tested "/>
        <dataElement code="ANC8157" uid="A5HjXlj1bhf" name="ANC syphilis tested positive "/>
        <dataElement code="ANC8143" uid="THmwuhMFSm5" name="ANC TT 1given"/>
        <dataElement code="ANC8144" uid="Ea8PwlCJhtl" name="ANC TT 2 to 5 given"/>
        <dataElement code="ANC9078" uid="ytgZGZscGM3" name="ANC TT new registrations fully vaccinated"/>
        <dataElement code="ANC1" uid="nvVDDkfbbhf" name="ANC1"/>
        <dataElement code="ANC4" uid="OWeOBFxrvrv" name="ANC4"/>
        <dataElement code="ANC8141" uid="IuaAd6Quvp1" name="ANC pregnancy under 15 years"/>
        <dataElement code="PNC8208" uid="KGTnFcKWiMp"                      name="Low birth weight infants discharged from Kangaroo Mother care followed up at HC_baby"/>
        <dataElement code="PNC8205" uid="dEX7M3L2XT4" name="PNC complication referred_mother or infant"/>
        <dataElement code="PNC8206" uid="pGIpti2thOZ" name="PNC complication referred_mother or infant_Baby"/>
        <dataElement code="PNC8207" uid="J6AtcHTRPQt" name="PNC complication referred_mother or infant_Mother"/>
        <dataElement code="PNC8204" uid="x6yegTNkNjF" name="PNC mothers malnourished_MUAC &lt; 21 cm"/>
        <dataElement code="PNC8202" uid="PFJOGl2YIwj" name="PNC mothers recieved vitamin A "/>
        <dataElement code="PNC8203" uid="hBqhJXgWIZE"                      name="PNC new registration mothers MUAC screened for malnutrition "/>
        <dataElement code="PNC9112" uid="ZvM3oVLLjZf" name="PNC new registrations_Baby"/>
        <dataElement code="PNC9111" uid="A646Ehb1mVm" name="PNC new registrations_Mother"/>
        <dataElement code="PNC9098" uid="UvJbYove50G" name="PNC standard visit 1 within 3 days of birth_Baby"/>
        <dataElement code="PNC9106" uid="ppl1tmbPKwx" name="PNC standard visit 1 within 3 days of birth_Mother"/>
        <dataElement code="PNC9105" uid="hpIXHGIvszO" name="PNC standard visit 2 between 4-9 days of birth_Baby"/>
        <dataElement code="PNC9102" uid="Cbpa87fOtlB" name="PNC standard visit 2 between 4-9 days of birth_Mother"/>
        <dataElement code="PNC9097" uid="kXC0ONrnfjC"                      name="PNC standard visit 3 between 10 days and 6 weeks of birth_Baby"/>
        <dataElement code="PNC9113" uid="o562S1JTRoD"                      name="PNC standard visit 3 between 10 days and 6 weeks of birth_Mother"/>
        <dataElement code="PNC8201" uid="VQtPPcfowOz" name="PNC standard visits between 4-10 days of birth "/>
        <dataElement code="PNC8200" uid="LSYlyBiCCon" name="PNC standard visits within 3 days of birth"/>
        <dataElement code="POP" uid="xX6RDH6AZTK" name="Population"/>
    </dataElements>
    <disaggregations>
        <disaggregation code="YtbnZipIBx3" uid="YtbnZipIBx3" name="(default)"/>
        <disaggregation code="HgRodT2oZlq" uid="HgRodT2oZlq" name="(Male)"/>
        <disaggregation code="PfaFHAfpd2X" uid="PfaFHAfpd2X" name="(Female)"/>
        <disaggregation code="BNTdWBe0N1F" uid="BNTdWBe0N1F" name="(default)"/>
    </disaggregations>
    <reportTemplate>
        <name>ANC and PNC consultations</name>
        <uid>ygTEbJWQhqf</uid>
        <code>ANC_PNC</code>
        <periodType>Monthly</periodType>
        <dataValueTemplates>
            <dataValueTemplate dataElement="ANC8143" disaggregation="BNTdWBe0N1F">
                <annotation>select count(distinct person_id) from obs where voided = 0 and value_coded = 54 and
                    obs_datetime &gt;= :startOfPeriod and obs_datetime &lt;= :endOfPeriod and location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8156" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id AND o.concept_id = 6981 AND e.encounter_type in (46,53) AND o.value_datetime &gt;=
                    :startOfPeriod AND o.value_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8152" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 8618 AND e.encounter_type in (46,53) AND o.obs_datetime &gt;=
                    :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8157" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id AND o.concept_id = 1478 AND o.value_coded = 703 AND e.encounter_type in (46,53) AND
                    o.value_datetime &gt;= :startOfPeriod AND o.value_datetime &lt;=:endOfPeriod and o.location_id
                    =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8149" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 1290 AND e.encounter_type IN (43, 50) AND o.obs_datetime &gt;=
                    :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8144" disaggregation="BNTdWBe0N1F">
                <annotation>select count(distinct person_id) from obs where value_coded in(11041,11042,11043,11044) and
                    obs_datetime &gt;= :startOfPeriod and obs_datetime &lt;= :endOfPeriod and location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8146" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 8405 AND o.value_coded = 1065 AND e.encounter_type in (41, 48)
                    AND o.obs_datetime &gt;= :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id
                    =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8151" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 1290 AND e.encounter_type in (46,53) AND o.obs_datetime &gt;=
                    :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8150" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 10972 AND e.encounter_type IN (43, 50) AND o.obs_datetime &gt;=
                    :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8136" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct e.patient_id) FROM encounter e where e.encounter_type IN (42, 49) and
                    e.encounter_datetime &gt;= :startOfPeriod AND e.encounter_datetime &lt;=:endOfPeriod and
                    e.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8138" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e on o.encounter_id =
                    e.encounter_id AND concept_id IN (8149, 8521, 8522) AND e.encounter_type = 43 and o.obs_datetime
                    &gt;= :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8615" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 1290 AND e.encounter_type in (46,53) AND o.obs_datetime &gt;=
                    :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8154" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE concept_id = 2169 AND value_coded = 703 AND e.encounter_type in (46,53) AND
                    o.obs_datetime &gt;= :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id
                    =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8141" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct e.patient_id) FROM encounter e INNER JOIN person p ON e.patient_id =
                    p.person_id WHERE DATE_FORMAT(FROM_DAYS(DATEDIFF(NOW(), p.birthdate)), '%Y')+0 &lt; 15 AND
                    e.encounter_type IN (42, 49) AND e.encounter_datetime &gt;= :startOfPeriod AND e.encounter_datetime
                    &lt;=:endOfPeriod and e.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8409" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id AND o.concept_id = 6549 AND e.encounter_type in (46,53) AND o.value_datetime &gt;=
                    :startOfPeriod AND o.value_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8153" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE concept_id = 1837 AND e.encounter_type in (46,53) AND o.value_datetime &gt;=
                    :startOfPeriod AND o.value_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8137" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o WHERE o.concept_id = 1279 and o.value_numeric
                    &lt;= 13 and o.obs_datetime &gt;= :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and
                    o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC8142" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o where concept_id = 1739 and o.person_id IN
                    (SELECT person_id FROM obs WHERE concept_id = 8156) and o.obs_datetime &gt;= :startOfPeriod AND
                    o.obs_datetime &lt;=:endOfPeriod and o.location_id =:locationId
                </annotation>
            </dataValueTemplate>
            <dataValueTemplate dataElement="ANC9078" disaggregation="BNTdWBe0N1F">
                <annotation>SELECT count(distinct o.person_id) FROM obs o INNER JOIN encounter e ON o.encounter_id =
                    e.encounter_id WHERE o.concept_id = 8538 AND o.value_coded = 1065 AND e.encounter_type IN (41, 48)
                    AND o.obs_datetime &gt;= :startOfPeriod AND o.obs_datetime &lt;=:endOfPeriod and o.location_id
                    =:locationId
                </annotation>
            </dataValueTemplate>
        </dataValueTemplates>
    </reportTemplate>
</reportTemplates> 

The report templates part is divided into three sections

...