# About FHIR Messaging

<mark style="background-color:yellow;">**This is published as part of general awareness/guidance and is not intended for production use, content is still in draft phase, please have a look at Sehhati**</mark> [<mark style="background-color:yellow;">**`roadmap`**</mark>](https://docs.sehacity.com/prod/developer-guide-1/feature-list) <mark style="background-color:yellow;">**to understand at which phase you can start using the API's!!**</mark> &#x20;

Sehhati API platform is built on RESTful API based FHIR messaging standard with version 4.0.1 (R4)

#### **Integration flow**

Sehhati will execute callouts for hospitals to find available slots and send appointment request for booking particular slots

<figure><img src="https://3212675358-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbE6m1AtdGCv1dDulC63B%2Fuploads%2FOJ7Quk3iuIvNCEtrRp5U%2Fappointment%20flow.png?alt=media&#x26;token=c362de6f-80e8-4a3b-8203-46ed22d1435b" alt=""><figcaption></figcaption></figure>

Sehhati will use FHIR messaging standard as a communication protocol for enhanced message delivery: <https://www.hl7.org/fhir/messaging.html>

1. if hospital system is not available Sehhati will execute the below to insure message delivery
   1. Message will be either queued or discarded, find slot message will be discarded and patient will be notified with proper message indicating that target hospital is un reachable.
   2. Confirm slot will be queued with 10 minutes and retried 3 times within the 3 minutes, if no response is received message will be discarded and patient will be notified
2. Hospital can choose to either use pull mechanism or push mechanism , this configuration will be maintained at Sehhati :
   1. if hospital is configured for pull mode , all messages will be queued with proper timeout settings, hospital will execute poll-message request to get different messages that are waiting for processing.
   2. if hospital is configured for push mode , all messages will be tried as push in real time and if external system is not able to process those messages , messages will be retried until message is
