FHIR Encounter, Visit, & Observation resources

Inserting any notion of “OpenMRS Visit” into the query would be a failure, IMHO. Our goal is not to create an OpenMRS FHIR API for OpenMRS clients; rather, to create an OpenMRS FHIR API for FHIR clients (i.e., someone with an understanding of FHIR should be able to utilize our API without needing to learn how OpenMRS has modeled the world. This Visit/Encounter issue is a perfect example. To the FHIR client, OpenMRS has only Encounters with some support for hierarchy (a single layer).

Correct. In OpenMRS, encounter.visit is optional. To a FHIR client, these visit-less encounters would appear to be a peer of a visit – i.e., they would be among the top-level Encounters.