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,40 @@
|
|
1
|
+
require_relative '../../must_support_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class AllergyIntoleranceMustSupportTest < Inferno::Test
|
5
|
+
include IpaTestKit::MustSupportTest
|
6
|
+
|
7
|
+
title 'All must support elements are provided in the AllergyIntolerance resources returned'
|
8
|
+
description %(
|
9
|
+
IPA Responders SHALL be capable of populating all data elements as
|
10
|
+
part of the query results as specified by the IPA Server Capability
|
11
|
+
Statement. This test will look through the AllergyIntolerance resources
|
12
|
+
found previously for the following must support elements:
|
13
|
+
|
14
|
+
* AllergyIntolerance.clinicalStatus
|
15
|
+
* AllergyIntolerance.code
|
16
|
+
* AllergyIntolerance.patient
|
17
|
+
* AllergyIntolerance.reaction
|
18
|
+
* AllergyIntolerance.reaction.manifestation
|
19
|
+
* AllergyIntolerance.verificationStatus
|
20
|
+
)
|
21
|
+
|
22
|
+
id :ipa_010_allergy_intolerance_must_support_test
|
23
|
+
|
24
|
+
def resource_type
|
25
|
+
'AllergyIntolerance'
|
26
|
+
end
|
27
|
+
|
28
|
+
def self.metadata
|
29
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
30
|
+
end
|
31
|
+
|
32
|
+
def scratch_resources
|
33
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
34
|
+
end
|
35
|
+
|
36
|
+
run do
|
37
|
+
perform_must_support_test(all_scratch_resources)
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class AllergyIntolerancePatientClinicalStatusSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for AllergyIntolerance search by patient + clinical-status'
|
9
|
+
description %(
|
10
|
+
A server SHOULD support searching by
|
11
|
+
patient + clinical-status on the AllergyIntolerance 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_allergy_intolerance_patient_clinical_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: 'AllergyIntolerance',
|
29
|
+
search_param_names: ['patient', 'clinical-status'],
|
30
|
+
token_search_params: ['clinical-status']
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.metadata
|
35
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
36
|
+
end
|
37
|
+
|
38
|
+
def scratch_resources
|
39
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
40
|
+
end
|
41
|
+
|
42
|
+
run do
|
43
|
+
run_search_test
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_patient_search_test.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class AllergyIntolerancePatientSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for AllergyIntolerance search by patient'
|
9
|
+
description %(
|
10
|
+
A server SHALL support searching by
|
11
|
+
patient on the AllergyIntolerance 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_allergy_intolerance_patient_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
|
+
resource_type: 'AllergyIntolerance',
|
41
|
+
search_param_names: ['patient'],
|
42
|
+
possible_status_search: true,
|
43
|
+
test_reference_variants: true,
|
44
|
+
test_post_search: true
|
45
|
+
)
|
46
|
+
end
|
47
|
+
|
48
|
+
def self.metadata
|
49
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
50
|
+
end
|
51
|
+
|
52
|
+
def scratch_resources
|
53
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
54
|
+
end
|
55
|
+
|
56
|
+
run do
|
57
|
+
run_search_test
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class AllergyIntoleranceProvenanceRevincludeSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns Provenance resources from AllergyIntolerance search by patient + 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 + revInclude:Provenance:target and
|
13
|
+
will pass if a Provenance resource is found in the response.
|
14
|
+
%)
|
15
|
+
|
16
|
+
id :ipa_010_allergy_intolerance_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
|
+
resource_type: 'AllergyIntolerance',
|
25
|
+
search_param_names: ['patient']
|
26
|
+
)
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.metadata
|
30
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.provenance_metadata
|
34
|
+
@provenance_metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, '..', 'provenance', 'metadata.yml')))
|
35
|
+
end
|
36
|
+
|
37
|
+
def scratch_resources
|
38
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
def scratch_provenance_resources
|
42
|
+
scratch[:provenance_resources] ||= {}
|
43
|
+
end
|
44
|
+
|
45
|
+
run do
|
46
|
+
run_provenance_revinclude_search_test
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
require_relative '../../read_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class AllergyIntoleranceReadTest < Inferno::Test
|
5
|
+
include IpaTestKit::ReadTest
|
6
|
+
|
7
|
+
title 'Server returns correct AllergyIntolerance resource from AllergyIntolerance read interaction'
|
8
|
+
description 'A server SHALL support the AllergyIntolerance read interaction.'
|
9
|
+
|
10
|
+
id :ipa_010_allergy_intolerance_read_test
|
11
|
+
|
12
|
+
def resource_type
|
13
|
+
'AllergyIntolerance'
|
14
|
+
end
|
15
|
+
|
16
|
+
def scratch_resources
|
17
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
18
|
+
end
|
19
|
+
|
20
|
+
run do
|
21
|
+
perform_read_test(all_scratch_resources)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/ipa_test_kit/generated/allergy_intolerance/allergy_intolerance_reference_resolution_test.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require_relative '../../reference_resolution_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class AllergyIntoleranceReferenceResolutionTest < Inferno::Test
|
5
|
+
include IpaTestKit::ReferenceResolutionTest
|
6
|
+
|
7
|
+
title 'Every reference within AllergyIntolerance 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_allergy_intolerance_reference_resolution_test
|
15
|
+
|
16
|
+
def resource_type
|
17
|
+
'AllergyIntolerance'
|
18
|
+
end
|
19
|
+
|
20
|
+
def scratch_resources
|
21
|
+
scratch[:allergy_intolerance_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 AllergyIntoleranceValidationTest < Inferno::Test
|
5
|
+
include IpaTestKit::ValidationTest
|
6
|
+
|
7
|
+
id :ipa_010_allergy_intolerance_validation_test
|
8
|
+
title 'AllergyIntolerance resources returned during previous tests conform to the IPA AllergyIntolerance Profile'
|
9
|
+
description %(
|
10
|
+
This test verifies resources returned from the first search conform to
|
11
|
+
the [IPA AllergyIntolerance Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-allergyintolerance).
|
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
|
+
'AllergyIntolerance'
|
24
|
+
end
|
25
|
+
|
26
|
+
def scratch_resources
|
27
|
+
scratch[:allergy_intolerance_resources] ||= {}
|
28
|
+
end
|
29
|
+
|
30
|
+
run do
|
31
|
+
perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-allergyintolerance')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,165 @@
|
|
1
|
+
---
|
2
|
+
:name: ipa_allergyintolerance
|
3
|
+
:class_name: Ipav010AllergyintoleranceSequence
|
4
|
+
:version: v0.1.0
|
5
|
+
:reformatted_version: v010
|
6
|
+
:resource: AllergyIntolerance
|
7
|
+
:profile_url: http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-allergyintolerance
|
8
|
+
:profile_name: IPA AllergyIntolerance Profile
|
9
|
+
:title: AllergyIntolerance
|
10
|
+
:short_description: Verify support for the server capabilities required by the IPA
|
11
|
+
AllergyIntolerance Profile.
|
12
|
+
:interactions:
|
13
|
+
- :code: create
|
14
|
+
:expectation: MAY
|
15
|
+
- :code: search-type
|
16
|
+
:expectation: SHALL
|
17
|
+
- :code: read
|
18
|
+
:expectation: SHALL
|
19
|
+
- :code: vread
|
20
|
+
:expectation: SHOULD
|
21
|
+
- :code: update
|
22
|
+
:expectation: MAY
|
23
|
+
- :code: patch
|
24
|
+
:expectation: MAY
|
25
|
+
- :code: delete
|
26
|
+
:expectation: MAY
|
27
|
+
- :code: history-instance
|
28
|
+
:expectation: SHOULD
|
29
|
+
- :code: history-type
|
30
|
+
:expectation: MAY
|
31
|
+
:operations: []
|
32
|
+
:searches:
|
33
|
+
- :names:
|
34
|
+
- patient
|
35
|
+
:expectation: SHALL
|
36
|
+
:names_not_must_support_or_mandatory: []
|
37
|
+
:must_support_or_mandatory: true
|
38
|
+
- :expectation: SHOULD
|
39
|
+
:names:
|
40
|
+
- patient
|
41
|
+
- clinical-status
|
42
|
+
:names_not_must_support_or_mandatory: []
|
43
|
+
:must_support_or_mandatory: true
|
44
|
+
:search_definitions:
|
45
|
+
:patient:
|
46
|
+
:path: patient
|
47
|
+
:full_path: AllergyIntolerance.patient
|
48
|
+
:comparators: {}
|
49
|
+
:values: []
|
50
|
+
:type: Reference
|
51
|
+
:contains_multiple: false
|
52
|
+
:multiple_or: MAY
|
53
|
+
:clinical-status:
|
54
|
+
:path: clinicalStatus
|
55
|
+
:full_path: AllergyIntolerance.clinicalStatus
|
56
|
+
:comparators: {}
|
57
|
+
:values:
|
58
|
+
- active
|
59
|
+
- inactive
|
60
|
+
- resolved
|
61
|
+
:type: CodeableConcept
|
62
|
+
:contains_multiple: false
|
63
|
+
:multiple_or: MAY
|
64
|
+
:include_params: []
|
65
|
+
:revincludes:
|
66
|
+
- Provenance:target
|
67
|
+
:required_concepts:
|
68
|
+
- clinicalStatus
|
69
|
+
- verificationStatus
|
70
|
+
:must_supports:
|
71
|
+
:extensions: []
|
72
|
+
:slices: []
|
73
|
+
:elements:
|
74
|
+
- :path: clinicalStatus
|
75
|
+
- :path: verificationStatus
|
76
|
+
- :path: code
|
77
|
+
- :path: patient
|
78
|
+
- :path: reaction
|
79
|
+
- :path: reaction.manifestation
|
80
|
+
:mandatory_elements:
|
81
|
+
- AllergyIntolerance.code
|
82
|
+
- AllergyIntolerance.patient
|
83
|
+
- AllergyIntolerance.reaction.manifestation
|
84
|
+
:bindings:
|
85
|
+
- :type: code
|
86
|
+
:strength: preferred
|
87
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
88
|
+
:path: language
|
89
|
+
- :type: CodeableConcept
|
90
|
+
:strength: required
|
91
|
+
:system: http://hl7.org/fhir/ValueSet/allergyintolerance-clinical
|
92
|
+
:path: clinicalStatus
|
93
|
+
- :type: CodeableConcept
|
94
|
+
:strength: required
|
95
|
+
:system: http://hl7.org/fhir/ValueSet/allergyintolerance-verification
|
96
|
+
:path: verificationStatus
|
97
|
+
- :type: code
|
98
|
+
:strength: required
|
99
|
+
:system: http://hl7.org/fhir/ValueSet/allergy-intolerance-type
|
100
|
+
:path: type
|
101
|
+
- :type: code
|
102
|
+
:strength: required
|
103
|
+
:system: http://hl7.org/fhir/ValueSet/allergy-intolerance-category
|
104
|
+
:path: category
|
105
|
+
- :type: code
|
106
|
+
:strength: required
|
107
|
+
:system: http://hl7.org/fhir/ValueSet/allergy-intolerance-criticality
|
108
|
+
:path: criticality
|
109
|
+
- :type: CodeableConcept
|
110
|
+
:strength: extensible
|
111
|
+
:system: http://hl7.org/fhir/uv/ipa/ValueSet/ipa-allergy-substance
|
112
|
+
:path: code
|
113
|
+
- :type: CodeableConcept
|
114
|
+
:strength: example
|
115
|
+
:system: http://hl7.org/fhir/ValueSet/substance-code
|
116
|
+
:path: reaction.substance
|
117
|
+
- :type: CodeableConcept
|
118
|
+
:strength: extensible
|
119
|
+
:system: http://hl7.org/fhir/ValueSet/clinical-findings
|
120
|
+
:path: reaction.manifestation
|
121
|
+
- :type: code
|
122
|
+
:strength: required
|
123
|
+
:system: http://hl7.org/fhir/ValueSet/reaction-event-severity
|
124
|
+
:path: reaction.severity
|
125
|
+
- :type: CodeableConcept
|
126
|
+
:strength: example
|
127
|
+
:system: http://hl7.org/fhir/ValueSet/route-codes
|
128
|
+
:path: reaction.exposureRoute
|
129
|
+
:references:
|
130
|
+
- :path: AllergyIntolerance.patient
|
131
|
+
:profiles:
|
132
|
+
- http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-patient
|
133
|
+
- :path: AllergyIntolerance.encounter
|
134
|
+
:profiles:
|
135
|
+
- http://hl7.org/fhir/StructureDefinition/Encounter
|
136
|
+
- :path: AllergyIntolerance.recorder
|
137
|
+
:profiles:
|
138
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
139
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
140
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
141
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
142
|
+
- :path: AllergyIntolerance.asserter
|
143
|
+
:profiles:
|
144
|
+
- http://hl7.org/fhir/StructureDefinition/Patient
|
145
|
+
- http://hl7.org/fhir/StructureDefinition/RelatedPerson
|
146
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
147
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
148
|
+
:tests:
|
149
|
+
- :id: ipa_010_allergy_intolerance_patient_search_test
|
150
|
+
:file_name: allergy_intolerance_patient_search_test.rb
|
151
|
+
- :id: ipa_010_allergy_intolerance_patient_clinical_status_search_test
|
152
|
+
:file_name: allergy_intolerance_patient_clinical_status_search_test.rb
|
153
|
+
- :id: ipa_010_allergy_intolerance_read_test
|
154
|
+
:file_name: allergy_intolerance_read_test.rb
|
155
|
+
- :id: ipa_010_allergy_intolerance_provenance_revinclude_search_test
|
156
|
+
:file_name: allergy_intolerance_provenance_revinclude_search_test.rb
|
157
|
+
- :id: ipa_010_allergy_intolerance_validation_test
|
158
|
+
:file_name: allergy_intolerance_validation_test.rb
|
159
|
+
- :id: ipa_010_allergy_intolerance_must_support_test
|
160
|
+
:file_name: allergy_intolerance_must_support_test.rb
|
161
|
+
- :id: ipa_010_allergy_intolerance_reference_resolution_test
|
162
|
+
:file_name: allergy_intolerance_reference_resolution_test.rb
|
163
|
+
:id: ipa_010_allergy_intolerance
|
164
|
+
:file_name: allergy_intolerance_group.rb
|
165
|
+
:delayed_references: []
|
@@ -0,0 +1,85 @@
|
|
1
|
+
require_relative 'allergy_intolerance/allergy_intolerance_patient_search_test'
|
2
|
+
require_relative 'allergy_intolerance/allergy_intolerance_patient_clinical_status_search_test'
|
3
|
+
require_relative 'allergy_intolerance/allergy_intolerance_read_test'
|
4
|
+
require_relative 'allergy_intolerance/allergy_intolerance_provenance_revinclude_search_test'
|
5
|
+
require_relative 'allergy_intolerance/allergy_intolerance_validation_test'
|
6
|
+
require_relative 'allergy_intolerance/allergy_intolerance_must_support_test'
|
7
|
+
require_relative 'allergy_intolerance/allergy_intolerance_reference_resolution_test'
|
8
|
+
|
9
|
+
module IpaTestKit
|
10
|
+
class AllergyIntoleranceGroup < Inferno::TestGroup
|
11
|
+
title 'AllergyIntolerance Tests'
|
12
|
+
short_description 'Verify support for the server capabilities required by the IPA AllergyIntolerance Profile.'
|
13
|
+
description %(
|
14
|
+
# Background
|
15
|
+
|
16
|
+
The IPA AllergyIntolerance sequence verifies that the system under test is
|
17
|
+
able to provide correct responses for AllergyIntolerance queries. These queries
|
18
|
+
must contain resources conforming to the IPA AllergyIntolerance Profile as
|
19
|
+
specified in the IPA v0.1.0 Implementation Guide.
|
20
|
+
|
21
|
+
# Testing Methodology
|
22
|
+
## Searching
|
23
|
+
This test sequence will first perform each required search associated
|
24
|
+
with this resource. This sequence will perform searches with the
|
25
|
+
following parameters:
|
26
|
+
|
27
|
+
* patient
|
28
|
+
|
29
|
+
### Search Parameters
|
30
|
+
The first search uses the selected patient(s) from the prior launch
|
31
|
+
sequence. Any subsequent searches will look for its parameter values
|
32
|
+
from the results of the first search. For example, the `identifier`
|
33
|
+
search in the patient sequence is performed by looking for an existing
|
34
|
+
`Patient.identifier` from any of the resources returned in the `_id`
|
35
|
+
search. If a value cannot be found this way, the search is skipped.
|
36
|
+
|
37
|
+
### Search Validation
|
38
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
39
|
+
AllergyIntolerance resources and save them for subsequent tests. Each of
|
40
|
+
these resources is then checked to see if it matches the searched
|
41
|
+
parameters in accordance with [FHIR search
|
42
|
+
guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
|
43
|
+
for example, if a Patient search for `gender=male` returns a `female`
|
44
|
+
patient.
|
45
|
+
|
46
|
+
|
47
|
+
## Must Support
|
48
|
+
Each profile contains elements marked as "must support". This test
|
49
|
+
sequence expects to see each of these elements at least once. If at
|
50
|
+
least one cannot be found, the test will fail. The test will look
|
51
|
+
through the AllergyIntolerance resources found in the first test for these
|
52
|
+
elements.
|
53
|
+
|
54
|
+
## Profile Validation
|
55
|
+
Each resource returned from the first search is expected to conform to
|
56
|
+
the [IPA AllergyIntolerance Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-allergyintolerance). Each element is checked against
|
57
|
+
teminology binding and cardinality requirements.
|
58
|
+
|
59
|
+
Elements with a required binding are validated against their bound
|
60
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
61
|
+
then the test will fail.
|
62
|
+
|
63
|
+
## Reference Validation
|
64
|
+
Each reference within the resources found from the previous tests must
|
65
|
+
resolve. The test will attempt to read each reference found and will
|
66
|
+
fail if any attempted read fails.
|
67
|
+
|
68
|
+
)
|
69
|
+
|
70
|
+
id :ipa_010_allergy_intolerance
|
71
|
+
run_as_group
|
72
|
+
|
73
|
+
def self.metadata
|
74
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'allergy_intolerance', 'metadata.yml')))
|
75
|
+
end
|
76
|
+
|
77
|
+
test from: :ipa_010_allergy_intolerance_patient_search_test
|
78
|
+
test from: :ipa_010_allergy_intolerance_patient_clinical_status_search_test
|
79
|
+
test from: :ipa_010_allergy_intolerance_read_test
|
80
|
+
test from: :ipa_010_allergy_intolerance_provenance_revinclude_search_test
|
81
|
+
test from: :ipa_010_allergy_intolerance_validation_test
|
82
|
+
test from: :ipa_010_allergy_intolerance_must_support_test
|
83
|
+
test from: :ipa_010_allergy_intolerance_reference_resolution_test
|
84
|
+
end
|
85
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require_relative '../../must_support_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class BmiMustSupportTest < Inferno::Test
|
5
|
+
include IpaTestKit::MustSupportTest
|
6
|
+
|
7
|
+
title 'All must support elements are provided in the Observation resources returned'
|
8
|
+
description %(
|
9
|
+
IPA Responders SHALL be capable of populating all data elements as
|
10
|
+
part of the query results as specified by the IPA Server Capability
|
11
|
+
Statement. This test will look through the Observation resources
|
12
|
+
found previously for the following must support elements:
|
13
|
+
|
14
|
+
* Observation.category
|
15
|
+
* Observation.category.coding
|
16
|
+
* Observation.category.coding.code
|
17
|
+
* Observation.category.coding.system
|
18
|
+
* Observation.category:VSCat
|
19
|
+
* Observation.code.coding.code
|
20
|
+
* Observation.effective[x]
|
21
|
+
* Observation.status
|
22
|
+
* Observation.subject
|
23
|
+
* Observation.value[x]
|
24
|
+
* Observation.value[x].code
|
25
|
+
* Observation.value[x].system
|
26
|
+
* Observation.value[x].unit
|
27
|
+
* Observation.value[x].value
|
28
|
+
* Observation.value[x]:valueQuantity
|
29
|
+
)
|
30
|
+
|
31
|
+
id :ipa_010_bmi_must_support_test
|
32
|
+
|
33
|
+
def resource_type
|
34
|
+
'Observation'
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.metadata
|
38
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
39
|
+
end
|
40
|
+
|
41
|
+
def scratch_resources
|
42
|
+
scratch[:bmi_resources] ||= {}
|
43
|
+
end
|
44
|
+
|
45
|
+
run do
|
46
|
+
perform_must_support_test(all_scratch_resources)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class BmiPatientCategoryDateSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for Observation search by patient + category + date'
|
9
|
+
description %(
|
10
|
+
A server SHALL support searching by
|
11
|
+
patient + category + 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_bmi_patient_category_date_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', 'date'],
|
28
|
+
possible_status_search: true,
|
29
|
+
token_search_params: ['category'],
|
30
|
+
params_with_comparators: ['date']
|
31
|
+
)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.metadata
|
35
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
36
|
+
end
|
37
|
+
|
38
|
+
def scratch_resources
|
39
|
+
scratch[:bmi_resources] ||= {}
|
40
|
+
end
|
41
|
+
|
42
|
+
run do
|
43
|
+
run_search_test
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class BmiPatientCategorySearchTest < 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_bmi_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[:bmi_resources] ||= {}
|
39
|
+
end
|
40
|
+
|
41
|
+
run do
|
42
|
+
run_search_test
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|