# Linking of Encounter, Visit and Observation fhir resources in OpenMRS DB

**URL:** <https://talk.openmrs.org/t/linking-of-encounter-visit-and-observation-fhir-resources-in-openmrs-db/21220>\
**Category:** Development\
**Tags:** fhir, encounters\
**Created:** [January 8, 2019, 8:56am UTC](https://talk.openmrs.org/t/linking-of-encounter-visit-and-observation-fhir-resources-in-openmrs-db/21220 "2019-01-08T08:56:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![shalineebatri](https://talk.openmrs.org/letter_avatar/shalineebatri/32/5_5575768a8748004e209b776fc1b2916d.png) [@shalineebatri](https://talk.openmrs.org/u/shalineebatri)\
**Post date:** [January 8, 2019, 8:56am UTC](https://talk.openmrs.org/t/linking-of-encounter-visit-and-observation-fhir-resources-in-openmrs-db/21220/1 "2019-01-08T08:56:24Z")

</div>

Hi - I am able to post encounter, obs and visit using fhir apis, but not able to see them linked on UI for a patient. When I create them from UI , they are linked properly and shown in appropriate place. Also I have noticed below. 1- The encounter fhir post call creates a record in visit table but not in encounter table 2- Encounter created from the UI creates a record in the Encounter table not in visit table.

3- If I create a visit record from ui , I can add an Encounter to it. That makes sense. But why same thing is not happening through FHIR api.

I have already gone through the topic at below link but still have these doubts. [[FHIR Encounter, Visit, & Observation resources](https://talk.openmrs.org/t/fhir-encounter-visit-observation-resources/1781)]

Could someone please help me on this. Thanks.

---

<div class="post-metadata">

**Author:** ![dkayiwa](https://talk.openmrs.org/user_avatar/talk.openmrs.org/dkayiwa/32/179_2.png) [@dkayiwa](https://talk.openmrs.org/u/dkayiwa)\
**Post date:** [January 13, 2019, 7:32am UTC](https://talk.openmrs.org/t/linking-of-encounter-visit-and-observation-fhir-resources-in-openmrs-db/21220/2 "2019-01-13T07:32:24Z")

</div>

Can you share an example of the data that you are posting, together with the url that you are posting to?
