wiki:LEGACY - i2b2 - PDO

i2b2 PDO (Patient Data Object - but actually much more)

This is the main means of communication between the cells of i2b2 and can also be used with the Data Loader to import all kinds of data, not just patient data.

Example minimum and maximum set of PDO data

<?xml version="1.0" encoding="UTF-8"?>
<pdo:patient_data xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:pdo="http://www.i2b2.org/xsd/hive/pdo/"
    xsi:schemaLocation="http://www.i2b2.org/xsd/hive/pdo/ ./i2b2_PDO.xsd">

    <visit_dimension_set>

        <!-- Maximum Visit Data -->
        <visit_dimension>
            <encounter_ide source="PULENCTMAP">XDFD45HSDG9578FDFG</encounter_ide>
            <patient_num>12345</patient_num>
            <inout_cd>I</inout_cd>
            <location_cd>MGH</location_cd>
            <location_path>Clinics\MGH\Oral Surgury</location_path>
            <start_date>1999-02-28T13:59:00</start_date>
            <end_date>1999-02-28T13:59:00</end_date>
            <visit_blob/>
            <update_date>1999-02-28T13:59:00</update_date>
            <download_date>1999-02-28T13:59:00</download_date>
            <import_date>1999-02-28T13:59:00</import_date>
            <sourcesystem_cd>RPDRASTHMA</sourcesystem_cd>
            <upload_id>123</upload_id>
        </visit_dimension>

        <!-- Minimum Visit Data -->
        <visit_dimension>
            <encounter_num>1234567</encounter_num>
            <patient_id source="EMP">123456789</patient_id>
        </visit_dimension>

    </visit_dimension_set>

    <concept_dimension_set>

        <!-- Maximum Concept Data -->
        <concept_dimension>
            <concept_path>i2b2\Diagnoses\C0004096</concept_path>
            <concept_cd>UMLS:C0004096</concept_cd>
            <name_char>Asthma</name_char>
            <concept_blob/>
            <update_date>1999-02-28T13:59:00</update_date>
            <download_date>1999-02-28T13:59:00</download_date>
            <import_date>1999-02-28T13:59:00</import_date>
            <sourcesystem_cd>ASTHMADICT</sourcesystem_cd>
            <upload_id>234</upload_id>
        </concept_dimension>

        <!-- Minimum Concept Data -->
        <concept_dimension>
            <concept_path>i2b2\Diagnoses\C0004096</concept_path>
        </concept_dimension>

    </concept_dimension_set>

    <provider_dimension_set>

        <!-- Maximum Provider Data -->
        <provider_dimension>
            <provider_path>BWH\Pathology\B001234567\12345</provider_path>
            <provider_id>B001234567</provider_id>
            <name_char>Doctor, John A., MD</name_char>
            <provider_blob/>
            <update_date>1999-02-28T13:59:00</update_date>
            <download_date>1999-02-28T13:59:00</download_date>
            <import_date>1999-02-28T13:59:00</import_date>
            <sourcesystem_cd>token</sourcesystem_cd>
            <upload_id>345</upload_id>
        </provider_dimension>

        <!-- Minimum Provider Data -->
        <provider_dimension>
            <provider_path>BWH\Pathology\B001234567\12345</provider_path>
            <provider_id>B001234567</provider_id>
        </provider_dimension>

    </provider_dimension_set>

    <patient_dimension_set>

        <!-- Maximum Patient Data -->
        <patient_dimension>
            <patient_id source="EMP">123456789</patient_id>
            <vital_status_cd>Y</vital_status_cd>
            <birth_date>1930-02-28T13:59:00</birth_date>
            <death_date>2001-02-28T13:59:00</death_date>
            <sex_cd>F</sex_cd>
            <age_in_years_num>71</age_in_years_num>
            <language_cd>ENGL</language_cd>
            <race_cd>B</race_cd>
            <marital_status_cd>M</marital_status_cd>
            <religion_cd>CA</religion_cd>
            <zip_cd>12345-1234</zip_cd>
            <statecityzip_path>Zip codes\Massachusetts\Boston\02120\</statecityzip_path>
            <patient_blob/>
            <update_date>1999-02-28T13:59:00</update_date>
            <download_date>1999-02-28T13:59:00</download_date>
            <import_date>1999-02-28T13:59:00</import_date>
            <sourcesystem_cd>token</sourcesystem_cd>
            <upload_id>456</upload_id>
        </patient_dimension>

        <!-- Minimum Patient Data -->
        <patient_dimension>
            <patient_num>1234</patient_num>
        </patient_dimension>

    </patient_dimension_set>

    <observation_fact_set>

        <!-- Maximum Observation Data -->
        <observation_fact>
            <encounter_num>1234567</encounter_num>
            <patient_ide source="EMP">XRTU8GT9FKIS35DSVB</patient_ide>
            <concept_cd>CODING-SYSTEM:V450</concept_cd>
            <provider_id>12345</provider_id>
            <start_date>1999-02-28T13:59:00</start_date>
            <modifier_cd/>
            <valtype_cd>N</valtype_cd>
            <tval_char>Some Text Value</tval_char>
            <nval_num>1.0</nval_num>
            <valueflag_cd>float (or some code)</valueflag_cd>
            <quantity_num>1.0</quantity_num>
            <units_cd>ml</units_cd>
            <end_date>1999-02-28T13:59:00</end_date>
            <location_cd>MGH</location_cd>
            <confidence_num>95</confidence_num>
            <observation_blob/>
            <update_date>1999-02-28T13:59:00</update_date>
            <download_date>1999-02-28T13:59:00</download_date>
            <import_date>1999-02-28T13:59:00</import_date>
            <sourcesystem_cd>RPDRASTHMA</sourcesystem_cd>
            <upload_id>567</upload_id>
        </observation_fact>

        <!-- Minimum Observation Data -->
        <observation_fact>
            <encounter_id source="PULENCTMAP">123456</encounter_id>
            <patient_num>1234</patient_num>
            <concept_cd>CODING-SYSTEM:V450</concept_cd>
            <provider_id>12345</provider_id>
            <start_date>1999-02-28T13:59:00</start_date>
            <modifier_cd/>
            <observation_blob></observation_blob>
        </observation_fact>

    </observation_fact_set>
    
    <observation_fact_set concept_name="1" concept_path="1">
        <observation_fact>
            <encounter_num>1</encounter_num>
            <patient_num>1</patient_num>
            <concept_cd>1</concept_cd>
            <provider_id></provider_id>
            <start_date>1999-02-28T13:59:00</start_date>
            <modifier_cd></modifier_cd>
        </observation_fact>
    </observation_fact_set>

</pdo:patient_data>

PDO Version 1.1

Document XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" 
        xmlns:pdo="http://www.i2b2.org/xsd/hive/pdo/1.1/" 
        targetNamespace="http://www.i2b2.org/xsd/hive/pdo/1.1/" >
        <xs:include  schemaLocation="./i2b2_PDODataType.xsd"/>

        <xs:element name="patient_data" type="pdo:patient_dataType"/>

        <!-- PatientDataType (Top level type) -->                       
        <xs:complexType name="patient_dataType"> 
                        <xs:sequence>
                                <xs:element ref="pdo:event_set" />
                                <xs:element ref="pdo:concept_set"/>
                                <xs:element ref="pdo:modifier_set"/>
                                <xs:element ref="pdo:observer_set" />
                                <xs:element ref="pdo:pid_set" />
                                <xs:element ref="pdo:eid_set" />
                                <xs:element ref="pdo:patient_set"/>
                                <xs:element ref="pdo:observation_set" maxOccurs="unbounded"/>
                        </xs:sequence>
                </xs:complexType>
        
</xs:schema>

Types XSD

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
        xmlns:pdo="http://www.i2b2.org/xsd/hive/pdo/1.1/"
        xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
        targetNamespace="http://www.i2b2.org/xsd/hive/pdo/1.1/"
        jxb:version="1.0">

        <xs:element name="event_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="event" maxOccurs="unbounded"
                                        type="pdo:eventType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

        <xs:element name="concept_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="concept" maxOccurs="unbounded"
                                        type="pdo:conceptType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>
        
        <xs:element name="modifier_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="modifier" maxOccurs="unbounded"
                                        type="pdo:modifierType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

        <xs:element name="observer_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="observer" maxOccurs="unbounded"
                                        type="pdo:observerType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

        <xs:element name="pid_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="pid" maxOccurs="unbounded"
                                        type="pdo:pidType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

    <xs:element name="eid_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="eid" maxOccurs="unbounded"
                                        type="pdo:eidType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>
        
        <xs:element name="patient_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="patient" maxOccurs="unbounded"
                                        type="pdo:patientType" />
                        </xs:sequence>
                </xs:complexType>
        </xs:element>

        <xs:element name="observation_set">
                <xs:complexType>
                        <xs:sequence>
                                <xs:element name="observation" maxOccurs="unbounded"
                                        type="pdo:observationType" />
                        </xs:sequence>
                        <xs:attribute name="panel_name" type="xs:string"
                                use="optional" />
                </xs:complexType>
        </xs:element>

        <!-- Reused types starts here-->
        <!-- EventType -->
        <xs:complexType name="eventType">
                <xs:annotation>
                        <xs:documentation>
                                One row of data from the visit_dimension table.
                        </xs:documentation>
                </xs:annotation>
                <xs:sequence>
                        <xs:element name="event_id" minOccurs="1" >
                                <xs:complexType >
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="source" type="xs:string"
                                                                default="HIVE" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="patient_id" minOccurs="1" type="pdo:patientIdType">
                        </xs:element>
                        <xs:element name="param" type="pdo:paramType" minOccurs="0"
                                maxOccurs="unbounded" />
                        <xs:element name="start_date" type="xs:dateTime" />
                        <xs:element name="end_date" type="xs:dateTime" />
                        <xs:element name="event_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>
        <!-- ConceptType -->
        <xs:complexType name="conceptType">
                <xs:sequence>
                        <xs:element name="concept_path" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="concept_cd" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="name_char" type="xs:string" />
                        <xs:element name="concept_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>
        <!-- ModifierType -->
        <xs:complexType name="modifierType">
                <xs:sequence>
                        <xs:element name="modifier_path" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="modifier_cd" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="name_char" type="xs:string" />
                        <xs:element name="modifier_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>
        <!-- ObserverType -->
        <xs:complexType name="observerType">
                <xs:sequence>
                        <xs:element name="observer_path" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="observer_cd" type="xs:string"
                                minOccurs="1" />
                        <xs:element name="name_char" type="xs:string" />
                        <xs:element name="observer_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>
        <!-- PIDType -->
        <xs:complexType name="pidType">
                <xs:sequence>
                        <!--
                        <xs:element name="patient_id" type="pdo:patientIdType"
                        minOccurs="1" />
                        --> 
                        <xs:element name="patient_id" 
                        minOccurs="1" >
                        <xs:complexType>
                                <xs:simpleContent>
                                <xs:extension base="pdo:patientIdType">
                                        <xs:attribute name="status" type="xs:string"
                                                use="optional" />
                                        <xs:attributeGroup
                                                ref="pdo:techDataAttributeGroup" />
                                </xs:extension>
                                </xs:simpleContent>
                        </xs:complexType>
                        </xs:element>
                        <xs:element name="patient_map_id" minOccurs="0"
                                maxOccurs="unbounded">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="source" type="xs:string"
                                                                default="HIVE" />
                                                        <xs:attribute name="status" type="xs:string"
                                                                use="optional" />
                                                        <xs:attributeGroup
                                                                ref="pdo:techDataAttributeGroup" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                </xs:sequence>
        </xs:complexType>

        <!-- EIDType -->
        <xs:complexType name="eidType">
                <xs:sequence>
                        <xs:element name="event_id" minOccurs="1">
                                <xs:complexType >
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="source" type="xs:string"
                                                        default="HIVE"/>
                                                        <xs:attribute name="patient_id" type="xs:string"
                                                        />
                                                        <xs:attribute name="patient_id_source" type="xs:string"
                                                        default="HIVE"/>
                                                        <xs:attribute name="status" type="xs:string"
                                                                use="optional" />
                                                        <xs:attributeGroup
                                                                ref="pdo:techDataAttributeGroup" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="event_map_id" minOccurs="0"
                                maxOccurs="unbounded">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="source" type="xs:string"
                                                        default="HIVE" />
                                                        <xs:attribute name="patient_id" type="xs:string"
                                                        />
                                                        <xs:attribute name="patient_id_source" type="xs:string"
                                                        default="HIVE"/>
                                                        <xs:attribute name="status" type="xs:string"
                                                                use="optional" />
                                                        <xs:attributeGroup
                                                                ref="pdo:techDataAttributeGroup" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                </xs:sequence>
        </xs:complexType>
        
        <!-- PatientType -->
        <xs:complexType name="patientType">
                <xs:sequence>
                        <xs:element name="patient_id" type="pdo:patientIdType"
                                minOccurs="1" />
                        <xs:element name="param" type="pdo:paramType" minOccurs="0"
                                maxOccurs="unbounded" />
                        <xs:element name="patient_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>
        <!-- ObservationType -->
        <xs:complexType name="observationType">
                <xs:sequence>
                        <xs:element name="event_id">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="source" type="xs:string"
                                                                default="HIVE"  />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="patient_id" type="pdo:patientIdType"
                                minOccurs="1" />
                        <xs:element name="concept_cd">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="name" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="observer_cd">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="name" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="start_date" type="xs:dateTime" />
                        <xs:element name="modifier_cd">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="name" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="instance_num">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="valuetype_cd" type="xs:string" />
                        <xs:element name="tval_char" type="xs:string" />
                        <xs:element name="nval_num">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:decimal">
                                                        <xs:attribute name="units" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="valueflag_cd">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="name" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="quantity_num" type="xs:decimal" />
                        <xs:element name="units_cd" type="xs:string" />
                        <xs:element name="end_date" type="xs:dateTime" />
                        <xs:element name="location_cd">
                                <xs:complexType>
                                        <xs:simpleContent>
                                                <xs:extension base="xs:string">
                                                        <xs:attribute name="name" type="xs:string"
                                                                use="required" />
                                                </xs:extension>
                                        </xs:simpleContent>
                                </xs:complexType>
                        </xs:element>
                        <xs:element name="confidence_num" type="xs:decimal" />
                        <xs:element name="observation_blob" type="pdo:blobType"
                                minOccurs="0" />
                </xs:sequence>
                <xs:attributeGroup ref="pdo:techDataAttributeGroup" />
        </xs:complexType>



    <!--  Patient Type -->
        <xs:complexType name="patientIdType">
                <xs:simpleContent>
                        <xs:extension base="xs:string">
                                <xs:attribute name="source" type="xs:string"
                                        default="HIVE">
                                        <xs:annotation>
                                                <xs:appinfo>
                                                        <jxb:property name="Source" />
                                                </xs:appinfo>
                                        </xs:annotation>
                                </xs:attribute>
                        </xs:extension>
                </xs:simpleContent>
        </xs:complexType>

        <!-- ParamType -->
        <xs:complexType name="paramType">
                <xs:simpleContent>
                        <xs:extension base="xs:string">
                                <xs:attribute name="column" type="xs:string"
                                        use="optional" />
                                <xs:attribute name="column_descriptor" type="xs:string"
                                        use="optional" />
                                <xs:attribute name="name" type="xs:string"
                                        use="optional" />
                                <xs:attribute name="type" type="xs:string"
                                        use="optional" />
                        </xs:extension>
                </xs:simpleContent>
        </xs:complexType>

        <!-- BlobType -->
        <xs:complexType name="blobType" mixed="true">
                <xs:annotation>
                        <xs:documentation>
                                A string with all whitespace preserved. This string
                                could also contain xml so the type is anyType in order
                                for complex element content to be valid.
                        </xs:documentation>
                </xs:annotation>
                <xs:complexContent>
                        <xs:restriction base="xs:anyType">
                                <xs:sequence>
                                        <xs:any minOccurs="0" maxOccurs="unbounded" />
                                </xs:sequence>
                        </xs:restriction>
                </xs:complexContent>
        </xs:complexType>

        <!-- tech data attribute group -->
        <xs:attributeGroup name="techDataAttributeGroup">
                <xs:annotation>
                        <xs:documentation>
                                A group of fields that always appear together at the end
                                of a table and store annotation or administrative
                                information.
                        </xs:documentation>
                </xs:annotation>
                <xs:attribute name="update_date" type="xs:dateTime"
                        use="optional" />
                <xs:attribute name="download_date" type="xs:dateTime"
                        use="optional" />
                <xs:attribute name="import_date" type="xs:dateTime"
                        use="optional" />
                <xs:attribute name="sourcesystem_cd" type="xs:string"
                        use="optional" />
                <xs:attribute name="upload_id" type="xs:string" use="optional" />
        </xs:attributeGroup>

</xs:schema>
Last modified 9 years ago Last modified on 08/22/13 08:47:12
Note: See TracWiki for help on using the wiki.