{
  "resourceType": "Bundle",
  "id": "patient-visit-transaction",
  "meta": {
    "lastUpdated": "2025-07-28T10:30:00Z"
  },
  "type": "transaction",
  "entry": [
    {
      "fullUrl": "urn:uuid:patient-001",
      "resource": {
        "resourceType": "Patient",
        "id": "patient-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Patient"]
        },
        "identifier": [
          {
            "use": "usual",
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "MR",
                  "display": "Medical record number"
                }
              ]
            },
            "system": "http://gp-surgery.example.com/patient-ids",
            "value": "MRN123456"
          }
        ],
        "active": true,
        "name": [
          {
            "use": "official",
            "family": "Johnson",
            "given": ["Sarah", "Marie"]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "+353-1-555-0123",
            "use": "home"
          },
          {
            "system": "email",
            "value": "sarah.johnson@email.com",
            "use": "home"
          }
        ],
        "gender": "female",
        "birthDate": "1974-03-15",
        "address": [
          {
            "use": "home",
            "line": ["123 Main Street"],
            "city": "Dublin",
            "state": "Leinster",
            "postalCode": "D01 A123",
            "country": "IE"
          }
        ],
        "maritalStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v3-MaritalStatus",
              "code": "M",
              "display": "Married"
            }
          ]
        },
        "contact": [
          {
            "relationship": [
              {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/v2-0131",
                    "code": "C",
                    "display": "Emergency Contact"
                  }
                ]
              }
            ],
            "name": {
              "family": "Johnson",
              "given": ["Michael"]
            },
            "telecom": [
              {
                "system": "phone",
                "value": "+353-1-555-0124",
                "use": "mobile"
              }
            ]
          }
        ],
        "generalPractitioner": [
          {
            "reference": "urn:uuid:practitioner-001"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Patient"
      }
    },
    {
      "fullUrl": "urn:uuid:practitioner-001",
      "resource": {
        "resourceType": "Practitioner",
        "id": "practitioner-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Practitioner"]
        },
        "identifier": [
          {
            "use": "official",
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "PRN",
                  "display": "Provider number"
                }
              ]
            },
            "system": "http://medical-council.ie/practitioner-ids",
            "value": "MC123456"
          }
        ],
        "active": true,
        "name": [
          {
            "use": "official",
            "family": "O'Brien",
            "given": ["Patrick", "James"],
            "prefix": ["Dr."]
          }
        ],
        "telecom": [
          {
            "system": "phone",
            "value": "+353-1-555-0200",
            "use": "work"
          },
          {
            "system": "email",
            "value": "p.obrien@gpsurgery.example.com",
            "use": "work"
          }
        ],
        "address": [
          {
            "use": "work",
            "line": ["456 Healthcare Avenue"],
            "city": "Dublin",
            "state": "Leinster",
            "postalCode": "D02 B456",
            "country": "IE"
          }
        ],
        "gender": "male",
        "birthDate": "1970-08-22",
        "qualification": [
          {
            "identifier": [
              {
                "system": "http://medical-council.ie/qualifications",
                "value": "MB BCh BAO"
              }
            ],
            "code": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0360",
                  "code": "MD",
                  "display": "Doctor of Medicine"
                }
              ]
            },
            "period": {
              "start": "1995-06-01"
            },
            "issuer": {
              "display": "Trinity College Dublin"
            }
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Practitioner"
      }
    },
    {
      "fullUrl": "urn:uuid:organization-001",
      "resource": {
        "resourceType": "Organization",
        "id": "organization-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Organization"]
        },
        "identifier": [
          {
            "use": "official",
            "type": {
              "coding": [
                {
                  "system": "http://terminology.hl7.org/CodeSystem/v2-0203",
                  "code": "PRN",
                  "display": "Provider number"
                }
              ]
            },
            "system": "http://hse.ie/organization-ids",
            "value": "HSE-GP-001"
          }
        ],
        "active": true,
        "type": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/organization-type",
                "code": "prov",
                "display": "Healthcare Provider"
              }
            ]
          }
        ],
        "name": "Dublin Family Practice",
        "telecom": [
          {
            "system": "phone",
            "value": "+353-1-555-0200",
            "use": "work"
          },
          {
            "system": "email",
            "value": "info@dublinpractice.example.com",
            "use": "work"
          }
        ],
        "address": [
          {
            "use": "work",
            "line": ["456 Healthcare Avenue"],
            "city": "Dublin",
            "state": "Leinster",
            "postalCode": "D02 B456",
            "country": "IE"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Organization"
      }
    },
    {
      "fullUrl": "urn:uuid:appointment-001",
      "resource": {
        "resourceType": "Appointment",
        "id": "appointment-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Appointment"]
        },
        "status": "fulfilled",
        "serviceCategory": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/service-category",
                "code": "17",
                "display": "General Practice"
              }
            ]
          }
        ],
        "serviceType": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "11429006",
                "display": "Consultation"
              }
            ]
          }
        ],
        "appointmentType": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0276",
              "code": "ROUTINE",
              "display": "Routine appointment"
            }
          ]
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "185347001",
                "display": "Encounter for check up"
              }
            ]
          }
        ],
        "description": "Regular check-up appointment",
        "start": "2025-07-28T10:30:00Z",
        "end": "2025-07-28T11:00:00Z",
        "minutesDuration": 30,
        "participant": [
          {
            "actor": {
              "reference": "urn:uuid:patient-001"
            },
            "required": "required",
            "status": "accepted"
          },
          {
            "actor": {
              "reference": "urn:uuid:practitioner-001"
            },
            "required": "required",
            "status": "accepted"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Appointment"
      }
    },
    {
      "fullUrl": "urn:uuid:encounter-001",
      "resource": {
        "resourceType": "Encounter",
        "id": "encounter-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Encounter"]
        },
        "status": "finished",
        "class": {
          "system": "http://terminology.hl7.org/CodeSystem/v3-ActCode",
          "code": "AMB",
          "display": "ambulatory"
        },
        "type": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "11429006",
                "display": "Consultation"
              }
            ]
          }
        ],
        "subject": {
          "reference": "urn:uuid:patient-001"
        },
        "participant": [
          {
            "type": [
              {
                "coding": [
                  {
                    "system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
                    "code": "PPRF",
                    "display": "primary performer"
                  }
                ]
              }
            ],
            "individual": {
              "reference": "urn:uuid:practitioner-001"
            }
          }
        ],
        "appointment": [
          {
            "reference": "urn:uuid:appointment-001"
          }
        ],
        "period": {
          "start": "2025-07-28T10:30:00Z",
          "end": "2025-07-28T11:00:00Z"
        },
        "reasonCode": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "185347001",
                "display": "Encounter for check up"
              }
            ]
          }
        ],
        "serviceProvider": {
          "reference": "urn:uuid:organization-001"
        }
      },
      "request": {
        "method": "POST",
        "url": "Encounter"
      }
    },
    {
      "fullUrl": "urn:uuid:observation-001",
      "resource": {
        "resourceType": "Observation",
        "id": "observation-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Observation"]
        },
        "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"
            }
          ]
        },
        "subject": {
          "reference": "urn:uuid:patient-001"
        },
        "encounter": {
          "reference": "urn:uuid:encounter-001"
        },
        "effectiveDateTime": "2025-07-28T10:45:00Z",
        "performer": [
          {
            "reference": "urn:uuid:practitioner-001"
          }
        ],
        "component": [
          {
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "8480-6",
                  "display": "Systolic blood pressure"
                }
              ]
            },
            "valueQuantity": {
              "value": 155,
              "unit": "mmHg",
              "system": "http://unitsofmeasure.org",
              "code": "mm[Hg]"
            }
          },
          {
            "code": {
              "coding": [
                {
                  "system": "http://loinc.org",
                  "code": "8462-4",
                  "display": "Diastolic blood pressure"
                }
              ]
            },
            "valueQuantity": {
              "value": 95,
              "unit": "mmHg",
              "system": "http://unitsofmeasure.org",
              "code": "mm[Hg]"
            }
          }
        ],
        "interpretation": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/v3-ObservationInterpretation",
                "code": "H",
                "display": "High"
              }
            ]
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Observation"
      }
    },
    {
      "fullUrl": "urn:uuid:condition-001",
      "resource": {
        "resourceType": "Condition",
        "id": "condition-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Condition"]
        },
        "clinicalStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/condition-clinical",
              "code": "active",
              "display": "Active"
            }
          ]
        },
        "verificationStatus": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/condition-ver-status",
              "code": "confirmed",
              "display": "Confirmed"
            }
          ]
        },
        "category": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/condition-category",
                "code": "encounter-diagnosis",
                "display": "Encounter Diagnosis"
              }
            ]
          }
        ],
        "severity": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "6736007",
              "display": "Moderate"
            }
          ]
        },
        "code": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "38341003",
              "display": "Hypertensive disorder, systemic arterial"
            }
          ]
        },
        "subject": {
          "reference": "urn:uuid:patient-001"
        },
        "encounter": {
          "reference": "urn:uuid:encounter-001"
        },
        "onsetDateTime": "2025-07-28T10:45:00Z",
        "recordedDate": "2025-07-28T10:50:00Z",
        "recorder": {
          "reference": "urn:uuid:practitioner-001"
        },
        "asserter": {
          "reference": "urn:uuid:practitioner-001"
        },
        "evidence": [
          {
            "detail": [
              {
                "reference": "urn:uuid:observation-001"
              }
            ]
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Condition"
      }
    },
    {
      "fullUrl": "urn:uuid:medication-001",
      "resource": {
        "resourceType": "Medication",
        "id": "medication-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Medication"]
        },
        "code": {
          "coding": [
            {
              "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
              "code": "314076",
              "display": "lisinopril 10 MG Oral Tablet"
            }
          ]
        },
        "status": "active",
        "manufacturer": {
          "display": "Generic Pharmaceuticals Ltd"
        },
        "form": {
          "coding": [
            {
              "system": "http://snomed.info/sct",
              "code": "385055001",
              "display": "Tablet"
            }
          ]
        },
        "ingredient": [
          {
            "itemCodeableConcept": {
              "coding": [
                {
                  "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                  "code": "29046",
                  "display": "lisinopril"
                }
              ]
            },
            "strength": {
              "numerator": {
                "value": 10,
                "unit": "mg",
                "system": "http://unitsofmeasure.org",
                "code": "mg"
              },
              "denominator": {
                "value": 1,
                "unit": "tablet",
                "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                "code": "TAB"
              }
            }
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Medication"
      }
    },
    {
      "fullUrl": "urn:uuid:medicationrequest-001",
      "resource": {
        "resourceType": "MedicationRequest",
        "id": "medicationrequest-001",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/MedicationRequest"]
        },
        "status": "active",
        "intent": "order",
        "category": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/medicationrequest-category",
                "code": "outpatient",
                "display": "Outpatient"
              }
            ]
          }
        ],
        "priority": "routine",
        "medicationReference": {
          "reference": "urn:uuid:medication-001"
        },
        "subject": {
          "reference": "urn:uuid:patient-001"
        },
        "encounter": {
          "reference": "urn:uuid:encounter-001"
        },
        "authoredOn": "2025-07-28T10:55:00Z",
        "requester": {
          "reference": "urn:uuid:practitioner-001"
        },
        "reasonReference": [
          {
            "reference": "urn:uuid:condition-001"
          }
        ],
        "dosageInstruction": [
          {
            "sequence": 1,
            "text": "Take one tablet by mouth once daily",
            "timing": {
              "repeat": {
                "frequency": 1,
                "period": 1,
                "periodUnit": "d"
              }
            },
            "route": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "26643006",
                  "display": "Oral route"
                }
              ]
            },
            "method": {
              "coding": [
                {
                  "system": "http://snomed.info/sct",
                  "code": "421521009",
                  "display": "Swallow"
                }
              ]
            },
            "doseAndRate": [
              {
                "type": {
                  "coding": [
                    {
                      "system": "http://terminology.hl7.org/CodeSystem/dose-rate-type",
                      "code": "ordered",
                      "display": "Ordered"
                    }
                  ]
                },
                "doseQuantity": {
                  "value": 1,
                  "unit": "tablet",
                  "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
                  "code": "TAB"
                }
              }
            ]
          }
        ],
        "dispenseRequest": {
          "validityPeriod": {
            "start": "2025-07-28T10:55:00Z",
            "end": "2025-10-28T10:55:00Z"
          },
          "numberOfRepeatsAllowed": 2,
          "quantity": {
            "value": 30,
            "unit": "tablet",
            "system": "http://terminology.hl7.org/CodeSystem/v3-orderableDrugForm",
            "code": "TAB"
          },
          "expectedSupplyDuration": {
            "value": 30,
            "unit": "days",
            "system": "http://unitsofmeasure.org",
            "code": "d"
          }
        }
      },
      "request": {
        "method": "POST",
        "url": "MedicationRequest"
      }
    },
    {
      "fullUrl": "urn:uuid:appointment-002",
      "resource": {
        "resourceType": "Appointment",
        "id": "appointment-002",
        "meta": {
          "profile": ["http://hl7.org/fhir/StructureDefinition/Appointment"]
        },
        "status": "booked",
        "serviceCategory": [
          {
            "coding": [
              {
                "system": "http://terminology.hl7.org/CodeSystem/service-category",
                "code": "17",
                "display": "General Practice"
              }
            ]
          }
        ],
        "serviceType": [
          {
            "coding": [
              {
                "system": "http://snomed.info/sct",
                "code": "390906007",
                "display": "Follow-up encounter"
              }
            ]
          }
        ],
        "appointmentType": {
          "coding": [
            {
              "system": "http://terminology.hl7.org/CodeSystem/v2-0276",
              "code": "FOLLOWUP",
              "display": "Follow up"
            }
          ]
        },
        "reasonReference": [
          {
            "reference": "urn:uuid:condition-001"
          }
        ],
        "description": "Follow-up appointment for blood pressure monitoring",
        "start": "2025-08-18T10:30:00Z",
        "end": "2025-08-18T11:00:00Z",
        "minutesDuration": 30,
        "created": "2025-07-28T10:55:00Z",
        "participant": [
          {
            "actor": {
              "reference": "urn:uuid:patient-001"
            },
            "required": "required",
            "status": "accepted"
          },
          {
            "actor": {
              "reference": "urn:uuid:practitioner-001"
            },
            "required": "required",
            "status": "accepted"
          }
        ],
        "basedOn": [
          {
            "reference": "urn:uuid:encounter-001"
          }
        ]
      },
      "request": {
        "method": "POST",
        "url": "Appointment"
      }
    }
  ]
}