<?xml version="1.0" encoding="UTF-8"?>
<feed xsi:schemaLocation="http://www.w3.org/2005/Atom http://www.hl7.org/implement/standards/fhir/fhir-atom.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.w3.org/2005/Atom">
    <entry>
        <id>cid:1</id>
        <!-- 1..1 -->
        <!-- Įvykio, dėl kurio buvo pateikiamas dokumentas, aprašymas / The information of the event which cause this document submission -->
        <content type="text/xml">
            <Provenance xmlns="http://hl7.org/fhir">

                <!-- 1..* -->
                <!-- Nuoroda į pateikiama dokumentą / Target resource which was created during this event -->
                <target>
                    <reference value="cid:2"/>
                </target>

                <!-- 1..1 -->
                <!-- Data ir laikas, kada įvykis buvo registruotas / When the event was registered-->
                <recorded value="2012-11-08T23:16:03+11:00"/>

                <!-- Priežastis event code -->
                <!-- Classificator: event-type -->
                <reason>
                    <coding>
                        <system value="http://esveikata.lt/classifiers/EventType"/>
                        <code value="20"/>
                        <display value="Medicininių pažymų suformavimas"/>
                    </coding>
                </reason>

                <!-- 1..1 -->
                <!-- Informacija apie įvykį registruojantį specialistą / Event registered practitioner -->
                <agent>
                    <!-- 1..1 -->
                    <!-- Dalyvio rolė įvykio kontekste / The role that the participant played -->
                    <!-- Classificator: provenance-participant-role -->
                    <role>
                        <system value="http://hl7.org/fhir/provenance-participant-role"/>
                        <code value="author"/>
                    </role>

                    <!-- 1..1 -->
                    <!-- Įvykio dalyvio tipas / The type of the participant -->
                    <!-- Classificator: provenance-participant-type -->
                    <type>
                        <system value="http://hl7.org/fhir/provenance-participant-type"/>
                        <code value="practitioner"/>
                    </type>

                    <!-- 1..1 -->
                    <!-- Nuoroda į specialisto resursą / Reference to the practitioner resource -->
                    <reference value="Practitioner/123/_history/1"/>
                </agent>
            </Provenance>
        </content>
    </entry>

    <entry>
        <id>cid:2</id>
        <!-- 1..1 -->
        <!-- Pagal nutylėjimą visi resursai perduodami xml formatu (text/xml) / By default all resources transmitted in XML format (text/xml) -->
        <content type="text/xml">
            <Composition xmlns="http://hl7.org/fhir">

                <!-- 1..1 -->
                <!-- 5.1. Gydytojo pildomą dalį ruošiančio naudotojo pareigos / Health Care Specialist‘s Qualification -->
                
                <!-- Classificator: qualification-code -->
                <extension url="http://esveikata.lt/Profile/ltnhr-composition#authorQualification">
                    <valueCodeableConcept>
                        <coding>
                            <system value="http://esveikata.lt/classifiers/QualificationCode"/>
                            <code value="222201"/>
                            <display value="Gydytojas odontologas"/>
                        </coding>

                        <!-- 0..1 -->
                        <!-- Jeigu nurodytos pareigos (o ne kvalifikacija) / In case position is specified instead of qualification -->
                        <coding>
                            <system value="http://esveikata.lt/classifiers/PractitionerPosition"/>
                            <code value="1"/>
                            <display value="Vyr. specialistas"/>
                        </coding>
                    </valueCodeableConcept>
                </extension>

                <!-- 1..1 -->
                <!-- 3.1. Dokumento išdavimo data/ The time this document was created -->
                
                <date value="2013-02-01T12:30:02"/>

                <!-- 1..1 -->
                <!-- Dokumento tipas / CodeableConcept Kind of composition. What type of document is this - eg Discharge Summary, referral, Consultation note -->
                <!-- Classificator: doc-code -->
                <type>
                    <coding>
                        <!-- 1..1 -->
                        <!-- Dokumento tipas / Document type -->
                        <!-- Classificator: doc-code -->
                        <system value="http://snomed.info/sct"/>
                        <code value="275674000"/>
                    </coding>

                    <!-- 1..1 -->
                    <!-- Dokumento pavadinimas / Document title -->
                    <text value="E047 Privalomo sveikatos patikrinimo medicininė pažyma (Gydytojo pildoma dalis)"/>
                </type>

                <!-- 1..1  -->
                <!-- Dokumento būsena / Status of the document -->
                <!-- Values: paruoštam pasirašymui : "final" | atšauktam dokumentui : "entered in error" -->
                <!-- Classificator: composition-status -->
                <status value="final"/>

                <!-- 1..1 -->
                <!-- Dokumento konfidencialumo lygis / Coding As defined by affinity domain -->
                <!-- Classificator: confidentiality -->
                <confidentiality>
                    <system value="http://esveikata.lt/classifiers/Confidentiality"/>
                    <code value="N"/>
                </confidentiality>

                <!-- 1..1 -->
                <!-- 2.	Paciento duomenys  / Information about the patient -->
                
                <subject>
                    <reference value="Patient/32856257683256/_history/2"/>
                </subject>

                <!-- 1..1 -->
                <!-- 5.	Gydytojo pildomą dalį ruošiančio naudotojo duomenys / Information about Health Care Specialist -->
                
                <author>
                    <reference value="Practitioner/123/_history/1"/>
                </author>

                <!-- 1..1 -->
                <!-- 1.	Įstaigos duomenys / Organization who is the author of the document -->
                
                <custodian>
                    <reference value="Organization/123/_history/1"/>
                </custodian>

                <!-- 1..1 -->
                <!-- Įvykis, kurio pagrindu yra kuriamas dokumentas / The event being documented. -->
                <!-- data-element-3 -->
                <!-- Classificator: event-type -->
                <event>
                    <code>
                        <coding>
                            <system value="http://esveikata.lt/classifiers/EventType"/>
                            <code value="20"/>
                            <display value="Medicininių pažymų suformavimas"/>
                        </coding>
                    </code>
                    <detail>
                        <reference value="cid:1"/>
                    </detail>
                </event>

                <!-- 1..1 -->
                <!-- Atvykimo duomenys / Patient Reception Data -->
                
                <encounter>
                    <reference value="Encounter/38765/_history/1"/>
                </encounter>

                <!-- 1..1 -->
                <!-- 3.	Dokumento duomenys / Document Data  -->
                <section>
                    <code>
                        <coding>
                            <!-- 1..1 -->
                            <!-- Classificator: doc-section-code -->
                            <system value="http://snomed.info/sct"/>
                            <code value="160922003"/>
                        </coding>
                    </code>

                    <!-- 1..1 -->
                    <!-- 3.3. Darbovietė / Workplace -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="394571004"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/3/_history/1"/>
                        </content>
                    </section>

                    <!-- 1..1 -->
                    <!-- 3.4. Profesijos kodas / Occupation (job) code -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="184104002"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/4/_history/1"/>
                        </content>
                    </section>

                    <!-- 1..1 -->
                    <!-- 3.6. Darbo stažas pagal šią profesiją, metais / Years of work at that position -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="224373009"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/5/_history/1"/>
                        </content>
                    </section>

                    <!-- 0..1 -->
                    <!-- 3.7. Kenksmingi veiksniai / Harmful factors at work -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="160909006"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/6/_history/1"/>
                        </content>
                    </section>

                    <!-- 1..1 -->
                    <!-- Išvados duomenys / Conclusion data -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="301707001"/>
                            </coding>
                        </code>
                        <content>
                            <reference value="cid:25"/>
                        </content>
                    </section>
                </section>

                <!-- 1..1 -->
                <!-- 4.	Darbdavio atstovo dalį užpildžiusio naudotojo duomenys / Employer data -->
                <section>
                    <code>
                        <coding>
                            <!-- 1..1 -->
                            <!-- Classificator: doc-section-code -->
                            <system value="http://snomed.info/sct"/>
                            <code value="159553004"/>
                        </coding>
                    </code>

                    <!-- 1..1 -->
                    <!-- 4.3/4 Darbdavio atstovo dalį užpildžiusio naudotojo Vardas/Pavardė / Employer name and lastname-->
                    <subject>
                        <!-- 1..1 -->
                        <reference value="Patient/321/_history/1"/>
                    </subject>

                    <!-- 1..1 -->
                    <!-- 4.1. Darbdavio atstovo dalį užpildžiusio naudotojo įstaigos pavadinimas / Employer organization name -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="224406003"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/7/_history/1"/>
                        </content>
                    </section>

                    <!-- 1..1 -->
                    <!-- 4.2. Darbdavio atstovo dalį užpildžiusio naudotojo pareigos / Employer job position title -->
                    <section>
                        <code>
                            <coding>
                                <!-- 1..1 -->
                                <!-- Classificator: doc-section-code -->
                                <system value="http://snomed.info/sct"/>
                                <code value="224361009"/>
                            </coding>
                        </code>

                        <content>
                            <!-- 1..1 -->
                            <reference value="Observation/8/_history/1"/>
                        </content>
                    </section>
                </section>

                <!-- 0..1 -->
                <!-- Privalomas, jei dokumentas keičiamas/atšaukiamas / Mandatory, if the document is modified/canceled  -->
                <!-- Dokumento pateikimo/keitimo/šalinimo paaiškinimas / Document submission/update/delete description -->
                <section>
                    <code>
                        <coding>
                            <!-- 1..1 -->
                            <!-- Classificator: -->
                            <!-- Classificator: doc-section-code -->
                            <system value="http://loinc.org"/>
                            <code value="58199-1"/>
                        </coding>
                    </code>

                    <!-- 1..1 -->
                    <!-- Nuoroda į detalius duomenis / Reference to detailed info -->
                    <content>
                        <reference value="cid:11"/>
                    </content>
                </section>
            </Composition>
        </content>
    </entry>

    <!-- 1..1 -->
    <!-- 3. Išvados duomenys / Conclusion data  -->
    <entry>
        <id>cid:25</id>
        <content type="text/xml">
            <DiagnosticReport xmlns="http://hl7.org/fhir" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.w3.org/2005/Atom http://www.hl7.org/implement/standards/fhir/diagnosticreport.xsd">

                <name>
                    <!-- 1..1 -->
                    <!-- Classificator: doc-code -->
                    <coding>
                        <system value="http://snomed.info/sct"/>
                        <code value="275674000"/>
                    </coding>
                </name>

                <!-- 1..1 -->
                <!-- Apžiūros duomenų būsena "final" arba "entered in error" atšauktiems duomenims / "final" or "entered in error" for canceled -->
                <!-- Classificator: diagnostic-report-status -->
                <status value="final"/>

                <!-- 1..1 -->
                <!-- Tyrimo atsakymo data / Test result date -->
                <!-- data-element-1611 -->
                
                <issued value="2013-03-11T10:28:00+01:00"/>

                <!-- 1..1 -->
                <!-- Informacija apie pacientą, kuriam atliktas tyrimas / Patient details -->
                
                <subject>
                    <reference value="Patient/32856257683256/_history/2"/>
                </subject>

                <!-- 1..1 -->
                <!-- Informacija apie sveikatos priežiūros specialistą, kuris atsakingas už tyrimą / Information about Health Care Specialist who is responsible for issuing the report. Need to know whom to contact if there are queries about the results -->
                
                <performer>
                    <reference value="Practitioner/123/_history/1"/>
                </performer>

                <!-- 0..1 -->
                <!-- Pažymos užduoties duomenys / Diagnostic Order data -->
                <requestDetail>
                    <reference value="DiagnosticOrder/1/_history/1"/>
                </requestDetail>

                <!-- 1..1 -->
                <!-- Tyrimo atlikimo data ir laikas. / The date and time when the test was performed -->
                <diagnosticDateTime value="2013-03-11T03:45:00+01:00"/>

                <!-- 1..1 -->
                <!-- 3.11. Kito sveikatos patikrinimo data / Date of next health check -->
                <result>
                    <reference value="cid:4"/>
                </result>

                <!-- 0..1 -->
                <!-- 3.10.	Rekomendacijos darbui ir pastabos / Conclusion remarks -->
                <conclusion value="Conclusion remarks."/>

                <!-- 1..1 -->
                <!-- 3.9. Išvada / Conclusion -->
                <!-- Classificator: work-ability-conclusion -->
                <codedDiagnosis>
                    <coding>
                        <system value="http://esveikata.lt/classifiers/WorkAbilityConclusion"/>
                        <code value="2"/>
                        <display value="Dirbti gali, bet ribotai"/>
                    </coding>
                </codedDiagnosis>
            </DiagnosticReport>
        </content>
    </entry>

    <!-- 1..1 -->
    <!-- 3.11. Kito sveikatos patikrinimo data / Date of next health check -->
    <entry>
        <id>cid:4</id>
        <content type="text/xml">
            <Observation xmlns="http://hl7.org/fhir">
                <name>
                    <coding>
                        <!-- 1..1 -->
                        <!-- Classificator: observation-code -->
                        <system value="http://snomed.info/sct"/>
                        <code value="185353001"/>
                    </coding>
                </name>

                <!-- 1..1 -->
                <!-- Kito sveikatos patikrinimo data / Date of next health check -->
                <valuePeriod>
                    <start value="2014-02-01T12:30:02"/>
                </valuePeriod>

                <!-- 1..1 -->
                <!-- įvertinimo data ir laikas / observations date and time -->
                <appliesDateTime value="2012-09-17T16:13:54.031+02:00"/>

                <!-- 1..1 -->
                <!-- Apžiūros duomenų būsena "final" arba "entered in error" atšauktiems duomenims / "final" or "entered in error" for canceled -->
                <!-- Classificator: observation-status -->
                <status value="final"/>

                <!-- 1..1 -->
                <!-- Logikoje nenaudojamas, nurodoma pagal nutylėjimą "ok" / Not used field, so "ok" by default -->
                <!-- Classificator: observation-reliability -->
                <reliability value="ok"/>

                <!-- 1..1 -->
                <!-- Pacientas, kuriam buvo atlikta apžiūra / Observed pacient -->
                
                <subject>
                    <reference value="Patient/32856257683256/_history/2"/>
                </subject>
            </Observation>
        </content>
    </entry>
</feed>
