uds_plus_test_kit 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/uds_plus_test_kit/examples/manifest.json +76 -14
  3. data/lib/uds_plus_test_kit/input_resource_tests/read_immunization_test.rb +54 -0
  4. data/lib/uds_plus_test_kit/input_resource_tests/read_lab_test.rb +54 -0
  5. data/lib/uds_plus_test_kit/input_resource_tests/read_med_request_test.rb +54 -0
  6. data/lib/uds_plus_test_kit/input_resource_tests/read_med_statement_test.rb +54 -0
  7. data/lib/uds_plus_test_kit/input_resource_tests/read_related_person_test.rb +54 -0
  8. data/lib/uds_plus_test_kit/input_resource_tests/read_service_request_test.rb +54 -0
  9. data/lib/uds_plus_test_kit/input_resource_tests/read_special_observation_test.rb +54 -0
  10. data/lib/uds_plus_test_kit/input_resource_tests/resource_group.rb +30 -2
  11. data/lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb +4 -1
  12. data/lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb +16 -2
  13. data/lib/uds_plus_test_kit/post_tests/post_group.rb +59 -0
  14. data/lib/uds_plus_test_kit/post_tests/post_manifest_test.rb +41 -0
  15. data/lib/uds_plus_test_kit/post_tests/read_post_test.rb +32 -0
  16. data/lib/uds_plus_test_kit/uds_plus_test_suite.rb +40 -0
  17. data/lib/uds_plus_test_kit/validate_immunization_test.rb +33 -0
  18. data/lib/uds_plus_test_kit/validate_income_test.rb +7 -10
  19. data/lib/uds_plus_test_kit/validate_lab_test.rb +65 -0
  20. data/lib/uds_plus_test_kit/validate_med_request_test.rb +33 -0
  21. data/lib/uds_plus_test_kit/validate_med_statement_test.rb +33 -0
  22. data/lib/uds_plus_test_kit/validate_related_person_test.rb +33 -0
  23. data/lib/uds_plus_test_kit/validate_service_request_test.rb +33 -0
  24. data/lib/uds_plus_test_kit/validate_sexual_orientation_test.rb +6 -9
  25. data/lib/uds_plus_test_kit/validate_special_observation_test.rb +65 -0
  26. data/lib/uds_plus_test_kit/version.rb +2 -2
  27. metadata +19 -4
  28. data/lib/uds_plus_test_kit/examples/manifest_2.json +0 -101
  29. data/lib/uds_plus_test_kit/examples/manifest_not_deidentified.json +0 -67
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80e78dbee19286a1e0c84c1116ef47474ec612052d994ed37adc3fc1b330eafd
4
- data.tar.gz: a3a6f27dea067f3120aa8f9ba4e22fce59d1d18715bf9dacc507968f92701446
3
+ metadata.gz: 833bd32e478f93c36cbe4fb50ea835bc55ec9791cf9d5cb806453cd01d5b7b74
4
+ data.tar.gz: 173bb5badf6417cb8e498a6b9bdc98bee97c4c614e95103628c973c8f6c977d2
5
5
  SHA512:
6
- metadata.gz: c800f94e83747a35e1807923ffd6b42d6753839624c68e834974c2f7894786b3c3ec913ba100cebd5b18ed6422efdc23bf327168ee3b96fe5493b14727b405ac
7
- data.tar.gz: d375d5d37e9ae1cff23ce6ea10a02513da7653a95ec3a615d8aa94d068486bff51869d7c8ba4caa525f2b3e6d6d3569083dbfa15c5ec11f1ff778ec20cdcf904
6
+ metadata.gz: 2a566b50713875c32e1336080e98ae0728da57ca4eae05f1d82eb11dc88f3b7e10c85019f98d6aa0c08d37f77e4b5b6cee36070d948fb4f9adc25ef37bc2b340
7
+ data.tar.gz: 6ac89fe76b871556e0e7b74666ace21adfc5b137acf67fa1062f99aed9e4eb8bc32f0751a34123ea069f0eaf68efc31e3a6c9baa668ec957c15622e1d9428603
@@ -16,20 +16,65 @@
16
16
  "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-import-manifest"
17
17
  ]
18
18
  },
19
- "parameter": [
20
- {
21
- "name": "inputFormat",
22
- "valueCode": "application/ndjson"
23
- },
24
- {
25
- "name": "inputSource",
26
- "valueUrl": "http://localhost:4567/"
27
- },
28
- {
29
- "name": "storageDetail",
30
- "valueCode": "https"
31
- },
32
- {
19
+ "parameter" : [
20
+ {
21
+ "name" : "inputFormat",
22
+ "valueCode" : "fhir+ndjson"
23
+ },
24
+ {
25
+ "name" : "submissionId",
26
+ "valueString" : "234343-aaa-32432"
27
+ },
28
+ {
29
+ "name" : "hcInformation",
30
+ "part" : [
31
+ {
32
+ "name" : "uei",
33
+ "valueString" : "12343434"
34
+ },
35
+ {
36
+ "name" : "grantNumber",
37
+ "valueString" : "H80CS34333"
38
+ },
39
+ {
40
+ "name" : "hcName",
41
+ "valueString" : "Example FQHC"
42
+ },
43
+ {
44
+ "name" : "hcAddress",
45
+ "valueAddress" : {
46
+ "line": [
47
+ "123 Rocky point place"
48
+ ],
49
+ "city": "Atlanta",
50
+ "state": "GA",
51
+ "postalCode": "23434",
52
+ "country": "US"
53
+ }
54
+ },
55
+ {
56
+ "name" : "hcContactPerson",
57
+ "valueHumanName" : {
58
+ "family": "Taylor",
59
+ "given": [
60
+ "Elizabeth"
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "name" : "hcContactPhone",
66
+ "valueContactPoint" : {
67
+ "system": "phone",
68
+ "value": "234-234-5648"
69
+ }
70
+ }
71
+ ]
72
+ },
73
+ {
74
+ "name" : "importProtocol",
75
+ "valueCode" : "https"
76
+ },
77
+ {
33
78
  "name": "udsData",
34
79
  "part": [
35
80
  {
@@ -63,6 +108,23 @@
63
108
  }
64
109
  ]
65
110
  },
111
+ {
112
+ "name": "udsData",
113
+ "part": [
114
+ {
115
+ "name": "type",
116
+ "valueCode": "Observation"
117
+ },
118
+ {
119
+ "name": "url",
120
+ "valueUrl": "http://localhost:4567/custom/uds_plus/examples/observation"
121
+ },
122
+ {
123
+ "name": "expirationTime",
124
+ "valueDateTime": "2022-12-14T07:15:07-08:00"
125
+ }
126
+ ]
127
+ },
66
128
  {
67
129
  "name": "udsData",
68
130
  "part": [
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadImmunizationTest < Inferno::Test
5
+ id :uds_plus_read_immunization_test
6
+ title 'Receive UDS+ Immunization Data'
7
+ description %(
8
+ Test takes from the user either: the http location of immunization data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :immunization_data,
15
+ title: 'Immunization Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/immunization_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['Immunization'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !immunization_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if immunization_data.strip[0] != '{'
36
+ assert_valid_http_uri(immunization_data, "Location provided is not a valid http uri.")
37
+ get immunization_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(immunization_data, "JSON inputted was not in a valid format")
43
+ data = immunization_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadLabTest < Inferno::Test
5
+ id :uds_plus_read_lab_test
6
+ title 'Receive UDS+ Lab Observation Data'
7
+ description %(
8
+ Test takes from the user either: the http location of lab observation data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :lab_data,
15
+ title: 'Lab Observation Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/lab_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['Observation'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !lab_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if lab_data.strip[0] != '{'
36
+ assert_valid_http_uri(lab_data, "Location provided is not a valid http uri.")
37
+ get lab_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(lab_data, "JSON inputted was not in a valid format")
43
+ data = lab_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadMedicationRequestTest < Inferno::Test
5
+ id :uds_plus_read_medication_request_test
6
+ title 'Receive UDS+ Medication Request Data'
7
+ description %(
8
+ Test takes from the user either: the http location of medication request data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :medication_request_data,
15
+ title: 'Medication Request Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/medication_request_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['MedicationRequest'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !medication_request_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if medication_request_data.strip[0] != '{'
36
+ assert_valid_http_uri(medication_request_data, "Location provided is not a valid http uri.")
37
+ get medication_request_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(medication_request_data, "JSON inputted was not in a valid format")
43
+ data = medication_request_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadMedicationStatementTest < Inferno::Test
5
+ id :uds_plus_read_medication_statement_test
6
+ title 'Receive UDS+ Medication Statement Data'
7
+ description %(
8
+ Test takes from the user either: the http location of medication statement data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :medication_statement_data,
15
+ title: 'Medication Statement Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/medication_statement_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['MedicationStatement'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !medication_statement_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if medication_statement_data.strip[0] != '{'
36
+ assert_valid_http_uri(medication_statement_data, "Location provided is not a valid http uri.")
37
+ get medication_statement_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(medication_statement_data, "JSON inputted was not in a valid format")
43
+ data = medication_statement_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadRelatedPersonTest < Inferno::Test
5
+ id :uds_plus_read_related_person_test
6
+ title 'Receive UDS+ Related Person Data'
7
+ description %(
8
+ Test takes from the user either: the http location of related person data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :related_person_data,
15
+ title: 'Related Person Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/related_person_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['RelatedPerson'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !related_person_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if related_person_data.strip[0] != '{'
36
+ assert_valid_http_uri(related_person_data, "Location provided is not a valid http uri.")
37
+ get related_person_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(related_person_data, "JSON inputted was not in a valid format")
43
+ data = related_person_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadServiceRequestTest < Inferno::Test
5
+ id :uds_plus_read_service_request_test
6
+ title 'Receive UDS+ Service Request Data'
7
+ description %(
8
+ Test takes from the user either: the http location of service request data
9
+ or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :service_request_data,
15
+ title: 'Service Request Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/service_request_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['ServiceRequest'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !service_request_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if service_request_data.strip[0] != '{'
36
+ assert_valid_http_uri(service_request_data, "Location provided is not a valid http uri.")
37
+ get service_request_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(service_request_data, "JSON inputted was not in a valid format")
43
+ data = service_request_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadSpecialObservationTest < Inferno::Test
5
+ id :uds_plus_read_special_observation_test
6
+ title 'Receive UDS+ Special Observation Data'
7
+ description %(
8
+ Test takes from the user either: the http location of special observation data
9
+ (such as uds-special-population-observation) or the raw JSON of the data itself.
10
+ It attempts to GET the data stored at the given location if a link is provided,
11
+ then validates whether a FHIR resource can be generated from the input data.
12
+ )
13
+
14
+ input :special_observation_data,
15
+ title: 'Special Observation Data',
16
+ optional: true,
17
+ description: %q(
18
+ User can input the data as:
19
+ a URL link to the location of the data (ex: http://www.example.com/special_observation_data.json)
20
+ OR a JSON string that composes the data. Leaving this blank will skip the test.
21
+ )
22
+
23
+ def data_scratch
24
+ scratch[:data_resources] ||= {}
25
+ end
26
+
27
+ def data_to_test
28
+ data_scratch['Observation'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !special_observation_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if special_observation_data.strip[0] != '{'
36
+ assert_valid_http_uri(special_observation_data, "Location provided is not a valid http uri.")
37
+ get special_observation_data
38
+ assert_response_status(200)
39
+ assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
40
+ data = request.response_body
41
+ else
42
+ assert_valid_json(special_observation_data, "JSON inputted was not in a valid format")
43
+ data = special_observation_data
44
+ end
45
+
46
+ resource = FHIR::Json.from_json(data)
47
+ assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
48
+
49
+ if resource.is_a?(FHIR::Model)
50
+ data_to_test << resource
51
+ end
52
+ end
53
+ end
54
+ end
@@ -15,6 +15,20 @@ require_relative '../validate_procedure_test'
15
15
  require_relative '../validate_sexual_orientation_test'
16
16
  require_relative './read_manifest_ind_test'
17
17
  require_relative '../manifest_tests/validate_manifest_test'
18
+ require_relative './read_special_observation_test'
19
+ require_relative '../validate_special_observation_test'
20
+ require_relative './read_related_person_test'
21
+ require_relative '../validate_related_person_test'
22
+ require_relative './read_immunization_test'
23
+ require_relative '../validate_immunization_test'
24
+ require_relative './read_lab_test'
25
+ require_relative '../validate_lab_test'
26
+ require_relative './read_med_request_test'
27
+ require_relative '../validate_med_request_test'
28
+ require_relative './read_med_statement_test'
29
+ require_relative '../validate_med_statement_test'
30
+ require_relative './read_service_request_test'
31
+ require_relative '../validate_service_request_test'
18
32
 
19
33
  module UDSPlusTestKit
20
34
  class UDSPlusResourceTestGroup < Inferno::TestGroup
@@ -39,13 +53,27 @@ module UDSPlusTestKit
39
53
  test from: :uds_plus_validate_diagnosis_test
40
54
  test from: :uds_plus_read_encounter_test
41
55
  test from: :uds_plus_validate_encounter_test
42
- test from: :uds_plus_read_income_test
43
- test from: :uds_plus_validate_income_test
44
56
  test from: :uds_plus_read_patient_test
45
57
  test from: :uds_plus_validate_patient_test
46
58
  test from: :uds_plus_read_procedure_test
47
59
  test from: :uds_plus_validate_procedure_test
60
+ test from: :uds_plus_read_related_person_test
61
+ test from: :uds_plus_validate_related_person_test
62
+ test from: :uds_plus_read_immunization_test
63
+ test from: :uds_plus_validate_immunization_test
64
+ test from: :uds_plus_read_income_test
65
+ test from: :uds_plus_validate_income_test
48
66
  test from: :uds_plus_read_sexual_orientation_test
49
67
  test from: :uds_plus_validate_sexual_orientation_test
68
+ test from: :uds_plus_read_lab_test
69
+ test from: :uds_plus_validate_lab_test
70
+ test from: :uds_plus_read_special_observation_test
71
+ test from: :uds_plus_read_medication_request_test
72
+ test from: :uds_plus_validate_medication_request_test
73
+ test from: :uds_plus_read_medication_statement_test
74
+ test from: :uds_plus_validate_medication_statement_test
75
+ test from: :uds_plus_read_service_request_test
76
+ test from: :uds_plus_validate_service_request_test
77
+ test from: :uds_plus_validate_special_observation_test
50
78
  end
51
79
  end
@@ -17,7 +17,10 @@ module UDSPlusTestKit
17
17
  def valid_data_types
18
18
  [
19
19
  'Coverage', 'Condition', 'Encounter',
20
- 'Observation', 'Patient', 'Procedure'
20
+ 'Observation', 'Patient', 'Procedure',
21
+ 'RelatedPerson', 'Immunization',
22
+ 'ServiceRequest', 'MedicationRequest',
23
+ 'MedicationStatement'
21
24
  ]
22
25
  end
23
26
 
@@ -10,10 +10,17 @@ require_relative './validate_manifest_test'
10
10
  require_relative '../validate_patient_test'
11
11
  require_relative '../validate_procedure_test'
12
12
  require_relative '../validate_sexual_orientation_test'
13
+ require_relative '../validate_special_observation_test'
14
+ require_relative '../validate_related_person_test'
15
+ require_relative '../validate_immunization_test'
16
+ require_relative '../validate_lab_test'
17
+ require_relative '../validate_med_request_test'
18
+ require_relative '../validate_med_statement_test'
19
+ require_relative '../validate_service_request_test'
13
20
 
14
21
  module UDSPlusTestKit
15
22
  class UDSPlusTestGroup < Inferno::TestGroup
16
- title 'Data Submitter Tests'
23
+ title 'Import Manifest Tests'
17
24
  id :uds_plus_test_group
18
25
  description %(
19
26
  The tests below validate the import manifest produced by a UDS+ Data Submitter.
@@ -30,10 +37,17 @@ module UDSPlusTestKit
30
37
  test from: :uds_plus_validate_coverage_test
31
38
  test from: :uds_plus_validate_diagnosis_test
32
39
  test from: :uds_plus_validate_encounter_test
33
- test from: :uds_plus_validate_income_test
34
40
  test from: :uds_plus_validate_patient_test
35
41
  test from: :uds_plus_validate_procedure_test
42
+ test from: :uds_plus_validate_related_person_test
43
+ test from: :uds_plus_validate_immunization_test
44
+ test from: :uds_plus_validate_income_test
36
45
  test from: :uds_plus_validate_sexual_orientation_test
46
+ test from: :uds_plus_validate_lab_test
47
+ test from: :uds_plus_validate_special_observation_test
48
+ test from: :uds_plus_validate_medication_request_test
49
+ test from: :uds_plus_validate_medication_statement_test
50
+ test from: :uds_plus_validate_service_request_test
37
51
  test from: :uds_plus_invalid_type_test
38
52
  end
39
53
  end
@@ -0,0 +1,59 @@
1
+
2
+ require_relative '../version'
3
+
4
+ require_relative './post_manifest_test'
5
+ require_relative './read_post_test'
6
+
7
+ require_relative '../manifest_tests/invalid_type_test'
8
+ require_relative '../manifest_tests/read_data_test'
9
+ require_relative '../manifest_tests/validate_manifest_test'
10
+
11
+ require_relative '../validate_coverage_test'
12
+ require_relative '../validate_diagnosis_test'
13
+ require_relative '../validate_encounter_test'
14
+ require_relative '../validate_income_test'
15
+ require_relative '../validate_patient_test'
16
+ require_relative '../validate_procedure_test'
17
+ require_relative '../validate_sexual_orientation_test'
18
+ require_relative '../validate_special_observation_test'
19
+ require_relative '../validate_related_person_test'
20
+ require_relative '../validate_immunization_test'
21
+ require_relative '../validate_lab_test'
22
+ require_relative '../validate_med_request_test'
23
+ require_relative '../validate_med_statement_test'
24
+ require_relative '../validate_service_request_test'
25
+
26
+ module UDSPlusTestKit
27
+ class UDSPlusPostGroup < Inferno::TestGroup
28
+ title 'End-to-End Import Manifest Tests'
29
+ id :uds_plus_manifest_post_group
30
+ description %(
31
+ The tests below validate the import manifest produced by a UDS+ Data Submitter.
32
+ This receiver will take a provided Import Manifest via POST request to a given
33
+ location and validate its contents. This includes validating the structure
34
+ of the manifest, as well as the structure of the data the manifest points to.
35
+ )
36
+
37
+ run_as_group
38
+
39
+ test from: :uds_plus_post_manifest_test
40
+ test from: :uds_plus_read_post_test
41
+ test from: :uds_plus_validate_manifest_test
42
+ test from: :uds_plus_read_data_test
43
+ test from: :uds_plus_validate_coverage_test
44
+ test from: :uds_plus_validate_diagnosis_test
45
+ test from: :uds_plus_validate_encounter_test
46
+ test from: :uds_plus_validate_patient_test
47
+ test from: :uds_plus_validate_procedure_test
48
+ test from: :uds_plus_validate_related_person_test
49
+ test from: :uds_plus_validate_immunization_test
50
+ test from: :uds_plus_validate_income_test
51
+ test from: :uds_plus_validate_sexual_orientation_test
52
+ test from: :uds_plus_validate_lab_test
53
+ test from: :uds_plus_validate_special_observation_test
54
+ test from: :uds_plus_validate_medication_request_test
55
+ test from: :uds_plus_validate_medication_statement_test
56
+ test from: :uds_plus_validate_service_request_test
57
+ test from: :uds_plus_invalid_type_test
58
+ end
59
+ end