> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Regulatory Filing

> Activate a regulatory document for an institution, map your tables to its fields, then generate, correct, and approve the filing in the Reporter module of the Lerian Console.

**Regulatory Filing** is the Reporter page where you file regulatory documents. Reporter keeps the contract of each document: the fields that its file needs. You activate a document, map your tables and columns to its fields, and generate a draft. Then you correct the draft if necessary and approve it. The approved draft becomes the filing.

A filing is made for an institution. Register at least one institution on the [Institutions](/en/products/reporter/console/managing-institutions) page before you activate a document.

## Open Regulatory Filing

***

In the left-side menu of the **Reporter** page, click **Regulatory Filing**. The page has two panels:

* **Document catalog**: the documents that this environment can file. Each card shows the title and the version of the document. The card also tells you if the document includes a reference mapping from Lerian. With a reference mapping, you correct it. Without one, you map the fields from the start.
* **Your subscriptions**: the documents that you file. The table shows **Document**, **Adopted version**, **Mapping version**, **Status**, **Readiness**, and **Actions**. **Status** is **Active** or **Inactive**.

When the catalog is empty, no regulatory document is mounted in this environment. An administrator mounts the regulatory catalog on the Reporter service.

## Activate a document

***

<Steps>
  <Step title="Open the dialog">
    On a card of the **Document catalog**, click **Activate**. The **Activate document** dialog opens.
  </Step>

  <Step title="Choose the institution">
    With one institution, the dialog uses it. With several, choose the institution that files the document.
  </Step>

  <Step title="Choose the version">
    Leave **Version** empty to pin the newest published version. To pin a different version, type it.
  </Step>

  <Step title="Activate">
    Click **Activate**. The **Document activated** dialog shows what the starting mapping can read now, and what it cannot read.
  </Step>
</Steps>

Activation pins the version. To change it later, use **Adopt another version**. See [Manage a subscription](#manage-a-subscription).

## Map the fields

***

In the menu (<Icon icon="ellipsis-vertical" />) of a subscription, select **Open mapping**. The mapping page has two sections:

* **What this mapping reads**: the queries of the mapping. Each query reads one table of one of your Data Sources. To add a query, click **Add query**.
* **What the document asks for**: one row for each field that the regulator declares. For each set, choose the query that fills its rows. Then choose where each field is read from.

| Where the field is read from | What you enter |
| - | - |
| **A column of this set query** | The column of the query that fills the set. |
| **A column matched onto the published rows** | The column. This choice appears when the document publishes rows for the set. |
| **The same value every time** | The value. |
| **A value given when the filing is generated** | The parameter of the document that fills the field. |
| **Filled by a person on the draft** | A value, or a note that tells what is still missing. Reporter refuses a field with no value and no note. |

Click **Save mapping**. If Reporter refuses the mapping, the page shows the reason and keeps your changes.

## Check readiness

***

In the **Readiness** column of an active subscription, click **Check now**. Reporter checks the mapping against your databases as they are now. The result opens under the row.

| Result | What it means |
| - | - |
| **Ready** | Each field that the document needs is filled. |
| **N required fields are missing** | Nothing fills these fields yet. The result lists them. |
| **Will not generate** | The mapping reads a Data Source that nobody registered, a table that your database does not have, or a column that the table does not have. Or the mapping asks for something that Reporter cannot execute. |
| **Partly checked** | A table answered, but it did not tell which columns it has. |
| **Not checked** | A database did not answer, or no query ran against your databases. |

To check again, click **Check again**.

## Generate a draft

***

<Steps>
  <Step title="Open the dialog">
    In the menu (<Icon icon="ellipsis-vertical" />) of an active subscription, select **Generate a draft**.
  </Step>

  <Step title="Fill in the parameters">
    The document sets the parameters that the filing needs. Write a competency month as `YYYY-MM` and a date as `YYYY-MM-DD`. Some documents are filed for specific months. The field tells you which months.
  </Step>

  <Step title="Generate">
    Click **Generate**. The **Draft generated** dialog lists the blank fields. A blank field is a field that the mapping could not fill. It is not a generation failure.
  </Step>

  <Step title="Open the filing">
    Click **Open the filing**.
  </Step>
</Steps>

The draft is a Report with the status `Draft`. It also shows on the [Reports](/en/products/reporter/console/managing-reports) page.

## Correct and approve the filing

***

The filing page shows the status, the blank fields, the **Corrections**, and the **Provenance**. **Provenance** shows the document, the document version, the mapping version, the generation time, the parameters, and the file checksum (SHA-256).

While a required field is blank, you cannot approve or download the filing. The page lists each blank field.

### Correct a figure

<Steps>
  <Step title="Open the dialog">
    On the filing page of a `Draft`, click **Correct a figure**.
  </Step>

  <Step title="Find the figure">
    Enter the **Set** and the **Field**. To select a row, click **Add a key** for each key of the row, and enter its **Key** and **Value**. Leave the keys empty for a set with one row.
  </Step>

  <Step title="Enter the correction">
    Enter the **Corrected value**. Under **Why (recorded in the audit trail)**, write why the figure changes. The reason is mandatory.
  </Step>

  <Step title="Apply">
    Click **Apply correction**.
  </Step>
</Steps>

Reporter builds the file again from the same rows, so no other figure changes. **Corrections** shows each change, who made it, and the reason.

### Approve the draft

<Steps>
  <Step title="Open the dialog">
    On the filing page of a `Draft`, click **Approve**. The Console hides **Approve** while a required field is blank.
  </Step>

  <Step title="Confirm">
    Click **Approve as the filing**.
  </Step>
</Steps>

The draft becomes the filing, with the status `Final`. A `Final` filing refuses corrections, and its provenance does not change.

## Manage a subscription

***

The menu (<Icon icon="ellipsis-vertical" />) of an active subscription also has these items:

* **Set institution**: changes the institution for the next filings. Reports already generated keep their institution. This item appears when the tenant has several institutions.
* **Adopt another version**: changes the version that you file. Leave **Version to adopt** empty to take the newest published version. Reporter refuses a version that does not exist. Filings already produced keep their version. After you adopt a version, the dialog shows what the new version does to your mapping.
* **Deactivate**: stops the filing of the document. The subscription stays in the list as **Inactive**. Nothing is deleted, and reports already generated from it stay readable.

To restore an inactive subscription with its mapping and version, click **Reactivate** on its row. When the document has no active subscription, its catalog card also has **Reactivate**. The card also offers a new subscription. It shows **Start from Lerian's mapping** when the document includes a reference mapping, and **Start from an empty mapping** when it does not. The mapping that you edited stays saved on the deactivated subscription.

## Permissions

***

Opening the **Regulatory Filing** page needs `regulatory:get`. Activating or reactivating a document, generating a draft, correcting a figure, and adopting another version need `regulatory:post`. Mapping its fields and setting its institution need `regulatory:put`. Deactivating a subscription needs `regulatory:delete`. Approving a draft needs `regulatory-approval:post`.

## Next steps

***

* Use [Managing Institutions](/en/products/reporter/console/managing-institutions) to register the institutions that file documents.
* Use [Managing Data Sources](/en/products/reporter/console/managing-data-sources) to register the Data Sources that a mapping reads.
* Use [Managing Reports](/en/products/reporter/console/managing-reports) to find a filing among your Reports.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.