us_core_test_kit 0.6.0 → 0.6.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (347) hide show
  1. checksums.yaml +4 -4
  2. data/lib/us_core_test_kit/custom_groups/capability_statement/profile_support_test.rb +18 -16
  3. data/lib/us_core_test_kit/custom_groups/v3.1.1/capability_statement_group.rb +1 -1
  4. data/lib/us_core_test_kit/custom_groups/v3.1.1/profile_support_test.rb +51 -0
  5. data/lib/us_core_test_kit/custom_groups/v4.0.0/capability_statement_group.rb +1 -1
  6. data/lib/us_core_test_kit/custom_groups/v5.0.1/capability_statement_group.rb +1 -1
  7. data/lib/us_core_test_kit/custom_groups/v6.1.0/capability_statement_group.rb +1 -1
  8. data/lib/us_core_test_kit/fhir_resource_navigation.rb +76 -8
  9. data/lib/us_core_test_kit/generated/v3.1.1/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +0 -2
  10. data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/bodyheight_must_support_test.rb +7 -7
  11. data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/bodyheight_reference_resolution_test.rb +0 -2
  12. data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/metadata.yml +11 -9
  13. data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/bodytemp_must_support_test.rb +7 -7
  14. data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/bodytemp_reference_resolution_test.rb +0 -2
  15. data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/metadata.yml +11 -9
  16. data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/bodyweight_must_support_test.rb +7 -7
  17. data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/bodyweight_reference_resolution_test.rb +0 -2
  18. data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/metadata.yml +11 -9
  19. data/lib/us_core_test_kit/generated/v3.1.1/bp/bp_must_support_test.rb +15 -7
  20. data/lib/us_core_test_kit/generated/v3.1.1/bp/bp_reference_resolution_test.rb +0 -2
  21. data/lib/us_core_test_kit/generated/v3.1.1/bp/metadata.yml +25 -12
  22. data/lib/us_core_test_kit/generated/v3.1.1/care_plan/care_plan_reference_resolution_test.rb +0 -2
  23. data/lib/us_core_test_kit/generated/v3.1.1/care_plan/metadata.yml +2 -1
  24. data/lib/us_core_test_kit/generated/v3.1.1/care_team/care_team_reference_resolution_test.rb +0 -2
  25. data/lib/us_core_test_kit/generated/v3.1.1/condition/condition_reference_resolution_test.rb +0 -2
  26. data/lib/us_core_test_kit/generated/v3.1.1/device/device_reference_resolution_test.rb +0 -2
  27. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_lab/diagnostic_report_lab_reference_resolution_test.rb +0 -2
  28. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_lab/metadata.yml +2 -1
  29. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -2
  30. data/lib/us_core_test_kit/generated/v3.1.1/document_reference/document_reference_reference_resolution_test.rb +0 -2
  31. data/lib/us_core_test_kit/generated/v3.1.1/encounter/encounter_reference_resolution_test.rb +0 -2
  32. data/lib/us_core_test_kit/generated/v3.1.1/goal/goal_reference_resolution_test.rb +0 -2
  33. data/lib/us_core_test_kit/generated/v3.1.1/goal/metadata.yml +2 -1
  34. data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/head_circumference_must_support_test.rb +7 -7
  35. data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/head_circumference_reference_resolution_test.rb +0 -2
  36. data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/metadata.yml +11 -9
  37. data/lib/us_core_test_kit/generated/v3.1.1/heartrate/heartrate_must_support_test.rb +7 -7
  38. data/lib/us_core_test_kit/generated/v3.1.1/heartrate/heartrate_reference_resolution_test.rb +0 -2
  39. data/lib/us_core_test_kit/generated/v3.1.1/heartrate/metadata.yml +11 -9
  40. data/lib/us_core_test_kit/generated/v3.1.1/immunization/immunization_reference_resolution_test.rb +0 -2
  41. data/lib/us_core_test_kit/generated/v3.1.1/medication_request/medication_request_reference_resolution_test.rb +0 -2
  42. data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +166 -121
  43. data/lib/us_core_test_kit/generated/v3.1.1/observation_lab/metadata.yml +2 -1
  44. data/lib/us_core_test_kit/generated/v3.1.1/observation_lab/observation_lab_reference_resolution_test.rb +0 -2
  45. data/lib/us_core_test_kit/generated/v3.1.1/organization/metadata.yml +2 -1
  46. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/metadata.yml +11 -9
  47. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/pediatric_bmi_for_age_must_support_test.rb +7 -7
  48. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/pediatric_bmi_for_age_reference_resolution_test.rb +0 -2
  49. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/metadata.yml +11 -9
  50. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/pediatric_weight_for_height_must_support_test.rb +7 -7
  51. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/pediatric_weight_for_height_reference_resolution_test.rb +0 -2
  52. data/lib/us_core_test_kit/generated/v3.1.1/practitioner/metadata.yml +2 -1
  53. data/lib/us_core_test_kit/generated/v3.1.1/procedure/procedure_reference_resolution_test.rb +0 -2
  54. data/lib/us_core_test_kit/generated/v3.1.1/provenance/metadata.yml +6 -6
  55. data/lib/us_core_test_kit/generated/v3.1.1/provenance/provenance_must_support_test.rb +2 -1
  56. data/lib/us_core_test_kit/generated/v3.1.1/provenance/provenance_reference_resolution_test.rb +0 -2
  57. data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/metadata.yml +33 -24
  58. data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/pulse_oximetry_must_support_test.rb +21 -14
  59. data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/pulse_oximetry_reference_resolution_test.rb +0 -2
  60. data/lib/us_core_test_kit/generated/v3.1.1/resprate/metadata.yml +11 -9
  61. data/lib/us_core_test_kit/generated/v3.1.1/resprate/resprate_must_support_test.rb +7 -7
  62. data/lib/us_core_test_kit/generated/v3.1.1/resprate/resprate_reference_resolution_test.rb +0 -2
  63. data/lib/us_core_test_kit/generated/v3.1.1/smokingstatus/metadata.yml +2 -1
  64. data/lib/us_core_test_kit/generated/v3.1.1/smokingstatus/smokingstatus_reference_resolution_test.rb +0 -2
  65. data/lib/us_core_test_kit/generated/v4.0.0/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +0 -2
  66. data/lib/us_core_test_kit/generated/v4.0.0/allergy_intolerance/metadata.yml +2 -0
  67. data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/blood_pressure_must_support_test.rb +15 -8
  68. data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/blood_pressure_reference_resolution_test.rb +0 -2
  69. data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/metadata.yml +37 -20
  70. data/lib/us_core_test_kit/generated/v4.0.0/bmi/bmi_must_support_test.rb +7 -7
  71. data/lib/us_core_test_kit/generated/v4.0.0/bmi/bmi_reference_resolution_test.rb +0 -2
  72. data/lib/us_core_test_kit/generated/v4.0.0/bmi/metadata.yml +13 -9
  73. data/lib/us_core_test_kit/generated/v4.0.0/body_height/body_height_must_support_test.rb +7 -7
  74. data/lib/us_core_test_kit/generated/v4.0.0/body_height/body_height_reference_resolution_test.rb +0 -2
  75. data/lib/us_core_test_kit/generated/v4.0.0/body_height/metadata.yml +13 -9
  76. data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/body_temperature_must_support_test.rb +7 -7
  77. data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/body_temperature_reference_resolution_test.rb +0 -2
  78. data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/metadata.yml +13 -9
  79. data/lib/us_core_test_kit/generated/v4.0.0/body_weight/body_weight_must_support_test.rb +7 -7
  80. data/lib/us_core_test_kit/generated/v4.0.0/body_weight/body_weight_reference_resolution_test.rb +0 -2
  81. data/lib/us_core_test_kit/generated/v4.0.0/body_weight/metadata.yml +13 -9
  82. data/lib/us_core_test_kit/generated/v4.0.0/care_plan/care_plan_reference_resolution_test.rb +0 -2
  83. data/lib/us_core_test_kit/generated/v4.0.0/care_plan/metadata.yml +4 -1
  84. data/lib/us_core_test_kit/generated/v4.0.0/care_team/care_team_reference_resolution_test.rb +0 -2
  85. data/lib/us_core_test_kit/generated/v4.0.0/care_team/metadata.yml +2 -0
  86. data/lib/us_core_test_kit/generated/v4.0.0/condition/condition_reference_resolution_test.rb +0 -2
  87. data/lib/us_core_test_kit/generated/v4.0.0/condition/metadata.yml +2 -0
  88. data/lib/us_core_test_kit/generated/v4.0.0/device/device_reference_resolution_test.rb +0 -2
  89. data/lib/us_core_test_kit/generated/v4.0.0/device/metadata.yml +2 -0
  90. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_lab/diagnostic_report_lab_reference_resolution_test.rb +0 -2
  91. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_lab/metadata.yml +6 -1
  92. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -2
  93. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_note/metadata.yml +4 -0
  94. data/lib/us_core_test_kit/generated/v4.0.0/document_reference/document_reference_reference_resolution_test.rb +0 -2
  95. data/lib/us_core_test_kit/generated/v4.0.0/document_reference/metadata.yml +4 -0
  96. data/lib/us_core_test_kit/generated/v4.0.0/encounter/encounter_reference_resolution_test.rb +0 -2
  97. data/lib/us_core_test_kit/generated/v4.0.0/encounter/metadata.yml +4 -0
  98. data/lib/us_core_test_kit/generated/v4.0.0/goal/goal_reference_resolution_test.rb +0 -2
  99. data/lib/us_core_test_kit/generated/v4.0.0/goal/metadata.yml +2 -0
  100. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/head_circumference_must_support_test.rb +7 -7
  101. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/head_circumference_reference_resolution_test.rb +0 -2
  102. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/metadata.yml +13 -9
  103. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/head_circumference_percentile_must_support_test.rb +7 -7
  104. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/head_circumference_percentile_reference_resolution_test.rb +0 -2
  105. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/metadata.yml +13 -9
  106. data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/heart_rate_must_support_test.rb +7 -7
  107. data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/heart_rate_reference_resolution_test.rb +0 -2
  108. data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/metadata.yml +13 -9
  109. data/lib/us_core_test_kit/generated/v4.0.0/immunization/immunization_reference_resolution_test.rb +0 -2
  110. data/lib/us_core_test_kit/generated/v4.0.0/immunization/metadata.yml +2 -0
  111. data/lib/us_core_test_kit/generated/v4.0.0/medication_request/medication_request_reference_resolution_test.rb +0 -2
  112. data/lib/us_core_test_kit/generated/v4.0.0/medication_request/metadata.yml +4 -0
  113. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +275 -146
  114. data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/metadata.yml +4 -1
  115. data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/observation_lab_reference_resolution_test.rb +0 -2
  116. data/lib/us_core_test_kit/generated/v4.0.0/organization/metadata.yml +2 -1
  117. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/metadata.yml +13 -9
  118. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/pediatric_bmi_for_age_must_support_test.rb +7 -7
  119. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/pediatric_bmi_for_age_reference_resolution_test.rb +0 -2
  120. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/metadata.yml +13 -9
  121. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/pediatric_weight_for_height_must_support_test.rb +7 -7
  122. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/pediatric_weight_for_height_reference_resolution_test.rb +0 -2
  123. data/lib/us_core_test_kit/generated/v4.0.0/practitioner/metadata.yml +2 -1
  124. data/lib/us_core_test_kit/generated/v4.0.0/procedure/metadata.yml +2 -0
  125. data/lib/us_core_test_kit/generated/v4.0.0/procedure/procedure_reference_resolution_test.rb +0 -2
  126. data/lib/us_core_test_kit/generated/v4.0.0/provenance/metadata.yml +8 -6
  127. data/lib/us_core_test_kit/generated/v4.0.0/provenance/provenance_must_support_test.rb +2 -1
  128. data/lib/us_core_test_kit/generated/v4.0.0/provenance/provenance_reference_resolution_test.rb +0 -2
  129. data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/metadata.yml +38 -22
  130. data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/pulse_oximetry_must_support_test.rb +15 -8
  131. data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/pulse_oximetry_reference_resolution_test.rb +0 -2
  132. data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/metadata.yml +13 -9
  133. data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/respiratory_rate_must_support_test.rb +7 -7
  134. data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/respiratory_rate_reference_resolution_test.rb +0 -2
  135. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/metadata.yml +8 -3
  136. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/smokingstatus_reference_resolution_test.rb +0 -2
  137. data/lib/us_core_test_kit/generated/v5.0.1/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +0 -2
  138. data/lib/us_core_test_kit/generated/v5.0.1/allergy_intolerance/metadata.yml +2 -0
  139. data/lib/us_core_test_kit/generated/v5.0.1/blood_pressure/blood_pressure_must_support_test.rb +18 -8
  140. data/lib/us_core_test_kit/generated/v5.0.1/blood_pressure/blood_pressure_reference_resolution_test.rb +0 -2
  141. data/lib/us_core_test_kit/generated/v5.0.1/blood_pressure/metadata.yml +40 -20
  142. data/lib/us_core_test_kit/generated/v5.0.1/bmi/bmi_must_support_test.rb +7 -7
  143. data/lib/us_core_test_kit/generated/v5.0.1/bmi/bmi_reference_resolution_test.rb +0 -2
  144. data/lib/us_core_test_kit/generated/v5.0.1/bmi/metadata.yml +13 -9
  145. data/lib/us_core_test_kit/generated/v5.0.1/body_height/body_height_must_support_test.rb +7 -7
  146. data/lib/us_core_test_kit/generated/v5.0.1/body_height/body_height_reference_resolution_test.rb +0 -2
  147. data/lib/us_core_test_kit/generated/v5.0.1/body_height/metadata.yml +13 -9
  148. data/lib/us_core_test_kit/generated/v5.0.1/body_temperature/body_temperature_must_support_test.rb +7 -7
  149. data/lib/us_core_test_kit/generated/v5.0.1/body_temperature/body_temperature_reference_resolution_test.rb +0 -2
  150. data/lib/us_core_test_kit/generated/v5.0.1/body_temperature/metadata.yml +13 -9
  151. data/lib/us_core_test_kit/generated/v5.0.1/body_weight/body_weight_must_support_test.rb +7 -7
  152. data/lib/us_core_test_kit/generated/v5.0.1/body_weight/body_weight_reference_resolution_test.rb +0 -2
  153. data/lib/us_core_test_kit/generated/v5.0.1/body_weight/metadata.yml +13 -9
  154. data/lib/us_core_test_kit/generated/v5.0.1/care_plan/care_plan_reference_resolution_test.rb +0 -2
  155. data/lib/us_core_test_kit/generated/v5.0.1/care_plan/metadata.yml +4 -1
  156. data/lib/us_core_test_kit/generated/v5.0.1/care_team/care_team_reference_resolution_test.rb +0 -2
  157. data/lib/us_core_test_kit/generated/v5.0.1/care_team/metadata.yml +2 -0
  158. data/lib/us_core_test_kit/generated/v5.0.1/condition_encounter_diagnosis/condition_encounter_diagnosis_reference_resolution_test.rb +0 -2
  159. data/lib/us_core_test_kit/generated/v5.0.1/condition_encounter_diagnosis/metadata.yml +6 -1
  160. data/lib/us_core_test_kit/generated/v5.0.1/condition_problems_health_concerns/condition_problems_health_concerns_reference_resolution_test.rb +0 -2
  161. data/lib/us_core_test_kit/generated/v5.0.1/condition_problems_health_concerns/metadata.yml +6 -2
  162. data/lib/us_core_test_kit/generated/v5.0.1/device/device_reference_resolution_test.rb +0 -2
  163. data/lib/us_core_test_kit/generated/v5.0.1/device/metadata.yml +2 -0
  164. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_lab/diagnostic_report_lab_reference_resolution_test.rb +0 -2
  165. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_lab/metadata.yml +6 -1
  166. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -2
  167. data/lib/us_core_test_kit/generated/v5.0.1/diagnostic_report_note/metadata.yml +6 -1
  168. data/lib/us_core_test_kit/generated/v5.0.1/document_reference/document_reference_reference_resolution_test.rb +0 -2
  169. data/lib/us_core_test_kit/generated/v5.0.1/document_reference/metadata.yml +6 -1
  170. data/lib/us_core_test_kit/generated/v5.0.1/encounter/encounter_reference_resolution_test.rb +0 -2
  171. data/lib/us_core_test_kit/generated/v5.0.1/encounter/metadata.yml +4 -0
  172. data/lib/us_core_test_kit/generated/v5.0.1/goal/goal_reference_resolution_test.rb +0 -2
  173. data/lib/us_core_test_kit/generated/v5.0.1/goal/metadata.yml +2 -0
  174. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference/head_circumference_must_support_test.rb +7 -7
  175. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference/head_circumference_reference_resolution_test.rb +0 -2
  176. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference/metadata.yml +13 -9
  177. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference_percentile/head_circumference_percentile_must_support_test.rb +7 -7
  178. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference_percentile/head_circumference_percentile_reference_resolution_test.rb +0 -2
  179. data/lib/us_core_test_kit/generated/v5.0.1/head_circumference_percentile/metadata.yml +13 -9
  180. data/lib/us_core_test_kit/generated/v5.0.1/heart_rate/heart_rate_must_support_test.rb +7 -7
  181. data/lib/us_core_test_kit/generated/v5.0.1/heart_rate/heart_rate_reference_resolution_test.rb +0 -2
  182. data/lib/us_core_test_kit/generated/v5.0.1/heart_rate/metadata.yml +13 -9
  183. data/lib/us_core_test_kit/generated/v5.0.1/immunization/immunization_reference_resolution_test.rb +0 -2
  184. data/lib/us_core_test_kit/generated/v5.0.1/immunization/metadata.yml +2 -0
  185. data/lib/us_core_test_kit/generated/v5.0.1/medication_request/medication_request_reference_resolution_test.rb +0 -2
  186. data/lib/us_core_test_kit/generated/v5.0.1/medication_request/metadata.yml +6 -1
  187. data/lib/us_core_test_kit/generated/v5.0.1/metadata.yml +328 -161
  188. data/lib/us_core_test_kit/generated/v5.0.1/observation_clinical_test/metadata.yml +4 -1
  189. data/lib/us_core_test_kit/generated/v5.0.1/observation_clinical_test/observation_clinical_test_reference_resolution_test.rb +0 -2
  190. data/lib/us_core_test_kit/generated/v5.0.1/observation_imaging/metadata.yml +4 -1
  191. data/lib/us_core_test_kit/generated/v5.0.1/observation_imaging/observation_imaging_reference_resolution_test.rb +0 -2
  192. data/lib/us_core_test_kit/generated/v5.0.1/observation_lab/metadata.yml +4 -1
  193. data/lib/us_core_test_kit/generated/v5.0.1/observation_lab/observation_lab_reference_resolution_test.rb +0 -2
  194. data/lib/us_core_test_kit/generated/v5.0.1/observation_sdoh_assessment/metadata.yml +6 -2
  195. data/lib/us_core_test_kit/generated/v5.0.1/observation_sdoh_assessment/observation_sdoh_assessment_reference_resolution_test.rb +0 -2
  196. data/lib/us_core_test_kit/generated/v5.0.1/observation_sexual_orientation/metadata.yml +4 -1
  197. data/lib/us_core_test_kit/generated/v5.0.1/observation_sexual_orientation/observation_sexual_orientation_reference_resolution_test.rb +0 -2
  198. data/lib/us_core_test_kit/generated/v5.0.1/observation_social_history/metadata.yml +6 -2
  199. data/lib/us_core_test_kit/generated/v5.0.1/observation_social_history/observation_social_history_reference_resolution_test.rb +0 -2
  200. data/lib/us_core_test_kit/generated/v5.0.1/organization/metadata.yml +2 -1
  201. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_bmi_for_age/metadata.yml +13 -9
  202. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_bmi_for_age/pediatric_bmi_for_age_must_support_test.rb +7 -7
  203. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_bmi_for_age/pediatric_bmi_for_age_reference_resolution_test.rb +0 -2
  204. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_weight_for_height/metadata.yml +13 -9
  205. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_weight_for_height/pediatric_weight_for_height_must_support_test.rb +7 -7
  206. data/lib/us_core_test_kit/generated/v5.0.1/pediatric_weight_for_height/pediatric_weight_for_height_reference_resolution_test.rb +0 -2
  207. data/lib/us_core_test_kit/generated/v5.0.1/practitioner/metadata.yml +2 -1
  208. data/lib/us_core_test_kit/generated/v5.0.1/procedure/metadata.yml +2 -0
  209. data/lib/us_core_test_kit/generated/v5.0.1/procedure/procedure_reference_resolution_test.rb +0 -2
  210. data/lib/us_core_test_kit/generated/v5.0.1/provenance/metadata.yml +8 -6
  211. data/lib/us_core_test_kit/generated/v5.0.1/provenance/provenance_must_support_test.rb +2 -1
  212. data/lib/us_core_test_kit/generated/v5.0.1/provenance/provenance_reference_resolution_test.rb +0 -2
  213. data/lib/us_core_test_kit/generated/v5.0.1/pulse_oximetry/metadata.yml +38 -22
  214. data/lib/us_core_test_kit/generated/v5.0.1/pulse_oximetry/pulse_oximetry_must_support_test.rb +15 -8
  215. data/lib/us_core_test_kit/generated/v5.0.1/pulse_oximetry/pulse_oximetry_reference_resolution_test.rb +0 -2
  216. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/metadata.yml +4 -1
  217. data/lib/us_core_test_kit/generated/v5.0.1/questionnaire_response/questionnaire_response_reference_resolution_test.rb +0 -2
  218. data/lib/us_core_test_kit/generated/v5.0.1/related_person/metadata.yml +2 -0
  219. data/lib/us_core_test_kit/generated/v5.0.1/related_person/related_person_reference_resolution_test.rb +0 -2
  220. data/lib/us_core_test_kit/generated/v5.0.1/respiratory_rate/metadata.yml +13 -9
  221. data/lib/us_core_test_kit/generated/v5.0.1/respiratory_rate/respiratory_rate_must_support_test.rb +7 -7
  222. data/lib/us_core_test_kit/generated/v5.0.1/respiratory_rate/respiratory_rate_reference_resolution_test.rb +0 -2
  223. data/lib/us_core_test_kit/generated/v5.0.1/service_request/metadata.yml +4 -1
  224. data/lib/us_core_test_kit/generated/v5.0.1/service_request/service_request_reference_resolution_test.rb +0 -2
  225. data/lib/us_core_test_kit/generated/v5.0.1/smokingstatus/metadata.yml +8 -3
  226. data/lib/us_core_test_kit/generated/v5.0.1/smokingstatus/smokingstatus_reference_resolution_test.rb +0 -2
  227. data/lib/us_core_test_kit/generated/v6.1.0/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +0 -2
  228. data/lib/us_core_test_kit/generated/v6.1.0/allergy_intolerance/metadata.yml +2 -0
  229. data/lib/us_core_test_kit/generated/v6.1.0/blood_pressure/blood_pressure_must_support_test.rb +18 -8
  230. data/lib/us_core_test_kit/generated/v6.1.0/blood_pressure/blood_pressure_reference_resolution_test.rb +0 -2
  231. data/lib/us_core_test_kit/generated/v6.1.0/blood_pressure/metadata.yml +40 -20
  232. data/lib/us_core_test_kit/generated/v6.1.0/bmi/bmi_must_support_test.rb +7 -7
  233. data/lib/us_core_test_kit/generated/v6.1.0/bmi/bmi_reference_resolution_test.rb +0 -2
  234. data/lib/us_core_test_kit/generated/v6.1.0/bmi/metadata.yml +17 -13
  235. data/lib/us_core_test_kit/generated/v6.1.0/body_height/body_height_must_support_test.rb +7 -7
  236. data/lib/us_core_test_kit/generated/v6.1.0/body_height/body_height_reference_resolution_test.rb +0 -2
  237. data/lib/us_core_test_kit/generated/v6.1.0/body_height/metadata.yml +17 -13
  238. data/lib/us_core_test_kit/generated/v6.1.0/body_temperature/body_temperature_must_support_test.rb +7 -7
  239. data/lib/us_core_test_kit/generated/v6.1.0/body_temperature/body_temperature_reference_resolution_test.rb +0 -2
  240. data/lib/us_core_test_kit/generated/v6.1.0/body_temperature/metadata.yml +17 -13
  241. data/lib/us_core_test_kit/generated/v6.1.0/body_weight/body_weight_must_support_test.rb +7 -7
  242. data/lib/us_core_test_kit/generated/v6.1.0/body_weight/body_weight_reference_resolution_test.rb +0 -2
  243. data/lib/us_core_test_kit/generated/v6.1.0/body_weight/metadata.yml +17 -13
  244. data/lib/us_core_test_kit/generated/v6.1.0/care_plan/care_plan_reference_resolution_test.rb +0 -2
  245. data/lib/us_core_test_kit/generated/v6.1.0/care_plan/metadata.yml +4 -1
  246. data/lib/us_core_test_kit/generated/v6.1.0/care_team/care_team_reference_resolution_test.rb +0 -2
  247. data/lib/us_core_test_kit/generated/v6.1.0/care_team/metadata.yml +2 -0
  248. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/condition_encounter_diagnosis_reference_resolution_test.rb +0 -2
  249. data/lib/us_core_test_kit/generated/v6.1.0/condition_encounter_diagnosis/metadata.yml +6 -1
  250. data/lib/us_core_test_kit/generated/v6.1.0/condition_problems_health_concerns/condition_problems_health_concerns_reference_resolution_test.rb +0 -2
  251. data/lib/us_core_test_kit/generated/v6.1.0/condition_problems_health_concerns/metadata.yml +6 -2
  252. data/lib/us_core_test_kit/generated/v6.1.0/coverage/coverage_must_support_test.rb +5 -3
  253. data/lib/us_core_test_kit/generated/v6.1.0/coverage/coverage_reference_resolution_test.rb +0 -2
  254. data/lib/us_core_test_kit/generated/v6.1.0/coverage/metadata.yml +13 -7
  255. data/lib/us_core_test_kit/generated/v6.1.0/device/device_reference_resolution_test.rb +0 -2
  256. data/lib/us_core_test_kit/generated/v6.1.0/device/metadata.yml +2 -0
  257. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_lab/diagnostic_report_lab_reference_resolution_test.rb +0 -2
  258. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_lab/metadata.yml +6 -1
  259. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/diagnostic_report_note_reference_resolution_test.rb +0 -2
  260. data/lib/us_core_test_kit/generated/v6.1.0/diagnostic_report_note/metadata.yml +6 -1
  261. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/document_reference_reference_resolution_test.rb +0 -2
  262. data/lib/us_core_test_kit/generated/v6.1.0/document_reference/metadata.yml +6 -1
  263. data/lib/us_core_test_kit/generated/v6.1.0/encounter/encounter_reference_resolution_test.rb +0 -2
  264. data/lib/us_core_test_kit/generated/v6.1.0/encounter/metadata.yml +4 -0
  265. data/lib/us_core_test_kit/generated/v6.1.0/goal/goal_reference_resolution_test.rb +0 -2
  266. data/lib/us_core_test_kit/generated/v6.1.0/goal/metadata.yml +2 -0
  267. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference/head_circumference_must_support_test.rb +7 -7
  268. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference/head_circumference_reference_resolution_test.rb +0 -2
  269. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference/metadata.yml +17 -13
  270. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference_percentile/head_circumference_percentile_must_support_test.rb +7 -7
  271. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference_percentile/head_circumference_percentile_reference_resolution_test.rb +0 -2
  272. data/lib/us_core_test_kit/generated/v6.1.0/head_circumference_percentile/metadata.yml +17 -13
  273. data/lib/us_core_test_kit/generated/v6.1.0/heart_rate/heart_rate_must_support_test.rb +7 -7
  274. data/lib/us_core_test_kit/generated/v6.1.0/heart_rate/heart_rate_reference_resolution_test.rb +0 -2
  275. data/lib/us_core_test_kit/generated/v6.1.0/heart_rate/metadata.yml +17 -13
  276. data/lib/us_core_test_kit/generated/v6.1.0/immunization/immunization_reference_resolution_test.rb +0 -2
  277. data/lib/us_core_test_kit/generated/v6.1.0/immunization/metadata.yml +2 -0
  278. data/lib/us_core_test_kit/generated/v6.1.0/medication_dispense/medication_dispense_patient_search_test.rb +2 -2
  279. data/lib/us_core_test_kit/generated/v6.1.0/medication_dispense/medication_dispense_patient_status_search_test.rb +2 -2
  280. data/lib/us_core_test_kit/generated/v6.1.0/medication_dispense/medication_dispense_patient_status_type_search_test.rb +2 -2
  281. data/lib/us_core_test_kit/generated/v6.1.0/medication_dispense/medication_dispense_reference_resolution_test.rb +0 -2
  282. data/lib/us_core_test_kit/generated/v6.1.0/medication_dispense/metadata.yml +4 -0
  283. data/lib/us_core_test_kit/generated/v6.1.0/medication_request/medication_request_reference_resolution_test.rb +0 -2
  284. data/lib/us_core_test_kit/generated/v6.1.0/medication_request/metadata.yml +6 -1
  285. data/lib/us_core_test_kit/generated/v6.1.0/metadata.yml +417 -226
  286. data/lib/us_core_test_kit/generated/v6.1.0/observation_clinical_result/metadata.yml +4 -1
  287. data/lib/us_core_test_kit/generated/v6.1.0/observation_clinical_result/observation_clinical_result_reference_resolution_test.rb +0 -2
  288. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/metadata.yml +6 -1
  289. data/lib/us_core_test_kit/generated/v6.1.0/observation_lab/observation_lab_reference_resolution_test.rb +0 -2
  290. data/lib/us_core_test_kit/generated/v6.1.0/observation_occupation/metadata.yml +12 -7
  291. data/lib/us_core_test_kit/generated/v6.1.0/observation_occupation/observation_occupation_must_support_test.rb +2 -2
  292. data/lib/us_core_test_kit/generated/v6.1.0/observation_occupation/observation_occupation_reference_resolution_test.rb +0 -2
  293. data/lib/us_core_test_kit/generated/v6.1.0/observation_pregnancyintent/metadata.yml +8 -3
  294. data/lib/us_core_test_kit/generated/v6.1.0/observation_pregnancyintent/observation_pregnancyintent_reference_resolution_test.rb +0 -2
  295. data/lib/us_core_test_kit/generated/v6.1.0/observation_pregnancystatus/metadata.yml +8 -3
  296. data/lib/us_core_test_kit/generated/v6.1.0/observation_pregnancystatus/observation_pregnancystatus_reference_resolution_test.rb +0 -2
  297. data/lib/us_core_test_kit/generated/v6.1.0/observation_screening_assessment/metadata.yml +6 -2
  298. data/lib/us_core_test_kit/generated/v6.1.0/observation_screening_assessment/observation_screening_assessment_reference_resolution_test.rb +0 -2
  299. data/lib/us_core_test_kit/generated/v6.1.0/observation_sexual_orientation/metadata.yml +4 -1
  300. data/lib/us_core_test_kit/generated/v6.1.0/observation_sexual_orientation/observation_sexual_orientation_reference_resolution_test.rb +0 -2
  301. data/lib/us_core_test_kit/generated/v6.1.0/organization/metadata.yml +2 -1
  302. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_bmi_for_age/metadata.yml +17 -13
  303. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_bmi_for_age/pediatric_bmi_for_age_must_support_test.rb +7 -7
  304. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_bmi_for_age/pediatric_bmi_for_age_reference_resolution_test.rb +0 -2
  305. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_weight_for_height/metadata.yml +17 -13
  306. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_weight_for_height/pediatric_weight_for_height_must_support_test.rb +7 -7
  307. data/lib/us_core_test_kit/generated/v6.1.0/pediatric_weight_for_height/pediatric_weight_for_height_reference_resolution_test.rb +0 -2
  308. data/lib/us_core_test_kit/generated/v6.1.0/practitioner/metadata.yml +2 -1
  309. data/lib/us_core_test_kit/generated/v6.1.0/procedure/metadata.yml +2 -0
  310. data/lib/us_core_test_kit/generated/v6.1.0/procedure/procedure_reference_resolution_test.rb +0 -2
  311. data/lib/us_core_test_kit/generated/v6.1.0/provenance/metadata.yml +8 -6
  312. data/lib/us_core_test_kit/generated/v6.1.0/provenance/provenance_must_support_test.rb +2 -1
  313. data/lib/us_core_test_kit/generated/v6.1.0/provenance/provenance_reference_resolution_test.rb +0 -2
  314. data/lib/us_core_test_kit/generated/v6.1.0/pulse_oximetry/metadata.yml +48 -31
  315. data/lib/us_core_test_kit/generated/v6.1.0/pulse_oximetry/pulse_oximetry_must_support_test.rb +19 -12
  316. data/lib/us_core_test_kit/generated/v6.1.0/pulse_oximetry/pulse_oximetry_reference_resolution_test.rb +0 -2
  317. data/lib/us_core_test_kit/generated/v6.1.0/questionnaire_response/metadata.yml +2 -0
  318. data/lib/us_core_test_kit/generated/v6.1.0/questionnaire_response/questionnaire_response_reference_resolution_test.rb +0 -2
  319. data/lib/us_core_test_kit/generated/v6.1.0/related_person/metadata.yml +2 -0
  320. data/lib/us_core_test_kit/generated/v6.1.0/related_person/related_person_reference_resolution_test.rb +0 -2
  321. data/lib/us_core_test_kit/generated/v6.1.0/respiratory_rate/metadata.yml +17 -13
  322. data/lib/us_core_test_kit/generated/v6.1.0/respiratory_rate/respiratory_rate_must_support_test.rb +7 -7
  323. data/lib/us_core_test_kit/generated/v6.1.0/respiratory_rate/respiratory_rate_reference_resolution_test.rb +0 -2
  324. data/lib/us_core_test_kit/generated/v6.1.0/service_request/metadata.yml +4 -1
  325. data/lib/us_core_test_kit/generated/v6.1.0/service_request/service_request_reference_resolution_test.rb +0 -2
  326. data/lib/us_core_test_kit/generated/v6.1.0/simple_observation/metadata.yml +4 -1
  327. data/lib/us_core_test_kit/generated/v6.1.0/simple_observation/simple_observation_reference_resolution_test.rb +0 -2
  328. data/lib/us_core_test_kit/generated/v6.1.0/smokingstatus/metadata.yml +6 -2
  329. data/lib/us_core_test_kit/generated/v6.1.0/smokingstatus/smokingstatus_reference_resolution_test.rb +0 -2
  330. data/lib/us_core_test_kit/generated/v6.1.0/specimen/metadata.yml +2 -0
  331. data/lib/us_core_test_kit/generated/v6.1.0/specimen/specimen_reference_resolution_test.rb +0 -2
  332. data/lib/us_core_test_kit/generator/group_metadata_extractor.rb +0 -1
  333. data/lib/us_core_test_kit/generator/ig_loader.rb +2 -0
  334. data/lib/us_core_test_kit/generator/must_support_metadata_extractor.rb +56 -26
  335. data/lib/us_core_test_kit/generator/must_support_test_generator.rb +1 -1
  336. data/lib/us_core_test_kit/generator/search_test_generator.rb +2 -2
  337. data/lib/us_core_test_kit/generator.rb +0 -6
  338. data/lib/us_core_test_kit/must_support_test.rb +2 -5
  339. data/lib/us_core_test_kit/reference_resolution_test.rb +2 -2
  340. data/lib/us_core_test_kit/search_test.rb +29 -7
  341. data/lib/us_core_test_kit/version.rb +1 -1
  342. metadata +3 -7
  343. data/lib/us_core_test_kit/generated/v3.1.1/resource_list.rb +0 -28
  344. data/lib/us_core_test_kit/generated/v4.0.0/resource_list.rb +0 -28
  345. data/lib/us_core_test_kit/generated/v5.0.1/resource_list.rb +0 -31
  346. data/lib/us_core_test_kit/generated/v6.1.0/resource_list.rb +0 -34
  347. data/lib/us_core_test_kit/generator/resource_list_generator.rb +0 -42
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40e057a850a263a83b69fceef4614ef23b22c60b7ee67eb69cc0df62cff855f7
4
- data.tar.gz: 164d24c97bec0fadea35fc97370c141cd200c036f4a7e8e85da3796d5f667ea3
3
+ metadata.gz: '085de7c8f5dfbf5411a51b4716939b476155eaa9a138134e62315893a997f12c'
4
+ data.tar.gz: 89dd64e5438427306397c2cee443cadd4584aed6a74dc02c4f6094d742ed2810
5
5
  SHA512:
6
- metadata.gz: 8f12164ae95d2a69fbd9b81042703060718950e673fba85df055efe76c54c96fbec777d847d92343f84ecb35844c72c655026cde47741792f161e0965f9170b1
7
- data.tar.gz: 82a4245c83563487602247524e6ac1ff7b6b3ae1e07d5b736ea84efc2c6cc08f5445c12ce8b48dd316c8c533761a3a5f56d17ad143cb635ec697d4e93aa5b11b
6
+ metadata.gz: 006a7404ef31b5b936456e487b3e81baaaa7b889452ad2688ed36d7947c255209f933d9c6987cc117ccd0c25afa6280cb9efc4f5ca4f8ae824b077354e2d603e
7
+ data.tar.gz: fbb0ade67a651b55cf4641c49955b3fc9939e0d25fc8e6c4b755788869b3a1d3d4aff8a9265894e6d5fadc48a13e7601193331bcc4f308f23bb6f7b792988505
@@ -20,30 +20,32 @@ module USCoreTestKit
20
20
  assert_resource_type(:capability_statement)
21
21
  capability_statement = resource
22
22
 
23
- supported_resources =
23
+ supported_profiles =
24
24
  capability_statement.rest
25
- &.each_with_object([]) do |rest, resources|
26
- rest.resource.each { |resource| resources << resource.type }
25
+ &.each_with_object([]) do |rest, profiles|
26
+ rest.resource.each { |resource| profiles.concat(resource.supportedProfile) }
27
27
  end.uniq
28
28
 
29
- assert supported_resources.include?('Patient'), 'US Core Patient profile not supported'
29
+ assert supported_profiles.include?('http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient'), 'US Core Patient profile not supported'
30
30
 
31
- us_core_resources = config.options[:us_core_resources]
31
+ us_core_profiles = config.options[:us_core_profiles]
32
32
 
33
- other_resources = us_core_resources.reject { |resource_type| resource_type == 'Patient' }
34
- other_resources_supported = other_resources.any? { |resource| supported_resources.include? resource }
35
- assert other_resources_supported, 'No US Core resources other than Patient are supported'
33
+ other_profiles = us_core_profiles.reject { |resource_type| resource_type == 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient' }
34
+ other_profiles_supported = other_profiles.any? { |profile| supported_profiles.include? profile }
35
+ assert other_profiles_supported, 'No US Core profiles other than Patient are supported'
36
36
 
37
- if config.options[:required_resources].present?
38
- missing_resources = config.options[:required_resources] - supported_resources
37
+ if config.options[:required_profiles].present?
38
+ required_profiles = config.options[:required_profiles]
39
39
 
40
- missing_resource_list =
41
- missing_resources
42
- .map { |resource| "`#{resource}`" }
43
- .join(', ')
40
+ missing_profiles = required_profiles - supported_profiles
44
41
 
45
- assert missing_resources.empty?,
46
- "The CapabilityStatement did not list support for the following resources: #{missing_resource_list}"
42
+ missing_profiles_list =
43
+ missing_profiles
44
+ .map { |resource| "`#{resource}`" }
45
+ .join(', ')
46
+
47
+ assert missing_profiles.empty?,
48
+ "The CapabilityStatement did not list support for the following resources: #{missing_profiles_list}"
47
49
  end
48
50
  end
49
51
  end
@@ -2,7 +2,7 @@ require 'tls_test_kit'
2
2
  require_relative '../capability_statement/conformance_support_test'
3
3
  require_relative '../capability_statement/fhir_version_test'
4
4
  require_relative '../capability_statement/json_support_test'
5
- require_relative '../capability_statement/profile_support_test'
5
+ require_relative './profile_support_test'
6
6
 
7
7
  module USCoreTestKit
8
8
  module USCoreV311
@@ -0,0 +1,51 @@
1
+ module USCoreTestKit
2
+ module USCoreV311
3
+ class ProfileSupportTest < Inferno::Test
4
+ id :us_core_profile_support
5
+ title 'Capability Statement lists support for required US Core Resoruce Types'
6
+ description %(
7
+ The US Core Implementation Guide states:
8
+
9
+ ```
10
+ The US Core Server SHALL:
11
+ 1. Support the US Core Patient resource.
12
+ 2. Support at least one additional US Core resources.
13
+
14
+ In order to support USCDI, servers must support all USCDI resources.
15
+ ```
16
+ )
17
+ uses_request :capability_statement
18
+
19
+ run do
20
+ assert_resource_type(:capability_statement)
21
+ capability_statement = resource
22
+
23
+ supported_resources =
24
+ capability_statement.rest
25
+ &.each_with_object([]) do |rest, resources|
26
+ rest.resource.each { |resource| resources << resource.type }
27
+ end.uniq
28
+
29
+ assert supported_resources.include?('Patient'), 'US Core Patient profile not supported'
30
+
31
+ us_core_resources = config.options[:us_core_resources]
32
+
33
+ other_resources = us_core_resources.reject { |resource_type| resource_type == 'Patient' }
34
+ other_resources_supported = other_resources.any? { |resource| supported_resources.include? resource }
35
+ assert other_resources_supported, 'No US Core resources other than Patient are supported'
36
+
37
+ if config.options[:required_resources].present?
38
+ missing_resources = config.options[:required_resources] - supported_resources
39
+
40
+ missing_resource_list =
41
+ missing_resources
42
+ .map { |resource| "`#{resource}`" }
43
+ .join(', ')
44
+
45
+ assert missing_resources.empty?,
46
+ "The CapabilityStatement did not list support for the following resources: #{missing_resource_list}"
47
+ end
48
+ end
49
+ end
50
+ end
51
+ end
@@ -106,7 +106,7 @@ module USCoreTestKit
106
106
 
107
107
  test from: :us_core_profile_support do
108
108
  config(
109
- options: { us_core_resources: PROFILES.keys }
109
+ options: { us_core_profiles: PROFILES.values.flatten }
110
110
  )
111
111
  end
112
112
 
@@ -118,7 +118,7 @@ module USCoreTestKit
118
118
 
119
119
  test from: :us_core_profile_support do
120
120
  config(
121
- options: { us_core_resources: PROFILES.keys }
121
+ options: { us_core_profiles: PROFILES.values.flatten }
122
122
  )
123
123
  end
124
124
 
@@ -121,7 +121,7 @@ module USCoreTestKit
121
121
 
122
122
  test from: :us_core_profile_support do
123
123
  config(
124
- options: { us_core_resources: PROFILES.keys }
124
+ options: { us_core_profiles: PROFILES.values.flatten }
125
125
  )
126
126
  end
127
127
 
@@ -20,7 +20,6 @@ module USCoreTestKit
20
20
  return nil if element.nil?
21
21
 
22
22
  elements = Array.wrap(element)
23
-
24
23
  if path.empty?
25
24
  unless include_dar
26
25
  elements = elements.reject do |el|
@@ -29,24 +28,20 @@ module USCoreTestKit
29
28
  end
30
29
 
31
30
  return elements.find { |el| yield(el) } if block_given?
32
-
33
31
  return elements.first
34
32
  end
35
33
 
36
34
  path_segments = path.split(/(?<!hl7)\./)
37
- segment = path_segments.shift.delete_suffix('[x]').gsub(/^class$/, 'local_class').to_sym
38
35
 
36
+ segment = path_segments.shift.delete_suffix('[x]').gsub(/^class$/, 'local_class').gsub(/\[x\]:/, ':').to_sym
39
37
  no_elements_present =
40
38
  elements.none? do |element|
41
39
  child = get_next_value(element, segment)
42
-
43
40
  child.present? || child == false
44
41
  end
45
-
46
42
  return nil if no_elements_present
47
43
 
48
44
  remaining_path = path_segments.join('.')
49
-
50
45
  elements.each do |element|
51
46
  child = get_next_value(element, segment)
52
47
  element_found =
@@ -55,7 +50,6 @@ module USCoreTestKit
55
50
  else
56
51
  find_a_value_at(child, remaining_path, include_dar: include_dar)
57
52
  end
58
-
59
53
  return element_found if element_found.present? || element_found == false
60
54
  end
61
55
 
@@ -64,14 +58,88 @@ module USCoreTestKit
64
58
 
65
59
  def get_next_value(element, property)
66
60
  extension_url = property[/(?<=where\(url=').*(?='\))/]
67
-
68
61
  if extension_url.present?
69
62
  element.url == extension_url ? element : nil
63
+ elsif property.to_s.include?(':') && !property.to_s.include?('url')
64
+ slice = find_slice_via_discriminator(element, property)
65
+ slice
70
66
  else
71
67
  element.send(property)
72
68
  end
73
69
  rescue NoMethodError
74
70
  nil
75
71
  end
72
+
73
+ def find_slice_via_discriminator(element, property)
74
+ element_name = property.to_s.split(':')[0].gsub(/^class$/, 'local_class')
75
+ slice_name = property.to_s.split(':')[1].gsub(/^class$/, 'local_class')
76
+ if metadata.present?
77
+ slice_by_name = metadata.must_supports[:slices].find{ |slice| slice[:slice_name] == slice_name }
78
+ discriminator = slice_by_name[:discriminator]
79
+ slices = Array.wrap(element.send(element_name))
80
+ slices.find do |slice|
81
+ case discriminator[:type]
82
+ when 'patternCodeableConcept'
83
+ slice_value = discriminator[:path].present? ? slice.send("#{discriminator[:path]}").coding : slice.coding
84
+ slice_value.any? { |coding| coding.code == discriminator[:code] && coding.system == discriminator[:system] }
85
+ when 'patternCoding'
86
+ slice_value = discriminator[:path].present? ? slice.send(discriminator[:path]) : slice
87
+ slice_value.code == discriminator[:code] && slice_value.system == discriminator[:system]
88
+ when 'patternIdentifier'
89
+ slice.identifier.system == discriminator[:system]
90
+ when 'value'
91
+ values = discriminator[:values].map { |value| value.merge(path: value[:path].split('.')) }
92
+ verify_slice_by_values(slice, values)
93
+ when 'type'
94
+ case discriminator[:code]
95
+ when 'Date'
96
+ begin
97
+ Date.parse(slice)
98
+ rescue ArgumentError
99
+ false
100
+ end
101
+ when 'DateTime'
102
+ begin
103
+ DateTime.parse(slice)
104
+ rescue ArgumentError
105
+ false
106
+ end
107
+ when 'String'
108
+ slice.is_a? String
109
+ else
110
+ slice.is_a? FHIR.const_get(discriminator[:code])
111
+ end
112
+ when 'requiredBinding'
113
+ slice_value = discriminator[:path].present? ? slice.send("#{discriminator[:path]}").coding : slice.coding
114
+ slice_value {|coding| discriminator[:values].include?(coding.code) }
115
+ end
116
+ end
117
+ else
118
+ #TODO: Error handling for if this file doesn't have access to metadata for some reason (begin/rescue with StandardError?)
119
+ end
120
+ end
121
+
122
+ def verify_slice_by_values(element, value_definitions)
123
+ path_prefixes = value_definitions.map { |value_definition| value_definition[:path].first }.uniq
124
+ path_prefixes.all? do |path_prefix|
125
+ value_definitions_for_path =
126
+ value_definitions
127
+ .select { |value_definition| value_definition[:path].first == path_prefix }
128
+ .each { |value_definition| value_definition[:path].shift }
129
+ find_a_value_at(element, path_prefix) do |el_found|
130
+ child_element_value_definitions, current_element_value_definitions =
131
+ value_definitions_for_path.partition { |value_definition| value_definition[:path].present? }
132
+
133
+ current_element_values_match =
134
+ current_element_value_definitions
135
+ .all? { |value_definition| value_definition[:value] == el_found }
136
+
137
+ child_element_values_match =
138
+ child_element_value_definitions.present? ?
139
+ verify_slice_by_values(el_found, child_element_value_definitions) : true
140
+ current_element_values_match && child_element_values_match
141
+ end
142
+ end
143
+ end
76
144
  end
77
145
  end
@@ -1,11 +1,9 @@
1
1
  require_relative '../../../reference_resolution_test'
2
- require_relative '../resource_list'
3
2
 
4
3
  module USCoreTestKit
5
4
  module USCoreV311
6
5
  class AllergyIntoleranceReferenceResolutionTest < Inferno::Test
7
6
  include USCoreTestKit::ReferenceResolutionTest
8
- include ResourceList
9
7
 
10
8
  title 'MustSupport references within AllergyIntolerance resources are valid'
11
9
  description %(
@@ -13,20 +13,20 @@ module USCoreTestKit
13
13
  found previously for the following must support elements:
14
14
 
15
15
  * Observation.category
16
- * Observation.category.coding
17
- * Observation.category.coding.code
18
- * Observation.category.coding.system
19
16
  * Observation.category:VSCat
17
+ * Observation.category:VSCat.coding
18
+ * Observation.category:VSCat.coding.code
19
+ * Observation.category:VSCat.coding.system
20
20
  * Observation.code
21
21
  * Observation.effective[x]
22
22
  * Observation.status
23
23
  * Observation.subject
24
24
  * Observation.value[x]
25
- * Observation.value[x].code
26
- * Observation.value[x].system
27
- * Observation.value[x].unit
28
- * Observation.value[x].value
29
25
  * Observation.value[x]:valueQuantity
26
+ * Observation.value[x]:valueQuantity.code
27
+ * Observation.value[x]:valueQuantity.system
28
+ * Observation.value[x]:valueQuantity.unit
29
+ * Observation.value[x]:valueQuantity.value
30
30
  )
31
31
 
32
32
  id :us_core_v311_bodyheight_must_support_test
@@ -1,11 +1,9 @@
1
1
  require_relative '../../../reference_resolution_test'
2
- require_relative '../resource_list'
3
2
 
4
3
  module USCoreTestKit
5
4
  module USCoreV311
6
5
  class BodyheightReferenceResolutionTest < Inferno::Test
7
6
  include USCoreTestKit::ReferenceResolutionTest
8
- include ResourceList
9
7
 
10
8
  title 'MustSupport references within Observation resources are valid'
11
9
  description %(
@@ -141,12 +141,14 @@
141
141
  :must_supports:
142
142
  :extensions: []
143
143
  :slices:
144
- - :name: Observation.value[x]:valueQuantity
144
+ - :slice_id: Observation.value[x]:valueQuantity
145
+ :slice_name: valueQuantity
145
146
  :path: value[x]
146
147
  :discriminator:
147
148
  :type: type
148
149
  :code: Quantity
149
- - :name: Observation.category:VSCat
150
+ - :slice_id: Observation.category:VSCat
151
+ :slice_name: VSCat
150
152
  :path: category
151
153
  :discriminator:
152
154
  :type: value
@@ -158,10 +160,10 @@
158
160
  :elements:
159
161
  - :path: status
160
162
  - :path: category
161
- - :path: category.coding
162
- - :path: category.coding.system
163
+ - :path: category:VSCat.coding
164
+ - :path: category:VSCat.coding.system
163
165
  :fixed_value: http://terminology.hl7.org/CodeSystem/observation-category
164
- - :path: category.coding.code
166
+ - :path: category:VSCat.coding.code
165
167
  :fixed_value: vital-signs
166
168
  - :path: code
167
169
  - :path: subject
@@ -169,11 +171,11 @@
169
171
  - Reference
170
172
  - :path: effective[x]
171
173
  - :path: value[x]
172
- - :path: value[x].value
173
- - :path: value[x].unit
174
- - :path: value[x].system
174
+ - :path: value[x]:valueQuantity.value
175
+ - :path: value[x]:valueQuantity.unit
176
+ - :path: value[x]:valueQuantity.system
175
177
  :fixed_value: http://unitsofmeasure.org
176
- - :path: value[x].code
178
+ - :path: value[x]:valueQuantity.code
177
179
  :mandatory_elements:
178
180
  - Observation.status
179
181
  - Observation.category
@@ -13,20 +13,20 @@ module USCoreTestKit
13
13
  found previously for the following must support elements:
14
14
 
15
15
  * Observation.category
16
- * Observation.category.coding
17
- * Observation.category.coding.code
18
- * Observation.category.coding.system
19
16
  * Observation.category:VSCat
17
+ * Observation.category:VSCat.coding
18
+ * Observation.category:VSCat.coding.code
19
+ * Observation.category:VSCat.coding.system
20
20
  * Observation.code
21
21
  * Observation.effective[x]
22
22
  * Observation.status
23
23
  * Observation.subject
24
24
  * Observation.value[x]
25
- * Observation.value[x].code
26
- * Observation.value[x].system
27
- * Observation.value[x].unit
28
- * Observation.value[x].value
29
25
  * Observation.value[x]:valueQuantity
26
+ * Observation.value[x]:valueQuantity.code
27
+ * Observation.value[x]:valueQuantity.system
28
+ * Observation.value[x]:valueQuantity.unit
29
+ * Observation.value[x]:valueQuantity.value
30
30
  )
31
31
 
32
32
  id :us_core_v311_bodytemp_must_support_test
@@ -1,11 +1,9 @@
1
1
  require_relative '../../../reference_resolution_test'
2
- require_relative '../resource_list'
3
2
 
4
3
  module USCoreTestKit
5
4
  module USCoreV311
6
5
  class BodytempReferenceResolutionTest < Inferno::Test
7
6
  include USCoreTestKit::ReferenceResolutionTest
8
- include ResourceList
9
7
 
10
8
  title 'MustSupport references within Observation resources are valid'
11
9
  description %(
@@ -141,12 +141,14 @@
141
141
  :must_supports:
142
142
  :extensions: []
143
143
  :slices:
144
- - :name: Observation.value[x]:valueQuantity
144
+ - :slice_id: Observation.value[x]:valueQuantity
145
+ :slice_name: valueQuantity
145
146
  :path: value[x]
146
147
  :discriminator:
147
148
  :type: type
148
149
  :code: Quantity
149
- - :name: Observation.category:VSCat
150
+ - :slice_id: Observation.category:VSCat
151
+ :slice_name: VSCat
150
152
  :path: category
151
153
  :discriminator:
152
154
  :type: value
@@ -158,10 +160,10 @@
158
160
  :elements:
159
161
  - :path: status
160
162
  - :path: category
161
- - :path: category.coding
162
- - :path: category.coding.system
163
+ - :path: category:VSCat.coding
164
+ - :path: category:VSCat.coding.system
163
165
  :fixed_value: http://terminology.hl7.org/CodeSystem/observation-category
164
- - :path: category.coding.code
166
+ - :path: category:VSCat.coding.code
165
167
  :fixed_value: vital-signs
166
168
  - :path: code
167
169
  - :path: subject
@@ -169,11 +171,11 @@
169
171
  - Reference
170
172
  - :path: effective[x]
171
173
  - :path: value[x]
172
- - :path: value[x].value
173
- - :path: value[x].unit
174
- - :path: value[x].system
174
+ - :path: value[x]:valueQuantity.value
175
+ - :path: value[x]:valueQuantity.unit
176
+ - :path: value[x]:valueQuantity.system
175
177
  :fixed_value: http://unitsofmeasure.org
176
- - :path: value[x].code
178
+ - :path: value[x]:valueQuantity.code
177
179
  :mandatory_elements:
178
180
  - Observation.status
179
181
  - Observation.category
@@ -13,20 +13,20 @@ module USCoreTestKit
13
13
  found previously for the following must support elements:
14
14
 
15
15
  * Observation.category
16
- * Observation.category.coding
17
- * Observation.category.coding.code
18
- * Observation.category.coding.system
19
16
  * Observation.category:VSCat
17
+ * Observation.category:VSCat.coding
18
+ * Observation.category:VSCat.coding.code
19
+ * Observation.category:VSCat.coding.system
20
20
  * Observation.code
21
21
  * Observation.effective[x]
22
22
  * Observation.status
23
23
  * Observation.subject
24
24
  * Observation.value[x]
25
- * Observation.value[x].code
26
- * Observation.value[x].system
27
- * Observation.value[x].unit
28
- * Observation.value[x].value
29
25
  * Observation.value[x]:valueQuantity
26
+ * Observation.value[x]:valueQuantity.code
27
+ * Observation.value[x]:valueQuantity.system
28
+ * Observation.value[x]:valueQuantity.unit
29
+ * Observation.value[x]:valueQuantity.value
30
30
  )
31
31
 
32
32
  id :us_core_v311_bodyweight_must_support_test
@@ -1,11 +1,9 @@
1
1
  require_relative '../../../reference_resolution_test'
2
- require_relative '../resource_list'
3
2
 
4
3
  module USCoreTestKit
5
4
  module USCoreV311
6
5
  class BodyweightReferenceResolutionTest < Inferno::Test
7
6
  include USCoreTestKit::ReferenceResolutionTest
8
- include ResourceList
9
7
 
10
8
  title 'MustSupport references within Observation resources are valid'
11
9
  description %(
@@ -141,12 +141,14 @@
141
141
  :must_supports:
142
142
  :extensions: []
143
143
  :slices:
144
- - :name: Observation.value[x]:valueQuantity
144
+ - :slice_id: Observation.value[x]:valueQuantity
145
+ :slice_name: valueQuantity
145
146
  :path: value[x]
146
147
  :discriminator:
147
148
  :type: type
148
149
  :code: Quantity
149
- - :name: Observation.category:VSCat
150
+ - :slice_id: Observation.category:VSCat
151
+ :slice_name: VSCat
150
152
  :path: category
151
153
  :discriminator:
152
154
  :type: value
@@ -158,10 +160,10 @@
158
160
  :elements:
159
161
  - :path: status
160
162
  - :path: category
161
- - :path: category.coding
162
- - :path: category.coding.system
163
+ - :path: category:VSCat.coding
164
+ - :path: category:VSCat.coding.system
163
165
  :fixed_value: http://terminology.hl7.org/CodeSystem/observation-category
164
- - :path: category.coding.code
166
+ - :path: category:VSCat.coding.code
165
167
  :fixed_value: vital-signs
166
168
  - :path: code
167
169
  - :path: subject
@@ -169,11 +171,11 @@
169
171
  - Reference
170
172
  - :path: effective[x]
171
173
  - :path: value[x]
172
- - :path: value[x].value
173
- - :path: value[x].unit
174
- - :path: value[x].system
174
+ - :path: value[x]:valueQuantity.value
175
+ - :path: value[x]:valueQuantity.unit
176
+ - :path: value[x]:valueQuantity.system
175
177
  :fixed_value: http://unitsofmeasure.org
176
- - :path: value[x].code
178
+ - :path: value[x]:valueQuantity.code
177
179
  :mandatory_elements:
178
180
  - Observation.status
179
181
  - Observation.category
@@ -13,20 +13,28 @@ module USCoreTestKit
13
13
  found previously for the following must support elements:
14
14
 
15
15
  * Observation.category
16
- * Observation.category.coding
17
- * Observation.category.coding.code
18
- * Observation.category.coding.system
19
16
  * Observation.category:VSCat
17
+ * Observation.category:VSCat.coding
18
+ * Observation.category:VSCat.coding.code
19
+ * Observation.category:VSCat.coding.system
20
20
  * Observation.code
21
21
  * Observation.component
22
22
  * Observation.component.code
23
23
  * Observation.component.value[x]
24
- * Observation.component.value[x].code
25
- * Observation.component.value[x].system
26
- * Observation.component.value[x].unit
27
- * Observation.component.value[x].value
28
24
  * Observation.component:DiastolicBP
25
+ * Observation.component:DiastolicBP.code
26
+ * Observation.component:DiastolicBP.value[x]
27
+ * Observation.component:DiastolicBP.value[x].code
28
+ * Observation.component:DiastolicBP.value[x].system
29
+ * Observation.component:DiastolicBP.value[x].unit
30
+ * Observation.component:DiastolicBP.value[x].value
29
31
  * Observation.component:SystolicBP
32
+ * Observation.component:SystolicBP.code
33
+ * Observation.component:SystolicBP.value[x]
34
+ * Observation.component:SystolicBP.value[x].code
35
+ * Observation.component:SystolicBP.value[x].system
36
+ * Observation.component:SystolicBP.value[x].unit
37
+ * Observation.component:SystolicBP.value[x].value
30
38
  * Observation.effective[x]
31
39
  * Observation.status
32
40
  * Observation.subject
@@ -1,11 +1,9 @@
1
1
  require_relative '../../../reference_resolution_test'
2
- require_relative '../resource_list'
3
2
 
4
3
  module USCoreTestKit
5
4
  module USCoreV311
6
5
  class BpReferenceResolutionTest < Inferno::Test
7
6
  include USCoreTestKit::ReferenceResolutionTest
8
- include ResourceList
9
7
 
10
8
  title 'MustSupport references within Observation resources are valid'
11
9
  description %(