diff --git a/tests/data/c_pt_count/cubed/patient/0.ndjson b/tests/data/c_pt_count/cubed/patient/0.ndjson index 1a5a57c..add6c0f 100644 --- a/tests/data/c_pt_count/cubed/patient/0.ndjson +++ b/tests/data/c_pt_count/cubed/patient/0.ndjson @@ -1,13 +1,13 @@ -{"id": "all-values", "deceasedBoolean": false, "active": true, "gender": "female", "birthDate": "2000-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2028-9", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2106-3", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2076-8", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2054-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "1002-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "unk-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} -{"id": "asku-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "ASKU", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} -{"id": "unexpected-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "race", "system": "weird-system"}}]}]} -{"id": "non-hispanic-ethnicity", "active": true, "gender": "other", "birthDate": "2003-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "unexpected-ethnicity", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "eth", "system": "weird-system"}}]}]} -{"id": "no-extensions", "active": true, "gender": "other", "birthDate": "2001-01-02"} -{"id": "no-birthdate", "active": true, "gender": "other", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "no-gender", "active": true, "birthDate": "1990-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "deceased-bool", "deceasedBoolean": true} -{"id": "deceased-datetime", "deceasedDateTime": "2022-09-21"} -{"id": "inactive", "active": false} -{"id": "nothing"} +{"resourceType": "Patient", "id": "all-values", "deceasedBoolean": false, "active": true, "gender": "female", "birthDate": "2000-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2028-9", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2106-3", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2076-8", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2054-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "1002-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "unk-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} +{"resourceType": "Patient", "id": "asku-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "ASKU", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} +{"resourceType": "Patient", "id": "unexpected-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "race", "system": "weird-system"}}]}]} +{"resourceType": "Patient", "id": "non-hispanic-ethnicity", "active": true, "gender": "other", "birthDate": "2003-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "unexpected-ethnicity", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "eth", "system": "weird-system"}}]}]} +{"resourceType": "Patient", "id": "no-extensions", "active": true, "gender": "other", "birthDate": "2001-01-02"} +{"resourceType": "Patient", "id": "no-birthdate", "active": true, "gender": "other", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "no-gender", "active": true, "birthDate": "1990-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "deceased-bool", "deceasedBoolean": true} +{"resourceType": "Patient", "id": "deceased-datetime", "deceasedDateTime": "2022-09-21"} +{"resourceType": "Patient", "id": "inactive", "active": false} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/c_pt_count/general/patient/0.ndjson b/tests/data/c_pt_count/general/patient/0.ndjson index 1a5a57c..add6c0f 100644 --- a/tests/data/c_pt_count/general/patient/0.ndjson +++ b/tests/data/c_pt_count/general/patient/0.ndjson @@ -1,13 +1,13 @@ -{"id": "all-values", "deceasedBoolean": false, "active": true, "gender": "female", "birthDate": "2000-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2028-9", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2106-3", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2076-8", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2054-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "1002-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "unk-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} -{"id": "asku-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "ASKU", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} -{"id": "unexpected-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "race", "system": "weird-system"}}]}]} -{"id": "non-hispanic-ethnicity", "active": true, "gender": "other", "birthDate": "2003-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "unexpected-ethnicity", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "eth", "system": "weird-system"}}]}]} -{"id": "no-extensions", "active": true, "gender": "other", "birthDate": "2001-01-02"} -{"id": "no-birthdate", "active": true, "gender": "other", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "no-gender", "active": true, "birthDate": "1990-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} -{"id": "deceased-bool", "deceasedBoolean": true} -{"id": "deceased-datetime", "deceasedDateTime": "2022-09-21"} -{"id": "inactive", "active": false} -{"id": "nothing"} +{"resourceType": "Patient", "id": "all-values", "deceasedBoolean": false, "active": true, "gender": "female", "birthDate": "2000-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2028-9", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2106-3", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2076-8", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "2054-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}, {"url": "ombCategory", "valueCoding": {"code": "1002-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "unk-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} +{"resourceType": "Patient", "id": "asku-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "ASKU", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}]} +{"resourceType": "Patient", "id": "unexpected-race", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "race", "system": "weird-system"}}]}]} +{"resourceType": "Patient", "id": "non-hispanic-ethnicity", "active": true, "gender": "other", "birthDate": "2003-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2186-5", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "unexpected-ethnicity", "active": true, "gender": "other", "birthDate": "2001-01-02", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "eth", "system": "weird-system"}}]}]} +{"resourceType": "Patient", "id": "no-extensions", "active": true, "gender": "other", "birthDate": "2001-01-02"} +{"resourceType": "Patient", "id": "no-birthdate", "active": true, "gender": "other", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "no-gender", "active": true, "birthDate": "1990-04-04", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}]} +{"resourceType": "Patient", "id": "deceased-bool", "deceasedBoolean": true} +{"resourceType": "Patient", "id": "deceased-datetime", "deceasedDateTime": "2022-09-21"} +{"resourceType": "Patient", "id": "inactive", "active": false} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/c_pt_count/no-ext/patient/0.ndjson b/tests/data/c_pt_count/no-ext/patient/0.ndjson index b4cb574..5f7bb4c 100644 --- a/tests/data/c_pt_count/no-ext/patient/0.ndjson +++ b/tests/data/c_pt_count/no-ext/patient/0.ndjson @@ -1 +1 @@ -{"id": "A", "birthDate": "1970"} +{"resourceType": "Patient", "id": "A", "birthDate": "1970"} diff --git a/tests/data/c_pt_deceased_count/general/patient/0.ndjson b/tests/data/c_pt_deceased_count/general/patient/0.ndjson index 705c06e..70c2471 100644 --- a/tests/data/c_pt_deceased_count/general/patient/0.ndjson +++ b/tests/data/c_pt_deceased_count/general/patient/0.ndjson @@ -1,10 +1,10 @@ -{"id": "boolean-true", "gender": "male", "birthDate": "2000-04-04", "deceasedBoolean": true} -{"id": "boolean-false", "gender": "female", "birthDate": "2000-04-04", "deceasedBoolean": false} -{"id": "no-deceased", "gender": "other", "birthDate": "2000-04-04"} -{"id": "datetime", "gender": "unknown", "birthDate": "2000-04-04", "deceasedDateTime": "2024-03-02T13:28:17-05:00"} -{"id": "no-birthdate", "gender": "other", "deceasedDateTime": "2024-06-02T13:28:17-05:00"} -{"id": "no-gender", "birthDate": "1990-04-04", "deceasedDateTime": "2014-05-02T13:28:17-05:00"} -{"id": "only-year", "gender": "other", "birthDate": "2000", "deceasedDateTime": "2019"} -{"id": "active", "active": true, "deceasedBoolean": true} -{"id": "inactive", "active": false, "deceasedBoolean": true} -{"id": "nothing"} +{"resourceType": "Patient", "id": "boolean-true", "gender": "male", "birthDate": "2000-04-04", "deceasedBoolean": true} +{"resourceType": "Patient", "id": "boolean-false", "gender": "female", "birthDate": "2000-04-04", "deceasedBoolean": false} +{"resourceType": "Patient", "id": "no-deceased", "gender": "other", "birthDate": "2000-04-04"} +{"resourceType": "Patient", "id": "datetime", "gender": "unknown", "birthDate": "2000-04-04", "deceasedDateTime": "2024-03-02T13:28:17-05:00"} +{"resourceType": "Patient", "id": "no-birthdate", "gender": "other", "deceasedDateTime": "2024-06-02T13:28:17-05:00"} +{"resourceType": "Patient", "id": "no-gender", "birthDate": "1990-04-04", "deceasedDateTime": "2014-05-02T13:28:17-05:00"} +{"resourceType": "Patient", "id": "only-year", "gender": "other", "birthDate": "2000", "deceasedDateTime": "2019"} +{"resourceType": "Patient", "id": "active", "active": true, "deceasedBoolean": true} +{"resourceType": "Patient", "id": "inactive", "active": false, "deceasedBoolean": true} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/allergyintolerance/0.ndjson b/tests/data/c_resource_count/general/allergyintolerance/0.ndjson index d909581..6ef52e7 100644 --- a/tests/data/c_resource_count/general/allergyintolerance/0.ndjson +++ b/tests/data/c_resource_count/general/allergyintolerance/0.ndjson @@ -1,11 +1,11 @@ -{"id": "recordedDate", "category": ["food"], "recordedDate": "2023-11-28", "onsetDateTime": "2001-01-01", "onsetPeriod": {"start": "2002-02-02"}} -{"id": "onsetDateTime", "category": ["medication"], "onsetDateTime": "2023-10-04", "onsetPeriod": {"start": "2002-02-02"}} -{"id": "onsetPeriod", "category": ["food"], "onsetPeriod": {"start": "2023-10-04"}} -{"id": "multiple-categories", "category": ["medication", "food"], "recordedDate": "2022-11-27"} -{"id": "no-category", "recordedDate": "2023-10-03"} -{"id": "no-date", "category": ["food"]} -{"id": "status", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "status-multiple-systems", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "status-multiple-codings", "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "status-with-other-system", "verificationStatus": {"coding": [{"code": "refuted", "system": "other"}]}} -{"id": "nothing"} +{"resourceType": "AllergyIntolerance", "id": "recordedDate", "category": ["food"], "recordedDate": "2023-11-28", "onsetDateTime": "2001-01-01", "onsetPeriod": {"start": "2002-02-02"}} +{"resourceType": "AllergyIntolerance", "id": "onsetDateTime", "category": ["medication"], "onsetDateTime": "2023-10-04", "onsetPeriod": {"start": "2002-02-02"}} +{"resourceType": "AllergyIntolerance", "id": "onsetPeriod", "category": ["food"], "onsetPeriod": {"start": "2023-10-04"}} +{"resourceType": "AllergyIntolerance", "id": "multiple-categories", "category": ["medication", "food"], "recordedDate": "2022-11-27"} +{"resourceType": "AllergyIntolerance", "id": "no-category", "recordedDate": "2023-10-03"} +{"resourceType": "AllergyIntolerance", "id": "no-date", "category": ["food"]} +{"resourceType": "AllergyIntolerance", "id": "status", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-multiple-systems", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-multiple-codings", "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-with-other-system", "verificationStatus": {"coding": [{"code": "refuted", "system": "other"}]}} +{"resourceType": "AllergyIntolerance", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/condition/0.ndjson b/tests/data/c_resource_count/general/condition/0.ndjson index b7f3070..3326597 100644 --- a/tests/data/c_resource_count/general/condition/0.ndjson +++ b/tests/data/c_resource_count/general/condition/0.ndjson @@ -1,10 +1,10 @@ -{"id": "recordedDate", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28", "onsetDateTime": "2001-01-01", "onsetPeriod": {"start": "2002-02-02"}} -{"id": "onsetDateTime", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "onsetDateTime": "2023-10-04", "onsetPeriod": {"start": "2002-02-02"}} -{"id": "onsetPeriod", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "onsetPeriod": {"start": "2023-10-04"}} -{"id": "no-date", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}]} -{"id": "multiple-categories", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28"} -{"id": "multiple-codings", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2022-11-28"} -{"id": "unrelated-category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-10-28"} -{"id": "unrelated-coding", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28"} -{"id": "no-category", "recordedDate": "2023-10-03"} -{"id": "nothing"} +{"resourceType": "Condition", "id": "recordedDate", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28", "onsetDateTime": "2001-01-01", "onsetPeriod": {"start": "2002-02-02"}} +{"resourceType": "Condition", "id": "onsetDateTime", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "onsetDateTime": "2023-10-04", "onsetPeriod": {"start": "2002-02-02"}} +{"resourceType": "Condition", "id": "onsetPeriod", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "onsetPeriod": {"start": "2023-10-04"}} +{"resourceType": "Condition", "id": "no-date", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}]} +{"resourceType": "Condition", "id": "multiple-categories", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28"} +{"resourceType": "Condition", "id": "multiple-codings", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2022-11-28"} +{"resourceType": "Condition", "id": "unrelated-category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-10-28"} +{"resourceType": "Condition", "id": "unrelated-coding", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "recordedDate": "2023-11-28"} +{"resourceType": "Condition", "id": "no-category", "recordedDate": "2023-10-03"} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/device/0.ndjson b/tests/data/c_resource_count/general/device/0.ndjson index 6938f6e..14178fb 100644 --- a/tests/data/c_resource_count/general/device/0.ndjson +++ b/tests/data/c_resource_count/general/device/0.ndjson @@ -1,2 +1,2 @@ -{"id": "1"} -{"id": "2"} +{"resourceType": "Device", "id": "1"} +{"resourceType": "Device", "id": "2"} diff --git a/tests/data/c_resource_count/general/diagnosticreport/0.ndjson b/tests/data/c_resource_count/general/diagnosticreport/0.ndjson index 4b8c0f8..381aede 100644 --- a/tests/data/c_resource_count/general/diagnosticreport/0.ndjson +++ b/tests/data/c_resource_count/general/diagnosticreport/0.ndjson @@ -1,6 +1,6 @@ -{"id": "with-date", "category": [{"coding": [{"code": "CT", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}], "effectiveDateTime": "2023-10-04"} -{"id": "with-issued", "issued": "2021-02-15", "status": "partial"} -{"id": "no-date", "category": [{"coding": [{"code": "CT", "system": "http://loinc.org"}]}]} -{"id": "unrelated-category", "category": [{"coding": [{"code": "1234", "system": "nope"}]}]} -{"id": "no-category", "effectivePeriod": {"start": "2022-09-04"}} -{"id": "nothing"} +{"resourceType": "DiagnosticReport", "id": "with-date", "category": [{"coding": [{"code": "CT", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}], "effectiveDateTime": "2023-10-04"} +{"resourceType": "DiagnosticReport", "id": "with-issued", "issued": "2021-02-15", "status": "partial"} +{"resourceType": "DiagnosticReport", "id": "no-date", "category": [{"coding": [{"code": "CT", "system": "http://loinc.org"}]}]} +{"resourceType": "DiagnosticReport", "id": "unrelated-category", "category": [{"coding": [{"code": "1234", "system": "nope"}]}]} +{"resourceType": "DiagnosticReport", "id": "no-category", "effectivePeriod": {"start": "2022-09-04"}} +{"resourceType": "DiagnosticReport", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/documentreference/0.ndjson b/tests/data/c_resource_count/general/documentreference/0.ndjson index 8bea041..56b4c61 100644 --- a/tests/data/c_resource_count/general/documentreference/0.ndjson +++ b/tests/data/c_resource_count/general/documentreference/0.ndjson @@ -1,7 +1,7 @@ -{"id": "with-date", "category": [{"coding": [{"code": "clinical-note", "system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category"}]}], "date": "2023-10-04"} -{"id": "with-period-start", "context": {"period": {"start": "2020-11-04"}}, "status": "superseded"} -{"id": "with-period-end", "context": {"period": {"end": "2020-11-06"}}, "status": "superseded"} -{"id": "no-date", "category": [{"coding": [{"code": "clinical-note", "system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category"}]}]} -{"id": "unrelated-category", "category": [{"coding": [{"code": "1234", "system": "nope"}]}]} -{"id": "no-category", "date": "2022-09-04"} -{"id": "nothing"} +{"resourceType": "DocumentReference", "id": "with-date", "category": [{"coding": [{"code": "clinical-note", "system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category"}]}], "date": "2023-10-04"} +{"resourceType": "DocumentReference", "id": "with-period-start", "context": {"period": {"start": "2020-11-04"}}, "status": "superseded"} +{"resourceType": "DocumentReference", "id": "with-period-end", "context": {"period": {"end": "2020-11-06"}}, "status": "superseded"} +{"resourceType": "DocumentReference", "id": "no-date", "category": [{"coding": [{"code": "clinical-note", "system": "http://hl7.org/fhir/us/core/CodeSystem/us-core-documentreference-category"}]}]} +{"resourceType": "DocumentReference", "id": "unrelated-category", "category": [{"coding": [{"code": "1234", "system": "nope"}]}]} +{"resourceType": "DocumentReference", "id": "no-category", "date": "2022-09-04"} +{"resourceType": "DocumentReference", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/encounter/0.ndjson b/tests/data/c_resource_count/general/encounter/0.ndjson index f2340ea..778ab90 100644 --- a/tests/data/c_resource_count/general/encounter/0.ndjson +++ b/tests/data/c_resource_count/general/encounter/0.ndjson @@ -1,6 +1,6 @@ -{"id": "with-date", "type": [{"coding": [{"code": "abcd", "system": "http://www.ama-assn.org/go/cpt"}]}], "period": {"start": "2023-10-04"}} -{"id": "no-date", "type": [{"coding": [{"code": "1234", "system": "http://snomed.info/sct"}]}]} -{"id": "multiple-codings", "type": [{"coding": [{"code": "abcd", "system": "http://www.ama-assn.org/go/cpt"}, {"code": "1234", "system": "http://snomed.info/sct"}]}], "period": {"start": "2023-10-04"}} -{"id": "unrelated-category", "type": [{"coding": [{"code": "nope", "system": "nope"}]}]} -{"id": "no-category", "period": {"start": "2022-06-04"}} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "with-date", "type": [{"coding": [{"code": "abcd", "system": "http://www.ama-assn.org/go/cpt"}]}], "period": {"start": "2023-10-04"}} +{"resourceType": "Encounter", "id": "no-date", "type": [{"coding": [{"code": "1234", "system": "http://snomed.info/sct"}]}]} +{"resourceType": "Encounter", "id": "multiple-codings", "type": [{"coding": [{"code": "abcd", "system": "http://www.ama-assn.org/go/cpt"}, {"code": "1234", "system": "http://snomed.info/sct"}]}], "period": {"start": "2023-10-04"}} +{"resourceType": "Encounter", "id": "unrelated-category", "type": [{"coding": [{"code": "nope", "system": "nope"}]}]} +{"resourceType": "Encounter", "id": "no-category", "period": {"start": "2022-06-04"}} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/immunization/0.ndjson b/tests/data/c_resource_count/general/immunization/0.ndjson index bb7b5ef..a6b4d69 100644 --- a/tests/data/c_resource_count/general/immunization/0.ndjson +++ b/tests/data/c_resource_count/general/immunization/0.ndjson @@ -1,4 +1,4 @@ -{"id": "with-date", "occurrenceDateTime": "2012-06-04"} -{"id": "with-date2", "occurrenceDateTime": "2011-08-08"} -{"id": "with-recorded", "recorded": "2010-07-04", "status": "not-done"} -{"id": "no-date"} +{"resourceType": "Immunization", "id": "with-date", "occurrenceDateTime": "2012-06-04"} +{"resourceType": "Immunization", "id": "with-date2", "occurrenceDateTime": "2011-08-08"} +{"resourceType": "Immunization", "id": "with-recorded", "recorded": "2010-07-04", "status": "not-done"} +{"resourceType": "Immunization", "id": "no-date"} diff --git a/tests/data/c_resource_count/general/medication/0.ndjson b/tests/data/c_resource_count/general/medication/0.ndjson index 223e0aa..f2c00be 100644 --- a/tests/data/c_resource_count/general/medication/0.ndjson +++ b/tests/data/c_resource_count/general/medication/0.ndjson @@ -1,3 +1,3 @@ -{"id": "1"} -{"id": "2"} -{"id": "3"} +{"resourceType": "Medication", "id": "1"} +{"resourceType": "Medication", "id": "2"} +{"resourceType": "Medication", "id": "3"} diff --git a/tests/data/c_resource_count/general/medicationrequest/0.ndjson b/tests/data/c_resource_count/general/medicationrequest/0.ndjson index 10b2bad..a68bcc8 100644 --- a/tests/data/c_resource_count/general/medicationrequest/0.ndjson +++ b/tests/data/c_resource_count/general/medicationrequest/0.ndjson @@ -1,3 +1,3 @@ -{"id": "with-date", "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}], "authoredOn": "2002-07-21"} -{"id": "no-date", "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "nothing"} +{"resourceType": "MedicationRequest", "id": "with-date", "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}], "authoredOn": "2002-07-21"} +{"resourceType": "MedicationRequest", "id": "no-date", "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/observation/0.ndjson b/tests/data/c_resource_count/general/observation/0.ndjson index 43590d9..baad9ef 100644 --- a/tests/data/c_resource_count/general/observation/0.ndjson +++ b/tests/data/c_resource_count/general/observation/0.ndjson @@ -1,8 +1,8 @@ -{"id": "effectiveDateTime", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectiveDateTime": "2023-10-04"} -{"id": "effectivePeriod", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectivePeriod": {"start": "2023-02-04"}} -{"id": "effectiveInstant", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectiveInstant": "2022-10-04"} -{"id": "issued", "issued": "2022-12-14", "status": "amended"} -{"id": "no-date", "category": [{"coding": [{"code": "procedure", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "unrelated-category", "category": [{"coding": [{"code": "nope", "system": "nope"}]}]} -{"id": "no-category", "effectivePeriod": {"start": "2022-06-04"}} -{"id": "nothing"} +{"resourceType": "Observation", "id": "effectiveDateTime", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectiveDateTime": "2023-10-04"} +{"resourceType": "Observation", "id": "effectivePeriod", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectivePeriod": {"start": "2023-02-04"}} +{"resourceType": "Observation", "id": "effectiveInstant", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "effectiveInstant": "2022-10-04"} +{"resourceType": "Observation", "id": "issued", "issued": "2022-12-14", "status": "amended"} +{"resourceType": "Observation", "id": "no-date", "category": [{"coding": [{"code": "procedure", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "unrelated-category", "category": [{"coding": [{"code": "nope", "system": "nope"}]}]} +{"resourceType": "Observation", "id": "no-category", "effectivePeriod": {"start": "2022-06-04"}} +{"resourceType": "Observation", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/patient/0.ndjson b/tests/data/c_resource_count/general/patient/0.ndjson index 9bcc643..49fb98c 100644 --- a/tests/data/c_resource_count/general/patient/0.ndjson +++ b/tests/data/c_resource_count/general/patient/0.ndjson @@ -1,3 +1,3 @@ -{"id": "active", "active": true} -{"id": "inactive", "active": false} -{"id": "nothing"} +{"resourceType": "Patient", "id": "active", "active": true} +{"resourceType": "Patient", "id": "inactive", "active": false} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/c_resource_count/general/procedure/0.ndjson b/tests/data/c_resource_count/general/procedure/0.ndjson index 1aa4b25..a7fe3b0 100644 --- a/tests/data/c_resource_count/general/procedure/0.ndjson +++ b/tests/data/c_resource_count/general/procedure/0.ndjson @@ -1,6 +1,6 @@ -{"id": "performedDateTime", "performedDateTime": "2023-10-04"} -{"id": "performedPeriod", "performedPeriod": {"start": "2023-02-04"}} -{"id": "performed-only-year", "performedDateTime": "2022"} -{"id": "completed", "status": "completed"} -{"id": "entered-in-error", "status": "entered-in-error"} -{"id": "nothing"} +{"resourceType": "Procedure", "id": "performedDateTime", "performedDateTime": "2023-10-04"} +{"resourceType": "Procedure", "id": "performedPeriod", "performedPeriod": {"start": "2023-02-04"}} +{"resourceType": "Procedure", "id": "performed-only-year", "performedDateTime": "2022"} +{"resourceType": "Procedure", "id": "completed", "status": "completed"} +{"resourceType": "Procedure", "id": "entered-in-error", "status": "entered-in-error"} +{"resourceType": "Procedure", "id": "nothing"} diff --git a/tests/data/c_resources_per_pt/general/condition/0.ndjson b/tests/data/c_resources_per_pt/general/condition/0.ndjson index 25eb23c..bace166 100644 --- a/tests/data/c_resources_per_pt/general/condition/0.ndjson +++ b/tests/data/c_resources_per_pt/general/condition/0.ndjson @@ -1,3 +1,3 @@ -{"id": "1", "subject": {"reference": "Patient/1"}} -{"id": "2", "subject": {"reference": "Patient/2"}} -{"id": "extra"} +{"resourceType": "Condition", "id": "1", "subject": {"reference": "Patient/1"}} +{"resourceType": "Condition", "id": "2", "subject": {"reference": "Patient/2"}} +{"resourceType": "Condition", "id": "extra"} diff --git a/tests/data/c_resources_per_pt/general/medicationrequest/0.ndjson b/tests/data/c_resources_per_pt/general/medicationrequest/0.ndjson index 8061a39..914352a 100644 --- a/tests/data/c_resources_per_pt/general/medicationrequest/0.ndjson +++ b/tests/data/c_resources_per_pt/general/medicationrequest/0.ndjson @@ -1,8 +1,8 @@ -{"id": "1.1", "subject": {"reference": "Patient/1"}} -{"id": "1.2", "subject": {"reference": "Patient/1"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "2", "subject": {"reference": "Patient/2"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "3.1", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "3.2", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "3.3", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "3.4", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}, {"code": "discharge", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} -{"id": "extra"} +{"resourceType": "MedicationRequest", "id": "1.1", "subject": {"reference": "Patient/1"}} +{"resourceType": "MedicationRequest", "id": "1.2", "subject": {"reference": "Patient/1"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "2", "subject": {"reference": "Patient/2"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "3.1", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "3.2", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "3.3", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "outpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "3.4", "subject": {"reference": "Patient/3"}, "category": [{"coding": [{"code": "inpatient", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}, {"code": "discharge", "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category"}]}]} +{"resourceType": "MedicationRequest", "id": "extra"} diff --git a/tests/data/c_resources_per_pt/general/patient/0.ndjson b/tests/data/c_resources_per_pt/general/patient/0.ndjson index 223e0aa..379d181 100644 --- a/tests/data/c_resources_per_pt/general/patient/0.ndjson +++ b/tests/data/c_resources_per_pt/general/patient/0.ndjson @@ -1,3 +1,3 @@ -{"id": "1"} -{"id": "2"} -{"id": "3"} +{"resourceType": "Patient", "id": "1"} +{"resourceType": "Patient", "id": "2"} +{"resourceType": "Patient", "id": "3"} diff --git a/tests/data/c_system_use/general/allergyintolerance/0.ndjson b/tests/data/c_system_use/general/allergyintolerance/0.ndjson index d23fdd8..b2baada 100644 --- a/tests/data/c_system_use/general/allergyintolerance/0.ndjson +++ b/tests/data/c_system_use/general/allergyintolerance/0.ndjson @@ -1,11 +1,11 @@ -{"id": "snomed", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} -{"id": "snomed-with-text", "code": {"coding": [{"system": "http://snomed.info/sct"}], "text": "hello"}} -{"id": "snomed-oid", "code": {"coding": [{"system": "urn:oid:2.16.840.1.113883.6.96"}]}} -{"id": "multiple-systems", "code": {"coding": [{"code": "boo"}, {"system": "http://other"}, {"system": "http://loinc.org"}], "text": "\u0000"}} -{"id": "repeated-systems", "code": {"coding": [{"system": "http://other"}, {"system": "http://other"}, {"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} -{"id": "no-system", "code": {"coding": [{"code": "boo"}]}} -{"id": "only-text", "code": {"text": "Not coded :("}} -{"id": "empty-text", "code": {"coding": [{"display": "X"}], "text": ""}} -{"id": "with-date", "recordedDate": "2018-03-02", "code": {"coding": [{"system": "other"}]}} -{"id": "with-status", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}, "code": {"coding": [{"system": "other"}]}} -{"id": "nothing"} +{"resourceType": "AllergyIntolerance", "id": "snomed", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "AllergyIntolerance", "id": "snomed-with-text", "code": {"coding": [{"system": "http://snomed.info/sct"}], "text": "hello"}} +{"resourceType": "AllergyIntolerance", "id": "snomed-oid", "code": {"coding": [{"system": "urn:oid:2.16.840.1.113883.6.96"}]}} +{"resourceType": "AllergyIntolerance", "id": "multiple-systems", "code": {"coding": [{"code": "boo"}, {"system": "http://other"}, {"system": "http://loinc.org"}], "text": "\u0000"}} +{"resourceType": "AllergyIntolerance", "id": "repeated-systems", "code": {"coding": [{"system": "http://other"}, {"system": "http://other"}, {"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} +{"resourceType": "AllergyIntolerance", "id": "no-system", "code": {"coding": [{"code": "boo"}]}} +{"resourceType": "AllergyIntolerance", "id": "only-text", "code": {"text": "Not coded :("}} +{"resourceType": "AllergyIntolerance", "id": "empty-text", "code": {"coding": [{"display": "X"}], "text": ""}} +{"resourceType": "AllergyIntolerance", "id": "with-date", "recordedDate": "2018-03-02", "code": {"coding": [{"system": "other"}]}} +{"resourceType": "AllergyIntolerance", "id": "with-status", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}, "code": {"coding": [{"system": "other"}]}} +{"resourceType": "AllergyIntolerance", "id": "nothing"} diff --git a/tests/data/c_system_use/general/condition/0.ndjson b/tests/data/c_system_use/general/condition/0.ndjson index 4de914d..8423087 100644 --- a/tests/data/c_system_use/general/condition/0.ndjson +++ b/tests/data/c_system_use/general/condition/0.ndjson @@ -1,6 +1,6 @@ -{"id": "category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}], "text": "Basic condition"}} -{"id": "multiple-categories", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system2"}]}} -{"id": "multiple-codings", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}, {"system": "system2"}]}} -{"id": "unrelated-category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}]}} -{"id": "unrelated-coding", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}]}} -{"id": "nothing"} +{"resourceType": "Condition", "id": "category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}], "text": "Basic condition"}} +{"resourceType": "Condition", "id": "multiple-categories", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system2"}]}} +{"resourceType": "Condition", "id": "multiple-codings", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}, {"system": "system2"}]}} +{"resourceType": "Condition", "id": "unrelated-category", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}]}, {"coding": [{"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}]}} +{"resourceType": "Condition", "id": "unrelated-coding", "category": [{"coding": [{"code": "encounter-diagnosis", "system": "nope"}, {"code": "problem-list-item", "system": "http://terminology.hl7.org/CodeSystem/condition-category"}]}], "code": {"coding": [{"system": "system1"}]}} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/c_system_use/general/device/0.ndjson b/tests/data/c_system_use/general/device/0.ndjson index d9d22ed..4ca3dbd 100644 --- a/tests/data/c_system_use/general/device/0.ndjson +++ b/tests/data/c_system_use/general/device/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "type": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "Device", "id": "system1", "type": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "Device", "id": "nothing"} diff --git a/tests/data/c_system_use/general/diagnosticreport/0.ndjson b/tests/data/c_system_use/general/diagnosticreport/0.ndjson index ffc4ca6..1a2f2d4 100644 --- a/tests/data/c_system_use/general/diagnosticreport/0.ndjson +++ b/tests/data/c_system_use/general/diagnosticreport/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "DiagnosticReport", "id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "DiagnosticReport", "id": "nothing"} diff --git a/tests/data/c_system_use/general/documentreference/0.ndjson b/tests/data/c_system_use/general/documentreference/0.ndjson index d9d22ed..825fec0 100644 --- a/tests/data/c_system_use/general/documentreference/0.ndjson +++ b/tests/data/c_system_use/general/documentreference/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "type": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "DocumentReference", "id": "system1", "type": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "DocumentReference", "id": "nothing"} diff --git a/tests/data/c_system_use/general/encounter/0.ndjson b/tests/data/c_system_use/general/encounter/0.ndjson index 416eae1..0d3db67 100644 --- a/tests/data/c_system_use/general/encounter/0.ndjson +++ b/tests/data/c_system_use/general/encounter/0.ndjson @@ -1,5 +1,5 @@ -{"id": "class", "class": {"system": "class1"}} -{"id": "type-single", "type": [{"coding": [{"system": "type1"}], "text": "Basic coding"}]} -{"id": "type-multiple", "type": [{"coding": [{"system": "type1"}]}, {"coding": [{"system": "type2"}]}]} -{"id": "type-mixed-text", "type": [{"coding": [{"system": "type1"}], "text": "Text1"}, {"coding": [{"system": "type2"}]}]} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "class", "class": {"system": "class1"}} +{"resourceType": "Encounter", "id": "type-single", "type": [{"coding": [{"system": "type1"}], "text": "Basic coding"}]} +{"resourceType": "Encounter", "id": "type-multiple", "type": [{"coding": [{"system": "type1"}]}, {"coding": [{"system": "type2"}]}]} +{"resourceType": "Encounter", "id": "type-mixed-text", "type": [{"coding": [{"system": "type1"}], "text": "Text1"}, {"coding": [{"system": "type2"}]}]} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/c_system_use/general/immunization/0.ndjson b/tests/data/c_system_use/general/immunization/0.ndjson index 2fea960..3b0e8d4 100644 --- a/tests/data/c_system_use/general/immunization/0.ndjson +++ b/tests/data/c_system_use/general/immunization/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "vaccineCode": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "Immunization", "id": "system1", "vaccineCode": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "Immunization", "id": "nothing"} diff --git a/tests/data/c_system_use/general/medication/0.ndjson b/tests/data/c_system_use/general/medication/0.ndjson index ffc4ca6..f38fbe4 100644 --- a/tests/data/c_system_use/general/medication/0.ndjson +++ b/tests/data/c_system_use/general/medication/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "Medication", "id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "Medication", "id": "nothing"} diff --git a/tests/data/c_system_use/general/medicationrequest/0.ndjson b/tests/data/c_system_use/general/medicationrequest/0.ndjson index 599382e..2fd0308 100644 --- a/tests/data/c_system_use/general/medicationrequest/0.ndjson +++ b/tests/data/c_system_use/general/medicationrequest/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "medicationCodeableConcept": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "MedicationRequest", "id": "system1", "medicationCodeableConcept": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "MedicationRequest", "id": "nothing"} diff --git a/tests/data/c_system_use/general/observation/0.ndjson b/tests/data/c_system_use/general/observation/0.ndjson index f7d7073..9b1921b 100644 --- a/tests/data/c_system_use/general/observation/0.ndjson +++ b/tests/data/c_system_use/general/observation/0.ndjson @@ -1,7 +1,7 @@ -{"id": "category-code", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}], "text": "Basic observation"}} -{"id": "multiple-categories", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}, {"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code2"}]}} -{"id": "multiple-codings", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}, {"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}, {"system": "code2"}]}} -{"id": "unrelated-category", "category": [{"coding": [{"code": "vital-signs", "system": "nope"}]}, {"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}]}} -{"id": "unrelated-coding", "category": [{"coding": [{"code": "vital-signs", "system": "nope"}, {"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}]}} -{"id": "with-value", "valueCodeableConcept": {"coding": [{"system": "value1"}], "text": "Hello"}} -{"id": "nothing"} +{"resourceType": "Observation", "id": "category-code", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}], "text": "Basic observation"}} +{"resourceType": "Observation", "id": "multiple-categories", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}, {"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code2"}]}} +{"resourceType": "Observation", "id": "multiple-codings", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}, {"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}, {"system": "code2"}]}} +{"resourceType": "Observation", "id": "unrelated-category", "category": [{"coding": [{"code": "vital-signs", "system": "nope"}]}, {"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}]}} +{"resourceType": "Observation", "id": "unrelated-coding", "category": [{"coding": [{"code": "vital-signs", "system": "nope"}, {"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "code1"}]}} +{"resourceType": "Observation", "id": "with-value", "valueCodeableConcept": {"coding": [{"system": "value1"}], "text": "Hello"}} +{"resourceType": "Observation", "id": "nothing"} diff --git a/tests/data/c_system_use/general/procedure/0.ndjson b/tests/data/c_system_use/general/procedure/0.ndjson index ffc4ca6..42ea200 100644 --- a/tests/data/c_system_use/general/procedure/0.ndjson +++ b/tests/data/c_system_use/general/procedure/0.ndjson @@ -1,2 +1,2 @@ -{"id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} -{"id": "nothing"} +{"resourceType": "Procedure", "id": "system1", "code": {"coding": [{"system": "system1"}], "text": "Basic coding"}} +{"resourceType": "Procedure", "id": "nothing"} diff --git a/tests/data/c_us_core_v4_count/general/documentreference/0.ndjson b/tests/data/c_us_core_v4_count/general/documentreference/0.ndjson index ffd5eff..0d4df81 100644 --- a/tests/data/c_us_core_v4_count/general/documentreference/0.ndjson +++ b/tests/data/c_us_core_v4_count/general/documentreference/0.ndjson @@ -1,3 +1,3 @@ -{"id": "mandatory-plus-support", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}, "format": {"display": "X"}}], "date": "2012-10-12", "author": [], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"end": "2015"}}} -{"id": "mandatory-only", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}}]} -{"id": "support-only", "date": "2012-10-12", "author": [], "content": [{"format": {"display": "X"}}], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"start": "2014"}}} +{"resourceType": "DocumentReference", "id": "mandatory-plus-support", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}, "format": {"display": "X"}}], "date": "2012-10-12", "author": [], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"end": "2015"}}} +{"resourceType": "DocumentReference", "id": "mandatory-only", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}}]} +{"resourceType": "DocumentReference", "id": "support-only", "date": "2012-10-12", "author": [], "content": [{"format": {"display": "X"}}], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"start": "2014"}}} diff --git a/tests/data/c_us_core_v4_count/general/observation/labs.ndjson b/tests/data/c_us_core_v4_count/general/observation/labs.ndjson index 88d0430..a50ab47 100644 --- a/tests/data/c_us_core_v4_count/general/observation/labs.ndjson +++ b/tests/data/c_us_core_v4_count/general/observation/labs.ndjson @@ -1 +1 @@ -{"id": "labs-just-testing-table-shape", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-just-testing-table-shape", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} diff --git a/tests/data/meta/general/condition/0.ndjson b/tests/data/meta/general/condition/0.ndjson index 634836a..8ed81ff 100644 --- a/tests/data/meta/general/condition/0.ndjson +++ b/tests/data/meta/general/condition/0.ndjson @@ -1,2 +1,2 @@ -{"id": "super-old", "recordedDate": "1982-10-16"} -{"id": "nothing"} +{"resourceType": "Condition", "id": "super-old", "recordedDate": "1982-10-16"} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/meta/general/encounter/0.ndjson b/tests/data/meta/general/encounter/0.ndjson index 98c7d5c..3c4f4cc 100644 --- a/tests/data/meta/general/encounter/0.ndjson +++ b/tests/data/meta/general/encounter/0.ndjson @@ -1 +1 @@ -{"id": "planned", "period": {"start": "2999-09-09"}, "status": "planned"} +{"resourceType": "Encounter", "id": "planned", "period": {"start": "2999-09-09"}, "status": "planned"} diff --git a/tests/data/meta/general/observation/0.ndjson b/tests/data/meta/general/observation/0.ndjson index 5dec232..926c037 100644 --- a/tests/data/meta/general/observation/0.ndjson +++ b/tests/data/meta/general/observation/0.ndjson @@ -1,5 +1,5 @@ -{"id": "old", "effectiveDateTime": "2012-02-02"} -{"id": "mid", "effectiveDateTime": "2018-07-07"} -{"id": "new", "effectiveDateTime": "2022-10-13"} -{"id": "bogus", "effectiveDateTime": "3022-10-13", "status": "entered-in-error"} -{"id": "nothing"} +{"resourceType": "Observation", "id": "old", "effectiveDateTime": "2012-02-02"} +{"resourceType": "Observation", "id": "mid", "effectiveDateTime": "2018-07-07"} +{"resourceType": "Observation", "id": "new", "effectiveDateTime": "2022-10-13"} +{"resourceType": "Observation", "id": "bogus", "effectiveDateTime": "3022-10-13", "status": "entered-in-error"} +{"resourceType": "Observation", "id": "nothing"} diff --git a/tests/data/meta/general/patient/0.ndjson b/tests/data/meta/general/patient/0.ndjson index 6898005..ec64cb9 100644 --- a/tests/data/meta/general/patient/0.ndjson +++ b/tests/data/meta/general/patient/0.ndjson @@ -1 +1 @@ -{"id": "A"} +{"resourceType": "Patient", "id": "A"} diff --git a/tests/data/q_date_recent/general/condition/0.ndjson b/tests/data/q_date_recent/general/condition/0.ndjson index d9583c7..712befd 100644 --- a/tests/data/q_date_recent/general/condition/0.ndjson +++ b/tests/data/q_date_recent/general/condition/0.ndjson @@ -1,4 +1,4 @@ -{"id": "multiple-with-invalid-recorded", "recordedDate": "1899", "onsetDateTime": "2000"} -{"id": "multiple-with-invalid-onset", "recordedDate": "2000", "onsetDateTime": "1899"} -{"id": "multiple-valid", "recordedDate": "2000", "onsetDateTime": "2000"} -{"id": "nothing"} +{"resourceType": "Condition", "id": "multiple-with-invalid-recorded", "recordedDate": "1899", "onsetDateTime": "2000"} +{"resourceType": "Condition", "id": "multiple-with-invalid-onset", "recordedDate": "2000", "onsetDateTime": "1899"} +{"resourceType": "Condition", "id": "multiple-valid", "recordedDate": "2000", "onsetDateTime": "2000"} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/q_date_recent/general/encounter/0.ndjson b/tests/data/q_date_recent/general/encounter/0.ndjson index ba1ed1f..f0207cb 100644 --- a/tests/data/q_date_recent/general/encounter/0.ndjson +++ b/tests/data/q_date_recent/general/encounter/0.ndjson @@ -1,4 +1,4 @@ -{"id": "valid", "period": {"start": "2000"}} -{"id": "future", "status": "finished", "period": {"start": "2000", "end": "9999"}} -{"id": "future-planned", "status": "planned", "period": {"start": "9999"}} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "valid", "period": {"start": "2000"}} +{"resourceType": "Encounter", "id": "future", "status": "finished", "period": {"start": "2000", "end": "9999"}} +{"resourceType": "Encounter", "id": "future-planned", "status": "planned", "period": {"start": "9999"}} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/q_date_recent/general/procedure/0.ndjson b/tests/data/q_date_recent/general/procedure/0.ndjson index fb7d6b7..7e46842 100644 --- a/tests/data/q_date_recent/general/procedure/0.ndjson +++ b/tests/data/q_date_recent/general/procedure/0.ndjson @@ -1,5 +1,5 @@ -{"id": "valid", "performedDateTime": "1900-01-01T00:00:00Z"} -{"id": "past", "performedPeriod": {"start": "1899"}} -{"id": "future", "performedDateTime": "9999"} -{"id": "error", "performedPeriod": {"start": "1899"}, "status": "entered-in-error"} -{"id": "nothing"} +{"resourceType": "Procedure", "id": "valid", "performedDateTime": "1900-01-01T00:00:00Z"} +{"resourceType": "Procedure", "id": "past", "performedPeriod": {"start": "1899"}} +{"resourceType": "Procedure", "id": "future", "performedDateTime": "9999"} +{"resourceType": "Procedure", "id": "error", "performedPeriod": {"start": "1899"}, "status": "entered-in-error"} +{"resourceType": "Procedure", "id": "nothing"} diff --git a/tests/data/q_ref_target_pop/general/allergyintolerance/0.ndjson b/tests/data/q_ref_target_pop/general/allergyintolerance/0.ndjson index 38776b2..7063c08 100644 --- a/tests/data/q_ref_target_pop/general/allergyintolerance/0.ndjson +++ b/tests/data/q_ref_target_pop/general/allergyintolerance/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}} +{"resourceType": "AllergyIntolerance", "id": "valid", "patient": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/condition/0.ndjson b/tests/data/q_ref_target_pop/general/condition/0.ndjson index 4196a65..3341cf7 100644 --- a/tests/data/q_ref_target_pop/general/condition/0.ndjson +++ b/tests/data/q_ref_target_pop/general/condition/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "Condition", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/device/0.ndjson b/tests/data/q_ref_target_pop/general/device/0.ndjson index 38776b2..e6185f8 100644 --- a/tests/data/q_ref_target_pop/general/device/0.ndjson +++ b/tests/data/q_ref_target_pop/general/device/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}} +{"resourceType": "Device", "id": "valid", "patient": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/diagnosticreport/0.ndjson b/tests/data/q_ref_target_pop/general/diagnosticreport/0.ndjson index 4196a65..9262fe5 100644 --- a/tests/data/q_ref_target_pop/general/diagnosticreport/0.ndjson +++ b/tests/data/q_ref_target_pop/general/diagnosticreport/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "DiagnosticReport", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/documentreference/0.ndjson b/tests/data/q_ref_target_pop/general/documentreference/0.ndjson index 4196a65..93c20bf 100644 --- a/tests/data/q_ref_target_pop/general/documentreference/0.ndjson +++ b/tests/data/q_ref_target_pop/general/documentreference/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "DocumentReference", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/encounter/0.ndjson b/tests/data/q_ref_target_pop/general/encounter/0.ndjson index 4196a65..f5b3257 100644 --- a/tests/data/q_ref_target_pop/general/encounter/0.ndjson +++ b/tests/data/q_ref_target_pop/general/encounter/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/immunization/0.ndjson b/tests/data/q_ref_target_pop/general/immunization/0.ndjson index 38776b2..4a24e21 100644 --- a/tests/data/q_ref_target_pop/general/immunization/0.ndjson +++ b/tests/data/q_ref_target_pop/general/immunization/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}} +{"resourceType": "Immunization", "id": "valid", "patient": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/medicationrequest/0.ndjson b/tests/data/q_ref_target_pop/general/medicationrequest/0.ndjson index 4196a65..2fe9ea1 100644 --- a/tests/data/q_ref_target_pop/general/medicationrequest/0.ndjson +++ b/tests/data/q_ref_target_pop/general/medicationrequest/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "MedicationRequest", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/observation/0.ndjson b/tests/data/q_ref_target_pop/general/observation/0.ndjson index 4196a65..2a52020 100644 --- a/tests/data/q_ref_target_pop/general/observation/0.ndjson +++ b/tests/data/q_ref_target_pop/general/observation/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "Observation", "id": "valid", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_pop/general/procedure/0.ndjson b/tests/data/q_ref_target_pop/general/procedure/0.ndjson index 7d26e95..b373999 100644 --- a/tests/data/q_ref_target_pop/general/procedure/0.ndjson +++ b/tests/data/q_ref_target_pop/general/procedure/0.ndjson @@ -1,4 +1,4 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}} -{"id": "non-patient", "subject": {"reference": "Device/A"}} -{"id": "missing-ref", "subject": {"display": "Patient A"}} -{"id": "missing-field"} +{"resourceType": "Procedure", "id": "valid", "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "non-patient", "subject": {"reference": "Device/A"}} +{"resourceType": "Procedure", "id": "missing-ref", "subject": {"display": "Patient A"}} +{"resourceType": "Procedure", "id": "missing-field"} diff --git a/tests/data/q_ref_target_valid/general/allergyintolerance/0.ndjson b/tests/data/q_ref_target_valid/general/allergyintolerance/0.ndjson index b1ee502..8c5d278 100644 --- a/tests/data/q_ref_target_valid/general/allergyintolerance/0.ndjson +++ b/tests/data/q_ref_target_valid/general/allergyintolerance/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "AllergyIntolerance", "id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/condition/0.ndjson b/tests/data/q_ref_target_valid/general/condition/0.ndjson index 5ca77c1..19b9223 100644 --- a/tests/data/q_ref_target_valid/general/condition/0.ndjson +++ b/tests/data/q_ref_target_valid/general/condition/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Condition", "id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/device/0.ndjson b/tests/data/q_ref_target_valid/general/device/0.ndjson index b1ee502..59e442b 100644 --- a/tests/data/q_ref_target_valid/general/device/0.ndjson +++ b/tests/data/q_ref_target_valid/general/device/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Device", "id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/diagnosticreport/0.ndjson b/tests/data/q_ref_target_valid/general/diagnosticreport/0.ndjson index 5ca77c1..b23859f 100644 --- a/tests/data/q_ref_target_valid/general/diagnosticreport/0.ndjson +++ b/tests/data/q_ref_target_valid/general/diagnosticreport/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "DiagnosticReport", "id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/documentreference/0.ndjson b/tests/data/q_ref_target_valid/general/documentreference/0.ndjson index 115876c..4dbe695 100644 --- a/tests/data/q_ref_target_valid/general/documentreference/0.ndjson +++ b/tests/data/q_ref_target_valid/general/documentreference/0.ndjson @@ -1,6 +1,6 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/A"}]}} -{"id": "bad-encounter", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/Nope"}]}} -{"id": "bad-second-encounter-in-list", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/A"}, {"reference": "Encounter/Nope"}]}} -{"id": "bad-multiple-encounters", "status": "current", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/Nope2"}, {"reference": "Encounter/Nope"}]}} -{"id": "missing-encounter-field", "subject": {"reference": "Patient/A"}, "context": {"facilityType": {"text": "A nice one"}}} -{"id": "missing-context-field", "subject": {"reference": "Patient/A"}} +{"resourceType": "DocumentReference", "id": "valid", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/A"}]}} +{"resourceType": "DocumentReference", "id": "bad-encounter", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/Nope"}]}} +{"resourceType": "DocumentReference", "id": "bad-second-encounter-in-list", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/A"}, {"reference": "Encounter/Nope"}]}} +{"resourceType": "DocumentReference", "id": "bad-multiple-encounters", "status": "current", "subject": {"reference": "Patient/A"}, "context": {"encounter": [{"reference": "Encounter/Nope2"}, {"reference": "Encounter/Nope"}]}} +{"resourceType": "DocumentReference", "id": "missing-encounter-field", "subject": {"reference": "Patient/A"}, "context": {"facilityType": {"text": "A nice one"}}} +{"resourceType": "DocumentReference", "id": "missing-context-field", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_valid/general/encounter/0.ndjson b/tests/data/q_ref_target_valid/general/encounter/0.ndjson index 12b82ac..5be07c3 100644 --- a/tests/data/q_ref_target_valid/general/encounter/0.ndjson +++ b/tests/data/q_ref_target_valid/general/encounter/0.ndjson @@ -1 +1 @@ -{"id": "A", "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "A", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_ref_target_valid/general/immunization/0.ndjson b/tests/data/q_ref_target_valid/general/immunization/0.ndjson index b1ee502..7198bc6 100644 --- a/tests/data/q_ref_target_valid/general/immunization/0.ndjson +++ b/tests/data/q_ref_target_valid/general/immunization/0.ndjson @@ -1 +1 @@ -{"id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Immunization", "id": "valid", "patient": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/medicationrequest/0.ndjson b/tests/data/q_ref_target_valid/general/medicationrequest/0.ndjson index 5ca77c1..5f57f20 100644 --- a/tests/data/q_ref_target_valid/general/medicationrequest/0.ndjson +++ b/tests/data/q_ref_target_valid/general/medicationrequest/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "MedicationRequest", "id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/observation/0.ndjson b/tests/data/q_ref_target_valid/general/observation/0.ndjson index 5ca77c1..ea89a2b 100644 --- a/tests/data/q_ref_target_valid/general/observation/0.ndjson +++ b/tests/data/q_ref_target_valid/general/observation/0.ndjson @@ -1 +1 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Observation", "id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} diff --git a/tests/data/q_ref_target_valid/general/patient/0.ndjson b/tests/data/q_ref_target_valid/general/patient/0.ndjson index 6898005..ec64cb9 100644 --- a/tests/data/q_ref_target_valid/general/patient/0.ndjson +++ b/tests/data/q_ref_target_valid/general/patient/0.ndjson @@ -1 +1 @@ -{"id": "A"} +{"resourceType": "Patient", "id": "A"} diff --git a/tests/data/q_ref_target_valid/general/procedure/0.ndjson b/tests/data/q_ref_target_valid/general/procedure/0.ndjson index ab3ab32..9ea8ad5 100644 --- a/tests/data/q_ref_target_valid/general/procedure/0.ndjson +++ b/tests/data/q_ref_target_valid/general/procedure/0.ndjson @@ -1,9 +1,9 @@ -{"id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} -{"id": "bad-patient", "subject": {"reference": "Patient/Nope"}, "encounter": {"reference": "Encounter/A"}} -{"id": "bad-encounter", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/Nope"}} -{"id": "non-patient", "subject": {"reference": "Device/A"}, "encounter": {"reference": "Encounter/A"}} -{"id": "non-encounter", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Device/A"}} -{"id": "missing-patient-ref", "subject": {"display": "Patient A"}, "encounter": {"reference": "Encounter/A"}} -{"id": "missing-patient-field", "encounter": {"reference": "Encounter/A"}} -{"id": "missing-encounter-ref", "subject": {"reference": "Patient/A"}, "encounter": {"display": "Encounter A"}} -{"id": "missing-encounter-field", "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "valid", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Procedure", "id": "bad-patient", "subject": {"reference": "Patient/Nope"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Procedure", "id": "bad-encounter", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Encounter/Nope"}} +{"resourceType": "Procedure", "id": "non-patient", "subject": {"reference": "Device/A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Procedure", "id": "non-encounter", "subject": {"reference": "Patient/A"}, "encounter": {"reference": "Device/A"}} +{"resourceType": "Procedure", "id": "missing-patient-ref", "subject": {"display": "Patient A"}, "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Procedure", "id": "missing-patient-field", "encounter": {"reference": "Encounter/A"}} +{"resourceType": "Procedure", "id": "missing-encounter-ref", "subject": {"reference": "Patient/A"}, "encounter": {"display": "Encounter A"}} +{"resourceType": "Procedure", "id": "missing-encounter-field", "subject": {"reference": "Patient/A"}} diff --git a/tests/data/q_system_use/general/allergyintolerance/0.ndjson b/tests/data/q_system_use/general/allergyintolerance/0.ndjson index 666be58..62f9d1d 100644 --- a/tests/data/q_system_use/general/allergyintolerance/0.ndjson +++ b/tests/data/q_system_use/general/allergyintolerance/0.ndjson @@ -1 +1 @@ -{"id": "valid", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "AllergyIntolerance", "id": "valid", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} diff --git a/tests/data/q_system_use/general/condition/0.ndjson b/tests/data/q_system_use/general/condition/0.ndjson index 666be58..45a20a3 100644 --- a/tests/data/q_system_use/general/condition/0.ndjson +++ b/tests/data/q_system_use/general/condition/0.ndjson @@ -1 +1 @@ -{"id": "valid", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "Condition", "id": "valid", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} diff --git a/tests/data/q_system_use/general/device/0.ndjson b/tests/data/q_system_use/general/device/0.ndjson index a47716b..309f4be 100644 --- a/tests/data/q_system_use/general/device/0.ndjson +++ b/tests/data/q_system_use/general/device/0.ndjson @@ -1 +1 @@ -{"id": "valid", "type": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "Device", "id": "valid", "type": {"coding": [{"system": "http://snomed.info/sct"}]}} diff --git a/tests/data/q_system_use/general/diagnosticreport/0.ndjson b/tests/data/q_system_use/general/diagnosticreport/0.ndjson index 55b21f6..e957b82 100644 --- a/tests/data/q_system_use/general/diagnosticreport/0.ndjson +++ b/tests/data/q_system_use/general/diagnosticreport/0.ndjson @@ -1 +1 @@ -{"id": "valid", "code": {"coding": [{"system": "http://loinc.org"}]}} +{"resourceType": "DiagnosticReport", "id": "valid", "code": {"coding": [{"system": "http://loinc.org"}]}} diff --git a/tests/data/q_system_use/general/documentreference/0.ndjson b/tests/data/q_system_use/general/documentreference/0.ndjson index 2bffc16..6209b44 100644 --- a/tests/data/q_system_use/general/documentreference/0.ndjson +++ b/tests/data/q_system_use/general/documentreference/0.ndjson @@ -1,3 +1,3 @@ -{"id": "valid-loinc", "type": {"coding": [{"system": "http://loinc.org"}]}} -{"id": "valid-null", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}]}} -{"id": "invalid", "type": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "DocumentReference", "id": "valid-loinc", "type": {"coding": [{"system": "http://loinc.org"}]}} +{"resourceType": "DocumentReference", "id": "valid-null", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}]}} +{"resourceType": "DocumentReference", "id": "invalid", "type": {"coding": [{"system": "http://snomed.info/sct"}]}} diff --git a/tests/data/q_system_use/general/immunization/0.ndjson b/tests/data/q_system_use/general/immunization/0.ndjson index 5824435..c45e149 100644 --- a/tests/data/q_system_use/general/immunization/0.ndjson +++ b/tests/data/q_system_use/general/immunization/0.ndjson @@ -1 +1 @@ -{"id": "valid", "vaccineCode": {"coding": [{"system": "http://hl7.org/fhir/sid/cvx"}]}} +{"resourceType": "Immunization", "id": "valid", "vaccineCode": {"coding": [{"system": "http://hl7.org/fhir/sid/cvx"}]}} diff --git a/tests/data/q_system_use/general/medication/0.ndjson b/tests/data/q_system_use/general/medication/0.ndjson index 4e85b3b..270b812 100644 --- a/tests/data/q_system_use/general/medication/0.ndjson +++ b/tests/data/q_system_use/general/medication/0.ndjson @@ -1 +1 @@ -{"id": "valid", "code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} +{"resourceType": "Medication", "id": "valid", "code": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} diff --git a/tests/data/q_system_use/general/medicationrequest/0.ndjson b/tests/data/q_system_use/general/medicationrequest/0.ndjson index 9e39075..a0d51ae 100644 --- a/tests/data/q_system_use/general/medicationrequest/0.ndjson +++ b/tests/data/q_system_use/general/medicationrequest/0.ndjson @@ -1 +1 @@ -{"id": "valid", "medicationCodeableConcept": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} +{"resourceType": "MedicationRequest", "id": "valid", "medicationCodeableConcept": {"coding": [{"system": "http://www.nlm.nih.gov/research/umls/rxnorm"}]}} diff --git a/tests/data/q_system_use/general/observation/0.ndjson b/tests/data/q_system_use/general/observation/0.ndjson index 72e34d2..6778d12 100644 --- a/tests/data/q_system_use/general/observation/0.ndjson +++ b/tests/data/q_system_use/general/observation/0.ndjson @@ -1,2 +1,2 @@ -{"id": "valid-code", "code": {"coding": [{"system": "http://loinc.org"}]}} -{"id": "valid-value", "valueCodeableConcept": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "Observation", "id": "valid-code", "code": {"coding": [{"system": "http://loinc.org"}]}} +{"resourceType": "Observation", "id": "valid-value", "valueCodeableConcept": {"coding": [{"system": "http://snomed.info/sct"}]}} diff --git a/tests/data/q_system_use/general/procedure/0.ndjson b/tests/data/q_system_use/general/procedure/0.ndjson index bc2e932..37820fe 100644 --- a/tests/data/q_system_use/general/procedure/0.ndjson +++ b/tests/data/q_system_use/general/procedure/0.ndjson @@ -1,12 +1,12 @@ -{"id": "valid-cdt", "code": {"coding": [{"system": "http://www.ada.org/cdt"}]}} -{"id": "valid-cpt", "code": {"coding": [{"system": "http://www.ama-assn.org/go/cpt"}]}} -{"id": "valid-hcpcs", "code": {"coding": [{"system": "https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets"}]}} -{"id": "valid-icd10", "code": {"coding": [{"system": "http://www.cms.gov/Medicare/Coding/ICD10"}]}} -{"id": "valid-loinc", "code": {"coding": [{"system": "http://loinc.org"}]}} -{"id": "valid-snomed", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} -{"id": "valid-multiple", "code": {"coding": [{"system": "nope"}, {"system": "http://loinc.org"}]}} -{"id": "bad-system", "code": {"coding": [{"system": "nope"}]}} -{"id": "missing-system", "code": {"coding": [{"display": "No system"}]}} -{"id": "empty-coding", "code": {"coding": []}} -{"id": "missing-coding", "code": {"text": "No coding"}} -{"id": "missing-code"} +{"resourceType": "Procedure", "id": "valid-cdt", "code": {"coding": [{"system": "http://www.ada.org/cdt"}]}} +{"resourceType": "Procedure", "id": "valid-cpt", "code": {"coding": [{"system": "http://www.ama-assn.org/go/cpt"}]}} +{"resourceType": "Procedure", "id": "valid-hcpcs", "code": {"coding": [{"system": "https://www.cms.gov/Medicare/Coding/HCPCSReleaseCodeSets"}]}} +{"resourceType": "Procedure", "id": "valid-icd10", "code": {"coding": [{"system": "http://www.cms.gov/Medicare/Coding/ICD10"}]}} +{"resourceType": "Procedure", "id": "valid-loinc", "code": {"coding": [{"system": "http://loinc.org"}]}} +{"resourceType": "Procedure", "id": "valid-snomed", "code": {"coding": [{"system": "http://snomed.info/sct"}]}} +{"resourceType": "Procedure", "id": "valid-multiple", "code": {"coding": [{"system": "nope"}, {"system": "http://loinc.org"}]}} +{"resourceType": "Procedure", "id": "bad-system", "code": {"coding": [{"system": "nope"}]}} +{"resourceType": "Procedure", "id": "missing-system", "code": {"coding": [{"display": "No system"}]}} +{"resourceType": "Procedure", "id": "empty-coding", "code": {"coding": []}} +{"resourceType": "Procedure", "id": "missing-coding", "code": {"text": "No coding"}} +{"resourceType": "Procedure", "id": "missing-code"} diff --git a/tests/data/q_valid_us_core_v4/general/encounter/0.ndjson b/tests/data/q_valid_us_core_v4/general/encounter/0.ndjson index cbe7ff4..a2008e2 100644 --- a/tests/data/q_valid_us_core_v4/general/encounter/0.ndjson +++ b/tests/data/q_valid_us_core_v4/general/encounter/0.ndjson @@ -1,3 +1,3 @@ -{"id": "valid", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} -{"id": "other-status", "status": "triaged"} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "valid", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "other-status", "status": "triaged"} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/allergy-low-schema/allergyintolerance/0.ndjson b/tests/data/t_us_core_v4/allergy-low-schema/allergyintolerance/0.ndjson index b37fb37..3f00af2 100644 --- a/tests/data/t_us_core_v4/allergy-low-schema/allergyintolerance/0.ndjson +++ b/tests/data/t_us_core_v4/allergy-low-schema/allergyintolerance/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "AllergyIntolerance", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/docref-low-schema/documentreference/0.ndjson b/tests/data/t_us_core_v4/docref-low-schema/documentreference/0.ndjson index b37fb37..b9aef4e 100644 --- a/tests/data/t_us_core_v4/docref-low-schema/documentreference/0.ndjson +++ b/tests/data/t_us_core_v4/docref-low-schema/documentreference/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "DocumentReference", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/encounter-low-schema/encounter/0.ndjson b/tests/data/t_us_core_v4/encounter-low-schema/encounter/0.ndjson index b37fb37..311b26c 100644 --- a/tests/data/t_us_core_v4/encounter-low-schema/encounter/0.ndjson +++ b/tests/data/t_us_core_v4/encounter-low-schema/encounter/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/allergyintolerance/0.ndjson b/tests/data/t_us_core_v4/mandatory/allergyintolerance/0.ndjson index 2431083..c43a717 100644 --- a/tests/data/t_us_core_v4/mandatory/allergyintolerance/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/allergyintolerance/0.ndjson @@ -1,15 +1,15 @@ -{"id": "valid-with-status", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}} -{"id": "valid-entered-in-error", "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "valid-with-verification", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "status-and-entered-in-error", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "status-without-coding", "clinicalStatus": {"text": "X"}} -{"id": "status-with-other-system", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}]}} -{"id": "status-multiple-systems-good", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}} -{"id": "status-multiple-systems-bad", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "nope"}]}} -{"id": "verification-with-other-system", "verificationStatus": {"coding": [{"code": "other", "system": "other"}]}} -{"id": "verification-multiple-systems-good", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} -{"id": "verification-multiple-systems-bad", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "nope"}]}} -{"id": "empty-code", "code": {}} -{"id": "empty-patient", "patient": {}} -{"id": "group-patient", "patient": {"reference": "Group/A"}} -{"id": "nothing"} +{"resourceType": "AllergyIntolerance", "id": "valid-with-status", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}} +{"resourceType": "AllergyIntolerance", "id": "valid-entered-in-error", "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "valid-with-verification", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-and-entered-in-error", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-without-coding", "clinicalStatus": {"text": "X"}} +{"resourceType": "AllergyIntolerance", "id": "status-with-other-system", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-multiple-systems-good", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-clinical"}]}} +{"resourceType": "AllergyIntolerance", "id": "status-multiple-systems-bad", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "nope"}]}} +{"resourceType": "AllergyIntolerance", "id": "verification-with-other-system", "verificationStatus": {"coding": [{"code": "other", "system": "other"}]}} +{"resourceType": "AllergyIntolerance", "id": "verification-multiple-systems-good", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}} +{"resourceType": "AllergyIntolerance", "id": "verification-multiple-systems-bad", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "nope"}]}} +{"resourceType": "AllergyIntolerance", "id": "empty-code", "code": {}} +{"resourceType": "AllergyIntolerance", "id": "empty-patient", "patient": {}} +{"resourceType": "AllergyIntolerance", "id": "group-patient", "patient": {"reference": "Group/A"}} +{"resourceType": "AllergyIntolerance", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/condition/0.ndjson b/tests/data/t_us_core_v4/mandatory/condition/0.ndjson index 1c753bb..4f1f866 100644 --- a/tests/data/t_us_core_v4/mandatory/condition/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/condition/0.ndjson @@ -1,15 +1,15 @@ -{"id": "valid-with-status", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "valid-entered-in-error", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} -{"id": "valid-with-verification", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} -{"id": "status-and-entered-in-error", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} -{"id": "status-without-coding", "clinicalStatus": {"text": "X"}} -{"id": "status-with-other-system", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}]}} -{"id": "status-multiple-systems-good", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}} -{"id": "status-multiple-systems-bad", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "nope"}]}} -{"id": "verification-with-other-system", "verificationStatus": {"coding": [{"code": "other", "system": "other"}]}} -{"id": "verification-multiple-systems-good", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} -{"id": "verification-multiple-systems-bad", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "nope"}]}} -{"id": "empty-code", "code": {}} -{"id": "empty-subject", "subject": {}} -{"id": "group-subject", "subject": {"reference": "Group/A"}} -{"id": "nothing"} +{"resourceType": "Condition", "id": "valid-with-status", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Condition", "id": "valid-entered-in-error", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} +{"resourceType": "Condition", "id": "valid-with-verification", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "other", "system": "other"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} +{"resourceType": "Condition", "id": "status-and-entered-in-error", "clinicalStatus": {"coding": [{"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}, "code": {"text": "X"}, "patient": {"reference": "Patient/X"}, "verificationStatus": {"coding": [{"code": "entered-in-error", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}, {"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} +{"resourceType": "Condition", "id": "status-without-coding", "clinicalStatus": {"text": "X"}} +{"resourceType": "Condition", "id": "status-with-other-system", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}]}} +{"resourceType": "Condition", "id": "status-multiple-systems-good", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "http://terminology.hl7.org/CodeSystem/condition-clinical"}]}} +{"resourceType": "Condition", "id": "status-multiple-systems-bad", "clinicalStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "active", "system": "nope"}]}} +{"resourceType": "Condition", "id": "verification-with-other-system", "verificationStatus": {"coding": [{"code": "other", "system": "other"}]}} +{"resourceType": "Condition", "id": "verification-multiple-systems-good", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} +{"resourceType": "Condition", "id": "verification-multiple-systems-bad", "verificationStatus": {"coding": [{"code": "other", "system": "other"}, {"code": "unconfirmed", "system": "nope"}]}} +{"resourceType": "Condition", "id": "empty-code", "code": {}} +{"resourceType": "Condition", "id": "empty-subject", "subject": {}} +{"resourceType": "Condition", "id": "group-subject", "subject": {"reference": "Group/A"}} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/diagnosticreport/labs.ndjson b/tests/data/t_us_core_v4/mandatory/diagnosticreport/labs.ndjson index 523a914..a72551d 100644 --- a/tests/data/t_us_core_v4/mandatory/diagnosticreport/labs.ndjson +++ b/tests/data/t_us_core_v4/mandatory/diagnosticreport/labs.ndjson @@ -1,5 +1,5 @@ -{"id": "lab-valid", "status": "cancelled", "code": {"text": "good"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2002", "issued": "2002", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-multiple-categories", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}, {"code": "OUS", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-status-bad", "status": "hello", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-effective-period", "effectivePeriod": {"end": "2014"}, "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-nothing", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-valid", "status": "cancelled", "code": {"text": "good"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2002", "issued": "2002", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-multiple-categories", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}, {"code": "OUS", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-status-bad", "status": "hello", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-effective-period", "effectivePeriod": {"end": "2014"}, "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-nothing", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} diff --git a/tests/data/t_us_core_v4/mandatory/diagnosticreport/notes.ndjson b/tests/data/t_us_core_v4/mandatory/diagnosticreport/notes.ndjson index bdbba3b..b9a8b4c 100644 --- a/tests/data/t_us_core_v4/mandatory/diagnosticreport/notes.ndjson +++ b/tests/data/t_us_core_v4/mandatory/diagnosticreport/notes.ndjson @@ -1,12 +1,12 @@ -{"id": "valid-datetime", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} -{"id": "valid-period-start", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {"start": "2000"}} -{"id": "valid-period-end", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {"end": "2000"}} -{"id": "no-status", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} -{"id": "no-category", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} -{"id": "no-code", "status": "final", "category": [], "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} -{"id": "empty-code", "status": "final", "category": [], "code": {}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} -{"id": "no-subject", "status": "final", "category": [], "code": {"text": "X"}, "effectiveDateTime": "2000"} -{"id": "group-subject", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "effectiveDateTime": "2000"} -{"id": "no-datetime", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "empty-period", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {}} -{"id": "nothing"} +{"resourceType": "DiagnosticReport", "id": "valid-datetime", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "valid-period-start", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {"start": "2000"}} +{"resourceType": "DiagnosticReport", "id": "valid-period-end", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {"end": "2000"}} +{"resourceType": "DiagnosticReport", "id": "no-status", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "no-category", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "no-code", "status": "final", "category": [], "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "empty-code", "status": "final", "category": [], "code": {}, "subject": {"reference": "Patient/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "no-subject", "status": "final", "category": [], "code": {"text": "X"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "group-subject", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "effectiveDateTime": "2000"} +{"resourceType": "DiagnosticReport", "id": "no-datetime", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "DiagnosticReport", "id": "empty-period", "status": "final", "category": [], "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "effectivePeriod": {}} +{"resourceType": "DiagnosticReport", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/documentreference/0.ndjson b/tests/data/t_us_core_v4/mandatory/documentreference/0.ndjson index d5921b8..2a4da75 100644 --- a/tests/data/t_us_core_v4/mandatory/documentreference/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/documentreference/0.ndjson @@ -1,13 +1,13 @@ -{"id": "valid", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}}]} -{"id": "type-empty", "type": {}} -{"id": "type-bad-system", "type": {"coding": [{"system": "nope", "code": "11534-5"}]}} -{"id": "type-null-flavor-good", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "UNK"}]}} -{"id": "type-null-flavor-bad", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "INV"}]}} -{"id": "type-multiple-good", "type": {"coding": [{"system": "nope", "code": "11534-5"}, {"system": "http://loinc.org", "code": "11534-5"}]}} -{"id": "type-multiple-bad", "type": {"coding": [{"system": "nope", "code": "11534-5"}, {"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "nope"}]}} -{"id": "subject-group", "subject": {"reference": "Group/A"}} -{"id": "content-multiple-good", "content": [{"attachment": {"contentType": "text/plain"}}, {"attachment": {"contentType": "text/html"}}]} -{"id": "content-multiple-bad", "content": [{"attachment": {"contentType": "text/plain"}}, {"format": {}}]} -{"id": "content-no-contenttype", "content": [{"attachment": {"url": "hello"}}]} -{"id": "content-no-attachment", "content": [{"format": {}}]} -{"id": "nothing"} +{"resourceType": "DocumentReference", "id": "valid", "status": "current", "category": [{"text": "X"}], "type": {"coding": [{"system": "http://loinc.org", "code": "11534-5"}]}, "subject": {"reference": "Patient/A"}, "content": [{"attachment": {"contentType": "text/plain"}}]} +{"resourceType": "DocumentReference", "id": "type-empty", "type": {}} +{"resourceType": "DocumentReference", "id": "type-bad-system", "type": {"coding": [{"system": "nope", "code": "11534-5"}]}} +{"resourceType": "DocumentReference", "id": "type-null-flavor-good", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "UNK"}]}} +{"resourceType": "DocumentReference", "id": "type-null-flavor-bad", "type": {"coding": [{"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "INV"}]}} +{"resourceType": "DocumentReference", "id": "type-multiple-good", "type": {"coding": [{"system": "nope", "code": "11534-5"}, {"system": "http://loinc.org", "code": "11534-5"}]}} +{"resourceType": "DocumentReference", "id": "type-multiple-bad", "type": {"coding": [{"system": "nope", "code": "11534-5"}, {"system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor", "code": "nope"}]}} +{"resourceType": "DocumentReference", "id": "subject-group", "subject": {"reference": "Group/A"}} +{"resourceType": "DocumentReference", "id": "content-multiple-good", "content": [{"attachment": {"contentType": "text/plain"}}, {"attachment": {"contentType": "text/html"}}]} +{"resourceType": "DocumentReference", "id": "content-multiple-bad", "content": [{"attachment": {"contentType": "text/plain"}}, {"format": {}}]} +{"resourceType": "DocumentReference", "id": "content-no-contenttype", "content": [{"attachment": {"url": "hello"}}]} +{"resourceType": "DocumentReference", "id": "content-no-attachment", "content": [{"format": {}}]} +{"resourceType": "DocumentReference", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/encounter/0.ndjson b/tests/data/t_us_core_v4/mandatory/encounter/0.ndjson index 2edf56a..0bd96e4 100644 --- a/tests/data/t_us_core_v4/mandatory/encounter/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/encounter/0.ndjson @@ -1,9 +1,9 @@ -{"id": "valid", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} -{"id": "no-status", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} -{"id": "no-class", "status": "finished", "type": [], "subject": {"reference": "Patient/A"}} -{"id": "empty-class", "status": "finished", "class": {}, "type": [], "subject": {"reference": "Patient/A"}} -{"id": "no-type", "status": "finished", "class": {"display": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "no-subject", "status": "finished", "class": {"display": "X"}, "type": []} -{"id": "empty-subject", "status": "finished", "class": {"display": "X"}, "type": []} -{"id": "group-subject", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Group/A"}} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "valid", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "no-status", "class": {"display": "X"}, "type": [], "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "no-class", "status": "finished", "type": [], "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "empty-class", "status": "finished", "class": {}, "type": [], "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "no-type", "status": "finished", "class": {"display": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "no-subject", "status": "finished", "class": {"display": "X"}, "type": []} +{"resourceType": "Encounter", "id": "empty-subject", "status": "finished", "class": {"display": "X"}, "type": []} +{"resourceType": "Encounter", "id": "group-subject", "status": "finished", "class": {"display": "X"}, "type": [], "subject": {"reference": "Group/A"}} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/immunization/0.ndjson b/tests/data/t_us_core_v4/mandatory/immunization/0.ndjson index 7b8a865..639b5d5 100644 --- a/tests/data/t_us_core_v4/mandatory/immunization/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/immunization/0.ndjson @@ -1,8 +1,8 @@ -{"id": "valid-datetime", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} -{"id": "valid-string", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceString": "last year"} -{"id": "no-status", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} -{"id": "no-code", "status": "completed", "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} -{"id": "empty-code", "status": "completed", "vaccineCode": {}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} -{"id": "no-patient", "status": "completed", "vaccineCode": {"text": "X"}, "occurrenceDateTime": "2000"} -{"id": "no-occurrence", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}} -{"id": "nothing"} +{"resourceType": "Immunization", "id": "valid-datetime", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} +{"resourceType": "Immunization", "id": "valid-string", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceString": "last year"} +{"resourceType": "Immunization", "id": "no-status", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} +{"resourceType": "Immunization", "id": "no-code", "status": "completed", "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} +{"resourceType": "Immunization", "id": "empty-code", "status": "completed", "vaccineCode": {}, "patient": {"reference": "Patient/A"}, "occurrenceDateTime": "2000"} +{"resourceType": "Immunization", "id": "no-patient", "status": "completed", "vaccineCode": {"text": "X"}, "occurrenceDateTime": "2000"} +{"resourceType": "Immunization", "id": "no-occurrence", "status": "completed", "vaccineCode": {"text": "X"}, "patient": {"reference": "Patient/A"}} +{"resourceType": "Immunization", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/medication/0.ndjson b/tests/data/t_us_core_v4/mandatory/medication/0.ndjson index 8bb923b..d2584ce 100644 --- a/tests/data/t_us_core_v4/mandatory/medication/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/medication/0.ndjson @@ -1,3 +1,3 @@ -{"id": "valid", "code": {"text": "X"}} -{"id": "with-status", "status": "entered-in-error"} -{"id": "nothing"} +{"resourceType": "Medication", "id": "valid", "code": {"text": "X"}} +{"resourceType": "Medication", "id": "with-status", "status": "entered-in-error"} +{"resourceType": "Medication", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/medicationrequest/0.ndjson b/tests/data/t_us_core_v4/mandatory/medicationrequest/0.ndjson index c8c6068..7ce7ae0 100644 --- a/tests/data/t_us_core_v4/mandatory/medicationrequest/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/medicationrequest/0.ndjson @@ -1,8 +1,8 @@ -{"id": "valid-concept", "status": "active", "intent": "plan", "medicationCodeableConcept": {"text": "X"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "RelatedPerson/X"}} -{"id": "valid-external-reference", "status": "active", "intent": "plan", "medicationReference": {"reference": "Medication/A"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "Patient/X"}} -{"id": "valid-contained-reference", "status": "active", "intent": "plan", "medicationReference": {"reference": "#A"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "Device/X"}} -{"id": "medication-invalid-ref", "medicationReference": {"reference": "Condition/A"}} -{"id": "group-subject", "subject": {"reference": "Group/A"}, "requester": {"reference": "Organization/X"}} -{"id": "requester-invalid", "requester": {"reference": "Condition/A"}} -{"id": "requester-display", "requester": {"display": "X"}} -{"id": "nothing"} +{"resourceType": "MedicationRequest", "id": "valid-concept", "status": "active", "intent": "plan", "medicationCodeableConcept": {"text": "X"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "RelatedPerson/X"}} +{"resourceType": "MedicationRequest", "id": "valid-external-reference", "status": "active", "intent": "plan", "medicationReference": {"reference": "Medication/A"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "Patient/X"}} +{"resourceType": "MedicationRequest", "id": "valid-contained-reference", "status": "active", "intent": "plan", "medicationReference": {"reference": "#A"}, "subject": {"reference": "Patient/A"}, "requester": {"reference": "Device/X"}} +{"resourceType": "MedicationRequest", "id": "medication-invalid-ref", "medicationReference": {"reference": "Condition/A"}} +{"resourceType": "MedicationRequest", "id": "group-subject", "subject": {"reference": "Group/A"}, "requester": {"reference": "Organization/X"}} +{"resourceType": "MedicationRequest", "id": "requester-invalid", "requester": {"reference": "Condition/A"}} +{"resourceType": "MedicationRequest", "id": "requester-display", "requester": {"display": "X"}} +{"resourceType": "MedicationRequest", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/observation/labs.ndjson b/tests/data/t_us_core_v4/mandatory/observation/labs.ndjson index b77b86b..03a5af4 100644 --- a/tests/data/t_us_core_v4/mandatory/observation/labs.ndjson +++ b/tests/data/t_us_core_v4/mandatory/observation/labs.ndjson @@ -1,27 +1,27 @@ -{"id": "lab-valid-date", "effectiveDateTime": "2020-11-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-ucum", "valueQuantity": {"code": "m", "system": "http://unitsofmeasure.org"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-ref-range-high", "referenceRange": [{"high": {"value": 1.3}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-ref-range-text", "referenceRange": [{"text": "here"}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-component", "component": [], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-has-member", "hasMember": [], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-data-absent", "dataAbsentReason": {"text": "forgot it"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-bool", "valueBoolean": true, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-string", "valueString": "yo", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-int", "valueInteger": 3, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-time", "valueTime": "12:00", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-datetime", "valueDateTime": "2015-02-07T13:28:17-05:00", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-quantity", "valueQuantity": {"value": 1.5}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-concept", "valueCodeableConcept": {"text": "one and a half"}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-range", "valueRange": {"low": {"value": 1.5}}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-valid-with-ratio", "valueRatio": {"numerator": {"value": 1.5}}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-no-status", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-no-code", "status": "final", "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-no-subject", "status": "final", "code": {"text": "X"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-group-subject", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-only-category", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-short-date", "effectiveDateTime": "2020-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-non-ucum", "valueQuantity": {"code": "m", "system": "other"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-bare-ref-range", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "lab-no-values", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "nothing"} +{"resourceType": "Observation", "id": "lab-valid-date", "effectiveDateTime": "2020-11-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-ucum", "valueQuantity": {"code": "m", "system": "http://unitsofmeasure.org"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-ref-range-high", "referenceRange": [{"high": {"value": 1.3}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-ref-range-text", "referenceRange": [{"text": "here"}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-component", "component": [], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-has-member", "hasMember": [], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-data-absent", "dataAbsentReason": {"text": "forgot it"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-bool", "valueBoolean": true, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-string", "valueString": "yo", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-int", "valueInteger": 3, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-time", "valueTime": "12:00", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-datetime", "valueDateTime": "2015-02-07T13:28:17-05:00", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-quantity", "valueQuantity": {"value": 1.5}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-concept", "valueCodeableConcept": {"text": "one and a half"}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-range", "valueRange": {"low": {"value": 1.5}}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-valid-with-ratio", "valueRatio": {"numerator": {"value": 1.5}}, "status": "final", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-no-status", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-no-code", "status": "final", "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-no-subject", "status": "final", "code": {"text": "X"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-group-subject", "status": "final", "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-only-category", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-short-date", "effectiveDateTime": "2020-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-non-ucum", "valueQuantity": {"code": "m", "system": "other"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-bare-ref-range", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "lab-no-values", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/observation/smoking.ndjson b/tests/data/t_us_core_v4/mandatory/observation/smoking.ndjson index 63ee844..e3d6c85 100644 --- a/tests/data/t_us_core_v4/mandatory/observation/smoking.ndjson +++ b/tests/data/t_us_core_v4/mandatory/observation/smoking.ndjson @@ -1,8 +1,8 @@ -{"id": "smoking-valid", "status": "final", "effectiveDateTime": "2020-04-03", "subject": {"reference": "Patient/A"}, "valueCodeableConcept": {"coding": [{"system": "http://snomed.info/sct", "code": "266919005"}]}, "category": [{"coding": [{"code": "social-history", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-status-restricted-obs-value", "status": "amended", "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-multiple-codes", "code": {"coding": [{"system": "foo", "code": "bar"}, {"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-group-subject", "subject": {"reference": "Group/A"}, "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-ref-range-bare", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-wrong-category", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} -{"id": "smoking-nothing", "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-valid", "status": "final", "effectiveDateTime": "2020-04-03", "subject": {"reference": "Patient/A"}, "valueCodeableConcept": {"coding": [{"system": "http://snomed.info/sct", "code": "266919005"}]}, "category": [{"coding": [{"code": "social-history", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-status-restricted-obs-value", "status": "amended", "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-multiple-codes", "code": {"coding": [{"system": "foo", "code": "bar"}, {"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-group-subject", "subject": {"reference": "Group/A"}, "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-ref-range-bare", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-wrong-category", "category": [{"coding": [{"code": "exam", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}], "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} +{"resourceType": "Observation", "id": "smoking-nothing", "code": {"coding": [{"system": "http://loinc.org", "code": "72166-2"}]}} diff --git a/tests/data/t_us_core_v4/mandatory/observation/vitals.ndjson b/tests/data/t_us_core_v4/mandatory/observation/vitals.ndjson index 0c789b4..8b7e8ed 100644 --- a/tests/data/t_us_core_v4/mandatory/observation/vitals.ndjson +++ b/tests/data/t_us_core_v4/mandatory/observation/vitals.ndjson @@ -1,16 +1,16 @@ -{"id": "vitals-valid-date", "effectiveDateTime": "2020-11-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-valid-period", "effectivePeriod": {"start": "2020-11-11"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-group-subject", "subject": {"reference": "Group/A"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-ref-range-bare", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs1-effective-no-day", "effectiveDateTime": "2020-11", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs2-component", "component": [{"valueBoolean": true}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs2-has-member", "hasMember": [{"reference": "Observation/A"}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs2-data-absent", "dataAbsentReason": {"text": "X"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs2-value", "valueBoolean": false, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs3-bad", "component": [{"text": "X"}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs3-data-absent", "component": [{"dataAbsentReason": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs3-value", "component": [{"valueBoolean": false}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs3-multiple-bad", "component": [{"valueBoolean": false}, {"code": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-vs3-multiple-good", "component": [{"valueBoolean": false}, {"dataAbsentReason": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-nothing", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-valid-date", "effectiveDateTime": "2020-11-11", "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-valid-period", "effectivePeriod": {"start": "2020-11-11"}, "status": "amended", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "valueBoolean": true, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-group-subject", "subject": {"reference": "Group/A"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-ref-range-low", "referenceRange": [{"low": {"value": 1.3}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-ref-range-bare", "referenceRange": [{"age": {"low": {"value": 1.3}}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs1-effective-no-day", "effectiveDateTime": "2020-11", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs2-component", "component": [{"valueBoolean": true}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs2-has-member", "hasMember": [{"reference": "Observation/A"}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs2-data-absent", "dataAbsentReason": {"text": "X"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs2-value", "valueBoolean": false, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs3-bad", "component": [{"text": "X"}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs3-data-absent", "component": [{"dataAbsentReason": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs3-value", "component": [{"valueBoolean": false}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs3-multiple-bad", "component": [{"valueBoolean": false}, {"code": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-vs3-multiple-good", "component": [{"valueBoolean": false}, {"dataAbsentReason": {"text": "X"}}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-nothing", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} diff --git a/tests/data/t_us_core_v4/mandatory/patient/0.ndjson b/tests/data/t_us_core_v4/mandatory/patient/0.ndjson index a78cce0..d2af034 100644 --- a/tests/data/t_us_core_v4/mandatory/patient/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/patient/0.ndjson @@ -1,5 +1,5 @@ -{"id": "valid", "gender": "unknown"} -{"id": "invalid-gender", "gender": "nope"} -{"id": "with-active-status", "active": true} -{"id": "with-inactive-status", "active": false} -{"id": "nothing"} +{"resourceType": "Patient", "id": "valid", "gender": "unknown"} +{"resourceType": "Patient", "id": "invalid-gender", "gender": "nope"} +{"resourceType": "Patient", "id": "with-active-status", "active": true} +{"resourceType": "Patient", "id": "with-inactive-status", "active": false} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/mandatory/procedure/0.ndjson b/tests/data/t_us_core_v4/mandatory/procedure/0.ndjson index 2344c84..35981f1 100644 --- a/tests/data/t_us_core_v4/mandatory/procedure/0.ndjson +++ b/tests/data/t_us_core_v4/mandatory/procedure/0.ndjson @@ -1,11 +1,11 @@ -{"id": "valid-with-datetime", "performedDateTime": "2015-02-07T13:28:17-05:00", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "valid-with-period", "performedPeriod": {"start": "2020"}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "valid-with-string", "performedString": "yo", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "valid-with-age", "performedAge": {"value": 1.5}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "valid-with-range", "performedRange": {"low": {"value": 1.5}}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "no-status", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "performedString": "20th century"} -{"id": "no-code", "status": "completed", "subject": {"reference": "Patient/A"}, "performedString": "20th century"} -{"id": "no-subject", "status": "completed", "code": {"text": "X"}, "performedString": "20th century"} -{"id": "group-subject", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "performedString": "20th century"} -{"id": "no-performed-time", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} -{"id": "nothing"} +{"resourceType": "Procedure", "id": "valid-with-datetime", "performedDateTime": "2015-02-07T13:28:17-05:00", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "valid-with-period", "performedPeriod": {"start": "2020"}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "valid-with-string", "performedString": "yo", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "valid-with-age", "performedAge": {"value": 1.5}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "valid-with-range", "performedRange": {"low": {"value": 1.5}}, "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "no-status", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}, "performedString": "20th century"} +{"resourceType": "Procedure", "id": "no-code", "status": "completed", "subject": {"reference": "Patient/A"}, "performedString": "20th century"} +{"resourceType": "Procedure", "id": "no-subject", "status": "completed", "code": {"text": "X"}, "performedString": "20th century"} +{"resourceType": "Procedure", "id": "group-subject", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Group/A"}, "performedString": "20th century"} +{"resourceType": "Procedure", "id": "no-performed-time", "status": "completed", "code": {"text": "X"}, "subject": {"reference": "Patient/A"}} +{"resourceType": "Procedure", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/allergyintolerance/0.ndjson b/tests/data/t_us_core_v4/must-support/allergyintolerance/0.ndjson index d5934d5..47d6f8d 100644 --- a/tests/data/t_us_core_v4/must-support/allergyintolerance/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/allergyintolerance/0.ndjson @@ -1,8 +1,8 @@ -{"id": "valid", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}, "reaction": [{"manifestation": [{"text": "X"}]}]} -{"id": "verification-just-text", "verificationStatus": {"text": "X"}} -{"id": "reaction-without-manifestation", "reaction": [{"description": "X"}]} -{"id": "reaction-multiple-good", "reaction": [{"manifestation": [{"text": "X"}]}, {"manifestation": [{"text": "Y"}]}]} -{"id": "reaction-multiple-bad", "reaction": [{"manifestation": [{"text": "X"}]}, {"description": "Y"}]} -{"id": "manifestation-multiple-good", "reaction": [{"manifestation": [{"text": "X"}, {"text": "Y"}]}]} -{"id": "manifestation-multiple-bad", "reaction": [{"manifestation": [{"text": "X"}, {"id": "Y"}]}]} -{"id": "nothing"} +{"resourceType": "AllergyIntolerance", "id": "valid", "verificationStatus": {"coding": [{"code": "confirmed", "system": "http://terminology.hl7.org/CodeSystem/allergyintolerance-verification"}]}, "reaction": [{"manifestation": [{"text": "X"}]}]} +{"resourceType": "AllergyIntolerance", "id": "verification-just-text", "verificationStatus": {"text": "X"}} +{"resourceType": "AllergyIntolerance", "id": "reaction-without-manifestation", "reaction": [{"description": "X"}]} +{"resourceType": "AllergyIntolerance", "id": "reaction-multiple-good", "reaction": [{"manifestation": [{"text": "X"}]}, {"manifestation": [{"text": "Y"}]}]} +{"resourceType": "AllergyIntolerance", "id": "reaction-multiple-bad", "reaction": [{"manifestation": [{"text": "X"}]}, {"description": "Y"}]} +{"resourceType": "AllergyIntolerance", "id": "manifestation-multiple-good", "reaction": [{"manifestation": [{"text": "X"}, {"text": "Y"}]}]} +{"resourceType": "AllergyIntolerance", "id": "manifestation-multiple-bad", "reaction": [{"manifestation": [{"text": "X"}, {"resourceType": "AllergyIntolerance", "id": "Y"}]}]} +{"resourceType": "AllergyIntolerance", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/condition/0.ndjson b/tests/data/t_us_core_v4/must-support/condition/0.ndjson index f683b36..c68b1f9 100644 --- a/tests/data/t_us_core_v4/must-support/condition/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/condition/0.ndjson @@ -1,3 +1,3 @@ -{"id": "valid", "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} -{"id": "verification-just-text", "verificationStatus": {"text": "X"}} -{"id": "nothing"} +{"resourceType": "Condition", "id": "valid", "verificationStatus": {"coding": [{"code": "unconfirmed", "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status"}]}} +{"resourceType": "Condition", "id": "verification-just-text", "verificationStatus": {"text": "X"}} +{"resourceType": "Condition", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/diagnosticreport/labs.ndjson b/tests/data/t_us_core_v4/must-support/diagnosticreport/labs.ndjson index 8906066..396c5f5 100644 --- a/tests/data/t_us_core_v4/must-support/diagnosticreport/labs.ndjson +++ b/tests/data/t_us_core_v4/must-support/diagnosticreport/labs.ndjson @@ -1,5 +1,5 @@ -{"id": "lab-valid", "performer": [], "result": [{"reference": "Observation/A"}], "presentedForm": [], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-multiple-categories", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}, {"code": "OUS", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-multiple-result-good", "result": [{"reference": "Observation/A"}, {"reference": "Observation/B"}], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-multiple-result-bad", "result": [{"reference": "Observation/A"}, {"reference": "Patient/A"}], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} -{"id": "lab-nothing", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-valid", "performer": [], "result": [{"reference": "Observation/A"}], "presentedForm": [], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-multiple-categories", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}, {"code": "OUS", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-multiple-result-good", "result": [{"reference": "Observation/A"}, {"reference": "Observation/B"}], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-multiple-result-bad", "result": [{"reference": "Observation/A"}, {"reference": "Patient/A"}], "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} +{"resourceType": "DiagnosticReport", "id": "lab-nothing", "category": [{"coding": [{"code": "LAB", "system": "http://terminology.hl7.org/CodeSystem/v2-0074"}]}]} diff --git a/tests/data/t_us_core_v4/must-support/diagnosticreport/notes.ndjson b/tests/data/t_us_core_v4/must-support/diagnosticreport/notes.ndjson index bc32687..e727c92 100644 --- a/tests/data/t_us_core_v4/must-support/diagnosticreport/notes.ndjson +++ b/tests/data/t_us_core_v4/must-support/diagnosticreport/notes.ndjson @@ -1,3 +1,3 @@ -{"id": "valid", "encounter": {"reference": "Encounter/A"}, "issued": "2022", "performer": [], "presentedForm": []} -{"id": "wrong-encounter-type", "encounter": {"reference": "EpisodeOfCare/A"}} -{"id": "nothing"} \ No newline at end of file +{"resourceType": "DiagnosticReport", "id": "valid", "encounter": {"reference": "Encounter/A"}, "issued": "2022", "performer": [], "presentedForm": []} +{"resourceType": "DiagnosticReport", "id": "wrong-encounter-type", "encounter": {"reference": "EpisodeOfCare/A"}} +{"resourceType": "DiagnosticReport", "id": "nothing"} \ No newline at end of file diff --git a/tests/data/t_us_core_v4/must-support/documentreference/0.ndjson b/tests/data/t_us_core_v4/must-support/documentreference/0.ndjson index 85dbc5d..f312634 100644 --- a/tests/data/t_us_core_v4/must-support/documentreference/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/documentreference/0.ndjson @@ -1,7 +1,7 @@ -{"id": "valid", "date": "2012-10-12", "author": [], "content": [{"format": {"display": "X"}}], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"start": "2014"}}} -{"id": "format-multiple-good", "content": [{"format": {"display": "X"}}, {"format": {"display": "Y"}}]} -{"id": "format-multiple-bad", "content": [{"format": {"display": "X"}}, {"attachment": {"contentType": "text/plain"}}]} -{"id": "encounter-multiple", "context": {"encounter": [{"reference": "Encounter/X"}, {"reference": "Encounter/Y"}]}} -{"id": "encounter-none-in-context", "context": {"related": [{"display": "X"}]}} -{"id": "encounter-wrong-type", "context": {"encounter": [{"reference": "EpisodeOfCare/X"}]}} -{"id": "nothing"} +{"resourceType": "DocumentReference", "id": "valid", "date": "2012-10-12", "author": [], "content": [{"format": {"display": "X"}}], "context": {"encounter": [{"reference": "Encounter/X"}], "period": {"start": "2014"}}} +{"resourceType": "DocumentReference", "id": "format-multiple-good", "content": [{"format": {"display": "X"}}, {"format": {"display": "Y"}}]} +{"resourceType": "DocumentReference", "id": "format-multiple-bad", "content": [{"format": {"display": "X"}}, {"attachment": {"contentType": "text/plain"}}]} +{"resourceType": "DocumentReference", "id": "encounter-multiple", "context": {"encounter": [{"reference": "Encounter/X"}, {"reference": "Encounter/Y"}]}} +{"resourceType": "DocumentReference", "id": "encounter-none-in-context", "context": {"related": [{"display": "X"}]}} +{"resourceType": "DocumentReference", "id": "encounter-wrong-type", "context": {"encounter": [{"reference": "EpisodeOfCare/X"}]}} +{"resourceType": "DocumentReference", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/encounter/0.ndjson b/tests/data/t_us_core_v4/must-support/encounter/0.ndjson index 49cdef8..4a35a9c 100644 --- a/tests/data/t_us_core_v4/must-support/encounter/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/encounter/0.ndjson @@ -1,11 +1,11 @@ -{"id": "valid", "participant": [{"individual": {"display": "X"}}], "period": {"start": "2013"}, "reasonCode": [{"text": "X"}], "hospitalization": {"dischargeDisposition": {"text": "X"}}, "location": [{"location": {"reference": "Location/A"}}]} -{"id": "hospitalization-no-disposition", "hospitalization": {"reAdmission": {"text": "X"}}} -{"id": "location-multiple-good", "location": [{"location": {"reference": "Location/A"}}, {"location": {"reference": "Location/B"}}]} -{"id": "location-multiple-bad", "location": [{"location": {"reference": "Location/A"}}, {"status": "active"}]} -{"id": "reason-ref-good", "reasonReference": [{"reference": "Condition/A"}]} -{"id": "reason-ref-multiple-good", "reasonReference": [{"reference": "Condition/A"}, {"reference": "Condition/B"}]} -{"id": "reason-ref-multiple-bad", "reasonReference": [{"reference": "Condition/A"}, {"reference": "Patient/B"}]} -{"id": "reason-ref-wrong-target", "reasonReference": [{"reference": "Patient/A"}]} -{"id": "service-provider-good", "serviceProvider": {"reference": "Organization/A"}} -{"id": "service-provider-wrong-target", "serviceProvider": {"reference": "Patient/A"}} -{"id": "nothing"} +{"resourceType": "Encounter", "id": "valid", "participant": [{"individual": {"display": "X"}}], "period": {"start": "2013"}, "reasonCode": [{"text": "X"}], "hospitalization": {"dischargeDisposition": {"text": "X"}}, "location": [{"location": {"reference": "Location/A"}}]} +{"resourceType": "Encounter", "id": "hospitalization-no-disposition", "hospitalization": {"reAdmission": {"text": "X"}}} +{"resourceType": "Encounter", "id": "location-multiple-good", "location": [{"location": {"reference": "Location/A"}}, {"location": {"reference": "Location/B"}}]} +{"resourceType": "Encounter", "id": "location-multiple-bad", "location": [{"location": {"reference": "Location/A"}}, {"status": "active"}]} +{"resourceType": "Encounter", "id": "reason-ref-good", "reasonReference": [{"reference": "Condition/A"}]} +{"resourceType": "Encounter", "id": "reason-ref-multiple-good", "reasonReference": [{"reference": "Condition/A"}, {"reference": "Condition/B"}]} +{"resourceType": "Encounter", "id": "reason-ref-multiple-bad", "reasonReference": [{"reference": "Condition/A"}, {"reference": "Patient/B"}]} +{"resourceType": "Encounter", "id": "reason-ref-wrong-target", "reasonReference": [{"reference": "Patient/A"}]} +{"resourceType": "Encounter", "id": "service-provider-good", "serviceProvider": {"reference": "Organization/A"}} +{"resourceType": "Encounter", "id": "service-provider-wrong-target", "serviceProvider": {"reference": "Patient/A"}} +{"resourceType": "Encounter", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/immunization/0.ndjson b/tests/data/t_us_core_v4/must-support/immunization/0.ndjson index b08b024..9d8175e 100644 --- a/tests/data/t_us_core_v4/must-support/immunization/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/immunization/0.ndjson @@ -1,5 +1,5 @@ -{"id": "valid-null-status", "primarySource": true} -{"id": "valid-with-status", "status": "completed", "primarySource": false} -{"id": "valid-with-reason", "status": "not-done", "statusReason": {"text": "X"}, "primarySource": false} -{"id": "missing-reason", "status": "not-done"} -{"id": "nothing"} +{"resourceType": "Immunization", "id": "valid-null-status", "primarySource": true} +{"resourceType": "Immunization", "id": "valid-with-status", "status": "completed", "primarySource": false} +{"resourceType": "Immunization", "id": "valid-with-reason", "status": "not-done", "statusReason": {"text": "X"}, "primarySource": false} +{"resourceType": "Immunization", "id": "missing-reason", "status": "not-done"} +{"resourceType": "Immunization", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/medication/0.ndjson b/tests/data/t_us_core_v4/must-support/medication/0.ndjson index b37fb37..1737a4d 100644 --- a/tests/data/t_us_core_v4/must-support/medication/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/medication/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "Medication", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/medicationrequest/0.ndjson b/tests/data/t_us_core_v4/must-support/medicationrequest/0.ndjson index e19c29b..1b004fa 100644 --- a/tests/data/t_us_core_v4/must-support/medicationrequest/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/medicationrequest/0.ndjson @@ -1,4 +1,4 @@ -{"id": "valid", "category": [{"text": "X"}], "reportedBoolean": true, "encounter": {"reference": "Encounter/A"}, "authoredOn": "2013"} -{"id": "reported-ref-good", "reportedReference": {"reference": "Practitioner/X"}} -{"id": "reported-ref-bad", "reportedReference": {"reference": "Condition/X"}} -{"id": "nothing"} +{"resourceType": "MedicationRequest", "id": "valid", "category": [{"text": "X"}], "reportedBoolean": true, "encounter": {"reference": "Encounter/A"}, "authoredOn": "2013"} +{"resourceType": "MedicationRequest", "id": "reported-ref-good", "reportedReference": {"reference": "Practitioner/X"}} +{"resourceType": "MedicationRequest", "id": "reported-ref-bad", "reportedReference": {"reference": "Condition/X"}} +{"resourceType": "MedicationRequest", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/observation/labs.ndjson b/tests/data/t_us_core_v4/must-support/observation/labs.ndjson index ff7fcb5..562a73c 100644 --- a/tests/data/t_us_core_v4/must-support/observation/labs.ndjson +++ b/tests/data/t_us_core_v4/must-support/observation/labs.ndjson @@ -1,5 +1,5 @@ -{"id": "labs-datetime", "effectiveDateTime": "2020-11-11", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "labs-period", "effectivePeriod": {"start": "2022-10-10"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "labs-timing", "effectiveTiming": {"code": {"text": "X"}}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "labs-instant", "effectiveInstant": "2017-01-01T00:00:00Z", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "labs-nothing", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-datetime", "effectiveDateTime": "2020-11-11", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-period", "effectivePeriod": {"start": "2022-10-10"}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-timing", "effectiveTiming": {"code": {"text": "X"}}, "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-instant", "effectiveInstant": "2017-01-01T00:00:00Z", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-nothing", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} diff --git a/tests/data/t_us_core_v4/must-support/observation/nothing.ndjson b/tests/data/t_us_core_v4/must-support/observation/nothing.ndjson index b37fb37..ac43704 100644 --- a/tests/data/t_us_core_v4/must-support/observation/nothing.ndjson +++ b/tests/data/t_us_core_v4/must-support/observation/nothing.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "Observation", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/observation/smoking.ndjson b/tests/data/t_us_core_v4/must-support/observation/smoking.ndjson index b5de5da..4226908 100644 --- a/tests/data/t_us_core_v4/must-support/observation/smoking.ndjson +++ b/tests/data/t_us_core_v4/must-support/observation/smoking.ndjson @@ -1 +1 @@ -{"id": "smoking-nothing", "code": {"coding": [{"code": "72166-2", "system": "http://loinc.org"}]}} +{"resourceType": "Observation", "id": "smoking-nothing", "code": {"coding": [{"code": "72166-2", "system": "http://loinc.org"}]}} diff --git a/tests/data/t_us_core_v4/must-support/observation/vitals.ndjson b/tests/data/t_us_core_v4/must-support/observation/vitals.ndjson index 7c3e30e..b5966ee 100644 --- a/tests/data/t_us_core_v4/must-support/observation/vitals.ndjson +++ b/tests/data/t_us_core_v4/must-support/observation/vitals.ndjson @@ -1,4 +1,4 @@ -{"id": "vitals-valid", "component": [{"valueBoolean": true}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-ucum-good", "valueQuantity": {"code": "bit", "system": "http://unitsofmeasure.org"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-ucum-bad", "valueQuantity": {"code": "bit", "system": "trust-me-bro"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} -{"id": "vitals-nothing", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-valid", "component": [{"valueBoolean": true}], "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-ucum-good", "valueQuantity": {"code": "bit", "system": "http://unitsofmeasure.org"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-ucum-bad", "valueQuantity": {"code": "bit", "system": "trust-me-bro"}, "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "vitals-nothing", "category": [{"coding": [{"code": "vital-signs", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} diff --git a/tests/data/t_us_core_v4/must-support/patient/0.ndjson b/tests/data/t_us_core_v4/must-support/patient/0.ndjson index df741b0..7222eb4 100644 --- a/tests/data/t_us_core_v4/must-support/patient/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/patient/0.ndjson @@ -1,9 +1,9 @@ -{"id": "valid", "birthDate": "2012", "address": [{"postalCode": "02139"}], "communication": [{"language": {"text": "X"}}], "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F"}]} -{"id": "address-multiple-good", "address": [{"postalCode": "02139"}, {"postalCode": "02138"}]} -{"id": "address-multiple-bad", "address": [{"postalCode": "02139"}, {"state": "MA"}]} -{"id": "language-multiple-good", "communication": [{"language": {"text": "X"}}, {"language": {"text": "Y"}}]} -{"id": "language-multiple-bad", "communication": [{"language": {"text": "X"}}, {"preferred": false}]} -{"id": "race-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "bogus-code", "system": "bogus-system"}}]}]} -{"id": "ethnicity-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "bogus-code", "system": "bogus-system"}}]}]} -{"id": "birth-sex-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "bogus-code"}]} -{"id": "nothing"} +{"resourceType": "Patient", "id": "valid", "birthDate": "2012", "address": [{"postalCode": "02139"}], "communication": [{"language": {"text": "X"}}], "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "UNK", "system": "http://terminology.hl7.org/CodeSystem/v3-NullFlavor"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "2135-2", "system": "urn:oid:2.16.840.1.113883.6.238"}}]}, {"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "F"}]} +{"resourceType": "Patient", "id": "address-multiple-good", "address": [{"postalCode": "02139"}, {"postalCode": "02138"}]} +{"resourceType": "Patient", "id": "address-multiple-bad", "address": [{"postalCode": "02139"}, {"state": "MA"}]} +{"resourceType": "Patient", "id": "language-multiple-good", "communication": [{"language": {"text": "X"}}, {"language": {"text": "Y"}}]} +{"resourceType": "Patient", "id": "language-multiple-bad", "communication": [{"language": {"text": "X"}}, {"preferred": false}]} +{"resourceType": "Patient", "id": "race-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-race", "extension": [{"url": "ombCategory", "valueCoding": {"code": "bogus-code", "system": "bogus-system"}}]}]} +{"resourceType": "Patient", "id": "ethnicity-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-ethnicity", "extension": [{"url": "ombCategory", "valueCoding": {"code": "bogus-code", "system": "bogus-system"}}]}]} +{"resourceType": "Patient", "id": "birth-sex-unregistered", "extension": [{"url": "http://hl7.org/fhir/us/core/StructureDefinition/us-core-birthsex", "valueCode": "bogus-code"}]} +{"resourceType": "Patient", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/must-support/procedure/0.ndjson b/tests/data/t_us_core_v4/must-support/procedure/0.ndjson index b37fb37..a538298 100644 --- a/tests/data/t_us_core_v4/must-support/procedure/0.ndjson +++ b/tests/data/t_us_core_v4/must-support/procedure/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "Procedure", "id": "nothing"} diff --git a/tests/data/t_us_core_v4/obs-low-schema/observation/0.ndjson b/tests/data/t_us_core_v4/obs-low-schema/observation/0.ndjson index 1d3e5a8..5bbe799 100644 --- a/tests/data/t_us_core_v4/obs-low-schema/observation/0.ndjson +++ b/tests/data/t_us_core_v4/obs-low-schema/observation/0.ndjson @@ -1 +1 @@ -{"id": "labs-nothing", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} +{"resourceType": "Observation", "id": "labs-nothing", "category": [{"coding": [{"code": "laboratory", "system": "http://terminology.hl7.org/CodeSystem/observation-category"}]}]} diff --git a/tests/data/t_us_core_v4/patient-low-schema/patient/0.ndjson b/tests/data/t_us_core_v4/patient-low-schema/patient/0.ndjson index b37fb37..30443bf 100644 --- a/tests/data/t_us_core_v4/patient-low-schema/patient/0.ndjson +++ b/tests/data/t_us_core_v4/patient-low-schema/patient/0.ndjson @@ -1 +1 @@ -{"id": "nothing"} +{"resourceType": "Patient", "id": "nothing"}