Skip to content

Commit

Permalink
✅ test: Add a test case to ensure that we can join multiple FHIR Reso…
Browse files Browse the repository at this point in the history
…urces and write the result into a CSV file
  • Loading branch information
dogukan10 committed Aug 14, 2024
1 parent 02da2f4 commit 54b2d1a
Show file tree
Hide file tree
Showing 4 changed files with 514 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,356 @@
[
{
"resourceType": "Patient",
"id": "example",
"text": {
"status": "generated",
"div": "<div xmlns=\"http://www.w3.org/1999/xhtml\">Peter James Chalmers</div>"
},
"identifier": [
{
"use": "usual",
"type": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0203",
"code": "MR",
"display": "Medical Record Number"
}
]
},
"system": "http://hospital.smarthealthit.org",
"value": "12345"
}
],
"active": true,
"name": [
{
"use": "official",
"family": "Chalmers",
"given": [
"Peter",
"James"
]
},
{
"use": "usual",
"given": [
"Jim"
]
}
],
"telecom": [
{
"system": "phone",
"value": "(03) 5555 6473",
"use": "work"
}
],
"gender": "male",
"birthDate": "1974-12-25",
"deceasedBoolean": false,
"address": [
{
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"country": "Australia"
}
],
"contact": [
{
"relationship": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v2-0131",
"code": "N",
"display": "Next of Kin"
}
]
}
],
"name": {
"family": "du Marché",
"given": [
"Bénédicte"
]
},
"telecom": [
{
"system": "phone",
"value": "+33 (237) 998327"
}
],
"address": {
"use": "home",
"type": "both",
"line": [
"534 Erewhon St"
],
"city": "PleasantVille",
"district": "Rainbow",
"state": "Vic",
"postalCode": "3999",
"country": "Australia"
},
"gender": "female",
"period": {
"start": "2012-01-01"
}
}
],
"managingOrganization": {
"reference": "Organization/1",
"display": "Example Organization"
}
},
{
"resourceType": "Encounter",
"id": "example-encounter",
"status": "completed",
"class": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "AMB",
"display": "ambulatory"
}
]
}
],
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"plannedStartDate": "2024-07-22T08:00:00Z",
"plannedEndDate": "2024-07-22T09:00:00Z",
"serviceProvider": {
"reference": "Organization/example-org",
"display": "Example Organization"
}
},
{
"resourceType": "Observation",
"id": "example-observation",
"meta": {
"profile": [
"http://onfhir.io/fhir/StructureDefinition/MyObservation"
]
},
"status": "final",
"basedOn": [
{
"reference": "ServiceRequest/1"
}
],
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "laboratory",
"display": "Laboratory"
}
],
"text": "Laboratory"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "2093-3",
"display": "Body temperature"
}
],
"text": "Body temperature"
},
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"encounter": {
"reference": "Encounter/example-encounter",
"display": "Ambulatory Encounter"
},
"effectiveDateTime": "2024-07-22T09:00:00Z",
"valueQuantity": {
"value": 37.5,
"unit": "Celsius",
"system": "http://unitsofmeasure.org",
"code": "Cel"
}
},
{
"resourceType": "Condition",
"id": "example-condition",
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
"code": "active",
"display": "Active"
}
],
"text": "Active"
},
"verificationStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
"code": "confirmed",
"display": "Confirmed"
}
],
"text": "Confirmed"
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "44054006",
"display": "Hypertension"
}
],
"text": "Hypertension"
},
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"encounter": {
"reference": "Encounter/example-encounter",
"display": "Ambulatory Encounter"
},
"onsetDateTime": "2024-07-22"
},
{
"resourceType": "Encounter",
"id": "example-encounter-2",
"status": "completed",
"class": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
"code": "EMER",
"display": "emergency"
}
]
}
],
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"plannedStartDate": "2024-08-01T10:00:00Z",
"plannedEndDate": "2024-08-02T09:00:00Z",
"serviceProvider": {
"reference": "Organization/example-org",
"display": "Example Organization"
}
},
{
"resourceType": "Observation",
"id": "example-observation-2",
"meta": {
"profile": [
"http://onfhir.io/fhir/StructureDefinition/MyObservation"
]
},
"status": "preliminary",
"basedOn": [
{
"reference": "ServiceRequest/2"
}
],
"category": [
{
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/observation-category",
"code": "vital-signs",
"display": "Vital Signs"
}
],
"text": "Vital Signs"
}
],
"code": {
"coding": [
{
"system": "http://loinc.org",
"code": "85354-9",
"display": "Blood pressure panel with all children optional"
}
],
"text": "Blood Pressure"
},
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"encounter": {
"reference": "Encounter/example-encounter-2",
"display": "Emergency Encounter"
},
"effectiveDateTime": "2024-08-01T10:15:00Z",
"valueQuantity": {
"value": 140,
"unit": "mmHg",
"system": "http://unitsofmeasure.org",
"code": "mm[Hg]"
}
},
{
"resourceType": "Condition",
"id": "example-condition-2",
"clinicalStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
"code": "recurrence",
"display": "Recurrence"
}
],
"text": "Recurrence"
},
"verificationStatus": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
"code": "confirmed",
"display": "Confirmed"
}
],
"text": "Confirmed"
},
"code": {
"coding": [
{
"system": "http://snomed.info/sct",
"code": "38341003",
"display": "Hypertensive disorder, systemic arterial"
}
],
"text": "Hypertensive Disorder"
},
"subject": {
"reference": "Patient/example",
"display": "Peter James Chalmers"
},
"encounter": {
"reference": "Encounter/example-encounter-2",
"display": "Emergency Encounter"
},
"onsetDateTime": "2024-08-01"
}
]
Loading

0 comments on commit 54b2d1a

Please sign in to comment.