carin_for_blue_button_test_kit 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (278) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE +201 -0
  3. data/lib/carin_for_blue_button_test_kit/capability_statement/capability_statement_group.rb +45 -0
  4. data/lib/carin_for_blue_button_test_kit/capability_statement/tests/conformance_support_test.rb +41 -0
  5. data/lib/carin_for_blue_button_test_kit/capability_statement/tests/fhir_version_test.rb +15 -0
  6. data/lib/carin_for_blue_button_test_kit/capability_statement/tests/instantiates_test.rb +32 -0
  7. data/lib/carin_for_blue_button_test_kit/capability_statement/tests/json_support_test.rb +39 -0
  8. data/lib/carin_for_blue_button_test_kit/capability_statement/tests/profile_support_test.rb +32 -0
  9. data/lib/carin_for_blue_button_test_kit/carin_search_test.rb +227 -0
  10. data/lib/carin_for_blue_button_test_kit/date_search_validator.rb +109 -0
  11. data/lib/carin_for_blue_button_test_kit/fhir_resource_navigation.rb +73 -0
  12. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/c4bb_test_suite.rb +106 -0
  13. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/coverage/coverage_must_support_test.rb +53 -0
  14. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/coverage/coverage_read_test.rb +39 -0
  15. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/coverage/coverage_validation_test.rb +43 -0
  16. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/coverage_group.rb +58 -0
  17. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_all_search_test.rb +38 -0
  18. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_careteam_search_test.rb +38 -0
  19. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_coverage_search_test.rb +38 -0
  20. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_insurer_search_test.rb +38 -0
  21. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_patient_search_test.rb +38 -0
  22. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_provider_search_test.rb +38 -0
  23. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_id_search_test.rb +59 -0
  24. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_identifier_search_test.rb +49 -0
  25. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_lastupdated_search_test.rb +48 -0
  26. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_must_support_test.rb +72 -0
  27. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_patient_search_test.rb +48 -0
  28. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_read_test.rb +39 -0
  29. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_service_date_search_test.rb +48 -0
  30. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_type_search_test.rb +49 -0
  31. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit/explanation_of_benefit_validation_test.rb +43 -0
  32. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_group.rb +110 -0
  33. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_all_search_test.rb +38 -0
  34. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_careteam_search_test.rb +38 -0
  35. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_coverage_search_test.rb +38 -0
  36. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_insurer_search_test.rb +38 -0
  37. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_patient_search_test.rb +38 -0
  38. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_provider_search_test.rb +38 -0
  39. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_id_search_test.rb +59 -0
  40. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_identifier_search_test.rb +49 -0
  41. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_lastupdated_search_test.rb +48 -0
  42. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_must_support_test.rb +120 -0
  43. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_patient_search_test.rb +48 -0
  44. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_read_test.rb +39 -0
  45. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_service_date_search_test.rb +48 -0
  46. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_type_search_test.rb +49 -0
  47. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_validation_test.rb +43 -0
  48. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_inpatient_institutional_group.rb +58 -0
  49. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_all_search_test.rb +38 -0
  50. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_careteam_search_test.rb +38 -0
  51. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_coverage_search_test.rb +38 -0
  52. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_insurer_search_test.rb +38 -0
  53. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_patient_search_test.rb +38 -0
  54. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_provider_search_test.rb +38 -0
  55. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_id_search_test.rb +59 -0
  56. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_identifier_search_test.rb +49 -0
  57. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_lastupdated_search_test.rb +48 -0
  58. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_must_support_test.rb +112 -0
  59. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_patient_search_test.rb +48 -0
  60. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_read_test.rb +39 -0
  61. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_service_date_search_test.rb +48 -0
  62. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_type_search_test.rb +49 -0
  63. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_validation_test.rb +43 -0
  64. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_outpatient_institutional_group.rb +58 -0
  65. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_all_search_test.rb +38 -0
  66. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_careteam_search_test.rb +38 -0
  67. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_coverage_search_test.rb +38 -0
  68. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_insurer_search_test.rb +38 -0
  69. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_patient_search_test.rb +38 -0
  70. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_provider_search_test.rb +38 -0
  71. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_id_search_test.rb +59 -0
  72. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_identifier_search_test.rb +49 -0
  73. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_lastupdated_search_test.rb +48 -0
  74. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_must_support_test.rb +103 -0
  75. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_patient_search_test.rb +48 -0
  76. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_read_test.rb +39 -0
  77. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_service_date_search_test.rb +48 -0
  78. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_type_search_test.rb +49 -0
  79. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_validation_test.rb +43 -0
  80. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_pharmacy_group.rb +58 -0
  81. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_all_search_test.rb +38 -0
  82. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_careteam_search_test.rb +38 -0
  83. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_coverage_search_test.rb +38 -0
  84. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_insurer_search_test.rb +38 -0
  85. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_patient_search_test.rb +38 -0
  86. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_provider_search_test.rb +38 -0
  87. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_id_search_test.rb +59 -0
  88. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_identifier_search_test.rb +49 -0
  89. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_lastupdated_search_test.rb +48 -0
  90. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_must_support_test.rb +97 -0
  91. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_patient_search_test.rb +48 -0
  92. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_read_test.rb +39 -0
  93. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_service_date_search_test.rb +48 -0
  94. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_type_search_test.rb +49 -0
  95. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_validation_test.rb +43 -0
  96. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/explanation_of_benefit_professional_non_clinician_group.rb +58 -0
  97. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/organization/organization_must_support_test.rb +55 -0
  98. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/organization/organization_read_test.rb +39 -0
  99. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/organization/organization_validation_test.rb +43 -0
  100. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/organization_group.rb +58 -0
  101. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/patient/patient_must_support_test.rb +69 -0
  102. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/patient/patient_read_test.rb +39 -0
  103. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/patient/patient_validation_test.rb +43 -0
  104. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/patient_group.rb +58 -0
  105. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/practitioner/practitioner_must_support_test.rb +46 -0
  106. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/practitioner/practitioner_read_test.rb +39 -0
  107. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/practitioner/practitioner_validation_test.rb +43 -0
  108. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/practitioner_group.rb +58 -0
  109. data/lib/carin_for_blue_button_test_kit/generated/v1.1.0/resource_list.rb +17 -0
  110. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/c4bb_test_suite.rb +110 -0
  111. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_coverage_payor_search_test.rb +38 -0
  112. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_id_search_test.rb +59 -0
  113. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_lastupdated_search_test.rb +48 -0
  114. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_must_support_test.rb +53 -0
  115. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_read_test.rb +39 -0
  116. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage/coverage_validation_test.rb +43 -0
  117. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/coverage_group.rb +87 -0
  118. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_billable_period_start_search_test.rb +48 -0
  119. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_all_search_test.rb +38 -0
  120. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_careteam_search_test.rb +38 -0
  121. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_coverage_search_test.rb +38 -0
  122. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_insurer_search_test.rb +38 -0
  123. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_patient_search_test.rb +38 -0
  124. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_payee_search_test.rb +38 -0
  125. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_explanation_of_benefit_provider_search_test.rb +38 -0
  126. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_id_search_test.rb +59 -0
  127. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_identifier_search_test.rb +49 -0
  128. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_lastupdated_search_test.rb +48 -0
  129. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_must_support_test.rb +73 -0
  130. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_patient_search_test.rb +48 -0
  131. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_read_test.rb +39 -0
  132. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_service_date_search_test.rb +48 -0
  133. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_service_start_date_search_test.rb +48 -0
  134. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_type_search_test.rb +49 -0
  135. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit/explanation_of_benefit_validation_test.rb +43 -0
  136. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_group.rb +118 -0
  137. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_billable_period_start_search_test.rb +48 -0
  138. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_all_search_test.rb +38 -0
  139. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_careteam_search_test.rb +38 -0
  140. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_coverage_search_test.rb +38 -0
  141. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_insurer_search_test.rb +38 -0
  142. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_patient_search_test.rb +38 -0
  143. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_payee_search_test.rb +38 -0
  144. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_explanation_of_benefit_provider_search_test.rb +38 -0
  145. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_id_search_test.rb +59 -0
  146. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_identifier_search_test.rb +49 -0
  147. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_lastupdated_search_test.rb +48 -0
  148. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_must_support_test.rb +121 -0
  149. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_patient_search_test.rb +48 -0
  150. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_read_test.rb +39 -0
  151. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_service_date_search_test.rb +48 -0
  152. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_service_start_date_search_test.rb +48 -0
  153. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_type_search_test.rb +49 -0
  154. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional/explanation_of_benefit_inpatient_institutional_validation_test.rb +43 -0
  155. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_inpatient_institutional_group.rb +58 -0
  156. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_billable_period_start_search_test.rb +48 -0
  157. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_all_search_test.rb +38 -0
  158. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_careteam_search_test.rb +38 -0
  159. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_coverage_search_test.rb +38 -0
  160. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_insurer_search_test.rb +38 -0
  161. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_patient_search_test.rb +38 -0
  162. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_payee_search_test.rb +38 -0
  163. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_explanation_of_benefit_provider_search_test.rb +38 -0
  164. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_id_search_test.rb +59 -0
  165. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_identifier_search_test.rb +49 -0
  166. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_lastupdated_search_test.rb +48 -0
  167. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_must_support_test.rb +112 -0
  168. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_patient_search_test.rb +48 -0
  169. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_read_test.rb +39 -0
  170. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_service_date_search_test.rb +48 -0
  171. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_service_start_date_search_test.rb +48 -0
  172. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_type_search_test.rb +49 -0
  173. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral/explanation_of_benefit_oral_validation_test.rb +43 -0
  174. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_oral_group.rb +58 -0
  175. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_billable_period_start_search_test.rb +48 -0
  176. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_all_search_test.rb +38 -0
  177. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_careteam_search_test.rb +38 -0
  178. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_coverage_search_test.rb +38 -0
  179. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_insurer_search_test.rb +38 -0
  180. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_patient_search_test.rb +38 -0
  181. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_payee_search_test.rb +38 -0
  182. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_explanation_of_benefit_provider_search_test.rb +38 -0
  183. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_id_search_test.rb +59 -0
  184. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_identifier_search_test.rb +49 -0
  185. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_lastupdated_search_test.rb +48 -0
  186. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_must_support_test.rb +114 -0
  187. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_patient_search_test.rb +48 -0
  188. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_read_test.rb +39 -0
  189. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_service_date_search_test.rb +48 -0
  190. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_service_start_date_search_test.rb +48 -0
  191. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_type_search_test.rb +49 -0
  192. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional/explanation_of_benefit_outpatient_institutional_validation_test.rb +43 -0
  193. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_outpatient_institutional_group.rb +58 -0
  194. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_billable_period_start_search_test.rb +48 -0
  195. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_all_search_test.rb +38 -0
  196. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_careteam_search_test.rb +38 -0
  197. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_coverage_search_test.rb +38 -0
  198. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_insurer_search_test.rb +38 -0
  199. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_patient_search_test.rb +38 -0
  200. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_payee_search_test.rb +38 -0
  201. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_explanation_of_benefit_provider_search_test.rb +38 -0
  202. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_id_search_test.rb +59 -0
  203. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_identifier_search_test.rb +49 -0
  204. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_lastupdated_search_test.rb +48 -0
  205. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_must_support_test.rb +109 -0
  206. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_patient_search_test.rb +48 -0
  207. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_read_test.rb +39 -0
  208. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_service_date_search_test.rb +48 -0
  209. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_service_start_date_search_test.rb +48 -0
  210. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_type_search_test.rb +49 -0
  211. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy/explanation_of_benefit_pharmacy_validation_test.rb +43 -0
  212. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_pharmacy_group.rb +58 -0
  213. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_billable_period_start_search_test.rb +48 -0
  214. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_all_search_test.rb +38 -0
  215. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_careteam_search_test.rb +38 -0
  216. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_coverage_search_test.rb +38 -0
  217. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_insurer_search_test.rb +38 -0
  218. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_patient_search_test.rb +38 -0
  219. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_payee_search_test.rb +38 -0
  220. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_explanation_of_benefit_provider_search_test.rb +38 -0
  221. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_id_search_test.rb +59 -0
  222. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_identifier_search_test.rb +49 -0
  223. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_lastupdated_search_test.rb +48 -0
  224. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_must_support_test.rb +108 -0
  225. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_patient_search_test.rb +48 -0
  226. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_read_test.rb +39 -0
  227. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_service_date_search_test.rb +48 -0
  228. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_service_start_date_search_test.rb +48 -0
  229. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_type_search_test.rb +49 -0
  230. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician/explanation_of_benefit_professional_non_clinician_validation_test.rb +43 -0
  231. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/explanation_of_benefit_professional_non_clinician_group.rb +58 -0
  232. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_must_support_test.rb +55 -0
  233. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_read_test.rb +39 -0
  234. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization/organization_validation_test.rb +43 -0
  235. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/organization_group.rb +81 -0
  236. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_must_support_test.rb +68 -0
  237. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_read_test.rb +39 -0
  238. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient/patient_validation_test.rb +43 -0
  239. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/patient_group.rb +81 -0
  240. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_must_support_test.rb +46 -0
  241. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_read_test.rb +39 -0
  242. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner/practitioner_validation_test.rb +43 -0
  243. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/practitioner_group.rb +81 -0
  244. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_must_support_test.rb +47 -0
  245. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_read_test.rb +39 -0
  246. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person/related_person_validation_test.rb +43 -0
  247. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/related_person_group.rb +81 -0
  248. data/lib/carin_for_blue_button_test_kit/generated/v2.0.0/resource_list.rb +19 -0
  249. data/lib/carin_for_blue_button_test_kit/generator/group_generator.rb +210 -0
  250. data/lib/carin_for_blue_button_test_kit/generator/group_metadata.rb +87 -0
  251. data/lib/carin_for_blue_button_test_kit/generator/group_metadata_extractor.rb +240 -0
  252. data/lib/carin_for_blue_button_test_kit/generator/ig_loader.rb +76 -0
  253. data/lib/carin_for_blue_button_test_kit/generator/ig_metadata.rb +50 -0
  254. data/lib/carin_for_blue_button_test_kit/generator/ig_metadata_extractor.rb +40 -0
  255. data/lib/carin_for_blue_button_test_kit/generator/ig_resources.rb +50 -0
  256. data/lib/carin_for_blue_button_test_kit/generator/include_search_test_generator.rb +105 -0
  257. data/lib/carin_for_blue_button_test_kit/generator/must_support_metadata_extractor.rb +326 -0
  258. data/lib/carin_for_blue_button_test_kit/generator/must_support_test_generator.rb +131 -0
  259. data/lib/carin_for_blue_button_test_kit/generator/naming.rb +36 -0
  260. data/lib/carin_for_blue_button_test_kit/generator/read_test_generator.rb +109 -0
  261. data/lib/carin_for_blue_button_test_kit/generator/resource_list_generator.rb +43 -0
  262. data/lib/carin_for_blue_button_test_kit/generator/search_definition_metadata_extractor.rb +207 -0
  263. data/lib/carin_for_blue_button_test_kit/generator/search_metadata_extractor.rb +74 -0
  264. data/lib/carin_for_blue_button_test_kit/generator/search_test_generator.rb +299 -0
  265. data/lib/carin_for_blue_button_test_kit/generator/special_cases.rb +21 -0
  266. data/lib/carin_for_blue_button_test_kit/generator/suite_generator.rb +94 -0
  267. data/lib/carin_for_blue_button_test_kit/generator/terminology_binding_metadata_extractor.rb +109 -0
  268. data/lib/carin_for_blue_button_test_kit/generator/validation_test_generator.rb +137 -0
  269. data/lib/carin_for_blue_button_test_kit/generator/value_extractor.rb +50 -0
  270. data/lib/carin_for_blue_button_test_kit/generator.rb +90 -0
  271. data/lib/carin_for_blue_button_test_kit/must_support_test.rb +211 -0
  272. data/lib/carin_for_blue_button_test_kit/read_test.rb +51 -0
  273. data/lib/carin_for_blue_button_test_kit/search_test.rb +781 -0
  274. data/lib/carin_for_blue_button_test_kit/search_test_properties.rb +57 -0
  275. data/lib/carin_for_blue_button_test_kit/validation_test.rb +57 -0
  276. data/lib/carin_for_blue_button_test_kit/version.rb +5 -0
  277. data/lib/carin_for_blue_button_test_kit.rb +2 -0
  278. metadata +405 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 30d1ffcb676dd825e263b88effd94186700da0a695f6fd14ecb2c80a13a51816
4
+ data.tar.gz: ffae0bc4b4db423d27e1931c21a7bdaee0071814ab8a667cca4385d1d34886e9
5
+ SHA512:
6
+ metadata.gz: 11b358e5567ed3cc2f4c8a7da07ed210e75d3ccd8c657c833313a8eeab441249bc06d6c561abe7cb8b32f4144d2a44a3878769fe556382a6ab949a16f4cfbbe9
7
+ data.tar.gz: 8b96b4311fbee746ada18c0ac261bd34e612a53cdd00f80a90ff9da888544d2d7f671f2559113b8e7031c4358e6c943e864667b300b090a595833e82e282aaf8
data/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,45 @@
1
+ require_relative './tests/conformance_support_test'
2
+ require_relative './tests/fhir_version_test'
3
+ require_relative './tests/json_support_test'
4
+ require_relative './tests/profile_support_test'
5
+ require_relative './tests/instantiates_test'
6
+
7
+ module CarinForBlueButtonTestKit
8
+ class CapabilityStatmentGroup < Inferno::TestGroup
9
+ title 'Capability Statement Tests'
10
+ id :capability_statement_group
11
+ description %(
12
+ This test group inspects the CapabilityStatement returned by the server.
13
+ )
14
+
15
+ run_as_group
16
+
17
+ PROFILES = {
18
+ 'Coverage' => ['http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Coverage'].freeze,
19
+ 'ExplanationOfBenefit' => [
20
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit',
21
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Inpatient-Institutional',
22
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Outpatient-Institutional',
23
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Oral',
24
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Pharmacy',
25
+ 'http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-ExplanationOfBenefit-Professional-NonClinician'
26
+ ].freeze,
27
+ 'Organization' => ['http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Organization'].freeze,
28
+ 'Patient' => ['http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Patient'].freeze,
29
+ 'Practitioner' => ['http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Practitioner'].freeze,
30
+ 'RelatedPerson' => ['http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-RelatedPerson'].freeze
31
+ }.freeze
32
+
33
+
34
+ # test from: :carin_bb_conformance_support
35
+ # test from: :carin_bb_json_support
36
+
37
+ # test from: :carin_bb_profile_support do
38
+ # config(
39
+ # options: { carin_bb_resources: PROFILES.keys }
40
+ # )
41
+ # end
42
+
43
+ test from: :carin_bb_instantiate
44
+ end
45
+ end
@@ -0,0 +1,41 @@
1
+ module CarinForBlueButtonTestKit
2
+ class ConformanceSupportTest < Inferno::Test
3
+ id :carin_bb_conformance_support
4
+ title 'FHIR Server supports the conformance interaction'
5
+ description %(
6
+ The conformance 'whole system' interaction provides a method to get the
7
+ CapabilityStatement for the FHIR server. This test checks that the
8
+ server responds to a `GET` request at the following endpoint:
9
+
10
+ ```
11
+ GET [base]/metadata
12
+ ```
13
+
14
+ This test checks the following SHALL requirement:
15
+
16
+ > Applications SHALL return a resource that describes the functionality
17
+ of the server end-point.
18
+
19
+ [http://hl7.org/fhir/R4/http.html#capabilities](http://hl7.org/fhir/R4/http.html#capabilities)
20
+
21
+ It does this by checking that the server responds with an HTTP OK 200
22
+ status code and that the body of the response contains a valid
23
+ [CapabilityStatement
24
+ resource](http://hl7.org/fhir/R4/capabilitystatement.html). This test
25
+ does not inspect the content of the CapabilityStatement to see if it
26
+ contains the required information. It only checks to see if the RESTful
27
+ interaction is supported and returns a valid CapabilityStatement
28
+ resource.
29
+ )
30
+ makes_request :capability_statement
31
+
32
+ run do
33
+ fhir_client.set_no_auth
34
+ fhir_get_capability_statement(name: :capability_statement)
35
+
36
+ assert_response_status(200)
37
+ assert_resource_type(:capability_statement)
38
+ assert_valid_resource
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,15 @@
1
+ module CarinForBlueButtonTestKit
2
+ class FHIRVersionTest < Inferno::Test
3
+ id :carin_bb_fhir_version
4
+ title 'Server is using FHIR R4'
5
+ description %(
6
+ This test inspects the CapabilityStatement returned by the server to
7
+ verify that the server is using FHIR R4.
8
+ )
9
+
10
+ run do
11
+ server_version = fhir_client.detect_version.to_s.upcase
12
+ assert server_version == 'R4', "Server is using FHIR version #{server_version} rather than R4"
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,32 @@
1
+ module CarinForBlueButtonTestKit
2
+ class InstantiatesTest < Inferno::Test
3
+ id :carin_bb_instantiate
4
+ title 'Server instantiates CARIN BlueButton '
5
+ description %(
6
+ This test inspects the CapabilityStatement returned by the server to
7
+ verify that the server instantiates http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb
8
+ )
9
+
10
+ # Makes_request step (see comment below)
11
+ makes_request :capability_statement
12
+
13
+ ##############################################################
14
+ # ATTENTION: If other capability tests are added,
15
+ # USE "uses_request" line below and move makes_request
16
+ # lines to the first test in the group
17
+ ##############################################################
18
+ # uses_request :capability_statement
19
+
20
+ run do
21
+ # Makes_request steps (see comment above)
22
+ fhir_client.set_no_auth
23
+ fhir_get_capability_statement(name: :capability_statement)
24
+
25
+ assert_resource_type(:capability_statement)
26
+ capability_statement = resource
27
+
28
+ assert capability_statement.instantiates.include?('http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb'),
29
+ "Server CapabilityStatement.instantiates does not include 'http://hl7.org/fhir/us/carin-bb/CapabilityStatement/c4bb'"
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,39 @@
1
+ module CarinForBlueButtonTestKit
2
+ class JSONSupportTest < Inferno::Test
3
+ id :carin_bb_json_support
4
+ title 'FHIR server capability states JSON support'
5
+ description %(
6
+ FHIR provides multiple [representation
7
+ formats](https://www.hl7.org/fhir/formats.html) for resources, including
8
+ JSON and XML. CARIN BlueButton profiles require servers to use the [JSON
9
+ representation](https://www.hl7.org/fhir/json.html):
10
+
11
+ [```The C4BB Server **SHALL** Support json source formats for all CARIN-BB
12
+ interactions.```](http://hl7.org/fhir/us/carin-bb/STU2/CapabilityStatement-c4bb.html#behavior)
13
+
14
+ The FHIR conformance interaction require servers to describe which
15
+ formats are available for clients to use. The server must explicitly
16
+ state that JSON is supported. This is located in the [format
17
+ element](https://www.hl7.org/fhir/capabilitystatement-definitions.html#CapabilityStatement.format)
18
+ of the CapabilityStatement Resource.
19
+
20
+ This test checks that one of the following values are located in the
21
+ format field.
22
+
23
+ * json
24
+ * application/json
25
+ * application/fhir+json
26
+ )
27
+ uses_request :capability_statement
28
+
29
+ run do
30
+ assert_resource_type(:capability_statement)
31
+
32
+ json_formats = ['json', 'application/json', 'application/fhir+json']
33
+ server_formats = resource.format
34
+
35
+ assert server_formats.any? { |format| json_formats.include? format },
36
+ 'CapabilityStatement does not state support for JSON'
37
+ end
38
+ end
39
+ end
@@ -0,0 +1,32 @@
1
+ module CarinForBlueButtonTestKit
2
+ class ProfileSupportTest < Inferno::Test
3
+ id :carin_bb_profile_support
4
+ title 'Capability Statement lists support for required CARIN BlueButton Profiles'
5
+ description %(
6
+ The CARIN BlueButton Implementation Guide states:
7
+
8
+ ```
9
+ The C4BB Server SHALL:
10
+ 1. Support all profiles defined in this Implementation Guide.
11
+ ```
12
+ )
13
+ uses_request :capability_statement
14
+
15
+ run do
16
+ assert_resource_type(:capability_statement)
17
+ capability_statement = resource
18
+
19
+ supported_resources =
20
+ capability_statement.rest
21
+ &.each_with_object([]) do |rest, resources|
22
+ rest.resource.each { |resource| resources << resource.type }
23
+ end.uniq
24
+
25
+ carin_bb_resources = config.options[:carin_bb_resources]
26
+ carin_bb_resources.each do |resource_type|
27
+ fail_message = 'CARIN for Blue Button ' + resource_type + ' profile not supported'
28
+ assert supported_resources.include?(resource_type), fail_message
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,227 @@
1
+ require_relative 'date_search_validator'
2
+ require_relative 'fhir_resource_navigation'
3
+ require_relative 'search_test_properties'
4
+
5
+ module CarinForBlueButtonTestKit
6
+ module CarinSearchTest
7
+ extend Forwardable
8
+ include DateSearchValidation
9
+ include FHIRResourceNavigation
10
+
11
+ def_delegators 'self.class', :metadata, :properties
12
+ def_delegators 'properties',
13
+ :resource_type,
14
+ :search_param_names,
15
+ :saves_delayed_references?,
16
+ :first_search?,
17
+ :fixed_value_search?,
18
+ :possible_status_search?,
19
+ :test_medication_inclusion?,
20
+ :test_post_search?,
21
+ :token_search_params,
22
+ :test_reference_variants?,
23
+ :params_with_comparators,
24
+ :multiple_or_search_params
25
+
26
+ def run_search_test(param_value, include_search: false, resource_id: nil)
27
+ search_params = {}
28
+
29
+ if include_search
30
+ search_params = { _id: resource_id }
31
+ run_include_search(search_params, param_value)
32
+ return
33
+ end
34
+
35
+ search_params[search_param_names[0]] = param_value
36
+
37
+ fhir_search(resource_type, params: search_params)
38
+ assert_response_status(200)
39
+ assert_resource_type(:bundle)
40
+
41
+ returned_resources = extract_resources_from_bundle(bundle: resource, response: response).select{|item| item.resourceType == resource_type}
42
+
43
+ skip_if returned_resources.blank?, self.no_resources_message
44
+
45
+ returned_resources.each do |resource|
46
+ check_resource_against_params(resource, search_params)
47
+ end
48
+
49
+ end
50
+
51
+ def extract_resources_from_bundle(
52
+ bundle: nil,
53
+ response: nil,
54
+ reply_handler: nil,
55
+ max_pages: 20,
56
+ additional_resource_types: [],
57
+ resource_type: self.resource_type
58
+ )
59
+ page_count = 1
60
+ resources = []
61
+
62
+ until bundle.nil? || page_count == max_pages
63
+ resources += bundle&.entry&.map { |entry| entry&.resource }
64
+ next_bundle_link = bundle&.link&.find { |link| link.relation == 'next' }&.url
65
+ reply_handler&.call(response)
66
+
67
+ break if next_bundle_link.blank?
68
+
69
+ page_count += 1
70
+ end
71
+
72
+ resources
73
+ end
74
+
75
+ def search_param_paths(name)
76
+ paths = metadata.search_definitions[name.to_sym][:paths]
77
+ if paths.first =='class'
78
+ paths[0] = 'local_class'
79
+ end
80
+
81
+ paths
82
+ end
83
+
84
+ def no_resources_message
85
+ "No resources were returned from this query."
86
+ end
87
+
88
+ # VALIDATION
89
+
90
+ def check_resource_against_params(resource, search_params)
91
+ search_params.each do |name, param_value|
92
+ paths = []
93
+
94
+ if name == '_id'
95
+ paths = ['id']
96
+ elsif name == '_lastUpdated'
97
+ paths = ['meta.lastUpdated']
98
+ else
99
+ paths = search_param_paths(name)
100
+ end
101
+
102
+ match_found = false
103
+ values_found = []
104
+
105
+ paths.each do |path|
106
+ if name == '_id'
107
+ type = 'http://hl7.org/fhirpath/System.String'
108
+ elsif name == '_lastUpdated'
109
+ type = 'date'
110
+ else
111
+ type = metadata.search_definitions[name.to_sym][:type]
112
+ end
113
+
114
+ values_found =
115
+ resolve_path(resource.source_hash, path)
116
+ .map do |value|
117
+ if value[:reference.to_s]
118
+ value[:reference.to_s]
119
+ else
120
+ value
121
+ end
122
+ end
123
+
124
+ match_found =
125
+ case type
126
+ when 'Reference'
127
+ values_found.any? do |val|
128
+ val.include? param_value
129
+ end
130
+ when 'CodeableConcept'
131
+ codings = values_found.flat_map do |val|
132
+ if val[:coding.to_s]
133
+ val[:coding.to_s]
134
+ else
135
+ nil
136
+ end
137
+ end.compact
138
+ if param_value.include? '|'
139
+ system = param_value.split('|').first
140
+ code = param_value.split('|').last
141
+ codings&.any? { |coding| coding[:system.to_s] == system && coding[:code.to_s]&.casecmp?(code) }
142
+ else
143
+ codings&.any? { |coding| coding.code&. casecmp?(search_value) }
144
+ end
145
+ when 'Identifier'
146
+ if param_value.include? '|'
147
+ values_found.any? { |identifier|
148
+ puts "#{identifier[:system.to_s]}|#{identifier[:value.to_s]}"
149
+ "#{identifier[:system.to_s]}|#{identifier[:value.to_s]}" == param_value
150
+ }
151
+ else
152
+ values_found.any? { |identifier| identifier[:value] == param_value }
153
+ end
154
+ when 'date'
155
+ values_found.any? { |date| validate_date_search(param_value, date) }
156
+ when 'http://hl7.org/fhirpath/System.String'
157
+ values_found.any? { |str| param_value == str}
158
+ else
159
+ false
160
+ end
161
+
162
+ break if match_found
163
+ end
164
+ assert match_found, "Returned resource did not match the search parameter"
165
+ end
166
+ end
167
+
168
+ def run_include_search(search_params, param_value)
169
+ search_params['_include'] = param_value
170
+
171
+ fhir_search(resource_type, params: search_params)
172
+ assert_response_status(200)
173
+ assert_resource_type(:bundle)
174
+
175
+ returned_resources = extract_resources_from_bundle(bundle: resource, response: response).select{|item| item.resourceType == resource_type}
176
+
177
+ skip_if returned_resources.blank?, self.no_resources_message
178
+
179
+ returned_resources.each do |resource|
180
+ match_found = false
181
+ paths = include_param_paths(param_value)
182
+
183
+ if param_value != 'ExplanationOfBenefit:*'
184
+ paths.each do |path|
185
+ values_found = resolve_path(resource.source_hash, path)
186
+
187
+ match_found = (values_found.length > 0)
188
+
189
+ break if match_found
190
+ end
191
+ assert match_found, "Returned resource did not match the search parameter"
192
+ return
193
+ else
194
+ values_found = []
195
+ paths.each do |path|
196
+ values_found += resolve_path(resource.source_hash, path)
197
+ end
198
+
199
+ match_found = (values_found.length >= 5)
200
+
201
+ assert match_found, "Returned resource did not match the search parameter"
202
+ end
203
+ end
204
+ end
205
+
206
+ def include_param_paths(param)
207
+ case param
208
+ when 'ExplanationOfBenefit:patient'
209
+ ['patient']
210
+ when 'ExplanationOfBenefit:provider'
211
+ ['provider']
212
+ when 'ExplanationOfBenefit:care-team'
213
+ ['careTeam']
214
+ when 'ExplanationOfBenefit:coverage'
215
+ ['insurance.coverage']
216
+ when 'ExplanationOfBenefit:insurer'
217
+ ['insurer']
218
+ when 'Coverage:payor'
219
+ ['payor']
220
+ when 'ExplanationOfBenefit:*'
221
+ ['patient', 'provider', 'careTeam', 'insurance.coverage', 'insurer']
222
+ else
223
+ []
224
+ end
225
+ end
226
+ end
227
+ end