uds_plus_test_kit 1.0.3 → 1.0.5

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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/uds_plus_test_kit/examples/invalid_encounter.ndjson +1 -1
  3. data/lib/uds_plus_test_kit/examples/invalid_patient.ndjson +2 -2
  4. data/lib/uds_plus_test_kit/examples/manifest.json +8 -4
  5. data/lib/uds_plus_test_kit/examples/observation.ndjson +1 -1
  6. data/lib/uds_plus_test_kit/examples/patient.ndjson +2 -2
  7. data/lib/uds_plus_test_kit/input_resource_tests/read_adverse_event_test.rb +54 -0
  8. data/lib/uds_plus_test_kit/input_resource_tests/read_allergy_intolerance_test.rb +54 -0
  9. data/lib/uds_plus_test_kit/input_resource_tests/read_clinical_result_test.rb +54 -0
  10. data/lib/uds_plus_test_kit/input_resource_tests/read_data_urls_test.rb +54 -0
  11. data/lib/uds_plus_test_kit/input_resource_tests/read_location_test.rb +54 -0
  12. data/lib/uds_plus_test_kit/input_resource_tests/read_patient_reporting_parameters_test.rb +54 -0
  13. data/lib/uds_plus_test_kit/input_resource_tests/resource_group.rb +24 -0
  14. data/lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb +3 -1
  15. data/lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb +12 -0
  16. data/lib/uds_plus_test_kit/post_tests/post_group.rb +12 -0
  17. data/lib/uds_plus_test_kit/uds_plus_test_suite.rb +2 -2
  18. data/lib/uds_plus_test_kit/validate_adverse_event_test.rb +33 -0
  19. data/lib/uds_plus_test_kit/validate_allergy_intolerance_test.rb +33 -0
  20. data/lib/uds_plus_test_kit/validate_clinical_result_test.rb +65 -0
  21. data/lib/uds_plus_test_kit/validate_data_urls_test.rb +65 -0
  22. data/lib/uds_plus_test_kit/validate_income_test.rb +1 -1
  23. data/lib/uds_plus_test_kit/validate_lab_test.rb +1 -1
  24. data/lib/uds_plus_test_kit/validate_location_test.rb +33 -0
  25. data/lib/uds_plus_test_kit/validate_patient_reporting_parameters_test.rb +65 -0
  26. data/lib/uds_plus_test_kit/validate_sexual_orientation_test.rb +1 -1
  27. data/lib/uds_plus_test_kit/validate_special_observation_test.rb +9 -2
  28. data/lib/uds_plus_test_kit/version.rb +2 -2
  29. metadata +14 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 489bdac3359252bf1373e013f355610ec8eab11222ab015621bb6b9df4a3bc80
4
- data.tar.gz: 3c1475c83546b3376301b71daa0fb8f3661d207a0660ade16c9fcd4acb9eff2f
3
+ metadata.gz: 719de47995674c07898efc624bfcacb19f5180ee89f05ecfb8cc6d78e6b907f4
4
+ data.tar.gz: 89313bf688921b5bf9242335631eda25ce86055ae4e1b46e529e92b2120f1273
5
5
  SHA512:
6
- metadata.gz: 2f834ee6a5d50aa4aea2f17c6b3975f76fe4dd45c22e078326df0ca56f90268cc863f820d23d301428e9db0a5b3dc7d1b46f91c239db124292fe010ba71cc533
7
- data.tar.gz: 8e855a4443d9e0f6a45d373b6d4fdf5717d6c63802cf80b8bf2923eeae0c0b4ed1e3946cc285279703b0d95ef8bd818e2e7336353a50c8e5875efda098d95684
6
+ metadata.gz: 38ea29b468539317c810ea9f7592b41b3b4680ded358896a047a10be7aa1aa4513245d1c736b9bcc9c1959173e3f5d5424c490d6e5da9c04b34072933242f641
7
+ data.tar.gz: 8ef032e82432b39b07f1a4758d2843b71139bde66c1c241e16fc3d91eccb394dd9620ead6ab88e564dde364bd233366dd6a2e1fd6339d01c1d8e1ff858504e89
@@ -1 +1 @@
1
- { "resourceType" : "Encounter", "id" : "example", "meta" : { "extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString" : "Encounter Example" }, { "url" : "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown" : "This is an encounter example for the *US Core Encounter Profile*." } ], "lastUpdated" : "2017-05-26T11:56:57.250-04:00", "profile" : [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" ] }, "text" : { "status" : "extensions", "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Narrative</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource \"example-1\" Updated \"2017-05-26 11:56:57-0400\" </p><p style=\"margin-bottom: 0px\">Profile:US Core Encounter Profile</p></div><p><b>status</b>: finished</p><p><b>class</b>: ambulatory (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code AMB = 'ambulatory', stated as 'ambulatory')</p><p><b>type</b>: Office Visit <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/3.1.0/CodeSystem-CPT.html\">Current Procedural Terminology (CPT)</a>#99201)</span></p><p><b>subject</b>: <a href=\"Patient-example.html\">Patient/example</a> \" SHAW\"</p><p><b>period</b>: 2015-11-01 05:00:14-0500 --&gt; 2015-11-01 06:00:14-0500</p></div>" }, "status" : "finished", "class" : { "system" : "http://terminology.hl7.org/CodeSystem/v3-ActCode", "code" : "AMB", "display" : "ambulatory" }, "type" : [ { "coding" : [ { "system" : "http://www.ama-assn.org/go/cpt", "code" : "99201" } ], "text" : "Office Visit" } ], "subject" : { "reference" : "Patient/example", "display" : "Amy" }, "period" : { "start" : "2015-11-01T17:00:14-05:00", "end" : "2015-11-01T18:00:14-05:00" }, "hospitalization" : { "dischargeDisposition" : { "coding" : [ { "system" : "http://www.nubc.org/patient-discharge", "code" : "01", "display" : "Discharged to Home" } ], "text" : "Amy was dischaged to home" } }, "location" : [ { "location" : { "reference" : "Location/hospital", "display" : "Holy Family Hospital" } } ] }
1
+ { "resourceType": "Encounter", "id": "example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "Encounter Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is an encounter example for the *US Core Encounter Profile*." } ], "lastUpdated": "2017-05-26T11:56:57.250-04:00", "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-encounter" ] }, "text": { "status": "extensions", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Narrative</b></p><div style=\"display: inline-block; background-color: #d9e0e7; padding: 6px; margin: 4px; border: 1px solid #8da1b4; border-radius: 5px; line-height: 60%\"><p style=\"margin-bottom: 0px\">Resource \"example-1\" Updated \"2017-05-26 11:56:57-0400\" </p><p style=\"margin-bottom: 0px\">Profile:US Core Encounter Profile</p></div><p><b>status</b>: finished</p><p><b>class</b>: ambulatory (Details: http://terminology.hl7.org/CodeSystem/v3-ActCode code AMB = 'ambulatory', stated as 'ambulatory')</p><p><b>type</b>: Office Visit <span style=\"background: LightGoldenRodYellow; margin: 4px; border: 1px solid khaki\"> (<a href=\"http://terminology.hl7.org/3.1.0/CodeSystem-CPT.html\">Current Procedural Terminology (CPT)</a>#99201)</span></p><p><b>subject</b>: <a href=\"Patient-example.html\">Patient/example</a> \" SHAW\"</p><p><b>period</b>: 2015-11-01 05:00:14-0500 --&gt; 2015-11-01 06:00:14-0500</p></div>" }, "status": "finished", "class": { "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode", "code": "AMB", "display": "ambulatory" }, "type": [ { "coding": [ { "system": "http://www.ama-assn.org/go/cpt", "code": "99201" } ], "text": "Office Visit" } ], "subject": { "reference": "Patient/example", "display" : "Amy" }, "period": { "start": "2015-11-01T17:00:14-05:00", "end": "2015-11-01T18:00:14-05:00" }, "hospitalization" : { "dischargeDisposition" : { "coding" : [ { "system" : "http://www.nubc.org/patient-discharge", "code" : "01", "display" : "Discharged to Home" } ], "text" : "Amy was dischaged to home" } }, "location" : [ { "location" : { "reference" : "Location/hospital", "display" : "Holy Family Hospital" } } ] }
@@ -1,2 +1,2 @@
1
- { "resourceType" : "Patient", "id" : "smallpop-example", "meta" : { "extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString" : "Patient Example" }, { "url" : "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown" : "This is a patient example for the *US Core Patient Profile*." } ], "profile" : [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ] }, "text" : { "status" : "generated", "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Amy V. Baxter </b> female, DoB: 1987-02-20 ( Medical Record Number: 1032702 (USUAL))</p></div>" }, "extension" : [ { "extension" : [ { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2106-3", "display" : "White" } }, { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "1002-5", "display" : "American Indian or Alaska Native" } }, { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2028-9", "display" : "Asian" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "1586-7", "display" : "Shoshone" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2036-2", "display" : "Filipino" } }, { "url" : "text", "valueString" : "Mixed" } ], "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension" : [ { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2135-2", "display" : "Hispanic or Latino" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2184-0", "display" : "Dominican" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2148-5", "display" : "Mexican" } }, { "url" : "text", "valueString" : "Hispanic or Latino" } ], "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode" : "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept" : { "coding" : [ { "system" : "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code" : "ASKU", "display" : "asked but unknown" } ], "text" : "asked but unknown" } } ], "identifier" : [ { "use" : "usual", "type" : { "coding" : [ { "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", "code" : "MR", "display" : "Medical Record Number" } ], "text" : "Medical Record Number" }, "system" : "http://hospital.smarthealthit.org", "value" : "1032702" } ], "active" : true, "name" : [ { "use" : "old", "family" : "Shaw", "given" : [ "Amy", "V." ], "period" : { "start" : "2016-12-06", "end" : "2020-07-22" } }, { "family" : "Baxter", "given" : [ "Amy", "V." ], "suffix" : [ "PharmD" ], "period" : { "start" : "2020-07-22" } } ], "telecom" : [ { "system" : "phone", "value" : "555-555-5555", "use" : "home" }, { "system" : "email", "value" : "amy.shaw@example.com" } ], "gender" : "female", "birthDate" : "1987-02-20", "address" : [ { "use" : "old", "line" : [ "49 Meadow St" ], "city" : "Norton", "state" : "VT", "postalCode" : "05907", "country" : "US", "period" : { "start" : "2016-12-06", "end" : "2020-07-22" } }, { "line" : [ "183 Mountain View St" ], "city" : "Norton", "state" : "VT", "postalCode" : "05907", "country" : "US", "period" : { "start" : "2020-07-22" } } ] }
2
- { "resourceType" : "Patient", "id" : "example", "meta" : { "extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString" : "Patient Example" }, { "url" : "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown" : "This is a patient example for the *US Core Patient Profile*." } ], "profile" : [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ] }, "text" : { "status" : "generated", "div" : "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Amy V. Baxter </b> female, DoB: 1987-02-20 ( Medical Record Number: 1032702 (USUAL))</p></div>" }, "extension" : [ { "extension" : [ { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2106-3", "display" : "White" } }, { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "1002-5", "display" : "American Indian or Alaska Native" } }, { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2028-9", "display" : "Asian" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "1586-7", "display" : "Shoshone" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2036-2", "display" : "Filipino" } }, { "url" : "text", "valueString" : "Mixed" } ], "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension" : [ { "url" : "ombCategory", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2135-2", "display" : "Hispanic or Latino" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2184-0", "display" : "Dominican" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2148-5", "display" : "Mexican" } }, { "url" : "text", "valueString" : "Hispanic or Latino" } ], "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode" : "F" }, { "url" : "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept" : { "coding" : [ { "system" : "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code" : "ASKU", "display" : "asked but unknown" } ], "text" : "asked but unknown" } } ], "identifier" : [ { "use" : "usual", "type" : { "coding" : [ { "system" : "http://terminology.hl7.org/CodeSystem/v2-0203", "code" : "MR", "display" : "Medical Record Number" } ], "text" : "Medical Record Number" }, "system" : "http://hospital.smarthealthit.org", "value" : "1032702" } ], "active" : true, "name" : [ { "use" : "old", "family" : "Shaw", "given" : [ "Amy", "V." ], "period" : { "start" : "2016-12-06", "end" : "2020-07-22" } }, { "family" : "Baxter", "given" : [ "Amy", "V." ], "suffix" : [ "PharmD" ], "period" : { "start" : "2020-07-22" } } ], "telecom" : [ { "system" : "phone", "value" : "555-555-5555", "use" : "home" }, { "system" : "email", "value" : "amy.shaw@example.com" } ], "gender" : "female", "birthDate" : "1987-02-20", "address" : [ { "use" : "old", "line" : [ "49 Meadow St" ], "city" : "Alstead", "state" : "NH", "postalCode" : "03602", "country" : "US", "period" : { "start" : "2016-12-06", "end" : "2020-07-22" } }, { "line" : [ "183 Mountain View St" ], "city" : "Alstead", "state" : "NH", "postalCode" : "03602", "country" : "US", "period" : { "start" : "2020-07-22" } } ] }
1
+ { "resourceType": "Patient", "id": "smallpop-example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *US Core Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ] }, "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Amy V. Baxter </b> female, DoB: 1987-02-20 ( Medical Record Number: 1032702 (USUAL))</p></div>" }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "1002-5", "display": "American Indian or Alaska Native" } }, { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2028-9", "display": "Asian" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "1586-7", "display": "Shoshone" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2036-2", "display": "Filipino" } }, { "url": "text", "valueString": "Mixed" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2184-0", "display": "Dominican" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2148-5", "display": "Mexican" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "ASKU", "display": "asked but unknown" } ], "text": "asked but unknown" } } ], "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR", "display": "Medical Record Number" } ], "text": "Medical Record Number" }, "system": "http://hospital.smarthealthit.org", "value": "1032702" } ], "active": true, "name": [ { "use": "old", "family": "Shaw", "given": [ "Amy", "V." ], "period": { "start": "2016-12-06", "end": "2020-07-22" } }, { "family": "Baxter", "given": [ "Amy", "V." ], "suffix": [ "PharmD" ], "period": { "start": "2020-07-22" } } ], "telecom": [ { "system": "phone", "value": "555-555-5555", "use": "home" }, { "system": "email", "value": "amy.shaw@example.com" } ], "gender": "female", "birthDate": "1987-02-20", "address": [ { "use": "old", "line": [ "49 Meadow St" ], "city": "Norton", "state": "VT", "postalCode": "05907", "country": "US", "period": { "start": "2016-12-06", "end": "2020-07-22" } }, { "line": [ "183 Mountain View St" ], "city": "Norton", "state": "VT", "postalCode": "05907", "country": "US", "period": { "start": "2020-07-22" } } ]}
2
+ { "resourceType": "Patient", "id": "example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *US Core Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-patient" ] }, "text": { "status": "generated", "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><p><b>Amy V. Baxter </b> female, DoB: 1987-02-20 ( Medical Record Number: 1032702 (USUAL))</p></div>" }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "1002-5", "display": "American Indian or Alaska Native" } }, { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2028-9", "display": "Asian" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "1586-7", "display": "Shoshone" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2036-2", "display": "Filipino" } }, { "url": "text", "valueString": "Mixed" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2184-0", "display": "Dominican" } }, { "url": "detailed", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2148-5", "display": "Mexican" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "ASKU", "display": "asked but unknown" } ], "text": "asked but unknown" } } ], "identifier": [ { "use": "usual", "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR", "display": "Medical Record Number" } ], "text": "Medical Record Number" }, "system": "http://hospital.smarthealthit.org", "value": "1032702" } ], "active": true, "name": [ { "use": "old", "family": "Shaw", "given": [ "Amy", "V." ], "period": { "start": "2016-12-06", "end": "2020-07-22" } }, { "family": "Baxter", "given": [ "Amy", "V." ], "suffix": [ "PharmD" ], "period": { "start": "2020-07-22" } } ], "telecom": [ { "system": "phone", "value": "555-555-5555", "use": "home" }, { "system": "email", "value": "amy.shaw@example.com" } ], "gender": "female", "birthDate": "1987-02-20", "address": [ { "use": "old", "line": [ "49 Meadow St" ], "city": "Alstead", "state": "NH", "postalCode": "03602", "country": "US", "period": { "start": "2016-12-06", "end": "2020-07-22" } }, { "line": [ "183 Mountain View St" ], "city": "Alstead", "state": "NH", "postalCode": "03602", "country": "US", "period": { "start": "2020-07-22" } } ]}
@@ -67,6 +67,10 @@
67
67
  "system": "phone",
68
68
  "value": "234-234-5648"
69
69
  }
70
+ },
71
+ {
72
+ "name" : "hcPrenatalCareByReferralOnly",
73
+ "valueBoolean" : true
70
74
  }
71
75
  ]
72
76
  },
@@ -83,7 +87,7 @@
83
87
  },
84
88
  {
85
89
  "name": "url",
86
- "valueUrl": "http://localhost:4567/custom/uds_plus/examples/patient"
90
+ "valueUrl": "http://host.docker.internal/custom/uds_plus/examples/patient"
87
91
  },
88
92
  {
89
93
  "name": "expirationTime",
@@ -100,7 +104,7 @@
100
104
  },
101
105
  {
102
106
  "name": "url",
103
- "valueUrl": "http://localhost:4567/custom/uds_plus/examples/condition"
107
+ "valueUrl": "http://host.docker.internal/custom/uds_plus/examples/condition"
104
108
  },
105
109
  {
106
110
  "name": "expirationTime",
@@ -117,7 +121,7 @@
117
121
  },
118
122
  {
119
123
  "name": "url",
120
- "valueUrl": "http://localhost:4567/custom/uds_plus/examples/observation"
124
+ "valueUrl": "http://host.docker.internal/custom/uds_plus/examples/observation"
121
125
  },
122
126
  {
123
127
  "name": "expirationTime",
@@ -134,7 +138,7 @@
134
138
  },
135
139
  {
136
140
  "name": "url",
137
- "valueUrl": "http://localhost:4567/custom/uds_plus/examples/encounter"
141
+ "valueUrl": "http://host.docker.internal/custom/uds_plus/examples/encounter"
138
142
  },
139
143
  {
140
144
  "name": "expirationTime",
@@ -1,3 +1,3 @@
1
1
  { "resourceType": "Observation", "id": "de-identified-example", "meta": { "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-lab-observation" ] }, "status": "final", "category": [ { "coding": [ { "system" : "http://terminology.hl7.org/CodeSystem/observation-category", "code" : "laboratory", "display" : "Laboratory" } ] } ], "code": { "coding": [ { "system" : "http://loinc.org", "code" : "718-7", "display" : "Hemoglobin [Mass/volume] in Blood" } ] }, "subject": { "reference": "Patient/de-identified-example" }, "encounter": { "reference": "Encounter/de-identified-example" }, "effectiveDateTime" : "2005", "issued": "2005-04-03T15:30:10+01:00", "performer": [ { "reference": "Practitioner/example" } ], "valueQuantity" : { "value" : 17, "unit" : "g/dL", "system" : "http://unitsofmeasure.org" }, "bodySite": { "coding": [ { "system": "http://snomed.info/sct", "code": "368208006", "display": "Left upper arm structure" } ] }}
2
2
  { "resourceType": "Observation", "id": "de-identified-income-example", "meta": { "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-income-observation" ] }, "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "63058-2" } ] }, "subject": { "reference": "Patient/de-identified-example" }, "effectiveDateTime": "2016-03-28", "valueRange": { "low": { "value": 101 }, "high": { "value": 150 } }}
3
- { "resourceType": "Observation", "id": "de-identified-sexual-orientation-example", "meta": { "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-sexual-orientation-observation" ] }, "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "76690-7" } ] }, "subject": { "reference": "Patient/example" }, "effectiveDateTime": "2007", "valueCodeableConcept": { "coding": [ { "system": "http://snomed.info/sct", "code": "20430005", "display": "Heterosexual state" } ] }}
3
+ { "resourceType": "Observation", "id": "de-identified-sexual-orientation-example", "meta": { "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-sexual-orientation-observation" ] }, "status": "final", "code": { "coding": [ { "system": "http://loinc.org", "code": "76690-7" } ] }, "subject": { "reference": "Patient/example" }, "effectiveDateTime": "2007", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "NASK", "display": "not asked" } ] }}
@@ -1,2 +1,2 @@
1
- { "resourceType": "Patient", "id": "de-identified-example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "De-identified Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *UDS+ Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient" ] }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url": "text", "valueString": "White" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity": { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "ASKU", "display": "asked but unknown" } ], "text": "asked but unknown" } }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/udsplus-agriculture-worker-status", "valueCode": "migratory" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-housing-status-extension", "valueCode": "permanent-supportive-housing" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-veteran-status-extension", "valueBoolean": false } ], "active": true, "gender": "female", "address": [ { "postalCode": "03600" } ]}
2
- { "resourceType": "Patient", "id": "de-identified-smallpop-example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "De-identified Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *UDS+ Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient" ] }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url": "text", "valueString": "White" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity": { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-genderIdentity", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "ASKU", "display": "asked but unknown" } ], "text": "asked but unknown" } } ], "active": true, "gender": "female", "address": [ { "postalCode": "00000", "_postalCode": { "extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode" : "masked" }] } } ]}
1
+ { "resourceType": "Patient", "id": "de-identified-smallpop-example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "De-identified Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *UDS+ Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient" ] }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2108-9", "display" : "European" } }, { "url": "text", "valueString": "White" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2184-0", "display" : "Dominican" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-birthsex-extension", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity": { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-gender-identity-extension", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "NASK", "display": "Not Asked" } ], "text": "Not Asked" } } ], "active": true, "gender": "female", "address": [ { "postalCode": "00000", "_postalCode": { "extension" : [ { "url" : "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode" : "masked" }] } } ]}
2
+ { "resourceType": "Patient", "id": "de-identified-example", "meta": { "extension": [ { "url": "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString": "De-identified Patient Example" }, { "url": "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown": "This is a patient example for the *UDS+ Patient Profile*." } ], "profile": [ "http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-patient" ] }, "extension": [ { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2106-3", "display": "White" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2108-9", "display" : "European" } }, { "url": "text", "valueString": "White" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race" }, { "extension": [ { "url": "ombCategory", "valueCoding": { "system": "urn:oid:2.16.840.1.113883.6.238", "code": "2135-2", "display": "Hispanic or Latino" } }, { "url" : "detailed", "valueCoding" : { "system" : "urn:oid:2.16.840.1.113883.6.238", "code" : "2184-0", "display" : "Dominican" } }, { "url": "text", "valueString": "Hispanic or Latino" } ], "url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-birthsex-extension", "valueCode": "F" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity": { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-gender-identity-extension", "valueCodeableConcept": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "ASKU", "display": "asked but unknown" } ], "text": "asked but unknown" } }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/udsplus-agriculture-worker-status", "valueCode": "migratory" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-housing-status-extension", "valueCode": "permanent-supportive-housing" }, { "url": "http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-veteran-status-extension", "valueBoolean": false } ], "active": true, "gender": "female", "address": [ { "postalCode": "03600" } ]}
@@ -0,0 +1,54 @@
1
+ require 'json'
2
+
3
+ module UDSPlusTestKit
4
+ class ReadAdverseEventTest < Inferno::Test
5
+ id :uds_plus_read_adverse_event_test
6
+ title 'Receive UDS+ Adverse Event Data'
7
+ description %(
8
+ Test takes from the user either: the http location of adverse event 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 :adverse_event_data,
15
+ title: 'Adverse Event 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/adverse_event_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['AdverseEvent'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !adverse_event_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if adverse_event_data.strip[0] != '{'
36
+ assert_valid_http_uri(adverse_event_data, "Adverse Event provided is not a valid http uri.")
37
+ get adverse_event_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(adverse_event_data, "JSON inputted was not in a valid format")
43
+ data = adverse_event_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 ReadAllergyIntoleranceTest < Inferno::Test
5
+ id :uds_plus_read_allergy_intolerance_test
6
+ title 'Receive UDS+ Allergy Intolerance Data'
7
+ description %(
8
+ Test takes from the user either: the http location of allergy intolerance 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 :allergy_intolerance_data,
15
+ title: 'Allergy Intolerance 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/allergy_intolerance_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['AllergyIntolerance'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !allergy_intolerance_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if allergy_intolerance_data.strip[0] != '{'
36
+ assert_valid_http_uri(allergy_intolerance_data, "Allergy Intolerance provided is not a valid http uri.")
37
+ get allergy_intolerance_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(allergy_intolerance_data, "JSON inputted was not in a valid format")
43
+ data = allergy_intolerance_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 ReadClinicalResultTest < Inferno::Test
5
+ id :uds_plus_read_clinical_result_test
6
+ title 'Receive UDS+ Clinical Result Data'
7
+ description %(
8
+ Test takes from the user either: the http location of clinical result 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 :clinical_result_data,
15
+ title: 'Clinical Result 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/clinical_result_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 !clinical_result_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if clinical_result_data.strip[0] != '{'
36
+ assert_valid_http_uri(clinical_result_data, "Location provided is not a valid http uri.")
37
+ get clinical_result_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(clinical_result_data, "JSON inputted was not in a valid format")
43
+ data = clinical_result_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 ReadDataUrlsTest < Inferno::Test
5
+ id :uds_plus_read_data_urls_test
6
+ title 'Receive UDS+ Data Urls Data'
7
+ description %(
8
+ Test takes from the user either: the http location of the "data urls" 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 :data_urls_data,
15
+ title: 'Data Urls 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/data_urls_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['Parameters'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !data_urls_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if data_urls_data.strip[0] != '{'
36
+ assert_valid_http_uri(data_urls_data, "Location provided is not a valid http uri.")
37
+ get data_urls_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(data_urls_data, "JSON inputted was not in a valid format")
43
+ data = data_urls_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 ReadLocationTest < Inferno::Test
5
+ id :uds_plus_read_location_test
6
+ title 'Receive UDS+ Location Data'
7
+ description %(
8
+ Test takes from the user either: the http location of location 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 :location_data,
15
+ title: 'Location 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/location_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['Location'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !location_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if location_data.strip[0] != '{'
36
+ assert_valid_http_uri(location_data, "Location provided is not a valid http uri.")
37
+ get location_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(location_data, "JSON inputted was not in a valid format")
43
+ data = location_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 ReadPatientReportingParametersTest < Inferno::Test
5
+ id :uds_plus_read_patient_reporting_parameters_test
6
+ title 'Receive UDS+ Patient Reporting Parameters Data'
7
+ description %(
8
+ Test takes from the user either: the http location of patient reporting parameters 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_reporting_parameters_data,
15
+ title: 'Patient Reporting Parameters 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_reporting_parameters_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['Parameters'] ||= []
29
+ end
30
+
31
+ run do
32
+ omit_if !patient_reporting_parameters_data.present?, "No data provided; skipping test."
33
+
34
+ # if the input is a url, else it is a json
35
+ if patient_reporting_parameters_data.strip[0] != '{'
36
+ assert_valid_http_uri(patient_reporting_parameters_data, "Location provided is not a valid http uri.")
37
+ get patient_reporting_parameters_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_reporting_parameters_data, "JSON inputted was not in a valid format")
43
+ data = patient_reporting_parameters_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
@@ -29,6 +29,18 @@ require_relative './read_med_statement_test'
29
29
  require_relative '../validate_med_statement_test'
30
30
  require_relative './read_service_request_test'
31
31
  require_relative '../validate_service_request_test'
32
+ require_relative './read_location_test'
33
+ require_relative '../validate_location_test'
34
+ require_relative './read_allergy_intolerance_test'
35
+ require_relative '../validate_allergy_intolerance_test'
36
+ require_relative './read_adverse_event_test'
37
+ require_relative '../validate_adverse_event_test'
38
+ require_relative './read_clinical_result_test'
39
+ require_relative '../validate_clinical_result_test'
40
+ require_relative './read_data_urls_test'
41
+ require_relative '../validate_data_urls_test'
42
+ require_relative './read_patient_reporting_parameters_test'
43
+ require_relative '../validate_patient_reporting_parameters_test'
32
44
 
33
45
  module UDSPlusTestKit
34
46
  class UDSPlusResourceTestGroup < Inferno::TestGroup
@@ -61,12 +73,20 @@ module UDSPlusTestKit
61
73
  test from: :uds_plus_validate_related_person_test
62
74
  test from: :uds_plus_read_immunization_test
63
75
  test from: :uds_plus_validate_immunization_test
76
+ test from: :uds_plus_read_location_test
77
+ test from: :uds_plus_validate_location_test
78
+ test from: :uds_plus_read_allergy_intolerance_test
79
+ test from: :uds_plus_validate_allergy_intolerance_test
80
+ test from: :uds_plus_read_adverse_event_test
81
+ test from: :uds_plus_validate_adverse_event_test
64
82
  test from: :uds_plus_read_income_test
65
83
  test from: :uds_plus_validate_income_test
66
84
  test from: :uds_plus_read_sexual_orientation_test
67
85
  test from: :uds_plus_validate_sexual_orientation_test
68
86
  test from: :uds_plus_read_lab_test
69
87
  test from: :uds_plus_validate_lab_test
88
+ test from: :uds_plus_read_clinical_result_test
89
+ test from: :uds_plus_validate_clinical_result_test
70
90
  test from: :uds_plus_read_special_observation_test
71
91
  test from: :uds_plus_validate_special_observation_test
72
92
  test from: :uds_plus_read_medication_request_test
@@ -75,5 +95,9 @@ module UDSPlusTestKit
75
95
  test from: :uds_plus_validate_medication_statement_test
76
96
  test from: :uds_plus_read_service_request_test
77
97
  test from: :uds_plus_validate_service_request_test
98
+ test from: :uds_plus_read_data_urls_test
99
+ test from: :uds_plus_validate_data_urls_test
100
+ test from: :uds_plus_read_patient_reporting_parameters_test
101
+ test from: :uds_plus_validate_patient_reporting_parameters_test
78
102
  end
79
103
  end
@@ -20,7 +20,9 @@ module UDSPlusTestKit
20
20
  'Observation', 'Patient', 'Procedure',
21
21
  'RelatedPerson', 'Immunization',
22
22
  'ServiceRequest', 'MedicationRequest',
23
- 'MedicationStatement'
23
+ 'MedicationStatement', 'Location',
24
+ 'AdverseEvent', 'AllergyIntolerance',
25
+ 'Parameters'
24
26
  ]
25
27
  end
26
28
 
@@ -17,6 +17,12 @@ require_relative '../validate_lab_test'
17
17
  require_relative '../validate_med_request_test'
18
18
  require_relative '../validate_med_statement_test'
19
19
  require_relative '../validate_service_request_test'
20
+ require_relative '../validate_location_test'
21
+ require_relative '../validate_allergy_intolerance_test'
22
+ require_relative '../validate_adverse_event_test'
23
+ require_relative '../validate_clinical_result_test'
24
+ require_relative '../validate_data_urls_test'
25
+ require_relative '../validate_patient_reporting_parameters_test'
20
26
 
21
27
  module UDSPlusTestKit
22
28
  class UDSPlusTestGroup < Inferno::TestGroup
@@ -41,13 +47,19 @@ module UDSPlusTestKit
41
47
  test from: :uds_plus_validate_procedure_test
42
48
  test from: :uds_plus_validate_related_person_test
43
49
  test from: :uds_plus_validate_immunization_test
50
+ test from: :uds_plus_validate_location_test
51
+ test from: :uds_plus_validate_allergy_intolerance_test
52
+ test from: :uds_plus_validate_adverse_event_test
44
53
  test from: :uds_plus_validate_income_test
45
54
  test from: :uds_plus_validate_sexual_orientation_test
46
55
  test from: :uds_plus_validate_lab_test
56
+ test from: :uds_plus_validate_clinical_result_test
47
57
  test from: :uds_plus_validate_special_observation_test
48
58
  test from: :uds_plus_validate_medication_request_test
49
59
  test from: :uds_plus_validate_medication_statement_test
50
60
  test from: :uds_plus_validate_service_request_test
61
+ test from: :uds_plus_validate_data_urls_test
62
+ test from: :uds_plus_validate_patient_reporting_parameters_test
51
63
  test from: :uds_plus_invalid_type_test
52
64
  end
53
65
  end
@@ -22,6 +22,12 @@ require_relative '../validate_lab_test'
22
22
  require_relative '../validate_med_request_test'
23
23
  require_relative '../validate_med_statement_test'
24
24
  require_relative '../validate_service_request_test'
25
+ require_relative '../validate_location_test'
26
+ require_relative '../validate_allergy_intolerance_test'
27
+ require_relative '../validate_adverse_event_test'
28
+ require_relative '../validate_clinical_result_test'
29
+ require_relative '../validate_data_urls_test'
30
+ require_relative '../validate_patient_reporting_parameters_test'
25
31
 
26
32
  module UDSPlusTestKit
27
33
  class UDSPlusPostGroup < Inferno::TestGroup
@@ -47,13 +53,19 @@ module UDSPlusTestKit
47
53
  test from: :uds_plus_validate_procedure_test
48
54
  test from: :uds_plus_validate_related_person_test
49
55
  test from: :uds_plus_validate_immunization_test
56
+ test from: :uds_plus_validate_location_test
57
+ test from: :uds_plus_validate_allergy_intolerance_test
58
+ test from: :uds_plus_validate_adverse_event_test
50
59
  test from: :uds_plus_validate_income_test
51
60
  test from: :uds_plus_validate_sexual_orientation_test
52
61
  test from: :uds_plus_validate_lab_test
62
+ test from: :uds_plus_validate_clinical_result_test
53
63
  test from: :uds_plus_validate_special_observation_test
54
64
  test from: :uds_plus_validate_medication_request_test
55
65
  test from: :uds_plus_validate_medication_statement_test
56
66
  test from: :uds_plus_validate_service_request_test
67
+ test from: :uds_plus_validate_data_urls_test
68
+ test from: :uds_plus_validate_patient_reporting_parameters_test
57
69
  test from: :uds_plus_invalid_type_test
58
70
  end
59
71
  end
@@ -9,7 +9,7 @@ module UDSPlusTestKit
9
9
  title 'UDS+ Test Kit'
10
10
  description %(
11
11
  The UDS+ Test Kit tests systems for their conformance to the [UDS+
12
- Implementation Guide v0.4.1](http://udsplus.drajer.com).
12
+ Implementation Guide v1.0.0](http://udsplus.drajer.com).
13
13
  The included tests function as a rudimentary data receiver. This receiver will
14
14
  take a provided Import Manifest, either as an HTTP location or as a raw json,
15
15
  and validate its contents. This includes validating the structure of the manifest,
@@ -78,7 +78,7 @@ module UDSPlusTestKit
78
78
  url: 'https://github.com/inferno-framework/uds-plus-test-kit/'
79
79
  },
80
80
  {
81
- label: 'UDS+ Implementation Guide v0.4.1',
81
+ label: 'UDS+ Implementation Guide v1.0.0',
82
82
  url: 'http://udsplus.drajer.com'
83
83
  }
84
84
  ]
@@ -0,0 +1,33 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidateAdverseEventTest < Inferno::Test
6
+ id :uds_plus_validate_adverse_event_test
7
+ title 'Validate UDS+ Adverse Event Data'
8
+ description %(
9
+ Test takes the Adverse Event resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['AdverseEvent'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-adverseevent'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ data_to_test.each do |resource|
29
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,33 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidateAllergyIntoleranceTest < Inferno::Test
6
+ id :uds_plus_validate_allergy_intolerance_test
7
+ title 'Validate UDS+ Allergy Intolerance Data'
8
+ description %(
9
+ Test takes the Allergy Intolerance resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['AllergyIntolerance'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-allergyintolerance'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ data_to_test.each do |resource|
29
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,65 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidateClinicalResultTest < Inferno::Test
6
+ id :uds_plus_validate_clinical_result_test
7
+ title 'Validate UDS+ Clinical Result Data'
8
+ description %(
9
+ Test takes the Clinical Result resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['Observation'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/de-identified-uds-plus-clinical-result-observation'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ no_resource_of_this_type = true
29
+ identifier_fail_message = %(Resource.meta.profile should contain the HTTP location of the
30
+ resource's Structure Definition. Resource.meta.profile either does
31
+ not exist in this resource, or its contents do not point to a valid
32
+ location for type Observation. **NOTE:**
33
+ If this error occurs, it can trigger a fail for all observation-type tests,
34
+ regardless of whether both tests were meant to run.)
35
+
36
+ data_to_test.each do |resource|
37
+ # All these assertions are to differentiate Observation data between orientation types.
38
+ # A resource is skipped if it cannot be identified as an clinical result resource.
39
+ type_identifier = resource.to_hash
40
+ assert type_identifier['meta'].present?, identifier_fail_message
41
+
42
+ type_identifier = type_identifier['meta']
43
+ assert type_identifier.is_a?(Hash), identifier_fail_message
44
+ assert type_identifier['profile'].present?, identifier_fail_message
45
+
46
+ type_identifier = type_identifier['profile']
47
+ assert type_identifier.is_a?(Array), identifier_fail_message
48
+ assert !type_identifier.empty?, identifier_fail_message
49
+
50
+
51
+ type_identifier = type_identifier.first
52
+ assert type_identifier.is_a?(String), identifier_fail_message
53
+ if !type_identifier.include?("clinical-result")
54
+ next
55
+ end
56
+
57
+ no_resource_of_this_type = false
58
+
59
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
60
+ end
61
+
62
+ omit_if no_resource_of_this_type, "No data of this type was identified."
63
+ end
64
+ end
65
+ end
@@ -0,0 +1,65 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidateDataUrlsTest < Inferno::Test
6
+ id :uds_plus_validate_data_urls_test
7
+ title 'Validate UDS+ Data Urls Data'
8
+ description %(
9
+ Test takes the Data Urls resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['Parameters'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-deidentify-operation-data-urls-parameter'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ no_resource_of_this_type = true
29
+ identifier_fail_message = %(Resource.meta.profile should contain the HTTP location of the
30
+ resource's Structure Definition. Resource.meta.profile either does
31
+ not exist in this resource, or its contents do not point to a valid
32
+ location for type Parameters. **NOTE:**
33
+ If this error occurs, it can trigger a fail for all parameters-type tests,
34
+ regardless of whether both tests were meant to run.)
35
+
36
+ data_to_test.each do |resource|
37
+ # All these assertions are to differentiate Parameters data between orientation types.
38
+ # A resource is skipped if it cannot be identified as an data_urls resource.
39
+ type_identifier = resource.to_hash
40
+ assert type_identifier['meta'].present?, identifier_fail_message
41
+
42
+ type_identifier = type_identifier['meta']
43
+ assert type_identifier.is_a?(Hash), identifier_fail_message
44
+ assert type_identifier['profile'].present?, identifier_fail_message
45
+
46
+ type_identifier = type_identifier['profile']
47
+ assert type_identifier.is_a?(Array), identifier_fail_message
48
+ assert !type_identifier.empty?, identifier_fail_message
49
+
50
+
51
+ type_identifier = type_identifier.first
52
+ assert type_identifier.is_a?(String), identifier_fail_message
53
+ if !type_identifier.include?("-data-urls-")
54
+ next
55
+ end
56
+
57
+ no_resource_of_this_type = false
58
+
59
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
60
+ end
61
+
62
+ omit_if no_resource_of_this_type, "No data of this type was identified."
63
+ end
64
+ end
65
+ end
@@ -34,7 +34,7 @@ module UDSPlusTestKit
34
34
  regardless of whether both tests were meant to run.)
35
35
 
36
36
  data_to_test.each do |resource|
37
- # All these assertions are to differentaite Observation data between orientation types.
37
+ # All these assertions are to differentiate Observation data between orientation types.
38
38
  # A resource is skipped if it cannot be identified as an income resource.
39
39
  type_identifier = resource.to_hash
40
40
  assert type_identifier['meta'].present?, identifier_fail_message
@@ -34,7 +34,7 @@ module UDSPlusTestKit
34
34
  regardless of whether both tests were meant to run.)
35
35
 
36
36
  data_to_test.each do |resource|
37
- # All these assertions are to differentaite Observation data between Income Data and Sexual Orientation data.
37
+ # All these assertions are to differentiate Observation data between Income Data and Sexual Orientation data.
38
38
  # A resource is skipped if it is a sexual orientation resource and fails if it cannot be identified as an income resource.
39
39
  type_identifier = resource.to_hash
40
40
  assert type_identifier['meta'].present?, identifier_fail_message
@@ -0,0 +1,33 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidateLocationTest < Inferno::Test
6
+ id :uds_plus_validate_location_test
7
+ title 'Validate UDS+ Location Data'
8
+ description %(
9
+ Test takes the Location resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['Location'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-location'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ data_to_test.each do |resource|
29
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,65 @@
1
+ require 'json'
2
+ require_relative './version'
3
+
4
+ module UDSPlusTestKit
5
+ class ValidatePatientReportingParametersTest < Inferno::Test
6
+ id :uds_plus_validate_patient_reporting_parameters_test
7
+ title 'Validate UDS+ Patient Reporting Parameters Data'
8
+ description %(
9
+ Test takes the Patient Reporting Parameters resources identified
10
+ by the import manifest, and validates whether they conform
11
+ to their UDS+ Structure Definitions.
12
+ )
13
+
14
+ def data_scratch
15
+ scratch[:data_resources] ||= {}
16
+ end
17
+
18
+ def data_to_test
19
+ data_scratch['Parameters'] ||= []
20
+ end
21
+
22
+ run do
23
+ omit_if data_to_test.empty?, "No data of this type was identified."
24
+
25
+ profile_definition = 'http://hl7.org/fhir/us/uds-plus/StructureDefinition/uds-plus-patient-reporting-parameters'
26
+ profile_with_version = "#{profile_definition}|#{UDS_PLUS_VERSION}"
27
+
28
+ no_resource_of_this_type = true
29
+ identifier_fail_message = %(Resource.meta.profile should contain the HTTP location of the
30
+ resource's Structure Definition. Resource.meta.profile either does
31
+ not exist in this resource, or its contents do not point to a valid
32
+ location for type Parameters. **NOTE:**
33
+ If this error occurs, it can trigger a fail for all parameters-type tests,
34
+ regardless of whether both tests were meant to run.)
35
+
36
+ data_to_test.each do |resource|
37
+ # All these assertions are to differentiate Parameters data between orientation types.
38
+ # A resource is skipped if it cannot be identified as a patient reporting parameters resource.
39
+ type_identifier = resource.to_hash
40
+ assert type_identifier['meta'].present?, identifier_fail_message
41
+
42
+ type_identifier = type_identifier['meta']
43
+ assert type_identifier.is_a?(Hash), identifier_fail_message
44
+ assert type_identifier['profile'].present?, identifier_fail_message
45
+
46
+ type_identifier = type_identifier['profile']
47
+ assert type_identifier.is_a?(Array), identifier_fail_message
48
+ assert !type_identifier.empty?, identifier_fail_message
49
+
50
+
51
+ type_identifier = type_identifier.first
52
+ assert type_identifier.is_a?(String), identifier_fail_message
53
+ if !type_identifier.include?("patient-reporting")
54
+ next
55
+ end
56
+
57
+ no_resource_of_this_type = false
58
+
59
+ assert_valid_resource(resource: resource, profile_url: profile_with_version)
60
+ end
61
+
62
+ omit_if no_resource_of_this_type, "No data of this type was identified."
63
+ end
64
+ end
65
+ end
@@ -34,7 +34,7 @@ module UDSPlusTestKit
34
34
  regardless of whether both tests were meant to run.)
35
35
 
36
36
  data_to_test.each do |resource|
37
- # All these assertions are to differentaite Observation data between orientation types.
37
+ # All these assertions are to differentiate Observation data between orientation types.
38
38
  # A resource is skipped if it cannot be identified as a sexual orientation resource.
39
39
  type_identifier = resource.to_hash
40
40
  assert type_identifier['meta'].present?, identifier_fail_message
@@ -32,7 +32,7 @@ module UDSPlusTestKit
32
32
  regardless of whether both tests were meant to run.)
33
33
 
34
34
  data_to_test.each do |resource|
35
- # All these assertions are to differentaite Observation data between orientation types.
35
+ # All these assertions are to differentiate Observation data between orientation types.
36
36
  # A resource is skipped if it is one of the observation types with their own tests.
37
37
  type_identifier = resource.to_hash
38
38
  assert type_identifier['meta'].present?, identifier_fail_message
@@ -48,7 +48,14 @@ module UDSPlusTestKit
48
48
 
49
49
  type_identifier = type_identifier.first
50
50
  assert type_identifier.is_a?(String), identifier_fail_message
51
- if type_identifier.include?("income") || type_identifier.include?("sexual-orientation") || type_identifier.include?("-lab-")
51
+
52
+ known_observations = ["income", "sexual-orientation", "-lab-", "clinical-result"]
53
+ is_known_observation = false
54
+ known_observations.each do |cur|
55
+ is_known_observation = (is_known_observation || type_identifier.include?(cur))
56
+ end
57
+
58
+ if is_known_observation
52
59
  next
53
60
  else
54
61
  assert type_identifier.downcase.include?("observation"), identifier_fail_message
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UDSPlusTestKit
4
- VERSION = '1.0.3'
5
- UDS_PLUS_VERSION = '0.4.1'
4
+ VERSION = '1.0.5'
5
+ UDS_PLUS_VERSION = '1.0.0'
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: uds_plus_test_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leap Orbit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-02 00:00:00.000000000 Z
11
+ date: 2023-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
@@ -97,15 +97,21 @@ files:
97
97
  - lib/uds_plus_test_kit/examples/manifest.json
98
98
  - lib/uds_plus_test_kit/examples/observation.ndjson
99
99
  - lib/uds_plus_test_kit/examples/patient.ndjson
100
+ - lib/uds_plus_test_kit/input_resource_tests/read_adverse_event_test.rb
101
+ - lib/uds_plus_test_kit/input_resource_tests/read_allergy_intolerance_test.rb
102
+ - lib/uds_plus_test_kit/input_resource_tests/read_clinical_result_test.rb
100
103
  - lib/uds_plus_test_kit/input_resource_tests/read_coverage_test.rb
104
+ - lib/uds_plus_test_kit/input_resource_tests/read_data_urls_test.rb
101
105
  - lib/uds_plus_test_kit/input_resource_tests/read_diagnosis_test.rb
102
106
  - lib/uds_plus_test_kit/input_resource_tests/read_encounter_test.rb
103
107
  - lib/uds_plus_test_kit/input_resource_tests/read_immunization_test.rb
104
108
  - lib/uds_plus_test_kit/input_resource_tests/read_income_test.rb
105
109
  - lib/uds_plus_test_kit/input_resource_tests/read_lab_test.rb
110
+ - lib/uds_plus_test_kit/input_resource_tests/read_location_test.rb
106
111
  - lib/uds_plus_test_kit/input_resource_tests/read_manifest_ind_test.rb
107
112
  - lib/uds_plus_test_kit/input_resource_tests/read_med_request_test.rb
108
113
  - lib/uds_plus_test_kit/input_resource_tests/read_med_statement_test.rb
114
+ - lib/uds_plus_test_kit/input_resource_tests/read_patient_reporting_parameters_test.rb
109
115
  - lib/uds_plus_test_kit/input_resource_tests/read_patient_test.rb
110
116
  - lib/uds_plus_test_kit/input_resource_tests/read_procedure_test.rb
111
117
  - lib/uds_plus_test_kit/input_resource_tests/read_related_person_test.rb
@@ -122,14 +128,20 @@ files:
122
128
  - lib/uds_plus_test_kit/post_tests/post_manifest_test.rb
123
129
  - lib/uds_plus_test_kit/post_tests/read_post_test.rb
124
130
  - lib/uds_plus_test_kit/uds_plus_test_suite.rb
131
+ - lib/uds_plus_test_kit/validate_adverse_event_test.rb
132
+ - lib/uds_plus_test_kit/validate_allergy_intolerance_test.rb
133
+ - lib/uds_plus_test_kit/validate_clinical_result_test.rb
125
134
  - lib/uds_plus_test_kit/validate_coverage_test.rb
135
+ - lib/uds_plus_test_kit/validate_data_urls_test.rb
126
136
  - lib/uds_plus_test_kit/validate_diagnosis_test.rb
127
137
  - lib/uds_plus_test_kit/validate_encounter_test.rb
128
138
  - lib/uds_plus_test_kit/validate_immunization_test.rb
129
139
  - lib/uds_plus_test_kit/validate_income_test.rb
130
140
  - lib/uds_plus_test_kit/validate_lab_test.rb
141
+ - lib/uds_plus_test_kit/validate_location_test.rb
131
142
  - lib/uds_plus_test_kit/validate_med_request_test.rb
132
143
  - lib/uds_plus_test_kit/validate_med_statement_test.rb
144
+ - lib/uds_plus_test_kit/validate_patient_reporting_parameters_test.rb
133
145
  - lib/uds_plus_test_kit/validate_patient_test.rb
134
146
  - lib/uds_plus_test_kit/validate_procedure_test.rb
135
147
  - lib/uds_plus_test_kit/validate_related_person_test.rb