So to my mind the ask here is a little underspecified. If the need is to get all information associated with a patient, than the best way to go about it would be to build support for the Patient/$everything operation as this is a standard way of requesting all the data related to a patient. If you want specific information, then it’s a matter of figuring out what specific data you’re interested in and how that is stored.
Similarly a “Bundle” in FHIR is a concept that can represent a number of different things. So the operation I pointed to above (and the operations to search for patients) all return a “searchset” bundle, which is the correct type of bundle to send for a search result. But bundles can also represent many other things (see Bundle.type). If you’re sending a Bundle to an external resource then you almost certainly don’t just want a searchset, but most likely either a “transaction” or “batch” type Bundle (or possibly a “message”, depending on how things are specified on the the other end). These types of Bundles differ from “searchsets” because they require an Bundle.entry.request for each entry in the bundle that specifies how it is to be handled (is it a POST? A PUT? etc.).
In the analytics engine, we do this to translate between a search bundle and a transaction bundle (at least when pushing to another FHIR store).
/ws/fhir2/R4/Patient?_id=<comma separated uuids here>&_revinclude=Encounter:patient,Observation:patient
would get you a set of patients plus the encounters and observations associated with a patient.
On the other hand, if you just have a bunch of OMRS objects and what to convert them into FHIR objects, then you should be able to get instances of any of the translator classes and use them, e.g.:
List<org.openmrs.Patient> patients = ...
List<Patient> fhirPatients = patients.stream().map(patientTranslator::toFhirResource).collect(Collectors.toList());
Of course, you’ll need to handle things similarly for the other types you have available, but the translation layer of the FHIR2 module is intended to be used in this way.
From there, constructing a bundle can be handled similarly to the code from the analytics engine shared above.