+ When the FHIR messages are sent to Informatics Gateway
+ Then workflow requests are sent to message broker
+ And FHIR resources are uploaded to storage service
+
+ Examples:
+ | version | format |
+ | 1.0.2 DSTU2 | XML |
+ | 1.0.2 DSTU2 | JSON |
+ | 3.0.2 STU3 | XML |
+ | 3.0.2 STU3 | JSON |
+ | 4.0.1 R4 | XML |
+ | 4.0.1 R4 | JSON |
+ | 4.3.0 R4B | XML |
+ | 4.3.0 R4B | JSON |
diff --git a/tests/Integration.Test/Monai.Deploy.InformaticsGateway.Integration.Test.csproj b/tests/Integration.Test/Monai.Deploy.InformaticsGateway.Integration.Test.csproj
index 7fa3a4a77..12af6e326 100644
--- a/tests/Integration.Test/Monai.Deploy.InformaticsGateway.Integration.Test.csproj
+++ b/tests/Integration.Test/Monai.Deploy.InformaticsGateway.Integration.Test.csproj
@@ -1,4 +1,4 @@
-
+ Generated Narrative with Details
id : example
status : final
category : Vital Signs (Details : {http://hl7.org/fhir/observation-category code 'vital-signs' = 'Vital Signs',
+ given as 'Vital Signs'})
code : Weight Measured (Details : {LOINC code '3141-9' = 'Body weight Measured', given as 'Weight Measured'};
+ {SNOMED CT code '27113001' = '27113001', given as 'Body weight'}; {http://acme.org/devices/clinical-
+ codes code 'body-weight' = '??', given as 'Body Weight'})
subject : Patient/example
encounter : Encounter/example
value : 185 lbs (Details: http://unitsofmeasure.org code [lb_av] = '??')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.json b/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.json
new file mode 100644
index 000000000..77cf8c7ca
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.json
@@ -0,0 +1,60 @@
+{
+ "resourceType": "Patient",
+ "id": "Patient",
+ "text": {
+ "status": "generated",
+ "div": " Patient MINT_TEST, ID = MINT1234. Age = 56y, Size =\n 1.83m, Weight = 72.58kg
"
+ },
+ "extension": [
+ {
+ "url": "http://nema.org/fhir/extensions#0010:1010",
+ "valueQuantity": {
+ "value": 56,
+ "unit": "Y"
+ }
+ },
+ {
+ "url": "http://nema.org/fhir/extensions#0010:1020",
+ "valueQuantity": {
+ "value": 1.83,
+ "unit": "m"
+ }
+ },
+ {
+ "url": "http://nema.org/fhir/extensions#0010:1030",
+ "valueQuantity": {
+ "value": 72.58,
+ "unit": "kg"
+ }
+ }
+ ],
+ "identifier": [
+ {
+ "system": "http://nema.org/examples/patients",
+ "value": "MINT1234"
+ }
+ ],
+ "active": true,
+ "name": [
+ {
+ "family": [
+ "MINT_TEST"
+ ]
+ }
+ ],
+ "gender": "male",
+ "_gender": {
+ "extension": [
+ {
+ "url": "http://nema.org/examples/extensions#gender",
+ "valueCoding": {
+ "system": "http://nema.org/examples/gender",
+ "code": "M"
+ }
+ }
+ ]
+ },
+ "managingOrganization": {
+ "reference": "Organization/1"
+ }
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.xml b/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.xml
new file mode 100644
index 000000000..a6a14cb0f
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/1.0.2 DSTU2/Patient.xml
@@ -0,0 +1,33 @@
+
+
+
+
+
+
+
Henry Levin the 7th
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.json b/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.json
new file mode 100644
index 000000000..70287fc6c
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.json
@@ -0,0 +1,37 @@
+{
+ "resourceType": "Bundle",
+ "id": "Bundle",
+ "type": "batch",
+ "entry": [
+ {
+ "request": {
+ "method": "GET",
+ "url": "/Patient/example"
+ }
+ },
+ {
+ "request": {
+ "method": "GET",
+ "url": "/MedicationStatement?patient=example&_list=$current-medications"
+ }
+ },
+ {
+ "request": {
+ "method": "GET",
+ "url": "/AllergyIntolernce?patient=example&_list=$current-allergies"
+ }
+ },
+ {
+ "request": {
+ "method": "GET",
+ "url": "/Condition?patient=example&_list=$current-problems"
+ }
+ },
+ {
+ "request": {
+ "method": "GET",
+ "url": "/MedicationStatement?patient=example¬given:not=true"
+ }
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.xml b/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.xml
new file mode 100644
index 000000000..4df8c5dd7
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/Bundle.xml
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.json b/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.json
new file mode 100644
index 000000000..f2f16281e
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.json
@@ -0,0 +1,129 @@
+{
+ "resourceType": "DiagnosticReport",
+ "id": "DiagnosticReport",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id : f001
contained :
identifier : nr1239044 (OFFICIAL)
basedOn : id: req; L2381; status: active; intent: original-order; Complete blood count (hemogram) panel - Blood by Automated count (Details : {LOINC code '58410-2' = 'Complete blood count (hemogram) panel - Blood by Automated count', given as 'Complete blood count (hemogram) panel - Blood by Automated count'}) ; P. van den Heuvel; ????; Annotation: patient almost fainted during procedure
status : final
category : Haematology test (Details : {SNOMED CT code '252275004' = 'Haematology test', given as 'Haematology test'}; {http://hl7.org/fhir/v2/0074 code 'HM' = 'Hematology)
code : Complete blood count (hemogram) panel - Blood by Automated count (Details : {LOINC code '58410-2' = 'Complete blood count (hemogram) panel - Blood by Automated count', given as 'Complete blood count (hemogram) panel - Blood by Automated count'})
subject : P. van den Heuvel
issued : 15/05/2013 7:32:52 PM
Performers result :
conclusion : Core lab
"
+ },
+ "contained": [
+ {
+ "resourceType": "ProcedureRequest",
+ "id": "req",
+ "extension": [
+ {
+ "url": "http://example.org/bodysitecode",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "14975008",
+ "display": "Forearm structure"
+ }
+ ]
+ }
+ }
+ ],
+ "identifier": [
+ {
+ "system": "http://www.bmc.nl/zorgportal/identifiers/labresults",
+ "value": "L2381"
+ }
+ ],
+ "status": "active",
+ "intent": "original-order",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "58410-2",
+ "display": "Complete blood count (hemogram) panel - Blood by Automated count"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/f001",
+ "display": "P. van den Heuvel"
+ },
+ "context": {
+ "reference": "Encounter/f001"
+ },
+ "requester": {
+ "agent": {
+ "reference": "Practitioner/f001",
+ "display": "E.van den Broek"
+ }
+ },
+ "note": [
+ {
+ "text": "patient almost fainted during procedure"
+ }
+ ]
+ }
+ ],
+ "identifier": [
+ {
+ "use": "official",
+ "system": "http://www.bmc.nl/zorgportal/identifiers/reports",
+ "value": "nr1239044"
+ }
+ ],
+ "basedOn": [
+ {
+ "reference": "#req"
+ }
+ ],
+ "status": "final",
+ "category": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "252275004",
+ "display": "Haematology test"
+ },
+ {
+ "system": "http://hl7.org/fhir/v2/0074",
+ "code": "HM"
+ }
+ ]
+ },
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "58410-2",
+ "display": "Complete blood count (hemogram) panel - Blood by Automated count"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/f001",
+ "display": "P. van den Heuvel"
+ },
+ "issued": "2013-05-15T19:32:52+01:00",
+ "performer": [
+ {
+ "actor": {
+ "reference": "Organization/f001",
+ "display": "Burgers University Medical Centre"
+ }
+ }
+ ],
+ "result": [
+ {
+ "reference": "Observation/f001"
+ },
+ {
+ "reference": "Observation/f002"
+ },
+ {
+ "reference": "Observation/f003"
+ },
+ {
+ "reference": "Observation/f004"
+ },
+ {
+ "reference": "Observation/f005"
+ }
+ ],
+ "conclusion": "Core lab"
+}
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.xml b/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.xml
new file mode 100644
index 000000000..89d473e9d
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/DiagnosticReport.xml
@@ -0,0 +1,1723 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
CBC Report for Wile. E. COYOTE (MRN: 23453) issued 3-Mar 2011 11:45
+
+Test Units Value Reference Range
+Haemoglobin g/L 176 135 - 180
+Red Cell Count x10*12/L 5.9 4.2 - 6.0
+Haematocrit 0.55+ 0.38 - 0.52
+Mean Cell Volume fL 99+ 80 - 98
+Mean Cell Haemoglobin pg 36+ 27 - 35
+Platelet Count x10*9/L 444 150 - 450
+White Cell Count x10*9/L 4.6 4.0 - 11.0
+Neutrophils % 20
+Neutrophils x10*9/L 0.9--- 2.0 - 7.5
+Lymphocytes % 20
+Lymphocytes x10*9/L 0.9- 1.1 - 4.0
+Monocytes % 20
+Monocytes x10*9/L 0.9 0.2 - 1.0
+Eosinophils % 20
+Eosinophils x10*9/L 0.92++ 0.04 - 0.40
+Basophils % 20
+Basophils x10*9/L 0.92+++ <0.21
+
+
Acme Laboratory, Inc signed: Dr Pete Pathologist
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.json b/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.json
new file mode 100644
index 000000000..5bd2f19c9
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.json
@@ -0,0 +1,113 @@
+{
+ "resourceType": "NutritionOrder",
+ "id": "NutritionOrder",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id : pureeddiet
identifier : 123
status : active
patient : Peter Chalmers
encounter : Inpatient
dateTime : 17/09/2014
orderer : Dr Adam Careful
allergyIntolerance : Cashew Nuts
foodPreferenceModifier : Dairy Free (Details : {http://hl7.org/fhir/diet code 'dairy-free' = 'Dairy Free)
excludeFoodModifier : Cashew Nut (Details : {SNOMED CT code '227493005' = 'Cashew nuts', given as 'Cashew Nut'})
oralDiet
type : Pureed diet (Details : {SNOMED CT code '226211001' = 'Pureed diet', given as 'Pureed diet'}; {http://goodhealthhospital.org/diet-type-codes code '1010' = '1010', given as 'Pureed diet'})
schedule : Starting 10/02/2015, Do 3 per 1 days
Textures - Modifier * Pureed (Details : {SNOMED CT code '228055009' = 'Liquidized food', given as 'Liquidized food'})
fluidConsistencyType : Nectar thick liquids (Details : {SNOMED CT code '439021000124105' = 'Dietary liquid consistency - nectar thick liquid (regime/therapy)', given as 'Dietary liquid consistency - nectar thick liquid'})
"
+ },
+ "identifier": [
+ {
+ "system": "http://goodhealthhospital.org/nutrition-requests",
+ "value": "123"
+ }
+ ],
+ "status": "active",
+ "patient": {
+ "reference": "Patient/example",
+ "display": "Peter Chalmers"
+ },
+ "encounter": {
+ "reference": "Encounter/example",
+ "display": "Inpatient"
+ },
+ "dateTime": "2014-09-17",
+ "orderer": {
+ "reference": "Practitioner/example",
+ "display": "Dr Adam Careful"
+ },
+ "allergyIntolerance": [
+ {
+ "reference": "AllergyIntolerance/example",
+ "display": "Cashew Nuts"
+ }
+ ],
+ "foodPreferenceModifier": [
+ {
+ "coding": [
+ {
+ "system": "http://hl7.org/fhir/diet",
+ "code": "dairy-free"
+ }
+ ]
+ }
+ ],
+ "excludeFoodModifier": [
+ {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "version": "20140730",
+ "code": "227493005",
+ "display": "Cashew Nut"
+ }
+ ]
+ }
+ ],
+ "oralDiet": {
+ "type": [
+ {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "226211001",
+ "display": "Pureed diet"
+ },
+ {
+ "system": "http://goodhealthhospital.org/diet-type-codes",
+ "code": "1010",
+ "display": "Pureed diet"
+ }
+ ],
+ "text": "Pureed diet"
+ }
+ ],
+ "schedule": [
+ {
+ "repeat": {
+ "boundsPeriod": {
+ "start": "2015-02-10"
+ },
+ "frequency": 3,
+ "period": 1,
+ "periodUnit": "d"
+ }
+ }
+ ],
+ "texture": [
+ {
+ "modifier": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "228055009",
+ "display": "Liquidized food"
+ }
+ ],
+ "text": "Pureed"
+ }
+ }
+ ],
+ "fluidConsistencyType": [
+ {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "439021000124105",
+ "display": "Dietary liquid consistency - nectar thick liquid"
+ }
+ ],
+ "text": "Nectar thick liquids"
+ }
+ ]
+ }
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.xml b/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.xml
new file mode 100644
index 000000000..3913d0c16
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/NutritionOrder.xml
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+ Generated Narrative with Details
+
+
+ id
+ : pureeddiet-simple
+
+
+ identifier
+ : 123
+
+
+ status
+ : active
+
+
+ patient
+ :
+ Peter Chalmers
+
+
+ dateTime
+ : 17/09/2014
+
+
+ orderer
+ :
+ Dr Adam Careful
+
+
+
+ oralDiet
+
+
+ type
+ : Pureed diet
+ (Details : {SNOMED CT code '226211001' = 'Pureed diet', given as 'Pureed diet'}; {http://goodhealthh
+ ospital.org/diet-type-codes code '1010' = '1010', given as 'Pureed diet'})
+
+
+ schedule
+ : Starting 10/02/2015, Do 3 per 1 days
+
+ Textures
+
+
+ -
+
+ Modifier
+
+
+
+ *
+
+ Pureed
+ (Details : {SNOMED CT code '228055009' = 'Liquidized food', given as 'Liquidized food'})
+
+
+
+
+ fluidConsistencyType
+ : Nectar thick liquids
+ (Details : {SNOMED CT code '439021000124105' = 'Dietary liquid consistency - nectar thick
+ liquid (regime/therapy)', given as 'Dietary liquid consistency - nectar thick liquid'})
+
+
+
Supplements
+
+
+ -
+
+ Type
+
+
+ ProductName
+
+
+ Instruction
+
+
+
+ *
+
+ Adult high energy pudding
+ (Details : {SNOMED CT code '442971000124100' = 'Adult high energy formula (product)',
+ given as 'Adult high energy formula'}; {http://goodhealthhospital.org/supplement-type-codes
+ code '1040' = '1040', given as 'Adult high energy pudding'})
+
+ Ensure Pudding 4 oz container
+ Ensure Pudding at breakfast, lunch, supper
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.json b/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.json
new file mode 100644
index 000000000..547b86232
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.json
@@ -0,0 +1,166 @@
+{
+ "resourceType": "Questionnaire",
+ "id": "Questionnaire",
+ "text": {
+ "status": "generated",
+ "div": "\n
\n 1.Comorbidity?\n 1.1 Cardial Comorbidity\n 1.1.1 Angina?\n 1.1.2 MI?\n 1.2 Vascular Comorbidity?\n ...\n Histopathology\n Abdominal\n pT category?\n ...\n \n
"
+ },
+ "url": "http://hl7.org/fhir/Questionnaire/3141",
+ "title": "Cancer Quality Forum Questionnaire 2012",
+ "status": "draft",
+ "date": "2012-01",
+ "subjectType": [
+ "Patient"
+ ],
+ "item": [
+ {
+ "linkId": "1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/sections",
+ "code": "COMORBIDITY"
+ }
+ ],
+ "type": "group",
+ "item": [
+ {
+ "linkId": "1.1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/questions",
+ "code": "COMORB"
+ }
+ ],
+ "prefix": "1",
+ "type": "choice",
+ "options": {
+ "reference": "http://hl7.org/fhir/ValueSet/yesnodontknow"
+ },
+ "item": [
+ {
+ "linkId": "1.1.1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/sections",
+ "code": "CARDIAL"
+ }
+ ],
+ "type": "group",
+ "enableWhen": [
+ {
+ "question": "1.1",
+ "answerCoding": {
+ "system": "http://hl7.org/fhir/v2/0136",
+ "code": "Y"
+ }
+ }
+ ],
+ "item": [
+ {
+ "linkId": "1.1.1.1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/questions",
+ "code": "COMORBCAR"
+ }
+ ],
+ "prefix": "1.1",
+ "type": "choice",
+ "options": {
+ "reference": "http://hl7.org/fhir/ValueSet/yesnodontknow"
+ },
+ "item": [
+ {
+ "linkId": "1.1.1.1.1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/questions",
+ "code": "COMCAR00",
+ "display": "Angina Pectoris"
+ },
+ {
+ "system": "http://snomed.info/sct",
+ "code": "194828000",
+ "display": "Angina (disorder)"
+ }
+ ],
+ "prefix": "1.1.1",
+ "type": "choice",
+ "options": {
+ "reference": "http://hl7.org/fhir/ValueSet/yesnodontknow"
+ }
+ },
+ {
+ "linkId": "1.1.1.1.2",
+ "code": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "22298006",
+ "display": "Myocardial infarction (disorder)"
+ }
+ ],
+ "prefix": "1.1.2",
+ "type": "choice",
+ "options": {
+ "reference": "http://hl7.org/fhir/ValueSet/yesnodontknow"
+ }
+ }
+ ]
+ },
+ {
+ "linkId": "1.1.1.2",
+ "code": [
+ {
+ "system": "http://example.org/system/code/questions",
+ "code": "COMORBVAS"
+ }
+ ],
+ "prefix": "1.2",
+ "type": "choice",
+ "options": {
+ "reference": "http://hl7.org/fhir/ValueSet/yesnodontknow"
+ }
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "linkId": "2",
+ "code": [
+ {
+ "system": "http://example.org/system/code/sections",
+ "code": "HISTOPATHOLOGY"
+ }
+ ],
+ "type": "group",
+ "item": [
+ {
+ "linkId": "2.1",
+ "code": [
+ {
+ "system": "http://example.org/system/code/sections",
+ "code": "ABDOMINAL"
+ }
+ ],
+ "type": "group",
+ "item": [
+ {
+ "linkId": "2.1.2",
+ "code": [
+ {
+ "system": "http://example.org/system/code/questions",
+ "code": "STADPT",
+ "display": "pT category"
+ }
+ ],
+ "type": "choice"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.xml b/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.xml
new file mode 100644
index 000000000..5da84c398
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/3.0.2 STU3/Questionnaire.xml
@@ -0,0 +1,133 @@
+
+
+
+
+
+
+ Birth details - To be completed by health professional
+ Name of child: ____________________________________
+ Sex: __
+
+ Neonatal Information
+ Birth Weight (kg): ___________
+ Birth Length (cm): ___________
+ Vitamin K given : __
+ 1st dose: ___________
+ 2nd dose: ___________
+ Hep B given : __
+ Date given : ___________
+ Abnormalities noted at birth:
+ _______________________________________________
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+
+
+ -
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.json b/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.json
new file mode 100644
index 000000000..96f45436d
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.json
@@ -0,0 +1,166 @@
+{
+ "resourceType": "CodeSystem",
+ "id": "CodeSystem",
+ "text": {
+ "status": "generated",
+ "div": "\n
NHIN PurposeOfUse \n
\n
This value set is suitable for use with the provenance resource. It is derived from, but not compatible with, the HL7 v3 Purpose of use Code system.
\n\n
\n
This code system http://healthit.gov/nhin/purposeofuse defines the following codes:
\n
\n \n \n Code \n \n \n Display \n \n \n Definition \n \n \n \n TREATMENT\n \n \n Treatment \n Treatment \n \n \n PAYMENT\n \n \n Payment \n Payment \n \n \n OPERATIONS\n \n \n Operations \n Healthcare Operations \n \n \n SYSADMIN\n \n \n Sysadmin \n System Administration \n \n \n FRAUD\n \n \n Fraud \n Fraud detection \n \n \n PSYCHOTHERAPY\n \n \n Psychotherapy \n Use or disclosure of Psychotherapy Notes \n \n \n TRAINING\n \n \n Training \n Use or disclosure by the covered entity for its own training programs \n \n \n LEGAL\n \n \n Legal \n Use or disclosure by the covered entity to defend itself in a legal action \n \n \n MARKETING\n \n \n Marketing \n Marketing \n \n \n DIRECTORY\n \n \n Directory \n Use and disclosure for facility directories \n \n \n FAMILY\n \n \n Family \n Disclose to a family member, other relative, or a close personal friend of the individual \n \n \n PRESENT\n \n \n Present \n Uses and disclosures with the individual present. \n \n \n EMERGENCY\n \n \n Emergency \n Permission cannot practicably be provided because of the individual's incapacity or an emergency. \n \n \n DISASTER\n \n \n Disaster \n Use and disclosures for disaster relief purposes. \n \n \n PUBLICHEALTH\n \n \n Public Health \n Uses and disclosures for public health activities. \n \n \n ABUSE\n \n \n Abuse \n Disclosures about victims of abuse, neglect or domestic violence. \n \n \n OVERSIGHT\n \n \n Oversight \n Uses and disclosures for health oversight activities. \n \n \n JUDICIAL\n \n \n Judicial \n Disclosures for judicial and administrative proceedings. \n \n \n LAW\n \n \n Law Enforcement \n Disclosures for law enforcement purposes. \n \n \n DECEASED\n \n \n Deceased \n Uses and disclosures about decedents. \n \n \n DONATION\n \n \n Donation \n Uses and disclosures for cadaveric organ, eye or tissue donation purposes \n \n \n RESEARCH\n \n \n Research \n Uses and disclosures for research purposes. \n \n \n THREAT\n \n \n Threat \n Uses and disclosures to avert a serious threat to health or safety. \n \n \n GOVERNMENT\n \n \n Government \n Uses and disclosures for specialized government functions. \n \n \n WORKERSCOMP\n \n \n Worker's Comp \n Disclosures for workers' compensation. \n \n \n COVERAGE\n \n \n Coverage \n Disclosures for insurance or disability coverage determination \n \n \n REQUEST\n \n \n Request \n Request of the Individual \n \n
\n
"
+ },
+ "url": "http://healthit.gov/nhin/purposeofuse",
+ "version": "2.0",
+ "name": "NHIN PurposeOfUse",
+ "status": "active",
+ "experimental": false,
+ "date": "2010-01-29",
+ "publisher": "Nationwide Health Information Network (NHIN)",
+ "contact": [
+ {
+ "telecom": [
+ {
+ "system": "url",
+ "value": "https://www.healthit.gov/sites/default/files/nhin-authorization-framework-production-specification-v2.0-1.pdf"
+ }
+ ]
+ }
+ ],
+ "description": "This value set is suitable for use with the provenance resource. It is derived from, but not compatible with, the HL7 v3 Purpose of use Code system.",
+ "caseSensitive": true,
+ "valueSet": "http://hl7.org/fhir/ValueSet/nhin-purposeofuse",
+ "content": "complete",
+ "concept": [
+ {
+ "code": "TREATMENT",
+ "display": "Treatment",
+ "definition": "Treatment"
+ },
+ {
+ "code": "PAYMENT",
+ "display": "Payment",
+ "definition": "Payment"
+ },
+ {
+ "code": "OPERATIONS",
+ "display": "Operations",
+ "definition": "Healthcare Operations"
+ },
+ {
+ "code": "SYSADMIN",
+ "display": "Sysadmin",
+ "definition": "System Administration"
+ },
+ {
+ "code": "FRAUD",
+ "display": "Fraud",
+ "definition": "Fraud detection"
+ },
+ {
+ "code": "PSYCHOTHERAPY",
+ "display": "Psychotherapy",
+ "definition": "Use or disclosure of Psychotherapy Notes"
+ },
+ {
+ "code": "TRAINING",
+ "display": "Training",
+ "definition": "Use or disclosure by the covered entity for its own training programs"
+ },
+ {
+ "code": "LEGAL",
+ "display": "Legal",
+ "definition": "Use or disclosure by the covered entity to defend itself in a legal action"
+ },
+ {
+ "code": "MARKETING",
+ "display": "Marketing",
+ "definition": "Marketing"
+ },
+ {
+ "code": "DIRECTORY",
+ "display": "Directory",
+ "definition": "Use and disclosure for facility directories"
+ },
+ {
+ "code": "FAMILY",
+ "display": "Family",
+ "definition": "Disclose to a family member, other relative, or a close personal friend of the individual"
+ },
+ {
+ "code": "PRESENT",
+ "display": "Present",
+ "definition": "Uses and disclosures with the individual present."
+ },
+ {
+ "code": "EMERGENCY",
+ "display": "Emergency",
+ "definition": "Permission cannot practicably be provided because of the individual's incapacity or an emergency."
+ },
+ {
+ "code": "DISASTER",
+ "display": "Disaster",
+ "definition": "Use and disclosures for disaster relief purposes."
+ },
+ {
+ "code": "PUBLICHEALTH",
+ "display": "Public Health",
+ "definition": "Uses and disclosures for public health activities."
+ },
+ {
+ "code": "ABUSE",
+ "display": "Abuse",
+ "definition": "Disclosures about victims of abuse, neglect or domestic violence."
+ },
+ {
+ "code": "OVERSIGHT",
+ "display": "Oversight",
+ "definition": "Uses and disclosures for health oversight activities."
+ },
+ {
+ "code": "JUDICIAL",
+ "display": "Judicial",
+ "definition": "Disclosures for judicial and administrative proceedings."
+ },
+ {
+ "code": "LAW",
+ "display": "Law Enforcement",
+ "definition": "Disclosures for law enforcement purposes."
+ },
+ {
+ "code": "DECEASED",
+ "display": "Deceased",
+ "definition": "Uses and disclosures about decedents."
+ },
+ {
+ "code": "DONATION",
+ "display": "Donation",
+ "definition": "Uses and disclosures for cadaveric organ, eye or tissue donation purposes"
+ },
+ {
+ "code": "RESEARCH",
+ "display": "Research",
+ "definition": "Uses and disclosures for research purposes."
+ },
+ {
+ "code": "THREAT",
+ "display": "Threat",
+ "definition": "Uses and disclosures to avert a serious threat to health or safety."
+ },
+ {
+ "code": "GOVERNMENT",
+ "display": "Government",
+ "definition": "Uses and disclosures for specialized government functions."
+ },
+ {
+ "code": "WORKERSCOMP",
+ "display": "Worker's Comp",
+ "definition": "Disclosures for workers' compensation."
+ },
+ {
+ "code": "COVERAGE",
+ "display": "Coverage",
+ "definition": "Disclosures for insurance or disability coverage determination"
+ },
+ {
+ "code": "REQUEST",
+ "display": "Request",
+ "definition": "Request of the Individual"
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.xml b/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.xml
new file mode 100644
index 000000000..adc543450
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/CodeSystem.xml
@@ -0,0 +1,53 @@
+
+
+
+
+
+
+
+
Code system summary example for ACME body sites
+
+
This is an example code system summary for the ACME codes for body site.
+
+
+
This code system http://hl7.org/fhir/CodeSystem/summary defines many codes, but they are
+ not represented here
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.json b/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.json
new file mode 100644
index 000000000..ea36425a2
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.json
@@ -0,0 +1,120 @@
+{
+ "resourceType": "Observation",
+ "id": "Observation",
+ "meta": {
+ "profile": [
+ "http://hl7.org/fhir/StructureDefinition/vitalsigns"
+ ]
+ },
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id : blood-pressure-dar
meta :
identifier : urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281
status : final
category : Vital Signs (Details : {http://terminology.hl7.org/CodeSystem/observation-category code 'vital-signs' = 'Vital Signs', given as 'Vital Signs'})
code : Blood pressure systolic & diastolic (Details : {LOINC code '85354-9' = 'Blood pressure panel with all children optional', given as 'Blood pressure panel with all children optional'})
subject : Patient/example
effective : 17/09/2012
performer : Practitioner/example
interpretation : Below low normal (Details : {http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation code 'L' = 'Low', given as 'low'})
bodySite : Right arm (Details : {SNOMED CT code '368209003' = 'Right upper arm', given as 'Right arm'})
component
code : Systolic blood pressure (Details : {LOINC code '8480-6' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {SNOMED CT code '271649006' = 'Systolic blood pressure', given as 'Systolic blood pressure'}; {http://acme.org/devices/clinical-codes code 'bp-s' = 'bp-s', given as 'Systolic Blood pressure'})
value : 107 mmHg (Details: UCUM code mm[Hg] = 'mmHg')
component
code : Diastolic blood pressure (Details : {LOINC code '8462-4' = 'Diastolic blood pressure', given as 'Diastolic blood pressure'})
dataAbsentReason : Not Performed (Details : {http://terminology.hl7.org/CodeSystem/data-absent-reason code 'not-performed' = 'Not Performed', given as 'Not Performed'})
"
+ },
+ "identifier": [
+ {
+ "system": "urn:ietf:rfc:3986",
+ "value": "urn:uuid:187e0c12-8dd2-67e2-99b2-bf273c878281"
+ }
+ ],
+ "status": "final",
+ "category": [
+ {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/observation-category",
+ "code": "vital-signs",
+ "display": "Vital Signs"
+ }
+ ]
+ }
+ ],
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "85354-9",
+ "display": "Blood pressure panel with all children optional"
+ }
+ ],
+ "text": "Blood pressure systolic & diastolic"
+ },
+ "subject": {
+ "reference": "Patient/example"
+ },
+ "effectiveDateTime": "2012-09-17",
+ "performer": [
+ {
+ "reference": "Practitioner/example"
+ }
+ ],
+ "interpretation": [
+ {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
+ "code": "L",
+ "display": "low"
+ }
+ ],
+ "text": "Below low normal"
+ }
+ ],
+ "bodySite": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "368209003",
+ "display": "Right arm"
+ }
+ ]
+ },
+ "component": [
+ {
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "8480-6",
+ "display": "Systolic blood pressure"
+ },
+ {
+ "system": "http://snomed.info/sct",
+ "code": "271649006",
+ "display": "Systolic blood pressure"
+ },
+ {
+ "system": "http://acme.org/devices/clinical-codes",
+ "code": "bp-s",
+ "display": "Systolic Blood pressure"
+ }
+ ]
+ },
+ "valueQuantity": {
+ "value": 107,
+ "unit": "mmHg",
+ "system": "http://unitsofmeasure.org",
+ "code": "mm[Hg]"
+ }
+ },
+ {
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "8462-4",
+ "display": "Diastolic blood pressure"
+ }
+ ]
+ },
+ "dataAbsentReason": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/data-absent-reason",
+ "code": "not-performed",
+ "display": "Not Performed"
+ }
+ ]
+ }
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.xml b/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.xml
new file mode 100644
index 000000000..0622aaf14
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/Observation.xml
@@ -0,0 +1,42 @@
+
+
+
+
+ Generated Narrative with Details
id : 656
identifier : patientId-urn:oid:1.2.4~0000000000000000~152584~20170503155426~820
status : final
code : MDC_FLOW_AWAY_EXP_FORCED_PEAK (Details : {urn:iso:std:iso:11073:10101 code '152584' = '152584', given as 'MDC_FLOW_AWAY_EXP_FORCED
+ _PEAK'})
subject : Patient/PatientId-patientId
effective : 03/05/2017 3:54:26 PM
performer : Patient/PatientId-patientId
value : 820 cL/s (Details: urn:iso:std:iso:11073:10101 code 265201 = '265201')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.json b/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.json
new file mode 100644
index 000000000..c194bcf0d
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.json
@@ -0,0 +1,24 @@
+{
+ "resourceType": "OperationOutcome",
+ "id": "OperationOutcome",
+ "text": {
+ "status": "generated",
+ "div": "\n
The code "W" is not known and not legal Patient.gender.
\n
"
+ },
+ "issue": [
+ {
+ "severity": "error",
+ "code": "code-invalid",
+ "details": {
+ "text": "The code \"W\" is not known and not legal in this context"
+ },
+ "diagnostics": "Acme.Interop.FHIRProcessors.Patient.processGender line 2453",
+ "location": [
+ "/f:Patient/f:gender"
+ ],
+ "expression": [
+ "Patient.gender"
+ ]
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.xml b/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.xml
new file mode 100644
index 000000000..8cce5dad6
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/OperationOutcome.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.json b/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.json
new file mode 100644
index 000000000..de4fc039e
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.json
@@ -0,0 +1,116 @@
+{
+ "resourceType": "Patient",
+ "id": "Patient",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative with Details
id : f001
identifier : 738472983 (USUAL), ?? (USUAL)
active : true
name : Pieter van de Heuvel
telecom : ph: 0648352638(MOBILE), p.heuvel@gmail.com(HOME)
gender : male
birthDate : 17/11/1944
deceased : false
address : Van Egmondkade 23 Amsterdam 1024 RJ NLD (HOME)
maritalStatus : Getrouwd (Details : {http://terminology.hl7.org/CodeSystem/v3-MaritalStatus code 'M' = 'Married', given as 'Married'})
multipleBirth : true
Contacts - Relationship Name Telecom * Emergency Contact (Details : {http://terminology.hl7.org/CodeSystem/v2-0131 code 'C' = 'Emergency Contact) Sarah Abels ph: 0690383372(MOBILE)
Communications - Language Preferred * Nederlands (Details : {urn:ietf:bcp:47 code 'nl' = 'Dutch', given as 'Dutch'}) true
managingOrganization : Burgers University Medical Centre
"
+ },
+ "identifier": [
+ {
+ "use": "usual",
+ "system": "urn:oid:2.16.840.1.113883.2.4.6.3",
+ "value": "738472983"
+ },
+ {
+ "use": "usual",
+ "system": "urn:oid:2.16.840.1.113883.2.4.6.3"
+ }
+ ],
+ "active": true,
+ "name": [
+ {
+ "use": "usual",
+ "family": "van de Heuvel",
+ "given": [
+ "Pieter"
+ ],
+ "suffix": [
+ "MSc"
+ ]
+ }
+ ],
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "0648352638",
+ "use": "mobile"
+ },
+ {
+ "system": "email",
+ "value": "p.heuvel@gmail.com",
+ "use": "home"
+ }
+ ],
+ "gender": "male",
+ "birthDate": "1944-11-17",
+ "deceasedBoolean": false,
+ "address": [
+ {
+ "use": "home",
+ "line": [
+ "Van Egmondkade 23"
+ ],
+ "city": "Amsterdam",
+ "postalCode": "1024 RJ",
+ "country": "NLD"
+ }
+ ],
+ "maritalStatus": {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
+ "code": "M",
+ "display": "Married"
+ }
+ ],
+ "text": "Getrouwd"
+ },
+ "multipleBirthBoolean": true,
+ "contact": [
+ {
+ "relationship": [
+ {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v2-0131",
+ "code": "C"
+ }
+ ]
+ }
+ ],
+ "name": {
+ "use": "usual",
+ "family": "Abels",
+ "given": [
+ "Sarah"
+ ]
+ },
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "0690383372",
+ "use": "mobile"
+ }
+ ]
+ }
+ ],
+ "communication": [
+ {
+ "language": {
+ "coding": [
+ {
+ "system": "urn:ietf:bcp:47",
+ "code": "nl",
+ "display": "Dutch"
+ }
+ ],
+ "text": "Nederlands"
+ },
+ "preferred": true
+ }
+ ],
+ "managingOrganization": {
+ "reference": "Organization/f001",
+ "display": "Burgers University Medical Centre"
+ }
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.xml b/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.xml
new file mode 100644
index 000000000..93f5c6c4a
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.0.1 R4/Patient.xml
@@ -0,0 +1,70 @@
+
+
+
+
+
+
+
+
+
Patient Donald DUCK @ Acme Healthcare, Inc. MR = 654321
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.json b/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.json
new file mode 100644
index 000000000..31cb970ec
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.json
@@ -0,0 +1,243 @@
+{
+ "resourceType": "Bundle",
+ "id": "Bundle",
+ "type": "collection",
+ "entry": [
+ {
+ "fullUrl": "http://example.org/fhir/Patient/23",
+ "resource": {
+ "resourceType": "Patient",
+ "id": "23",
+ "text": {
+ "status": "generated",
+ "div": "Anonymous Patient (no stated gender), DoB Unknown ( id: 1234567)
"
+ },
+ "identifier": [
+ {
+ "system": "http://example.org/ids",
+ "value": "1234567"
+ }
+ ]
+ }
+ },
+ {
+ "fullUrl": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d",
+ "resource": {
+ "resourceType": "Patient",
+ "text": {
+ "status": "generated",
+ "div": "Anonymous Patient (no stated gender), DoB Unknown
"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/123",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "123",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative
status : final
code : Glucose [Moles/volume] in Blood (LOINC #15074-8)
subject : Patient/23
"
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/23"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/124",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "124",
+ "text": {
+ "status": "generated",
+ "div": ""
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "http://example.org/fhir/Patient/23"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/12",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "12",
+ "text": {
+ "status": "generated",
+ "div": ""
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "urn:uuid:04121321-4af5-424c-a0e1-ed3aab1c349d"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/14",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "14",
+ "text": {
+ "status": "generated",
+ "div": ""
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "http://example.org/fhir-2/Patient/1"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir-2/Observation/14",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "14",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative
status : final
code : Glucose [Moles/volume] in Blood (LOINC #15074-8)
subject : Patient/23
"
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/23"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Patient/45",
+ "resource": {
+ "resourceType": "Patient",
+ "id": "45",
+ "meta": {
+ "versionId": "1"
+ },
+ "text": {
+ "status": "generated",
+ "div": "Name 1 (no stated gender), DoB Unknown
"
+ },
+ "name": [
+ {
+ "text": "Name 1"
+ }
+ ]
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Patient/45",
+ "resource": {
+ "resourceType": "Patient",
+ "id": "45",
+ "meta": {
+ "versionId": "2"
+ },
+ "text": {
+ "status": "generated",
+ "div": "Name 2 (no stated gender), DoB Unknown
"
+ },
+ "name": [
+ {
+ "text": "Name 2"
+ }
+ ]
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/47",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "47",
+ "text": {
+ "status": "generated",
+ "div": ""
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/45/_history/2"
+ }
+ }
+ },
+ {
+ "fullUrl": "http://example.org/fhir/Observation/48",
+ "resource": {
+ "resourceType": "Observation",
+ "id": "48",
+ "text": {
+ "status": "generated",
+ "div": "Generated Narrative
status : final
code : Glucose [Moles/volume] in Blood (LOINC #15074-8)
subject :
"
+ },
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "15074-8",
+ "display": "Glucose [Moles/volume] in Blood"
+ }
+ ]
+ },
+ "subject": {
+ "identifier": {
+ "system": "http://example.org/ids",
+ "value": "1234567"
+ }
+ }
+ }
+ }
+ ]
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.xml b/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.xml
new file mode 100644
index 000000000..981f71a27
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Bundle.xml
@@ -0,0 +1,152 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Some narrative
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.json b/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.json
new file mode 100644
index 000000000..b5466f5d2
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.json
@@ -0,0 +1,71 @@
+{
+ "resourceType": "Observation",
+ "id": "Observation",
+ "text": {
+ "status": "extensions",
+ "div": "Generated Narrative
Resource "example-genetics-1"
Gene : EGFR (HUGO Gene Nomenclature #3236)
DNARegionName : Exon 21
GenomicSourceClass : somatic (LOINC #LA6684-0)
status : final
code : The material on this page will be removed in a future release. This content is deprecated and SHOULD NOT be used. Implementers are instead directed to the ([Genomics Reporting Implementation Guide](http://hl7.org/fhir/uv/genomics-reporting/index.html)) for guidance. Genetic analysis master panel-- This is the parent OBR for the panel holding all of the associated observations that can be reported with a molecular genetics analysis result. (LOINC #55233-1)
subject : Patient/example: Molecular Lab Patient ID: HOSP-23456 "Peter CHALMERS"
effective : 2013-04-03T15:30:10+01:00
performer : Practitioner/example: Molecular Diagnostics Laboratory "Adam CAREFUL"
value : Positive (SNOMED CT #10828004)
device : Device/example
"
+ },
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGene",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://www.genenames.org",
+ "code": "3236",
+ "display": "EGFR"
+ }
+ ]
+ }
+ },
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/observation-geneticsDNARegionName",
+ "valueString": "Exon 21"
+ },
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/observation-geneticsGenomicSourceClass",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "LA6684-0",
+ "display": "somatic"
+ }
+ ]
+ }
+ }
+ ],
+ "status": "final",
+ "code": {
+ "coding": [
+ {
+ "system": "http://loinc.org",
+ "code": "55233-1",
+ "display": "The material on this page will be removed in a future release. This content is deprecated and SHOULD NOT be used. Implementers are instead directed to the ([Genomics Reporting Implementation Guide](http://hl7.org/fhir/uv/genomics-reporting/index.html)) for guidance. Genetic analysis master panel-- This is the parent OBR for the panel holding all of the associated observations that can be reported with a molecular genetics analysis result."
+ }
+ ]
+ },
+ "subject": {
+ "reference": "Patient/example",
+ "display": "Molecular Lab Patient ID: HOSP-23456"
+ },
+ "effectiveDateTime": "2013-04-03T15:30:10+01:00",
+ "performer": [
+ {
+ "reference": "Practitioner/example",
+ "display": "Molecular Diagnostics Laboratory"
+ }
+ ],
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "10828004",
+ "display": "Positive"
+ }
+ ]
+ },
+ "device": {
+ "reference": "Device/example"
+ }
+}
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.xml b/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.xml
new file mode 100644
index 000000000..f2d91cb6b
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Observation.xml
@@ -0,0 +1,57 @@
+
+
+
+ Generated Narrative
identifier : id: 6323 (OFFICIAL)
status : final
code : Glucose [Moles/volume] in Blood (LOINC #15074-8)
subject : Patient/f001: P. van de Heuvel "Pieter VAN DE HEUVEL"
effective : 2013-04-02T09:30:10+01:00 --> (ongoing)
issued : 04/04/2013 1:30:10 AM
performer : Practitioner/f005: A. Langeveld "Langeveld ANNE"
value : 6.3 mmol/l (Details: UCUM code mmol/L = 'mmol/L')
interpretation : High (ObservationInterpretation #H)
ReferenceRanges - Low High * 3.1 mmol/l (Details: UCUM code mmol/L = 'mmol/L') 6.2 mmol/l (Details: UCUM code mmol/L = 'mmol/L')
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.json b/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.json
new file mode 100644
index 000000000..8d3da9b6c
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.json
@@ -0,0 +1,112 @@
+{
+ "resourceType": "Patient",
+ "id": "Patient",
+ "text": {
+ "status": "generated",
+ "div": "\n \n
\n \n \n \n \n \n Id \n \n Kenzi (Dog: Golden Retriever) \n \n \n \n \n \n Owner \n \n Peter Chalmers, 534 Erewhon, Pleasantville, Vic, 3999 \n \n \n \n \n \n Contacts \n \n Work: (03) 5555 6473 \n \n \n \n \n \n Id \n \n Dog Tag: 1234123 (Maroondah City Council) \n \n \n \n \n \n
\n \n
"
+ },
+ "extension": [
+ {
+ "url": "http://hl7.org/fhir/StructureDefinition/patient-animal",
+ "extension": [
+ {
+ "url": "species",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://hl7.org/fhir/animal-species",
+ "code": "canislf",
+ "display": "Dog"
+ }
+ ]
+ }
+ },
+ {
+ "url": "breed",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://snomed.info/sct",
+ "code": "58108001",
+ "display": "Golden retriever"
+ },
+ {
+ "system": "http://example.org/fhir/CodeSystem/animal-breed",
+ "code": "gret",
+ "display": "Golden Retriever"
+ }
+ ]
+ }
+ },
+ {
+ "url": "genderStatus",
+ "valueCodeableConcept": {
+ "coding": [
+ {
+ "system": "http://hl7.org/fhir/animal-genderstatus",
+ "code": "neutered"
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "identifier": [
+ {
+ "type": {
+ "text": "Dog Tag"
+ },
+ "system": "http://www.maroondah.vic.gov.au/AnimalRegFees.aspx",
+ "value": "1234123",
+ "period": {
+ "start": "2010-05-31"
+ },
+ "assigner": {
+ "display": "Maroondah City Council"
+ }
+ }
+ ],
+ "active": true,
+ "name": [
+ {
+ "use": "usual",
+ "given": [
+ "Kenzi"
+ ]
+ }
+ ],
+ "gender": "female",
+ "birthDate": "2010-03-23",
+ "contact": [
+ {
+ "relationship": [
+ {
+ "coding": [
+ {
+ "system": "http://terminology.hl7.org/CodeSystem/v2-0131",
+ "code": "C"
+ }
+ ]
+ }
+ ],
+ "name": {
+ "family": "Chalmers",
+ "given": [
+ "Peter",
+ "James"
+ ]
+ },
+ "telecom": [
+ {
+ "system": "phone",
+ "value": "(03) 5555 6473",
+ "use": "work"
+ }
+ ]
+ }
+ ],
+ "managingOrganization": {
+ "display": "Pete's Vetinary Services"
+ }
+ }
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.xml b/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.xml
new file mode 100644
index 000000000..5345703fa
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/4.3.0 R4B/Patient.xml
@@ -0,0 +1,159 @@
+
+
+
+
+
+
+
+
+
+
+ Name
+ Peter James
+ Chalmers ("Jim")
+
+
+
+ Address
+ 534 Erewhon, Pleasantville, Vic, 3999
+
+
+ Contacts
+ Home: unknown. Work: (03) 5555 6473
+
+
+ Id
+ MRN: 12345 (Acme Healthcare)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/tests/Integration.Test/data/fhir/copyright b/tests/Integration.Test/data/fhir/copyright
new file mode 100644
index 000000000..953a3534b
--- /dev/null
+++ b/tests/Integration.Test/data/fhir/copyright
@@ -0,0 +1,3 @@
+http://hl7.org/fhir/
+
+All test/example files sourced from http://hl7.org/fhir/ and are subject to HL7's copyright if any.
\ No newline at end of file
diff --git a/tests/Integration.Test/run.sh b/tests/Integration.Test/run.sh
index a968c1a67..b6c129b43 100755
--- a/tests/Integration.Test/run.sh
+++ b/tests/Integration.Test/run.sh
@@ -56,22 +56,36 @@ function env_setup() {
[ -d $BIN_DIR ] && info "Removing $BIN_DIR..." && sudo rm -r $BIN_DIR
- set +u
- if [ "$1" = "--dev" ]; then
- info "Using .env.dev..."
- LOADDEV="--env-file .env.dev"
- info "Using study.json.dev..."
- STUDYJSON="study.json.dev"
- elif [ "$1" = "--feature" ]; then
- if [ -z "$2" ]; then
- fatal "--feature used without specifying a feature"
- fi
- FEATURE="--filter $2"
- info "Filtering by feature=$FEATURE"
- fi
-
-
- set -u
+ SHORT=f:,d
+ LONG=feature:,dev
+ OPTS=$(getopt -a -n weather --options $SHORT --longoptions $LONG -- "$@")
+
+ eval set -- "$OPTS"
+
+ while :
+ do
+ case "$1" in
+ -f | --feature )
+ FEATURE="--filter $2"
+ info "Filtering by feature=$FEATURE"
+ shift 2
+ ;;
+ -d | --dev )
+ info "Using .env.dev..."
+ LOADDEV="--env-file .env.dev"
+ info "Using study.json.dev..."
+ STUDYJSON="study.json.dev"
+ shift;
+ ;;
+ --)
+ shift;
+ break
+ ;;
+ *)
+ echo "Unexpected option: $1"
+ ;;
+ esac
+ done
if [[ $(docker-compose ps -q | wc -l) -ne 0 ]]; then
info "Stopping existing services..."