Ignore:
Timestamp:
Oct 27, 2010, 7:48:01 PM (14 years ago)
Author:
George Lilly
Message:

latest

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ccr2ccd-xslt/trunk/make/ccr_qrda.xsl

    r991 r994  
    35213521                        </component>
    35223522                    </xsl:if>
     3523                    <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Procedures">
     3524                        <component>
     3525                            <section>
     3526                                <templateId root="2.16.840.1.113883.10.20.1.12"/>
     3527                                <code code="47519-4" codeSystem="2.16.840.1.113883.6.1"/>
     3528                                <title>Procedures</title>
     3529                                <text>
     3530                                    <table>
     3531                                        <tbody>
     3532                                            <tr>
     3533                                                <th>Type</th>
     3534                                                <th>Date</th>
     3535                                                <th>Code</th>
     3536                                                <th>Description</th>
     3537                                                <th>Location</th>
     3538                                                <th>Substance</th>
     3539                                                <th>Method</th>
     3540                                                <th>Position</th>
     3541                                                <th>Site</th>
     3542                                                <th>Status</th>
     3543                                                <th>Source</th>
     3544                                            </tr>
     3545                                            <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3546                                                <tr>
     3547                                                    <xsl:attribute name="id">
     3548                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3549                                                    </xsl:attribute>
     3550
     3551                                                    <td>
     3552                                                        <xsl:value-of select="a:Type/a:Text"/>
     3553                                                    </td>
     3554                                                    <table>
     3555                                                        <tbody>
     3556                                                            <xsl:apply-templates select="a:DateTime"/>
     3557                                                        </tbody>
     3558                                                    </table>
     3559                                                    <td>
     3560                                                        <xsl:apply-templates select="a:Description/a:Code"/>
     3561                                                    </td>
     3562                                                    <td>
     3563                                                        <xsl:value-of select="a:Description/a:Text"/>
     3564                                                    </td>
     3565                                                    <td>
     3566                                                        <xsl:for-each select="a:Locations/a:Location">
     3567                                                            <xsl:value-of select="a:Description/a:Text"/>
     3568                                                            <xsl:if test="a:Actor">
     3569                                                                (<xsl:call-template name="actorName">
     3570                                                                    <xsl:with-param name="objID" select="a:Actor/a:ActorID"/>
     3571                                                                </xsl:call-template>
     3572                                                                <xsl:if test="a:Actor/a:ActorRole/a:Text">
     3573                                                                    <xsl:text xml:space="preserve"> - </xsl:text><xsl:value-of select="a:ActorRole/a:Text"/>)
     3574                                                                </xsl:if>
     3575                                                            </xsl:if>)
     3576                                                            <xsl:if test="position() != last()">
     3577                                                                <br/>
     3578                                                            </xsl:if>
     3579                                                        </xsl:for-each>
     3580                                                    </td>
     3581                                                    <td>
     3582                                                        <xsl:for-each select="a:Substance">
     3583                                                            <xsl:value-of select="a:Text"/>
     3584                                                        </xsl:for-each>
     3585                                                    </td>
     3586                                                    <td>
     3587                                                        <xsl:value-of select="a:Method/a:Text"/>
     3588                                                    </td>
     3589                                                    <td>
     3590                                                        <xsl:value-of select="a:Position/a:Text"/>
     3591                                                    </td>
     3592                                                    <td>
     3593                                                        <xsl:value-of select="a:Site/a:Text"/>
     3594                                                    </td>
     3595                                                    <td>
     3596                                                        <xsl:value-of select="a:Status/a:Text"/>
     3597                                                    </td>
     3598                                                    <td>
     3599                                                        <xsl:call-template name="actorName">
     3600                                                            <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
     3601                                                        </xsl:call-template>
     3602                                                    </td>
     3603                                                </tr>
     3604                                            </xsl:for-each>
     3605                                        </tbody>
     3606                                    </table>
     3607                                </text>
     3608
     3609                                <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3610                                    <entry typeCode="DRIV">
     3611                                        <procedure classCode="PROC" moodCode="EVN">
     3612                                            <templateId root="2.16.840.1.113883.3.88.11.83.17" assigningAuthorityName="HITSP C83"/>
     3613                                            <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
     3614                                            <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
     3615
     3616                                            <!-- <id> -->
     3617                                            <xsl:call-template name="ccdID">
     3618                                                <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
     3619                                            </xsl:call-template>
     3620
     3621                                            <!-- <code> -->
     3622                                            <xsl:call-template name="ccdCodedValue">
     3623                                                <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
     3624                                                <xsl:with-param name="nodeName" select="'code'"/>
     3625                                            </xsl:call-template>
     3626
     3627                                            <text>
     3628                                                <reference>
     3629                                                    <xsl:attribute name="value">
     3630                                                        <xsl:text>#</xsl:text>
     3631                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3632                                                    </xsl:attribute>
     3633                                                </reference>
     3634                                            </text>
     3635
     3636                                            <xsl:call-template name="ccdStatusProcedure">
     3637                                                <xsl:with-param name="status" select="a:Status"/>
     3638                                            </xsl:call-template>
     3639
     3640                                            <xsl:call-template name="ccdDateTime">
     3641                                                <xsl:with-param name="dt" select="a:DateTime"/>
     3642                                            </xsl:call-template>
     3643
     3644                                            <xsl:if test="a:Method">
     3645                                                <xsl:call-template name="ccdCodedValue">
     3646                                                    <xsl:with-param name="ccrCodedDescription" select="a:Method"/>
     3647                                                    <xsl:with-param name="nodeName" select="'approachSiteCode'"/>
     3648                                                </xsl:call-template>
     3649                                            </xsl:if>
     3650
     3651                                            <xsl:if test="a:Site">
     3652                                                <xsl:call-template name="ccdCodedValue">
     3653                                                    <xsl:with-param name="ccrCodedDescription" select="a:Site"/>
     3654                                                    <xsl:with-param name="nodeName" select="'targetSiteCode'"/>
     3655                                                </xsl:call-template>
     3656                                            </xsl:if>
     3657
     3658                                            <xsl:if test="a:Practitioners/a:Practitioner">
     3659                                                <xsl:call-template name="ccdPerformer">
     3660                                                    <xsl:with-param name="ccrActorReference" select="a:Practitioners/a:Practitioner[1]"/>
     3661                                                </xsl:call-template>
     3662                                            </xsl:if>
     3663                                        </procedure>
     3664                                    </entry>
     3665                                </xsl:for-each>
     3666                            </section>
     3667                        </component>
     3668                    </xsl:if>
     3669                    <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Procedures">
     3670                        <component>
     3671                            <section>
     3672                                <templateId root="2.16.840.1.113883.10.20.1.12"/>
     3673                                <code code="47519-4" codeSystem="2.16.840.1.113883.6.1"/>
     3674                                <title>Procedures</title>
     3675                                <text>
     3676                                    <table>
     3677                                        <tbody>
     3678                                            <tr>
     3679                                                <th>Type</th>
     3680                                                <th>Date</th>
     3681                                                <th>Code</th>
     3682                                                <th>Description</th>
     3683                                                <th>Location</th>
     3684                                                <th>Substance</th>
     3685                                                <th>Method</th>
     3686                                                <th>Position</th>
     3687                                                <th>Site</th>
     3688                                                <th>Status</th>
     3689                                                <th>Source</th>
     3690                                            </tr>
     3691                                            <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3692                                                <tr>
     3693                                                    <xsl:attribute name="id">
     3694                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3695                                                    </xsl:attribute>
     3696
     3697                                                    <td>
     3698                                                        <xsl:value-of select="a:Type/a:Text"/>
     3699                                                    </td>
     3700                                                    <table>
     3701                                                        <tbody>
     3702                                                            <xsl:apply-templates select="a:DateTime"/>
     3703                                                        </tbody>
     3704                                                    </table>
     3705                                                    <td>
     3706                                                        <xsl:apply-templates select="a:Description/a:Code"/>
     3707                                                    </td>
     3708                                                    <td>
     3709                                                        <xsl:value-of select="a:Description/a:Text"/>
     3710                                                    </td>
     3711                                                    <td>
     3712                                                        <xsl:for-each select="a:Locations/a:Location">
     3713                                                            <xsl:value-of select="a:Description/a:Text"/>
     3714                                                            <xsl:if test="a:Actor">
     3715                                                                (<xsl:call-template name="actorName">
     3716                                                                    <xsl:with-param name="objID" select="a:Actor/a:ActorID"/>
     3717                                                                </xsl:call-template>
     3718                                                                <xsl:if test="a:Actor/a:ActorRole/a:Text">
     3719                                                                    <xsl:text xml:space="preserve"> - </xsl:text><xsl:value-of select="a:ActorRole/a:Text"/>)
     3720                                                                </xsl:if>
     3721                                                            </xsl:if>)
     3722                                                            <xsl:if test="position() != last()">
     3723                                                                <br/>
     3724                                                            </xsl:if>
     3725                                                        </xsl:for-each>
     3726                                                    </td>
     3727                                                    <td>
     3728                                                        <xsl:for-each select="a:Substance">
     3729                                                            <xsl:value-of select="a:Text"/>
     3730                                                        </xsl:for-each>
     3731                                                    </td>
     3732                                                    <td>
     3733                                                        <xsl:value-of select="a:Method/a:Text"/>
     3734                                                    </td>
     3735                                                    <td>
     3736                                                        <xsl:value-of select="a:Position/a:Text"/>
     3737                                                    </td>
     3738                                                    <td>
     3739                                                        <xsl:value-of select="a:Site/a:Text"/>
     3740                                                    </td>
     3741                                                    <td>
     3742                                                        <xsl:value-of select="a:Status/a:Text"/>
     3743                                                    </td>
     3744                                                    <td>
     3745                                                        <xsl:call-template name="actorName">
     3746                                                            <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
     3747                                                        </xsl:call-template>
     3748                                                    </td>
     3749                                                </tr>
     3750                                            </xsl:for-each>
     3751                                        </tbody>
     3752                                    </table>
     3753                                </text>
     3754
     3755                                <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3756                                    <entry typeCode="DRIV">
     3757                                        <procedure classCode="PROC" moodCode="EVN">
     3758                                            <templateId root="2.16.840.1.113883.3.88.11.83.17" assigningAuthorityName="HITSP C83"/>
     3759                                            <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
     3760                                            <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
     3761
     3762                                            <!-- <id> -->
     3763                                            <xsl:call-template name="ccdID">
     3764                                                <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
     3765                                            </xsl:call-template>
     3766
     3767                                            <!-- <code> -->
     3768                                            <xsl:call-template name="ccdCodedValue">
     3769                                                <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
     3770                                                <xsl:with-param name="nodeName" select="'code'"/>
     3771                                            </xsl:call-template>
     3772
     3773                                            <text>
     3774                                                <reference>
     3775                                                    <xsl:attribute name="value">
     3776                                                        <xsl:text>#</xsl:text>
     3777                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3778                                                    </xsl:attribute>
     3779                                                </reference>
     3780                                            </text>
     3781
     3782                                            <xsl:call-template name="ccdStatusProcedure">
     3783                                                <xsl:with-param name="status" select="a:Status"/>
     3784                                            </xsl:call-template>
     3785
     3786                                            <xsl:call-template name="ccdDateTime">
     3787                                                <xsl:with-param name="dt" select="a:DateTime"/>
     3788                                            </xsl:call-template>
     3789
     3790                                            <xsl:if test="a:Method">
     3791                                                <xsl:call-template name="ccdCodedValue">
     3792                                                    <xsl:with-param name="ccrCodedDescription" select="a:Method"/>
     3793                                                    <xsl:with-param name="nodeName" select="'approachSiteCode'"/>
     3794                                                </xsl:call-template>
     3795                                            </xsl:if>
     3796
     3797                                            <xsl:if test="a:Site">
     3798                                                <xsl:call-template name="ccdCodedValue">
     3799                                                    <xsl:with-param name="ccrCodedDescription" select="a:Site"/>
     3800                                                    <xsl:with-param name="nodeName" select="'targetSiteCode'"/>
     3801                                                </xsl:call-template>
     3802                                            </xsl:if>
     3803
     3804                                            <xsl:if test="a:Practitioners/a:Practitioner">
     3805                                                <xsl:call-template name="ccdPerformer">
     3806                                                    <xsl:with-param name="ccrActorReference" select="a:Practitioners/a:Practitioner[1]"/>
     3807                                                </xsl:call-template>
     3808                                            </xsl:if>
     3809                                        </procedure>
     3810                                    </entry>
     3811                                </xsl:for-each>
     3812                            </section>
     3813                        </component>
     3814                    </xsl:if>
     3815                    <xsl:if test="a:ContinuityOfCareRecord/a:Body/a:Procedures">
     3816                        <component>
     3817                            <section>
     3818                                <templateId root="2.16.840.1.113883.10.20.1.12"/>
     3819                                <code code="47519-4" codeSystem="2.16.840.1.113883.6.1"/>
     3820                                <title>Procedures</title>
     3821                                <text>
     3822                                    <table>
     3823                                        <tbody>
     3824                                            <tr>
     3825                                                <th>Type</th>
     3826                                                <th>Date</th>
     3827                                                <th>Code</th>
     3828                                                <th>Description</th>
     3829                                                <th>Location</th>
     3830                                                <th>Substance</th>
     3831                                                <th>Method</th>
     3832                                                <th>Position</th>
     3833                                                <th>Site</th>
     3834                                                <th>Status</th>
     3835                                                <th>Source</th>
     3836                                            </tr>
     3837                                            <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3838                                                <tr>
     3839                                                    <xsl:attribute name="id">
     3840                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3841                                                    </xsl:attribute>
     3842
     3843                                                    <td>
     3844                                                        <xsl:value-of select="a:Type/a:Text"/>
     3845                                                    </td>
     3846                                                    <table>
     3847                                                        <tbody>
     3848                                                            <xsl:apply-templates select="a:DateTime"/>
     3849                                                        </tbody>
     3850                                                    </table>
     3851                                                    <td>
     3852                                                        <xsl:apply-templates select="a:Description/a:Code"/>
     3853                                                    </td>
     3854                                                    <td>
     3855                                                        <xsl:value-of select="a:Description/a:Text"/>
     3856                                                    </td>
     3857                                                    <td>
     3858                                                        <xsl:for-each select="a:Locations/a:Location">
     3859                                                            <xsl:value-of select="a:Description/a:Text"/>
     3860                                                            <xsl:if test="a:Actor">
     3861                                                                (<xsl:call-template name="actorName">
     3862                                                                    <xsl:with-param name="objID" select="a:Actor/a:ActorID"/>
     3863                                                                </xsl:call-template>
     3864                                                                <xsl:if test="a:Actor/a:ActorRole/a:Text">
     3865                                                                    <xsl:text xml:space="preserve"> - </xsl:text><xsl:value-of select="a:ActorRole/a:Text"/>)
     3866                                                                </xsl:if>
     3867                                                            </xsl:if>)
     3868                                                            <xsl:if test="position() != last()">
     3869                                                                <br/>
     3870                                                            </xsl:if>
     3871                                                        </xsl:for-each>
     3872                                                    </td>
     3873                                                    <td>
     3874                                                        <xsl:for-each select="a:Substance">
     3875                                                            <xsl:value-of select="a:Text"/>
     3876                                                        </xsl:for-each>
     3877                                                    </td>
     3878                                                    <td>
     3879                                                        <xsl:value-of select="a:Method/a:Text"/>
     3880                                                    </td>
     3881                                                    <td>
     3882                                                        <xsl:value-of select="a:Position/a:Text"/>
     3883                                                    </td>
     3884                                                    <td>
     3885                                                        <xsl:value-of select="a:Site/a:Text"/>
     3886                                                    </td>
     3887                                                    <td>
     3888                                                        <xsl:value-of select="a:Status/a:Text"/>
     3889                                                    </td>
     3890                                                    <td>
     3891                                                        <xsl:call-template name="actorName">
     3892                                                            <xsl:with-param name="objID" select="a:Source/a:Actor/a:ActorID"/>
     3893                                                        </xsl:call-template>
     3894                                                    </td>
     3895                                                </tr>
     3896                                            </xsl:for-each>
     3897                                        </tbody>
     3898                                    </table>
     3899                                </text>
     3900
     3901                                <xsl:for-each select="/a:ContinuityOfCareRecord/a:Body/a:Procedures/a:Procedure">
     3902                                    <entry typeCode="DRIV">
     3903                                        <procedure classCode="PROC" moodCode="EVN">
     3904                                            <templateId root="2.16.840.1.113883.3.88.11.83.17" assigningAuthorityName="HITSP C83"/>
     3905                                            <templateId root="2.16.840.1.113883.10.20.1.29" assigningAuthorityName="CCD"/>
     3906                                            <templateId root="1.3.6.1.4.1.19376.1.5.3.1.4.19" assigningAuthorityName="IHE PCC"/>
     3907
     3908                                            <!-- <id> -->
     3909                                            <xsl:call-template name="ccdID">
     3910                                                <xsl:with-param name="ccrObjectID" select="a:CCRDataObjectID"/>
     3911                                            </xsl:call-template>
     3912
     3913                                            <!-- <code> -->
     3914                                            <xsl:call-template name="ccdCodedValue">
     3915                                                <xsl:with-param name="ccrCodedDescription" select="a:Description"/>
     3916                                                <xsl:with-param name="nodeName" select="'code'"/>
     3917                                            </xsl:call-template>
     3918
     3919                                            <text>
     3920                                                <reference>
     3921                                                    <xsl:attribute name="value">
     3922                                                        <xsl:text>#</xsl:text>
     3923                                                        <xsl:value-of select="a:CCRDataObjectID"/>
     3924                                                    </xsl:attribute>
     3925                                                </reference>
     3926                                            </text>
     3927
     3928                                            <xsl:call-template name="ccdStatusProcedure">
     3929                                                <xsl:with-param name="status" select="a:Status"/>
     3930                                            </xsl:call-template>
     3931
     3932                                            <xsl:call-template name="ccdDateTime">
     3933                                                <xsl:with-param name="dt" select="a:DateTime"/>
     3934                                            </xsl:call-template>
     3935
     3936                                            <xsl:if test="a:Method">
     3937                                                <xsl:call-template name="ccdCodedValue">
     3938                                                    <xsl:with-param name="ccrCodedDescription" select="a:Method"/>
     3939                                                    <xsl:with-param name="nodeName" select="'approachSiteCode'"/>
     3940                                                </xsl:call-template>
     3941                                            </xsl:if>
     3942
     3943                                            <xsl:if test="a:Site">
     3944                                                <xsl:call-template name="ccdCodedValue">
     3945                                                    <xsl:with-param name="ccrCodedDescription" select="a:Site"/>
     3946                                                    <xsl:with-param name="nodeName" select="'targetSiteCode'"/>
     3947                                                </xsl:call-template>
     3948                                            </xsl:if>
     3949
     3950                                            <xsl:if test="a:Practitioners/a:Practitioner">
     3951                                                <xsl:call-template name="ccdPerformer">
     3952                                                    <xsl:with-param name="ccrActorReference" select="a:Practitioners/a:Practitioner[1]"/>
     3953                                                </xsl:call-template>
     3954                                            </xsl:if>
     3955                                        </procedure>
     3956                                    </entry>
     3957                                </xsl:for-each>
     3958                            </section>
     3959                        </component>
     3960                    </xsl:if>
Note: See TracChangeset for help on using the changeset viewer.