<controlActProcess moodCode="EVN">
    <subject>
        <registrationEvent>
            <id root='903e67b1-3169-481e-b9e8-3fdfe84ceb8c'/>
            <statusCode code="active"/>
            <custodian>
                <assignedEntity>
                    <id root="1.3.6.1.4.1.21367.2008.1.2.190"/>
                    <addr>
                        <streetAddressLine>987 Maple St.</streetAddressLine>
                        <streetAddressLine>Building 44-B</streetAddressLine>
                        <city>Sometown</city>
                        <state>CA</state>
                        <postalCode>12345</postalCode>
                        <country>USA</country>
                    </addr>
                    <telecom use="WP" value="123-456-7890"/>
                    <assignedOrganization>
                        <name>Connectathon</name>
                    </assignedOrganization>
                </assignedEntity>
            </custodian>
            <subject2>
                <careProvisionEvent>
                    <recordTarget>
                        <patient>
                            <id extension="NA5050" root="1.3.6.1.4.1.21367.2005.3.7"/>
                            <addr>
                                <state>CA</state>
                                <country>USA</country>
                            </addr>
                            <telecom use="HP" value=""/>
                            <statusCode code="normal"/>
                            <patientPerson>
                                <name use="L">
                                    <given>ONE</given>
                                    <family>QED</family>
                                </name>
                                <administrativeGenderCode code="F" displayName="Female" codeSystem='2.16.840.1.113883.5.1'
                                    codeSystemName='AdministrativeGender'/>
                                <birthTime value="19300102"/>
                            </patientPerson>
                        </patient>
                    </recordTarget>
                    
                    <!-- zero or many representations of a substance administration -->
                    <substanceAdministration moodCode="EVN" negationInd="false" classCode="SBADM">
                        <templateId root="2.16.840.1.113883.10.20.1.24"/>
                        <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.12"/>
                        <id extension="63" root="1.3.6.1.4.1.21367.2008.1.2.190.2"/>
                        <code code="IMMUNIZ" codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActCode"/>
                        <text>cvxCode</text>
                        <statusCode code="completed"/>
                        <effectiveTime value="20070911"/>
                        <routeCode nullFlavor="UNK"/>
                        <approachSiteCode nullFlavor="UNK"/>
                        <doseQuantity value="1"/>
                        <consumable typeCode="CSM">
                            <administerableMaterial classCode='ADMM' determinerCode='INSTANCE'>
                                <!-- zero or one representation of the instance information of the administerableMaterial  -->
                                <administerableMaterial classCode='MMAT' determinerCode='INSTANCE'>
                                    <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2" /> 
                                    <templateId root="2.16.840.1.113883.10.20.1.53" /> 
                                    <code code="88" codeSystem="2.16.840.1.113883.6.59" displayName="FLU VAX"/>
                                    <lotNumberText>ABC12345M</lotNumberText>
                                    <expirationTime value='20080305'/>
                                    <!-- Manufacturer of Vaccine -->
                                    <asMedicineManufacturer classCode='MANU'>
                                        <manufacturer classCode='ORG'>
                                            <id root='2.16.840.1.113883.6.60' extension='SKB'/>
                                            <name>Glaxo Smith Kline Beacham</name>
                                        </manufacturer>
                                    </asMedicineManufacturer>
                                </administerableMaterial>
                            </administerableMaterial>
                            <desc>influenza immunization has been administered</desc>
                        </consumable>
                        
                        <!-- zero or more representations of adverse events caused 6.4.4.15.8 --> 
                        <entryRelationship inversionInd='false' typeCode='CAUS'>
                            <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.6.1'/>
                            <observation typeCode='OBS' moodCode='EVN'>
                                <templateId root='2.16.840.1.113883.10.20.1.54'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.5'/>
                                <id root='' extension=''/>
                                <code code=' 12345678' displayName="edema with fever" codeSystem="2.16.840.1.113883.6.96" codeSystemName="SNOMED CT"/>
                                <statusCode code="completed"/>
                                <effectiveTime><low value="20070911"></low><high value="20070916"></high></effectiveTime>
                                <value type="CD" code="xxx" displayName="Edema with fever" codeSystem="2.16.840.1.113883.6.103" codeSystemName="ICD-9CM"></value>
                                <!-- zero or more representations of the severity of the above adverse event -->
                                <entryRelationship typeCode="SUBJ" inversionInd="true">
                                    <observation classCode="OBS" moodCode="EVN">
                                        <templateId root="2.16.840.1.113883.10.20.1.55"/>
                                        <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.1"/>
                                        <code code="SEV" displayName="Severity" codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActCode"/>
                                        <text>moderately severe edema with moderate fever</text>
                                        <statusCode code="completed"/>
                                        <value type="CD" code="M" codeSystem="2.16.840.1.113883.5.1063" codeSystemName="ObservationValue"></value>
                                    </observation>
                                </entryRelationship>
                            </observation>
                        </entryRelationship>     
                        
                        <!-- zero or one representation of the person who administered the vaccine  -->
                        <performer typeCode='PRF'>
                            <assignedEntity typeCode="ASSIGNED">
                                <id root='1.2.3' extension="MUNB23"/>
                                <addr></addr>
                                <telecom use='' value=''/>
                                <assignedPerson>
                                    <name><given>Bill</given><family>Munroe</family></name>
                                </assignedPerson>
                                <representedOrganization>
                                    <name>ABC Healthcare</name>
                                </representedOrganization>
                            </assignedEntity>
                        </performer>
                        
                        <!-- exactly one Author of the Substance Administration -->
                        <author typeCode='AUT'>
                            <assignedEntity typeCode='ASSIGNED'>
                                <id root=' 1.2.3' extension=' SMIM01'/>
                                <assignedPerson classCode='PSN' determinerCode='' root=''>
                                    <name><given>Mary</given><family>Smith</family></name>
                                </assignedPerson>
                            </assignedEntity>
                        </author>
                        
                        <!-- zero or more representations of the source of information about the substanceAdministration -->
                        <!--<informant typeCode='INF'>
                            <relatedEntity classCode=' '>
                            <id root=' ' extension=' '/>
                            <assignedPerson classCode='PSN'>
                            <determinerCode root=''/>
                            <name>…</name>
                            </assignedPerson>
                            </relatedEntity>
                            </informant>-->
                        <!--or the following--> 
                        <!--<observation typeCode='OBS' moodCode='EVN'>
                            <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.13'/>
                            <id root='' extension=''/>
                            <code code='' displayName='' codeSystem='' codeSystemName=''/>
                            <text>foo bar text</text>
                            <statusCode code='completed'/>
                            <effectiveTime value=''/>
                            <repeatNumber value=''/>
                            <value type=''/>
                            <interpretationCode code='' codeSystem='' codeSystemName=''/>
                            <methodCode code='' codeSystem='' codeSystemName=''/>
                            <targetSiteCode code='' codeSystem='' codeSystemName=''/>
                            <author typeCode='AUT'>
                            <assignedEntity typeCode='ASSIGNED'>
                            <Person classCode='PSN'>
                            <determinerCode root=''/>
                            <name>…</name>
                            </Person>
                            </assignedEntity>
                            </author>
                            </observation>-->
                        <informant typeCode='INF'>
                            <time  value=''/>
                            <!-- verbal paper electronicData etc. -->
                            <modeCode code="VERBAL|WRITTEN|ELECTRONIC" codeSystem="2.16.840.1.113883.5.1064" codeSystemName="Participation Mode"/>
                            <informationSource classCode="PRS | LIC | PAT" codeSystem="2.16.840.1.113883.5.110" codeSystemName="RoleClass">
                                <!-- someone with a personal relationship, such as mother -->
                                <code> role </code> 
                                <!-- licensed entity, such as another provider -->
                                <code> role </code>
                                <!-- patient, no further information needed -->
                            </informationSource>
                        </informant>
                        
                        <!-- zero to many representations of Comments about this IZ Instance -->
                        <entryRelationship typeCode="SUBJ" inversionInd="true">
                            <observation classCode='COND' moodCode='EVN' negationInd=' false|true '>
                                <templateId root='2.16.840.1.113883.10.20.1.40'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.2'/>
                                <id root=' ' extension=' '/>
                                <code code=' 48767-8' displayName=' Annotation Comment'
                                    codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                                <statusCode code='completed'/>
                                <effectiveTime value='20070911'/>
                                <text>
                                    this child has extreme panic attacks at the sight of a needle.
                                </text>
                            </observation>
                        </entryRelationship>
                        
                    </substanceAdministration>
                    
                    <!-- zero to many representations of Problems -->
                    <observation classCode='OBS' moodCode='EVN' negationInd=' false|true '>
                        <templateId root='2.16.840.1.113883.10.20.1.28'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.5'/>
                        <id root=' ' extension=' '/>
                        <code code=' ' displayName=' '
                            codeSystem='2.16.840.1.113883.6.96' codeSystemName='SNOMED CT'/>
                        <statusCode code='completed'/>
                        <effectiveTime><low value=' '/><high value=' '/></effectiveTime>
                        <value type='CD' code=' ' codeSystem=' ' displayName=' ' codeSystemName=' '>
                            <originalText><reference value=' '/></originalText>
                        </value>
                        <!-- zero or one <subjectOf typeCode='SUBJ' inversionInd='true'> elements containing severity  -->
                        <!-- zero or one <subjectOf typeCode='REFR' inversionInd='false'> elements identifying the health status of concern -->
                        <!-- zero or one <subjectOf typeCode='REFR' inversionInd='false'> elements containing clinical status -->
                        <!-- zero to many <subjectOf typeCode='SUBJ' inversionInd='true'> elements containing comments -->
                        <subjectOf typeCode='SUBJ' inversionInd='true'>
                            <observation classCode='COND' moodCode='EVN' negationInd=' false|true '>
                                <templateId root='2.16.840.1.113883.10.20.1.40'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.2'/>
                                <id root=' ' extension=' '/>
                                <code code=' 48767-8' displayName=' Annotation Comment'
                                    codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                                <statusCode code='completed'/>
                                <effectiveTime value='20070911'/>
                                <text>
                                    this child has extreme panic attacks at the sight of a needle.
                                </text>
                            </observation>
                        </subjectOf>
                        
                    </observation>
                    
                    <!-- zero to many representations of Allergies and Intolerances -->
                    <observation classCode='OBS' moodCode='EVN' negationInd='false'>
                        <templateId root='2.16.840.1.113883.10.20.1.18'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.6'/>
                        <id root=' ' extension=' '/>
                        <code
                            code='ALG|OINT|DALG|EALG|FALG|DINT|EINT|FINT|DNAINT|ENAINT|FNAINT'
                            codeSystem='2.16.840.1.113883.5.4'
                            codeSystemName='ObservationIntoleranceType'/>
                        <statusCode code='completed'/>
                        <effectiveTime>
                            <low value=' '/>
                            <high value=' '/>
                        </effectiveTime>
                        <value type='CD' code=' ' codeSystem=' ' displayName=' ' codeSystemName=' '/>
                        <participant typeCode='CSM'>
                            <participantRole classCode='MANU'>
                                <playingEntity classCode='MMAT'>
                                    <code code=' ' codeSystem=' '>
                                        <originalText><reference value='#substance'/></originalText>
                                    </code>
                                    <name></name>
                                </playingEntity>
                            </participantRole>
                        </participant>
                        <!-- zero to many <entryRelationship> elements containing reactions (Adverse Events), 
                            for example:
                            <entryRelationship typeCode='MFST'>
                            <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.6.1'/>
                            <observation classCode='OBS' moodCode='EVN'>
                            <templateId root='2.16.840.1.113883.10.20.1.54'/>
                            <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.5'/>
                            :
                            </observation>
                            </entryRelationship>
                        -->
                        <!-- zero or one <subjectOf typeCode='SUBJ' inversionInd='true'> elements containing severity -->
                        <!-- zero or one <subjectOf typeCode='REFR' inversionInd='false'> elements containing clinical status -->
                        <!-- zero to many <subjectOf typeCode='SUBJ' inversionInd='true'> elements containing comments -->
                        <subjectOf typeCode='SUBJ' inversionInd='true'>
                            <observation classCode='COND' moodCode='EVN' negationInd=' false|true '>
                                <templateId root='2.16.840.1.113883.10.20.1.40'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.2'/>
                                <id root=' ' extension=' '/>
                                <code code=' 48767-8' displayName=' Annotation Comment'
                                    codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                                <statusCode code='completed'/>
                                <effectiveTime value='20070911'/>
                                <text>
                                    this child has extreme panic attacks at the sight of a needle.
                                </text>
                            </observation>
                        </subjectOf>
                    </observation>
                    
                    <!-- zero or many representations of a substance administration for medication -->
                    <substanceAdministration moodCode="EVN" negationInd="false" classCode="SBADM">
                        <templateId root="2.16.840.1.113883.10.20.1.24"/>
                        <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7"/>
                        <id extension="63" root="1.3.6.1.4.1.21367.2008.1.2.190.2"/>
                        <code code="MEDICAT" codeSystem="2.16.840.1.113883.5.4" codeSystemName="ActCode"/>
                        <text>cvxCode</text>
                        <statusCode code="completed"/>
                        <effectiveTime value="20070911"/>
                        <consumable typeCode="CSM">
                            <administerableMaterial>
                                <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.7.2"/>
                                <templateId root="2.16.840.1.113883.10.20.1.53"/>
                                <administerableMaterial>
                                    <code code="12345" codeSystem="2.16.840.1.113883.6.?.?" displayName="Penicillin">
                                        <originalText>Penicillin</originalText>
                                    </code>
                                </administerableMaterial>
                                <desc>patient given Penicillin</desc>
                            </administerableMaterial>
                        </consumable>
                    </substanceAdministration>
                    
                    <!-- zero to many representations of Lab Results -->
                    <observation classCode='OBS' moodCode='EVN' negationInd=' false'>
                        <templateId root='2.16.840.1.113883.10.20.1.28'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.5'/>
                        <id root=' ' extension=' '/>
                        <code code=' ' displayName=' '
                            codeSystem='2.16.840.1.113883.?.?' codeSystemName='SNOMED CT'/>
                        <statusCode code='completed'/>
                        <effectiveTime><low value=' '/><high value=' '/></effectiveTime>
                        <value type='CD' code=' ' codeSystem=' ' displayName=' ' codeSystemName=' '>
                            <originalText><reference value=' '/></originalText>
                        </value>
                        <interpretationCode></interpretationCode>
                        <methodCode></methodCode>
                        <author></author>
                    </observation>
                    
                    <!-- zero to many representations of Vital Signs observed -->
                    <organizer classCode='CLUSTER' moodCode='EVN'>
                        <templateId root='2.16.840.1.113883.10.20.1.32'/>
                        <templateId root='2.16.840.1.113883.10.20.1.35'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.13.1'/>
                        <id root='' extension=''/>
                        <code code='46680005' displayName='Vital signs'
                            codeSystem='2.16.840.1.113883.6.96' codeSystemName='SNOMED CT'/>
                        <statusCode code='completed'/>
                        <effectiveTime value=''/>
                        <author classCode='AUT'>
                            <assignedAuthor typeCode='ASSIGNED'>
                            </assignedAuthor>
                        </author>
                        <component typeCode='COMP'>
                            <observation classCode='OBS' moodCode='EVN'>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.13'/>
                                <templateId root='2.16.840.1.113883.10.20.1.31'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.13.2'/>
                                <id root=' ' extension=' '/>
                                <code code=' ' codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                                <text><reference value='#xxx'/></text>
                                <statusCode code='completed'/>
                                <effectiveTime value=' '/>
                                <repeatNumber value=' '/>
                                <value type='PQ' value='' unit=''/>
                                <interpretationCode code=' ' codeSystem=' ' codeSystemName=' '/>
                                <methodCode code=' ' codeSystem=' ' codeSystemName=' '/>
                                <targetSiteCode code=' ' codeSystem=' ' codeSystemName=' '/>
                            </observation>
                        </component>
                    </organizer>
                    
                    <!-- zero to many representations of Pregnancy Observations -->
                    <observation classCode='OBS' moodCode='EVN' negationInd=' false'>
                        <templateId root='2.16.840.1.113883.10.20.1.28'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.13.5'/>
                        <id root=' ' extension=' '/>
                        <code code=' ' displayName=' '
                            codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                        <statusCode code='completed'/>
                        <effectiveTime><low value=' '/><high value=' '/></effectiveTime>
                        <value type=' ' code=' ' codeSystem=' ' displayName=' ' codeSystemName=' '>
                            <originalText><reference value=' '/></originalText>
                        </value>
                        <author></author>
                    </observation>
                    
                    <!-- zero to many representations of Advanced Directives -->
                    <observation classCode='OBS' moodCode='EVN' negationInd=' false'>
                        <templateId root='2.16.840.1.113883.10.20.1.28'/>
                        <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.7'/>
                        <id root=' ' extension=' '/>
                        <code code=' ' displayName=' '
                            codeSystem='2.16.840.1.113883.?.?' codeSystemName='SNOMED CT'/>
                        <statusCode code='completed'/>
                        <effectiveTime><low value=' '/><high value=' '/></effectiveTime>
                        <value type='BL' value='true|false'/>
                        <author></author>
                        <!-- zero to many <subjectOf typeCode='SUBJ' inversionInd='true'> elements containing comments -->
                        <subjectOf typeCode='SUBJ' inversionInd='true'>
                            <observation classCode='COND' moodCode='EVN' negationInd=' false|true '>
                                <templateId root='2.16.840.1.113883.10.20.1.40'/>
                                <templateId root='1.3.6.1.4.1.19376.1.5.3.1.4.2'/>
                                <id root=' ' extension=' '/>
                                <code code=' 48767-8' displayName=' Annotation Comment'
                                    codeSystem='2.16.840.1.113883.6.1' codeSystemName='LOINC'/>
                                <statusCode code='completed'/>
                                <effectiveTime value='20070911'/>
                                <text>
                                    This person is a strict vegetarian, and does not want any vaccines made from animals or animal substances.
                                </text>
                            </observation>
                        </subjectOf>
                    </observation>
                    
                </careProvisionEvent>
                
            </subject2>
        </registrationEvent>
    </subject>
</controlActProcess>
