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,28 @@
|
|
1
|
+
require_relative '../../reference_resolution_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class ImmunizationReferenceResolutionTest < Inferno::Test
|
5
|
+
include IpaTestKit::ReferenceResolutionTest
|
6
|
+
|
7
|
+
title 'Every reference within Immunization 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_immunization_reference_resolution_test
|
15
|
+
|
16
|
+
def resource_type
|
17
|
+
'Immunization'
|
18
|
+
end
|
19
|
+
|
20
|
+
def scratch_resources
|
21
|
+
scratch[:immunization_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 ImmunizationValidationTest < Inferno::Test
|
5
|
+
include IpaTestKit::ValidationTest
|
6
|
+
|
7
|
+
id :ipa_010_immunization_validation_test
|
8
|
+
title 'Immunization resources returned during previous tests conform to the IPA Immunization Profile'
|
9
|
+
description %(
|
10
|
+
This test verifies resources returned from the first search conform to
|
11
|
+
the [IPA Immunization Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-immunization).
|
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
|
+
'Immunization'
|
24
|
+
end
|
25
|
+
|
26
|
+
def scratch_resources
|
27
|
+
scratch[:immunization_resources] ||= {}
|
28
|
+
end
|
29
|
+
|
30
|
+
run do
|
31
|
+
perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-immunization')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,210 @@
|
|
1
|
+
---
|
2
|
+
:name: ipa_immunization
|
3
|
+
:class_name: Ipav010ImmunizationSequence
|
4
|
+
:version: v0.1.0
|
5
|
+
:reformatted_version: v010
|
6
|
+
:resource: Immunization
|
7
|
+
:profile_url: http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-immunization
|
8
|
+
:profile_name: IPA Immunization Profile
|
9
|
+
:title: Immunization
|
10
|
+
:short_description: Verify support for the server capabilities required by the IPA
|
11
|
+
Immunization 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
|
+
- date
|
42
|
+
:names_not_must_support_or_mandatory: []
|
43
|
+
:must_support_or_mandatory: true
|
44
|
+
- :expectation: SHOULD
|
45
|
+
:names:
|
46
|
+
- patient
|
47
|
+
- status
|
48
|
+
:names_not_must_support_or_mandatory: []
|
49
|
+
:must_support_or_mandatory: true
|
50
|
+
:search_definitions:
|
51
|
+
:patient:
|
52
|
+
:path: patient
|
53
|
+
:full_path: Immunization.patient
|
54
|
+
:comparators: {}
|
55
|
+
:values: []
|
56
|
+
:type: Reference
|
57
|
+
:contains_multiple: false
|
58
|
+
:multiple_or: MAY
|
59
|
+
:date:
|
60
|
+
:path: occurrence
|
61
|
+
:full_path: Immunization.occurrence
|
62
|
+
:comparators:
|
63
|
+
:eq: MAY
|
64
|
+
:ne: MAY
|
65
|
+
:gt: SHALL
|
66
|
+
:ge: SHALL
|
67
|
+
:lt: SHALL
|
68
|
+
:le: SHALL
|
69
|
+
:sa: MAY
|
70
|
+
:eb: MAY
|
71
|
+
:ap: MAY
|
72
|
+
:values: []
|
73
|
+
:type: date
|
74
|
+
:contains_multiple: false
|
75
|
+
:multiple_or: MAY
|
76
|
+
:status:
|
77
|
+
:path: status
|
78
|
+
:full_path: Immunization.status
|
79
|
+
:comparators: {}
|
80
|
+
:values:
|
81
|
+
- completed
|
82
|
+
- entered-in-error
|
83
|
+
- not-done
|
84
|
+
:type: code
|
85
|
+
:contains_multiple: false
|
86
|
+
:multiple_or: MAY
|
87
|
+
:include_params: []
|
88
|
+
:revincludes:
|
89
|
+
- Provenance:target
|
90
|
+
:required_concepts: []
|
91
|
+
:must_supports:
|
92
|
+
:extensions: []
|
93
|
+
:slices: []
|
94
|
+
:elements:
|
95
|
+
- :path: status
|
96
|
+
- :path: statusReason
|
97
|
+
- :path: vaccineCode
|
98
|
+
- :path: patient
|
99
|
+
- :path: occurrence[x]
|
100
|
+
- :path: primarySource
|
101
|
+
:mandatory_elements:
|
102
|
+
- Immunization.status
|
103
|
+
- Immunization.vaccineCode
|
104
|
+
- Immunization.patient
|
105
|
+
- Immunization.occurrence[x]
|
106
|
+
- Immunization.primarySource
|
107
|
+
- Immunization.performer.actor
|
108
|
+
- Immunization.protocolApplied.doseNumber[x]
|
109
|
+
:bindings:
|
110
|
+
- :type: code
|
111
|
+
:strength: preferred
|
112
|
+
:system: http://hl7.org/fhir/ValueSet/languages
|
113
|
+
:path: language
|
114
|
+
- :type: code
|
115
|
+
:strength: required
|
116
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-status
|
117
|
+
:path: status
|
118
|
+
- :type: CodeableConcept
|
119
|
+
:strength: example
|
120
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-status-reason
|
121
|
+
:path: statusReason
|
122
|
+
- :type: CodeableConcept
|
123
|
+
:strength: extensible
|
124
|
+
:system: http://hl7.org/fhir/uv/ipa/ValueSet/ipa-vaccines-cvx
|
125
|
+
:path: vaccineCode
|
126
|
+
- :type: CodeableConcept
|
127
|
+
:strength: example
|
128
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-origin
|
129
|
+
:path: reportOrigin
|
130
|
+
- :type: CodeableConcept
|
131
|
+
:strength: example
|
132
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-site
|
133
|
+
:path: site
|
134
|
+
- :type: CodeableConcept
|
135
|
+
:strength: example
|
136
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-route
|
137
|
+
:path: route
|
138
|
+
- :type: CodeableConcept
|
139
|
+
:strength: extensible
|
140
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-function
|
141
|
+
:path: performer.function
|
142
|
+
- :type: CodeableConcept
|
143
|
+
:strength: example
|
144
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-reason
|
145
|
+
:path: reasonCode
|
146
|
+
- :type: CodeableConcept
|
147
|
+
:strength: example
|
148
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-subpotent-reason
|
149
|
+
:path: subpotentReason
|
150
|
+
- :type: CodeableConcept
|
151
|
+
:strength: example
|
152
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-program-eligibility
|
153
|
+
:path: programEligibility
|
154
|
+
- :type: CodeableConcept
|
155
|
+
:strength: example
|
156
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-funding-source
|
157
|
+
:path: fundingSource
|
158
|
+
- :type: CodeableConcept
|
159
|
+
:strength: example
|
160
|
+
:system: http://hl7.org/fhir/ValueSet/immunization-target-disease
|
161
|
+
:path: protocolApplied.targetDisease
|
162
|
+
:references:
|
163
|
+
- :path: Immunization.patient
|
164
|
+
:profiles:
|
165
|
+
- http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-patient
|
166
|
+
- :path: Immunization.encounter
|
167
|
+
:profiles:
|
168
|
+
- http://hl7.org/fhir/StructureDefinition/Encounter
|
169
|
+
- :path: Immunization.location
|
170
|
+
:profiles:
|
171
|
+
- http://hl7.org/fhir/StructureDefinition/Location
|
172
|
+
- :path: Immunization.manufacturer
|
173
|
+
:profiles:
|
174
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
175
|
+
- :path: Immunization.performer.actor
|
176
|
+
:profiles:
|
177
|
+
- http://hl7.org/fhir/StructureDefinition/Practitioner
|
178
|
+
- http://hl7.org/fhir/StructureDefinition/PractitionerRole
|
179
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
180
|
+
- :path: Immunization.reasonReference
|
181
|
+
:profiles:
|
182
|
+
- http://hl7.org/fhir/StructureDefinition/Condition
|
183
|
+
- http://hl7.org/fhir/StructureDefinition/Observation
|
184
|
+
- http://hl7.org/fhir/StructureDefinition/DiagnosticReport
|
185
|
+
- :path: Immunization.reaction.detail
|
186
|
+
:profiles:
|
187
|
+
- http://hl7.org/fhir/StructureDefinition/Observation
|
188
|
+
- :path: Immunization.protocolApplied.authority
|
189
|
+
:profiles:
|
190
|
+
- http://hl7.org/fhir/StructureDefinition/Organization
|
191
|
+
:tests:
|
192
|
+
- :id: ipa_010_immunization_patient_search_test
|
193
|
+
:file_name: immunization_patient_search_test.rb
|
194
|
+
- :id: ipa_010_immunization_patient_date_search_test
|
195
|
+
:file_name: immunization_patient_date_search_test.rb
|
196
|
+
- :id: ipa_010_immunization_patient_status_search_test
|
197
|
+
:file_name: immunization_patient_status_search_test.rb
|
198
|
+
- :id: ipa_010_immunization_read_test
|
199
|
+
:file_name: immunization_read_test.rb
|
200
|
+
- :id: ipa_010_immunization_provenance_revinclude_search_test
|
201
|
+
:file_name: immunization_provenance_revinclude_search_test.rb
|
202
|
+
- :id: ipa_010_immunization_validation_test
|
203
|
+
:file_name: immunization_validation_test.rb
|
204
|
+
- :id: ipa_010_immunization_must_support_test
|
205
|
+
:file_name: immunization_must_support_test.rb
|
206
|
+
- :id: ipa_010_immunization_reference_resolution_test
|
207
|
+
:file_name: immunization_reference_resolution_test.rb
|
208
|
+
:id: ipa_010_immunization
|
209
|
+
:file_name: immunization_group.rb
|
210
|
+
:delayed_references: []
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require_relative 'immunization/immunization_patient_search_test'
|
2
|
+
require_relative 'immunization/immunization_patient_date_search_test'
|
3
|
+
require_relative 'immunization/immunization_patient_status_search_test'
|
4
|
+
require_relative 'immunization/immunization_read_test'
|
5
|
+
require_relative 'immunization/immunization_provenance_revinclude_search_test'
|
6
|
+
require_relative 'immunization/immunization_validation_test'
|
7
|
+
require_relative 'immunization/immunization_must_support_test'
|
8
|
+
require_relative 'immunization/immunization_reference_resolution_test'
|
9
|
+
|
10
|
+
module IpaTestKit
|
11
|
+
class ImmunizationGroup < Inferno::TestGroup
|
12
|
+
title 'Immunization Tests'
|
13
|
+
short_description 'Verify support for the server capabilities required by the IPA Immunization Profile.'
|
14
|
+
description %(
|
15
|
+
# Background
|
16
|
+
|
17
|
+
The IPA Immunization sequence verifies that the system under test is
|
18
|
+
able to provide correct responses for Immunization queries. These queries
|
19
|
+
must contain resources conforming to the IPA Immunization Profile as
|
20
|
+
specified in the IPA v0.1.0 Implementation Guide.
|
21
|
+
|
22
|
+
# Testing Methodology
|
23
|
+
## Searching
|
24
|
+
This test sequence will first perform each required search associated
|
25
|
+
with this resource. This sequence will perform searches with the
|
26
|
+
following parameters:
|
27
|
+
|
28
|
+
* patient
|
29
|
+
|
30
|
+
### Search Parameters
|
31
|
+
The first search uses the selected patient(s) from the prior launch
|
32
|
+
sequence. Any subsequent searches will look for its parameter values
|
33
|
+
from the results of the first search. For example, the `identifier`
|
34
|
+
search in the patient sequence is performed by looking for an existing
|
35
|
+
`Patient.identifier` from any of the resources returned in the `_id`
|
36
|
+
search. If a value cannot be found this way, the search is skipped.
|
37
|
+
|
38
|
+
### Search Validation
|
39
|
+
Inferno will retrieve up to the first 20 bundle pages of the reply for
|
40
|
+
Immunization resources and save them for subsequent tests. Each of
|
41
|
+
these resources is then checked to see if it matches the searched
|
42
|
+
parameters in accordance with [FHIR search
|
43
|
+
guidelines](https://www.hl7.org/fhir/search.html). The test will fail,
|
44
|
+
for example, if a Patient search for `gender=male` returns a `female`
|
45
|
+
patient.
|
46
|
+
|
47
|
+
|
48
|
+
## Must Support
|
49
|
+
Each profile contains elements marked as "must support". This test
|
50
|
+
sequence expects to see each of these elements at least once. If at
|
51
|
+
least one cannot be found, the test will fail. The test will look
|
52
|
+
through the Immunization resources found in the first test for these
|
53
|
+
elements.
|
54
|
+
|
55
|
+
## Profile Validation
|
56
|
+
Each resource returned from the first search is expected to conform to
|
57
|
+
the [IPA Immunization Profile](http://hl7.org/fhir/uv/ipa/StructureDefinition/ipa-immunization). Each element is checked against
|
58
|
+
teminology binding and cardinality requirements.
|
59
|
+
|
60
|
+
Elements with a required binding are validated against their bound
|
61
|
+
ValueSet. If the code/system in the element is not part of the ValueSet,
|
62
|
+
then the test will fail.
|
63
|
+
|
64
|
+
## Reference Validation
|
65
|
+
Each reference within the resources found from the previous tests must
|
66
|
+
resolve. The test will attempt to read each reference found and will
|
67
|
+
fail if any attempted read fails.
|
68
|
+
|
69
|
+
)
|
70
|
+
|
71
|
+
id :ipa_010_immunization
|
72
|
+
run_as_group
|
73
|
+
|
74
|
+
def self.metadata
|
75
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'immunization', 'metadata.yml')))
|
76
|
+
end
|
77
|
+
|
78
|
+
test from: :ipa_010_immunization_patient_search_test
|
79
|
+
test from: :ipa_010_immunization_patient_date_search_test
|
80
|
+
test from: :ipa_010_immunization_patient_status_search_test
|
81
|
+
test from: :ipa_010_immunization_read_test
|
82
|
+
test from: :ipa_010_immunization_provenance_revinclude_search_test
|
83
|
+
test from: :ipa_010_immunization_validation_test
|
84
|
+
test from: :ipa_010_immunization_must_support_test
|
85
|
+
test from: :ipa_010_immunization_reference_resolution_test
|
86
|
+
end
|
87
|
+
end
|
@@ -0,0 +1,88 @@
|
|
1
|
+
require 'inferno/dsl/oauth_credentials'
|
2
|
+
require_relative '../version'
|
3
|
+
require_relative '../custom_groups/capability_statement_group'
|
4
|
+
require_relative 'patient_group'
|
5
|
+
require_relative 'allergy_intolerance_group'
|
6
|
+
require_relative 'condition_group'
|
7
|
+
require_relative 'document_reference_group'
|
8
|
+
require_relative 'immunization_group'
|
9
|
+
require_relative 'medication_request_group'
|
10
|
+
require_relative 'medication_statement_group'
|
11
|
+
require_relative 'observation_group'
|
12
|
+
require_relative 'bmi_group'
|
13
|
+
require_relative 'oxygensat_group'
|
14
|
+
require_relative 'head_circumference_group'
|
15
|
+
require_relative 'bodyheight_group'
|
16
|
+
require_relative 'bodytemp_group'
|
17
|
+
require_relative 'bp_group'
|
18
|
+
require_relative 'bodyweight_group'
|
19
|
+
require_relative 'heartrate_group'
|
20
|
+
require_relative 'resprate_group'
|
21
|
+
require_relative 'practitioner_group'
|
22
|
+
#require_relative 'practitioner_role_group'
|
23
|
+
require_relative 'provenance_group'
|
24
|
+
|
25
|
+
module IpaTestKit
|
26
|
+
class IpaTestSuite < Inferno::TestSuite
|
27
|
+
title 'International Patient Access (IPA)'
|
28
|
+
version VERSION
|
29
|
+
|
30
|
+
VALIDATION_MESSAGE_FILTERS = [
|
31
|
+
%r{Sub-extension url 'introspect' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
|
32
|
+
%r{Sub-extension url 'revoke' is not defined by the Extension http://fhir-registry\.smarthealthit\.org/StructureDefinition/oauth-uris$},
|
33
|
+
/^Observation\.effective\.ofType\(Period\): vs-1:/, # Invalid invariant in FHIR v4.0.1
|
34
|
+
].freeze
|
35
|
+
|
36
|
+
def self.metadata
|
37
|
+
@metadata ||= YAML.load_file(File.join(__dir__, 'metadata.yml'))[:groups].map do |raw_metadata|
|
38
|
+
Generator::GroupMetadata.new(raw_metadata)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
validator do
|
43
|
+
url ENV.fetch('VALIDATOR_URL', 'http://validator_service:4567')
|
44
|
+
exclude_message do |message|
|
45
|
+
VALIDATION_MESSAGE_FILTERS.any? { |filter| filter.match? message.message }
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
id :ipa_010
|
50
|
+
|
51
|
+
input :url,
|
52
|
+
title: 'FHIR Endpoint',
|
53
|
+
description: 'URL of the FHIR endpoint'
|
54
|
+
input :smart_credentials,
|
55
|
+
title: 'OAuth Credentials',
|
56
|
+
type: :oauth_credentials,
|
57
|
+
optional: true
|
58
|
+
|
59
|
+
fhir_client do
|
60
|
+
url :url
|
61
|
+
oauth_credentials :smart_credentials
|
62
|
+
end
|
63
|
+
|
64
|
+
group from: :ipa_010_capability_statement
|
65
|
+
|
66
|
+
group from: :ipa_010_patient
|
67
|
+
group from: :ipa_010_allergy_intolerance
|
68
|
+
group from: :ipa_010_condition
|
69
|
+
group from: :ipa_010_document_reference
|
70
|
+
group from: :ipa_010_immunization
|
71
|
+
group from: :ipa_010_medication_request
|
72
|
+
group from: :ipa_010_medication_statement
|
73
|
+
group from: :ipa_010_observation
|
74
|
+
group from: :ipa_010_bmi
|
75
|
+
group from: :ipa_010_oxygensat
|
76
|
+
group from: :ipa_010_head_circumference
|
77
|
+
group from: :ipa_010_bodyheight
|
78
|
+
group from: :ipa_010_bodytemp
|
79
|
+
group from: :ipa_010_bp
|
80
|
+
group from: :ipa_010_bodyweight
|
81
|
+
group from: :ipa_010_heartrate
|
82
|
+
group from: :ipa_010_resprate
|
83
|
+
group from: :ipa_010_practitioner
|
84
|
+
# still working on the PractitionerRole tests
|
85
|
+
#group from: :ipa_010_practitioner_role
|
86
|
+
group from: :ipa_010_provenance
|
87
|
+
end
|
88
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require_relative '../../must_support_test'
|
2
|
+
|
3
|
+
module IpaTestKit
|
4
|
+
class MedicationRequestMustSupportTest < Inferno::Test
|
5
|
+
include IpaTestKit::MustSupportTest
|
6
|
+
|
7
|
+
title 'All must support elements are provided in the MedicationRequest 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 MedicationRequest resources
|
12
|
+
found previously for the following must support elements:
|
13
|
+
|
14
|
+
* MedicationRequest.authoredOn
|
15
|
+
* MedicationRequest.dosageInstruction
|
16
|
+
* MedicationRequest.dosageInstruction.text
|
17
|
+
* MedicationRequest.encounter
|
18
|
+
* MedicationRequest.intent
|
19
|
+
* MedicationRequest.medication[x]
|
20
|
+
* MedicationRequest.reported[x]
|
21
|
+
* MedicationRequest.requester
|
22
|
+
* MedicationRequest.status
|
23
|
+
* MedicationRequest.subject
|
24
|
+
)
|
25
|
+
|
26
|
+
id :ipa_010_medication_request_must_support_test
|
27
|
+
|
28
|
+
def resource_type
|
29
|
+
'MedicationRequest'
|
30
|
+
end
|
31
|
+
|
32
|
+
def self.metadata
|
33
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
34
|
+
end
|
35
|
+
|
36
|
+
def scratch_resources
|
37
|
+
scratch[:medication_request_resources] ||= {}
|
38
|
+
end
|
39
|
+
|
40
|
+
run do
|
41
|
+
perform_must_support_test(all_scratch_resources)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class MedicationRequestPatientIntentAuthoredonSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for MedicationRequest search by patient + intent + authoredon'
|
9
|
+
description %(
|
10
|
+
A server SHOULD support searching by
|
11
|
+
patient + intent + authoredon on the MedicationRequest resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
If any MedicationRequest resources use external references to
|
16
|
+
Medications, the search will be repeated with
|
17
|
+
`_include=MedicationRequest:medication`.
|
18
|
+
|
19
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
20
|
+
|
21
|
+
)
|
22
|
+
|
23
|
+
id :ipa_010_medication_request_patient_intent_authoredon_search_test
|
24
|
+
optional
|
25
|
+
|
26
|
+
input :patient_ids,
|
27
|
+
title: 'Patient IDs',
|
28
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
29
|
+
|
30
|
+
def self.properties
|
31
|
+
@properties ||= SearchTestProperties.new(
|
32
|
+
resource_type: 'MedicationRequest',
|
33
|
+
search_param_names: ['patient', 'intent', 'authoredon'],
|
34
|
+
possible_status_search: true,
|
35
|
+
test_medication_inclusion_mr: true,
|
36
|
+
params_with_comparators: ['authoredon'],
|
37
|
+
multiple_or_search_params: ['intent']
|
38
|
+
)
|
39
|
+
end
|
40
|
+
|
41
|
+
def self.metadata
|
42
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
43
|
+
end
|
44
|
+
|
45
|
+
def scratch_resources
|
46
|
+
scratch[:medication_request_resources] ||= {}
|
47
|
+
end
|
48
|
+
|
49
|
+
run do
|
50
|
+
run_search_test
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
@@ -0,0 +1,52 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class MedicationRequestPatientIntentEncounterSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for MedicationRequest search by patient + intent + encounter'
|
9
|
+
description %(
|
10
|
+
A server SHOULD support searching by
|
11
|
+
patient + intent + encounter on the MedicationRequest resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
If any MedicationRequest resources use external references to
|
16
|
+
Medications, the search will be repeated with
|
17
|
+
`_include=MedicationRequest:medication`.
|
18
|
+
|
19
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
20
|
+
|
21
|
+
)
|
22
|
+
|
23
|
+
id :ipa_010_medication_request_patient_intent_encounter_search_test
|
24
|
+
optional
|
25
|
+
|
26
|
+
input :patient_ids,
|
27
|
+
title: 'Patient IDs',
|
28
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
29
|
+
|
30
|
+
def self.properties
|
31
|
+
@properties ||= SearchTestProperties.new(
|
32
|
+
resource_type: 'MedicationRequest',
|
33
|
+
search_param_names: ['patient', 'intent', 'encounter'],
|
34
|
+
possible_status_search: true,
|
35
|
+
test_medication_inclusion_mr: true,
|
36
|
+
multiple_or_search_params: ['intent']
|
37
|
+
)
|
38
|
+
end
|
39
|
+
|
40
|
+
def self.metadata
|
41
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
42
|
+
end
|
43
|
+
|
44
|
+
def scratch_resources
|
45
|
+
scratch[:medication_request_resources] ||= {}
|
46
|
+
end
|
47
|
+
|
48
|
+
run do
|
49
|
+
run_search_test
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
data/lib/ipa_test_kit/generated/medication_request/medication_request_patient_intent_search_test.rb
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
require_relative '../../search_test'
|
2
|
+
require_relative '../../generator/group_metadata'
|
3
|
+
|
4
|
+
module IpaTestKit
|
5
|
+
class MedicationRequestPatientIntentSearchTest < Inferno::Test
|
6
|
+
include IpaTestKit::SearchTest
|
7
|
+
|
8
|
+
title 'Server returns valid results for MedicationRequest search by patient + intent'
|
9
|
+
description %(
|
10
|
+
A server SHALL support searching by
|
11
|
+
patient + intent on the MedicationRequest resource. This test
|
12
|
+
will pass if resources are returned and match the search criteria. If
|
13
|
+
none are returned, the test is skipped.
|
14
|
+
|
15
|
+
If any MedicationRequest resources use external references to
|
16
|
+
Medications, the search will be repeated with
|
17
|
+
`_include=MedicationRequest:medication`.
|
18
|
+
|
19
|
+
This test verifies that the server supports searching by reference using
|
20
|
+
the form `patient=[id]` as well as `patient=Patient/[id]`. The two
|
21
|
+
different forms are expected to return the same number of results. IPA
|
22
|
+
requires that both forms are supported by IPA responders.
|
23
|
+
|
24
|
+
Because this is the first search of the sequence, resources in the
|
25
|
+
response will be used for subsequent tests.
|
26
|
+
|
27
|
+
Additionally, this test will check that GET and POST search methods
|
28
|
+
return the same number of results. Search by POST is required by the
|
29
|
+
FHIR R4 specification, and these tests interpret search by GET as a
|
30
|
+
requirement of IPA v0.1.0.
|
31
|
+
|
32
|
+
[IPA Server CapabilityStatement](https://build.fhir.org/ig/HL7/fhir-ipa/CapabilityStatement-ipa-server.html)
|
33
|
+
|
34
|
+
)
|
35
|
+
|
36
|
+
id :ipa_010_medication_request_patient_intent_search_test
|
37
|
+
input :patient_ids,
|
38
|
+
title: 'Patient IDs',
|
39
|
+
description: 'Comma separated list of patient IDs that in sum contain all MUST SUPPORT elements'
|
40
|
+
|
41
|
+
def self.properties
|
42
|
+
@properties ||= SearchTestProperties.new(
|
43
|
+
first_search: true,
|
44
|
+
fixed_value_search: true,
|
45
|
+
resource_type: 'MedicationRequest',
|
46
|
+
search_param_names: ['patient', 'intent'],
|
47
|
+
saves_delayed_references: true,
|
48
|
+
possible_status_search: true,
|
49
|
+
test_medication_inclusion_mr: true,
|
50
|
+
test_reference_variants: true,
|
51
|
+
multiple_or_search_params: ['intent'],
|
52
|
+
test_post_search: true
|
53
|
+
)
|
54
|
+
end
|
55
|
+
|
56
|
+
def self.metadata
|
57
|
+
@metadata ||= Generator::GroupMetadata.new(YAML.load_file(File.join(__dir__, 'metadata.yml')))
|
58
|
+
end
|
59
|
+
|
60
|
+
def scratch_resources
|
61
|
+
scratch[:medication_request_resources] ||= {}
|
62
|
+
end
|
63
|
+
|
64
|
+
run do
|
65
|
+
run_search_test
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|