us_core_test_kit 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. checksums.yaml +4 -4
  2. data/lib/us_core_test_kit/custom_groups/clinical_note_attachment_test.rb +2 -2
  3. data/lib/us_core_test_kit/custom_groups/clinical_note_type_test.rb +11 -6
  4. data/lib/us_core_test_kit/generated/v3.1.1/allergy_intolerance/allergy_intolerance_validation_test.rb +5 -2
  5. data/lib/us_core_test_kit/generated/v3.1.1/bodyheight/bodyheight_validation_test.rb +5 -2
  6. data/lib/us_core_test_kit/generated/v3.1.1/bodytemp/bodytemp_validation_test.rb +5 -2
  7. data/lib/us_core_test_kit/generated/v3.1.1/bodyweight/bodyweight_validation_test.rb +5 -2
  8. data/lib/us_core_test_kit/generated/v3.1.1/bp/bp_validation_test.rb +5 -2
  9. data/lib/us_core_test_kit/generated/v3.1.1/care_plan/care_plan_validation_test.rb +5 -2
  10. data/lib/us_core_test_kit/generated/v3.1.1/care_team/care_team_validation_test.rb +5 -2
  11. data/lib/us_core_test_kit/generated/v3.1.1/condition/condition_validation_test.rb +5 -2
  12. data/lib/us_core_test_kit/generated/v3.1.1/device/device_validation_test.rb +5 -2
  13. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +5 -2
  14. data/lib/us_core_test_kit/generated/v3.1.1/diagnostic_report_note/diagnostic_report_note_validation_test.rb +5 -2
  15. data/lib/us_core_test_kit/generated/v3.1.1/document_reference/document_reference_validation_test.rb +5 -2
  16. data/lib/us_core_test_kit/generated/v3.1.1/encounter/encounter_validation_test.rb +5 -2
  17. data/lib/us_core_test_kit/generated/v3.1.1/goal/goal_validation_test.rb +5 -2
  18. data/lib/us_core_test_kit/generated/v3.1.1/goal/metadata.yml +1 -1
  19. data/lib/us_core_test_kit/generated/v3.1.1/head_circumference/head_circumference_validation_test.rb +5 -2
  20. data/lib/us_core_test_kit/generated/v3.1.1/heartrate/heartrate_validation_test.rb +5 -2
  21. data/lib/us_core_test_kit/generated/v3.1.1/immunization/immunization_validation_test.rb +5 -2
  22. data/lib/us_core_test_kit/generated/v3.1.1/medication_request/medication_request_validation_test.rb +5 -2
  23. data/lib/us_core_test_kit/generated/v3.1.1/medication_request/medication_validation_test.rb +4 -2
  24. data/lib/us_core_test_kit/generated/v3.1.1/metadata.yml +1 -1
  25. data/lib/us_core_test_kit/generated/v3.1.1/observation_lab/observation_lab_validation_test.rb +5 -2
  26. data/lib/us_core_test_kit/generated/v3.1.1/organization/organization_validation_test.rb +5 -2
  27. data/lib/us_core_test_kit/generated/v3.1.1/patient/patient_validation_test.rb +5 -2
  28. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_bmi_for_age/pediatric_bmi_for_age_validation_test.rb +5 -2
  29. data/lib/us_core_test_kit/generated/v3.1.1/pediatric_weight_for_height/pediatric_weight_for_height_validation_test.rb +5 -2
  30. data/lib/us_core_test_kit/generated/v3.1.1/practitioner/practitioner_validation_test.rb +5 -2
  31. data/lib/us_core_test_kit/generated/v3.1.1/procedure/procedure_validation_test.rb +5 -2
  32. data/lib/us_core_test_kit/generated/v3.1.1/provenance/provenance_validation_test.rb +5 -2
  33. data/lib/us_core_test_kit/generated/v3.1.1/pulse_oximetry/pulse_oximetry_validation_test.rb +5 -2
  34. data/lib/us_core_test_kit/generated/v3.1.1/resprate/resprate_validation_test.rb +5 -2
  35. data/lib/us_core_test_kit/generated/v3.1.1/smokingstatus/smokingstatus_validation_test.rb +5 -2
  36. data/lib/us_core_test_kit/generated/v4.0.0/allergy_intolerance/allergy_intolerance_validation_test.rb +5 -2
  37. data/lib/us_core_test_kit/generated/v4.0.0/blood_pressure/blood_pressure_validation_test.rb +5 -2
  38. data/lib/us_core_test_kit/generated/v4.0.0/bmi/bmi_validation_test.rb +5 -2
  39. data/lib/us_core_test_kit/generated/v4.0.0/body_height/body_height_validation_test.rb +5 -2
  40. data/lib/us_core_test_kit/generated/v4.0.0/body_temperature/body_temperature_validation_test.rb +5 -2
  41. data/lib/us_core_test_kit/generated/v4.0.0/body_weight/body_weight_validation_test.rb +5 -2
  42. data/lib/us_core_test_kit/generated/v4.0.0/care_plan/care_plan_validation_test.rb +5 -2
  43. data/lib/us_core_test_kit/generated/v4.0.0/care_team/care_team_validation_test.rb +5 -2
  44. data/lib/us_core_test_kit/generated/v4.0.0/condition/condition_validation_test.rb +5 -2
  45. data/lib/us_core_test_kit/generated/v4.0.0/device/device_validation_test.rb +5 -2
  46. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_lab/diagnostic_report_lab_validation_test.rb +5 -2
  47. data/lib/us_core_test_kit/generated/v4.0.0/diagnostic_report_note/diagnostic_report_note_validation_test.rb +5 -2
  48. data/lib/us_core_test_kit/generated/v4.0.0/document_reference/document_reference_validation_test.rb +5 -2
  49. data/lib/us_core_test_kit/generated/v4.0.0/encounter/encounter_validation_test.rb +5 -2
  50. data/lib/us_core_test_kit/generated/v4.0.0/goal/goal_validation_test.rb +5 -2
  51. data/lib/us_core_test_kit/generated/v4.0.0/goal/metadata.yml +1 -1
  52. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference/head_circumference_validation_test.rb +5 -2
  53. data/lib/us_core_test_kit/generated/v4.0.0/head_circumference_percentile/head_circumference_percentile_validation_test.rb +5 -2
  54. data/lib/us_core_test_kit/generated/v4.0.0/heart_rate/heart_rate_validation_test.rb +5 -2
  55. data/lib/us_core_test_kit/generated/v4.0.0/immunization/immunization_validation_test.rb +5 -2
  56. data/lib/us_core_test_kit/generated/v4.0.0/medication_request/medication_request_validation_test.rb +5 -2
  57. data/lib/us_core_test_kit/generated/v4.0.0/medication_request/medication_validation_test.rb +4 -2
  58. data/lib/us_core_test_kit/generated/v4.0.0/metadata.yml +1 -1
  59. data/lib/us_core_test_kit/generated/v4.0.0/observation_lab/observation_lab_validation_test.rb +5 -2
  60. data/lib/us_core_test_kit/generated/v4.0.0/organization/organization_validation_test.rb +5 -2
  61. data/lib/us_core_test_kit/generated/v4.0.0/patient/patient_validation_test.rb +5 -2
  62. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_bmi_for_age/pediatric_bmi_for_age_validation_test.rb +5 -2
  63. data/lib/us_core_test_kit/generated/v4.0.0/pediatric_weight_for_height/pediatric_weight_for_height_validation_test.rb +5 -2
  64. data/lib/us_core_test_kit/generated/v4.0.0/practitioner/practitioner_validation_test.rb +5 -2
  65. data/lib/us_core_test_kit/generated/v4.0.0/procedure/procedure_validation_test.rb +5 -2
  66. data/lib/us_core_test_kit/generated/v4.0.0/provenance/provenance_validation_test.rb +5 -2
  67. data/lib/us_core_test_kit/generated/v4.0.0/pulse_oximetry/pulse_oximetry_validation_test.rb +5 -2
  68. data/lib/us_core_test_kit/generated/v4.0.0/respiratory_rate/respiratory_rate_validation_test.rb +5 -2
  69. data/lib/us_core_test_kit/generated/v4.0.0/smokingstatus/smokingstatus_validation_test.rb +5 -2
  70. data/lib/us_core_test_kit/generator/validation_test_generator.rb +7 -0
  71. data/lib/us_core_test_kit/validation_test.rb +9 -3
  72. data/lib/us_core_test_kit/version.rb +1 -1
  73. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 47a7bfc891a25929375abda6ea7ad6a06029a0c8ea76ad2f0abf5de0b1c201e0
4
- data.tar.gz: ef515a3bcb8f7f5d60187c1d8c2b690e4d4ad3fb658c12d27190548e5ab14fcf
3
+ metadata.gz: ed2e43ac18efc613d5e8e4deaa2e27c90b3d14956676be3009cfcaf023316bfc
4
+ data.tar.gz: 602336f9a94c5ba3c89d0a6295543e9fccace4fd1ed96f8e296aca2c83bb4a2c
5
5
  SHA512:
6
- metadata.gz: 5d42abb558dc406ec0ed7512eba36dc488ab1ddc85c541fbd2773e9c3790b6fa277c2fb0c2716451ce2104838db99e982593a392a9b4f9e7e3281c339d0ab681
7
- data.tar.gz: 6e07bb9305690b4b91af887121832f85ec1678b608267158f76fa5a5591c8250ff70eaef6fe6123c16bb1f9b235ab6e075634638f5bfe4f879faa24e969ed2af
6
+ metadata.gz: 6664094195116bde7e6483e0e6baf23f93e3515607502b74c94b18608e675925002a506ba29e31c8252b6ea583a499fb922f9b7352b604ce4569522cd8fbbfa8
7
+ data.tar.gz: 9f52ccb0ac909060103b5e568f480f71ae40ba4d07affbcdd7bf175532e1b359be3152b87edd538d3bc8be7bdb2f8ae580629474e6c3f4293e1cccf09bc37a60
@@ -34,7 +34,7 @@ module USCoreTestKit
34
34
  end
35
35
 
36
36
  unmatched_urls.map do |url|
37
- "#{url} in DiagnosticReport/#{report_attachments[patient_id][url]} for Patient #{patient_id}"
37
+ "#{url} in DiagnosticReport/#{report_attachments[url]} for Patient #{patient_id}"
38
38
  end
39
39
  end
40
40
 
@@ -42,4 +42,4 @@ module USCoreTestKit
42
42
  "Attachments #{unmatched_attachment_messages.join(', ')} are not referenced in any DocumentReference"
43
43
  end
44
44
  end
45
- end
45
+ end
@@ -38,7 +38,7 @@ module USCoreTestKit
38
38
  codes_found =
39
39
  resources.flat_map do |resource|
40
40
  resource.content
41
- &.select { |content| !attachments.key? content.attachment&.url}
41
+ &.select { |content| content.attachment&.url.present? && !attachments.key?(content.attachment&.url) }
42
42
  &.each { |content| attachments[content.attachment.url] = resource.id }
43
43
 
44
44
  resource.type&.coding&.map { |coding| coding.code }
@@ -50,7 +50,6 @@ module USCoreTestKit
50
50
  def diagnostic_report_categories_found(patient_id)
51
51
  search_params = { patient: patient_id }
52
52
  status_values = ['registered,partial,preliminary,final,amended,corrected,appended,cancelled,entered-in-error,unknown']
53
-
54
53
  search_and_check_response(search_params, 'DiagnosticReport')
55
54
 
56
55
  if response[:status] == 400
@@ -71,11 +70,17 @@ module USCoreTestKit
71
70
 
72
71
  codes_found =
73
72
  resources.flat_map do |resource|
74
- resource.presentedForm
75
- &.select { |attachment| !attachments.key? attachment&.url}
76
- &.each { |attachment| attachments[attachment.url] = resource.id }
73
+ codes = resource.category&.flat_map do |category|
74
+ category.coding&.map { |coding| coding.code if REQUIRED_CATEGORIES.include?(coding.code) }
75
+ end.compact
76
+
77
+ if codes.present?
78
+ resource.presentedForm
79
+ &.select { |attachment| attachment&.url.present? && !attachments.key?(attachment&.url) }
80
+ &.each { |attachment| attachments[attachment.url] = resource.id }
81
+ end
77
82
 
78
- resource.category&.flat_map { |category| category.coding&.map { |coding| coding.code } }
83
+ codes
79
84
  end
80
85
 
81
86
  codes_found.compact.uniq
@@ -8,8 +8,9 @@ module USCoreTestKit
8
8
  id :us_core_v311_allergy_intolerance_validation_test
9
9
  title 'AllergyIntolerance resources returned during previous tests conform to the US Core AllergyIntolerance Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core AllergyIntolerance Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-allergyintolerance',
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_v311_bodyheight_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the Observation Body Height Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [Observation Body Height Profile](http://hl7.org/fhir/StructureDefinition/bodyheight).
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] || [], 'http://hl7.org/fhir/StructureDefinition/bodyheight')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/StructureDefinition/bodyheight',
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_v311_bodytemp_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the Observation Body Temperature Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [Observation Body Temperature Profile](http://hl7.org/fhir/StructureDefinition/bodytemp).
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] || [], 'http://hl7.org/fhir/StructureDefinition/bodytemp')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/StructureDefinition/bodytemp',
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_v311_bodyweight_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the Observation Body Weight Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [Observation Body Weight Profile](http://hl7.org/fhir/StructureDefinition/bodyweight).
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] || [], 'http://hl7.org/fhir/StructureDefinition/bodyweight')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/StructureDefinition/bodyweight',
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_v311_bp_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the Observation Blood Pressure Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [Observation Blood Pressure Profile](http://hl7.org/fhir/StructureDefinition/bp).
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] || [], 'http://hl7.org/fhir/StructureDefinition/bp')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/StructureDefinition/bp',
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_v311_care_plan_validation_test
9
9
  title 'CarePlan resources returned during previous tests conform to the US Core CarePlan Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core CarePlan Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careplan',
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_v311_care_team_validation_test
9
9
  title 'CareTeam resources returned during previous tests conform to the US Core CareTeam Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core CareTeam Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-careteam',
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_v311_condition_validation_test
9
9
  title 'Condition resources returned during previous tests conform to the US Core Condition Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Condition Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-condition',
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_v311_device_validation_test
9
9
  title 'Device resources returned during previous tests conform to the US Core Implantable Device Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Implantable Device Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-implantable-device',
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_v311_diagnostic_report_lab_validation_test
9
9
  title 'DiagnosticReport resources returned during previous tests conform to the US Core DiagnosticReport Profile for Laboratory Results Reporting'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core DiagnosticReport Profile for Laboratory Results Reporting](http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-lab')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-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_v311_diagnostic_report_note_validation_test
9
9
  title 'DiagnosticReport resources returned during previous tests conform to the US Core DiagnosticReport Profile for Report and Note exchange'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core DiagnosticReport Profile for Report and Note exchange](http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-diagnosticreport-note',
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_v311_document_reference_validation_test
9
9
  title 'DocumentReference resources returned during previous tests conform to the US Core DocumentReference Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core DocumentReference Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-documentreference',
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_v311_encounter_validation_test
9
9
  title 'Encounter resources returned during previous tests conform to the US Core Encounter Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Encounter Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter',
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_v311_goal_validation_test
9
9
  title 'Goal resources returned during previous tests conform to the US Core Goal Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Goal Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-goal',
35
+ skip_if_empty: true)
33
36
  end
34
37
  end
35
38
  end
@@ -154,7 +154,7 @@
154
154
  :path: target.measure
155
155
  - :type: Quantity
156
156
  :strength: example
157
- :system:
157
+ :system:
158
158
  :path: target.detail
159
159
  - :type: CodeableConcept
160
160
  :strength: example
@@ -8,8 +8,9 @@ module USCoreTestKit
8
8
  id :us_core_v311_head_circumference_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the US Core Pediatric Head Occipital-frontal Circumference Percentile Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Pediatric Head Occipital-frontal Circumference Percentile Profile](http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/head-occipital-frontal-circumference-percentile',
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_v311_heartrate_validation_test
9
9
  title 'Observation resources returned during previous tests conform to the Observation Heart Rate Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [Observation Heart Rate Profile](http://hl7.org/fhir/StructureDefinition/heartrate).
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] || [], 'http://hl7.org/fhir/StructureDefinition/heartrate')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/StructureDefinition/heartrate',
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_v311_immunization_validation_test
9
9
  title 'Immunization resources returned during previous tests conform to the US Core Immunization Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core Immunization Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-immunization',
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_v311_medication_request_validation_test
9
9
  title 'MedicationRequest resources returned during previous tests conform to the US Core MedicationRequest Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
11
+ This test verifies resources returned from the first search conform to
12
12
  the [US Core MedicationRequest Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest).
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest')
33
+ perform_validation_test(scratch_resources[:all] || [],
34
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-medicationrequest',
35
+ skip_if_empty: true)
33
36
  end
34
37
  end
35
38
  end
@@ -8,7 +8,7 @@ module USCoreTestKit
8
8
  id :us_core_v311_medication_validation_test
9
9
  title 'Medication resources returned during previous tests conform to the US Core Medication Profile'
10
10
  description %(
11
- This test verifies resources returned from previous tests conform to
11
+ This test verifies resources returned from previous tests conform to
12
12
  the [US Core Medication Profile](http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication).
13
13
 
14
14
  It verifies the presence of mandatory elements and that elements with
@@ -29,7 +29,9 @@ fail if their code/system are not found in the valueset.
29
29
  end
30
30
 
31
31
  run do
32
- perform_validation_test(scratch_resources[:all] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication')
32
+ perform_validation_test(scratch_resources[:all] || [],
33
+ 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-medication',
34
+ skip_if_empty: false)
33
35
  end
34
36
  end
35
37
  end
@@ -5269,7 +5269,7 @@
5269
5269
  :path: target.measure
5270
5270
  - :type: Quantity
5271
5271
  :strength: example
5272
- :system:
5272
+ :system:
5273
5273
  :path: target.detail
5274
5274
  - :type: CodeableConcept
5275
5275
  :strength: example
@@ -8,8 +8,9 @@ module USCoreTestKit
8
8
  id :us_core_v311_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
- This test verifies resources returned from the first search conform to
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-observation-lab')
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_v311_organization_validation_test
9
9
  title 'Organization resources returned during previous tests conform to the US Core Organization Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization')
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_v311_patient_validation_test
9
9
  title 'Patient resources returned during previous tests conform to the US Core Patient Profile'
10
10
  description %(
11
- This test verifies resources returned from the first search conform to
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient')
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_v311_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
- This test verifies resources returned from the first search conform to
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/pediatric-bmi-for-age')
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_v311_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
- This test verifies resources returned from the first search conform to
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] || [], 'http://hl7.org/fhir/us/core/StructureDefinition/pediatric-weight-for-height')
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