sayan801 / pyccda

A Python library for CCDA XML files. Part of the BlueButton health information liberation initiative.
1 stars 0 forks source link

Vitals component parsing #5

Open sayan801 opened 8 years ago

sayan801 commented 8 years ago

expected

<component>
    <observation classCode="OBS" moodCode="EVN">
        <!-- ** Vital sign observation ** -->
        <templateId root="2.16.840.1.113883.10.20.22.4.27"/>
        <id root="c6f88321-67ad-11db-bd13-0800200c9a66"/>
        <code xsi:type="CD" code="39156-5" codeSystem="2.16.840.1.113883.6.1"
                        displayName="BMI"
                        codeSystemName="LOINC"/>
        <text>
            <reference value="#VitalSign1"/>
        </text>
        <statusCode code="completed"/>
        <effectiveTime value="20100503100000"/>
        <value xsi:type="PQ" value="31" unit="kg/m2"/>
    </observation>
</component>

Sample under test

<component>
    <observation classCode="OBS" moodCode="EVN">
        <templateId root="2.16.840.1.113883.10.20.22.4.27"></templateId>
        <id nullFlavor="UNK"></id>
        <code nullFlavor="UNK">
            <originalText>No vital sign data is applicable</originalText>
        </code>
        <text mediaType="text/plain">
            <reference value="#VitalSigns-1"></reference>
        </text>
        <statusCode code="completed"></statusCode>
        <effectiveTime value="20140212130114"></effectiveTime>
        <value xsi:type="PQ" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" nullFlavor="NAV"></value>
    </observation>
</component>