├── .gitignore ├── fhir ├── problems │ └── noKnownProblems.xml ├── results │ ├── RESULT_Use_of_String_Value.xml │ ├── RESULT_Panel_with_Two_Ordinal_Values.xml │ └── RESULT_Value_Less_Than_Physical_Quantity.xml ├── immunizations │ └── Unknown_Immunization_Status.xml ├── allergies_and_adverse_reactions │ └── Domain_Allergies_XMLExamples.xml └── medications │ ├── Domain_Medications_XMLExamples.xml │ ├── alogrithm.md │ └── medication_1.xml ├── .gitmodules ├── cda ├── problems │ └── noKnownProblems.xml ├── results │ ├── RESULT_Use_of_String_Value.xml │ ├── RESULT_Value_Less_Than_Physical_Quantity.xml │ └── RESULT_Panel_with_Two_Ordinal_Values.xml ├── immunizations │ └── Unknown_Immunization_Status.xml ├── medications │ ├── medication_1.xml │ └── Domain_Medications_XMLExamples.xml └── allergies_and_adverse_reactions │ └── Domain_Allergies_XMLExamples.xml ├── README.md └── load_cda.rb /.gitignore: -------------------------------------------------------------------------------- 1 | *sw? 2 | -------------------------------------------------------------------------------- /fhir/problems/noKnownProblems.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fhir/results/RESULT_Use_of_String_Value.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fhir/immunizations/Unknown_Immunization_Status.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fhir/results/RESULT_Panel_with_Two_Ordinal_Values.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fhir/results/RESULT_Value_Less_Than_Physical_Quantity.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /fhir/allergies_and_adverse_reactions/Domain_Allergies_XMLExamples.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | 2 | 3 | [submodule "sample_ccdas"] 4 | path = sample_ccdas 5 | url = https://github.com/chb/sample_ccdas 6 | -------------------------------------------------------------------------------- /cda/problems/noKnownProblems.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /fhir/medications/Domain_Medications_XMLExamples.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | ... 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
Proventil 0.09 MG/ACTUAT inhalant solution2 puffs q6 hours PRN wheezingJan 3, 2011ActiveAsthmaGeneric Substitition Allowed
23 |
24 |
25 |
26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Translating the agreed CDA examples to FHIR 2 | 3 | ## Installation 4 | ``` 5 | git clone https://github.com/FHIR/cda-examples-to-fhir 6 | cd cda-examples-to-fhir 7 | git submodule update # to load smart-platform sample_ccdas 8 | ``` 9 | 10 | ## Description 11 | 12 | Source of examples: http://wiki.hl7.org/index.php?title=CDA_Template_Example_Task_Force 13 | 14 | What does it involve? Well, I think: 15 | * tracking the CDA Example task force output 16 | * creating FHIR equivalents 17 | * adding them to the spec directly, or sending them on to one of the editors (e.g. Me, Lloyd, Ewout) to add 18 | 19 | 20 | 21 | ## File tree description 22 | 23 | * cda folder is loaded automaticaly by script - load_cda.rb (add more sources to script file) 24 | * fhir translation files created automaticaly so you should just fill them with valid content 25 | * sample_ccdas - contains https://github.com/chb/sample_ccdas repository 26 | -------------------------------------------------------------------------------- /cda/results/RESULT_Use_of_String_Value.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Yellow 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /fhir/medications/alogrithm.md: -------------------------------------------------------------------------------- 1 | # Questions 2 | 3 | * What is container for "History of medication use" in FHIR? 4 | * Do we map medications from medication section to MedicationStatment/MedicationPrescription/MedicationAdministration? 5 | * Do we need track identifier from cda, if so - what system? 6 | * How to extract text from cda for concrete medication 7 | * Do translate inline resources - like prescriber or medication? What about nested nested resources (like organization in medication)? 8 | 9 | ## Steps 10 | 11 | * Map medication section LOINC(10160=0) to set of medication statments 12 | 13 | 14 | ## substanceAdministration => MedicationPrescription 15 | 16 | SA = entry/substanceAdministration 17 | MP = MedicationPrescription 18 | 19 | * SA/id => MP.identifier 20 | * ? => dateWritten 21 | * SA/statusCode => MP.status 22 | * SA/entryRelationship[@typeCode="REFR"]/supply/author[@typeCode="AUT"] => MP.prescriber 23 | * SA/entryRelationship[@typeCode="RSON"] => MP.reasonForPrescribing 24 | 25 | * SA/entryRelationship[@typeCode="REFR"/supply/product => MP.medication 26 | 27 | ## author => Practitioner 28 | 29 | * telecom => telecom 30 | * addr => address 31 | 32 | ## SA/entryRelationship/supply/product => medication 33 | 34 | -------------------------------------------------------------------------------- /load_cda.rb: -------------------------------------------------------------------------------- 1 | system('rm -rf cda') 2 | system('mkdir cda') 3 | { 4 | 'ALLERGIES AND ADVERSE REACTIONS' => [ 5 | 'http://raw.github.com/aswain/AnnotatedExamples/XML-Examples/Domain_Allergies_XMLExamples.xml' 6 | ], 7 | 'PROBLEMS' => [ 8 | 'https://raw.github.com/donaldson-ed/taskforceExample/master/noKnownProblems.xml' 9 | ], 10 | 'IMMUNIZATIONS' => [ 11 | 'https://raw.github.com/brettmarquard/HL7-C-CDA-Task-Force-Examples/master/Unknown_Immunization_Status.xml' 12 | ], 13 | 'MEDICATIONS' => [ 14 | 'https://raw.github.com/aswain/AnnotatedExamples/XML-Examples/Domain_Medications_XMLExamples.xml' 15 | ], 16 | 'RESULTS' => [ 17 | 'https://raw.github.com/jddamore/HL7-Task-Force-Examples/master/RESULT_Value_Less_Than_Physical_Quantity.xml', 18 | 'https://raw.github.com/jddamore/HL7-Task-Force-Examples/master/RESULT_Panel_with_Two_Ordinal_Values.xml', 19 | 'https://raw.github.com/jddamore/HL7-Task-Force-Examples/master/RESULT_Use_of_String_Value.xml' 20 | ] 21 | }.each do |section, paths| 22 | dir = section.gsub(' ','_').downcase 23 | system("mkdir cda/#{dir}") 24 | system("mkdir fhir/#{dir}") 25 | paths.each do |pth| 26 | system("cd cda/#{dir} && wget #{pth}") 27 | fhile_name = File.basename(pth) 28 | fhile_path = "fhir/#{dir}/#{fhile_name}" 29 | 30 | unless File.exists?(fhile_path) 31 | system("echo '' >> #{fhile_path}") 32 | end 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /cda/immunizations/Unknown_Immunization_Status.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | Vaccination 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /cda/results/RESULT_Value_Less_Than_Physical_Quantity.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 | -------------------------------------------------------------------------------- /fhir/medications/medication_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 |

Pattricia Patty Primary, M.D.

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 |
Proventil 0.09 MG/ACTUAT inhalant solution2 puffs q6 hours PRN wheezingJan 3, 2011ActiveAsthmaGeneric Substitition Allowed
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/results/RESULT_Panel_with_Two_Ordinal_Values.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 | -------------------------------------------------------------------------------- /cda/medications/medication_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 17 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 31 | 32 | 33 | Medication Factory Inc. 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | Community Health and Hospitals 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 56 | 57 | 60 | Aerosol 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 70 | 73 | 74 | 75 | 76 | 77 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 102 | 106 | 107 | 108 | 109 | Medication Factory Inc. 110 | 111 | 112 | 113 | 114 | 115 | 139 | 140 | 141 | 142 | 143 | 146 | 147 | label in spanish 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | Medication Factory Inc. 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 1016 Health 187 | Drive 188 | Portland 189 | OR 190 | 99123 191 | US 192 | 193 | 194 | 195 | 196 | Susan 197 | Script 198 | Pharm.D. 199 | 200 | 201 | 202 | People's Pharmacy 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /cda/medications/Domain_Medications_XMLExamples.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 11 | MEDICATIONS 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 |
MedicationDirectionsStart DateStatusIndicationsFill Instructions
Proventil 0.09 MG/ACTUAT inhalant solution2 puffs q6 hours PRN wheezingJan 3, 2011ActiveAsthmaGeneric Substitition Allowed
Atenolol 25 MG Oral Tablet1 every 12 hours OrallyMar 18, 2012ActiveHypertension-none-
43 |
44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 55 | 56 | 57 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 74 | 75 | 76 | Medication Factory Inc. 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | Community Health and Hospitals 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 99 | 100 | 103 | Aerosol 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 113 | 116 | 117 | 118 | 119 | 120 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 145 | 149 | 150 | 151 | 152 | Medication Factory Inc. 153 | 154 | 155 | 156 | 157 | 158 | 182 | 183 | 184 | 185 | 186 | 189 | 190 | label in spanish 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | Medication Factory Inc. 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 1016 Health 230 | Drive 231 | Portland 232 | OR 233 | 99123 234 | US 235 | 236 | 237 | 238 | 239 | Susan 240 | Script 241 | Pharm.D. 242 | 243 | 244 | 245 | People's Pharmacy 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 273 | 274 | 275 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 298 | 299 | 301 | 302 | 303 | 304 | 305 |
306 |
307 | 308 | 309 | 310 |
311 | 312 | 313 | 315 | MEDICATIONS 316 | 317 | No known medications 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 336 | 337 | 338 | 339 | 340 | 341 | 342 |
343 |
344 | -------------------------------------------------------------------------------- /cda/allergies_and_adverse_reactions/Domain_Allergies_XMLExamples.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |
7 | 8 | 9 | 10 | ALLERGIES AND ADVERSE REACTIONS 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 26 | 29 | 32 | 35 | 36 | 37 | 40 | 43 | 46 | 49 | 50 | 51 | 54 | 57 | 60 | 63 | 64 | 65 | 68 | 71 | 74 | 77 | 78 | 79 |
SubstanceReactionSeverity of ReactionSeverity of Allergy/Intolerance
24 | Erythromycin 0.02 MG/MG Topical Gel 25 | 27 | Hives 28 | 30 | Moderate 31 | 33 | Moderate to severe 34 |
38 | Bactrim 39 | 41 | Tongue swelling 42 | 44 | Mild to moderate 45 | 47 | Moderate 48 |
52 | Peanut 53 | 55 | Anaphylaxis 56 | 58 | Severe 59 | 61 | Severe 62 |
66 | Felis Catus Dander 67 | 69 | Eye Swelling 70 | 72 | Mild 73 | 75 | Mild to moderate 76 |
80 |
81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 107 | 108 | 110 | 111 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 132 | 133 | 134 | 135 | 136 | 137 | 139 | 142 | 143 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 168 | 169 | 170 | 171 | 172 | 173 | 175 | 177 | 178 | 179 | 180 | 181 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 195 | 196 | 197 | 198 | 199 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 233 | 234 | 236 | 237 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 258 | 259 | 260 | 261 | 262 | 263 | 265 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 276 | 277 | 278 | 279 | 280 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 292 | 293 | 294 | 295 | 296 | 297 | 299 | 301 | 302 | 303 | 304 | 305 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 319 | 320 | 321 | 322 | 323 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 357 | 358 | 360 | 361 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | 373 | 374 | 375 | 376 | 377 | 378 | 379 | 380 | 382 | 383 | 384 | 390 | 391 | 392 | 393 | 394 | 395 | 397 | 398 | 399 | 400 | 401 | 402 | 403 | 405 | 406 | 407 | 408 | 409 | 410 | 411 | 412 | 413 | 414 | 415 | 416 | 418 | 419 | 420 | 421 | 422 | 423 | 425 | 427 | 428 | 429 | 430 | 431 | 433 | 434 | 435 | 436 | 437 | 438 | 439 | 440 | 441 | 442 | 443 | 445 | 446 | 447 | 448 | 449 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 483 | 484 | 486 | 487 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 | 501 | 502 | 503 | 504 | 505 | 506 | 508 | 509 | 510 | 511 | 512 | 513 | 515 | 516 | 517 | 518 | 519 | 520 | 521 | 523 | 524 | 525 | 526 | 527 | 529 | 530 | 531 | 532 | 533 | 534 | 535 | 536 | 537 | 538 | 540 | 541 | 542 | 543 | 544 | 545 | 547 | 549 | 550 | 551 | 552 | 553 | 555 | 556 | 557 | 558 | 559 | 560 | 561 | 562 | 563 | 564 | 565 | 567 | 568 | 569 | 570 | 571 | 573 | 574 | 575 | 576 | 577 | 578 | 579 |
580 |
--------------------------------------------------------------------------------