Code Search for Developers
 
 
  

createDispensePickup.xsl from HL7v3 Test Harness at Krugle


Show createDispensePickup.xsl syntax highlighted

<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="urn:hl7-org:v3">
    <xsl:template match="text()|@*"/>

    <xsl:param name="now"/>
    <xsl:param name="OID"/>

    <xsl:param name="patientPHN"/>
    <xsl:param name="providerName"/>
    <xsl:param name="dispenseID"/>

  <xsl:param name="xslDir"/>
  <xsl:variable name="datafile">
    <xsl:value-of select="$xslDir"/>Data.xml
  </xsl:variable>
  <xsl:variable name="Data" select="document($datafile)/Data"/>
  <xsl:variable name="Providers" select="$Data/providers"/>


    <xsl:template match="/">
        <xsl:variable name="provider" select="$Providers/provider[name = $providerName]"/>

        <PORX_IN020080CA ITSVersion="XML_1.0">
            <!-- A unique identifier for the message -->
            <id root="2.16.124.9.101.1.8.1" extension="122">
                <xsl:attribute name="extension">
                    <xsl:value-of select="$OID"/>
                </xsl:attribute>
            </id>
            <creationTime value="20050101102001">
                <xsl:attribute name="value">
                    <xsl:value-of select="$now"/>
                </xsl:attribute>
            </creationTime>
            <versionCode code="V3-2005-05"/>
            <interactionId root="2.16.840.1.113883.1.6" extension="PORX_IN020080CA"/>
            <processingCode code="P"/>
            <processingModeCode code="T"/>
            <acceptAckCode code="ER"/>

            <receiver>
                <!-- The address to which this message is being sent to - ie network addresses of DIS. -->
                <telecom use="WP" value="uri:198.203.1.23"/>
                <device>
                    <id root="2.16.124.9.101.1.1"/>
                </device>
            </receiver>
            <sender>
                <!-- The address to which this message is being sent from - ie network addresses of Portal -->
                <telecom use="WP" value="uri:198.203.1.23"/>
                <device>
                    <id root="2.16.124.9.101.1.8"/>
                </device>
            </sender>

            <controlActEvent classCode="CACT" moodCode="EVN">
                <!-- identifier should be stored for use in ‘undos’.  They should be stored in such a way that they are associated with the item that was modified by this event.  For example, a system should be able to show the list of trigger event identifiers for the actions that have been recorded against a particular prescription. -->
                <id root="2.16.124.9.101.1.8.5" extension="1245">
                    <xsl:attribute name="extension">
                        <xsl:value-of select="$OID"/>
                    </xsl:attribute>
                </id>
                <!-- HL7TriggerEventCode - Identifies the trigger event that occurred -->
                <code code="PORX_TE020170UV"/>
                <!-- don't know what status code is for -->
                <statusCode code="completed"/>
                <effectiveTime><xsl:attribute name="value"><xsl:value-of select="$now"/></xsl:attribute></effectiveTime>

                <!-- person responsible for the event that caused this message - the pharmacist, doctor, or most likely a public health nurse -->
                <author typeCode="AUT">
                    <time value="20050101102001">
                        <xsl:attribute name="value">
                            <xsl:value-of select="$now"/>
                        </xsl:attribute>
                    </time>
                    <!--ParticipationMode -  Indicates how the person who recorded the event became aware of it -->
                    <modeCode code="PHYSICAL"/>
                    <assignedPerson>
                        <!-- pharmacist or prescriber id  -->
                        <id root="2.16.124.9.101.1.1.7" extension="123456">
                            <xsl:attribute name="root">
                                <xsl:value-of select="$provider/id/@root"/>
                            </xsl:attribute>
                            <xsl:attribute name="extension">
                                <xsl:value-of select="$provider/id/@extension"/>
                            </xsl:attribute>
                        </id>
                        <!--  HealthcareProviderRoleType -->
                        <code nullFlavor="NI"/>
                        <representedPerson>
                            <name nullFlavor="NI"/>
                        </representedPerson>
                    </assignedPerson>
                </author>


                <!-- An identification of a service location (or facility) where health service has been or can be delivered.  E.g. Pharmacy -->
                <location>
                    <serviceDeliveryLocation>
                        <!-- a pharmacy id -->
                        <id root="2.16.124.9.101.1.1.2" extension="123445">
                            <xsl:attribute name="root">
                                <xsl:value-of select="$provider/location/@root"/>
                            </xsl:attribute>
                            <xsl:attribute name="extension">
                                <xsl:value-of select="$provider/location/@extension"/>
                            </xsl:attribute>
                        </id>
                        <addr/>
                        <telecom nullFlavor="NI"/>
                        <location>
                            <name nullFlavor="NI"/>
                        </location>
                    </serviceDeliveryLocation>
                </location>

                <!-- payload -->
                <subject contextConductionInd="false">
                    <supplyEvent>
                        <!-- identification of the dispense that is being picked up -->
                        <id root="2.16.124.9.101.1.1.3" extension="134">
                            <xsl:attribute name="extension">
                                <xsl:value-of select="$dispenseID"/>
                            </xsl:attribute>
                        </id>
                        <!-- patient for whom the dispense belongs -->
                        <subject>
                            <patient>
                                <id root="2.1" extension="">
                                    <xsl:attribute name="extension">
                                        <xsl:value-of select="$patientPHN"/>
                                    </xsl:attribute>
                                </id>
                                <telecom nullFlavor="NI"/>
                                <patientPerson>
                                    <name nullFlavor="NI"/>
                                    <administrativeGenderCode nullFlavor="NI"/>
                                    <birthTime nullFlavor="NI"/>
                                </patientPerson>
                            </patient>
                        </subject>
                    </supplyEvent>
                </subject>

            </controlActEvent>


        </PORX_IN020080CA>

    </xsl:template>
</xsl:stylesheet>




See more files for this project here

HL7v3 Test Harness

The HL7 Test Harness system is an HL7 v3 message conformance testing application that also provides the ability to simulate the message processing actions of a client and/or server system. The app provides message workflow, format and content testing.

Project homepage: http://sourceforge.net/projects/hl7-testharness
Programming language(s): C#,XML
License: gpl2

  Data.xml
  allergyGrid.xsl
  allergyQuery.xsl
  createAllergy.xsl
  createDispense.xsl
  createDispensePickup.xsl
  createPrescription.xsl
  dispenseGrid.xsl
  patientSearch.xsl
  prescriptionGrid.xsl
  prescriptionQuery.xsl
  searchGrid.xsl