Skip to content

Commit

Permalink
Merge pull request #50 from smart-on-fhir/mikix/resource-types
Browse files Browse the repository at this point in the history
tests: add resourceType field to all test data
  • Loading branch information
mikix authored Jul 2, 2024
2 parents bc3f4ab + 9cb8788 commit 2cb5b7d
Show file tree
Hide file tree
Showing 105 changed files with 481 additions and 481 deletions.
26 changes: 13 additions & 13 deletions tests/data/c_pt_count/cubed/patient/0.ndjson
Original file line number Diff line number Diff line change
@@ -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"}
26 changes: 13 additions & 13 deletions tests/data/c_pt_count/general/patient/0.ndjson
Original file line number Diff line number Diff line change
@@ -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"}
2 changes: 1 addition & 1 deletion tests/data/c_pt_count/no-ext/patient/0.ndjson
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"id": "A", "birthDate": "1970"}
{"resourceType": "Patient", "id": "A", "birthDate": "1970"}
20 changes: 10 additions & 10 deletions tests/data/c_pt_deceased_count/general/patient/0.ndjson
Original file line number Diff line number Diff line change
@@ -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"}
22 changes: 11 additions & 11 deletions tests/data/c_resource_count/general/allergyintolerance/0.ndjson
Original file line number Diff line number Diff line change
@@ -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"}
Loading

0 comments on commit 2cb5b7d

Please sign in to comment.