us_core_test_kit 0.2.1 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/us_core_test_kit/custom_groups/clinical_note_attachment_test.rb +2 -2
- data/lib/us_core_test_kit/custom_groups/clinical_note_type_test.rb +11 -6
- data/lib/us_core_test_kit/generated/v3.1.1/allergy_intolerance/allergy_intolerance_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/bodyheight_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/bodytemp_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/bodyweight_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/bp/bp_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/care_plan/care_plan_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/care_team/care_team_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/condition/condition_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/device/device_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_note/diagnostic_report_note_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/document_reference/document_reference_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/encounter/encounter_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/goal/goal_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/goal/metadata.yml +1 -1
- data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/head_circumference_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/heartrate/heartrate_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/immunization/immunization_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/medication_request/medication_request_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/medication_request/medication_validation_test.rb +4 -2
- data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +1 -1
- data/lib/us_core_test_kit/generated/v3.1.1/observation_lab/observation_lab_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/organization/organization_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/patient/patient_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/pediatric_bmi_for_age_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/pediatric_weight_for_height_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/practitioner/practitioner_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/procedure/procedure_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/provenance/provenance_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/pulse_oximetry_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/resprate/resprate_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v3.1.1/smokingstatus/smokingstatus_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/allergy_intolerance/allergy_intolerance_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/blood_pressure_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/bmi/bmi_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/body_height/body_height_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/body_temperature_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/body_weight/body_weight_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/care_plan/care_plan_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/care_team/care_team_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/condition/condition_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/device/device_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_note/diagnostic_report_note_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/document_reference/document_reference_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/encounter/encounter_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/goal/goal_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/goal/metadata.yml +1 -1
- data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/head_circumference_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/head_circumference_percentile_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/heart_rate_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/immunization/immunization_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/medication_request/medication_request_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/medication_request/medication_validation_test.rb +4 -2
- data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +1 -1
- data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/observation_lab_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/organization/organization_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/patient/patient_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/pediatric_bmi_for_age_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/pediatric_weight_for_height_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/practitioner/practitioner_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/procedure/procedure_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/provenance/provenance_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/pulse_oximetry_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/respiratory_rate_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/smokingstatus_validation_test.rb +5 -2
- data/lib/us_core_test_kit/generator/validation_test_generator.rb +7 -0
- data/lib/us_core_test_kit/validation_test.rb +9 -3
- data/lib/us_core_test_kit/version.rb +1 -1
- metadata +2 -2
data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/observation_lab_validation_test.rb
CHANGED
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_observation_lab_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Laboratory Result Observation Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Laboratory Result Observation Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_organization_validation_test
|
|
9
9
|
title 'Organization resources returned during previous tests conform to the US Core Organization Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Organization Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_patient_validation_test
|
|
9
9
|
title 'Patient resources returned during previous tests conform to the US Core Patient Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Patient Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_pediatric_bmi_for_age_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Pediatric BMI for Age Observation Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Pediatric BMI for Age Observation Profile](http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_pediatric_weight_for_height_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Pediatric Weight for Height Observation Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Pediatric Weight for Height Observation Profile](http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_practitioner_validation_test
|
|
9
9
|
title 'Practitioner resources returned during previous tests conform to the US Core Practitioner Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Practitioner Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-practitioner',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_procedure_validation_test
|
|
9
9
|
title 'Procedure resources returned during previous tests conform to the US Core Procedure Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Procedure Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-procedure',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_provenance_validation_test
|
|
9
9
|
title 'Provenance resources returned during previous tests conform to the US Core Provenance Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Provenance Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-provenance',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_pulse_oximetry_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Pulse Oximetry Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Pulse Oximetry Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-pulse-oximetry',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/respiratory_rate_validation_test.rb
CHANGED
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_respiratory_rate_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Respiratory Rate Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Respiratory Rate Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-respiratory-rate',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -8,8 +8,9 @@ module USCoreTestKit
|
|
|
8
8
|
id :us_core_v400_smokingstatus_validation_test
|
|
9
9
|
title 'Observation resources returned during previous tests conform to the US Core Smoking Status Observation Profile'
|
|
10
10
|
description %(
|
|
11
|
-
|
|
11
|
+
This test verifies resources returned from the first search conform to
|
|
12
12
|
the [US Core Smoking Status Observation Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus).
|
|
13
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
13
14
|
|
|
14
15
|
It verifies the presence of mandatory elements and that elements with
|
|
15
16
|
required bindings contain appropriate values. CodeableConcept element
|
|
@@ -29,7 +30,9 @@ fail if their code/system are not found in the valueset.
|
|
|
29
30
|
end
|
|
30
31
|
|
|
31
32
|
run do
|
|
32
|
-
perform_validation_test(scratch_resources[:all] || [],
|
|
33
|
+
perform_validation_test(scratch_resources[:all] || [],
|
|
34
|
+
'http://hl7.org/fhir/us/core/StructureDefinition/us-core-smokingstatus',
|
|
35
|
+
skip_if_empty: true)
|
|
33
36
|
end
|
|
34
37
|
end
|
|
35
38
|
end
|
|
@@ -84,6 +84,12 @@ module USCoreTestKit
|
|
|
84
84
|
read_interaction[:expectation]
|
|
85
85
|
end
|
|
86
86
|
|
|
87
|
+
def skip_if_empty
|
|
88
|
+
# Return true if a system must demonstrate at least one example of the resource type.
|
|
89
|
+
# This drives omit vs. skip result statuses in this test.
|
|
90
|
+
resource_type != 'Medication'
|
|
91
|
+
end
|
|
92
|
+
|
|
87
93
|
def generate
|
|
88
94
|
FileUtils.mkdir_p(output_file_directory)
|
|
89
95
|
File.open(output_file_name, 'w') { |f| f.write(output) }
|
|
@@ -121,6 +127,7 @@ module USCoreTestKit
|
|
|
121
127
|
<<~GENERIC_INTRO
|
|
122
128
|
This test verifies resources returned from the first search conform to
|
|
123
129
|
the [#{profile_name}](#{profile_url}).
|
|
130
|
+
Systems must demonstrate at least one valid example in order to pass this test.
|
|
124
131
|
GENERIC_INTRO
|
|
125
132
|
end
|
|
126
133
|
end
|
|
@@ -3,9 +3,15 @@ module USCoreTestKit
|
|
|
3
3
|
DAR_CODE_SYSTEM_URL = 'http://terminology.hl7.org/CodeSystem/data-absent-reason'.freeze
|
|
4
4
|
DAR_EXTENSION_URL = 'http://hl7.org/fhir/StructureDefinition/data-absent-reason'.freeze
|
|
5
5
|
|
|
6
|
-
def perform_validation_test(resources,
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
def perform_validation_test(resources,
|
|
7
|
+
profile_url,
|
|
8
|
+
skip_if_empty: true)
|
|
9
|
+
|
|
10
|
+
skip_if skip_if_empty && resources.blank?,
|
|
11
|
+
"No #{resource_type} resources conforming to the #{profile_url} profile were returned"
|
|
12
|
+
|
|
13
|
+
omit_if resources.blank?,
|
|
14
|
+
"No #{resource_type} resources provided so the #{profile_url} profile does not apply"
|
|
9
15
|
|
|
10
16
|
resources.each do |resource|
|
|
11
17
|
resource_is_valid?(resource: resource, profile_url: profile_url)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: us_core_test_kit
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Stephen MacVicar
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-05-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: inferno_core
|