# Should I include primary care registry (PRIM\_OUT) codes in my cohort definitions?

### ICD-codes from PRIM\_OUT registry may sometimes be usefull, but be cautious when using them

When creating your own [endpoint](/finngen-data-specifics/endpoints.md) (*or cohort*), using for example [Atlas](/working-in-the-sandbox/which-tools-are-available/atlas.md), you may consider whether to add codes, for example [ICD-codes](/finngen-data-specifics/finnish-health-registers-and-medical-coding/international-and-finnish-health-code-sets.md), from the [primary care registry](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md) (PRIM\_OUT) to your endpoint. PRIM\_OUT ICD-codes may sometimes be helpful, and add cases to your endpoint. However, they may be less usefull than you think because they may be manifesting less severe disease than the ICD-codes given in the hospital (codes in the[ inpatient registry](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md)) or they may not be as accurate as those given by the specialist (codes in the [specialist outpatient registry](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/registers-in-the-detailed-longitudinal-data.md)).

### Codes assigned by physician or nurse

ICD-codes are safe in the sense that they are always assigned by a physician, but it is worth keeping in mind that [ICPC2 ](/finngen-data-specifics/finnish-health-registers-and-medical-coding/more-information-on-health-code-sets.md)(diagnosis codes) and [SPAT](/finngen-data-specifics/finnish-health-registers-and-medical-coding/more-information-on-health-code-sets.md) (operation codes) from the PRIM\_OUT registry can be assigned by a nurse. This is why we recommend you to consider whether to use ICPC2/SPAT codes in your endpoints. Physicians can decide whether they prefer to use ICD or ICPC2 codes, and this preference may also change regionally in Finland.

### Some FinnGen endpoints include ICD-codes from PRIM\_OUT registry

Most FinnGen endpoints do not include PRIM\_OUT codes, but after consideration of the endpoint team, PRIM\_OUT ICD-codes have been added to some [FinnGen endpoint definitions](/finngen-data-specifics/endpoints/where-the-finngen-endpoint-description-file-is-located.md) (suffix \_INCLAVO in the endpoint name). Upset Plots are usefull tool for reviewing what registry codes from which registries each FinnGen endpoint consist. You can find Upset Plot for each FinnGen endpoints from the [Risteys](/working-outside-the-sandbox/risteys-as-an-option-for-browsing-endpoints.md) browser (upper right corner of the Risteys page). By looking at the upset plot, you can see whether PRIM\_OUT codes have been used for that specific endpoint and how many cases it has added to the endpoint; and if PRIM\_OUT codes have not been used, you can also see how many cases using of these codes would add to the endpoint.

Take a look also related sections: [Detailed longitudinal data](/finngen-data-specifics/red-library-data-individual-level-data/what-phenotype-files-are-available-in-sandbox-1/detailed-longitudinal-data.md), [Atlas](https://github.com/finngen-user-documentation/Draft_of_FG_Analyst_Handbook/blob/master/faq/about-endpoints/broken-reference/README.md), and [Health code sets](/finngen-data-specifics/finnish-health-registers-and-medical-coding/more-information-on-health-code-sets.md).


---

# Agent Instructions: 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:

```
GET https://docs.finngen.fi/faq/about-endpoints/should-i-include-primary-care-registry-prim_out-codes-in-my-cohort-definitions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
