uds_plus_test_kit 0.9.0
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 +7 -0
- data/LICENSE +201 -0
- data/lib/uds_plus_test_kit/examples/manifest.json +84 -0
- data/lib/uds_plus_test_kit/examples/manifest_2.json +101 -0
- data/lib/uds_plus_test_kit/examples/manifest_not_deidentified.json +67 -0
- data/lib/uds_plus_test_kit/igs/package/CapabilityStatement-uds-plus-data-receiver-server.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CapabilityStatement-uds-plus-data-source.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CapabilityStatement-uds-plus-data-submitter-client.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CapabilityStatement-uds-plus-trust-service-provider.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CodeSystem-udsplus-agriculture-worker-status-codes.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CodeSystem-udsplus-housing-status-codes.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/CodeSystem-udsplus-insurance-codes.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/ImplementationGuide-udsplus.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/OperationDefinition-import.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/OperationDefinition-udsplus-de-identify.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-de-identified-uds-plus-patient.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-age-extension.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-agriculture-worker-status-extension.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-coverage.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-deidentify-data.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-diagnosis.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-encounter.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-housing-status-extension.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-import-manifest.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-income-observation.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-procedure.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-uds-plus-sexual-orientation-observation.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/StructureDefinition-udsplus-agriculture-worker-status.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Condition-de-identified-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Condition-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Encounter-de-identified-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Encounter-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Parameters-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Patient-de-identified-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Patient-de-identified-smallpop-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Patient-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/example/Patient-smallpop-example.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/openapi/uds-plus-data-receiver-server.openapi.json +152 -0
- data/lib/uds_plus_test_kit/igs/package/openapi/uds-plus-data-source.openapi.json +152 -0
- data/lib/uds_plus_test_kit/igs/package/openapi/uds-plus-data-submitter-client.openapi.json +106 -0
- data/lib/uds_plus_test_kit/igs/package/openapi/uds-plus-trust-service-provider.openapi.json +152 -0
- data/lib/uds_plus_test_kit/igs/package/other/ig-r4.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/other/validation-oo.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/other/validation-summary.json +1 -0
- data/lib/uds_plus_test_kit/igs/package/package.json +27 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_coverage_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_diagnosis_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_encounter_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_income_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_patient_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_procedure_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/read_sexual_orientation_test.rb +54 -0
- data/lib/uds_plus_test_kit/input_resource_tests/resource_group.rb +51 -0
- data/lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb +40 -0
- data/lib/uds_plus_test_kit/manifest_tests/read_data_test.rb +75 -0
- data/lib/uds_plus_test_kit/manifest_tests/read_manifest_test.rb +51 -0
- data/lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb +39 -0
- data/lib/uds_plus_test_kit/manifest_tests/validate_manifest_test.rb +28 -0
- data/lib/uds_plus_test_kit/uds_plus_test_suite.rb +50 -0
- data/lib/uds_plus_test_kit/validate_coverage_test.rb +33 -0
- data/lib/uds_plus_test_kit/validate_diagnosis_test.rb +33 -0
- data/lib/uds_plus_test_kit/validate_encounter_test.rb +33 -0
- data/lib/uds_plus_test_kit/validate_income_test.rb +68 -0
- data/lib/uds_plus_test_kit/validate_patient_test.rb +33 -0
- data/lib/uds_plus_test_kit/validate_procedure_test.rb +33 -0
- data/lib/uds_plus_test_kit/validate_sexual_orientation_test.rb +68 -0
- data/lib/uds_plus_test_kit/version.rb +6 -0
- data/lib/uds_plus_test_kit.rb +1 -0
- metadata +182 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"resourceType":"Bundle","type":"collection","timestamp":"2023-04-05T12:57:50.562-04:00","entry":[{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/ImplementationGuide-udsplus","resource":{"resourceType":"OperationOutcome","id":"ImplementationGuide-udsplus"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Patient-de-identified-example","resource":{"resourceType":"OperationOutcome","id":"Patient-de-identified-example","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Validation_VAL_Profile_Maximum"}],"severity":"error","code":"structure","details":{"text":"Patient.text: max allowed = 0, but found 1 (from http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient|0.3.0)"},"expression":["Patient/de-identified-example: Patient"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Condition-example","resource":{"resourceType":"OperationOutcome","id":"Condition-example"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Encounter-example","resource":{"resourceType":"OperationOutcome","id":"Encounter-example","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":31},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":6},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"TerminologyEngine"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-encounter-type because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.ama-assn.org/go/cpt' is unknown so the code cannot be validated]"}],"severity":"warning","code":"code-invalid","details":{"text":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-encounter-type because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.ama-assn.org/go/cpt' is unknown so the code cannot be validated]"},"expression":["Encounter/example: Encounter.type[0]"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":50},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":6},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"TerminologyEngine"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-discharge-disposition because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.nubc.org/patient-discharge' is unknown so the code cannot be validated]"}],"severity":"warning","code":"code-invalid","details":{"text":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-discharge-disposition because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.nubc.org/patient-discharge' is unknown so the code cannot be validated]"},"expression":["Encounter/example: Encounter.hospitalization.dischargeDisposition"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Patient-smallpop-example","resource":{"resourceType":"OperationOutcome","id":"Patient-smallpop-example"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Condition-de-identified-example","resource":{"resourceType":"OperationOutcome","id":"Condition-de-identified-example","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Validation_VAL_Profile_Maximum"}],"severity":"error","code":"structure","details":{"text":"Condition.text: max allowed = 0, but found 1 (from http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-diagnosis|0.3.0)"},"expression":["Condition/de-identified-example: Condition"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Patient-example","resource":{"resourceType":"OperationOutcome","id":"Patient-example"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Parameters-example","resource":{"resourceType":"OperationOutcome","id":"Parameters-example"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Encounter-de-identified-example","resource":{"resourceType":"OperationOutcome","id":"Encounter-de-identified-example","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Validation_VAL_Profile_Minimum"}],"severity":"error","code":"structure","details":{"text":"Encounter.extension:uds-plus-age-extension: minimum required = 1, but only found 0 (from http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-encounter|0.3.0)"},"expression":["Encounter/de-identified-example: Encounter"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":27},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":6},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"TerminologyEngine"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-encounter-type because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.ama-assn.org/go/cpt' is unknown so the code cannot be validated]"}],"severity":"warning","code":"code-invalid","details":{"text":"[Unable to determine whether the provided codes are in the value set http://hl7.org/fhir/us/core/ValueSet/us-core-encounter-type because the value set or a code system it depends on is not known to the validator, Code System URI 'http://www.ama-assn.org/go/cpt' is unknown so the code cannot be validated]"},"expression":["Encounter/de-identified-example: Encounter.type[0]"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/Patient-de-identified-smallpop-example","resource":{"resourceType":"OperationOutcome","id":"Patient-de-identified-smallpop-example","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Validation_VAL_Profile_Maximum"}],"severity":"error","code":"structure","details":{"text":"Patient.text: max allowed = 0, but found 1 (from http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient|0.3.0)"},"expression":["Patient/de-identified-smallpop-example: Patient"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CodeSystem-udsplus-housing-status-codes","resource":{"resourceType":"OperationOutcome","id":"CodeSystem-udsplus-housing-status-codes","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2993},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"TYPE_SPECIFIC_CHECKS_DT_CANONICAL_RESOLVE"}],"severity":"error","code":"structure","details":{"text":"Canonical URL 'http://hl7.org/fhir/us/uds-plus/ValueSet/udsplus-housing-status' does not resolve"},"expression":["CodeSystem/udsplus-housing-status-codes: CodeSystem.valueSet"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-diagnosis","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-diagnosis"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-age-extension","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-age-extension"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CapabilityStatement-uds-plus-data-submitter-client","resource":{"resourceType":"OperationOutcome","id":"CapabilityStatement-uds-plus-data-submitter-client"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-sexual-orientation-observation","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-sexual-orientation-observation","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"}],"severity":"error","code":"business-rule","details":{"text":"The target profile http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient is not a valid constraint on the base ([CanonicalType[http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient]]) at Observation.subject"},"expression":["StructureDefinition/uds-plus-sexual-orientation-observation: StructureDefinition"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this profile"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-sexual-orientation-observation')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CodeSystem-udsplus-insurance-codes","resource":{"resourceType":"OperationOutcome","id":"CodeSystem-udsplus-insurance-codes","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2520},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"TYPE_SPECIFIC_CHECKS_DT_CANONICAL_RESOLVE"}],"severity":"error","code":"structure","details":{"text":"Canonical URL 'http://hl7.org/fhir/us/uds-plus/ValueSet/udsplus-insurance' does not resolve"},"expression":["CodeSystem/udsplus-insurance-codes: CodeSystem.valueSet"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-income-observation","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-income-observation","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this profile"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-income-observation')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CapabilityStatement-uds-plus-data-source","resource":{"resourceType":"OperationOutcome","id":"CapabilityStatement-uds-plus-data-source"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-deidentify-data","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-deidentify-data","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this profile"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-deidentify-data')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-import-manifest","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-import-manifest"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/OperationDefinition-udsplus-de-identify","resource":{"resourceType":"OperationOutcome","id":"OperationDefinition-udsplus-de-identify"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-udsplus-agriculture-worker-status","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-udsplus-agriculture-worker-status","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":12720},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Type_Specific_Checks_DT_URL_Resolve"}],"severity":"error","code":"structure","details":{"text":"URL value 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/udsplus-agriculture-worker-status-extension' does not resolve"},"expression":["StructureDefinition/udsplus-agriculture-worker-status: StructureDefinition.snapshot.element[3].fixed.ofType(uri)"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":13892},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"Type_Specific_Checks_DT_URL_Resolve"}],"severity":"error","code":"structure","details":{"text":"URL value 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/udsplus-agriculture-worker-status-extension' does not resolve"},"expression":["StructureDefinition/udsplus-agriculture-worker-status: StructureDefinition.differential.element[1].fixed.ofType(uri)"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this extension"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/udsplus-agriculture-worker-status')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CapabilityStatement-uds-plus-trust-service-provider","resource":{"resourceType":"OperationOutcome","id":"CapabilityStatement-uds-plus-trust-service-provider"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CapabilityStatement-uds-plus-data-receiver-server","resource":{"resourceType":"OperationOutcome","id":"CapabilityStatement-uds-plus-data-receiver-server"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-procedure","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-procedure","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"ProfileValidator"}],"severity":"error","code":"structure","details":{"text":"The diff list size changed when sorting - was 5 is now 1"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-procedure')"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"ProfileValidator"}],"severity":"error","code":"structure","details":{"text":"Sort failed: counts differ; at least one of the paths in the differential is illegal"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-procedure')"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this profile"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-procedure')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-de-identified-uds-plus-patient","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-de-identified-uds-plus-patient"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-agriculture-worker-status-extension","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-agriculture-worker-status-extension","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this extension"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-agriculture-worker-status-extension')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-encounter","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-encounter"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/OperationDefinition-import","resource":{"resourceType":"OperationOutcome","id":"OperationDefinition-import"}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-housing-status-extension","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-housing-status-extension","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this extension"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-housing-status-extension')"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/CodeSystem-udsplus-agriculture-worker-status-codes","resource":{"resourceType":"OperationOutcome","id":"CodeSystem-udsplus-agriculture-worker-status-codes","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-line","valueInteger":1},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-col","valueInteger":2237},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"},{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-message-id","valueCode":"TYPE_SPECIFIC_CHECKS_DT_CANONICAL_RESOLVE"}],"severity":"error","code":"structure","details":{"text":"Canonical URL 'http://hl7.org/fhir/us/uds-plus/ValueSet/udsplus-agriculture-worker-status' does not resolve"},"expression":["CodeSystem/udsplus-agriculture-worker-status-codes: CodeSystem.valueSet"]}]}},{"fullUrl":"http://hl7.org/fhir/us/uds-plus/OperationOutcome/StructureDefinition-uds-plus-coverage","resource":{"resourceType":"OperationOutcome","id":"StructureDefinition-uds-plus-coverage","issue":[{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"InstanceValidator"}],"severity":"warning","code":"business-rule","details":{"text":"The valueSet reference https://cts.nlm.nih.gov/fhir/ValueSet/2.16.840.1.114222.4.11.3591 on element Coverage.type could not be resolved"},"expression":["StructureDefinition/uds-plus-coverage: StructureDefinition.snapshot.element[11].binding"]},{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/operationoutcome-issue-source","valueCode":"Publisher"}],"severity":"warning","code":"business-rule","details":{"text":"The Implementation Guide contains no examples for this profile"},"expression":["StructureDefinition.where(url = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-coverage')"]}]}}]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"ImplementationGuide/udsplus":{"errors":0,"warnings":0},"Patient/de-identified-example":{"errors":1,"warnings":0},"Condition/example":{"errors":0,"warnings":0},"Encounter/example":{"errors":0,"warnings":2},"Patient/smallpop-example":{"errors":0,"warnings":0},"Condition/de-identified-example":{"errors":1,"warnings":0},"Patient/example":{"errors":0,"warnings":0},"Parameters/example":{"errors":0,"warnings":0},"Encounter/de-identified-example":{"errors":1,"warnings":1},"Patient/de-identified-smallpop-example":{"errors":1,"warnings":0},"CodeSystem/udsplus-housing-status-codes":{"errors":1,"warnings":0},"StructureDefinition/uds-plus-diagnosis":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-age-extension":{"errors":0,"warnings":0},"CapabilityStatement/uds-plus-data-submitter-client":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-sexual-orientation-observation":{"errors":1,"warnings":1},"CodeSystem/udsplus-insurance-codes":{"errors":1,"warnings":0},"StructureDefinition/uds-plus-income-observation":{"errors":0,"warnings":1},"CapabilityStatement/uds-plus-data-source":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-deidentify-data":{"errors":0,"warnings":1},"StructureDefinition/uds-plus-import-manifest":{"errors":0,"warnings":0},"OperationDefinition/udsplus-de-identify":{"errors":0,"warnings":0},"StructureDefinition/udsplus-agriculture-worker-status":{"errors":2,"warnings":1},"CapabilityStatement/uds-plus-trust-service-provider":{"errors":0,"warnings":0},"CapabilityStatement/uds-plus-data-receiver-server":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-procedure":{"errors":2,"warnings":1},"StructureDefinition/de-identified-uds-plus-patient":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-agriculture-worker-status-extension":{"errors":0,"warnings":1},"StructureDefinition/uds-plus-encounter":{"errors":0,"warnings":0},"OperationDefinition/import":{"errors":0,"warnings":0},"StructureDefinition/uds-plus-housing-status-extension":{"errors":0,"warnings":1},"CodeSystem/udsplus-agriculture-worker-status-codes":{"errors":1,"warnings":0},"StructureDefinition/uds-plus-coverage":{"errors":0,"warnings":2}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name" : "fhir.us.udsplus",
|
|
3
|
+
"version" : "0.3.0",
|
|
4
|
+
"tools-version" : 3,
|
|
5
|
+
"type" : "IG",
|
|
6
|
+
"date" : "20230405125624",
|
|
7
|
+
"license" : "CC0-1.0",
|
|
8
|
+
"canonical" : "http://hl7.org/fhir/us/uds-plus",
|
|
9
|
+
"notForPublication" : true,
|
|
10
|
+
"url" : "file:///Users/nbashyam/git/uds-plus/output",
|
|
11
|
+
"title" : "Uniform Data System (UDS) Patient Level Submission (PLS) - UDS+ IG",
|
|
12
|
+
"description" : "A brief description of what udsplus is about (probably the same text as in your readme) (built Wed, Apr 5, 2023 12:56-0400-04:00)",
|
|
13
|
+
"fhirVersions" : ["4.0.1"],
|
|
14
|
+
"dependencies" : {
|
|
15
|
+
"hl7.fhir.r4.core" : "4.0.1",
|
|
16
|
+
"hl7.terminology.r4" : "5.0.0",
|
|
17
|
+
"hl7.fhir.us.core" : "5.0.1",
|
|
18
|
+
"hl7.fhir.uv.bulkdata" : "1.0.1",
|
|
19
|
+
"hl7.fhir.uv.smart-app-launch" : "2.0.0",
|
|
20
|
+
"hl7.fhir.us.davinci-deqm" : "3.0.0"
|
|
21
|
+
},
|
|
22
|
+
"author" : "HRSA UDS PLS Project",
|
|
23
|
+
"directories" : {
|
|
24
|
+
"lib" : "package",
|
|
25
|
+
"example" : "example"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
module UDSPlusTestKit
|
|
4
|
+
class ReadCoverageTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_coverage_test
|
|
6
|
+
title 'Receive UDS+ Coverage Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of coverage 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 :coverage_data,
|
|
15
|
+
title: 'Coverage 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/coverage_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['Coverage'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
omit_if !coverage_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if coverage_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(coverage_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get coverage_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(coverage_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = coverage_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 ReadDiagnosisTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_diagnosis_test
|
|
6
|
+
title 'Receive UDS+ Diagnosis Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of diagnosis 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 :diagnosis_data,
|
|
15
|
+
title: 'Diagnosis 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/diagnosis_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['Condition'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
omit_if !diagnosis_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if diagnosis_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(diagnosis_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get diagnosis_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(diagnosis_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = diagnosis_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 ReadEncounterTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_encounter_test
|
|
6
|
+
title 'Receive UDS+ Encounter Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of encounter 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 :encounter_data,
|
|
15
|
+
title: 'Encounter 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/encounter_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['Encounter'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
omit_if !encounter_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if encounter_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(encounter_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get encounter_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(encounter_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = encounter_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 ReadIncomeTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_income_test
|
|
6
|
+
title 'Receive UDS+ Income Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of income 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 :income_data,
|
|
15
|
+
title: 'Income 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/income_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 !income_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if income_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(income_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get income_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(income_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = income_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 ReadPatientTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_patient_test
|
|
6
|
+
title 'Receive UDS+ Patient Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of patient 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 :patient_data,
|
|
15
|
+
title: 'Patient 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/patient_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['Patient'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
omit_if !patient_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if patient_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(patient_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get patient_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(patient_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = patient_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 ReadProcedureTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_procedure_test
|
|
6
|
+
title 'Receive UDS+ Procedure Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of procedure 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 :procedure_data,
|
|
15
|
+
title: 'Procedure 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/procedure_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['Procedure'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
omit_if !procedure_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if procedure_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(procedure_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get procedure_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(procedure_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = procedure_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 ReadSexualOrientationTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_sexual_orientation_test
|
|
6
|
+
title 'Receive UDS+ Sexual Orientation Data'
|
|
7
|
+
description %(
|
|
8
|
+
Test takes from the user either: the http location of sexual orientation 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 :sexual_orientation_data,
|
|
15
|
+
title: 'Sexual Orientation 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/sexual_orientation_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 !sexual_orientation_data.present?, "No data provided; skipping test."
|
|
33
|
+
|
|
34
|
+
# if the input is a url, else it is a json
|
|
35
|
+
if sexual_orientation_data.strip[0] != '{'
|
|
36
|
+
assert_valid_http_uri(sexual_orientation_data, "Location provided is not a valid http uri.")
|
|
37
|
+
get sexual_orientation_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(sexual_orientation_data, "JSON inputted was not in a valid format")
|
|
43
|
+
data = sexual_orientation_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,51 @@
|
|
|
1
|
+
require_relative '../version'
|
|
2
|
+
require_relative './read_coverage_test'
|
|
3
|
+
require_relative './read_diagnosis_test'
|
|
4
|
+
require_relative './read_encounter_test'
|
|
5
|
+
require_relative './read_income_test'
|
|
6
|
+
require_relative './read_patient_test'
|
|
7
|
+
require_relative './read_procedure_test'
|
|
8
|
+
require_relative './read_sexual_orientation_test'
|
|
9
|
+
require_relative '../validate_coverage_test'
|
|
10
|
+
require_relative '../validate_diagnosis_test'
|
|
11
|
+
require_relative '../validate_encounter_test'
|
|
12
|
+
require_relative '../validate_income_test'
|
|
13
|
+
require_relative '../validate_patient_test'
|
|
14
|
+
require_relative '../validate_procedure_test'
|
|
15
|
+
require_relative '../validate_sexual_orientation_test'
|
|
16
|
+
require_relative '../manifest_tests/read_manifest_test'
|
|
17
|
+
require_relative '../manifest_tests/validate_manifest_test'
|
|
18
|
+
|
|
19
|
+
module UDSPlusTestKit
|
|
20
|
+
class UDSPlusResourceTestGroup < Inferno::TestGroup
|
|
21
|
+
title 'Individual Resource Tests'
|
|
22
|
+
id :uds_plus_resource_test_group
|
|
23
|
+
description %(
|
|
24
|
+
The tests below skip the import manifest step. Instead,
|
|
25
|
+
users can input individual resources, either by url or as
|
|
26
|
+
a raw json, and have these resources validated. **Important Note:**
|
|
27
|
+
The purpose of these tests is to quickly test a specific resource.
|
|
28
|
+
The test can only handle one json resource per type, unlike the
|
|
29
|
+
Data Submitter test, which can handle an ndjson containing many objects.
|
|
30
|
+
)
|
|
31
|
+
|
|
32
|
+
run_as_group
|
|
33
|
+
|
|
34
|
+
test from: :uds_plus_read_manifest_test
|
|
35
|
+
test from: :uds_plus_validate_manifest_test
|
|
36
|
+
test from: :uds_plus_read_coverage_test
|
|
37
|
+
test from: :uds_plus_validate_coverage_test
|
|
38
|
+
test from: :uds_plus_read_diagnosis_test
|
|
39
|
+
test from: :uds_plus_validate_diagnosis_test
|
|
40
|
+
test from: :uds_plus_read_encounter_test
|
|
41
|
+
test from: :uds_plus_validate_encounter_test
|
|
42
|
+
test from: :uds_plus_read_income_test
|
|
43
|
+
test from: :uds_plus_validate_income_test
|
|
44
|
+
test from: :uds_plus_read_patient_test
|
|
45
|
+
test from: :uds_plus_validate_patient_test
|
|
46
|
+
test from: :uds_plus_read_procedure_test
|
|
47
|
+
test from: :uds_plus_validate_procedure_test
|
|
48
|
+
test from: :uds_plus_read_sexual_orientation_test
|
|
49
|
+
test from: :uds_plus_validate_sexual_orientation_test
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
module UDSPlusTestKit
|
|
2
|
+
class InvalidTypeTest < Inferno::Test
|
|
3
|
+
id :uds_plus_invalid_type_test
|
|
4
|
+
title 'Check For Invalid Types in Import Manifest'
|
|
5
|
+
description %(
|
|
6
|
+
Test checks the titles of the data URLs found in
|
|
7
|
+
the import manifest, and verifies that each of
|
|
8
|
+
the titles provided matches with a known UDS+ data
|
|
9
|
+
type. Test returns a list of unmatched types found
|
|
10
|
+
in the manifest, or passes if all titles are valid.
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
def data_scratch
|
|
14
|
+
scratch[:data_resources] ||= {}
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def valid_data_types
|
|
18
|
+
[
|
|
19
|
+
'Coverage', 'Condition', 'Encounter',
|
|
20
|
+
'Observation', 'Patient', 'Procedure'
|
|
21
|
+
]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
run do
|
|
25
|
+
invalid_types_found = []
|
|
26
|
+
data_scratch.keys.each do |data_type|
|
|
27
|
+
if !valid_data_types.include?(data_type)
|
|
28
|
+
invalid_types_found << data_type
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
fail_message = %(
|
|
33
|
+
The following invalid resource types were declared
|
|
34
|
+
in the import manifest: #{invalid_types_found}.
|
|
35
|
+
)
|
|
36
|
+
assert invalid_types_found.empty?, fail_message
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
module UDSPlusTestKit
|
|
4
|
+
class ReadDataTest < Inferno::Test
|
|
5
|
+
id :uds_plus_read_data_test
|
|
6
|
+
title 'Read the contents of the import manifest'
|
|
7
|
+
description %(
|
|
8
|
+
Test iterates through the data that the Import Manifest
|
|
9
|
+
links to. It validates whether an ndjson is found at the given points,
|
|
10
|
+
and if FHIR models can be created by the values enclosed.
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
def manifest_scratch
|
|
14
|
+
scratch[:manifest_resources] ||= {}
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def manifest_resources
|
|
18
|
+
manifest_scratch[:all] ||= []
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def data_scratch
|
|
22
|
+
scratch[:data_resources] ||= {}
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def manifest_content
|
|
26
|
+
return [] if manifest_resources.empty?
|
|
27
|
+
manifest_hash = JSON.parse(manifest_resources.first.to_json)
|
|
28
|
+
manifest_hash['parameter'] ||= []
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
run do
|
|
32
|
+
skip_if manifest_content.empty?, "No valid resource object generated in first test, so this test will be skipped."
|
|
33
|
+
|
|
34
|
+
manifest_content.each do |source|
|
|
35
|
+
#Iterate through manifest until udsData is found
|
|
36
|
+
next if source['name'] != 'udsData'
|
|
37
|
+
|
|
38
|
+
profile_name = "NO NAME"
|
|
39
|
+
profile_url = "NO URL"
|
|
40
|
+
source['part'].each do |container|
|
|
41
|
+
case container['name']
|
|
42
|
+
when 'type'
|
|
43
|
+
profile_name = container['valueCode']
|
|
44
|
+
when 'url'
|
|
45
|
+
profile_url = container['valueUrl']
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
assert profile_name != "NO NAME" && profile_url != "NO URL", %(
|
|
50
|
+
Input Manifest is not configured such that resource type and url
|
|
51
|
+
for a given input is conventionally accessible.
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
data_scratch[profile_name] ||= []
|
|
55
|
+
|
|
56
|
+
invalid_uri_message = "Invalid URL provided for type #{profile_name}"
|
|
57
|
+
assert_valid_http_uri(profile_url, invalid_uri_message)
|
|
58
|
+
|
|
59
|
+
get profile_url
|
|
60
|
+
assert_response_status(200)
|
|
61
|
+
|
|
62
|
+
request.response_body.each_line do |json_body|
|
|
63
|
+
assert_valid_json(json_body)
|
|
64
|
+
|
|
65
|
+
resource = FHIR::Json.from_json(json_body)
|
|
66
|
+
|
|
67
|
+
assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the #{profile_name} input provided"
|
|
68
|
+
if resource.is_a?(FHIR::Model)
|
|
69
|
+
data_scratch[profile_name] << resource
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|