uds_plus_test_kit 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uds_plus_test_kit/examples/adverse_event.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/allergy_intollerance.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/condition.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/coverage.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/data_urls.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/encounter.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/immunization.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/medication_request.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/medication_statement.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/observation.ndjson +6 -6
- data/lib/uds_plus_test_kit/examples/patient.ndjson +3 -3
- data/lib/uds_plus_test_kit/examples/procedure.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/related_person.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/reporting_parameters.ndjson +1 -1
- data/lib/uds_plus_test_kit/examples/service_request.ndjson +1 -1
- data/lib/uds_plus_test_kit/input_resource_tests/resource_group.rb +0 -8
- data/lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb +49 -0
- data/lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb +0 -4
- data/lib/uds_plus_test_kit/metadata.rb +1 -1
- data/lib/uds_plus_test_kit/post_tests/post_group.rb +0 -4
- data/lib/uds_plus_test_kit/uds_plus_test_suite.rb +4 -4
- data/lib/uds_plus_test_kit/version.rb +3 -3
- metadata +2 -6
- data/lib/uds_plus_test_kit/input_resource_tests/read_sexual_orientation_test.rb +0 -54
- data/lib/uds_plus_test_kit/input_resource_tests/read_special_observation_test.rb +0 -54
- data/lib/uds_plus_test_kit/validate_sexual_orientation_test.rb +0 -65
- data/lib/uds_plus_test_kit/validate_special_observation_test.rb +0 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8577615763a082132d66bd35a606d219a74f9603774581a33beba1c4fca3e6b9
|
4
|
+
data.tar.gz: 0c04809dd2c69f3aa7247a837d9a08fa01c1aa16c907bcf3b2cb42f935ba6825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 11c93cf4c4b9a40ea420ecd94191b97d5dd73e778c13d354b0fee2b8176b9e1f2fd16e1685adfacd0a74310e24fca51885d197d683ab69f3922a3ca112d262a8
|
7
|
+
data.tar.gz: bb43e3a57cf937a8c5a77eb87a36fb715b06cbbf5a78c770c4dac04a406f9d5668197a248933a51d6e65143c768dd8a54e2dc58efa8273b5703b303c8f92b459
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"AdverseEvent","id":"de-identified-example","meta":{"lastUpdated":"2017-05-26T11:56:57.250-04:00","profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-adverseevent"]},"actuality":"actual","category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/adverse-event-category","code":"medication-mishap","display":"Medication Mishap"}],"text":"Medication Mishap - Wrong Dose"}],"event":{"coding":[{"system":"http://snomed.info/sct","code":"140004","display":"Chronic Pharyngitis"}],"text":"Chronic Pharyngitis"},"subject":{"reference":"Patient/de-identified-example"},"date":"2015","recordedDate":"2017"}
|
1
|
+
{ "resourceType" : "AdverseEvent", "id" : "de-identified-example", "meta" : { "lastUpdated" : "2017-05-26T11:56:57.250-04:00", "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-adverseevent"] }, "actuality" : "actual", "category" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/adverse-event-category", "code" : "medication-mishap", "display" : "Medication Mishap" }], "text" : "Medication Mishap - Wrong Dose" }], "event" : { "coding" : [{ "system" : "http://snomed.info/sct", "code" : "140004", "display" : "Chronic Pharyngitis" }], "text" : "Chronic Pharyngitis" }, "subject" : { "reference" : "Patient/de-identified-example" }, "date" : "2015", "detected" : "2030", "recordedDate" : "2017" }
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"AllergyIntolerance","id":"de-identified-example","meta":{"lastUpdated":"2017-05-26T11:56:57.250-04:00","profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-allergyintolerance"]},"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical","code":"active"}]},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/allergyintolerance-verification","code":"confirmed"}]},"category":["medication"],"criticality":"high","code":{"coding":[{"system":"http://snomed.info/sct","code":"387406002","display":"Sulfonamide (substance)"}],"text":"sulfonamide antibacterial"},"patient":{"reference":"Patient/de-identified-example"},"onsetDateTime":"2015","recordedDate":"2017","reaction":[{"manifestation":[{"coding":[{"system":"http://snomed.info/sct","code":"271807003","display":"skin rash"}],"text":"skin rash"}],"severity":"mild"}]}
|
1
|
+
{ "resourceType" : "AllergyIntolerance", "id" : "de-identified-example", "meta" : { "lastUpdated" : "2017-05-26T11:56:57.250-04:00", "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-allergyintolerance"] }, "clinicalStatus" : { "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical", "code" : "active" }] }, "verificationStatus" : { "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification", "code" : "confirmed" }] }, "category" : ["medication"], "criticality" : "high", "code" : { "coding" : [{ "system" : "http://snomed.info/sct", "code" : "387406002", "display" : "Sulfonamide (substance)" }], "text" : "sulfonamide antibacterial" }, "patient" : { "reference" : "Patient/de-identified-example" }, "onsetDateTime" : "2015", "recordedDate" : "2017", "reaction" : [{ "manifestation" : [{ "coding" : [{ "system" : "http://snomed.info/sct", "code" : "271807003", "display" : "skin rash" }], "text" : "skin rash" }], "severity" : "mild" }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"Condition","id":"de-identified-example","meta":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/instance-name","valueString":"De-identified Diagnosis Example"},{"url":"http://hl7.org/fhir/StructureDefinition/instance-description","valueMarkdown":"This example of a UDS+ Diagnosis profile which illustrates its use to capture de-identified information about a patient's diagnosis."}],"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-diagnosis"]},"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/condition-assertedDate","valueDateTime":"2007"}],"clinicalStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-clinical","code":"active","display":"Active"}]},"verificationStatus":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-ver-status","code":"confirmed","display":"Confirmed"}]},"category":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"problem-list-item","display":"Problem List Item"}]}],"code":{"coding":[{"system":"http://hl7.org/fhir/sid/icd-10-cm","code":"B18.2","display":"Chronic viral hepatitis C"}]},"subject":{"reference":"Patient/de-identified-example"},"onsetDateTime":"2007","recordedDate":"2007"}
|
1
|
+
{ "resourceType" : "Condition", "id" : "de-identified-example", "meta" : { "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString" : "De-identified Diagnosis Example" }, { "url" : "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown" : "This example of a UDS+ Diagnosis profile which illustrates its use to capture de-identified information about a patient's diagnosis." }], "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-diagnosis"] }, "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/condition-assertedDate", "valueDateTime" : "2007" }], "clinicalStatus" : { "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/condition-clinical", "code" : "active", "display" : "Active" }] }, "verificationStatus" : { "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/condition-ver-status", "code" : "confirmed", "display" : "Confirmed" }] }, "category" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/condition-category", "code" : "problem-list-item", "display" : "Problem List Item" }] }], "code" : { "coding" : [{ "system" : "http://hl7.org/fhir/sid/icd-10-cm", "code" : "B18.2", "display" : "Chronic viral hepatitis C" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "onsetDateTime" : "2007", "recordedDate" : "2007"}
|
@@ -1 +1 @@
|
|
1
|
-
{
|
1
|
+
{ "resourceType" : "Coverage", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-coverage"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-capitated-member-months-extension", "valueQuantity" : { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-feeforservice-member-months-extension", "valueQuantity" : { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }], "status" : "active", "type" : { "coding" : [{ "system" : "http://fhir.org/guides/hrsa/uds-plus/CodeSystem/uds-plus-insurance-codes", "code" : "private-insurance", "display" : "Private Insurance" }] }, "beneficiary" : { "reference" : "Patient/de-identified-example" }, "period" : { "start" : "2019", "end" : "2023" }, "payor" : [{ "reference" : "Organization/acme-payer" }]}
|
@@ -1 +1 @@
|
|
1
|
-
{
|
1
|
+
{ "resourceType" : "Parameters", "id" : "de-identify-data-operation-urls-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-deidentify-operation-data-urls-parameter"] }, "parameter" : [{ "name" : "format", "valueCode" : "fhir+ndjson" }, { "name" : "udsData", "part" : [{ "name" : "resourceType", "valueCode" : "Patient" }, { "name" : "resourceUrl", "valueUrl" : "http://example.com/Patient.ndjson" }] }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"Encounter","id":"de-identified-example","meta":{"extension":[{"url":"http://hl7.org/fhir/StructureDefinition/instance-name","valueString":"De-Identified Encounter Example"},{"url":"http://hl7.org/fhir/StructureDefinition/instance-description","valueMarkdown":"This is an encounter example for the *US Core Encounter Profile*."}],"lastUpdated":"2022-05-26T11:56:57.250-04:00","profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-encounter"]},"extension":[{"url":"http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension","valueQuantity":{"value":36,"unit":"yr","system":"http://unitsofmeasure.org","code":"a"}}],"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":"99202"}]}],"subject":{"reference":"Patient/de-identified-example"},"period":{"start":"2022","end":"2022"},"hospitalization":{"dischargeDisposition":{"coding":[{"system":"http://www.nubc.org/patient-discharge","code":"01","display":"Discharged to Home"}]}},"location":[{"location":{"reference":"Location/hospital","display":"Holy Family Hospital"}}]}
|
1
|
+
{ "resourceType" : "Encounter", "id" : "de-identified-example", "meta" : { "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/instance-name", "valueString" : "De-Identified Encounter Example" }, { "url" : "http://hl7.org/fhir/StructureDefinition/instance-description", "valueMarkdown" : "This is an encounter example for the *US Core Encounter Profile*." }], "lastUpdated" : "2022-05-26T11:56:57.250-04:00", "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-encounter"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity" : { "value" : 36, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }], "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" : "99202" }] }], "subject" : { "reference" : "Patient/de-identified-example" }, "period" : { "start" : "2022", "end" : "2022" }, "hospitalization" : { "dischargeDisposition" : { "coding" : [{ "system" : "http://www.nubc.org/patient-discharge", "code" : "01", "display" : "Discharged to Home" }] } }, "location" : [{ "location" : { "reference" : "Location/hospital", "display" : "Holy Family Hospital" } }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"Immunization","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-immunization"]},"status":"completed","statusReason":{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/condition-category","code":"encounter-diagnosis","display":"Encounter Diagnosis"}]},"vaccineCode":{"coding":[{"system":"http://hl7.org/fhir/sid/cvx","code":"197","display":"influenza, high-dose, quadrivalent"}]},"patient":{"reference":"Patient/de-identified-example"},"occurrenceDateTime":"2023","recorded":"2023","primarySource":true}
|
1
|
+
{ "resourceType" : "Immunization", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-immunization"] }, "status" : "completed", "statusReason" : { "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/condition-category", "code" : "encounter-diagnosis", "display" : "Encounter Diagnosis" }] }, "vaccineCode" : { "coding" : [{ "system" : "http://hl7.org/fhir/sid/cvx", "code" : "197", "display" : "influenza, high-dose, quadrivalent" }] }, "patient" : { "reference" : "Patient/de-identified-example" }, "occurrenceDateTime" : "2023", "recorded" : "2023", "primarySource" : true}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"MedicationRequest","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-medicationrequest"]},"status":"active","intent":"order","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"476872","display":"Nizatidine 15 MG/ML Oral Solution"}]},"subject":{"reference":"Patient/de-identified-example"},"encounter":{"reference":"Encounter/de-identified-example"},"authoredOn":"2008","requester":{"reference":"Practitioner/example"},"dosageInstruction":[{"text":"10 mL bid","timing":{"repeat":{"boundsPeriod":{"start":"2008-04-05"},"frequency":2,"period":1,"periodUnit":"d"}},"doseAndRate":[{"doseQuantity":{"value":10,"unit":"ml","system":"http://unitsofmeasure.org","code":"mL"}}]}]}
|
1
|
+
{ "resourceType" : "MedicationRequest", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-medicationrequest"] }, "status" : "active", "intent" : "order", "medicationCodeableConcept" : { "coding" : [{ "system" : "http://www.nlm.nih.gov/research/umls/rxnorm", "code" : "476872", "display" : "Nizatidine 15 MG/ML Oral Solution" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "encounter" : { "reference" : "Encounter/de-identified-example" }, "authoredOn" : "2008", "requester" : { "reference" : "Practitioner/example" }, "dosageInstruction" : [{ "text" : "10 mL bid", "timing" : { "repeat" : { "boundsPeriod" : { "start" : "2008-04-05" }, "frequency" : 2, "period" : 1, "periodUnit" : "d" } }, "doseAndRate" : [{ "doseQuantity" : { "value" : 10, "unit" : "ml", "system" : "http://unitsofmeasure.org", "code" : "mL" } }] }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"MedicationStatement","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-medicationstatement"]},"status":"active","medicationCodeableConcept":{"coding":[{"system":"http://www.nlm.nih.gov/research/umls/rxnorm","code":"476872","display":"Nizatidine 15 MG/ML Oral Solution"}]},"subject":{"reference":"Patient/de-identified-example"},"effectiveDateTime":"2008","dateAsserted":"2008","dosage":[{"text":"10 mL bid","timing":{"repeat":{"boundsPeriod":{"start":"2008-04-05"},"frequency":2,"period":1,"periodUnit":"d"}},"doseAndRate":[{"doseQuantity":{"value":10,"unit":"ml","system":"http://unitsofmeasure.org","code":"mL"}}]}]}
|
1
|
+
{ "resourceType" : "MedicationStatement", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-medicationstatement"] }, "status" : "active", "medicationCodeableConcept" : { "coding" : [{ "system" : "http://www.nlm.nih.gov/research/umls/rxnorm", "code" : "476872", "display" : "Nizatidine 15 MG/ML Oral Solution" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "effectiveDateTime" : "2008", "dateAsserted" : "2008", "dosage" : [{ "text" : "10 mL bid", "timing" : { "repeat" : { "boundsPeriod" : { "start" : "2008-04-05" }, "frequency" : 2, "period" : 1, "periodUnit" : "d" } }, "doseAndRate" : [{ "doseQuantity" : { "value" : 10, "unit" : "ml", "system" : "http://unitsofmeasure.org", "code" : "mL" } }] }]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
{"resourceType":"Observation","id":"de-identified-
|
2
|
-
{"resourceType":"Observation","id":"de-identified-
|
3
|
-
{"resourceType":"Observation","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-
|
4
|
-
{"resourceType":"Observation","id":"de-identified-
|
5
|
-
{"resourceType":"Observation","id":"
|
6
|
-
{
|
1
|
+
{ "resourceType" : "Observation", "id" : "clinical-result-de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-clinical-result-observation"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-deidentified-instant-extension", "valueDateTime" : "2005" }], "status" : "final", "category" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/observation-category", "code" : "imaging", "display" : "Imaging" }] }], "code" : { "coding" : [{ "system" : "http://loinc.org", "code" : "80940-0", "display" : "DXA Femur-L Z-score BMD" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "encounter" : { "reference" : "Encounter/de-identified-example" }, "effectivePeriod" : { "end" : "2005" }, "performer" : [{ "reference" : "Practitioner/example" }], "valueQuantity" : { "value" : 0.05, "unit" : "Z-Score", "system" : "http://unitsofmeasure.org", "code" : "{Z-Score}" }}
|
2
|
+
{ "resourceType" : "Observation", "id" : "generic-observation-de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-observation"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-deidentified-instant-extension", "valueDateTime" : "2005" }], "status" : "final", "category" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/observation-category", "code" : "social-history", "display" : "Social History" }] }], "code" : { "coding" : [{ "system" : "http://snomed.info/sct", "code" : "160695008", "display" : "Transport too expensive" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "effectiveDateTime" : "2021", "valueBoolean" : true}
|
3
|
+
{ "resourceType" : "Observation", "id" : "de-identified-income-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/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", "valueRange" : { "low" : { "value" : 101 }, "high" : { "value" : 150 } }}
|
4
|
+
{ "resourceType" : "Observation", "id" : "de-identified-income-with-quantity-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/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" : "2018", "valueQuantity" : { "value" : 200, "comparator" : ">", "unit" : "percent", "system" : "http://unitsofmeasure.org", "code" : "%" }}
|
5
|
+
{ "resourceType" : "Observation", "id" : "de-identified-low-income-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/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", "valueRange" : { "high" : { "value" : 100 } }}
|
6
|
+
{ "resourceType" : "Observation", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-lab-observation"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-deidentified-instant-extension", "valueDateTime" : "2005" }], "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", "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" }] }}
|
@@ -1,3 +1,3 @@
|
|
1
|
-
{"resourceType":"Patient","id":"de-identified-
|
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://fhir.org/guides/hrsa/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://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-birthsex-extension","valueCode":"F"},{"url":"http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension","valueQuantity":{"value":
|
3
|
-
{"resourceType":"Patient","id":"de-identified-
|
1
|
+
{ "resourceType" : "Patient", "id" : "de-identified-age89-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://fhir.org/guides/hrsa/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://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-birthsex-extension", "valueCode" : "F" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity" : { "value" : 90, "comparator" : ">=", "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }], "active" : true, "gender" : "female", "address" : [{ "postalCode" : "00000-1234", "_postalCode" : { "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode" : "masked" }] } }]}
|
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://fhir.org/guides/hrsa/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://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-birthsex-extension", "valueCode" : "F" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity" : { "value" : 90, "comparator" : ">=", "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }], "active" : true, "gender" : "female", "address" : [{ "postalCode" : "00000-1234", "_postalCode" : { "extension" : [{ "url" : "http://hl7.org/fhir/StructureDefinition/data-absent-reason", "valueCode" : "masked" }] } }]}
|
3
|
+
{ "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://fhir.org/guides/hrsa/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://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-birthsex-extension", "valueCode" : "F" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-sex-extension", "valueCode" : "248152002" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-age-extension", "valueQuantity" : { "value" : 37, "unit" : "yr", "system" : "http://unitsofmeasure.org", "code" : "a" } }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/udsplus-agriculture-worker-status", "valueCode" : "migratory" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-housing-status-extension", "valueCode" : "permanent-supportive-housing" }, { "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-veteran-status-extension", "valueBoolean" : false }], "active" : true, "gender" : "female", "address" : [{ "postalCode" : "03600" }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"Procedure","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-procedure"]},"extension":[{"url":"http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-recordedDate-extension","valueDateTime":"2005"}],"status":"completed","code":{"coding":[{"system":"http://snomed.info/sct","code":"48387007","display":"Tracheotomy"}]},"subject":{"reference":"Patient/de-identified-example"},"encounter":{"reference":"Encounter/de-identified-example"},"performedDateTime":"2005","performer":[{"actor":{"reference":"Practitioner/example"}}],"bodySite":[{"coding":[{"system":"http://snomed.info/sct","code":"44567001","display":"Tracheal structure"}]}]}
|
1
|
+
{ "resourceType" : "Procedure", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-procedure"] }, "extension" : [{ "url" : "http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-recordedDate-extension", "valueDateTime" : "2005" }], "status" : "completed", "code" : { "coding" : [{ "system" : "http://snomed.info/sct", "code" : "48387007", "display" : "Tracheotomy" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "encounter" : { "reference" : "Encounter/de-identified-example" }, "performedDateTime" : "2005", "performer" : [{ "actor" : { "reference" : "Practitioner/example" } }], "bodySite" : [{ "coding" : [{ "system" : "http://snomed.info/sct", "code" : "44567001", "display" : "Tracheal structure" }] }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"RelatedPerson","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/de-identified-uds-plus-relatedperson"]},"patient":{"reference":"Patient/de-identified-example"},"relationship":[{"coding":[{"system":"http://terminology.hl7.org/CodeSystem/v3-RoleCode","code":"FAMMEMB","display":"family member"}]}]}
|
1
|
+
{ "resourceType" : "RelatedPerson", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/de-identified-uds-plus-relatedperson"] }, "patient" : { "reference" : "Patient/de-identified-example" }, "relationship" : [{ "coding" : [{ "system" : "http://terminology.hl7.org/CodeSystem/v3-RoleCode", "code" : "FAMMEMB", "display" : "family member" }] }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"Parameters","id":"reporting-parameters-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-patient-reporting-parameters"]},"parameter":[{"name":"patientReference","valueReference":{"reference":"Patient/de-identified-example"}},{"name":"combinedFundingStreams","valueString":"CHC,MHC"},{"name":"reportNames","part":[{"name":"patientsByZip","valueBoolean":true},{"name":"table3A","valueBoolean":true},{"name":"table3B","valueBoolean":true},{"name":"table4","valueBoolean":true},{"name":"table6A","valueBoolean":true},{"name":"table6B-Line1-6-Age-Of-Prenatal-Care-Patients","valueBoolean":false},{"name":"table6B-Line7-9-Early-Entry-Into-Prenatal-Care","valueBoolean":true},{"name":"table6B-Line10-Childhood-Immunization-Status-CMS117","valueBoolean":true},{"name":"table6B-Line11-Cervical-Cancer-Screening-CMS124","valueBoolean":true},{"name":"table6B-Line11a-Breast-Cancer-Screening-CMS125","valueBoolean":true},{"name":"table6B-Line12-Weight-Assessment-And-Counselling-CMS155","valueBoolean":true},{"name":"table6B-Line13-Preventive-Care-And-Screening-BMI-CMS69","valueBoolean":true},{"name":"table6B-Line14a-Preventive-Care-And-Screening-Tobacco-Use-CMS138","valueBoolean":true},{"name":"table6B-Line17a-Statin-Therapy-CMS347","valueBoolean":true},{"name":"table6B-Line18-Ischmic-Vascular-Disease-CMS164","valueBoolean":true},{"name":"table6B-Line19-Colorectal-Cancer-Screening-CMS130","valueBoolean":true},{"name":"table6B-Line20-HIV-Linkage-To-Care","valueBoolean":true},{"name":"table6B-Line20a-HIV-Screening-CMS349","valueBoolean":true},{"name":"table6B-Line21-Preventive-Care-And-Screening-For-Depression-CMS2","valueBoolean":true},{"name":"table6B-Line21a-Depression-Remission-At-Twelve-Months-CMS159","valueBoolean":true},{"name":"table6B-Line22-Dental-Sealants-For-Children-CMS277","valueBoolean":true},{"name":"table7-Line0-HIV-Positive-Pregnant-Patients","valueBoolean":true},{"name":"table7-Line2-Deliveries-Performed-By-Health-Center","valueBoolean":true},{"name":"table7-Line1a-d-Prenatal-Care-Patient-Deliveries","valueBoolean":true},{"name":"table7-Line2a-c-Controlling-High-Blood-Pressure-CMS165","valueBoolean":true},{"name":"table7-Line3a-f-HbA1c-Poor-Control-CMS122","valueBoolean":true}]}]}
|
1
|
+
{ "resourceType" : "Parameters", "id" : "reporting-parameters-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-patient-reporting-parameters"] }, "parameter" : [{ "name" : "patientReference", "valueReference" : { "reference" : "Patient/de-identified-example" } }, { "name" : "combinedFundingStreams", "valueString" : "CHC,MHC" }, { "name" : "reportNames", "part" : [{ "name" : "patientsByZip", "valueBoolean" : true }, { "name" : "table3A", "valueBoolean" : true }, { "name" : "table3B", "valueBoolean" : true }, { "name" : "table4", "valueBoolean" : true }, { "name" : "table6A", "valueBoolean" : true }, { "name" : "table6B-Line1-6-Age-Of-Prenatal-Care-Patients", "valueBoolean" : false }, { "name" : "table6B-Line7-9-Early-Entry-Into-Prenatal-Care", "valueBoolean" : true }, { "name" : "table6B-Line10-Childhood-Immunization-Status-CMS117", "valueBoolean" : true }, { "name" : "table6B-Line11-Cervical-Cancer-Screening-CMS124", "valueBoolean" : true }, { "name" : "table6B-Line11a-Breast-Cancer-Screening-CMS125", "valueBoolean" : true }, { "name" : "table6B-Line12-Weight-Assessment-And-Counselling-CMS155", "valueBoolean" : true }, { "name" : "table6B-Line13-Preventive-Care-And-Screening-BMI-CMS69", "valueBoolean" : true }, { "name" : "table6B-Line14a-Preventive-Care-And-Screening-Tobacco-Use-CMS138", "valueBoolean" : true }, { "name" : "table6B-Line17a-Statin-Therapy-CMS347", "valueBoolean" : true }, { "name" : "table6B-Line18-Ischmic-Vascular-Disease-CMS164", "valueBoolean" : true }, { "name" : "table6B-Line19-Colorectal-Cancer-Screening-CMS130", "valueBoolean" : true }, { "name" : "table6B-Line20-HIV-Linkage-To-Care", "valueBoolean" : true }, { "name" : "table6B-Line20a-HIV-Screening-CMS349", "valueBoolean" : true }, { "name" : "table6B-Line21-Preventive-Care-And-Screening-For-Depression-CMS2", "valueBoolean" : true }, { "name" : "table6B-Line21a-Depression-Remission-At-Twelve-Months-CMS159", "valueBoolean" : true }, { "name" : "table6B-Line22-Dental-Sealants-For-Children-CMS277", "valueBoolean" : true }, { "name" : "table7-Line0-HIV-Positive-Pregnant-Patients", "valueBoolean" : true }, { "name" : "table7-Line2-Deliveries-Performed-By-Health-Center", "valueBoolean" : true }, { "name" : "table7-Line1a-d-Prenatal-Care-Patient-Deliveries", "valueBoolean" : true }, { "name" : "table7-Line2a-c-Controlling-High-Blood-Pressure-CMS165", "valueBoolean" : true }, { "name" : "table7-Line3a-f-HbA1c-Poor-Control-CMS122", "valueBoolean" : true }] }]}
|
@@ -1 +1 @@
|
|
1
|
-
{"resourceType":"ServiceRequest","id":"de-identified-example","meta":{"profile":["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-servicerequest"]},"status":"completed","intent":"order","doNotPerform":false,"code":{"coding":[{"system":"http://snomed.info/sct","code":"76164006","display":"Biopsy of colon (procedure)"}]},"subject":{"reference":"Patient/de-identified-example"},"encounter":{"reference":"Encounter/de-identified-example"},"authoredOn":"2017","requester":{"reference":"Practitioner/example"},"bodySite":[{"coding":[{"system":"http://snomed.info/sct","code":"485005","display":"Transverse colon structure"}]}]}
|
1
|
+
{ "resourceType" : "ServiceRequest", "id" : "de-identified-example", "meta" : { "profile" : ["http://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-servicerequest"] }, "status" : "completed", "intent" : "order", "doNotPerform" : false, "code" : { "coding" : [{ "system" : "http://snomed.info/sct", "code" : "76164006", "display" : "Biopsy of colon (procedure)" }] }, "subject" : { "reference" : "Patient/de-identified-example" }, "encounter" : { "reference" : "Encounter/de-identified-example" }, "authoredOn" : "2017", "requester" : { "reference" : "Practitioner/example" }, "bodySite" : [{ "coding" : [{ "system" : "http://snomed.info/sct", "code" : "485005", "display" : "Transverse colon structure" }] }]}
|
@@ -5,20 +5,16 @@ require_relative './read_encounter_test'
|
|
5
5
|
require_relative './read_income_test'
|
6
6
|
require_relative './read_patient_test'
|
7
7
|
require_relative './read_procedure_test'
|
8
|
-
require_relative './read_sexual_orientation_test'
|
9
8
|
require_relative '../validate_coverage_test'
|
10
9
|
require_relative '../validate_diagnosis_test'
|
11
10
|
require_relative '../validate_encounter_test'
|
12
11
|
require_relative '../validate_income_test'
|
13
12
|
require_relative '../validate_patient_test'
|
14
13
|
require_relative '../validate_procedure_test'
|
15
|
-
require_relative '../validate_sexual_orientation_test'
|
16
14
|
require_relative './read_manifest_ind_test'
|
17
15
|
require_relative '../manifest_tests/validate_manifest_test'
|
18
16
|
require_relative './read_observation_test'
|
19
17
|
require_relative '../validate_observation_test'
|
20
|
-
require_relative './read_special_observation_test'
|
21
|
-
require_relative '../validate_special_observation_test'
|
22
18
|
require_relative './read_related_person_test'
|
23
19
|
require_relative '../validate_related_person_test'
|
24
20
|
require_relative './read_immunization_test'
|
@@ -83,16 +79,12 @@ module UDSPlusTestKit
|
|
83
79
|
test from: :uds_plus_validate_adverse_event_test
|
84
80
|
test from: :uds_plus_read_income_test
|
85
81
|
test from: :uds_plus_validate_income_test
|
86
|
-
test from: :uds_plus_read_sexual_orientation_test
|
87
|
-
test from: :uds_plus_validate_sexual_orientation_test
|
88
82
|
test from: :uds_plus_read_lab_test
|
89
83
|
test from: :uds_plus_validate_lab_test
|
90
84
|
test from: :uds_plus_read_clinical_result_test
|
91
85
|
test from: :uds_plus_validate_clinical_result_test
|
92
86
|
test from: :uds_plus_read_observation_test
|
93
87
|
test from: :uds_plus_validate_observation_test
|
94
|
-
test from: :uds_plus_read_special_observation_test
|
95
|
-
test from: :uds_plus_validate_special_observation_test
|
96
88
|
test from: :uds_plus_read_medication_request_test
|
97
89
|
test from: :uds_plus_validate_medication_request_test
|
98
90
|
test from: :uds_plus_read_medication_statement_test
|
@@ -14,6 +14,10 @@ module UDSPlusTestKit
|
|
14
14
|
scratch[:data_resources] ||= {}
|
15
15
|
end
|
16
16
|
|
17
|
+
def observation_data
|
18
|
+
data_scratch['Observation'] ||= []
|
19
|
+
end
|
20
|
+
|
17
21
|
def valid_data_types
|
18
22
|
[
|
19
23
|
'Coverage', 'Condition', 'Encounter',
|
@@ -27,6 +31,13 @@ module UDSPlusTestKit
|
|
27
31
|
end
|
28
32
|
|
29
33
|
run do
|
34
|
+
identifier_fail_message = %(Resource.meta.profile should contain the HTTP location of the
|
35
|
+
resource's Structure Definition. Resource.meta.profile either does
|
36
|
+
not exist in this resource, or its contents do not point to a valid
|
37
|
+
location for type Parameters. **NOTE:**
|
38
|
+
If this error occurs, it can trigger a fail for all parameters-type tests,
|
39
|
+
regardless of whether both tests were meant to run.)
|
40
|
+
|
30
41
|
invalid_types_found = []
|
31
42
|
data_scratch.keys.each do |data_type|
|
32
43
|
if !valid_data_types.include?(data_type)
|
@@ -39,6 +50,44 @@ module UDSPlusTestKit
|
|
39
50
|
in the import manifest: #{invalid_types_found}.
|
40
51
|
)
|
41
52
|
assert invalid_types_found.empty?, fail_message
|
53
|
+
|
54
|
+
# For 2.0.0 release of IG, all types of Observation resources have been strongly defined. Move validation step of whether all Observation
|
55
|
+
# resources submitted match one of the known types from the Special Observation test to here
|
56
|
+
invalid_observations_found = []
|
57
|
+
observation_data.each do |resource|
|
58
|
+
# All these assertions are to differentiate Observation data between orientation types.
|
59
|
+
# A resource is skipped if it is one of the observation types with their own tests.
|
60
|
+
type_identifier = resource.to_hash
|
61
|
+
assert type_identifier['meta'].present?, identifier_fail_message
|
62
|
+
|
63
|
+
type_identifier = type_identifier['meta']
|
64
|
+
assert type_identifier.is_a?(Hash), identifier_fail_message
|
65
|
+
assert type_identifier['profile'].present?, identifier_fail_message
|
66
|
+
|
67
|
+
type_identifier = type_identifier['profile']
|
68
|
+
assert type_identifier.is_a?(Array), identifier_fail_message
|
69
|
+
assert !type_identifier.empty?, identifier_fail_message
|
70
|
+
|
71
|
+
|
72
|
+
type_identifier = type_identifier.first
|
73
|
+
assert type_identifier.is_a?(String), identifier_fail_message
|
74
|
+
|
75
|
+
known_observations = ["income", "-lab-", "clinical-result", "uds-plus-observation"]
|
76
|
+
is_known_observation = false
|
77
|
+
known_observations.each do |cur|
|
78
|
+
is_known_observation = (is_known_observation || type_identifier.include?(cur))
|
79
|
+
end
|
80
|
+
|
81
|
+
if !is_known_observation
|
82
|
+
invalid_observations_found << type_identifier
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
observation_fail_message = %(
|
87
|
+
The following invalid observation types were referenced
|
88
|
+
in the import manifest: #{invalid_observations_found}.
|
89
|
+
)
|
90
|
+
assert invalid_observations_found.empty?, observation_fail_message
|
42
91
|
end
|
43
92
|
end
|
44
93
|
end
|
@@ -9,9 +9,7 @@ require_relative '../validate_income_test'
|
|
9
9
|
require_relative './validate_manifest_test'
|
10
10
|
require_relative '../validate_patient_test'
|
11
11
|
require_relative '../validate_procedure_test'
|
12
|
-
require_relative '../validate_sexual_orientation_test'
|
13
12
|
require_relative '../validate_observation_test'
|
14
|
-
require_relative '../validate_special_observation_test'
|
15
13
|
require_relative '../validate_related_person_test'
|
16
14
|
require_relative '../validate_immunization_test'
|
17
15
|
require_relative '../validate_lab_test'
|
@@ -52,11 +50,9 @@ module UDSPlusTestKit
|
|
52
50
|
test from: :uds_plus_validate_allergy_intolerance_test
|
53
51
|
test from: :uds_plus_validate_adverse_event_test
|
54
52
|
test from: :uds_plus_validate_income_test
|
55
|
-
test from: :uds_plus_validate_sexual_orientation_test
|
56
53
|
test from: :uds_plus_validate_lab_test
|
57
54
|
test from: :uds_plus_validate_clinical_result_test
|
58
55
|
test from: :uds_plus_validate_observation_test
|
59
|
-
test from: :uds_plus_validate_special_observation_test
|
60
56
|
test from: :uds_plus_validate_medication_request_test
|
61
57
|
test from: :uds_plus_validate_medication_statement_test
|
62
58
|
test from: :uds_plus_validate_service_request_test
|
@@ -5,7 +5,7 @@ module UDSPlusTestKit
|
|
5
5
|
id :uds_plus
|
6
6
|
title 'UDS+ Test Kit'
|
7
7
|
description <<~DESCRIPTION
|
8
|
-
The UDS+ Test Kit validates the conformance of a server to the [UDS+ IG
|
8
|
+
The UDS+ Test Kit validates the conformance of a server to the [UDS+ IG v2.0.0](https://fhir.org/guides/hrsa/uds-plus/STU2). The included tests function as a rudimentary data receiver. This receiver will take a provided Import Manifest, either as an HTTP location or as a raw json, and validate its contents. This includes validating the structure of the manifest, as well as the structure of the data the manifest points to.
|
9
9
|
<!-- break -->
|
10
10
|
This test kit is built using the [Inferno Framework](https://inferno-framework.github.io/docs/). The Inferno Framework is designed for reuse and aims to make it easier to build test kits for any FHIR-based data exchange.
|
11
11
|
|
@@ -14,9 +14,7 @@ require_relative '../validate_encounter_test'
|
|
14
14
|
require_relative '../validate_income_test'
|
15
15
|
require_relative '../validate_patient_test'
|
16
16
|
require_relative '../validate_procedure_test'
|
17
|
-
require_relative '../validate_sexual_orientation_test'
|
18
17
|
require_relative '../validate_observation_test'
|
19
|
-
require_relative '../validate_special_observation_test'
|
20
18
|
require_relative '../validate_related_person_test'
|
21
19
|
require_relative '../validate_immunization_test'
|
22
20
|
require_relative '../validate_lab_test'
|
@@ -58,11 +56,9 @@ module UDSPlusTestKit
|
|
58
56
|
test from: :uds_plus_validate_allergy_intolerance_test
|
59
57
|
test from: :uds_plus_validate_adverse_event_test
|
60
58
|
test from: :uds_plus_validate_income_test
|
61
|
-
test from: :uds_plus_validate_sexual_orientation_test
|
62
59
|
test from: :uds_plus_validate_lab_test
|
63
60
|
test from: :uds_plus_validate_clinical_result_test
|
64
61
|
test from: :uds_plus_validate_observation_test
|
65
|
-
test from: :uds_plus_validate_special_observation_test
|
66
62
|
test from: :uds_plus_validate_medication_request_test
|
67
63
|
test from: :uds_plus_validate_medication_statement_test
|
68
64
|
test from: :uds_plus_validate_service_request_test
|
@@ -8,7 +8,7 @@ module UDSPlusTestKit
|
|
8
8
|
title 'UDS+ Test Kit'
|
9
9
|
description %(
|
10
10
|
The UDS+ Test Kit tests systems for their conformance to the [UDS+
|
11
|
-
Implementation Guide
|
11
|
+
Implementation Guide v2.0.0](https://fhir.org/guides/hrsa/uds-plus/STU2).
|
12
12
|
The included tests function as a rudimentary data receiver. This receiver will
|
13
13
|
take a provided Import Manifest, either as an HTTP location or as a raw json,
|
14
14
|
and validate its contents. This includes validating the structure of the manifest,
|
@@ -17,7 +17,7 @@ module UDSPlusTestKit
|
|
17
17
|
|
18
18
|
fhir_resource_validator do
|
19
19
|
# The home-lab-report contains validation tools for certain codes missing in the UDS+ package
|
20
|
-
igs('fhir.hrsa.uds-plus#
|
20
|
+
igs('fhir.hrsa.uds-plus#2.0.0', 'hl7.fhir.us.home-lab-report#1.0.0')
|
21
21
|
|
22
22
|
cli_context do
|
23
23
|
displayWarnings true
|
@@ -140,8 +140,8 @@ module UDSPlusTestKit
|
|
140
140
|
},
|
141
141
|
{
|
142
142
|
type: 'ig',
|
143
|
-
label: 'UDS+ Implementation Guide
|
144
|
-
url: 'https://fhir.org/guides/hrsa/uds-plus/
|
143
|
+
label: 'UDS+ Implementation Guide v2.0.0',
|
144
|
+
url: 'https://fhir.org/guides/hrsa/uds-plus/STU2'
|
145
145
|
}
|
146
146
|
]
|
147
147
|
|
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.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leap Orbit
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inferno_core
|
@@ -129,8 +129,6 @@ files:
|
|
129
129
|
- lib/uds_plus_test_kit/input_resource_tests/read_procedure_test.rb
|
130
130
|
- lib/uds_plus_test_kit/input_resource_tests/read_related_person_test.rb
|
131
131
|
- lib/uds_plus_test_kit/input_resource_tests/read_service_request_test.rb
|
132
|
-
- lib/uds_plus_test_kit/input_resource_tests/read_sexual_orientation_test.rb
|
133
|
-
- lib/uds_plus_test_kit/input_resource_tests/read_special_observation_test.rb
|
134
132
|
- lib/uds_plus_test_kit/input_resource_tests/resource_group.rb
|
135
133
|
- lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb
|
136
134
|
- lib/uds_plus_test_kit/manifest_tests/read_data_test.rb
|
@@ -161,8 +159,6 @@ files:
|
|
161
159
|
- lib/uds_plus_test_kit/validate_procedure_test.rb
|
162
160
|
- lib/uds_plus_test_kit/validate_related_person_test.rb
|
163
161
|
- lib/uds_plus_test_kit/validate_service_request_test.rb
|
164
|
-
- lib/uds_plus_test_kit/validate_sexual_orientation_test.rb
|
165
|
-
- lib/uds_plus_test_kit/validate_special_observation_test.rb
|
166
162
|
- lib/uds_plus_test_kit/version.rb
|
167
163
|
homepage: https://github.com/inferno-framework/uds-plus-test-kit
|
168
164
|
licenses:
|
@@ -1,54 +0,0 @@
|
|
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
|
@@ -1,54 +0,0 @@
|
|
1
|
-
require 'json'
|
2
|
-
|
3
|
-
module UDSPlusTestKit
|
4
|
-
class ReadSpecialObservationTest < Inferno::Test
|
5
|
-
id :uds_plus_read_special_observation_test
|
6
|
-
title 'Receive UDS+ Special Observation Data'
|
7
|
-
description %(
|
8
|
-
Test takes from the user either: the http location of special observation data
|
9
|
-
(such as uds-special-population-observation) or the raw JSON of the data itself.
|
10
|
-
It attempts to GET the data stored at the given location if a link is provided,
|
11
|
-
then validates whether a FHIR resource can be generated from the input data.
|
12
|
-
)
|
13
|
-
|
14
|
-
input :special_observation_data,
|
15
|
-
title: 'Special Observation Data',
|
16
|
-
optional: true,
|
17
|
-
description: %q(
|
18
|
-
User can input the data as:
|
19
|
-
a URL link to the location of the data (ex: http://www.example.com/special_observation_data.json)
|
20
|
-
OR a JSON string that composes the data. Leaving this blank will skip the test.
|
21
|
-
)
|
22
|
-
|
23
|
-
def data_scratch
|
24
|
-
scratch[:data_resources] ||= {}
|
25
|
-
end
|
26
|
-
|
27
|
-
def data_to_test
|
28
|
-
data_scratch['Observation'] ||= []
|
29
|
-
end
|
30
|
-
|
31
|
-
run do
|
32
|
-
omit_if !special_observation_data.present?, "No data provided; skipping test."
|
33
|
-
|
34
|
-
# if the input is a url, else it is a json
|
35
|
-
if special_observation_data.strip[0] != '{'
|
36
|
-
assert_valid_http_uri(special_observation_data, "Location provided is not a valid http uri.")
|
37
|
-
get special_observation_data
|
38
|
-
assert_response_status(200)
|
39
|
-
assert_valid_json(request.response_body, "Data received from request is not a valid JSON")
|
40
|
-
data = request.response_body
|
41
|
-
else
|
42
|
-
assert_valid_json(special_observation_data, "JSON inputted was not in a valid format")
|
43
|
-
data = special_observation_data
|
44
|
-
end
|
45
|
-
|
46
|
-
resource = FHIR::Json.from_json(data)
|
47
|
-
assert resource.is_a?(FHIR::Model), "Could not generate a valid resource from the input provided"
|
48
|
-
|
49
|
-
if resource.is_a?(FHIR::Model)
|
50
|
-
data_to_test << resource
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
@@ -1,65 +0,0 @@
|
|
1
|
-
require 'json'
|
2
|
-
require_relative './version'
|
3
|
-
|
4
|
-
module UDSPlusTestKit
|
5
|
-
class ValidateSexualOrientationTest < Inferno::Test
|
6
|
-
id :uds_plus_validate_sexual_orientation_test
|
7
|
-
title 'Validate UDS+ Sexual Orientation Data'
|
8
|
-
description %(
|
9
|
-
Test takes the Sexual Orientation 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://fhir.org/guides/hrsa/uds-plus/StructureDefinition/uds-plus-sexual-orientation-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 all such 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 a sexual orientation 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?("sexual-orientation")
|
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
|
@@ -1,72 +0,0 @@
|
|
1
|
-
require 'json'
|
2
|
-
require_relative './version'
|
3
|
-
|
4
|
-
module UDSPlusTestKit
|
5
|
-
class ValidateSpecialObservationTest < Inferno::Test
|
6
|
-
id :uds_plus_validate_special_observation_test
|
7
|
-
title 'Validate UDS+ Special Observation Data'
|
8
|
-
description %(
|
9
|
-
Test takes the Special Observation resources identified
|
10
|
-
(such as uds-special-population-observation) by the import
|
11
|
-
manifest, and validates whether they conform to their
|
12
|
-
UDS+ Structure Definitions.
|
13
|
-
)
|
14
|
-
|
15
|
-
def data_scratch
|
16
|
-
scratch[:data_resources] ||= {}
|
17
|
-
end
|
18
|
-
|
19
|
-
def data_to_test
|
20
|
-
data_scratch['Observation'] ||= []
|
21
|
-
end
|
22
|
-
|
23
|
-
run do
|
24
|
-
omit_if data_to_test.empty?, "No data of this type was identified."
|
25
|
-
|
26
|
-
no_resource_of_this_type = true
|
27
|
-
identifier_fail_message = %(Resource.meta.profile should contain the HTTP location of the
|
28
|
-
resource's Structure Definition. Resource.meta.profile either does
|
29
|
-
not exist in this resource, or its contents do not point to a valid
|
30
|
-
location for type Observation. **NOTE:**
|
31
|
-
If this error occurs, it can trigger a fail for all observation-type tests,
|
32
|
-
regardless of whether all such tests were meant to run.)
|
33
|
-
|
34
|
-
data_to_test.each do |resource|
|
35
|
-
# All these assertions are to differentiate Observation data between orientation types.
|
36
|
-
# A resource is skipped if it is one of the observation types with their own tests.
|
37
|
-
type_identifier = resource.to_hash
|
38
|
-
assert type_identifier['meta'].present?, identifier_fail_message
|
39
|
-
|
40
|
-
type_identifier = type_identifier['meta']
|
41
|
-
assert type_identifier.is_a?(Hash), identifier_fail_message
|
42
|
-
assert type_identifier['profile'].present?, identifier_fail_message
|
43
|
-
|
44
|
-
type_identifier = type_identifier['profile']
|
45
|
-
assert type_identifier.is_a?(Array), identifier_fail_message
|
46
|
-
assert !type_identifier.empty?, identifier_fail_message
|
47
|
-
|
48
|
-
|
49
|
-
type_identifier = type_identifier.first
|
50
|
-
assert type_identifier.is_a?(String), identifier_fail_message
|
51
|
-
|
52
|
-
known_observations = ["income", "sexual-orientation", "-lab-", "clinical-result", "uds-plus-observation"]
|
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
|
59
|
-
next
|
60
|
-
else
|
61
|
-
assert type_identifier.downcase.include?("observation"), identifier_fail_message
|
62
|
-
end
|
63
|
-
|
64
|
-
no_resource_of_this_type = false
|
65
|
-
|
66
|
-
assert_valid_resource(resource: resource)
|
67
|
-
end
|
68
|
-
|
69
|
-
omit_if no_resource_of_this_type, "No data of this type was identified."
|
70
|
-
end
|
71
|
-
end
|
72
|
-
end
|