Code Search for Developers
 
 
  

prescriptionQuery.xsl from HL7v3 Test Harness at Krugle


Show prescriptionQuery.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:param name="now"/>
    <xsl:param name="OID"/>

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

  <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_IN060370CA  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_IN060370CA"/>
	<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_TE060280UV"/>
		<!-- don't know what status code is for -->
		<statusCode code="completed"/>
		
		<!-- 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>
		
		
		<queryByParameter>
			<queryId root="2.16.124.9.101.1.8.3" extension="123">
	                                    <xsl:attribute name="extension"><xsl:value-of select="$OID"/></xsl:attribute>
			</queryId>
			<parameterList>
				
				
			
			     <!-- Indicates whether or not history events associated with a prescription order, prescription dispense and/or active medications are to be returned along with the detailed information. -->
				<includeEventHistoryIndicator>
					<value value="false"/>
				</includeEventHistoryIndicator>
				
				<!-- Indicates whether or not Issues (detected and/or managed)  attached to the prescriptions, dispenses and other active medication records are to be returned along with the detailed information. -->
				<includeIssuesIndicator>
					<value value="false"/>
				</includeIssuesIndicator>
				
				<!-- Indicates whether or not notes attached to the prescription, dispenses and other active medication records are to be returned along with the detailed information -->
				<includeNotesIndicator>
					<value  value="false"/>
				</includeNotesIndicator>
				
				<!-- Indicates whether to include future changes (e.g. status changes that aren't effective yet)  associated with a prescription order, prescription dispense 
                     and/or active medications are to be returned along with the detailed information. -->
				<includePendingChangesIndicator>
					<value value="false"/>
				</includePendingChangesIndicator>
				
				<!-- Indicates whether or not a prescription dispenses returned on a query should be limited to only the most recent dispense for a prescription.
                      Allows the returning of at most one prescription dispense record per a prescription.
                     The default is 'TRUE' indicating that retrieval should be for only the most recent dispense for a prescription is to be included in a query result -->
				<mostRecentDispenseForEachRxIndicator>
					<value value="true"></value>
				</mostRecentDispenseForEachRxIndicator>
				
				<!-- required values to identify the patient -->
				<patientBirthDate>
					<value nullFlavor="NI"/>
				</patientBirthDate>
				<patientGender>
					<value nullFlavor="NI"/>
				</patientGender>
				<patientID>
					<value root="2.1" extension="00012345">
					    	    <xsl:attribute name="extension"><xsl:value-of select="$patientPHN"/></xsl:attribute>
					</value>
				</patientID>
				<patientName>
					<value  nullFlavor="NI"/>
				</patientName>
				
			</parameterList>
			
			
		</queryByParameter>
		
		
		
	</controlActEvent>
	
	
</PORX_IN060370CA>

        
    </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