uds_plus_test_kit 1.1.2 → 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.
Files changed (29) hide show
  1. checksums.yaml +4 -4
  2. data/lib/uds_plus_test_kit/examples/adverse_event.ndjson +1 -1
  3. data/lib/uds_plus_test_kit/examples/allergy_intollerance.ndjson +1 -1
  4. data/lib/uds_plus_test_kit/examples/condition.ndjson +1 -1
  5. data/lib/uds_plus_test_kit/examples/coverage.ndjson +1 -1
  6. data/lib/uds_plus_test_kit/examples/data_urls.ndjson +1 -1
  7. data/lib/uds_plus_test_kit/examples/encounter.ndjson +1 -1
  8. data/lib/uds_plus_test_kit/examples/immunization.ndjson +1 -1
  9. data/lib/uds_plus_test_kit/examples/medication_request.ndjson +1 -1
  10. data/lib/uds_plus_test_kit/examples/medication_statement.ndjson +1 -1
  11. data/lib/uds_plus_test_kit/examples/observation.ndjson +6 -6
  12. data/lib/uds_plus_test_kit/examples/patient.ndjson +3 -3
  13. data/lib/uds_plus_test_kit/examples/procedure.ndjson +1 -1
  14. data/lib/uds_plus_test_kit/examples/related_person.ndjson +1 -1
  15. data/lib/uds_plus_test_kit/examples/reporting_parameters.ndjson +1 -1
  16. data/lib/uds_plus_test_kit/examples/service_request.ndjson +1 -1
  17. data/lib/uds_plus_test_kit/input_resource_tests/resource_group.rb +0 -8
  18. data/lib/uds_plus_test_kit/manifest_tests/invalid_type_test.rb +49 -0
  19. data/lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb +0 -4
  20. data/lib/uds_plus_test_kit/metadata.rb +38 -0
  21. data/lib/uds_plus_test_kit/post_tests/post_group.rb +0 -4
  22. data/lib/uds_plus_test_kit/uds_plus_test_suite.rb +15 -10
  23. data/lib/uds_plus_test_kit/version.rb +4 -3
  24. data/lib/uds_plus_test_kit.rb +1 -0
  25. metadata +7 -9
  26. data/lib/uds_plus_test_kit/input_resource_tests/read_sexual_orientation_test.rb +0 -54
  27. data/lib/uds_plus_test_kit/input_resource_tests/read_special_observation_test.rb +0 -54
  28. data/lib/uds_plus_test_kit/validate_sexual_orientation_test.rb +0 -65
  29. 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: 875d006024ae7479c2e4cb840193ae182840c8e7686d661b0bb2edd6772af02f
4
- data.tar.gz: e09f47c5fc7032133c5c07a1764107bc3ec9bfcab4eb145bb610ac48677eeedb
3
+ metadata.gz: 8577615763a082132d66bd35a606d219a74f9603774581a33beba1c4fca3e6b9
4
+ data.tar.gz: 0c04809dd2c69f3aa7247a837d9a08fa01c1aa16c907bcf3b2cb42f935ba6825
5
5
  SHA512:
6
- metadata.gz: 50c91aee49e8521ca416b79f30eff3abe24069a08f6c93d5ddc2cdbdfb505c40ee48cd6ecbad7f89d8d5cda35634d2b28626b706d690c8629b5780268b0b2518
7
- data.tar.gz: ca71e53e04da87c6d738fd2d6f9506c16974430b431fe60930425e681fa112909162007c91bfc2e32ab5a7cfd591564d56e0ffd85db08ad196a4d3d95287c354
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
- { "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
+ { "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
- { "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
+ { "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-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}}}
2
- {"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":"%"}}
3
- {"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"}]}}
4
- {"resourceType":"Observation","id":"de-identified-sexual-orientation-example","meta":{"profile":["http://fhir.org/guides/hrsa/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"}]}}
5
- {"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}"}}
6
- { "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}
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-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"}},{"url":"http://fhir.org/guides/hrsa/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://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":70,"unit":"yr","system":"http://unitsofmeasure.org","code":"a"}},{"url":"http://fhir.org/guides/hrsa/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://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"}]}
3
- {"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"}},{"url":"http://fhir.org/guides/hrsa/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"}]}}]}
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
@@ -0,0 +1,38 @@
1
+ require_relative 'version'
2
+
3
+ module UDSPlusTestKit
4
+ class Metadata < Inferno::TestKit
5
+ id :uds_plus
6
+ title 'UDS+ Test Kit'
7
+ description <<~DESCRIPTION
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
+ <!-- break -->
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
+
12
+ ### Status
13
+
14
+ The test kit currently tests the following requirements:
15
+
16
+ - That a given import manifest structure and the structure of the data the manifest points to are valid
17
+ - Receiving an import manifest by POST request
18
+ - Receiving and validating individual resources by URL or raw JSON
19
+
20
+ See the test descriptions within the test kit for detail on the specific validations performed as part of testing these requirements.
21
+
22
+ ### Repository
23
+
24
+ The UDS+ Test Kit GitHub repository can be [found here](https://github.com/inferno-framework/uds-plus-test-kit).
25
+
26
+ ### Providing Feedback and Reporting Issues
27
+
28
+ Please report any issues with this set of tests in the [issues section](https://github.com/inferno-framework/uds-plus-test-kit/issues) of the repository.
29
+ DESCRIPTION
30
+ suite_ids [:uds_plus]
31
+ tags ['']
32
+ last_updated LAST_UPDATED
33
+ version VERSION
34
+ maturity 'Low'
35
+ authors ['Leap Orbit']
36
+ repo 'https://github.com/inferno-framework/uds-plus-test-kit'
37
+ end
38
+ end
@@ -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
@@ -1,5 +1,4 @@
1
1
  require 'inferno/dsl/oauth_credentials'
2
- require_relative './version'
3
2
  require_relative './manifest_tests/uds_plus_test_group'
4
3
  require_relative './input_resource_tests/resource_group'
5
4
  require_relative './post_tests/post_group'
@@ -9,18 +8,16 @@ module UDSPlusTestKit
9
8
  title 'UDS+ Test Kit'
10
9
  description %(
11
10
  The UDS+ Test Kit tests systems for their conformance to the [UDS+
12
- Implementation Guide v1.1.0](https://fhir.org/guides/hrsa/uds-plus/index.html).
13
- The included tests function as a rudimentary data receiver. This receiver will
11
+ Implementation Guide v2.0.0](https://fhir.org/guides/hrsa/uds-plus/STU2).
12
+ The included tests function as a rudimentary data receiver. This receiver will
14
13
  take a provided Import Manifest, either as an HTTP location or as a raw json,
15
14
  and validate its contents. This includes validating the structure of the manifest,
16
15
  as well as the structure of the data the manifest points to.
17
16
  )
18
17
 
19
- version VERSION
20
-
21
18
  fhir_resource_validator do
22
19
  # The home-lab-report contains validation tools for certain codes missing in the UDS+ package
23
- igs('fhir.hrsa.uds-plus#1.1.0', 'hl7.fhir.us.home-lab-report#1.0.0')
20
+ igs('fhir.hrsa.uds-plus#2.0.0', 'hl7.fhir.us.home-lab-report#1.0.0')
24
21
 
25
22
  cli_context do
26
23
  displayWarnings true
@@ -55,7 +52,7 @@ module UDSPlusTestKit
55
52
  manifest_ex = File.read(File.join(__dir__, 'examples/manifest.json'))
56
53
  manifest_ex_route_handler = proc { [200, { 'Content-Type' => 'application/json' }, [manifest_ex]] }
57
54
  route(:get, "/examples/manifest", manifest_ex_route_handler)
58
-
55
+
59
56
  bad_condition_ex = File.read(File.join(__dir__, 'examples/invalid_condition.ndjson'))
60
57
  bad_condition_ex_route_handler = proc { [200, { 'Content-Type' => 'application/ndjson' }, [bad_condition_ex]] }
61
58
  route(:get, "/examples/invalid_condition", bad_condition_ex_route_handler)
@@ -127,21 +124,29 @@ module UDSPlusTestKit
127
124
 
128
125
  links [
129
126
  {
127
+ type: 'report_issue',
130
128
  label: 'Report Issue',
131
129
  url: 'https://github.com/inferno-framework/uds-plus-test-kit/issues'
132
130
  },
133
131
  {
132
+ type: 'source_code',
134
133
  label: 'Open Source',
135
134
  url: 'https://github.com/inferno-framework/uds-plus-test-kit/'
136
135
  },
137
136
  {
138
- label: 'UDS+ Implementation Guide v1.1.0',
139
- url: 'https://fhir.org/guides/hrsa/uds-plus/index.html'
137
+ type: 'download',
138
+ label: 'Download',
139
+ url: 'https://github.com/inferno-framework/uds-plus-test-kit/releases/'
140
+ },
141
+ {
142
+ type: 'ig',
143
+ label: 'UDS+ Implementation Guide v2.0.0',
144
+ url: 'https://fhir.org/guides/hrsa/uds-plus/STU2'
140
145
  }
141
146
  ]
142
147
 
143
148
  group from: :uds_plus_test_group
144
- group from: :uds_plus_manifest_post_group
149
+ group from: :uds_plus_manifest_post_group
145
150
  group from: :uds_plus_resource_test_group
146
151
  end
147
152
  end
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UDSPlusTestKit
4
- VERSION = '1.1.2'
5
- UDS_PLUS_VERSION = '1.1.0'
6
- end
4
+ VERSION = '1.2.1'
5
+ UDS_PLUS_VERSION = '2.0.0'
6
+ LAST_UPDATED = '2025-04-09'
7
+ end
@@ -1 +1,2 @@
1
+ require_relative 'uds_plus_test_kit/metadata'
1
2
  require_relative 'uds_plus_test_kit/uds_plus_test_suite'
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.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: 2024-11-07 00:00:00.000000000 Z
11
+ date: 2025-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: inferno_core
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.5.0
19
+ version: 0.6.2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.5.0
26
+ version: 0.6.2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: database_cleaner-sequel
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -129,14 +129,13 @@ 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
137
135
  - lib/uds_plus_test_kit/manifest_tests/read_manifest_test.rb
138
136
  - lib/uds_plus_test_kit/manifest_tests/uds_plus_test_group.rb
139
137
  - lib/uds_plus_test_kit/manifest_tests/validate_manifest_test.rb
138
+ - lib/uds_plus_test_kit/metadata.rb
140
139
  - lib/uds_plus_test_kit/post_tests/post_group.rb
141
140
  - lib/uds_plus_test_kit/post_tests/post_manifest_test.rb
142
141
  - lib/uds_plus_test_kit/post_tests/read_post_test.rb
@@ -160,8 +159,6 @@ files:
160
159
  - lib/uds_plus_test_kit/validate_procedure_test.rb
161
160
  - lib/uds_plus_test_kit/validate_related_person_test.rb
162
161
  - lib/uds_plus_test_kit/validate_service_request_test.rb
163
- - lib/uds_plus_test_kit/validate_sexual_orientation_test.rb
164
- - lib/uds_plus_test_kit/validate_special_observation_test.rb
165
162
  - lib/uds_plus_test_kit/version.rb
166
163
  homepage: https://github.com/inferno-framework/uds-plus-test-kit
167
164
  licenses:
@@ -169,6 +166,7 @@ licenses:
169
166
  metadata:
170
167
  homepage_uri: https://github.com/inferno-framework/uds-plus-test-kit
171
168
  source_code_uri: https://github.com/inferno-framework/uds-plus-test-kit
169
+ inferno_test_kit: 'true'
172
170
  post_install_message:
173
171
  rdoc_options: []
174
172
  require_paths:
@@ -184,7 +182,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
184
182
  - !ruby/object:Gem::Version
185
183
  version: '0'
186
184
  requirements: []
187
- rubygems_version: 3.3.7
185
+ rubygems_version: 3.5.22
188
186
  signing_key:
189
187
  specification_version: 4
190
188
  summary: UDS Plus Test Kit
@@ -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