> For the complete documentation index, see [llms.txt](https://guides.ohie.org/arch-spec/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guides.ohie.org/arch-spec/dev-1/introduction/openhie-finance-and-insurance-services-workflows/hfw-002-query-beneficiary.md).

# HFW-002: Query Beneficiary

The PoS system is searching for beneficiary master data in the FIS based on a specific query (e.g. by name, ID, age etc …). The FIS returns all master data from the CR and adds FIS specific master data .

Example use case: An insurance agent is looking for information about a beneficiary to respond to a service desk call.

| Workflow Maturity           | <p></p><p><img src="https://lh6.googleusercontent.com/Kxkqfa92YGW3mIOmWio0Twi4YLMA92z6mL1MuFzkx4AWS5CX5zbzWid5z4p2W-e6O66llKpaU0r6lzwyXfhbIiWmkVEuPDy6stX5x5L8uC2DkEXs6qUFX-7xxXTlb9hbkg" alt=""><br>Newly Defined </p><ul><li>Workflow is defined and ARB approved</li><li>Initial implementations are underway</li></ul>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Standards                   | HL7 FHIR Financial Module: <http://hl7.org/fhir/financial-module.html>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| Assumptions & Prerequisites | None                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| Actors                      | <ul><li><a href="https://guides.ohie.org/arch-spec/openhie-component-specifications-1/point-of-care-systems">PoS</a> - The point of service system that captures a patient clinical encounter, it is responsible for sending this encounter on to the HIE. </li><li><a href="https://guides.ohie.org/arch-spec/openhie-component-specifications-1/openhie-interoperability-layer-iol">IOL</a> - Mediates the transactions between the PoS system and the infrastructure services to facilitate easier interoperability. </li><li><a href="https://guides.ohie.org/arch-spec/openhie-component-specifications-1/client-registry">CR</a> - The source of truth for patient demographic and identifier detail. It is able to be queried using an identifier to find the enterprise identifier for a particular person. </li><li><a href="https://guides.ohie.org/arch-spec/openhie-component-specifications-1/openhie-finance-and-insurance-service">FIS</a> - Financing and Insurance System that manages data on beneficiaries and their coverage.</li></ul> |
| Validations                 | The IOL should validate the FHIR resources being submitted.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |

### Interaction Description

![](https://lh4.googleusercontent.com/8UtCFR0lYK-95WiyXkVKIqimDPONMb_SWcPXQ5Sly6E7CVc2qaMwBlh8VPXwLr8MZsRnAJkkIkCgjZkOS37AvR61pI2Puk70pGX808kW4ulKbdOgxwa7nPAemZvdHljdbgUb1-m9)

#### Source Code

&#x20;(link to permanent text in <https://www.websequencediagrams.com/>)

```
title HFW-002: Query Beneficiary

participant PoS
participant IOL
participant FIS
participant CR

opt
  note over PoS, CR
	Assumes that querying of CR is done here
    
	PoS->HIE: [1] Fetch patient (CRWF-3,4)
  end Note
end opt
PoS->IOL: [2] Submit Patient/Beneficiary Query (Demographics / ID)
IOL->FIS: [3] Forward Query details

FIS->FIS: [4] Process query

FIS->IOL: [5] Return Beneficiary Details response

IOL->PoS: [6] Forward Beneficiary Details response
```

### Technical Details

<table><thead><tr><th width="150">Ref</th><th>Interaction</th><th>Endpoint</th><th>Data</th><th>Transaction Spec</th></tr></thead><tbody><tr><td>1</td><td>Fetch / Register patient</td><td>CR</td><td></td><td>(CRWF-1,3,4)</td></tr><tr><td>2</td><td>Submit Patient/Beneficiary Query</td><td>IOL</td><td></td><td></td></tr><tr><td>3</td><td>Forward Query details</td><td>FIS</td><td>FHIR Patient</td><td><a href="http://hl7.org/fhir/patient.html">http://hl7.org/fhir/patient.html</a></td></tr><tr><td>4</td><td>Process query</td><td>internal</td><td></td><td></td></tr><tr><td>5</td><td>Return Beneficiary Details response</td><td>IOL</td><td>FHIR Patient</td><td><a href="http://hl7.org/fhir/patient.html">http://hl7.org/fhir/patient.html</a></td></tr><tr><td>6</td><td>Forward Beneficiary Details response</td><td>POS</td><td></td><td></td></tr></tbody></table>
