> For the complete documentation index, see [llms.txt](https://ifhp-2.gitbook.io/ifhp/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ifhp-2.gitbook.io/ifhp/fhir/implementation-details-and-faqs.md).

# Implementation Details and FAQs

## How are the separate Health Information Types packaged?

It is packaged as one single Bundle. An FHIR Bundle is one common operation performed with resources to gather a collection of resources into a single instance containing context.&#x20;

## What is present in a Bundle?

Each Bundle contains information about the Patient, Practitioner, Composition, Organization, the various instances of the Health Information Types ("Prescription", "Diagnostic Report", "Discharge Summary", "OP Consultation", which may contain resources like "Observation", "Condition", "MedicationRequest", "DocumentReference", "DiagnosticReport", "Procedure" and also other reference entities like "Medication", "Practitioner", "Patient", "Organization", etc.).

## Implementation/Generation of the Bundle

We've built a wrapper class around *SMARTonFHIR* (in python3) and deployed it using a *Flask* Server. This *Flask* server helps in converting the raw data to FHIR compliant Bundles. For example, if we wanted to convert Prescription Record data, we send all raw information stored in our record class to the */FHIRprescriptionrecord* API implemented by us on *Flask*. *Flask* server internally will take this data and use the different classes in our library to construct objects of various resources. The objects derive from *SMARTonFHIR*, which has a "**tojson**" method that is useful in converting the resource to JSON. *Flask* then bundles the various resources into the *Bundle* class and sends the **JSON-ified** version of the Bundle object back to the *Express* server.

##


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ifhp-2.gitbook.io/ifhp/fhir/implementation-details-and-faqs.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
