ipa_test_kit 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (270) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/lib/ipa_test_kit/custom_groups/capability_statement/conformance_support_test.rb +41 -0
  4. data/lib/ipa_test_kit/custom_groups/capability_statement/fhir_version_test.rb +15 -0
  5. data/lib/ipa_test_kit/custom_groups/capability_statement/json_support_test.rb +39 -0
  6. data/lib/ipa_test_kit/custom_groups/capability_statement/profile_support_test.rb +76 -0
  7. data/lib/ipa_test_kit/custom_groups/capability_statement_group.rb +64 -0
  8. data/lib/ipa_test_kit/date_search_validation.rb +101 -0
  9. data/lib/ipa_test_kit/ext/fhir_models.rb +59 -0
  10. data/lib/ipa_test_kit/fhir_resource_navigation.rb +63 -0
  11. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_must_support_test.rb +40 -0
  12. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_patient_clinical_status_search_test.rb +46 -0
  13. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_patient_search_test.rb +60 -0
  14. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_provenance_revinclude_search_test.rb +49 -0
  15. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_read_test.rb +24 -0
  16. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +28 -0
  17. data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_validation_test.rb +34 -0
  18. data/lib/ipa_test_kit/generated/allergy_intolerance/metadata.yml +165 -0
  19. data/lib/ipa_test_kit/generated/allergy_intolerance_group.rb +85 -0
  20. data/lib/ipa_test_kit/generated/bmi/bmi_must_support_test.rb +49 -0
  21. data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_date_search_test.rb +46 -0
  22. data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_search_test.rb +45 -0
  23. data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_status_search_test.rb +47 -0
  24. data/lib/ipa_test_kit/generated/bmi/bmi_patient_code_date_search_test.rb +48 -0
  25. data/lib/ipa_test_kit/generated/bmi/bmi_patient_code_search_test.rb +62 -0
  26. data/lib/ipa_test_kit/generated/bmi/bmi_provenance_revinclude_search_test.rb +51 -0
  27. data/lib/ipa_test_kit/generated/bmi/bmi_read_test.rb +24 -0
  28. data/lib/ipa_test_kit/generated/bmi/bmi_reference_resolution_test.rb +28 -0
  29. data/lib/ipa_test_kit/generated/bmi/bmi_validation_test.rb +34 -0
  30. data/lib/ipa_test_kit/generated/bmi/metadata.yml +322 -0
  31. data/lib/ipa_test_kit/generated/bmi_group.rb +93 -0
  32. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_must_support_test.rb +49 -0
  33. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_date_search_test.rb +46 -0
  34. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_search_test.rb +45 -0
  35. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_status_search_test.rb +47 -0
  36. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_code_date_search_test.rb +48 -0
  37. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_code_search_test.rb +62 -0
  38. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_provenance_revinclude_search_test.rb +51 -0
  39. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_read_test.rb +24 -0
  40. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_reference_resolution_test.rb +28 -0
  41. data/lib/ipa_test_kit/generated/bodyheight/bodyheight_validation_test.rb +34 -0
  42. data/lib/ipa_test_kit/generated/bodyheight/metadata.yml +328 -0
  43. data/lib/ipa_test_kit/generated/bodyheight_group.rb +93 -0
  44. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_must_support_test.rb +49 -0
  45. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_date_search_test.rb +46 -0
  46. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_search_test.rb +45 -0
  47. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_status_search_test.rb +47 -0
  48. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_code_date_search_test.rb +48 -0
  49. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_code_search_test.rb +62 -0
  50. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_provenance_revinclude_search_test.rb +51 -0
  51. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_read_test.rb +24 -0
  52. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_reference_resolution_test.rb +28 -0
  53. data/lib/ipa_test_kit/generated/bodytemp/bodytemp_validation_test.rb +34 -0
  54. data/lib/ipa_test_kit/generated/bodytemp/metadata.yml +328 -0
  55. data/lib/ipa_test_kit/generated/bodytemp_group.rb +93 -0
  56. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_must_support_test.rb +49 -0
  57. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_date_search_test.rb +46 -0
  58. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_search_test.rb +45 -0
  59. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_status_search_test.rb +47 -0
  60. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_code_date_search_test.rb +48 -0
  61. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_code_search_test.rb +62 -0
  62. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_provenance_revinclude_search_test.rb +51 -0
  63. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_read_test.rb +24 -0
  64. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_reference_resolution_test.rb +28 -0
  65. data/lib/ipa_test_kit/generated/bodyweight/bodyweight_validation_test.rb +34 -0
  66. data/lib/ipa_test_kit/generated/bodyweight/metadata.yml +328 -0
  67. data/lib/ipa_test_kit/generated/bodyweight_group.rb +93 -0
  68. data/lib/ipa_test_kit/generated/bp/bp_must_support_test.rb +52 -0
  69. data/lib/ipa_test_kit/generated/bp/bp_patient_category_date_search_test.rb +46 -0
  70. data/lib/ipa_test_kit/generated/bp/bp_patient_category_search_test.rb +45 -0
  71. data/lib/ipa_test_kit/generated/bp/bp_patient_category_status_search_test.rb +47 -0
  72. data/lib/ipa_test_kit/generated/bp/bp_patient_code_date_search_test.rb +48 -0
  73. data/lib/ipa_test_kit/generated/bp/bp_patient_code_search_test.rb +62 -0
  74. data/lib/ipa_test_kit/generated/bp/bp_provenance_revinclude_search_test.rb +51 -0
  75. data/lib/ipa_test_kit/generated/bp/bp_read_test.rb +24 -0
  76. data/lib/ipa_test_kit/generated/bp/bp_reference_resolution_test.rb +28 -0
  77. data/lib/ipa_test_kit/generated/bp/bp_validation_test.rb +34 -0
  78. data/lib/ipa_test_kit/generated/bp/metadata.yml +379 -0
  79. data/lib/ipa_test_kit/generated/bp_group.rb +93 -0
  80. data/lib/ipa_test_kit/generated/condition/condition_must_support_test.rb +39 -0
  81. data/lib/ipa_test_kit/generated/condition/condition_patient_category_search_test.rb +47 -0
  82. data/lib/ipa_test_kit/generated/condition/condition_patient_clinical_status_search_test.rb +46 -0
  83. data/lib/ipa_test_kit/generated/condition/condition_patient_code_search_test.rb +47 -0
  84. data/lib/ipa_test_kit/generated/condition/condition_patient_onset_date_search_test.rb +47 -0
  85. data/lib/ipa_test_kit/generated/condition/condition_patient_search_test.rb +60 -0
  86. data/lib/ipa_test_kit/generated/condition/condition_provenance_revinclude_search_test.rb +49 -0
  87. data/lib/ipa_test_kit/generated/condition/condition_read_test.rb +24 -0
  88. data/lib/ipa_test_kit/generated/condition/condition_reference_resolution_test.rb +28 -0
  89. data/lib/ipa_test_kit/generated/condition/condition_validation_test.rb +34 -0
  90. data/lib/ipa_test_kit/generated/condition/metadata.yml +231 -0
  91. data/lib/ipa_test_kit/generated/condition_group.rb +91 -0
  92. data/lib/ipa_test_kit/generated/document_reference/document_reference_id_search_test.rb +40 -0
  93. data/lib/ipa_test_kit/generated/document_reference/document_reference_must_support_test.rb +49 -0
  94. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_category_date_search_test.rb +46 -0
  95. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_category_search_test.rb +45 -0
  96. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_search_test.rb +61 -0
  97. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_status_search_test.rb +46 -0
  98. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_type_period_search_test.rb +48 -0
  99. data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_type_search_test.rb +45 -0
  100. data/lib/ipa_test_kit/generated/document_reference/document_reference_provenance_revinclude_search_test.rb +50 -0
  101. data/lib/ipa_test_kit/generated/document_reference/document_reference_read_test.rb +24 -0
  102. data/lib/ipa_test_kit/generated/document_reference/document_reference_reference_resolution_test.rb +28 -0
  103. data/lib/ipa_test_kit/generated/document_reference/document_reference_validation_test.rb +34 -0
  104. data/lib/ipa_test_kit/generated/document_reference/metadata.yml +356 -0
  105. data/lib/ipa_test_kit/generated/document_reference_group.rb +99 -0
  106. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_must_support_test.rb +49 -0
  107. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_date_search_test.rb +46 -0
  108. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_search_test.rb +45 -0
  109. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_status_search_test.rb +47 -0
  110. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_code_date_search_test.rb +48 -0
  111. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_code_search_test.rb +62 -0
  112. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_provenance_revinclude_search_test.rb +51 -0
  113. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_read_test.rb +24 -0
  114. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_reference_resolution_test.rb +28 -0
  115. data/lib/ipa_test_kit/generated/head_circumference/head_circumference_validation_test.rb +34 -0
  116. data/lib/ipa_test_kit/generated/head_circumference/metadata.yml +324 -0
  117. data/lib/ipa_test_kit/generated/head_circumference_group.rb +93 -0
  118. data/lib/ipa_test_kit/generated/heartrate/heartrate_must_support_test.rb +49 -0
  119. data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_date_search_test.rb +46 -0
  120. data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_search_test.rb +45 -0
  121. data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_status_search_test.rb +47 -0
  122. data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_code_date_search_test.rb +48 -0
  123. data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_code_search_test.rb +62 -0
  124. data/lib/ipa_test_kit/generated/heartrate/heartrate_provenance_revinclude_search_test.rb +51 -0
  125. data/lib/ipa_test_kit/generated/heartrate/heartrate_read_test.rb +24 -0
  126. data/lib/ipa_test_kit/generated/heartrate/heartrate_reference_resolution_test.rb +28 -0
  127. data/lib/ipa_test_kit/generated/heartrate/heartrate_validation_test.rb +34 -0
  128. data/lib/ipa_test_kit/generated/heartrate/metadata.yml +325 -0
  129. data/lib/ipa_test_kit/generated/heartrate_group.rb +93 -0
  130. data/lib/ipa_test_kit/generated/immunization/immunization_must_support_test.rb +40 -0
  131. data/lib/ipa_test_kit/generated/immunization/immunization_patient_date_search_test.rb +47 -0
  132. data/lib/ipa_test_kit/generated/immunization/immunization_patient_search_test.rb +60 -0
  133. data/lib/ipa_test_kit/generated/immunization/immunization_patient_status_search_test.rb +45 -0
  134. data/lib/ipa_test_kit/generated/immunization/immunization_provenance_revinclude_search_test.rb +50 -0
  135. data/lib/ipa_test_kit/generated/immunization/immunization_read_test.rb +24 -0
  136. data/lib/ipa_test_kit/generated/immunization/immunization_reference_resolution_test.rb +28 -0
  137. data/lib/ipa_test_kit/generated/immunization/immunization_validation_test.rb +34 -0
  138. data/lib/ipa_test_kit/generated/immunization/metadata.yml +210 -0
  139. data/lib/ipa_test_kit/generated/immunization_group.rb +87 -0
  140. data/lib/ipa_test_kit/generated/ipa_test_suite.rb +88 -0
  141. data/lib/ipa_test_kit/generated/medication_request/medication_request_must_support_test.rb +44 -0
  142. data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_authoredon_search_test.rb +53 -0
  143. data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_encounter_search_test.rb +52 -0
  144. data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_search_test.rb +68 -0
  145. data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_status_search_test.rb +49 -0
  146. data/lib/ipa_test_kit/generated/medication_request/medication_request_provenance_revinclude_search_test.rb +51 -0
  147. data/lib/ipa_test_kit/generated/medication_request/medication_request_read_test.rb +24 -0
  148. data/lib/ipa_test_kit/generated/medication_request/medication_request_reference_resolution_test.rb +28 -0
  149. data/lib/ipa_test_kit/generated/medication_request/medication_request_validation_test.rb +34 -0
  150. data/lib/ipa_test_kit/generated/medication_request/medication_validation_test.rb +34 -0
  151. data/lib/ipa_test_kit/generated/medication_request/metadata.yml +307 -0
  152. data/lib/ipa_test_kit/generated/medication_request_group.rb +92 -0
  153. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_must_support_test.rb +43 -0
  154. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_context_search_test.rb +51 -0
  155. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_effective_search_test.rb +52 -0
  156. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_search_test.rb +68 -0
  157. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_status_search_test.rb +49 -0
  158. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_provenance_revinclude_search_test.rb +51 -0
  159. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_read_test.rb +24 -0
  160. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_reference_resolution_test.rb +28 -0
  161. data/lib/ipa_test_kit/generated/medication_statement/medication_statement_validation_test.rb +34 -0
  162. data/lib/ipa_test_kit/generated/medication_statement/medication_validation_test.rb +34 -0
  163. data/lib/ipa_test_kit/generated/medication_statement/metadata.yml +230 -0
  164. data/lib/ipa_test_kit/generated/medication_statement_group.rb +92 -0
  165. data/lib/ipa_test_kit/generated/metadata.yml +6230 -0
  166. data/lib/ipa_test_kit/generated/observation/metadata.yml +1280 -0
  167. data/lib/ipa_test_kit/generated/observation/observation_must_support_test.rb +41 -0
  168. data/lib/ipa_test_kit/generated/observation/observation_patient_category_date_search_test.rb +46 -0
  169. data/lib/ipa_test_kit/generated/observation/observation_patient_category_search_test.rb +62 -0
  170. data/lib/ipa_test_kit/generated/observation/observation_patient_category_status_search_test.rb +47 -0
  171. data/lib/ipa_test_kit/generated/observation/observation_patient_code_date_search_test.rb +48 -0
  172. data/lib/ipa_test_kit/generated/observation/observation_patient_code_search_test.rb +45 -0
  173. data/lib/ipa_test_kit/generated/observation/observation_provenance_revinclude_search_test.rb +51 -0
  174. data/lib/ipa_test_kit/generated/observation/observation_read_test.rb +24 -0
  175. data/lib/ipa_test_kit/generated/observation/observation_reference_resolution_test.rb +28 -0
  176. data/lib/ipa_test_kit/generated/observation/observation_validation_test.rb +34 -0
  177. data/lib/ipa_test_kit/generated/observation_group.rb +93 -0
  178. data/lib/ipa_test_kit/generated/oxygensat/metadata.yml +366 -0
  179. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_must_support_test.rb +65 -0
  180. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_date_search_test.rb +46 -0
  181. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_search_test.rb +45 -0
  182. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_status_search_test.rb +47 -0
  183. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_code_date_search_test.rb +48 -0
  184. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_code_search_test.rb +62 -0
  185. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_provenance_revinclude_search_test.rb +51 -0
  186. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_read_test.rb +24 -0
  187. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_reference_resolution_test.rb +28 -0
  188. data/lib/ipa_test_kit/generated/oxygensat/oxygensat_validation_test.rb +34 -0
  189. data/lib/ipa_test_kit/generated/oxygensat_group.rb +93 -0
  190. data/lib/ipa_test_kit/generated/patient/metadata.yml +320 -0
  191. data/lib/ipa_test_kit/generated/patient/patient_birthdate_family_search_test.rb +41 -0
  192. data/lib/ipa_test_kit/generated/patient/patient_birthdate_name_search_test.rb +39 -0
  193. data/lib/ipa_test_kit/generated/patient/patient_family_gender_search_test.rb +41 -0
  194. data/lib/ipa_test_kit/generated/patient/patient_gender_name_search_test.rb +39 -0
  195. data/lib/ipa_test_kit/generated/patient/patient_id_search_test.rb +53 -0
  196. data/lib/ipa_test_kit/generated/patient/patient_identifier_search_test.rb +40 -0
  197. data/lib/ipa_test_kit/generated/patient/patient_must_support_test.rb +57 -0
  198. data/lib/ipa_test_kit/generated/patient/patient_name_search_test.rb +39 -0
  199. data/lib/ipa_test_kit/generated/patient/patient_provenance_revinclude_search_test.rb +49 -0
  200. data/lib/ipa_test_kit/generated/patient/patient_read_test.rb +24 -0
  201. data/lib/ipa_test_kit/generated/patient/patient_reference_resolution_test.rb +28 -0
  202. data/lib/ipa_test_kit/generated/patient/patient_validation_test.rb +34 -0
  203. data/lib/ipa_test_kit/generated/patient_group.rb +99 -0
  204. data/lib/ipa_test_kit/generated/practitioner/metadata.yml +124 -0
  205. data/lib/ipa_test_kit/generated/practitioner/practitioner_identifier_search_test.rb +40 -0
  206. data/lib/ipa_test_kit/generated/practitioner/practitioner_must_support_test.rb +40 -0
  207. data/lib/ipa_test_kit/generated/practitioner/practitioner_name_search_test.rb +49 -0
  208. data/lib/ipa_test_kit/generated/practitioner/practitioner_read_test.rb +24 -0
  209. data/lib/ipa_test_kit/generated/practitioner/practitioner_reference_resolution_test.rb +28 -0
  210. data/lib/ipa_test_kit/generated/practitioner/practitioner_validation_test.rb +34 -0
  211. data/lib/ipa_test_kit/generated/practitioner_group.rb +84 -0
  212. data/lib/ipa_test_kit/generated/practitioner_role/metadata.yml +141 -0
  213. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_identifier_search_test.rb +40 -0
  214. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_must_support_test.rb +40 -0
  215. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_practitioner_search_test.rb +51 -0
  216. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_read_test.rb +24 -0
  217. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_reference_resolution_test.rb +28 -0
  218. data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_validation_test.rb +34 -0
  219. data/lib/ipa_test_kit/generated/practitioner_role_group.rb +84 -0
  220. data/lib/ipa_test_kit/generated/provenance/metadata.yml +114 -0
  221. data/lib/ipa_test_kit/generated/provenance/provenance_read_test.rb +24 -0
  222. data/lib/ipa_test_kit/generated/provenance/provenance_reference_resolution_test.rb +28 -0
  223. data/lib/ipa_test_kit/generated/provenance/provenance_validation_test.rb +34 -0
  224. data/lib/ipa_test_kit/generated/provenance_group.rb +53 -0
  225. data/lib/ipa_test_kit/generated/resource_list.rb +18 -0
  226. data/lib/ipa_test_kit/generated/resprate/metadata.yml +325 -0
  227. data/lib/ipa_test_kit/generated/resprate/resprate_must_support_test.rb +49 -0
  228. data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_date_search_test.rb +46 -0
  229. data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_search_test.rb +45 -0
  230. data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_status_search_test.rb +47 -0
  231. data/lib/ipa_test_kit/generated/resprate/resprate_patient_code_date_search_test.rb +48 -0
  232. data/lib/ipa_test_kit/generated/resprate/resprate_patient_code_search_test.rb +62 -0
  233. data/lib/ipa_test_kit/generated/resprate/resprate_provenance_revinclude_search_test.rb +51 -0
  234. data/lib/ipa_test_kit/generated/resprate/resprate_read_test.rb +24 -0
  235. data/lib/ipa_test_kit/generated/resprate/resprate_reference_resolution_test.rb +28 -0
  236. data/lib/ipa_test_kit/generated/resprate/resprate_validation_test.rb +34 -0
  237. data/lib/ipa_test_kit/generated/resprate_group.rb +93 -0
  238. data/lib/ipa_test_kit/generator/group_generator.rb +171 -0
  239. data/lib/ipa_test_kit/generator/group_metadata.rb +98 -0
  240. data/lib/ipa_test_kit/generator/group_metadata_extractor.rb +278 -0
  241. data/lib/ipa_test_kit/generator/ig_loader.rb +63 -0
  242. data/lib/ipa_test_kit/generator/ig_metadata.rb +49 -0
  243. data/lib/ipa_test_kit/generator/ig_metadata_extractor.rb +56 -0
  244. data/lib/ipa_test_kit/generator/ig_resources.rb +48 -0
  245. data/lib/ipa_test_kit/generator/must_support_metadata_extractor.rb +221 -0
  246. data/lib/ipa_test_kit/generator/must_support_test_generator.rb +86 -0
  247. data/lib/ipa_test_kit/generator/naming.rb +46 -0
  248. data/lib/ipa_test_kit/generator/provenance_revinclude_search_test_generator.rb +186 -0
  249. data/lib/ipa_test_kit/generator/read_test_generator.rb +89 -0
  250. data/lib/ipa_test_kit/generator/reference_resolution_test_generator.rb +72 -0
  251. data/lib/ipa_test_kit/generator/resource_list_generator.rb +46 -0
  252. data/lib/ipa_test_kit/generator/search_definition_metadata_extractor.rb +181 -0
  253. data/lib/ipa_test_kit/generator/search_metadata_extractor.rb +74 -0
  254. data/lib/ipa_test_kit/generator/search_test_generator.rb +295 -0
  255. data/lib/ipa_test_kit/generator/special_cases.rb +16 -0
  256. data/lib/ipa_test_kit/generator/suite_generator.rb +67 -0
  257. data/lib/ipa_test_kit/generator/terminology_binding_metadata_extractor.rb +105 -0
  258. data/lib/ipa_test_kit/generator/validation_test_generator.rb +124 -0
  259. data/lib/ipa_test_kit/generator.rb +86 -0
  260. data/lib/ipa_test_kit/igs/package.tgz +0 -0
  261. data/lib/ipa_test_kit/must_support_test.rb +146 -0
  262. data/lib/ipa_test_kit/read_test.rb +62 -0
  263. data/lib/ipa_test_kit/reference_resolution_test.rb +111 -0
  264. data/lib/ipa_test_kit/request_logger.rb +46 -0
  265. data/lib/ipa_test_kit/search_test.rb +728 -0
  266. data/lib/ipa_test_kit/search_test_properties.rb +61 -0
  267. data/lib/ipa_test_kit/validation_test.rb +48 -0
  268. data/lib/ipa_test_kit/version.rb +3 -0
  269. data/lib/ipa_test_kit.rb +2 -0
  270. metadata +397 -0
@@ -0,0 +1,49 @@
1
+ require_relative '../../search_test'
2
+ require_relative '../../generator/group_metadata'
3
+
4
+ module IpaTestKit
5
+ class MedicationRequestPatientIntentStatusSearchTest < Inferno::Test
6
+ include IpaTestKit::SearchTest
7
+
8
+ title 'Server returns valid results for MedicationRequest search by patient + intent + status'
9
+ description %(
10
+ A server SHALL support searching by
11
+ patient + intent + status on the MedicationRequest resource. This test
12
+ will pass if resources are returned and match the search criteria. If
13
+ none are returned, the test is skipped.
14
+
15
+ If any MedicationRequest resources use external references to
16
+ Medications, the search will be repeated with
17
+ `_include=MedicationRequest:medication`.
18
+
19
+ [IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
20
+
21
+ )
22
+
23
+ id :ipa_010_medication_request_patient_intent_status_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
+ resource_type: 'MedicationRequest',
31
+ search_param_names: ['patient', 'intent', 'status'],
32
+ test_medication_inclusion_mr: true,
33
+ multiple_or_search_params: ['intent', 'status']
34
+ )
35
+ end
36
+
37
+ def self.metadata
38
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
39
+ end
40
+
41
+ def scratch_resources
42
+ scratch[:medication_request_resources] ||= {}
43
+ end
44
+
45
+ run do
46
+ run_search_test
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,51 @@
1
+ require_relative '../../search_test'
2
+ require_relative '../../generator/group_metadata'
3
+
4
+ module IpaTestKit
5
+ class MedicationRequestProvenanceRevincludeSearchTest < Inferno::Test
6
+ include IpaTestKit::SearchTest
7
+
8
+ title 'Server returns Provenance resources from MedicationRequest search by patient + intent + revInclude:Provenance:target'
9
+ description %(
10
+ A server SHALL be capable of supporting _revIncludes:Provenance:target.
11
+
12
+ This test will perform a search by patient + intent + revInclude:Provenance:target and
13
+ will pass if a Provenance resource is found in the response.
14
+ %)
15
+
16
+ id :ipa_010_medication_request_provenance_revinclude_search_test
17
+
18
+ input :patient_ids,
19
+ title: 'Patient IDs',
20
+ description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
21
+
22
+ def properties
23
+ @properties ||= SearchTestProperties.new(
24
+ fixed_value_search: true,
25
+ resource_type: 'MedicationRequest',
26
+ search_param_names: ['patient', 'intent'],
27
+ possible_status_search: true
28
+ )
29
+ end
30
+
31
+ def self.metadata
32
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
33
+ end
34
+
35
+ def self.provenance_metadata
36
+ @provenance_metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '..', 'provenance', 'metadata.yml')))
37
+ end
38
+
39
+ def scratch_resources
40
+ scratch[:medication_request_resources] ||= {}
41
+ end
42
+
43
+ def scratch_provenance_resources
44
+ scratch[:provenance_resources] ||= {}
45
+ end
46
+
47
+ run do
48
+ run_provenance_revinclude_search_test
49
+ end
50
+ end
51
+ end
@@ -0,0 +1,24 @@
1
+ require_relative '../../read_test'
2
+
3
+ module IpaTestKit
4
+ class MedicationRequestReadTest < Inferno::Test
5
+ include IpaTestKit::ReadTest
6
+
7
+ title 'Server returns correct MedicationRequest resource from MedicationRequest read interaction'
8
+ description 'A server SHALL support the MedicationRequest read interaction.'
9
+
10
+ id :ipa_010_medication_request_read_test
11
+
12
+ def resource_type
13
+ 'MedicationRequest'
14
+ end
15
+
16
+ def scratch_resources
17
+ scratch[:medication_request_resources] ||= {}
18
+ end
19
+
20
+ run do
21
+ perform_read_test(all_scratch_resources)
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,28 @@
1
+ require_relative '../../reference_resolution_test'
2
+
3
+ module IpaTestKit
4
+ class MedicationRequestReferenceResolutionTest < Inferno::Test
5
+ include IpaTestKit::ReferenceResolutionTest
6
+
7
+ title 'Every reference within MedicationRequest resources can be read'
8
+ description %(
9
+ This test will attempt to read the first 50 references found in the
10
+ resources from the first search. The test will fail if Inferno fails to
11
+ read any of those references.
12
+ )
13
+
14
+ id :ipa_010_medication_request_reference_resolution_test
15
+
16
+ def resource_type
17
+ 'MedicationRequest'
18
+ end
19
+
20
+ def scratch_resources
21
+ scratch[:medication_request_resources] ||= {}
22
+ end
23
+
24
+ run do
25
+ perform_reference_resolution_test(scratch_resources[:all])
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,34 @@
1
+ require_relative '../../validation_test'
2
+
3
+ module IpaTestKit
4
+ class MedicationRequestValidationTest < Inferno::Test
5
+ include IpaTestKit::ValidationTest
6
+
7
+ id :ipa_010_medication_request_validation_test
8
+ title 'MedicationRequest resources returned during previous tests conform to the IPA MedicationRequest Profile'
9
+ description %(
10
+ This test verifies resources returned from the first search conform to
11
+ the [IPA MedicationRequest Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medicationrequest).
12
+
13
+ It verifies the presence of mandatory elements and that elements with
14
+ required bindings contain appropriate values. CodeableConcept element
15
+ bindings will fail if none of their codings have a code/system belonging
16
+ to the bound ValueSet. Quantity, Coding, and code element bindings will
17
+ fail if their code/system are not found in the valueset.
18
+
19
+ )
20
+ output :dar_code_found, :dar_extension_found
21
+
22
+ def resource_type
23
+ 'MedicationRequest'
24
+ end
25
+
26
+ def scratch_resources
27
+ scratch[:medication_request_resources] ||= {}
28
+ end
29
+
30
+ run do
31
+ perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medicationrequest')
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ require_relative '../../validation_test'
2
+
3
+ module IpaTestKit
4
+ class MedicationValidationTest < Inferno::Test
5
+ include IpaTestKit::ValidationTest
6
+
7
+ id :ipa_010_medication_validation_test
8
+ title 'Medication resources returned during previous tests conform to the IPA Medication Profile'
9
+ description %(
10
+ This test verifies resources returned from previous tests conform to
11
+ the [IPA Medication Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medication).
12
+
13
+ It verifies the presence of mandatory elements and that elements with
14
+ required bindings contain appropriate values. CodeableConcept element
15
+ bindings will fail if none of their codings have a code/system belonging
16
+ to the bound ValueSet. Quantity, Coding, and code element bindings will
17
+ fail if their code/system are not found in the valueset.
18
+
19
+ )
20
+ output :dar_code_found, :dar_extension_found
21
+
22
+ def resource_type
23
+ 'Medication'
24
+ end
25
+
26
+ def scratch_resources
27
+ scratch[:medication_resources] ||= {}
28
+ end
29
+
30
+ run do
31
+ perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medication')
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,307 @@
1
+ ---
2
+ :name: ipa_medicationrequest
3
+ :class_name: Ipav010MedicationrequestSequence
4
+ :version: v0.1.0
5
+ :reformatted_version: v010
6
+ :resource: MedicationRequest
7
+ :profile_url: http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medicationrequest
8
+ :profile_name: IPA MedicationRequest Profile
9
+ :title: MedicationRequest
10
+ :short_description: Verify support for the server capabilities required by the IPA
11
+ MedicationRequest Profile.
12
+ :interactions:
13
+ - :code: create
14
+ :expectation: MAY
15
+ - :code: search-type
16
+ :expectation: SHALL
17
+ - :code: read
18
+ :expectation: SHALL
19
+ - :code: vread
20
+ :expectation: SHOULD
21
+ - :code: update
22
+ :expectation: MAY
23
+ - :code: patch
24
+ :expectation: MAY
25
+ - :code: delete
26
+ :expectation: MAY
27
+ - :code: history-instance
28
+ :expectation: SHOULD
29
+ - :code: history-type
30
+ :expectation: MAY
31
+ :operations: []
32
+ :searches:
33
+ - :expectation: SHALL
34
+ :names:
35
+ - patient
36
+ - intent
37
+ :names_not_must_support_or_mandatory: []
38
+ :must_support_or_mandatory: true
39
+ - :expectation: SHOULD
40
+ :names:
41
+ - patient
42
+ - intent
43
+ - encounter
44
+ :names_not_must_support_or_mandatory: []
45
+ :must_support_or_mandatory: true
46
+ - :expectation: SHOULD
47
+ :names:
48
+ - patient
49
+ - intent
50
+ - authoredon
51
+ :names_not_must_support_or_mandatory: []
52
+ :must_support_or_mandatory: true
53
+ - :expectation: SHALL
54
+ :names:
55
+ - patient
56
+ - intent
57
+ - status
58
+ :names_not_must_support_or_mandatory: []
59
+ :must_support_or_mandatory: true
60
+ :search_definitions:
61
+ :patient:
62
+ :path: subject
63
+ :full_path: MedicationRequest.subject
64
+ :comparators: {}
65
+ :values: []
66
+ :type: Reference
67
+ :contains_multiple: false
68
+ :multiple_or: MAY
69
+ :intent:
70
+ :path: intent
71
+ :full_path: MedicationRequest.intent
72
+ :comparators: {}
73
+ :values:
74
+ - proposal
75
+ - plan
76
+ - order
77
+ - original-order
78
+ - reflex-order
79
+ - filler-order
80
+ - instance-order
81
+ - option
82
+ :type: code
83
+ :contains_multiple: false
84
+ :multiple_or: SHALL
85
+ :encounter:
86
+ :path: encounter
87
+ :full_path: MedicationRequest.encounter
88
+ :comparators: {}
89
+ :values: []
90
+ :type: Reference
91
+ :contains_multiple: false
92
+ :multiple_or: MAY
93
+ :authoredon:
94
+ :path: authoredOn
95
+ :full_path: MedicationRequest.authoredOn
96
+ :comparators:
97
+ :eq: MAY
98
+ :ne: MAY
99
+ :gt: SHALL
100
+ :ge: SHALL
101
+ :lt: SHALL
102
+ :le: SHALL
103
+ :sa: MAY
104
+ :eb: MAY
105
+ :ap: MAY
106
+ :values: []
107
+ :type: dateTime
108
+ :contains_multiple: false
109
+ :multiple_or: MAY
110
+ :status:
111
+ :path: status
112
+ :full_path: MedicationRequest.status
113
+ :comparators: {}
114
+ :values:
115
+ - active
116
+ - on-hold
117
+ - cancelled
118
+ - completed
119
+ - entered-in-error
120
+ - stopped
121
+ - draft
122
+ - unknown
123
+ :type: code
124
+ :contains_multiple: false
125
+ :multiple_or: SHALL
126
+ :include_params:
127
+ - MedicationRequest:medication
128
+ :revincludes:
129
+ - Provenance:target
130
+ :required_concepts: []
131
+ :must_supports:
132
+ :extensions: []
133
+ :slices: []
134
+ :elements:
135
+ - :path: status
136
+ - :path: intent
137
+ - :path: reported[x]
138
+ - :path: medication[x]
139
+ - :path: subject
140
+ - :path: encounter
141
+ - :path: authoredOn
142
+ - :path: requester
143
+ - :path: dosageInstruction
144
+ - :path: dosageInstruction.text
145
+ :mandatory_elements:
146
+ - MedicationRequest.status
147
+ - MedicationRequest.intent
148
+ - MedicationRequest.medication[x]
149
+ - MedicationRequest.subject
150
+ - MedicationRequest.authoredOn
151
+ - MedicationRequest.requester
152
+ - MedicationRequest.substitution.allowed[x]
153
+ :bindings:
154
+ - :type: code
155
+ :strength: preferred
156
+ :system: http://hl7.org/fhir/ValueSet/languages
157
+ :path: language
158
+ - :type: code
159
+ :strength: required
160
+ :system: http://hl7.org/fhir/ValueSet/medicationrequest-status
161
+ :path: status
162
+ - :type: CodeableConcept
163
+ :strength: example
164
+ :system: http://hl7.org/fhir/ValueSet/medicationrequest-status-reason
165
+ :path: statusReason
166
+ - :type: code
167
+ :strength: required
168
+ :system: http://hl7.org/fhir/ValueSet/medicationrequest-intent
169
+ :path: intent
170
+ - :type: CodeableConcept
171
+ :strength: example
172
+ :system: http://hl7.org/fhir/ValueSet/medicationrequest-category
173
+ :path: category
174
+ - :type: code
175
+ :strength: required
176
+ :system: http://hl7.org/fhir/ValueSet/request-priority
177
+ :path: priority
178
+ - :type: CodeableConcept
179
+ :strength: extensible
180
+ :system: http://hl7.org/fhir/uv/ipa/ValueSet/ipa-medication-codes
181
+ :path: medication
182
+ - :type: CodeableConcept
183
+ :strength: example
184
+ :system: http://hl7.org/fhir/ValueSet/performer-role
185
+ :path: performerType
186
+ - :type: CodeableConcept
187
+ :strength: example
188
+ :system: http://hl7.org/fhir/ValueSet/condition-code
189
+ :path: reasonCode
190
+ - :type: CodeableConcept
191
+ :strength: example
192
+ :system: http://hl7.org/fhir/ValueSet/medicationrequest-course-of-therapy
193
+ :path: courseOfTherapyType
194
+ - :type: CodeableConcept
195
+ :strength: example
196
+ :system: http://hl7.org/fhir/ValueSet/additional-instruction-codes
197
+ :path: dosageInstruction.additionalInstruction
198
+ - :type: boolean
199
+ :strength: example
200
+ :system: http://hl7.org/fhir/ValueSet/medication-as-needed-reason
201
+ :path: dosageInstruction.asNeeded
202
+ - :type: CodeableConcept
203
+ :strength: example
204
+ :system: http://hl7.org/fhir/ValueSet/approach-site-codes
205
+ :path: dosageInstruction.site
206
+ - :type: CodeableConcept
207
+ :strength: example
208
+ :system: http://hl7.org/fhir/ValueSet/route-codes
209
+ :path: dosageInstruction.route
210
+ - :type: CodeableConcept
211
+ :strength: example
212
+ :system: http://hl7.org/fhir/ValueSet/administration-method-codes
213
+ :path: dosageInstruction.method
214
+ - :type: CodeableConcept
215
+ :strength: example
216
+ :system: http://hl7.org/fhir/ValueSet/dose-rate-type
217
+ :path: dosageInstruction.doseAndRate.type
218
+ - :type: boolean
219
+ :strength: example
220
+ :system: http://terminology.hl7.org/ValueSet/v3-ActSubstanceAdminSubstitutionCode
221
+ :path: substitution.allowed
222
+ - :type: CodeableConcept
223
+ :strength: example
224
+ :system: http://terminology.hl7.org/ValueSet/v3-SubstanceAdminSubstitutionReason
225
+ :path: substitution.reason
226
+ :references:
227
+ - :path: MedicationRequest.subject
228
+ :profiles:
229
+ - http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-patient
230
+ - :path: MedicationRequest.encounter
231
+ :profiles:
232
+ - http://hl7.org/fhir/StructureDefinition/Encounter
233
+ - :path: MedicationRequest.supportingInformation
234
+ :profiles:
235
+ - http://hl7.org/fhir/StructureDefinition/Resource
236
+ - :path: MedicationRequest.requester
237
+ :profiles:
238
+ - http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-practitioner
239
+ - http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-organization
240
+ - http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-patient
241
+ - :path: MedicationRequest.performer
242
+ :profiles:
243
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
244
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
245
+ - http://hl7.org/fhir/StructureDefinition/Organization
246
+ - http://hl7.org/fhir/StructureDefinition/Patient
247
+ - http://hl7.org/fhir/StructureDefinition/Device
248
+ - http://hl7.org/fhir/StructureDefinition/RelatedPerson
249
+ - http://hl7.org/fhir/StructureDefinition/CareTeam
250
+ - :path: MedicationRequest.recorder
251
+ :profiles:
252
+ - http://hl7.org/fhir/StructureDefinition/Practitioner
253
+ - http://hl7.org/fhir/StructureDefinition/PractitionerRole
254
+ - :path: MedicationRequest.reasonReference
255
+ :profiles:
256
+ - http://hl7.org/fhir/StructureDefinition/Condition
257
+ - http://hl7.org/fhir/StructureDefinition/Observation
258
+ - :path: MedicationRequest.basedOn
259
+ :profiles:
260
+ - http://hl7.org/fhir/StructureDefinition/CarePlan
261
+ - http://hl7.org/fhir/StructureDefinition/MedicationRequest
262
+ - http://hl7.org/fhir/StructureDefinition/ServiceRequest
263
+ - http://hl7.org/fhir/StructureDefinition/ImmunizationRecommendation
264
+ - :path: MedicationRequest.insurance
265
+ :profiles:
266
+ - http://hl7.org/fhir/StructureDefinition/Coverage
267
+ - http://hl7.org/fhir/StructureDefinition/ClaimResponse
268
+ - :path: MedicationRequest.dispenseRequest.performer
269
+ :profiles:
270
+ - http://hl7.org/fhir/StructureDefinition/Organization
271
+ - :path: MedicationRequest.priorPrescription
272
+ :profiles:
273
+ - http://hl7.org/fhir/StructureDefinition/MedicationRequest
274
+ - :path: MedicationRequest.detectedIssue
275
+ :profiles:
276
+ - http://hl7.org/fhir/StructureDefinition/DetectedIssue
277
+ - :path: MedicationRequest.eventHistory
278
+ :profiles:
279
+ - http://hl7.org/fhir/StructureDefinition/Provenance
280
+ :tests:
281
+ - :id: ipa_010_medication_request_patient_intent_search_test
282
+ :file_name: medication_request_patient_intent_search_test.rb
283
+ - :id: ipa_010_medication_request_patient_intent_encounter_search_test
284
+ :file_name: medication_request_patient_intent_encounter_search_test.rb
285
+ - :id: ipa_010_medication_request_patient_intent_authoredon_search_test
286
+ :file_name: medication_request_patient_intent_authoredon_search_test.rb
287
+ - :id: ipa_010_medication_request_patient_intent_status_search_test
288
+ :file_name: medication_request_patient_intent_status_search_test.rb
289
+ - :id: ipa_010_medication_request_read_test
290
+ :file_name: medication_request_read_test.rb
291
+ - :id: ipa_010_medication_request_provenance_revinclude_search_test
292
+ :file_name: medication_request_provenance_revinclude_search_test.rb
293
+ - :id: ipa_010_medication_request_validation_test
294
+ :file_name: medication_request_validation_test.rb
295
+ - :id: ipa_010_medication_validation_test
296
+ :file_name: medication_validation_test.rb
297
+ - :id: ipa_010_medication_request_must_support_test
298
+ :file_name: medication_request_must_support_test.rb
299
+ - :id: ipa_010_medication_request_reference_resolution_test
300
+ :file_name: medication_request_reference_resolution_test.rb
301
+ :id: ipa_010_medication_request
302
+ :file_name: medication_request_group.rb
303
+ :delayed_references:
304
+ - :path: requester
305
+ :resources:
306
+ - Practitioner
307
+ - Organization
@@ -0,0 +1,92 @@
1
+ require_relative 'medication_request/medication_request_patient_intent_search_test'
2
+ require_relative 'medication_request/medication_request_patient_intent_encounter_search_test'
3
+ require_relative 'medication_request/medication_request_patient_intent_authoredon_search_test'
4
+ require_relative 'medication_request/medication_request_patient_intent_status_search_test'
5
+ require_relative 'medication_request/medication_request_read_test'
6
+ require_relative 'medication_request/medication_request_provenance_revinclude_search_test'
7
+ require_relative 'medication_request/medication_request_validation_test'
8
+ require_relative 'medication_request/medication_validation_test'
9
+ require_relative 'medication_request/medication_request_must_support_test'
10
+ require_relative 'medication_request/medication_request_reference_resolution_test'
11
+
12
+ module IpaTestKit
13
+ class MedicationRequestGroup < Inferno::TestGroup
14
+ title 'MedicationRequest Tests'
15
+ short_description 'Verify support for the server capabilities required by the IPA MedicationRequest Profile.'
16
+ description %(
17
+ # Background
18
+
19
+ The IPA MedicationRequest sequence verifies that the system under test is
20
+ able to provide correct responses for MedicationRequest queries. These queries
21
+ must contain resources conforming to the IPA MedicationRequest Profile as
22
+ specified in the IPA v0.1.0 Implementation Guide.
23
+
24
+ # Testing Methodology
25
+ ## Searching
26
+ This test sequence will first perform each required search associated
27
+ with this resource. This sequence will perform searches with the
28
+ following parameters:
29
+
30
+ * patient + intent
31
+ * patient + intent + status
32
+
33
+ ### Search Parameters
34
+ The first search uses the selected patient(s) from the prior launch
35
+ sequence. Any subsequent searches will look for its parameter values
36
+ from the results of the first search. For example, the `identifier`
37
+ search in the patient sequence is performed by looking for an existing
38
+ `Patient.identifier` from any of the resources returned in the `_id`
39
+ search. If a value cannot be found this way, the search is skipped.
40
+
41
+ ### Search Validation
42
+ Inferno will retrieve up to the first 20 bundle pages of the reply for
43
+ MedicationRequest 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 MedicationRequest 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 [IPA MedicationRequest Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-medicationrequest). Each element is checked against
61
+ teminology binding and cardinality requirements.
62
+
63
+ Elements with a required binding are validated against their bound
64
+ ValueSet. If the code/system in the element is not part of the ValueSet,
65
+ then the test will fail.
66
+
67
+ ## Reference Validation
68
+ Each reference within the resources found from the previous tests must
69
+ resolve. The test will attempt to read each reference found and will
70
+ fail if any attempted read fails.
71
+
72
+ )
73
+
74
+ id :ipa_010_medication_request
75
+ run_as_group
76
+
77
+ def self.metadata
78
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'medication_request', 'metadata.yml')))
79
+ end
80
+
81
+ test from: :ipa_010_medication_request_patient_intent_search_test
82
+ test from: :ipa_010_medication_request_patient_intent_encounter_search_test
83
+ test from: :ipa_010_medication_request_patient_intent_authoredon_search_test
84
+ test from: :ipa_010_medication_request_patient_intent_status_search_test
85
+ test from: :ipa_010_medication_request_read_test
86
+ test from: :ipa_010_medication_request_provenance_revinclude_search_test
87
+ test from: :ipa_010_medication_request_validation_test
88
+ test from: :ipa_010_medication_validation_test
89
+ test from: :ipa_010_medication_request_must_support_test
90
+ test from: :ipa_010_medication_request_reference_resolution_test
91
+ end
92
+ end
@@ -0,0 +1,43 @@
1
+ require_relative '../../must_support_test'
2
+
3
+ module IpaTestKit
4
+ class MedicationStatementMustSupportTest < Inferno::Test
5
+ include IpaTestKit::MustSupportTest
6
+
7
+ title 'All must support elements are provided in the MedicationStatement resources returned'
8
+ description %(
9
+ IPA Responders SHALL be capable of populating all data elements as
10
+ part of the query results as specified by the IPA Server Capability
11
+ Statement. This test will look through the MedicationStatement resources
12
+ found previously for the following must support elements:
13
+
14
+ * MedicationStatement.status
15
+ * MedicationStatement.statusReason
16
+ * MedicationStatement.medication[x]
17
+ * MedicationStatement.subject
18
+ * MedicationStatement.context
19
+ * MedicationStatement.effective[x]
20
+ * MedicationStatement.informationSource
21
+ * MedicationStatement.dosage
22
+ * MedicationStatement.dosage.text
23
+ )
24
+
25
+ id :ipa_010_medication_statement_must_support_test
26
+
27
+ def resource_type
28
+ 'MedicationStatement'
29
+ end
30
+
31
+ def self.metadata
32
+ @metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
33
+ end
34
+
35
+ def scratch_resources
36
+ scratch[:medication_statement_resources] ||= {}
37
+ end
38
+
39
+ run do
40
+ perform_must_support_test(all_scratch_resources)
41
+ end
42
+ end
43
+ end