Generated Narrative with Details
id: example
status: final
category: Vital Signs (Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})
code: Body Weight (Details : {LOINC code '29463-7' = 'Body weight', given as 'Body Weight'}; {LOINC code '3141-9' = 'Body weight Measured', given as 'Body weight Measured'}; {SNOMED CT code '27113001' = 'Body weight', given as 'Body weight'}; {http://acme.org/devices/clinical-codes code 'body-weight' = 'body-weight', given as 'Body Weight'})
subject: Patient/example
encounter: Encounter/example
effective: 28/03/2016
value: 185 lbs (Details: UCUM code [lb_av] = 'lb_av')
"
+ },
+ "status":,
+ "category": [
+ {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/observation-category",
+ "code": "vital-signs",
+ "display": "Vital Signs"
+ }
+ ]
+ }
+ ],
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "29463-7",
+ "display": "Body Weight"
+ },
+ {
+ "system": "http://loinc.org",
+ "code": "3141-9",
+ "display": "Body weight Measured"
+ },
+ {
+ "system": "http://snomed.info/sct",
+ "code": "27113001",
+ "display": "Body weight"
+ },
+ {
+ "system": "http://acme.org/devices/clinical-codes",
+ "code": "body-weight",
+ "display": "Body Weight"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/example"
+ },
+ "encounter": {
+ "reference": "Encounter/example"
+ },
+ "effectiveDateTime": "2016-03-28",
+ "valueQuantity": {
+ "value": 185,
+ "unit": "lbs",
+ "system": "http://unitsofmeasure.org",
+ "code": "[lb_av]"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "Observation"
+ }
+ },
+ {
+ "fullUrl": "urn:uuid:61ebe359-bfdc-4613-8bf2-c5e300945f0c",
+ "resource": {
+ "resourceType": "Claim",
+ "id": "100150",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id: f001
clinicalStatus: Active (Details : {http://terminology.hl7.org/CodeSystem/condition-clinical code 'active' = 'Active)
verificationStatus: Confirmed (Details : {http://terminology.hl7.org/CodeSystem/condition-ver-status code 'confirmed' = 'Confirmed)
category: diagnosis (Details : {SNOMED CT code '439401001' = 'Diagnosis', given as 'diagnosis'})
severity: Moderate (Details : {SNOMED CT code '6736007' = 'Moderate', given as 'Moderate'})
code: Heart valve disorder (Details : {SNOMED CT code '368009' = 'Heart valve disorder', given as 'Heart valve disorder'})
bodySite: heart structure (Details : {SNOMED CT code '40768004' = 'Left thorax', given as 'Left thorax'})
subject: P. van de Heuvel
encounter: Encounter/f001
onset: 05/08/2011
recordedDate: 05/10/2011
asserter: P. van de Heuvel
Evidences
- | Code |
* | Cardiac chest pain (Details : {SNOMED CT code '426396005' = 'Cardiac chest pain', given as 'Cardiac chest pain'}) |
"
},
- "clinicalStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
- "code": "active"
- }
- ]
- },
- "verificationStatus": {
- "coding": [
- {
- "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
- "code": "confirmed"
- }
- ]
- },
- "category": [
- {
- "coding": [
+ "clinicalStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
+ "code": "active"
+ }
+ ]
+ },
+ "verificationStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
+ "code": "confirmed"
+ }
+ ]
+ },
+ "category": [
{
- "system": "http://snomed.info/sct",
- "code": "439401001",
- "display": "diagnosis"
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "439401001",
+ "display": "diagnosis"
+ }
+ ]
}
- ]
- }
- ],
- "severity": {
- "coding": [
- {
- "system": "http://snomed.info/sct",
- "code": "6736007",
- "display": "Moderate"
- }
- ]
- },
- "code": {
- "coding": [
- {
- "system": "http://snomed.info/sct",
- "code": "368009",
- "display": "Heart valve disorder"
- }
- ]
- },
- "bodySite": [
- {
- "coding": [
+ ],
+ "severity": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "6736007",
+ "display": "Moderate"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "368009",
+ "display": "Heart valve disorder"
+ }
+ ]
+ },
+ "bodySite": [
{
- "system": "http://snomed.info/sct",
- "code": "40768004",
- "display": "Left thorax"
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "40768004",
+ "display": "Left thorax"
+ }
+ ],
+ "text": "heart structure"
}
- ],
- "text": "heart structure"
- }
- ],
+ ],
"subject": {
"reference": "Patient/f001",
"display": "P. van de Heuvel"
},
- "encounter": {
- "reference": "Encounter/f001"
- },
- "onsetDateTime": "2011-08-05",
- "recordedDate": "2011-10-05",
- "asserter": {
- "reference": "Patient/f001",
- "display": "P. van de Heuvel"
- },
- "evidence": [
- {
- "code": [
+ "encounter": {
+ "reference": "Encounter/f001"
+ },
+ "onsetDateTime": "2011-08-05",
+ "recordedDate": "2011-10-05",
+ "participant": [
{
- "coding": [
- {
- "system": "http://snomed.info/sct",
- "code": "426396005",
- "display": "Cardiac chest pain"
+ "actor": {
+ "reference": "Patient/f001",
+ "display": "P. van de Heuvel"
}
- ]
}
- ]
- }
- ]
+ ],
+ "evidence": [
+ {
+ "concept": [
+ {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "426396005",
+ "display": "Cardiac chest pain"
+ }
+ ]
+ }
+ ]
+ }
+ ]
}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Coverage.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Coverage.json
new file mode 100644
index 0000000000..4701dada53
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Coverage.json
@@ -0,0 +1,45 @@
+{
+ "resourceType": "Coverage",
+ "id": "SP1234",
+ "text": {
+ "status": "generated",
+ "div": "A human-readable rendering of a Self Pay Agreement.
"
+ },
+ "identifier": [
+ {
+ "system": "http://hospitalx.com/selfpayagreement",
+ "value": "SP12345678"
+ }
+ ],
+ "status": "active",
+ "type": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/coverage-selfpay",
+ "code": "pay",
+ "display": "PAY"
+ }
+ ]
+ },
+ "subscriber": {
+ "reference": "Patient/5"
+ },
+ "beneficiary": {
+ "reference": "Patient/5"
+ },
+ "relationship": {
+ "coding": [
+ {
+ "code": "self"
+ }
+ ]
+ },
+ "period": {
+ "end": "2012-03-17"
+ },
+ "insurer": [
+ {
+ "reference": "Patient/5"
+ }
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-appends.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-appends.json
index 85ba963241..2619b1d05a 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-appends.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-appends.json
@@ -61,10 +61,28 @@
],
"attester": [
{
- "mode": "professional",
+ "mode": {
+ "coding": [
+ {
+ "display": "professional"
+ }
+ ]
+ },
"party": {
"reference": "Organization/f001"
}
+ },
+ {
+ "mode": {
+ "coding": [
+ {
+ "display": "patient"
+ }
+ ]
+ },
+ "party": {
+ "reference": "Patient/xcda"
+ }
}
],
"custodian": {
@@ -108,27 +126,38 @@
"title": "Physical",
"creation": "2005-12-24T09:35:00+11:00"
},
- "format": {
- "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
- "code": "urn:ihe:pcc:handp:2008",
- "display": "History and Physical Specification"
+ "profile": {
+ "valueCoding": {
+ "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
+ "code": "urn:ihe:pcc:handp:2008",
+ "display": "History and Physical Specification"
+ }
}
}
],
- "encounter": [
+ "context": [
{
"reference": "Encounter/xcda"
+ },
+ {
+ "reference": "Patient/xcda",
+ "identifier": {
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
+ }
}
],
"event": [
{
- "coding": [
- {
- "system": "http://ihe.net/xds/connectathon/eventCodes",
- "code": "T-D8200",
- "display": "Arm"
- }
- ]
+ "concept": {
+ "coding": [
+ {
+ "system": "http://ihe.net/xds/connectathon/eventCodes",
+ "code": "T-D8200",
+ "display": "Arm"
+ }
+ ]
+ }
}
],
"period": {
@@ -152,18 +181,5 @@
"display": "General Medicine"
}
]
- },
- "sourcePatientInfo": {
- "reference": "Patient/xcda"
- },
- "related": [
- {
- "reference": "Patient/xcda",
- "identifier": {
- "system": "urn:ietf:rfc:3986",
- "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
- }
- }
- ]
-
+ }
}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms-replaces-target.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms-replaces-target.json
index 81cb7129f6..7caa489248 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms-replaces-target.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms-replaces-target.json
@@ -61,10 +61,28 @@
],
"attester": [
{
- "mode": "professional",
+ "mode": {
+ "coding": [
+ {
+ "display": "professional"
+ }
+ ]
+ },
"party": {
"reference": "Organization/f001"
}
+ },
+ {
+ "mode": {
+ "coding": [
+ {
+ "display": "patient"
+ }
+ ]
+ },
+ "party": {
+ "reference": "Patient/xcda"
+ }
}
],
"custodian": {
@@ -121,28 +139,38 @@
"title": "Physical",
"creation": "2005-12-24T09:35:00+11:00"
},
- "format": {
- "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
- "code": "urn:ihe:pcc:handp:2008",
- "display": "History and Physical Specification"
+ "profile": {
+ "valueCoding": {
+ "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
+ "code": "urn:ihe:pcc:handp:2008",
+ "display": "History and Physical Specification"
+ }
}
}
],
-
- "encounter": [
+ "context": [
{
"reference": "Encounter/xcda"
+ },
+ {
+ "reference": "Patient/xcda",
+ "identifier": {
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
+ }
}
],
"event": [
{
- "coding": [
- {
- "system": "http://ihe.net/xds/connectathon/eventCodes",
- "code": "T-D8200",
- "display": "Arm"
- }
- ]
+ "concept": {
+ "coding": [
+ {
+ "system": "http://ihe.net/xds/connectathon/eventCodes",
+ "code": "T-D8200",
+ "display": "Arm"
+ }
+ ]
+ }
}
],
"period": {
@@ -166,17 +194,5 @@
"display": "General Medicine"
}
]
- },
- "sourcePatientInfo": {
- "reference": "Patient/xcda"
- },
- "related": [
- {
- "reference": "Patient/xcda",
- "identifier": {
- "system": "urn:ietf:rfc:3986",
- "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
- }
- }
- ]
+ }
}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms.json
index 4194067058..b7b45985e8 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/DocumentReference-example-relatesTo-code-transforms.json
@@ -61,10 +61,28 @@
],
"attester": [
{
- "mode": "professional",
+ "mode": {
+ "coding": [
+ {
+ "display": "professional"
+ }
+ ]
+ },
"party": {
"reference": "Organization/f001"
}
+ },
+ {
+ "mode": {
+ "coding": [
+ {
+ "display": "patient"
+ }
+ ]
+ },
+ "party": {
+ "reference": "Patient/xcda"
+ }
}
],
"custodian": {
@@ -108,27 +126,38 @@
"title": "Physical",
"creation": "2005-12-24T09:35:00+11:00"
},
- "format": {
- "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
- "code": "urn:ihe:pcc:handp:2008",
- "display": "History and Physical Specification"
+ "profile": {
+ "valueCoding": {
+ "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3",
+ "code": "urn:ihe:pcc:handp:2008",
+ "display": "History and Physical Specification"
+ }
}
}
],
- "encounter": [
+ "context": [
{
"reference": "Encounter/xcda"
+ },
+ {
+ "reference": "Patient/xcda",
+ "identifier": {
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
+ }
}
],
"event": [
{
- "coding": [
- {
- "system": "http://ihe.net/xds/connectathon/eventCodes",
- "code": "T-D8200",
- "display": "Arm"
- }
- ]
+ "concept": {
+ "coding": [
+ {
+ "system": "http://ihe.net/xds/connectathon/eventCodes",
+ "code": "T-D8200",
+ "display": "Arm"
+ }
+ ]
+ }
}
],
"period": {
@@ -152,17 +181,5 @@
"display": "General Medicine"
}
]
- },
- "sourcePatientInfo": {
- "reference": "Patient/xcda"
- },
- "related": [
- {
- "reference": "Patient/xcda",
- "identifier": {
- "system": "urn:ietf:rfc:3986",
- "value": "urn:oid:1.3.6.1.4.1.21367.2005.3.7.2345"
- }
- }
- ]
+ }
}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Encounter-For-Patient-f001.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Encounter-For-Patient-f001.json
index d240628a6e..79aca7ad15 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Encounter-For-Patient-f001.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Encounter-For-Patient-f001.json
@@ -13,11 +13,15 @@
}
],
"status": "completed",
- "class": {
- "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
- "code": "AMB",
- "display": "ambulatory"
- },
+ "class": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
+ "code": "AMB",
+ "display": "ambulatory"
+ }
+ ]
+ },
"type": [
{
"coding": [
@@ -58,7 +62,7 @@
},
"reason": [
{
- "concept": {
+ "use": {
"coding": [
{
"system": "http://snomed.info/sct",
@@ -69,7 +73,7 @@
}
}
],
- "hospitalization": {
+ "admission": {
"preAdmissionIdentifier": {
"use": "official",
"system": "http://www.bmc.nl/zorgportal/identifiers/pre-admissions",
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Location-example-hq.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Location-example-hq.json
index 84fbf04960..7257328004 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Location-example-hq.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Location-example-hq.json
@@ -16,7 +16,7 @@
]
}
],
- "physicalType": {
+ "form": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/location-physical-type",
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/MedicinalProductDefinition.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/MedicinalProductDefinition.json
index 0cf0005b9c..1c6909daec 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/MedicinalProductDefinition.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/MedicinalProductDefinition.json
@@ -34,7 +34,7 @@
"name": [
{
"productName": "Equilidem 2.5 mg film-coated tablets",
- "namePart": [
+ "part": [
{
"part": "Equilidem",
"type": {
@@ -66,7 +66,7 @@
}
}
],
- "countryLanguage": [
+ "usage": [
{
"country": {
"coding": [
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/ObservationDefinition-example.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/ObservationDefinition-example.json
index d3689acdb0..892c8095aa 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/ObservationDefinition-example.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/ObservationDefinition-example.json
@@ -39,17 +39,10 @@
]
},
"preferredReportName": "Serum albumin/Protein total",
- "quantitativeDetails": {
- "unit": {
- "coding": [
- {
- "system": "http://unitsofmeasure.org",
- "code": "%",
- "display": "%"
- }
- ]
- },
- "decimalPrecision": 0
+ "permittedUnit": {
+ "system": "http://unitsofmeasure.org",
+ "code": "%",
+ "display": "%"
},
"qualifiedValue": [
{
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Organization.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Organization.json
index 431e1f0adc..e0e09f6b09 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Organization.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Organization.json
@@ -1,32 +1,36 @@
{
- "resourceType": "Organization",
- "id": "msft",
- "extension": [
- {
- "url": "http://hl7.org/fhir/StructureDefinition/organization-alias",
- "valueString": "Microsoft"
- }
- ],
- "name": "Microsoft Corporation",
- "telecom": [
- {
- "system": "phone",
- "value": "(+1) 555-555-5555"
- },
- {
- "system": "fax",
- "value": "(+1) 555-555-5551"
- }
- ],
- "address": [
- {
- "line": [
- "1 Microsoft Way"
- ],
- "city": "Redmond",
- "state": "WA",
- "postalCode": "98052",
- "country": "USA"
- }
- ]
-}
\ No newline at end of file
+ "resourceType": "Organization",
+ "id": "msft",
+ "name": "Microsoft Corporation",
+ "contact": [
+ {
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/organization-alias",
+ "valueString": "Microsoft"
+ }
+ ],
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "(+1) 555-555-5555"
+ },
+ {
+ "system": "fax",
+ "value": "(+1) 555-555-5551"
+ }
+ ],
+ "address": [
+ {
+ "line": [
+ "1 Microsoft Way"
+ ],
+ "city": "Redmond",
+ "state": "WA",
+ "postalCode": "98052",
+ "country": "USA"
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Profile-Organization-uscore-endpoint.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Profile-Organization-uscore-endpoint.json
new file mode 100644
index 0000000000..0ef84b218e
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Profile-Organization-uscore-endpoint.json
@@ -0,0 +1,78 @@
+{
+ "resourceType": "Organization",
+ "id": "saint-luke-w-endpoint",
+ "meta": { "profile": [ "http://hl7.org/fhir/us/core/StructureDefinition/us-core-organization" ] },
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id: acme-lab
meta:
identifier: 1144221847, 2523423456
active: true
type: Healthcare Provider (Details : {http://hl7.org/fhir/organization-type code 'prov' = 'Healthcare Provider', given as 'Healthcare Provider'})
name: Acme Labs
telecom: ph: (+1) 734-677-7777, hq@acme.org
address: 3300 Washtenaw Avenue, Suite 227 Amherst MA 01002 USA
"
+ },
+ "identifier": [
+ {
+ "system": "http://hl7.org.fhir/sid/us-npi",
+ "value": "1144221847"
+ },
+ {
+ "system": "http://www.acme.org/organization",
+ "value": "2523423456"
+ }
+ ],
+ "active": true,
+ "type": [
+ {
+ "coding": [
+ {
+ "system": "http://hl7.org/fhir/organization-type",
+ "code": "prov",
+ "display": "Healthcare Provider"
+ }
+ ]
+ }
+ ],
+ "name": "Acme Labs",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "(+1) 734-677-7777"
+ },
+ {
+ "system": "email",
+ "value": "hq@acme.org"
+ }
+ ],
+ "address": [
+ {
+ "line": [
+ "3300 Washtenaw Avenue, Suite 227"
+ ],
+ "city": "Amherst",
+ "state": "MA",
+ "postalCode": "01002",
+ "country": "USA"
+ }
+ ]
+ }
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchDataBatch.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchDataBatch.json
new file mode 100644
index 0000000000..9701edfded
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchDataBatch.json
@@ -0,0 +1,365 @@
+{
+ "resourceType": "Bundle",
+ "type": "batch",
+ "entry": [
+ {
+ "resource": {
+ "resourceType": "Patient",
+ "id": "searchpatient1",
+ "name": [
+ {
+ "family": "Chalmers",
+ "given": [
+ "Sarah"
+ ]
+ }
+ ],
+ "active": true,
+ "identifier": [
+ {
+ "use": "official",
+ "value": "test 1"
+ }
+ ],
+ "gender": "female",
+ "generalPractitioner": [
+ {
+ "reference": "Practitioner/searchpractitioner1"
+ },
+ {
+ "reference": "Practitioner/searchpractitioner2"
+ }
+ ]
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Patient/searchpatient1"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Patient",
+ "id": "searchpatient2",
+ "name": [
+ {
+ "family": "Chalmers",
+ "given": [
+ "Jon"
+ ]
+ }
+ ],
+ "active": true,
+ "identifier": [
+ {
+ "use": "official",
+ "value": "test 2"
+ }
+ ],
+ "birthDate": "1987-02-20",
+ "gender": "male",
+ "generalPractitioner": {
+ "reference": "Practitioner/searchpractitioner2"
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Patient/searchpatient2"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Patient",
+ "id": "searchpatient3",
+ "name": [
+ {
+ "family": "Chalmers",
+ "given": [
+ "jon"
+ ]
+ }
+ ],
+ "address": [
+ {
+ "line": [
+ "Dismal Drive"
+ ]
+ }
+ ],
+ "active": true,
+ "birthDate": "1975-01-12",
+ "gender": "male",
+ "generalPractitioner": {
+ "reference": "Practitioner/searchpractitioner3"
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Patient/searchpatient3"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Patient",
+ "id": "searchpatient4",
+ "name": [
+ {
+ "family": "Chalmers",
+ "given": [
+ "Jonathon"
+ ]
+ }
+ ],
+ "address": [
+ {
+ "line": [
+ "Pleasant Meadows"
+ ]
+ }
+ ],
+ "birthDate": "2000-12-23",
+ "gender": "female"
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Patient/searchpatient4"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Encounter",
+ "status": "planned",
+ "class": {
+ "coding": [
+ {
+ "system": "system",
+ "code": "code"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/searchpatient2"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "Encounter"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Encounter",
+ "status": "planned",
+ "class": {
+ "coding": [
+ {
+ "system": "system",
+ "code": "code"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/searchpatient3"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "Encounter"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Observation",
+ "id": "searchobservation1",
+ "status": "amended",
+ "code": {
+ "coding": [
+ {
+ "system": "LOINC",
+ "code": "2823-3"
+ }
+ ]
+ },
+ "valueQuantity": {
+ "value": 9.0
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Observation/searchobservation1"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Observation",
+ "id": "searchobservation2",
+ "status": "amended",
+ "code": {
+ "coding": [
+ {
+ "system": "LOINC",
+ "code": "2823-3"
+ }
+ ]
+ },
+ "valueQuantity": {
+ "value": 10.0
+ },
+ "subject": {
+ "reference": "Patient/searchpatient2"
+ }
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Observation/searchobservation2"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Observation",
+ "status": "amended",
+ "code": {
+ "coding": [
+ {
+ "system": "system",
+ "code": "527"
+ }
+ ]
+ },
+ "valueQuantity": {
+ "value": 12.0
+ },
+ "subject": {
+ "reference": "Patient/searchpatient1"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "Observation"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "DiagnosticReport",
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "system",
+ "code": "code"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/searchpatient1"
+ },
+ "result": {
+ "reference": "Observation/searchobservation1"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "DiagnosticReport"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "DiagnosticReport",
+ "status": "partial",
+ "code": {
+ "coding": [
+ {
+ "system": "system",
+ "code": "code"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/searchpatient2"
+ },
+ "result": {
+ "reference": "Observation/searchobservation2"
+ }
+ },
+ "request": {
+ "method": "POST",
+ "url": "DiagnosticReport"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Practitioner",
+ "id": "searchpractitioner1",
+ "name": [
+ {
+ "given": [
+ "Sarah"
+ ]
+ }
+ ],
+ "address": [
+ {
+ "state": "VT"
+ }
+ ]
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Practitioner/searchpractitioner1"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Practitioner",
+ "id": "searchpractitioner2",
+ "name": [
+ {
+ "given": [
+ "Bob"
+ ]
+ }
+ ],
+ "address": [
+ {
+ "state": "WA"
+ }
+ ]
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Practitioner/searchpractitioner2"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "Practitioner",
+ "id": "searchpractitioner3",
+ "name": [
+ {
+ "given": [
+ "janedoe"
+ ]
+ }
+ ],
+ "address": [
+ {
+ "state": "CA"
+ }
+ ]
+ },
+ "request": {
+ "method": "PUT",
+ "url": "Practitioner/searchpractitioner3"
+ }
+ },
+ {
+ "resource": {
+ "resourceType": "AuditEvent",
+ "recorded": "2021-05-28T00:00:00.000"
+ },
+ "request": {
+ "method": "POST",
+ "url": "AuditEvent"
+ }
+ }
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameter-SpecimenStatus.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameter-SpecimenStatus.json
new file mode 100644
index 0000000000..80a0c2a708
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameter-SpecimenStatus.json
@@ -0,0 +1,40 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Specimen-foo",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Specimen-foo",
+ "version": "4.0.1",
+ "name": "status",
+ "status": "draft",
+ "experimental": false,
+ "date": "2019-11-01T09:29:23+11:00",
+ "publisher": "Health Level Seven International (Orders and Observations)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/orders/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "available | unavailable | unsatisfactory | entered-in-error",
+ "code": "foo",
+ "base": [ "Specimen" ],
+ "type": "token",
+ "expression": "Specimen.status"
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterBadSyntax.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterBadSyntax.json
new file mode 100644
index 0000000000..e5b831699b
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterBadSyntax.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosis",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad1",
+ "version": "4.4.0",
+ "name": "diagnosis",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosis-reference",
+ "base": [ "Encounter" ],
+ "type": "reference",
+ "expression": "bad syntax",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterExpressionWrongProperty.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterExpressionWrongProperty.json
new file mode 100644
index 0000000000..51d23520ec
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterExpressionWrongProperty.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad2",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad2",
+ "version": "4.4.0",
+ "name": "diagnosisBad2",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad2",
+ "base": [ "Encounter" ],
+ "type": "reference",
+ "expression": "Encounter.diagnosis.foo",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidBase.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidBase.json
new file mode 100644
index 0000000000..d1bc3a1d59
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidBase.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad3",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad3",
+ "version": "4.4.0",
+ "name": "diagnosisBad3",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad3",
+ "base": [ "foo" ],
+ "type": "reference",
+ "expression": "Encounter.diagnosis.condition",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidType.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidType.json
new file mode 100644
index 0000000000..ae26819bb7
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterInvalidType.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad4",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad4",
+ "version": "4.4.0",
+ "name": "diagnosisBad4",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad4",
+ "base": [ "Encounter" ],
+ "type": "foo",
+ "expression": "Encounter.diagnosis.condition",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingBase.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingBase.json
new file mode 100644
index 0000000000..8b36f702dd
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingBase.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad5",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad5",
+ "version": "4.4.0",
+ "name": "diagnosisBad5",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad5",
+ "base": [],
+ "type": "reference",
+ "expression": "Encounter.diagnosis.condition",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingExpression.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingExpression.json
new file mode 100644
index 0000000000..6806085e95
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingExpression.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad6",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad6",
+ "version": "4.4.0",
+ "name": "diagnosisBad6",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad6",
+ "base": [ "Encounter" ],
+ "type": "reference",
+ "expression": "",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingType.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingType.json
new file mode 100644
index 0000000000..8b946abfa4
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterMissingType.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad7",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad7",
+ "version": "4.4.0",
+ "name": "diagnosisBad7",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad7",
+ "base": [ "Encounter" ],
+ "type": "",
+ "expression": "Encounter.diagnosis.condition",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterUnsupportedType.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterUnsupportedType.json
new file mode 100644
index 0000000000..6f6152907f
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/SearchParameterUnsupportedType.json
@@ -0,0 +1,44 @@
+{
+ "resourceType": "SearchParameter",
+ "id": "Encounter-diagnosisBad8",
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/structuredefinition-standards-status",
+ "valueCode": "trial-use"
+ }
+ ],
+ "url": "http://hl7.org/fhir/SearchParameter/Encounter-diagnosisBad8",
+ "version": "4.4.0",
+ "name": "diagnosisBad8",
+ "status": "draft",
+ "experimental": false,
+ "date": "2020-05-03T08:43:35+10:00",
+ "publisher": "Health Level Seven International (Patient Administration)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://hl7.org/fhir"
+ }
+ ]
+ },
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "http://www.hl7.org/Special/committees/pafm/index.cfm"
+ }
+ ]
+ }
+ ],
+ "description": "The diagnosis or procedure relevant to the encounter",
+ "code": "diagnosisBad8",
+ "base": [ "Encounter" ],
+ "type": "quantity",
+ "expression": "Encounter.diagnosis.condition",
+ "target": [
+ "Condition",
+ "Procedure"
+ ]
+}
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Specimen.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Specimen.json
index 934070d7e1..5d7f779a27 100644
--- a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Specimen.json
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/Specimen.json
@@ -83,25 +83,16 @@
},
"container": [
{
- "identifier": [
- {
- "value": "48736-15394-75465"
- }
- ],
- "description": "Green Gel tube",
- "type": {
- "text": "Vacutainer"
- },
- "capacity": {
- "value": 10,
- "unit": "mL"
+ "device": {
+ "identifier": [
+ {
+ "value": "48736-15394-75465"
+ }
+ ]
},
"specimenQuantity": {
"value": 6,
"unit": "mL"
- },
- "additiveReference": {
- "reference": "#hep"
}
}
],
diff --git a/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/StructureDefinition-us-core-birthsex.json b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/StructureDefinition-us-core-birthsex.json
new file mode 100644
index 0000000000..06bd0253b8
--- /dev/null
+++ b/src/Microsoft.Health.Fhir.Tests.Common/TestFiles/R5/StructureDefinition-us-core-birthsex.json
@@ -0,0 +1,262 @@
+{
+ "resourceType": "StructureDefinition",
+ "id": "us-core-birthsex",
+ "text": {
+ "status": "generated",
+ "div": "