Changeset 798 for ccr2ccd-xslt
- Timestamp:
- Jun 11, 2010, 1:51:30 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ccr2ccd-xslt/trunk/ccr_ccd.xsl
r787 r798 1 <?xml version="1.0" encoding="utf-8"?>1 <?xml version="1.0" encoding="utf-8"?> 2 2 <!-- 3 3 Conversion of CCR to Level 3 CCD … … 42 42 <xsl:output method="xml" encoding="utf-8" version="1.0" indent="yes"/> 43 43 <xsl:template match="/"> 44 <ClinicalDocument xmlns="urn:hl7-org:v3" x si:schemaLocation="urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd" classCode="DOCCLIN" moodCode="EVN">44 <ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:sdtc="urn:hl7-org:sdtc" xsi:schemaLocation="urn:hl7-org:v3 http://xreg2.nist.gov:8080/hitspValidation/schema/cdar2c32/infrastructure/cda/C32_CDA.xsd" classCode="DOCCLIN" moodCode="EVN"> 45 45 <realmCode code="US"/> 46 46 <typeId root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/> … … 56 56 </id> 57 57 <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" codeSystemName="LOINC" displayName="Summarization of episode note"/> 58 <title>Continuity of Care Document</title> 58 <xsl:variable name="fromID" select="/a:ContinuityOfCareRecord/a:From/a:ActorLink[1]/a:ActorID"/> 59 <xsl:variable name="ccrFromActorObjectID" select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$fromID]/a:InternalCCRLink[a:LinkRelationship='representedOrganization']/a:LinkID"/> 60 <title>Continuity of Care Document from <xsl:value-of select="/a:ContinuityOfCareRecord/a:Actors/a:Actor[a:ActorObjectID=$ccrFromActorObjectID]/a:Organization/a:Name"/></title> 59 61 <effectiveTime> 60 62 <xsl:attribute name="value"> … … 68 70 <languageCode code="en-US"/> 69 71 70 <recordTarget >72 <recordTarget typeCode="RCT" contextControlCode="OP"> 71 73 <xsl:call-template name="ccdPatientRole"> 72 74 <xsl:with-param name="ccrActorObjectID" select="/a:ContinuityOfCareRecord/a:Patient[1]/a:ActorID"/> … … 74 76 </recordTarget> 75 77 76 <xsl:variable name="fromID" select="/a:ContinuityOfCareRecord/a:From/a:ActorLink[1]/a:ActorID"/>77 78 78 79 <author> … … 99 100 </assignedCustodian> 100 101 </custodian> 101 </xsl:if> 102 </xsl:if> 102 103 103 104 <documentationOf> … … 400 401 <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Problems/a:Problem"> 401 402 <tr> 402 <xsl:attribute name="id">403 <xsl:value-of select="a:CCRDataObjectID"/>404 </xsl:attribute>405 403 <td> 406 404 <xsl:value-of select="a:Type/a:Text"/> 407 405 </td> 408 <td> 409 <table> 410 <tbody> 411 <xsl:apply-templates select="a:DateTime"/> 412 </tbody> 413 </table> 414 </td> 406 <xsl:apply-templates select="a:DateTime"/> 415 407 <td> 416 408 <xsl:apply-templates select="a:Description/a:Code"/> 417 409 </td> 418 410 <td> 411 <xsl:attribute name="ID"> 412 <xsl:value-of select="a:CCRDataObjectID"></xsl:value-of> 413 </xsl:attribute> 419 414 <xsl:value-of select="a:Description/a:Text"/> 420 415 </td> … … 457 452 <xsl:call-template name="ccdID"> 458 453 <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/> 459 <xsl:with-param name="suffix"> .1</xsl:with-param>454 <xsl:with-param name="suffix"></xsl:with-param> 460 455 </xsl:call-template> 461 456 … … 2099 2094 </xsl:attribute> 2100 2095 <xsl:attribute name="root"> 2101 <xsl:text>CCR Actor ObjectID</xsl:text>2096 <xsl:text>CCRActorID</xsl:text> 2102 2097 </xsl:attribute> 2103 2098 </xsl:otherwise> 2104 2099 </xsl:choose> 2105 2100 </id> 2106 </xsl:template> 2107 2101 <xsl:if test="$CCRActor/a:Organization"> 2102 <name><xsl:value-of select="$CCRActor/a:Organization/a:Name"></xsl:value-of></name> 2103 </xsl:if> 2104 </xsl:template> 2108 2105 <xsl:template name="ccdAddress"> 2109 2106 <xsl:param name="CCRActorAddress"/> … … 2126 2123 <xsl:value-of select="$CCRActorAddress/a:State"/> 2127 2124 </state> 2128 <postal code>2125 <postalCode> 2129 2126 <xsl:value-of select="$CCRActorAddress/a:PostalCode"/> 2130 </postal code>2127 </postalCode> 2131 2128 </xsl:when> 2132 2129 <xsl:otherwise> … … 2136 2133 </addr> 2137 2134 </xsl:template> 2138 2135 2139 2136 <xsl:template name="ccdTelecom"> 2140 2137 <xsl:param name="CCRActor"/> 2141 <telecom>2142 <xsl:if test="$CCRActor/a:Telephone">2143 <xsl:attribute name="use">2138 <xsl:if test="$CCRActor/a:Telephone"> 2139 <telecom> 2140 <xsl:attribute name="use"> 2144 2141 <xsl:call-template name="CDAVocabularyLookup"> 2145 2142 <xsl:with-param name="domain" select="'telecommunicationsAddressUse'"/> … … 2151 2148 <xsl:value-of select="$CCRActor/a:Telephone[1]/a:Value"/> 2152 2149 </xsl:attribute> 2150 </telecom> 2153 2151 </xsl:if> 2154 </telecom> 2155 2152 2156 2153 <xsl:if test="$CCRActor/a:Email"> 2157 2154 <telecom> … … 2185 2182 <xsl:value-of select="$suffix"></xsl:value-of> 2186 2183 </xsl:attribute> 2187 <xsl:attribute name=" root">CCR ObjectID</xsl:attribute>2184 <xsl:attribute name="extension">CCRObjectID</xsl:attribute> 2188 2185 </id> 2189 2186 </xsl:template>
Note:
See TracChangeset
for help on using the changeset viewer.