> For the complete documentation index, see [llms.txt](https://docs.digit.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.digit.org/health/v2.0/design/architecture/low-level-design/services/console-services/boundary-management-boundary-manager.md).

# Boundary Management - Boundary Manager

### Overview

This service is used to generate boundary service codes—either automatically or manually—based on the hierarchy. Users populate the generated Excel sheet with boundary details and process it to obtain the corresponding boundary codes.

### **Dependencies**

* Boundary
* Localisation

### API Specification

```
Base Path: /boundary-management/
```

### Data Model

DB Schema Diagram

{% tabs %}
{% tab title="Generate" %}

```
TABLE eg_bm_generated_template
(
    id character varying(128) NOT NULL,
    filestoreid character varying(128),
    status character varying(128),
    tenantid character varying(128),
    hierarchytype character varying(128),
    locale VARCHAR(50),
    createdby character varying(128),
    createdtime bigint,
    lastmodifiedby character varying(128),
    lastmodifiedtime bigint,
    additionaldetails jsonb,
    referenceid character varying(128),
    CONSTRAINT eg_bm_generated_template_pkey PRIMARY KEY (id)
)
```

{% endtab %}

{% tab title="Process" %}

```
TABLE eg_bm_processed_template
(
    id character varying(128) NOT NULL,
    status character varying(128) NOT NULL,
    tenantid character varying(128) NOT NULL,
    hierarchytype character varying(128),
    filestoreid character varying(128) NOT NULL,
    processedfilestoreid character varying(128),
    action character varying(128) NOT NULL,
    createdby character varying(128) NOT NULL,
    createdtime bigint NOT NULL,
    lastmodifiedby character varying(128),
    lastmodifiedtime bigint,
    additionaldetails jsonb,
    referenceid character varying(128),
    CONSTRAINT eg_bm_processed_template_pkey PRIMARY KEY (id)
)
```

{% endtab %}
{% endtabs %}

### Web Sequence Diagrams

{% tabs %}
{% tab title="Generate" %}

```
/boundary-management/v1/_generate
```

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2F2wHtxXlMrtVtR6z82qyl%2Fgenertaeeee.png?alt=media&amp;token=0382f369-7f8b-4947-8c91-485dd5246c37" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Process ( Auto )" %}

```
boundary-management/v1/_process
```

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2FsJdZHDcTFz9L1pIq8qOd%2Fprocess_auto.png?alt=media&amp;token=2e2ac34f-a7e1-4edd-96ec-91b010c92efb" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Process( Manual )" %}

```
boundary-management/v1/_process
```

<figure><img src="https://3976166735-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmb5VUHEnO0msarLMPz6q%2Fuploads%2FJAHLMc0BIGcoqfRDMipo%2Fprocess%20maual.png?alt=media&amp;token=1aa839ae-fd87-4f88-bfab-e532db81a23d" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.digit.org/health/v2.0/design/architecture/low-level-design/services/console-services/boundary-management-boundary-manager.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
