ipa_test_kit 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/LICENSE +201 -0
- data/lib/ipa_test_kit/custom_groups/capability_statement/conformance_support_test.rb +41 -0
- data/lib/ipa_test_kit/custom_groups/capability_statement/fhir_version_test.rb +15 -0
- data/lib/ipa_test_kit/custom_groups/capability_statement/json_support_test.rb +39 -0
- data/lib/ipa_test_kit/custom_groups/capability_statement/profile_support_test.rb +76 -0
- data/lib/ipa_test_kit/custom_groups/capability_statement_group.rb +64 -0
- data/lib/ipa_test_kit/date_search_validation.rb +101 -0
- data/lib/ipa_test_kit/ext/fhir_models.rb +59 -0
- data/lib/ipa_test_kit/fhir_resource_navigation.rb +63 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_must_support_test.rb +40 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_patient_clinical_status_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_patient_search_test.rb +60 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_provenance_revinclude_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance/metadata.yml +165 -0
- data/lib/ipa_test_kit/generated/allergy_intolerance_group.rb +85 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/bmi/bmi_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/bmi/metadata.yml +322 -0
- data/lib/ipa_test_kit/generated/bmi_group.rb +93 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/bodyheight/bodyheight_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/bodyheight/metadata.yml +328 -0
- data/lib/ipa_test_kit/generated/bodyheight_group.rb +93 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/bodytemp/bodytemp_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/bodytemp/metadata.yml +328 -0
- data/lib/ipa_test_kit/generated/bodytemp_group.rb +93 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/bodyweight/bodyweight_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/bodyweight/metadata.yml +328 -0
- data/lib/ipa_test_kit/generated/bodyweight_group.rb +93 -0
- data/lib/ipa_test_kit/generated/bp/bp_must_support_test.rb +52 -0
- data/lib/ipa_test_kit/generated/bp/bp_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/bp/bp_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/bp/bp_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/bp/bp_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/bp/bp_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/bp/bp_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/bp/bp_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/bp/bp_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/bp/bp_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/bp/metadata.yml +379 -0
- data/lib/ipa_test_kit/generated/bp_group.rb +93 -0
- data/lib/ipa_test_kit/generated/condition/condition_must_support_test.rb +39 -0
- data/lib/ipa_test_kit/generated/condition/condition_patient_category_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/condition/condition_patient_clinical_status_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/condition/condition_patient_code_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/condition/condition_patient_onset_date_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/condition/condition_patient_search_test.rb +60 -0
- data/lib/ipa_test_kit/generated/condition/condition_provenance_revinclude_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/condition/condition_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/condition/condition_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/condition/condition_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/condition/metadata.yml +231 -0
- data/lib/ipa_test_kit/generated/condition_group.rb +91 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_id_search_test.rb +40 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_search_test.rb +61 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_status_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_type_period_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_patient_type_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_provenance_revinclude_search_test.rb +50 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/document_reference/document_reference_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/document_reference/metadata.yml +356 -0
- data/lib/ipa_test_kit/generated/document_reference_group.rb +99 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/head_circumference/head_circumference_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/head_circumference/metadata.yml +324 -0
- data/lib/ipa_test_kit/generated/head_circumference_group.rb +93 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/heartrate/heartrate_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/heartrate/metadata.yml +325 -0
- data/lib/ipa_test_kit/generated/heartrate_group.rb +93 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_must_support_test.rb +40 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_patient_date_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_patient_search_test.rb +60 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_patient_status_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_provenance_revinclude_search_test.rb +50 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/immunization/immunization_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/immunization/metadata.yml +210 -0
- data/lib/ipa_test_kit/generated/immunization_group.rb +87 -0
- data/lib/ipa_test_kit/generated/ipa_test_suite.rb +88 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_must_support_test.rb +44 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_authoredon_search_test.rb +53 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_encounter_search_test.rb +52 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_search_test.rb +68 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_status_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_request_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/medication_request/medication_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/medication_request/metadata.yml +307 -0
- data/lib/ipa_test_kit/generated/medication_request_group.rb +92 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_must_support_test.rb +43 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_context_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_effective_search_test.rb +52 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_search_test.rb +68 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_patient_status_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_statement_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/medication_statement/medication_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/medication_statement/metadata.yml +230 -0
- data/lib/ipa_test_kit/generated/medication_statement_group.rb +92 -0
- data/lib/ipa_test_kit/generated/metadata.yml +6230 -0
- data/lib/ipa_test_kit/generated/observation/metadata.yml +1280 -0
- data/lib/ipa_test_kit/generated/observation/observation_must_support_test.rb +41 -0
- data/lib/ipa_test_kit/generated/observation/observation_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/observation/observation_patient_category_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/observation/observation_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/observation/observation_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/observation/observation_patient_code_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/observation/observation_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/observation/observation_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/observation/observation_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/observation/observation_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/observation_group.rb +93 -0
- data/lib/ipa_test_kit/generated/oxygensat/metadata.yml +366 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_must_support_test.rb +65 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/oxygensat/oxygensat_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/oxygensat_group.rb +93 -0
- data/lib/ipa_test_kit/generated/patient/metadata.yml +320 -0
- data/lib/ipa_test_kit/generated/patient/patient_birthdate_family_search_test.rb +41 -0
- data/lib/ipa_test_kit/generated/patient/patient_birthdate_name_search_test.rb +39 -0
- data/lib/ipa_test_kit/generated/patient/patient_family_gender_search_test.rb +41 -0
- data/lib/ipa_test_kit/generated/patient/patient_gender_name_search_test.rb +39 -0
- data/lib/ipa_test_kit/generated/patient/patient_id_search_test.rb +53 -0
- data/lib/ipa_test_kit/generated/patient/patient_identifier_search_test.rb +40 -0
- data/lib/ipa_test_kit/generated/patient/patient_must_support_test.rb +57 -0
- data/lib/ipa_test_kit/generated/patient/patient_name_search_test.rb +39 -0
- data/lib/ipa_test_kit/generated/patient/patient_provenance_revinclude_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/patient/patient_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/patient/patient_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/patient/patient_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/patient_group.rb +99 -0
- data/lib/ipa_test_kit/generated/practitioner/metadata.yml +124 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_identifier_search_test.rb +40 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_must_support_test.rb +40 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_name_search_test.rb +49 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/practitioner/practitioner_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/practitioner_group.rb +84 -0
- data/lib/ipa_test_kit/generated/practitioner_role/metadata.yml +141 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_identifier_search_test.rb +40 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_must_support_test.rb +40 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_practitioner_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/practitioner_role/practitioner_role_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/practitioner_role_group.rb +84 -0
- data/lib/ipa_test_kit/generated/provenance/metadata.yml +114 -0
- data/lib/ipa_test_kit/generated/provenance/provenance_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/provenance/provenance_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/provenance/provenance_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/provenance_group.rb +53 -0
- data/lib/ipa_test_kit/generated/resource_list.rb +18 -0
- data/lib/ipa_test_kit/generated/resprate/metadata.yml +325 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_must_support_test.rb +49 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_date_search_test.rb +46 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_search_test.rb +45 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_patient_category_status_search_test.rb +47 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_patient_code_date_search_test.rb +48 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_patient_code_search_test.rb +62 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_provenance_revinclude_search_test.rb +51 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_read_test.rb +24 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_reference_resolution_test.rb +28 -0
- data/lib/ipa_test_kit/generated/resprate/resprate_validation_test.rb +34 -0
- data/lib/ipa_test_kit/generated/resprate_group.rb +93 -0
- data/lib/ipa_test_kit/generator/group_generator.rb +171 -0
- data/lib/ipa_test_kit/generator/group_metadata.rb +98 -0
- data/lib/ipa_test_kit/generator/group_metadata_extractor.rb +278 -0
- data/lib/ipa_test_kit/generator/ig_loader.rb +63 -0
- data/lib/ipa_test_kit/generator/ig_metadata.rb +49 -0
- data/lib/ipa_test_kit/generator/ig_metadata_extractor.rb +56 -0
- data/lib/ipa_test_kit/generator/ig_resources.rb +48 -0
- data/lib/ipa_test_kit/generator/must_support_metadata_extractor.rb +221 -0
- data/lib/ipa_test_kit/generator/must_support_test_generator.rb +86 -0
- data/lib/ipa_test_kit/generator/naming.rb +46 -0
- data/lib/ipa_test_kit/generator/provenance_revinclude_search_test_generator.rb +186 -0
- data/lib/ipa_test_kit/generator/read_test_generator.rb +89 -0
- data/lib/ipa_test_kit/generator/reference_resolution_test_generator.rb +72 -0
- data/lib/ipa_test_kit/generator/resource_list_generator.rb +46 -0
- data/lib/ipa_test_kit/generator/search_definition_metadata_extractor.rb +181 -0
- data/lib/ipa_test_kit/generator/search_metadata_extractor.rb +74 -0
- data/lib/ipa_test_kit/generator/search_test_generator.rb +295 -0
- data/lib/ipa_test_kit/generator/special_cases.rb +16 -0
- data/lib/ipa_test_kit/generator/suite_generator.rb +67 -0
- data/lib/ipa_test_kit/generator/terminology_binding_metadata_extractor.rb +105 -0
- data/lib/ipa_test_kit/generator/validation_test_generator.rb +124 -0
- data/lib/ipa_test_kit/generator.rb +86 -0
- data/lib/ipa_test_kit/igs/package.tgz +0 -0
- data/lib/ipa_test_kit/must_support_test.rb +146 -0
- data/lib/ipa_test_kit/read_test.rb +62 -0
- data/lib/ipa_test_kit/reference_resolution_test.rb +111 -0
- data/lib/ipa_test_kit/request_logger.rb +46 -0
- data/lib/ipa_test_kit/search_test.rb +728 -0
- data/lib/ipa_test_kit/search_test_properties.rb +61 -0
- data/lib/ipa_test_kit/validation_test.rb +48 -0
- data/lib/ipa_test_kit/version.rb +3 -0
- data/lib/ipa_test_kit.rb +2 -0
- metadata +397 -0
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class RespratePatientCategorySearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for Observation search by patient + category'
|
9
|
+
description %(
|
10
|
+
A server SHALL support searching by
|
11
|
+
patient + category on the Observation resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
16
|
+
|
17
|
+
)
|
18
|
+
|
19
|
+
id :ipa_010_resprate_patient_category_search_test
|
20
|
+
input :patient_ids,
|
21
|
+
title: 'Patient IDs',
|
22
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
23
|
+
|
24
|
+
def self.properties
|
25
|
+
@properties ||= SearchTestProperties.new(
|
26
|
+
resource_type: 'Observation',
|
27
|
+
search_param_names: ['patient', 'category'],
|
28
|
+
possible_status_search: true,
|
29
|
+
token_search_params: ['category']
|
30
|
+
)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.metadata
|
34
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:resprate_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
run do
|
42
|
+
run_search_test
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class RespratePatientCategoryStatusSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for Observation search by patient + category + status'
|
9
|
+
description %(
|
10
|
+
A server SHOULD support searching by
|
11
|
+
patient + category + status on the Observation resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
16
|
+
|
17
|
+
)
|
18
|
+
|
19
|
+
id :ipa_010_resprate_patient_category_status_search_test
|
20
|
+
optional
|
21
|
+
|
22
|
+
input :patient_ids,
|
23
|
+
title: 'Patient IDs',
|
24
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
25
|
+
|
26
|
+
def self.properties
|
27
|
+
@properties ||= SearchTestProperties.new(
|
28
|
+
resource_type: 'Observation',
|
29
|
+
search_param_names: ['patient', 'category', 'status'],
|
30
|
+
token_search_params: ['category'],
|
31
|
+
multiple_or_search_params: ['status']
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.metadata
|
36
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
37
|
+
end
|
38
|
+
|
39
|
+
def scratch_resources
|
40
|
+
scratch[:resprate_resources] ||= {}
|
41
|
+
end
|
42
|
+
|
43
|
+
run do
|
44
|
+
run_search_test
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class RespratePatientCodeDateSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for Observation search by patient + code + date'
|
9
|
+
description %(
|
10
|
+
A server SHOULD support searching by
|
11
|
+
patient + code + date on the Observation resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
16
|
+
|
17
|
+
)
|
18
|
+
|
19
|
+
id :ipa_010_resprate_patient_code_date_search_test
|
20
|
+
optional
|
21
|
+
|
22
|
+
input :patient_ids,
|
23
|
+
title: 'Patient IDs',
|
24
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
25
|
+
|
26
|
+
def self.properties
|
27
|
+
@properties ||= SearchTestProperties.new(
|
28
|
+
resource_type: 'Observation',
|
29
|
+
search_param_names: ['patient', 'code', 'date'],
|
30
|
+
possible_status_search: true,
|
31
|
+
token_search_params: ['code'],
|
32
|
+
params_with_comparators: ['date']
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.metadata
|
37
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
38
|
+
end
|
39
|
+
|
40
|
+
def scratch_resources
|
41
|
+
scratch[:resprate_resources] ||= {}
|
42
|
+
end
|
43
|
+
|
44
|
+
run do
|
45
|
+
run_search_test
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class RespratePatientCodeSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for Observation search by patient + code'
|
9
|
+
description %(
|
10
|
+
A server SHALL support searching by
|
11
|
+
patient + code on the Observation resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
This test verifies that the server supports searching by reference using
|
16
|
+
the form `patient=[id]` as well as `patient=Patient/[id]`. The two
|
17
|
+
different forms are expected to return the same number of results. IPA
|
18
|
+
requires that both forms are supported by IPA responders.
|
19
|
+
|
20
|
+
Because this is the first search of the sequence, resources in the
|
21
|
+
response will be used for subsequent tests.
|
22
|
+
|
23
|
+
Additionally, this test will check that GET and POST search methods
|
24
|
+
return the same number of results. Search by POST is required by the
|
25
|
+
FHIR R4 specification, and these tests interpret search by GET as a
|
26
|
+
requirement of IPA v0.1.0.
|
27
|
+
|
28
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
29
|
+
|
30
|
+
)
|
31
|
+
|
32
|
+
id :ipa_010_resprate_patient_code_search_test
|
33
|
+
input :patient_ids,
|
34
|
+
title: 'Patient IDs',
|
35
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
36
|
+
|
37
|
+
def self.properties
|
38
|
+
@properties ||= SearchTestProperties.new(
|
39
|
+
first_search: true,
|
40
|
+
fixed_value_search: true,
|
41
|
+
resource_type: 'Observation',
|
42
|
+
search_param_names: ['patient', 'code'],
|
43
|
+
possible_status_search: true,
|
44
|
+
token_search_params: ['code'],
|
45
|
+
test_reference_variants: true,
|
46
|
+
test_post_search: true
|
47
|
+
)
|
48
|
+
end
|
49
|
+
|
50
|
+
def self.metadata
|
51
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
52
|
+
end
|
53
|
+
|
54
|
+
def scratch_resources
|
55
|
+
scratch[:resprate_resources] ||= {}
|
56
|
+
end
|
57
|
+
|
58
|
+
run do
|
59
|
+
run_search_test
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,51 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class ResprateProvenanceRevincludeSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns Provenance resources from Observation search by patient + code + revInclude:Provenance:target'
|
9
|
+
description %(
|
10
|
+
A server SHALL be capable of supporting _revIncludes:Provenance:target.
|
11
|
+
|
12
|
+
This test will perform a search by patient + code + revInclude:Provenance:target and
|
13
|
+
will pass if a Provenance resource is found in the response.
|
14
|
+
%)
|
15
|
+
|
16
|
+
id :ipa_010_resprate_provenance_revinclude_search_test
|
17
|
+
|
18
|
+
input :patient_ids,
|
19
|
+
title: 'Patient IDs',
|
20
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
21
|
+
|
22
|
+
def properties
|
23
|
+
@properties ||= SearchTestProperties.new(
|
24
|
+
fixed_value_search: true,
|
25
|
+
resource_type: 'Observation',
|
26
|
+
search_param_names: ['patient', 'code'],
|
27
|
+
possible_status_search: true
|
28
|
+
)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.metadata
|
32
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.provenance_metadata
|
36
|
+
@provenance_metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '..', 'provenance', 'metadata.yml')))
|
37
|
+
end
|
38
|
+
|
39
|
+
def scratch_resources
|
40
|
+
scratch[:resprate_resources] ||= {}
|
41
|
+
end
|
42
|
+
|
43
|
+
def scratch_provenance_resources
|
44
|
+
scratch[:provenance_resources] ||= {}
|
45
|
+
end
|
46
|
+
|
47
|
+
run do
|
48
|
+
run_provenance_revinclude_search_test
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative '../../read_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class ResprateReadTest < Inferno::Test
|
5
|
+
include IpaTestKit::ReadTest
|
6
|
+
|
7
|
+
title 'Server returns correct Observation resource from Observation read interaction'
|
8
|
+
description 'A server SHALL support the Observation read interaction.'
|
9
|
+
|
10
|
+
id :ipa_010_resprate_read_test
|
11
|
+
|
12
|
+
def resource_type
|
13
|
+
'Observation'
|
14
|
+
end
|
15
|
+
|
16
|
+
def scratch_resources
|
17
|
+
scratch[:resprate_resources] ||= {}
|
18
|
+
end
|
19
|
+
|
20
|
+
run do
|
21
|
+
perform_read_test(all_scratch_resources)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../../reference_resolution_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class ResprateReferenceResolutionTest < Inferno::Test
|
5
|
+
include IpaTestKit::ReferenceResolutionTest
|
6
|
+
|
7
|
+
title 'Every reference within Observation resources can be read'
|
8
|
+
description %(
|
9
|
+
This test will attempt to read the first 50 references found in the
|
10
|
+
resources from the first search. The test will fail if Inferno fails to
|
11
|
+
read any of those references.
|
12
|
+
)
|
13
|
+
|
14
|
+
id :ipa_010_resprate_reference_resolution_test
|
15
|
+
|
16
|
+
def resource_type
|
17
|
+
'Observation'
|
18
|
+
end
|
19
|
+
|
20
|
+
def scratch_resources
|
21
|
+
scratch[:resprate_resources] ||= {}
|
22
|
+
end
|
23
|
+
|
24
|
+
run do
|
25
|
+
perform_reference_resolution_test(scratch_resources[:all])
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require_relative '../../validation_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class ResprateValidationTest < Inferno::Test
|
5
|
+
include IpaTestKit::ValidationTest
|
6
|
+
|
7
|
+
id :ipa_010_resprate_validation_test
|
8
|
+
title 'Observation resources returned during previous tests conform to the Observation Respiratory Rate Profile'
|
9
|
+
description %(
|
10
|
+
This test verifies resources returned from the first search conform to
|
11
|
+
the [Observation Respiratory Rate Profile](http://hl7.org/fhir/StructureDefinition/resprate).
|
12
|
+
|
13
|
+
It verifies the presence of mandatory elements and that elements with
|
14
|
+
required bindings contain appropriate values. CodeableConcept element
|
15
|
+
bindings will fail if none of their codings have a code/system belonging
|
16
|
+
to the bound ValueSet. Quantity, Coding, and code element bindings will
|
17
|
+
fail if their code/system are not found in the valueset.
|
18
|
+
|
19
|
+
)
|
20
|
+
output :dar_code_found, :dar_extension_found
|
21
|
+
|
22
|
+
def resource_type
|
23
|
+
'Observation'
|
24
|
+
end
|
25
|
+
|
26
|
+
def scratch_resources
|
27
|
+
scratch[:resprate_resources] ||= {}
|
28
|
+
end
|
29
|
+
|
30
|
+
run do
|
31
|
+
perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/StructureDefinition/resprate')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require_relative 'resprate/resprate_patient_code_search_test'
|
2
|
+
require_relative 'resprate/resprate_patient_category_date_search_test'
|
3
|
+
require_relative 'resprate/resprate_patient_category_status_search_test'
|
4
|
+
require_relative 'resprate/resprate_patient_code_date_search_test'
|
5
|
+
require_relative 'resprate/resprate_patient_category_search_test'
|
6
|
+
require_relative 'resprate/resprate_read_test'
|
7
|
+
require_relative 'resprate/resprate_provenance_revinclude_search_test'
|
8
|
+
require_relative 'resprate/resprate_validation_test'
|
9
|
+
require_relative 'resprate/resprate_must_support_test'
|
10
|
+
require_relative 'resprate/resprate_reference_resolution_test'
|
11
|
+
|
12
|
+
module IpaTestKit
|
13
|
+
class ResprateGroup < Inferno::TestGroup
|
14
|
+
title 'Observation Respiratory Rate Tests'
|
15
|
+
short_description 'Verify support for the server capabilities required by the Observation Respiratory Rate Profile.'
|
16
|
+
description %(
|
17
|
+
# Background
|
18
|
+
|
19
|
+
The IPA Observation Respiratory Rate sequence verifies that the system under test is
|
20
|
+
able to provide correct responses for Observation queries. These queries
|
21
|
+
must contain resources conforming to the Observation Respiratory Rate Profile as
|
22
|
+
specified in the IPA v0.1.0 Implementation Guide.
|
23
|
+
|
24
|
+
# Testing Methodology
|
25
|
+
## Searching
|
26
|
+
This test sequence will first perform each required search associated
|
27
|
+
with this resource. This sequence will perform searches with the
|
28
|
+
following parameters:
|
29
|
+
|
30
|
+
* patient + code
|
31
|
+
* patient + category + date
|
32
|
+
* patient + category
|
33
|
+
|
34
|
+
### Search Parameters
|
35
|
+
The first search uses the selected patient(s) from the prior launch
|
36
|
+
sequence. Any subsequent searches will look for its parameter values
|
37
|
+
from the results of the first search. For example, the `identifier`
|
38
|
+
search in the patient sequence is performed by looking for an existing
|
39
|
+
`Patient.identifier` from any of the resources returned in the `_id`
|
40
|
+
search. If a value cannot be found this way, the search is skipped.
|
41
|
+
|
42
|
+
### Search Validation
|
43
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
44
|
+
Observation resources and save them for subsequent tests. Each of
|
45
|
+
these resources is then checked to see if it matches the searched
|
46
|
+
parameters in accordance with [FHIR search
|
47
|
+
guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
|
48
|
+
for example, if a Patient search for `gender=male` returns a `female`
|
49
|
+
patient.
|
50
|
+
|
51
|
+
|
52
|
+
## Must Support
|
53
|
+
Each profile contains elements marked as "must support". This test
|
54
|
+
sequence expects to see each of these elements at least once. If at
|
55
|
+
least one cannot be found, the test will fail. The test will look
|
56
|
+
through the Observation resources found in the first test for these
|
57
|
+
elements.
|
58
|
+
|
59
|
+
## Profile Validation
|
60
|
+
Each resource returned from the first search is expected to conform to
|
61
|
+
the [Observation Respiratory Rate Profile](http://hl7.org/fhir/StructureDefinition/resprate). Each element is checked against
|
62
|
+
teminology binding and cardinality requirements.
|
63
|
+
|
64
|
+
Elements with a required binding are validated against their bound
|
65
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
66
|
+
then the test will fail.
|
67
|
+
|
68
|
+
## Reference Validation
|
69
|
+
Each reference within the resources found from the previous tests must
|
70
|
+
resolve. The test will attempt to read each reference found and will
|
71
|
+
fail if any attempted read fails.
|
72
|
+
|
73
|
+
)
|
74
|
+
|
75
|
+
id :ipa_010_resprate
|
76
|
+
run_as_group
|
77
|
+
|
78
|
+
def self.metadata
|
79
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'resprate', 'metadata.yml')))
|
80
|
+
end
|
81
|
+
|
82
|
+
test from: :ipa_010_resprate_patient_code_search_test
|
83
|
+
test from: :ipa_010_resprate_patient_category_date_search_test
|
84
|
+
test from: :ipa_010_resprate_patient_category_status_search_test
|
85
|
+
test from: :ipa_010_resprate_patient_code_date_search_test
|
86
|
+
test from: :ipa_010_resprate_patient_category_search_test
|
87
|
+
test from: :ipa_010_resprate_read_test
|
88
|
+
test from: :ipa_010_resprate_provenance_revinclude_search_test
|
89
|
+
test from: :ipa_010_resprate_validation_test
|
90
|
+
test from: :ipa_010_resprate_must_support_test
|
91
|
+
test from: :ipa_010_resprate_reference_resolution_test
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
require_relative 'naming'
|
2
|
+
require_relative 'special_cases'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class Generator
|
6
|
+
class GroupGenerator
|
7
|
+
class << self
|
8
|
+
def generate(ig_metadata)
|
9
|
+
ig_metadata.ordered_groups
|
10
|
+
.reject { |group| SpecialCases.exclude_resource? group.resource }
|
11
|
+
.each { |group| new(group).generate }
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
attr_accessor :group_metadata
|
16
|
+
|
17
|
+
def initialize(group_metadata)
|
18
|
+
self.group_metadata = group_metadata
|
19
|
+
end
|
20
|
+
|
21
|
+
def template
|
22
|
+
@template ||= File.read(File.join(__dir__, 'templates', 'group.rb.erb'))
|
23
|
+
end
|
24
|
+
|
25
|
+
def output
|
26
|
+
@output ||= ERB.new(template).result(binding)
|
27
|
+
end
|
28
|
+
|
29
|
+
def base_output_file_name
|
30
|
+
"#{class_name.underscore}.rb"
|
31
|
+
end
|
32
|
+
|
33
|
+
def base_metadata_file_name
|
34
|
+
"metadata.yml"
|
35
|
+
end
|
36
|
+
|
37
|
+
def class_name
|
38
|
+
"#{Naming.upper_camel_case_for_profile(group_metadata)}Group"
|
39
|
+
end
|
40
|
+
|
41
|
+
def title
|
42
|
+
group_metadata.title
|
43
|
+
end
|
44
|
+
|
45
|
+
def short_description
|
46
|
+
group_metadata.short_description
|
47
|
+
end
|
48
|
+
|
49
|
+
def output_file_name
|
50
|
+
File.join(__dir__, '..', 'generated', base_output_file_name)
|
51
|
+
end
|
52
|
+
|
53
|
+
def metadata_file_name
|
54
|
+
File.join(__dir__, '..', 'generated', profile_identifier, base_metadata_file_name)
|
55
|
+
end
|
56
|
+
|
57
|
+
def profile_identifier
|
58
|
+
Naming.snake_case_for_profile(group_metadata)
|
59
|
+
end
|
60
|
+
|
61
|
+
def group_id
|
62
|
+
"ipa_010_#{profile_identifier}"
|
63
|
+
end
|
64
|
+
|
65
|
+
def resource_type
|
66
|
+
group_metadata.resource
|
67
|
+
end
|
68
|
+
|
69
|
+
def profile_name
|
70
|
+
group_metadata.profile_name
|
71
|
+
end
|
72
|
+
|
73
|
+
def profile_url
|
74
|
+
group_metadata.profile_url
|
75
|
+
end
|
76
|
+
|
77
|
+
def generate
|
78
|
+
File.open(output_file_name, 'w') { |f| f.write(output) }
|
79
|
+
group_metadata.id = group_id
|
80
|
+
group_metadata.file_name = base_output_file_name
|
81
|
+
File.open(metadata_file_name, 'w') { |f| f.write(YAML.dump(group_metadata.to_hash)) }
|
82
|
+
end
|
83
|
+
|
84
|
+
def test_id_list
|
85
|
+
@test_id_list ||=
|
86
|
+
group_metadata.tests.map { |test| test[:id] }
|
87
|
+
end
|
88
|
+
|
89
|
+
def test_file_list
|
90
|
+
@test_file_list ||=
|
91
|
+
group_metadata.tests.map { |test| test[:file_name].delete_suffix('.rb') }
|
92
|
+
end
|
93
|
+
|
94
|
+
def required_searches
|
95
|
+
group_metadata.searches.select { |search| search[:expectation] == 'SHALL' }
|
96
|
+
end
|
97
|
+
|
98
|
+
def search_param_name_string
|
99
|
+
required_searches
|
100
|
+
.map { |search| search[:names].join(' + ') }
|
101
|
+
.map { |names| "* #{names}" }
|
102
|
+
.join("\n")
|
103
|
+
end
|
104
|
+
|
105
|
+
def search_description
|
106
|
+
return '' if required_searches.blank?
|
107
|
+
|
108
|
+
<<~SEARCH_DESCRIPTION
|
109
|
+
## Searching
|
110
|
+
This test sequence will first perform each required search associated
|
111
|
+
with this resource. This sequence will perform searches with the
|
112
|
+
following parameters:
|
113
|
+
|
114
|
+
#{search_param_name_string}
|
115
|
+
|
116
|
+
### Search Parameters
|
117
|
+
The first search uses the selected patient(s) from the prior launch
|
118
|
+
sequence. Any subsequent searches will look for its parameter values
|
119
|
+
from the results of the first search. For example, the `identifier`
|
120
|
+
search in the patient sequence is performed by looking for an existing
|
121
|
+
`Patient.identifier` from any of the resources returned in the `_id`
|
122
|
+
search. If a value cannot be found this way, the search is skipped.
|
123
|
+
|
124
|
+
### Search Validation
|
125
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
126
|
+
#{resource_type} resources and save them for subsequent tests. Each of
|
127
|
+
these resources is then checked to see if it matches the searched
|
128
|
+
parameters in accordance with [FHIR search
|
129
|
+
guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
|
130
|
+
for example, if a Patient search for `gender=male` returns a `female`
|
131
|
+
patient.
|
132
|
+
SEARCH_DESCRIPTION
|
133
|
+
end
|
134
|
+
|
135
|
+
def description
|
136
|
+
<<~DESCRIPTION
|
137
|
+
# Background
|
138
|
+
|
139
|
+
The IPA #{title} sequence verifies that the system under test is
|
140
|
+
able to provide correct responses for #{resource_type} queries. These queries
|
141
|
+
must contain resources conforming to the #{profile_name} as
|
142
|
+
specified in the IPA v0.1.0 Implementation Guide.
|
143
|
+
|
144
|
+
# Testing Methodology
|
145
|
+
#{search_description}
|
146
|
+
|
147
|
+
## Must Support
|
148
|
+
Each profile contains elements marked as "must support". This test
|
149
|
+
sequence expects to see each of these elements at least once. If at
|
150
|
+
least one cannot be found, the test will fail. The test will look
|
151
|
+
through the #{resource_type} resources found in the first test for these
|
152
|
+
elements.
|
153
|
+
|
154
|
+
## Profile Validation
|
155
|
+
Each resource returned from the first search is expected to conform to
|
156
|
+
the [#{profile_name}](#{profile_url}). Each element is checked against
|
157
|
+
teminology binding and cardinality requirements.
|
158
|
+
|
159
|
+
Elements with a required binding are validated against their bound
|
160
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
161
|
+
then the test will fail.
|
162
|
+
|
163
|
+
## Reference Validation
|
164
|
+
Each reference within the resources found from the previous tests must
|
165
|
+
resolve. The test will attempt to read each reference found and will
|
166
|
+
fail if any attempted read fails.
|
167
|
+
DESCRIPTION
|
168
|
+
end
|
169
|
+
end
|
170
|
+
end
|
171
|
+
end
|