├── documentation ├── img │ ├── btM.gif │ ├── btP.gif │ ├── cBL.gif │ ├── cBR.gif │ ├── cTL.gif │ ├── cTR.gif │ ├── lB.gif │ ├── lL.gif │ ├── lR.gif │ ├── lT.gif │ ├── tplN12.gif │ ├── tplN16.gif │ └── hierarchy_arrow.gif └── docHtml.css ├── cda_narrativeblock.xml ├── cda_l10n.xsl ├── cda_l10n.xsd └── README.md /documentation/img/btM.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/btM.gif -------------------------------------------------------------------------------- /documentation/img/btP.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/btP.gif -------------------------------------------------------------------------------- /documentation/img/cBL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/cBL.gif -------------------------------------------------------------------------------- /documentation/img/cBR.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/cBR.gif -------------------------------------------------------------------------------- /documentation/img/cTL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/cTL.gif -------------------------------------------------------------------------------- /documentation/img/cTR.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/cTR.gif -------------------------------------------------------------------------------- /documentation/img/lB.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/lB.gif -------------------------------------------------------------------------------- /documentation/img/lL.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/lL.gif -------------------------------------------------------------------------------- /documentation/img/lR.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/lR.gif -------------------------------------------------------------------------------- /documentation/img/lT.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/lT.gif -------------------------------------------------------------------------------- /documentation/img/tplN12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/tplN12.gif -------------------------------------------------------------------------------- /documentation/img/tplN16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/tplN16.gif -------------------------------------------------------------------------------- /documentation/img/hierarchy_arrow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HL7/CDA-core-xsl/HEAD/documentation/img/hierarchy_arrow.gif -------------------------------------------------------------------------------- /cda_narrativeblock.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | -------------------------------------------------------------------------------- /cda_l10n.xsl: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | CDA Language File 9 | 10 | 19 | 20 | 21 | 22 | 23 | 24 | 27 | 28 | 29 |
25 |

CDA Language File

26 |
 
30 |

31 |

32 |

Supported languages ()

33 |

34 |

35 |
    36 | 37 |
  • 38 | 39 | - 40 | 41 |
  • 42 |
    43 |
44 |
45 |

46 | 47 | 48 | 49 | 55 | 56 | 57 | 58 | 64 | 65 | 66 | 67 | 68 | 69 |
50 | Key 51 | ( 52 | 53 | ) 54 | 59 | 60 | ( 61 | 62 | ) 63 |
70 |

71 | 72 | 73 |
74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 |
91 | -------------------------------------------------------------------------------- /cda_l10n.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | Allows both a choice out of the list of selected languages or a language patterend ll-cc 43 | 44 | 45 | 46 | 47 | 48 | A list of some selected languages 49 | 50 | 51 | 52 | 53 | English in the USA 54 | 55 | 56 | 57 | 58 | English in the UK 59 | 60 | 61 | 62 | 63 | German in Germany 64 | 65 | 66 | 67 | 68 | German in Switserland 69 | 70 | 71 | 72 | 73 | German in Italy 74 | 75 | 76 | 77 | 78 | Spanish in Spain 79 | 80 | 81 | 82 | 83 | French in Belgium 84 | 85 | 86 | 87 | 88 | French in Switzerland 89 | 90 | 91 | 92 | 93 | French in France 94 | 95 | 96 | 97 | 98 | Italian in Italy 99 | 100 | 101 | 102 | 103 | Italian in Switzerland 104 | 105 | 106 | 107 | 108 | Dutch in Belgium 109 | 110 | 111 | 112 | 113 | Dutch in the Netherlands 114 | 115 | 116 | 117 | 118 | Portuguese in Brazil 119 | 120 | 121 | 122 | 123 | 124 | 125 | A pattern for languages ll(-cc), so where country/region is optional 126 | 127 | 128 | 129 | 130 | other 131 | 132 | 133 | 134 | 135 | 136 | -------------------------------------------------------------------------------- /documentation/docHtml.css: -------------------------------------------------------------------------------- 1 | /*---------------------------------------- 2 | Global 3 | -----------------------------------------*/ 4 | 5 | body{ 6 | } 7 | body, table { 8 | font-family:arial, helvetica, sans-serif; 9 | font-size:12px; 10 | } 11 | 12 | @media print{ 13 | body, table { 14 | font-size:10px; 15 | } 16 | } 17 | 18 | /*-------------------------------------------- 19 | Source code in the instance, source or 20 | annotations. 21 | --------------------------------------------*/ 22 | span.tEl { 23 | color: #000096; 24 | background-color:inherit; 25 | } 26 | span.tXSLEl { 27 | color: #0064C8; 28 | background-color:inherit; 29 | } 30 | span.tAN { 31 | color: #F5844C; 32 | background-color:inherit; 33 | } 34 | span.tAV { 35 | color: #993300; 36 | background-color:inherit; 37 | } 38 | span.tI { 39 | color: #000000; 40 | background-color:inherit; 41 | } 42 | span.tT { 43 | color: #000000; 44 | background-color:inherit; 45 | } 46 | span.tC { 47 | color: #006400; 48 | background-color:inherit; 49 | } 50 | span.tCD { 51 | color: #008C00; 52 | background-color:inherit; 53 | } 54 | span.tPI { 55 | color: #8B26C9; 56 | background-color:inherit; 57 | } 58 | span.tEn { 59 | color: #969600; 60 | background-color:inherit; 61 | } 62 | /* Title sections */ 63 | span.qname{ 64 | color:black; 65 | background-color:inherit; 66 | } 67 | 68 | span.titleTemplateName{ 69 | background-image:url('img/tplN16.gif'); 70 | background-position:left 0; 71 | background-repeat:no-repeat; 72 | padding-left:20px; 73 | color:black; 74 | } 75 | 76 | span.titleTemplateMatch { 77 | color:black; 78 | background-color:inherit; 79 | margin-left:5px; 80 | margin-right:10px; 81 | } 82 | 83 | span.titleTemplateMode:before { 84 | content:'['; 85 | /*margin-left:10px;*/ 86 | } 87 | span.titleTemplateMode:after { 88 | content:']'; 89 | } 90 | span.titleTemplateMode { 91 | color:gray; 92 | background-color:inherit; 93 | font-style:italic; 94 | } 95 | 96 | .fParams { 97 | color:rgb(100, 100, 100); 98 | } 99 | 100 | .refItemBlock { 101 | display:inline; 102 | } 103 | 104 | .refItemSep { 105 | display:inline; 106 | } 107 | 108 | div.indentWrapDiv { 109 | margin-left:25px; 110 | text-indent: -25px; 111 | } 112 | 113 | /* Template reference sections*/ 114 | .nRf{ 115 | background-image:url('img/tplN12.gif'); 116 | background-repeat:no-repeat; 117 | padding-left:14px; 118 | margin-right:4px; 119 | } 120 | 121 | .mRfI{ 122 | margin-right:4px; 123 | 124 | } 125 | 126 | .mRf{ 127 | margin-right:4px; 128 | } 129 | 130 | .cRfI{ 131 | } 132 | 133 | .mdRf:before { 134 | content:'['; 135 | margin-left:4px; 136 | } 137 | .mdRf:after{ 138 | content:']'; 139 | } 140 | .mdRf{ 141 | color:gray; 142 | font-style:italic; 143 | } 144 | 145 | /* Indent the wrapping lines to the right. 146 | Only the first line is at 0, the rest are 147 | some distance to the right.*/ 148 | .rt_content div[id]{ 149 | /*margin-left:30px;*/ 150 | } 151 | 152 | /*----------------------------------------- 153 | Documentation sections. 154 | ------------------------------------------*/ 155 | 156 | div.cmpT { 157 | font-size:1.4em; 158 | font-weight:bold; 159 | text-align:left; 160 | margin-top:1.4em; 161 | margin-bottom:0.7em; 162 | } 163 | div.cmpT{ 164 | /* color:rgb(255, 160, 100);*/ 165 | color:#333333; 166 | background-color:inherit; 167 | } 168 | 169 | 170 | /* Tables. */ 171 | 172 | td, th { 173 | padding:2px 2px 2px 5px; 174 | text-align:left; 175 | vertical-align:top; 176 | } 177 | 178 | tr > th { 179 | background-color:rgb(206, 239, 174); 180 | color:inherit; 181 | } 182 | 183 | /* Contrast for the titles*/ 184 | table.component { 185 | width:100%; 186 | border-spacing:1px; 187 | } 188 | 189 | @media print{ 190 | table.component{ 191 | border:1px solid gray; 192 | border-collapse:collapse; 193 | } 194 | 195 | table.component td{ 196 | border:1px solid gray; 197 | } 198 | } 199 | 200 | 201 | 202 | table.component td.fCol{ 203 | /* pink */ 204 | /*background-color:#FFC0C0;*/ 205 | /*green */ 206 | background-color:rgb(210, 240, 180); 207 | /*bleu*/ 208 | /*background-color:#89C6E2;*/ 209 | /*orange*/ 210 | /*background-color:#FFD697;*/ 211 | /*brown*/ 212 | /*background-color:#D5BC8E;*/ 213 | /*lilla*/ 214 | /*background-color:#DDDDFF;*/ 215 | /*gray-bleu*/ 216 | /*background-color:#CAD0DD;*/ 217 | /*brown-light*/ 218 | /*background-color:#DECFB8;*/ 219 | /*gray-green*/ 220 | /*background-color:#C6D0CD;*/ 221 | /*bleu-2*/ 222 | /*background-color:#B5D5FF;*/ 223 | /*gray*/ 224 | /*background-color:#CCCCCC;*/ 225 | 226 | 227 | /*bleu 228 | background-color:#C4DAF4; 229 | */ 230 | 231 | 232 | width:12%; 233 | color:black; 234 | } 235 | 236 | td.paramName { 237 | width:10%; 238 | } 239 | 240 | .paramDesc { 241 | margin-top:3px; 242 | margin-bottom:3px; 243 | } 244 | 245 | table.component table td.fCol{ 246 | border:none; 247 | width:12%; 248 | background-color:rgb(225, 245, 206); 249 | color: inherit; 250 | } 251 | 252 | td.fCol b{ 253 | font-weight:normal; 254 | } 255 | 256 | 257 | /* The Name and Expand/Collapse control are on the same line 258 | but at different ends.*/ 259 | td.fCol div.flL{ 260 | float:left; 261 | } 262 | td.fCol div.flR{ 263 | float:right; 264 | } 265 | 266 | /* Subtables */ 267 | table.component table{ 268 | width:100%; 269 | } 270 | table.component table, 271 | table.component table td, 272 | table.component table th{ 273 | border:0; 274 | } 275 | 276 | 277 | /* Properties table */ 278 | table.propertiesTable { 279 | border-spacing:1px; 280 | } 281 | table.propertiesTable td.fCol{ 282 | width:140px; 283 | text-transform:capitalize; 284 | } 285 | /* Used by table */ 286 | table.uBT { 287 | border-spacing:1px; 288 | } 289 | table.uBT td.fCol{ 290 | width:140px; 291 | text-transform:capitalize; 292 | } 293 | 294 | /* Facets table*/ 295 | table.facetsTable { 296 | border-spacing:1px; 297 | } 298 | table.facetsTable td.fCol{ 299 | width:140px; 300 | text-transform:capitalize; 301 | } 302 | 303 | /* Attributes table */ 304 | table.attsT { 305 | border-spacing:1px; 306 | } 307 | table.attsT th{ 308 | font-weight:normal; 309 | } 310 | table.attsT tr:hover{ 311 | color:inherit; 312 | background-color:rgb(225,245,206); 313 | } 314 | 315 | 316 | /* Identity constraints table */ 317 | table.identityConstraintsTable { 318 | border-spacing:1px; 319 | } 320 | table.identityConstraintsTable th{ 321 | font-weight:normal; 322 | } 323 | table.identityConstraintsTable tr:hover{ 324 | color:inherit; 325 | background-color:rgb(225,245,206); 326 | } 327 | 328 | 329 | 330 | /*--------------------------------------- 331 | The diagram. 332 | ----------------------------------------*/ 333 | 334 | table.component td.diagram { 335 | background-color:white; 336 | color:inherit; 337 | } 338 | 339 | 340 | /* This table is a workaround for an IE bug regarding pre-wrap */ 341 | table.pWCont, 342 | table.pWCont td{ 343 | border:0; 344 | margin:0; 345 | padding:0; 346 | } 347 | 348 | 349 | /* Annotations. */ 350 | div.annotation{ 351 | } 352 | div.annotation pre{ 353 | font-family:arial, helvetica, sans-serif; 354 | margin:0; 355 | } 356 | div.annotation, 357 | div.annotation table, 358 | div.annotation table td{ 359 | margin:0; 360 | padding:0; 361 | } 362 | 363 | /* Hierarchy */ 364 | ul > li{ 365 | list-style:none; 366 | } 367 | 368 | ul { 369 | margin:2px; 370 | padding:0; 371 | } 372 | 373 | ul ul li { 374 | padding-left:10px; 375 | 376 | list-style-image:url('img/hierarchy_arrow.gif'); 377 | list-style-position:inside; 378 | } 379 | 380 | /*------------------------------------- 381 | Rounded tables. 382 | ---------------------------------------*/ 383 | 384 | table.rt, 385 | table.rt_with_bg{ 386 | border-collapse:collapse; 387 | border-spacing:0; 388 | width:100%; 389 | } 390 | table.rt_with_bg{ 391 | /*background-color:#C0F0A0;*/ 392 | background-color:white; 393 | color:inherit; 394 | } 395 | 396 | 397 | .rt_cTL{ 398 | background-color:transparent; 399 | background-repeat:no-repeat; 400 | background-position:right; 401 | width:8px; 402 | height:8px; 403 | margin:0; 404 | padding:0; 405 | } 406 | .rt_cTL{ 407 | background-image:url('img/cTL.gif'); 408 | } 409 | 410 | 411 | .rt_cBL{ 412 | background-color:transparent; 413 | background-repeat:no-repeat; 414 | background-position:right; 415 | width:8px; 416 | height:8px; 417 | margin:0; 418 | padding:0; 419 | } 420 | .rt_cBL{ 421 | background-image:url('img/cBL.gif'); 422 | } 423 | 424 | 425 | .rt_cTR{ 426 | background-color:transparent; 427 | background-repeat:no-repeat; 428 | width:8px; 429 | height:8px; 430 | margin:0; 431 | padding:0; 432 | 433 | } 434 | .rt_cTR{ 435 | background-image:url('img/cTR.gif'); 436 | } 437 | 438 | 439 | .rt_cBR{ 440 | background-color:transparent; 441 | background-repeat:no-repeat; 442 | width:8px; 443 | height:8px; 444 | margin:0; 445 | padding:0; 446 | 447 | } 448 | .rt_cBR{ 449 | background-image:url('img/cBR.gif'); 450 | } 451 | 452 | 453 | .rt_cnt{ 454 | background-color:white; 455 | color:inherit; 456 | width:auto; 457 | margin:0; 458 | padding:0; 459 | } 460 | 461 | 462 | .rt_lL{ 463 | background-color:transparent; 464 | background-repeat:repeat-y; 465 | background-position:right; 466 | width:8px; 467 | margin:0; 468 | padding:0; 469 | 470 | } 471 | .rt_lL{ 472 | background-image:url('img/lL.gif'); 473 | } 474 | 475 | 476 | .rt_lR{ 477 | background-repeat:repeat-y; 478 | width:8px; 479 | margin:0; 480 | padding:0; 481 | } 482 | .rt_lR{ 483 | background-image:url('img/lR.gif'); 484 | } 485 | 486 | 487 | .rt_lT{ 488 | background-color:transparent; 489 | background-repeat:repeat-x; 490 | height:8px; 491 | width:auto; 492 | margin:0; 493 | padding:0; 494 | } 495 | .rt_lT{ 496 | background-image:url('img/lT.gif'); 497 | } 498 | 499 | .rt_lB{ 500 | background-color:transparent; 501 | background-repeat:repeat-x; 502 | height:8px; 503 | width:auto; 504 | margin:0; 505 | padding:0; 506 | } 507 | .rt_lB{ 508 | background-image:url('img/lB.gif'); 509 | } 510 | 511 | 512 | /* -------------------------------------- 513 | Controls for bulk showing/hidding sections 514 | from the documentation. 515 | ----------------------------------------*/ 516 | 517 | .globalControls h3{ 518 | margin:0.1em; 519 | font-size:1.2em; 520 | } 521 | 522 | .globalControls table td{ 523 | padding:0; 524 | margin:0; 525 | } 526 | 527 | .globalControls{ 528 | position:fixed; 529 | right:0; 530 | background-color:transparent; 531 | padding-left:0.5em; 532 | padding-right:0.5em; 533 | padding-bottom:0.5em; 534 | width:190px; 535 | } 536 | 537 | @media print{ 538 | .globalControls{ 539 | display:none; 540 | } 541 | } 542 | 543 | /* Expand/collapse of a single section. */ 544 | input.control { 545 | text-align:center; 546 | vertical-align:middle; 547 | padding:0; 548 | padding-right:3px; 549 | padding-bottom:2px; 550 | 551 | } 552 | 553 | 554 | /* close button */ 555 | td.rt_content div span input{ 556 | font-size:0.8em; 557 | } 558 | 559 | @media print{ 560 | input.control{ 561 | display:none; 562 | } 563 | } 564 | 565 | /*----------------------------------------- 566 | Navigation. 567 | ------------------------------------------*/ 568 | a, a:visited { 569 | color:rgb(0, 0, 150); 570 | background-color:inherit; 571 | font-weight: bold; 572 | } 573 | a:link, a:visited { 574 | text-decoration:none; 575 | } 576 | a:hover { 577 | text-decoration:underline; 578 | } 579 | a.iRf { 580 | display: block; 581 | } 582 | 583 | div.toTop{ 584 | text-align:right; 585 | } 586 | div.toTop a{ 587 | font-weight:normal; 588 | } 589 | 590 | /*------------------------------------------ 591 | The second level of index. Floating DIVs 592 | -------------------------------------------*/ 593 | .toc { 594 | } 595 | .toc div.verticalLayout, div.horizontalLayout{ 596 | float:left; 597 | display:block; 598 | 599 | background-color:white; 600 | color:inherit; 601 | 602 | min-width:130px; 603 | min-height:50px; 604 | 605 | padding:0.5em; 606 | } 607 | /* This is not used. */ 608 | .toc div.verticalLayout { 609 | clear:left; 610 | } 611 | 612 | /* Hack for the IE - acts like a minimum height.*/ 613 | * html .toc div.horizontalLayout, 614 | * html .toc div.verticalLayout { 615 | width:120px; 616 | height:60px; 617 | } 618 | 619 | .toc div.componentGroupTitle{ 620 | font-weight:bold; 621 | margin-bottom:0.5em; 622 | color:black; 623 | background-color:inherit; 624 | } 625 | 626 | /* Namespacces or system ids in the TOC. */ 627 | .toc .indexGroupTitle { 628 | font-weight:bold; 629 | margin-bottom:0.5em; 630 | } 631 | 632 | /*---------------- 633 | The footer. 634 | -----------------*/ 635 | .footer{ 636 | margin-top:3em; 637 | } 638 | .redX{ 639 | color:red; 640 | background-color:inherit; 641 | font-size:1.2em; 642 | } 643 | .oXygenLogo{ 644 | color:#1166DD; 645 | background-color:inherit; 646 | font-weight:bold; 647 | font-size:1.2em; 648 | } 649 | 650 | 651 | /* List item from documentation format */ 652 | ul > li.doc{ 653 | list-style:disc; 654 | margin-left:10px; 655 | } 656 | 657 | /* Wrap the long lines in the 'pre' section. */ 658 | pre { 659 | white-space: pre-wrap; /* css-3 */ 660 | white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ 661 | white-space: -pre-wrap; /* Opera 4-6 */ 662 | white-space: -o-pre-wrap; /* Opera 7 */ 663 | word-wrap: break-word; /* Internet Explorer 5.5+ */ 664 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # CDA R2 Stylesheet 2 | Quick Links: [Manual](#manual) - [Localization](#localization) - [Parameters](#parameters) - [Wiki](https://github.com/HL7/cda-core-xsl/wiki) - [Release Notes](https://github.com/HL7/cda-core-xsl/wiki/Revisions) - **[Security Notes](https://github.com/HL7/cda-core-xsl/wiki/Security-Notes)** 3 | 4 | ## Introduction 5 | The CDA Release 2.0 publication comes with an *informative* stylesheet based on [XSLT 1.0](https://www.w3.org/TR/1999/REC-xslt-19991116). The stylesheet is maintained under responsibility of the [Structured Documents Workgroup](https://confluence.hl7.org/display/SD). Publications are under [releases](https://github.com/HL7/cda-core-xsl/releases) 6 | The intent of the stylesheet is to offer an example of how to render a CDA document. It does this by rendering [XHTML 1.0 Strict](https://www.w3.org/TR/xhtml1/) with the following information: 7 | - a summary of the header for the most important context, i.e. patient, author, encounter, documentationOf and inFulFillmentOf 8 | - the section code, title and text (human readable text) 9 | - the full header information 10 | No CDA level 3, i.e. entry level information, is rendered. 11 | ## License 12 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at  13 | [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) 14 | ## Compatibility 15 | The CDA XSL has been tested to work with Saxon-PE and major browsers. Effort has been put in to make rendering friendly for visually impaired people, based on the [American Foundation for the Blind Section 508](http://www.afb.org/info/programs-and-services/public-policy-center/technology-and-information-accessibility/section-508-key-links/1235). Effort has been put in to make the document friendly for screen and for print. 16 | ## Warranty 17 | The CDA XSL is a sample rendering and should be used in that fashion without warranty or guarantees of suitability for a particular purpose. The stylesheet should be tested locally by implementers before production usage. 18 | ## Package Contents 19 | The CDA R2 Stylesheet package contains at minimum two files that you need accessible for CDA documents to call or for programmatic access (see next section "*Manual*") 20 | - CDA.xsl - main logic 21 | - cda_l10n.xml - location file containing translations for terms (as of 4.0.0) 22 | - cda_narrativeblock.xml - lookup file for checking if certain combinations of elements/attributes are legal in the narrative block (as of 4.0.2 beta 10) 23 | ## Manual 24 | There are multiple ways to apply the stylesheet. If you have files on disk or on a webserver for a web browser to consume, you need a hint for the web browser how to render to document. This hint is called a processing instruction and needs to be inserted before the ClinicalDocument element: 25 | 26 | ```xml 27 | 28 | ``` 29 | 30 | or with an absolute path: 31 | 32 | ```xml 33 | 34 | ``` 35 | 36 | The web browser needs to be able to access the relative or absolute location of the stylesheet. For security reasons, you probably want that location to be inside your own environment.  37 | Although the stylesheet supports many parameters, these are not configurable from a browser. If you need a different value for a stylesheet parameter than the default you can either update the default in the stylesheet, or run the stylesheet programmatically e.g. using Saxon-PE. If you update the defaults in the stylesheet, you might have a harder time updating the stylesheet if the base receives updates that you want in your environment too. 38 | Running the stylesheet programmatically could be done in any environment that supports XSLT 1.0. The [major implementations of XSLT](https://en.wikipedia.org/wiki/XSLT) are Saxon, libxslt and Xalan. Example command line call for Saxon where the parameter for rendering the header is set to false could be: 39 | 40 | ```bash 41 | java -jar ../lib/saxon-9/saxon9.jar -s:cda-example.xml -xsl:CDA.xsl -o:cda-example.html dohtmlheader=false mask-ids=2.16.840.1.113883.4.1 42 | ``` 43 | 44 | What this says: 45 | - Run *java*, with the *saxon9.jar* file, to transform input file *cda-example.xml*, using stylesheet *CDA.xsl*, to output file *cda-example.html*, without rendering the header info, and mask any patient ID with root 2.16.840.1.113883.4.1 (US SSN) 46 | ## Localization 47 | One of the core features of the updates to the stylesheet is localization or [l10n](https://acronyms.thefreedictionary.com/l10n). The original stylesheet has traditionally been US English, but the CDA is used all over the world and that means that applicability for other languages makes sense. The language is relevant in finding labels for things like "Patient ID" or "Date of birth", but also for structural attributes like classCode/typeCode/moodCode and NullFlavors. The language strings have been externalized into a separate xml file called cda-l10n.xml. The process works as follows: 48 | - Determine language based on ClinicalDocument/languageCode/@code, unless override is done through parameter textLang -- expected format is 2 char language code from ISO639, followed by a hyphen and a 2 char country code from ISO3166, e.g. en-US. All will be lower-cased before use. 49 | - For any label check if there is a translation element in cda-l10n.xml 50 | - check if requested language is available 51 | - check if match based on the first 2 character language code is available, e.g. en in en-US 52 | - check if match based on the value of parameter textLangDefault is available, normally en-US 53 | - check if match based on the first 2 character language code of parameter textLangDefault is available, e.g. en in en-US 54 | - Finally if all else fails, return key as label 55 | ### Adding support for a new language 56 | Add a line like this in the languageList element at the top of the document: 57 | 58 | ```xml 59 | 60 | ``` 61 | 62 | ### Adding a new string to an existing translation element 63 | Add new strings to existing translation elements as needed. 64 | If the en-US term is sufficient for your language too: you do not need to list it in the language file. Add a line like this in the appropriate translation element: 65 | 66 | ```xml 67 | Patiënt 68 | ``` 69 | 70 | Note that the value for attribute lang needs to exist in the listing of languages at the top of the file. 71 | ### Adding a new translation element 72 | This is only relevant when certain vocabulary or a certain identifier OID is inadvertently not supported. Other strings could only occur if you are updating the stylesheet itself. Add a translation element like this: 73 | 74 | ```xml 75 | 76 | Label: my comment in free text 77 | Patient 78 | Patiënt 79 | 80 | ``` 81 | 82 | Make sure that you have en-US covered at the very least. Other languages as you see fit. 83 | ## Parameters 84 | The stylesheet supports many ways to parametrize. 85 | - `currentDate` 86 | - XSLT 1.0 does not have date function, so we need something to compare against e.g. to get someones age 87 | - Default: /hl7:ClinicalDocument/hl7:effectiveTime/@value 88 | - `vocFile` 89 | - Vocabulary file containing language dependant strings such as labels 90 | - Default: cda_l10n.xml 91 | - `textLangDefault` 92 | - Default language for retrieval of language dependant strings such as labels, e.g. 'en-US'. This is the fallback language in case the string is not available in the actual language. See also `textLang`. 93 | - Default: en-US 94 | - `textLang` 95 | - Actual language for retrieval of language dependant strings such as labels, e.g. 'en-US'. Unless supplied, this is taken from the ClinicalDocument/language/@code attribute, or in case that is not present from `textlangDefault`. 96 | - Default /hl7:ClinicalDocument/hl7:languageCode/@code or if missing the value of $textlangDefault 97 | - `textEncoding` 98 | - Currently unused. Unsupported by Internet Explorer. Text encoding to render the output in. Defaults to UTF-8 which is fine for most environments. Could change into more localized encodings such as cp-1252 (Windows Latin 1), iso-8859-1 (Latin 1), or shift-jis (Japanese Kanji table)) 99 | - Default: utf-8 100 | - `useJavascript` 101 | - Boolean value for whether the result document may contain JavaScript. Some environments forbid the use of JavaScript. Without JavaScript, certain more dynamic features may not work. 102 | - Default: true 103 | - `externalCss` 104 | - Absolute or relative URI to an external Cascading Stylesheet (CSS) file that contains style attributes for custom markup, e.g. in the @styleCode attribute in Section.text 105 | - Default: none 106 | - `font-family` 107 | - Determines the font family for the whole document unless overruled somewhere 108 | - Default: Verdana, Tahoma, sans-serif 109 | - `font-size-main` 110 | - Determines the font size for all text unless otherwise specified, and is the base value for other font sizes 111 | - Default: 9pt 112 | - `font-size-h1` 113 | - Determines the font size for text in the h1 tag 114 | - Defaults to font-size-main + 3 115 | - `font-size-h2` 116 | - Determines the font size for text in the h2 tag 117 | - Defaults to font-size-main + 2 118 | - `font-size-h3` 119 | - Determines the font size for text in the h3 tag 120 | - Defaults to font-size-main + 1 121 | - `font-size-h4` 122 | - Determines the font size for text in the h4 tag 123 | - Defaults to font-size-main 124 | - `font-size-h5` 125 | - Determines the font size for text in the h5 tag 126 | - Defaults to font-size-main 127 | - `font-size-h6` 128 | - Determines the font size for text in the h6 tag 129 | - Defaults to font-size-main 130 | - `font-size-footnote` 131 | - Determines the font size for text in footnotes 132 | - Defaults to font-size-main - 1 133 | - `bgcolor-th` 134 | - Determines the background-color, as any legal hex, rgb or named color, for header like table elements, e.g. th tags 135 | - Defaults to "LightGrey" 136 | - `bgcolor-td` 137 | - Determines the background-color, as any legal hex, rgb or named color, for body like table elements, e.g. td tags, defaults to "#f2f2f2". 138 | - Defaults to "#f2f2f2" 139 | - `dohtmlheader` 140 | - Determines if the document title and top level summary of header information (patient/guardian/author/encounter/documentationOf, inFulfillmentOf) should be rendered. Defaults to "true", any other value is interpreted as "do not render". Some systems may have a context around the rendering of the document that would make rendering the header superfluous. Note that the footer, which may be switched off separately contains everything that the header does and more. 141 | - Default: true 142 | - `dohtmlfooter` 143 | - Determines if the document footer containing a listing of everything in the CDA Header should be rendered. Defaults to "true", any other value is interpreted as "do not render". Some systems may have a context around the rendering of the document that would make rendering the footer superfluous, or just want to concentrate on document contents. 144 | - Default: true 145 | - `menu-depth` 146 | - Determines depth of table of contents menu at the top of the document. Default is 1, which means just head section. Max is 3 which is head section + 2 levels (if any) 147 | - Default: 3 148 | - `external-image-whitelist` 149 | - Security parameter. May contain a vertical bar separated list of URI prefixes, such as "http://www.example.com|https://www.example.com". See parameter `limit-external-images` for more detail. 150 | - Default: none 151 | - `limit-external-images` 152 | - Security parameter. When set to 'yes' limits the URIs to images (if any) to locally attached images and/or images that are on the `external-image-whitelist`. When set to anything other than 'yes' also allows for arbritrary external images (e.g. through http:// or https://). Default value is 'yes' which is considered defensive against potential security risks that could stem from resources loaded from arbitrary source. 153 | - Default: yes 154 | - `limit-pdf` 155 | - Security parameter. When set to 'yes' [sandboxes the iframe](https://html.spec.whatwg.org/multipage/origin.html#sandboxed-plugins-browsing-context-flag) for pdfs. Sandboxed iframe disallow plug-ins, including the plug-in needed to render pdf. Effectively this setting thus prohibits pdf rendering. When set to anything other than 'yes', pdf carrying iframes are not sandboxed and pdf rendering is possible. Default value is 'yes' which is considered defensive against potential security risks that could stem from resources loaded from arbitrary source. 156 | - Default: yes 157 | - `mask-ids` 158 | - Privacy parameter. Accepts a comma separated list of patient ID root values (normally OID's). When a patient ID is encountered with a root value in this list, then the rendering of the extension will be xxx-xxx-xxx regardless of what the actual value is. This is useful to prevent public display of for example the US SSN. Default is to render any ID as it occurs in the document. Note that this setting only affects human rendering and that it does not affect automated processing of the underlying document. If the same value also occurs in the `skip-ids` list, then that takes precedence. 159 | - Default: none 160 | - `skip-ids` 161 | - Privacy parameter. Accepts a comma separated list of patient ID root values (normally OID's). When a patient ID is encountered with a root value in this list, then the rendering of this ID will be skipped. This is useful to prevent public display of for example the US SSN. Default is to render any ID as it occurs in the document. Note that this setting only affects human rendering and that it does not affect automated processing of the underlying document. 162 | - Default: none 163 | - `section-order` 164 | - Provides a list of top level section codes, comma separated, matching the section/code/@code attribute. If the list is empty, then default to document order. First in list, means first on screen. Any sections without a match are rendered in document order after the last matching section. If none of the top-level sections match, the order defaults to document order. Example: `42348-3,46240-8` 165 | - `dosectionnumbering` 166 | - Determines if sections will receive numbering according to ClinicalDocument order. Value 'true' activates numbering. Top level sections are 1, 2, 3, 4, sub level sections are 1.1, 1.2, 1.2.1, 1.2.2 etc. 167 | - Default: false 168 | ## Acknowledgements 169 | The stylesheet is the cumulative work of several developers; the most significant prior milestones were the foundation work from Lantana Group, HL7 Germany and Finland (Tyylitiedosto) and HL7 US (Calvin Beebe), and the presentation approach from Tony Schaller, medshare GmbH provided at IHIC 2009. 170 | --------------------------------------------------------------------------------