cancer_registry_reporting_test_kit 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (262) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/config/presets/hdea_report_preset.json +14 -0
  4. data/config/presets/inferno_reference_server_preset.json.erb +84 -0
  5. data/lib/cancer_registry_reporting_test_kit/bundle_parse.rb +161 -0
  6. data/lib/cancer_registry_reporting_test_kit/docs/ehr_suite_description.md +134 -0
  7. data/lib/cancer_registry_reporting_test_kit/docs/hdea_suite_description.md +108 -0
  8. data/lib/cancer_registry_reporting_test_kit/ehr_suite/ehr_capability_statement/mcode_capability_statement_profile_support.rb +40 -0
  9. data/lib/cancer_registry_reporting_test_kit/ehr_suite/ehr_data_access_group.rb +131 -0
  10. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_must_support_test.rb +43 -0
  11. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_search_test.rb +51 -0
  12. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/medication_administration_validation_test.rb +41 -0
  13. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration/metadata.yml +72 -0
  14. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_administration_group.rb +72 -0
  15. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_must_support_test.rb +55 -0
  16. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_search_test.rb +55 -0
  17. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/medication_request_validation_test.rb +38 -0
  18. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request/metadata.yml +94 -0
  19. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/medication_request_group.rb +73 -0
  20. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_cancer_condition_group.rb +73 -0
  21. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/metadata.yml +100 -0
  22. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_must_support_test.rb +50 -0
  23. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_search_test.rb +70 -0
  24. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/primary_condition/primary_cancer_condition_validation_test.rb +39 -0
  25. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/metadata.yml +99 -0
  26. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_must_support_test.rb +46 -0
  27. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_search_test.rb +51 -0
  28. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure/radiotherapy_procedure_validation_test.rb +37 -0
  29. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/radiotherapy_procedure_group.rb +83 -0
  30. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_cancer_condition_group.rb +68 -0
  31. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/metadata.yml +102 -0
  32. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_must_support_test.rb +50 -0
  33. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_search_test.rb +70 -0
  34. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/secondary_condition/secondary_cancer_condition_validation_test.rb +39 -0
  35. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/metadata.yml +65 -0
  36. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_must_support_test.rb +44 -0
  37. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_search_test.rb +69 -0
  38. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category/tnm_distant_metastases_category_validation_test.rb +39 -0
  39. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_distant_metastases_category_group.rb +74 -0
  40. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/metadata.yml +64 -0
  41. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_must_support_test.rb +44 -0
  42. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_search_test.rb +69 -0
  43. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category/tnm_primary_tumor_category_validation_test.rb +39 -0
  44. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_primary_tumor_category_group.rb +73 -0
  45. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/metadata.yml +64 -0
  46. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_must_support_test.rb +44 -0
  47. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_search_test.rb +69 -0
  48. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category/tnm_regional_nodes_category_validation_test.rb +39 -0
  49. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_regional_nodes_category_group.rb +73 -0
  50. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/metadata.yml +68 -0
  51. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_must_support_test.rb +45 -0
  52. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_search_test.rb +69 -0
  53. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group/tnm_stage_group_validation_test.rb +39 -0
  54. data/lib/cancer_registry_reporting_test_kit/ehr_suite/mcode_data_access_resources/tnm_stage_group_group.rb +72 -0
  55. data/lib/cancer_registry_reporting_test_kit/ehr_suite.rb +69 -0
  56. data/lib/cancer_registry_reporting_test_kit/fhir_resource_navigation.rb +174 -0
  57. data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_generator.rb +47 -0
  58. data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_metadata.rb +86 -0
  59. data/lib/cancer_registry_reporting_test_kit/hdea_generator/group_metadata_extractor.rb +205 -0
  60. data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_loader.rb +78 -0
  61. data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_metadata.rb +26 -0
  62. data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_metadata_extractor.rb +78 -0
  63. data/lib/cancer_registry_reporting_test_kit/hdea_generator/ig_resources.rb +56 -0
  64. data/lib/cancer_registry_reporting_test_kit/hdea_generator/must_support_metadata_extractor.rb +399 -0
  65. data/lib/cancer_registry_reporting_test_kit/hdea_generator/must_support_test_generator.rb +134 -0
  66. data/lib/cancer_registry_reporting_test_kit/hdea_generator/naming.rb +168 -0
  67. data/lib/cancer_registry_reporting_test_kit/hdea_generator/special_cases.rb +43 -0
  68. data/lib/cancer_registry_reporting_test_kit/hdea_generator/templates/must_support.rb.erb +41 -0
  69. data/lib/cancer_registry_reporting_test_kit/hdea_generator/templates/validation.rb.erb +35 -0
  70. data/lib/cancer_registry_reporting_test_kit/hdea_generator/terminology_binding_metadata_extractor.rb +118 -0
  71. data/lib/cancer_registry_reporting_test_kit/hdea_generator/validation_test_generator.rb +125 -0
  72. data/lib/cancer_registry_reporting_test_kit/hdea_generator/value_extractor.rb +134 -0
  73. data/lib/cancer_registry_reporting_test_kit/hdea_generator.rb +66 -0
  74. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/author_validation_test.rb +61 -0
  75. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/organization_metadata.yml +47 -0
  76. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/organization_must_support_test.rb +73 -0
  77. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_metadata.yml +51 -0
  78. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_must_support_test.rb +73 -0
  79. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_role_metadata.yml +48 -0
  80. data/lib/cancer_registry_reporting_test_kit/hdea_suite/author/practitioner_role_must_support_test.rb +66 -0
  81. data/lib/cancer_registry_reporting_test_kit/hdea_suite/bundle_resources_group.rb +213 -0
  82. data/lib/cancer_registry_reporting_test_kit/hdea_suite/ccrr_content_bundle_parse_and_validation_test.rb +67 -0
  83. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/allergy_intolerance_must_support_test.rb +46 -0
  84. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/allergy_intolerance_validation_test.rb +35 -0
  85. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/allergy_intolerance/metadata.yml +36 -0
  86. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/care_plan_must_support_test.rb +48 -0
  87. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/care_plan_validation_test.rb +35 -0
  88. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/care_plan/metadata.yml +50 -0
  89. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/ccrr_content_bundle/ccrr_content_bundle_must_support_test.rb +43 -0
  90. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/ccrr_content_bundle/metadata.yml +36 -0
  91. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_must_support_test.rb +59 -0
  92. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/central_cancer_registry_primary_cancer_condition_validation_test.rb +35 -0
  93. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/central_cancer_registry_primary_cancer_condition/metadata.yml +86 -0
  94. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/composition_must_support_test.rb +109 -0
  95. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/composition_validation_test.rb +35 -0
  96. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/composition/metadata.yml +272 -0
  97. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/condition_must_support_test.rb +45 -0
  98. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/condition_validation_test.rb +35 -0
  99. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/condition/metadata.yml +33 -0
  100. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_must_support_test.rb +49 -0
  101. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +35 -0
  102. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_lab/metadata.yml +57 -0
  103. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_must_support_test.rb +53 -0
  104. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/diagnostic_report_note_validation_test.rb +35 -0
  105. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/diagnostic_report_note/metadata.yml +75 -0
  106. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/document_reference_must_support_test.rb +57 -0
  107. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/document_reference_validation_test.rb +35 -0
  108. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/document_reference/metadata.yml +68 -0
  109. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/encounter_must_support_test.rb +59 -0
  110. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/encounter_validation_test.rb +35 -0
  111. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/encounter/metadata.yml +73 -0
  112. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_must_support_test.rb +52 -0
  113. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/mcode_radiotherapy_course_summary_validation_test.rb +35 -0
  114. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_radiotherapy_course_summary/metadata.yml +59 -0
  115. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_must_support_test.rb +56 -0
  116. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/mcode_secondary_cancer_condition_validation_test.rb +35 -0
  117. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_secondary_cancer_condition/metadata.yml +77 -0
  118. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_must_support_test.rb +48 -0
  119. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/mcode_tnm_stage_group_validation_test.rb +35 -0
  120. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/mcode_tnm_stage_group/metadata.yml +46 -0
  121. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/medication_must_support_test.rb +41 -0
  122. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/medication_validation_test.rb +35 -0
  123. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication/metadata.yml +26 -0
  124. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/medication_administration_must_support_test.rb +48 -0
  125. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/medication_administration_validation_test.rb +35 -0
  126. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_administration/metadata.yml +48 -0
  127. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/medication_request_must_support_test.rb +57 -0
  128. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/medication_request_validation_test.rb +35 -0
  129. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_request/metadata.yml +86 -0
  130. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/medication_statement_must_support_test.rb +41 -0
  131. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/medication_statement_validation_test.rb +35 -0
  132. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/medication_statement/metadata.yml +26 -0
  133. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/metadata.yml +26 -0
  134. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/observation_must_support_test.rb +41 -0
  135. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation/observation_validation_test.rb +35 -0
  136. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/metadata.yml +53 -0
  137. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/observation_lab_must_support_test.rb +50 -0
  138. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/observation_lab/observation_lab_validation_test.rb +35 -0
  139. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/metadata.yml +81 -0
  140. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/odh_usual_work_must_support_test.rb +49 -0
  141. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/odh_usual_work/odh_usual_work_validation_test.rb +35 -0
  142. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/metadata.yml +46 -0
  143. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/organization_must_support_test.rb +55 -0
  144. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/organization/organization_validation_test.rb +35 -0
  145. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/metadata.yml +51 -0
  146. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/patient_must_support_test.rb +58 -0
  147. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/patient/patient_validation_test.rb +35 -0
  148. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/metadata.yml +50 -0
  149. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/practitioner_must_support_test.rb +55 -0
  150. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner/practitioner_validation_test.rb +35 -0
  151. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/metadata.yml +47 -0
  152. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/practitioner_role_must_support_test.rb +49 -0
  153. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/practitioner_role/practitioner_role_validation_test.rb +35 -0
  154. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/metadata.yml +37 -0
  155. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/procedure_must_support_test.rb +44 -0
  156. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/procedure/procedure_validation_test.rb +35 -0
  157. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/metadata.yml +26 -0
  158. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/service_request_must_support_test.rb +41 -0
  159. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/service_request/service_request_validation_test.rb +35 -0
  160. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/metadata.yml +58 -0
  161. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/smokingstatus_must_support_test.rb +47 -0
  162. data/lib/cancer_registry_reporting_test_kit/hdea_suite/generated/v1.0.0/smokingstatus/smokingstatus_validation_test.rb +35 -0
  163. data/lib/cancer_registry_reporting_test_kit/hdea_suite.rb +80 -0
  164. data/lib/cancer_registry_reporting_test_kit/igs/README.md +21 -0
  165. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-cancer-related-medication-administration.json +1905 -0
  166. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-cancer-related-medication-request.json +3611 -0
  167. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-primary-cancer-condition.json +2246 -0
  168. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-radiotherapy-course-summary.json +2700 -0
  169. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-secondary-cancer-condition.json +2419 -0
  170. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-distant-metastases-category.json +2320 -0
  171. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-primary-tumor-category.json +2320 -0
  172. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-regional-nodes-category.json +2320 -0
  173. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-mcode-tnm-stage-group.json +2414 -0
  174. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-medicationstatement.profile.json +1578 -0
  175. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-observation.profile.json +3510 -0
  176. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-odh-UsualWork.json +7248 -0
  177. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-servicerequest.profile.json +3048 -0
  178. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-allergyintolerance.json +1842 -0
  179. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-careplan.json +1 -0
  180. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-condition.json +2154 -0
  181. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-diagnosticreport-lab.json +2002 -0
  182. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-diagnosticreport-note.json +2049 -0
  183. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-documentreference.json +1 -0
  184. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-encounter.json +1 -0
  185. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-medication.json +1 -0
  186. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-observation-lab.json +3153 -0
  187. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-organization.json +1 -0
  188. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-patient.json +1 -0
  189. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-practitioner.json +1 -0
  190. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-practitionerrole.json +1 -0
  191. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-procedure.json +1 -0
  192. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100/StructureDefinition-us-core-smokingstatus.json +1 -0
  193. data/lib/cancer_registry_reporting_test_kit/igs/ccrr_v100.tgz +0 -0
  194. data/lib/cancer_registry_reporting_test_kit/igs/package/.index.db +0 -0
  195. data/lib/cancer_registry_reporting_test_kit/igs/package/.index.json +4 -0
  196. data/lib/cancer_registry_reporting_test_kit/igs/package/CapabilityStatement-central-cancer-registry-reporting-ehr.json +1 -0
  197. data/lib/cancer_registry_reporting_test_kit/igs/package/ImplementationGuide-hl7.fhir.us.central-cancer-registry-reporting.json +1 -0
  198. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-cancer-encounter.json +1 -0
  199. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-cancer-patient.json +1 -0
  200. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-composition.json +1 -0
  201. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-content-bundle.json +1 -0
  202. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-plandefinition.json +1 -0
  203. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-ccrr-reporting-bundle.json +1 -0
  204. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-central-cancer-registry-primary-cancer-condition.json +1 -0
  205. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-central-cancer-registry-reporting-messageheader.json +1 -0
  206. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-us-ph-patient.json +1 -0
  207. data/lib/cancer_registry_reporting_test_kit/igs/package/StructureDefinition-us-ph-tribal-affiliation-extension.json +1 -0
  208. data/lib/cancer_registry_reporting_test_kit/igs/package/ValueSet-cancer-core-reportability-codes.json +1 -0
  209. data/lib/cancer_registry_reporting_test_kit/igs/package/example/AllergyIntolerance-example.json +1 -0
  210. data/lib/cancer_registry_reporting_test_kit/igs/package/example/BodyStructure-jenny-m-chest-wall-lymph-nodes-treatment-volume.json +1 -0
  211. data/lib/cancer_registry_reporting_test_kit/igs/package/example/BodyStructure-jenny-m-chest-wall-treatment-volume.json +1 -0
  212. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-ccrr-content-bundle-example.json +1 -0
  213. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-central-cancer-registry-reporting-specification-bundle-example.json +1 -0
  214. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Bundle-reporting-bundle-example.json +1 -0
  215. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Composition-ccrr-composition-example.json +1 -0
  216. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Condition-primary-cancer-condition-breast.json +1 -0
  217. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Encounter-encounter-cancer-example.json +1 -0
  218. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Endpoint-example-healthcare-endpoint.json +1 -0
  219. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Endpoint-example-ph-endpoint.json +1 -0
  220. data/lib/cancer_registry_reporting_test_kit/igs/package/example/MedicationAdministration-cancer-related-medication-administration-example.json +1 -0
  221. data/lib/cancer_registry_reporting_test_kit/igs/package/example/MessageHeader-messageheader-example-reportheader.json +1 -0
  222. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-cancer-stage-group-example.json +1 -0
  223. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-distant-metastases-category-cM0.json +1 -0
  224. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-primary-tumor-category-cT3.json +1 -0
  225. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Observation-tnm-clinical-regional-nodes-category-cN3.json +1 -0
  226. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Organization-example-healthcare-org.json +1 -0
  227. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Organization-example-pha-org.json +1 -0
  228. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Patient-example.json +1 -0
  229. data/lib/cancer_registry_reporting_test_kit/igs/package/example/PlanDefinition-plandefinition-central-cancer-registry-reporting-example.json +1 -0
  230. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Practitioner-1.json +1 -0
  231. data/lib/cancer_registry_reporting_test_kit/igs/package/example/Procedure-radiotherapy-example.json +1 -0
  232. data/lib/cancer_registry_reporting_test_kit/igs/package/openapi/central-cancer-registry-reporting-ehr.openapi.json +364 -0
  233. data/lib/cancer_registry_reporting_test_kit/igs/package/other/ig-r4.jsonX +1 -0
  234. data/lib/cancer_registry_reporting_test_kit/igs/package/other/spec.internals +293 -0
  235. data/lib/cancer_registry_reporting_test_kit/igs/package/other/validation-oo.json +1 -0
  236. data/lib/cancer_registry_reporting_test_kit/igs/package/other/validation-summary.json +1 -0
  237. data/lib/cancer_registry_reporting_test_kit/igs/package/package.json +30 -0
  238. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-cancer-encounter.sch +19 -0
  239. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-cancer-patient.sch +175 -0
  240. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-composition.sch +61 -0
  241. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-content-bundle.sch +12 -0
  242. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-plandefinition.sch +331 -0
  243. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-ccrr-reporting-bundle.sch +12 -0
  244. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-central-cancer-registry-primary-cancer-condition.sch +31 -0
  245. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-central-cancer-registry-reporting-messageheader.sch +27 -0
  246. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-us-ph-patient.sch +217 -0
  247. data/lib/cancer_registry_reporting_test_kit/igs/package/xml/StructureDefinition-us-ph-tribal-affiliation-extension.sch +36 -0
  248. data/lib/cancer_registry_reporting_test_kit/metadata.rb +71 -0
  249. data/lib/cancer_registry_reporting_test_kit/must_support_test.rb +263 -0
  250. data/lib/cancer_registry_reporting_test_kit/primitive_type.rb +7 -0
  251. data/lib/cancer_registry_reporting_test_kit/requirements/cancer-registry-reporting-test-kit_out_of_scope_requirements.csv +77 -0
  252. data/lib/cancer_registry_reporting_test_kit/requirements/cancer-registry-reporting-test-kit_requirements.csv +162 -0
  253. data/lib/cancer_registry_reporting_test_kit/requirements/generated/cancer-registry-reporting-test-kit_requirements_coverage.csv +161 -0
  254. data/lib/cancer_registry_reporting_test_kit/search_test.rb +897 -0
  255. data/lib/cancer_registry_reporting_test_kit/search_test_properties.rb +58 -0
  256. data/lib/cancer_registry_reporting_test_kit/validation_test.rb +68 -0
  257. data/lib/cancer_registry_reporting_test_kit/version.rb +6 -0
  258. data/lib/cancer_registry_reporting_test_kit.rb +6 -0
  259. data/lib/inferno_requirements_tools/ext/inferno_core/runnable.rb +22 -0
  260. data/lib/inferno_requirements_tools/tasks/requirements_coverage.rb +284 -0
  261. data/lib/requirements_config.yaml +22 -0
  262. metadata +341 -0
@@ -0,0 +1,100 @@
1
+ ---
2
+ :name: mcode_primary_cancer_condition
3
+ :class_name: McodePrimaryCancerConditionSequence
4
+ :version: v1.0.0
5
+ :reformatted_version: v100
6
+ :resource: Condition
7
+ :profile_url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition
8
+ :profile_name: Primary Cancer Condition Profile
9
+ :profile_version: 3.0.0
10
+ :title: Condition Primary Cancer
11
+ :short_description: Verify support for the server capabilities required by the Primary
12
+ Cancer Condition Profile.
13
+ :must_supports:
14
+ :extensions:
15
+ - :id: Condition.extension:assertedDate
16
+ :path: extension
17
+ :url: http://hl7.org/fhir/StructureDefinition/condition-assertedDate
18
+ - :id: Condition.extension:histologyMorphologyBehavior
19
+ :path: extension
20
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-histology-morphology-behavior
21
+ - :id: Condition.bodySite.extension:locationQualifier
22
+ :path: bodySite.extension
23
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-body-location-qualifier
24
+ - :id: Condition.bodySite.extension:lateralityQualifier
25
+ :path: bodySite.extension
26
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-laterality-qualifier
27
+ :slices:
28
+ - :slice_id: Condition.category:us-core
29
+ :slice_name: us-core
30
+ :path: category
31
+ :discriminator:
32
+ :type: requiredBinding
33
+ :path: ''
34
+ :values:
35
+ - :system: http://terminology.hl7.org/CodeSystem/condition-category
36
+ :code: problem-list-item
37
+ - :system: http://terminology.hl7.org/CodeSystem/condition-category
38
+ :code: encounter-diagnosis
39
+ - :slice_id: Condition.category:sdoh
40
+ :slice_name: sdoh
41
+ :path: category
42
+ :discriminator:
43
+ :type: patternCodeableConcept
44
+ :path: ''
45
+ :code: sdoh
46
+ :system: http://hl7.org/fhir/us/core/CodeSystem/us-core-tags
47
+ :elements:
48
+ - :path: clinicalStatus
49
+ - :path: verificationStatus
50
+ - :path: category
51
+ - :path: code
52
+ - :path: bodySite
53
+ - :path: subject
54
+ :types:
55
+ - Reference
56
+ :target_profiles:
57
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient
58
+ - :path: onsetDateTime
59
+ :original_path: onset[x]
60
+ - :path: abatementDateTime
61
+ :original_path: abatement[x]
62
+ - :path: recordedDate
63
+ - :path: stage
64
+ - :path: stage.assessment
65
+ :types:
66
+ - Reference
67
+ :target_profiles:
68
+ - http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-cancer-stage
69
+ :mandatory_elements:
70
+ - Condition.category
71
+ - Condition.code
72
+ - Condition.subject
73
+ :tests: []
74
+ :id: ccrr_v100_mcode_primary_cancer_condition
75
+ :file_name: mcode_primary_cancer_condition_group.rb
76
+ :searches:
77
+ - :expectation: SHALL
78
+ :names:
79
+ - patient
80
+ - category
81
+ :search_definitions:
82
+ :patient:
83
+ :paths:
84
+ - subject
85
+ :full_paths:
86
+ - Condition.subject
87
+ :comparators: {}
88
+ :values: []
89
+ :type: Reference
90
+ :contains_multiple: false
91
+ :multiple_or: MAY
92
+ :category:
93
+ :paths:
94
+ - category
95
+ :full_paths:
96
+ - Condition.category
97
+ :comparators: {}
98
+ :type: CodeableConcept
99
+ :contains_multiple: true
100
+ :multiple_or: MAY
@@ -0,0 +1,50 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../must_support_test'
4
+
5
+ module CancerRegistryReportingTestKit
6
+ class PrimaryCancerConditionMustSupportTest < Inferno::Test
7
+ include CancerRegistryReportingTestKit::MustSupportTest
8
+
9
+ title 'All must support elements are provided in the mCODE Primary Cancer Condition resources returned'
10
+ description %(
11
+ CCRR EHRs SHALL be capable of populating all data elements as
12
+ part of the query results. This test will look through the Condition resources
13
+ found previously for the following must support elements:
14
+
15
+ * Condition.abatement[x]
16
+ * Condition.bodySite
17
+ * Condition.bodySite.extension:locationQualifier
18
+ * Condition.bodySite.extension:lateralityQualifier
19
+ * Condition.category
20
+ * Condition.code
21
+ * Condition.clinicalStatus
22
+ * Condition.extension:assertedDate
23
+ * Condition.extension:histologyMorphologyBehavior
24
+ * Condition.verificationStatus
25
+ * Condition.recordedDate
26
+ * Condition.onset[x]
27
+ * Condition.subject
28
+ * Condition.stage
29
+ * Condition.stage.assessment
30
+ )
31
+
32
+ id :ccrr_primary_cancer_condition_must_support_test
33
+
34
+ def resource_type
35
+ 'Condition'
36
+ end
37
+
38
+ def self.metadata
39
+ @metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
40
+ end
41
+
42
+ def scratch_resources
43
+ scratch[:primary_condition_resources] ||= {}
44
+ end
45
+
46
+ run do
47
+ perform_must_support_test(all_scratch_resources)
48
+ end
49
+ end
50
+ end
@@ -0,0 +1,70 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../search_test'
4
+ require_relative '../../../hdea_generator/group_metadata'
5
+
6
+ module CancerRegistryReportingTestKit
7
+ class PrimaryCancerConditionSearchTest < Inferno::Test
8
+ include CancerRegistryReportingTestKit::SearchTest
9
+
10
+ title 'Server returns valid results for Condition search by patient + category'
11
+ description %(
12
+ A server SHALL support searching by
13
+ patient + category on the Condition resource. This test
14
+ will pass if resources are returned and match the search criteria. If
15
+ none are returned, the test is skipped.
16
+
17
+ Because this is the first search of the sequence, resources in the
18
+ response will be used for subsequent tests.
19
+
20
+ Additionally, this test will check that GET and POST search methods
21
+ return the same number of results.
22
+
23
+ [CCRR Capability Statement](https://hl7.org/fhir/us/central-cancer-registry-reporting/STU1/CapabilityStatement-central-cancer-registry-reporting-ehr.html)
24
+
25
+ [mCODE Query Support](https://hl7.org/fhir/us/mcode/conformance-general.html#support-querying-mcode-conforming-resources)
26
+
27
+ )
28
+
29
+ id :ccrr_primary_cancer_condition_search_test
30
+ input :patient_ids,
31
+ title: 'Patient IDs',
32
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements.'
33
+
34
+ input :primary_condition_category,
35
+ title: 'Primary Cancer Condition category',
36
+ description: %(
37
+ `Condition.category` value that distinguishes Primary Cancer Condition instances. Used as a search
38
+ parameter value when searching for Condition instances to check for conformance to the Primary
39
+ Cancer Condition profile.
40
+ ),
41
+ optional: true
42
+
43
+ def self.properties
44
+ @properties ||= USCoreTestKit::SearchTestProperties.new(
45
+ first_search: true,
46
+ resource_type: 'Condition',
47
+ search_param_names: %w[patient category],
48
+ test_post_search: false
49
+ )
50
+ end
51
+
52
+ def self.metadata
53
+ @metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
54
+ end
55
+
56
+ def scratch_resources
57
+ scratch[:primary_condition_resources] ||= {}
58
+ end
59
+
60
+ run do
61
+ skip_if primary_condition_category.blank?,
62
+ 'Provide a cateogry search value for Primary Cancer Conditions in the ' \
63
+ '**Primary Cancer Condition category** input to run these tests.'
64
+
65
+ # manual params must be in the same order as the param name
66
+ @manual_search_params = [primary_condition_category]
67
+ run_search_test
68
+ end
69
+ end
70
+ end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative '../../../validation_test'
4
+
5
+ module CancerRegistryReportingTestKit
6
+ class PrimaryCancerConditionValidationTest < Inferno::Test
7
+ include CancerRegistryReportingTestKit::ValidationTest
8
+
9
+ id :ccrr_primary_cancer_condition_validation_test
10
+ title 'Condition resources returned during previous tests conform to the mCODE Primary Cancer Condition Profile'
11
+ description %(
12
+ This test verifies resources returned from the first search conform to
13
+ the [mCODE Primary Cancer Condition Profile](http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition).
14
+ Systems must demonstrate at least one valid example in order to pass this test.
15
+
16
+ It verifies the presence of mandatory elements and that elements with
17
+ required bindings contain appropriate values. CodeableConcept element
18
+ bindings will fail if none of their codings have a code/system belonging
19
+ to the bound ValueSet. Quantity, Coding, and code element bindings will
20
+ fail if their code/system are not found in the valueset.
21
+
22
+ )
23
+
24
+ def resource_type
25
+ 'Condition'
26
+ end
27
+
28
+ def scratch_resources
29
+ scratch[:primary_condition_resources] ||= {}
30
+ end
31
+
32
+ run do
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-primary-cancer-condition',
35
+ '3.0.0',
36
+ skip_if_empty: true)
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,99 @@
1
+ ---
2
+ :name: mcode_radiotherapy_course_summary
3
+ :class_name: McodeRadiotherapyCourseSummarySequence
4
+ :version: v1.0.0
5
+ :reformatted_version: v100
6
+ :resource: Procedure
7
+ :profile_url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-course-summary
8
+ :profile_name: Radiotherapy Course Summary Profile
9
+ :profile_version: 3.0.0
10
+ :title: Procedure Radiotherapy Course Summary
11
+ :short_description: Verify support for the server capabilities required by the Radiotherapy
12
+ Course Summary Profile.
13
+ :must_supports:
14
+ :extensions:
15
+ - :id: Procedure.extension
16
+ :path: extension
17
+ :url:
18
+ - :id: Procedure.extension:treatmentIntent
19
+ :path: extension
20
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-procedure-intent
21
+ - :id: Procedure.extension:terminationReason
22
+ :path: extension
23
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-treatment-termination-reason
24
+ - :id: Procedure.extension:modalityAndTechnique
25
+ :path: extension
26
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-modality-and-technique
27
+ - :id: Procedure.extension:actualNumberOfSessions
28
+ :path: extension
29
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-sessions
30
+ - :id: Procedure.extension:doseDeliveredToVolume
31
+ :path: extension
32
+ :url: http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-dose-delivered-to-volume
33
+ :slices: []
34
+ :elements:
35
+ - :path: status
36
+ - :path: code.coding.code
37
+ :fixed_value: '1217123003'
38
+ - :path: subject
39
+ :types:
40
+ - Reference
41
+ :target_profiles:
42
+ - http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-cancer-patient
43
+ - :path: performed[x]
44
+ - :path: reasonCode
45
+ - :path: reasonReference
46
+ :types:
47
+ - Reference
48
+ :target_profiles:
49
+ - http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition-problems-health-concerns
50
+ - :path: bodySite
51
+ :mandatory_elements:
52
+ - Procedure.status
53
+ - Procedure.code
54
+ - Procedure.subject
55
+ - Procedure.performer.actor
56
+ - Procedure.focalDevice.manipulated
57
+ :tests:
58
+ - :id: radiotherapy_procedure_must_support_test
59
+ :file_name: radiotherapy_procedure_must_support_test.rb
60
+ - :id: radiotherapy_procedure_summary_validation_test
61
+ :file_name: radiotherapy_procedure_summary_validation_test.rb
62
+ - :id: radiotherapy_procedure_search_test
63
+ :file_name: radiotherapy_procedure_search_test.rb
64
+ :id: radiotherapy_procedure_group
65
+ :file_name: radiotherapy_procedure_group.rb
66
+ :searches:
67
+ - :expectation: SHALL
68
+ :names:
69
+ - patient
70
+ - performed
71
+ :search_definitions:
72
+ :patient:
73
+ :paths:
74
+ - subject
75
+ :full_paths:
76
+ - Procedure.subject
77
+ :comparators: {}
78
+ :values: []
79
+ :type: Reference
80
+ :contains_multiple: false
81
+ :multiple_or: MAY
82
+ :date:
83
+ :paths:
84
+ - performed
85
+ :full_paths:
86
+ - Procedure.performed[x]
87
+ :comparators: {}
88
+ :contains_multiple: false
89
+ :multiple_or: MAY
90
+ :code:
91
+ :paths:
92
+ - code
93
+ :full_paths:
94
+ - Procedure.code
95
+ :values:
96
+ - mcode-radiotherapy-course-summary
97
+ :comparators: {}
98
+ :contains_multiple: false
99
+ :multiple_or: MAY
@@ -0,0 +1,46 @@
1
+ require_relative '../../../must_support_test'
2
+
3
+ module CancerRegistryReportingTestKit
4
+ class RadiotherapyProcedureMustSupportTest < Inferno::Test
5
+ include CancerRegistryReportingTestKit::MustSupportTest
6
+
7
+ title 'All must support elements are provided in the mCODE Radiotherapy Course Summary Procedure resources returned'
8
+ description %(
9
+ CCRR EHRs SHALL be capable of populating all data elements as
10
+ part of the query results. This test will look through the Procedure resources
11
+ found previously for the following must support elements:
12
+
13
+ * Procedure.bodySite
14
+ * Procedure.code
15
+ * Procedure.extension
16
+ * Procedure.extension:actualNumberOfSessions
17
+ * Procedure.extension:doseDeliveredToVolume
18
+ * Procedure.extension:modalityAndTechnique
19
+ * Procedure.extension:terminationReason
20
+ * Procedure.extension:treatmentIntent
21
+ * Procedure.performed[x]
22
+ * Procedure.reasonCode
23
+ * Procedure.reasonReference
24
+ * Procedure.status
25
+ * Procedure.subject
26
+ )
27
+
28
+ id :ccrr_radiotherapy_procedure_must_support_test
29
+
30
+ def resource_type
31
+ 'Procedure'
32
+ end
33
+
34
+ def self.metadata
35
+ @metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
36
+ end
37
+
38
+ def scratch_resources
39
+ scratch[:radiotherapy_procedure_resources] ||= {}
40
+ end
41
+
42
+ run do
43
+ perform_must_support_test(all_scratch_resources)
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,51 @@
1
+ require_relative '../../../search_test'
2
+ require_relative '../../../search_test_properties'
3
+ require_relative '../../../hdea_generator/group_metadata'
4
+
5
+ module CancerRegistryReportingTestKit
6
+ class RadiotherapyProcedureSearchTest < Inferno::Test
7
+ include CancerRegistryReportingTestKit::SearchTest
8
+
9
+ title 'Server returns valid results for Procedure search by patient + code'
10
+ description %(
11
+ A server SHALL support searching by
12
+ patient + code on the Procedure resource. This test
13
+ will pass if resources are returned and match the search criteria. If
14
+ none are returned, the test is skipped.
15
+
16
+ Because this is the first search of the sequence, resources in the
17
+ response will be used for subsequent tests.
18
+
19
+ Additionally, this test will check that GET and POST search methods
20
+ return the same number of results.
21
+ )
22
+
23
+ id :ccrr_radiotherapy_procedure_search_test
24
+ input :patient_ids,
25
+ title: 'Patient IDs',
26
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
27
+
28
+ def self.properties
29
+ @properties ||= SearchTestProperties.new(
30
+ first_search: true,
31
+ resource_type: 'Procedure',
32
+ search_param_names: ['patient', 'code'],
33
+ test_post_search: false
34
+ )
35
+ end
36
+
37
+ def self.metadata
38
+ @metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml'), aliases: true))
39
+ end
40
+
41
+ def scratch_resources
42
+ scratch[:radiotherapy_procedure_resources] ||= {}
43
+ end
44
+
45
+ run do
46
+ # manual params must be in the same order as the param names
47
+ @manual_search_params = ['http://snomed.info/sct|1217123003']
48
+ run_search_test
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,37 @@
1
+ require_relative '../../../validation_test'
2
+
3
+ module CancerRegistryReportingTestKit
4
+ class RadiotherapyProcedureValidationTest < Inferno::Test
5
+ include CancerRegistryReportingTestKit::ValidationTest
6
+
7
+ id :ccrr_radiotherapy_procedure_validation_test
8
+ title 'Procedure resources returned during previous tests conform to the Radiotherapy Course Summary Profile profile'
9
+ description "
10
+ This test verifies resources returned from the first search conform to
11
+ the [Radiotherapy Course Summary Profile](http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-course-summary).
12
+ Systems must demonstrate at least one valid example in order to pass this test.
13
+
14
+ It verifies the presence of mandatory elements and that elements with
15
+ required bindings contain appropriate values. CodeableConcept element
16
+ bindings will fail if none of their codings have a code/system belonging
17
+ to the bound ValueSet. Quantity, Coding, and code element bindings will
18
+ fail if their code/system are not found in the valueset."
19
+
20
+ verifies_requirements 'hl7.fhir.us.mcode_3.0.0@85'
21
+
22
+ def resource_type
23
+ 'Procedure'
24
+ end
25
+
26
+ def scratch_resources
27
+ scratch[:radiotherapy_procedure_resources] ||= {}
28
+ end
29
+
30
+ run do
31
+ perform_validation_test(scratch_resources[:all] || [],
32
+ 'http://hl7.org/fhir/us/mcode/StructureDefinition/mcode-radiotherapy-course-summary',
33
+ '3.0.0',
34
+ skip_if_empty: true)
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,83 @@
1
+ require_relative 'radiotherapy_procedure/radiotherapy_procedure_must_support_test'
2
+ require_relative 'radiotherapy_procedure/radiotherapy_procedure_search_test'
3
+ require_relative 'radiotherapy_procedure/radiotherapy_procedure_validation_test'
4
+
5
+ module CancerRegistryReportingTestKit
6
+ class RadiotherapyProcedureGroup < Inferno::TestGroup
7
+ title 'mCODE Radiotherapy Course Summary'
8
+ description %(
9
+ # Background
10
+ The mCODE Radiotherapy Course Summary group verifies that the system under test is
11
+ able to provide correct responses for Radiotherapy Procedure queries. These queries
12
+ must return resources conforming to the [mCODE Radiotherapy Course Summary Profile](https://hl7.org/fhir/us/mcode/STU3/StructureDefinition-mcode-radiotherapy-course-summary.html)
13
+ as specified in the mCODE v3.0.0 Implementation Guide.
14
+
15
+ # Testing Methodology
16
+ ## Searching
17
+ This test sequence will first perform each required search associated
18
+ with this resource. This sequence will perform searches with the
19
+ following parameters:
20
+
21
+ * patient + code
22
+
23
+ Note that US Core requires support for the patient search parameter
24
+ for the [Procedure resource](https://www.hl7.org/fhir/us/core/STU3.1.1/StructureDefinition-us-core-procedure.html#quick-start).
25
+ Since mCODE requires support for the code parameter for [Radiotherapy treatment searches](https://hl7.org/fhir/us/mcode/STU3/conformance-general.html#support-querying-mcode-conforming-resources),
26
+ the patient + code combination is required by these tests.
27
+
28
+ ### Search Parameters
29
+ The first search uses values from the **Patient IDs** input plus
30
+ a fixed value of `http://snomed.info/sct|1217123003` for the code
31
+ as specified in the [mCODE Radiotherapy Course Summary Profile](https://hl7.org/fhir/us/mcode/STU3/StructureDefinition-mcode-radiotherapy-course-summary.html).
32
+ Any subsequent searches will look for its parameter values
33
+ from the results of the first search. For example, the `identifier`
34
+ search in the patient sequence is performed by looking for an existing
35
+ `Patient.identifier` from any of the resources returned in the first
36
+ search. If a value cannot be found this way, the search is skipped.
37
+ This search test also searches by date. When a single date is inputted,
38
+ the test will return any results that occurred on that date or contain
39
+ that date within the resource's date period.
40
+
41
+ ### Search Validation
42
+ Inferno will retrieve up to the first 20 bundle pages of the reply for
43
+ Procedure resources and save them for subsequent tests. Each of
44
+ these resources is then checked to see if it matches the searched
45
+ parameters in accordance with [FHIR search
46
+ guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
47
+ for example, if a Patient search for `gender=male` returns a `female`
48
+ patient.
49
+
50
+
51
+ ## Must Support
52
+ Each profile contains elements marked as 'must support'. This test
53
+ sequence expects to see each of these elements at least once. If at
54
+ least one cannot be found, the test will fail. The test will look
55
+ through the Procedure resources found in the first test for these
56
+ elements.
57
+
58
+ ## Profile Validation
59
+ Each resource returned from the first search is expected to conform to
60
+ the [mCODE Radiotherapy Course Summary Profile](http://hl7.org/fhir/us/mcode/STU3/StructureDefinition/mcode-radiotherapy-course-summary).
61
+ Each element is checked against
62
+ teminology binding and cardinality requirements.
63
+
64
+ Elements with a required binding are validated against their bound
65
+ ValueSet. If the code/system in the element is not part of the ValueSet,
66
+ then the test will fail.
67
+
68
+ )
69
+
70
+ id :ccrr_ehr_radiotherapy_procedure
71
+ run_as_group
72
+
73
+ def self.metadata
74
+ @metadata ||= HdeaGenerator::GroupMetadata.new(
75
+ YAML.load_file(File.join(__dir__, 'radiotherapy_procedure', 'metadata.yml'), aliases: true)
76
+ )
77
+ end
78
+
79
+ test from: :ccrr_radiotherapy_procedure_search_test
80
+ test from: :ccrr_radiotherapy_procedure_validation_test
81
+ test from: :ccrr_radiotherapy_procedure_must_support_test
82
+ end
83
+ end
@@ -0,0 +1,68 @@
1
+ require_relative 'secondary_condition/secondary_cancer_condition_search_test'
2
+ require_relative 'secondary_condition/secondary_cancer_condition_must_support_test'
3
+ require_relative 'secondary_condition/secondary_cancer_condition_validation_test'
4
+
5
+ module CancerRegistryReportingTestKit
6
+ class EHRSecondaryConditionTests < Inferno::TestGroup
7
+ title 'mCODE Secondary Cancer Condition'
8
+ description %(
9
+ # Background
10
+ The mCODE Secondary Cancer Condition group verifies that the system under test is
11
+ able to provide correct responses for Secondary Cancer Condition queries. These queries
12
+ return resources conforming to the [mCODE Secondary Cancer Condition Profile](https://hl7.org/fhir/us/mcode/STU3/StructureDefinition-mcode-secondary-cancer-condition.html)
13
+ as specified in the mCODE v3.0.0 Implementation Guide.
14
+
15
+ # Testing Methodology
16
+ ## Searching
17
+ This test sequence will first perform each required search associated
18
+ with this resource. This sequence will perform searches with the
19
+ following parameters:
20
+
21
+ * patient + category
22
+
23
+ ### Search Parameters
24
+ The first search uses values from the **Patient IDs** and
25
+ **Secondary Cancer Condition category** inputs as provided by the tester.
26
+ Any subsequent searches will look for its parameter values
27
+ from the results of the first search. For example, the `identifier`
28
+ search in the patient sequence is performed by looking for an existing
29
+ `Patient.identifier` from any of the resources returned in the first
30
+ search. If a value cannot be found this way, the search is skipped.
31
+
32
+ ### Search Validation
33
+ Inferno will retrieve up to the first 20 bundle pages of the reply for
34
+ Condition resources and save them for subsequent tests. Each of
35
+ these resources is then checked to see if it matches the searched
36
+ parameters in accordance with [FHIR search
37
+ guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
38
+ for example, if a Patient search for `gender=male` returns a `female`
39
+ patient.
40
+
41
+
42
+ ## Must Support
43
+ Each profile contains elements marked as "must support". This test
44
+ sequence expects to see each of these elements at least once. If at
45
+ least one cannot be found, the test will fail. The test will look
46
+ through the Condition resources found in the first test for these
47
+ elements.
48
+
49
+ ## Profile Validation
50
+ Each resource returned from the first search is expected to conform to
51
+ the [mCODE Secondary Cancer Condition Profile](http://hl7.org/fhir/us/mcode/STU3/StructureDefinition-mcode-secondary-cancer-condition.html).
52
+ Each element is checked against terminology binding and cardinality requirements.
53
+
54
+ Elements with a required binding are validated against their bound
55
+ ValueSet. If the code/system in the element is not part of the ValueSet,
56
+ then the test will fail.
57
+ )
58
+ id :ccrr_ehr_secondary_cancer_condition
59
+ run_as_group
60
+
61
+ def self.metadata
62
+ @metadata ||= HdeaGenerator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'secondary_condition', 'metadata.yml'), aliases: true))
63
+ end
64
+ test from: :ccrr_secondary_cancer_condition_search_test
65
+ test from: :ccrr_secondary_cancer_condition_validation_test
66
+ test from: :ccrr_secondary_cancer_condition_must_support_test
67
+ end
68
+ end