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
@@ -0,0 +1,207 @@
1
+ require_relative 'value_extractor'
2
+
3
+ module CarinForBlueButtonTestKit
4
+ class Generator
5
+ class SearchDefinitionMetadataExtractor
6
+ attr_accessor :ig_resources, :name, :resource, :profile_elements
7
+
8
+ def initialize(name, ig_resources, resource, profile_elements)
9
+ self.name = name
10
+ self.ig_resources = ig_resources
11
+ self.resource = resource
12
+ self.profile_elements = profile_elements
13
+ end
14
+
15
+ def search_definition
16
+ @search_definition ||=
17
+ {
18
+ paths: paths,
19
+ full_paths: full_paths,
20
+ comparators: comparators,
21
+ values: values,
22
+ type: type,
23
+ contains_multiple: contains_multiple?,
24
+ multiple_or: multiple_or_expectation,
25
+ chain: chain
26
+ }.compact
27
+ end
28
+
29
+ def param
30
+ @param ||= ig_resources.search_param_by_resource_and_name(resource, name)
31
+ end
32
+
33
+ def param_hash
34
+ if !param.nil?
35
+ param.source_hash
36
+ else
37
+ nil
38
+ end
39
+ end
40
+
41
+ def full_paths
42
+ @full_paths ||=
43
+ begin
44
+ if !param.nil?
45
+ path = param.expression.gsub(/.where\((.*)/, '')
46
+ path = path[1..-2] if path.start_with?('(') && path.end_with?(')')
47
+ path.scan(/[. ]as[( ]([^)]*)[)]?/).flatten.map do |as_type|
48
+ path.gsub!(/[. ]as[( ](#{as_type}[^)]*)[)]?/, as_type.upcase_first) if as_type.present?
49
+ end
50
+ path.split('|')
51
+ else
52
+ []
53
+ end
54
+ end
55
+ end
56
+
57
+ def paths
58
+ @paths ||= full_paths.map { |a_path| a_path.gsub("#{resource}.", '') }
59
+ end
60
+
61
+ def profile_element
62
+ @profile_element ||=
63
+ profile_elements.find { |element| full_paths.include?(element.id) }
64
+ end
65
+
66
+ def comparator_expectation_extensions
67
+ @comparator_expectation_extensions ||= param_hash['_comparator'] || []
68
+ end
69
+
70
+ def support_expectation(extension)
71
+ extension['extension'].first['valueCode']
72
+ end
73
+
74
+ def comparator_expectation(extension)
75
+ if extension.nil?
76
+ 'MAY'
77
+ else
78
+ support_expectation(extension)
79
+ end
80
+ end
81
+
82
+ def comparators
83
+ if !param.nil?
84
+ {}.tap do |comparators|
85
+ param.comparator&.each_with_index do |comparator, index|
86
+ comparators[comparator.to_sym] = comparator_expectation(comparator_expectation_extensions[index])
87
+ end
88
+ end
89
+ end
90
+ end
91
+
92
+ def type
93
+ if profile_element.present?
94
+ profile_element.type.first.code
95
+ else
96
+ # search is a variable type, eg. Condition.onsetDateTime - element
97
+ # in profile def is Condition.onset[x]
98
+ if !param.nil?
99
+ param.type
100
+ else
101
+ nil
102
+ end
103
+ end
104
+ end
105
+
106
+ def contains_multiple?
107
+ profile_element&.max == '*'
108
+ end
109
+
110
+ def chain_extensions
111
+ param_hash['_chain']
112
+ end
113
+
114
+ def chain_expectations
115
+ chain_extensions.map { |extension| support_expectation(extension) }
116
+ end
117
+
118
+ def chain
119
+ return nil if param.nil?
120
+ return nil if param.chain.blank?
121
+
122
+ param.chain
123
+ .zip(chain_expectations)
124
+ .map { |chain, expectation| { chain: chain, expectation: expectation } }
125
+ end
126
+
127
+ def multiple_or_expectation
128
+ if !param_hash.nil? then
129
+ begin
130
+ return param_hash['_multipleOr']['extension'].first['valueCode']
131
+ rescue NoMethodError
132
+ return nil
133
+ end
134
+ else
135
+ return nil
136
+ end
137
+ end
138
+
139
+ def values
140
+ values = (
141
+ values_from_pattern_codeable_concept_slices +
142
+ values_from_required_binding_slices +
143
+ values_from_fixed_codes +
144
+ values_from_pattern_coding +
145
+ values_from_pattern_codeable_concept
146
+ ).uniq.presence ||
147
+ value_extractor.values_from_value_set_binding(profile_element).presence ||
148
+ value_extractor.values_from_resource_metadata(paths).presence || []
149
+
150
+ values
151
+ end
152
+
153
+ def slices
154
+ return [] unless contains_multiple?
155
+
156
+ profile_elements.select do |element|
157
+ full_paths.include?(element.path) &&
158
+ element.sliceName.present? &&
159
+ (
160
+ element.patternCodeableConcept.present? ||
161
+ element.binding.present? && element.binding.strength == 'required'
162
+ )
163
+ end
164
+ end
165
+
166
+ def values_from_pattern_codeable_concept_slices
167
+ slices.map do |slice|
168
+ slice.patternCodeableConcept.coding.first.code if slice.patternCodeableConcept.present?
169
+ end.compact
170
+ end
171
+
172
+ def values_from_required_binding_slices
173
+ slices.map do |slice|
174
+ if slice.binding.present? && slice.binding.strength == 'required'
175
+ value_extractor.values_from_value_set_binding(slice)
176
+ end
177
+ end.flatten.compact
178
+ end
179
+
180
+ def values_from_fixed_codes
181
+ return [] unless type == 'CodeableConcept'
182
+
183
+ profile_elements
184
+ .select { |element| element.path == "#{profile_element.path}.coding.code" && element.fixedCode.present? }
185
+ .map { |element| element.fixedCode }
186
+ end
187
+
188
+ def values_from_pattern_coding
189
+ return [] unless type == 'CodeableConcept'
190
+
191
+ profile_elements
192
+ .select { |element| element.path == "#{profile_element.path}.coding" && element.patternCoding.present? }
193
+ .map { |element| element.patternCoding.code }
194
+ end
195
+
196
+ def values_from_pattern_codeable_concept
197
+ return [] if type != 'CodeableConcept' || profile_element.patternCodeableConcept.blank?
198
+
199
+ [profile_element.patternCodeableConcept.coding.first.code]
200
+ end
201
+
202
+ def value_extractor
203
+ @value_extractor ||= ValueExactor.new(ig_resources, resource)
204
+ end
205
+ end
206
+ end
207
+ end
@@ -0,0 +1,74 @@
1
+ require_relative 'search_definition_metadata_extractor'
2
+
3
+ module CarinForBlueButtonTestKit
4
+ class Generator
5
+ class SearchMetadataExtractor
6
+ COMBO_EXTENSION_URL =
7
+ 'http://hl7.org/fhir/StructureDefinition/capabilitystatement-search-parameter-combination'.freeze
8
+
9
+ attr_accessor :resource_capabilities, :ig_resources, :resource, :profile_elements
10
+
11
+ def initialize(resource_capabilities, ig_resources, resource, profile_elements)
12
+ self.resource_capabilities = resource_capabilities
13
+ self.ig_resources = ig_resources
14
+ self.resource = resource
15
+ self.profile_elements = profile_elements
16
+ end
17
+
18
+ def searches
19
+ @searches ||= basic_searches + combo_searches
20
+ end
21
+
22
+ def conformance_expectation(search_param)
23
+ search_param.extension.first.valueCode # TODO: fix expectation extension finding
24
+ end
25
+
26
+ def no_search_params?
27
+ resource_capabilities.searchParam.blank?
28
+ end
29
+
30
+ def basic_searches
31
+ return [] if no_search_params?
32
+
33
+ resource_capabilities.searchParam
34
+ .select { |search_param| ['SHALL', 'SHOULD'].include? conformance_expectation(search_param) }
35
+ .map do |search_param|
36
+ {
37
+ names: [search_param.name],
38
+ expectation: conformance_expectation(search_param)
39
+ }
40
+ end
41
+ end
42
+
43
+ def search_extensions
44
+ resource_capabilities.extension
45
+ end
46
+
47
+ def combo_searches
48
+ return [] if search_extensions.blank?
49
+
50
+ search_extensions
51
+ .select { |extension| extension.url == COMBO_EXTENSION_URL }
52
+ .select { |extension| ['SHALL', 'SHOULD'].include? conformance_expectation(extension) }
53
+ .map do |extension|
54
+ names = extension.extension.select { |param| param.valueString.present? }.map(&:valueString)
55
+ {
56
+ expectation: conformance_expectation(extension),
57
+ names: names
58
+ }
59
+ end
60
+ end
61
+
62
+ def search_param_names
63
+ searches.flat_map { |search| search[:names] }.uniq
64
+ end
65
+
66
+ def search_definitions
67
+ search_param_names.each_with_object({}) do |name, definitions|
68
+ definitions[name.to_sym] =
69
+ SearchDefinitionMetadataExtractor.new(name, ig_resources, resource, profile_elements).search_definition
70
+ end
71
+ end
72
+ end
73
+ end
74
+ end
@@ -0,0 +1,299 @@
1
+ require_relative 'naming'
2
+ require_relative 'special_cases'
3
+ require_relative 'include_search_test_generator'
4
+
5
+ module CarinForBlueButtonTestKit
6
+ class Generator
7
+ class SearchTestGenerator
8
+ class << self
9
+ def generate(ig_metadata, base_output_dir)
10
+ ig_metadata.groups
11
+ .reject { |group| SpecialCases.exclude_group? group }
12
+ .select { |group| group.searches.present? }
13
+ .each do |group|
14
+ group.searches.each { |search| new(group, search, base_output_dir).generate }
15
+ group.include_params.each{ |param| IncludeSearchTestGenerator.new(group, param, base_output_dir).generate }
16
+ end
17
+ end
18
+ end
19
+
20
+ attr_accessor :group_metadata, :search_metadata, :base_output_dir
21
+
22
+ def initialize(group_metadata, search_metadata, base_output_dir)
23
+ self.group_metadata = group_metadata
24
+ self.search_metadata = search_metadata
25
+ self.base_output_dir = base_output_dir
26
+ end
27
+
28
+ def template
29
+ @template ||= File.read(File.join(__dir__, 'templates', 'search.rb.erb'))
30
+ end
31
+
32
+ def output
33
+ @output ||= ERB.new(template).result(binding)
34
+ end
35
+
36
+ def base_output_file_name
37
+ "#{class_name.underscore}.rb"
38
+ end
39
+
40
+ def output_file_directory
41
+ File.join(base_output_dir, profile_identifier)
42
+ end
43
+
44
+ def output_file_name
45
+ File.join(output_file_directory, base_output_file_name)
46
+ end
47
+
48
+ def profile_identifier
49
+ Naming.snake_case_for_profile(group_metadata)
50
+ end
51
+
52
+ def test_id
53
+ "c4bb_#{group_metadata.reformatted_version}_#{profile_identifier}_#{search_identifier}_search_test"
54
+ end
55
+
56
+ def search_identifier
57
+ search_metadata[:names].join('_').tr('-', '_')
58
+ end
59
+
60
+ def search_title
61
+ search_identifier.camelize
62
+ end
63
+
64
+ def class_name
65
+ "#{Naming.upper_camel_case_for_profile(group_metadata)}#{search_title}SearchTest"
66
+ end
67
+
68
+ def module_name
69
+ "CARIN4BB#{group_metadata.reformatted_version.upcase}"
70
+ end
71
+
72
+ def resource_type
73
+ group_metadata.resource
74
+ end
75
+
76
+ def conformance_expectation
77
+ search_metadata[:expectation]
78
+ end
79
+
80
+ def search_params
81
+ @search_params ||=
82
+ search_metadata[:names].map do |name|
83
+ {
84
+ name: name,
85
+ path: search_definition(name)[:path]
86
+ }
87
+ end
88
+ end
89
+
90
+ def first_search?
91
+ group_metadata.searches.first == search_metadata
92
+ end
93
+
94
+ def fixed_value_search?
95
+ first_search? && search_metadata[:names] != ['patient'] &&
96
+ !group_metadata.delayed? && resource_type != 'Patient'
97
+ end
98
+
99
+ def fixed_value_search_param_name
100
+ (search_metadata[:names] - [:patient]).first
101
+ end
102
+
103
+ def search_param_name_string
104
+ search_metadata[:names].join(' + ')
105
+ end
106
+
107
+ def needs_patient_id?
108
+ search_metadata[:names].include?('patient') ||
109
+ (resource_type == 'Patient' && search_metadata[:names].include?('_id'))
110
+ end
111
+
112
+ def search_param_names
113
+ search_params.map { |param| param[:name] }
114
+ end
115
+
116
+ def search_param_names_array
117
+ array_of_strings(search_param_names)
118
+ end
119
+
120
+ def path_for_value(path)
121
+ path == 'class' ? 'local_class' : path
122
+ end
123
+
124
+ def required_comparators_for_param(name)
125
+ begin
126
+ return search_definition(name)[:comparators].select { |_comparator, expectation| expectation == 'SHALL' }
127
+ rescue NoMethodError
128
+ return []
129
+ end
130
+ end
131
+
132
+ def required_comparators
133
+ @required_comparators ||=
134
+ search_param_names.each_with_object({}) do |name, comparators|
135
+ required_comparators = required_comparators_for_param(name)
136
+ comparators[name] = required_comparators if required_comparators.present?
137
+ end
138
+ end
139
+
140
+ def optional?
141
+ conformance_expectation != 'SHALL' || !search_metadata[:must_support_or_mandatory]
142
+ end
143
+
144
+ def search_definition(name)
145
+ group_metadata.search_definitions[name.to_sym]
146
+ end
147
+
148
+ def saves_delayed_references?
149
+ first_search? && group_metadata.delayed_references.present?
150
+ end
151
+
152
+ def possible_status_search?
153
+ !search_metadata[:names].any? { |name| name.include? 'status' } &&
154
+ group_metadata.search_definitions.keys.any? { |key| key.to_s.include? 'status' }
155
+ end
156
+
157
+ def token_search_params
158
+ @token_search_params ||=
159
+ search_param_names.select do |name|
160
+ ['Identifier', 'CodeableConcept', 'Coding'].include? group_metadata.search_definitions[name.to_sym][:type]
161
+ end
162
+ end
163
+
164
+ def token_search_params_string
165
+ array_of_strings(token_search_params)
166
+ end
167
+
168
+ def required_multiple_or_search_params
169
+ @multiple_or_search_params ||=
170
+ search_param_names.select do |name|
171
+ search_definition(name)[:multiple_or] == 'SHALL'
172
+ end
173
+ end
174
+
175
+ def required_multiple_or_search_params_string
176
+ array_of_strings(required_multiple_or_search_params)
177
+ end
178
+
179
+ def required_comparators_string
180
+ array_of_strings(required_comparators.keys)
181
+ end
182
+
183
+ def array_of_strings(array)
184
+ quoted_strings = array.map { |element| "'#{element}'" }
185
+ "[#{quoted_strings.join(', ')}]"
186
+ end
187
+
188
+ def test_reference_variants?
189
+ first_search? && search_param_names.include?('patient')
190
+ end
191
+
192
+ def test_medication_inclusion?
193
+ resource_type == 'MedicationRequest'
194
+ end
195
+
196
+ def test_post_search?
197
+ first_search?
198
+ end
199
+
200
+ def search_properties
201
+ {}.tap do |properties|
202
+ properties[:first_search] = 'true' if first_search?
203
+ properties[:fixed_value_search] = 'true' if fixed_value_search?
204
+ properties[:resource_type] = "'#{resource_type}'"
205
+ properties[:search_param_names] = search_param_names_array
206
+ properties[:saves_delayed_references] = 'true' if saves_delayed_references?
207
+ properties[:possible_status_search] = 'true' if possible_status_search?
208
+ properties[:test_medication_inclusion] = 'true' if test_medication_inclusion?
209
+ properties[:token_search_params] = token_search_params_string if token_search_params.present?
210
+ properties[:test_reference_variants] = 'true' if test_reference_variants?
211
+ properties[:params_with_comparators] = required_comparators_string if required_comparators.present?
212
+ properties[:multiple_or_search_params] = required_multiple_or_search_params_string if required_multiple_or_search_params.present?
213
+ properties[:test_post_search] = 'true' if first_search?
214
+ end
215
+ end
216
+
217
+ def url_version
218
+ case group_metadata.version
219
+ when 'v3.1.1'
220
+ 'STU3.1.1'
221
+ when 'v4.0.0'
222
+ 'STU4'
223
+ end
224
+ end
225
+
226
+ def search_test_properties_string
227
+ search_properties
228
+ .map { |key, value| "#{' ' * 8}#{key}: #{value}" }
229
+ .join(",\n")
230
+ end
231
+
232
+ def generate
233
+ FileUtils.mkdir_p(output_file_directory)
234
+ File.open(output_file_name, 'w') { |f| f.write(output) }
235
+
236
+ group_metadata.add_test(
237
+ id: test_id,
238
+ file_name: base_output_file_name
239
+ )
240
+ end
241
+
242
+ def reference_search_description
243
+ return '' unless test_reference_variants?
244
+
245
+ <<~REFERENCE_SEARCH_DESCRIPTION
246
+ This test verifies that the server supports searching by reference using
247
+ the form `patient=[id]` as well as `patient=Patient/[id]`. The two
248
+ different forms are expected to return the same number of results. CARIN requires that both forms are supported by CARIN for Blue Button responders.
249
+ REFERENCE_SEARCH_DESCRIPTION
250
+ end
251
+
252
+ def first_search_description
253
+ return '' unless first_search?
254
+
255
+ <<~FIRST_SEARCH_DESCRIPTION
256
+ Because this is the first search of the sequence, resources in the
257
+ response will be used for subsequent tests.
258
+ FIRST_SEARCH_DESCRIPTION
259
+ end
260
+
261
+ def post_search_description
262
+ return '' unless test_post_search?
263
+
264
+ <<~POST_SEARCH_DESCRIPTION
265
+ Additionally, this test will check that GET and POST search methods
266
+ return the same number of results. Search by POST is required by the
267
+ FHIR R4 specification, and these tests interpret search by GET as a
268
+ requirement of CARIN IG for Blue Button® #{group_metadata.version}.
269
+ POST_SEARCH_DESCRIPTION
270
+ end
271
+
272
+ def description
273
+ <<~DESCRIPTION.gsub(/\n{3,}/, "\n\n")
274
+ A server #{conformance_expectation} support searching by
275
+ #{search_param_name_string} on the #{resource_type} resource. This test
276
+ will pass if resources are returned and match the search criteria. If
277
+ none are returned, the test is skipped.
278
+
279
+ #{reference_search_description}
280
+ #{first_search_description}
281
+ #{post_search_description}
282
+
283
+ DESCRIPTION
284
+ end
285
+
286
+ def input_title
287
+ <<~INPUT_TITLE
288
+ #{resource_type} search parameter for #{search_param_name_string}
289
+ INPUT_TITLE
290
+ end
291
+
292
+ def input_description
293
+ <<~INPUT_DESCRIPTION
294
+ #{resource_type} search parameter: #{search_param_name_string}
295
+ INPUT_DESCRIPTION
296
+ end
297
+ end
298
+ end
299
+ end
@@ -0,0 +1,21 @@
1
+ module CarinForBlueButtonTestKit
2
+ class Generator
3
+ module SpecialCases
4
+ RESOURCES_TO_EXCLUDE = [
5
+ 'Patient',
6
+ 'Organization',
7
+ 'Practitioner',
8
+ 'RelatedPerson'
9
+ ].freeze
10
+
11
+ PROFILES_TO_EXCLUDE = [
12
+ ].freeze
13
+
14
+ class << self
15
+ def exclude_group?(group)
16
+ RESOURCES_TO_EXCLUDE.include?(group.resource)
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,94 @@
1
+ require_relative 'naming'
2
+
3
+ module CarinForBlueButtonTestKit
4
+ class Generator
5
+ class SuiteGenerator
6
+ class << self
7
+ def generate(ig_metadata, base_output_dir)
8
+ new(ig_metadata, base_output_dir).generate
9
+ end
10
+ end
11
+
12
+ attr_accessor :ig_metadata, :base_output_dir
13
+
14
+ def initialize(ig_metadata, base_output_dir)
15
+ self.ig_metadata = ig_metadata
16
+ self.base_output_dir = base_output_dir
17
+ end
18
+
19
+ def template
20
+ @template ||= File.read(File.join(__dir__, 'templates', 'suite.rb.erb'))
21
+ end
22
+
23
+ def output
24
+ @output ||= ERB.new(template).result(binding)
25
+ end
26
+
27
+ def base_output_file_name
28
+ "c4bb_test_suite.rb"
29
+ end
30
+
31
+ def class_name
32
+ "C4BBTestKit"
33
+ end
34
+
35
+ def module_name
36
+ "CARIN4BB#{ig_metadata.reformatted_version.upcase}"
37
+ end
38
+
39
+ def output_file_name
40
+ File.join(base_output_dir, base_output_file_name)
41
+ end
42
+
43
+ def suite_id
44
+ "c4bb_#{ig_metadata.reformatted_version}"
45
+ end
46
+
47
+ def title
48
+ "CARIN IG for Blue Button® #{ig_metadata.ig_version}"
49
+ end
50
+
51
+ def validator_env_name
52
+ "#{ig_metadata.reformatted_version.upcase}_VALIDATOR_URL"
53
+ end
54
+
55
+ def ig_link
56
+ case ig_metadata.ig_version
57
+ when 'v1.1.0'
58
+ 'http://hl7.org/fhir/us/carin-bb/STU1.1'
59
+ when 'v2.0.0'
60
+ 'http://hl7.org/fhir/us/carin-bb/STU2'
61
+ else
62
+ 'http://hl7.org/fhir/us/carin-bb/history.html'
63
+ end
64
+ end
65
+
66
+ def generate
67
+ File.open(output_file_name, 'w') { |f| f.write(output) }
68
+ end
69
+
70
+ def groups
71
+ ig_metadata.ordered_groups
72
+ end
73
+
74
+ def group_id_list
75
+ @group_id_list ||=
76
+ groups.select.map(&:id)
77
+ end
78
+
79
+ def group_file_list
80
+ @group_file_list ||=
81
+ groups.map { |group| group.file_name.delete_suffix('.rb') }
82
+ end
83
+
84
+ def capability_statement_file_name
85
+ "../capability_statement/capability_statement_group"
86
+ end
87
+
88
+ def capability_statement_group_id
89
+ "c4bb_#{ig_metadata.reformatted_version}_capability_statement"
90
+ end
91
+
92
+ end
93
+ end
94
+ end