# Quality Observable with Ratio

This template is used when the LOINC term involves a component and is relative to something else as a ratio, such as a reference point or another component.

Note that Ratio concepts are given a parent of 540131010000107 |Ratio observable (observable entity)| to group them together.

This template is documented in Confluence here: [Quality observable with Component and Relative to for LOINC Ratios (observable entity) - v1.0](https://docs.snomed.org/implementation-guides/loinc-implementation-guide/content-development/4.2-template-based-content-creation/quality-observable-with-component-for-loinc-grouper)

The java implementation of this template can be found [here](https://github.com/IHTSDO/reporting-engine/tree/7.9.2/script-engine/src/main/java/org/ihtsdo/termserver/scripting/pipeline/loinc/template/LoincTemplatedConceptWithRatio.java).

## Attributes <a href="#id-4.2.5qualityobservablewithratio-attributes" id="id-4.2.5qualityobservablewithratio-attributes"></a>

* **LOINC Property**: Represents the property of the observation, such as mass concentration or presence.
* **LOINC Scale**: Describes the scale type, like quantitative or qualitative.
* **LOINC Time**: Indicates the time aspect of the observation, e.g., single point in time.
* **LOINC System**: Specifies the direct site of the observation.
* **LOINC Method**: Describes the technique used for the observation.
* **LOINC Component**: Represents the specific component being measured or observed.
* **LOINC Divisor**: Specifies what the observation is relative to.

{% hint style="info" %}
LOINC Properties currently supported: "MRto", "Ratio", "SRto", "NRto", "CRto"
{% endhint %}

## Template <a href="#id-4.2.5qualityobservablewithratio-template" id="id-4.2.5qualityobservablewithratio-template"></a>

### Model <a href="#id-4.2.5qualityobservablewithratio-model" id="id-4.2.5qualityobservablewithratio-model"></a>

{% code overflow="wrap" %}

```
=== 540131010000107 |Ratio observable (observable entity)| : 
{
	[S1] 246093002 |Component (attribute)| -> 1166006 |Titanium (substance)|,
	[S1] 370130000 |Property (attribute)| -> 118545004 |Mass ratio (property) (qualifier value)|,
	[S1] 370132008 |Scale type (attribute)| -> 30766002 |Quantitative (qualifier value)|,
	[S1] 370134009 |Time aspect (attribute)| -> 123029007 |Single point in time (qualifier value)|,
	[S1] 704325000 |Relative to (attribute)| -> 15373003 |Creatinine (substance)|,
	[S1] 704327008 |Direct site (attribute)| -> 122575003 |Urine specimen (specimen)| 
}
```

{% endcode %}

### Terming <a href="#id-4.2.5qualityobservablewithratio-terming" id="id-4.2.5qualityobservablewithratio-terming"></a>

Template slots are filled by taking the preferred term of the relevant value from the model and making the initial character lower case, if allowed by the case significance setting of the preferred term.

{% code overflow="wrap" %}

```
[PROPERTY] of [COMPONENT] + SEPARATOR + [DIVISORS] in [SYSTEM] at [TIME] by [METHOD] using [DEVICE] [CHALLENGE]
```

{% endcode %}

Some slots are optional, and are then tidied up along with any linking words (eg 'using'). The SEPARATOR is determined programatically and might be "to" or a "/" symbol.

The LOINC Long Common Name is specified as the Preferred Term and the LOINC Short Common Name is also included unchanged as an acceptable synonym. Finally a terse form of the LOINC Parts is added, with all part names specified, separated by colons.

In the case of the example below, this results in the following terms:

<table><thead><tr><th>Concept Id</th><th>Description Id</th><th width="98.52862548828125">Acceptability</th><th width="324.416748046875">Term</th><th>Case</th></tr></thead><tbody><tr><td>483251010000104</td><td>2216711010000115</td><td>US: P</td><td>Mass ratio of titanium to creatinine in urine at point in time (observable entity)</td><td>ci</td></tr><tr><td>483251010000104</td><td>2221411010000114</td><td>US: P</td><td>Titanium/Creatinine [Mass Ratio] in Urine</td><td>CS</td></tr><tr><td>483251010000104</td><td>2221431010000117</td><td>US: A</td><td>Titanium/Creatinine (U) [Mass ratio]</td><td>CS</td></tr><tr><td>483251010000104</td><td>2221441010000113</td><td>US: A</td><td>Titanium/Creatinine:MRto:Pt:Urine:Qn</td><td>CS</td></tr><tr><td>483251010000104</td><td>2221391010000114</td><td>US: A</td><td>Mass ratio of titanium/creatinine in urine at point in time</td><td>ci</td></tr><tr><td>483251010000104</td><td>2221401010000111</td><td>US: A</td><td>Mass ratio of titanium to creatinine in urine at point in time</td><td>ci</td></tr></tbody></table>

### Examples <a href="#id-4.2.5qualityobservablewithratio-examples" id="id-4.2.5qualityobservablewithratio-examples"></a>

**LOINC Term** [**104656-4**](https://loinc.org/search/?t=1\&s=104656-4)

#### Loinc Parts <a href="#id-4.2.5qualityobservablewithratio-loincparts" id="id-4.2.5qualityobservablewithratio-loincparts"></a>

<table data-full-width="true"><thead><tr><th width="163.52734375">Part Type</th><th width="166.0859375">LOINC Part Name</th><th width="163.55859375">LOINC Part Num</th><th>Mapped to Attribute Type / Value</th></tr></thead><tbody><tr><td>Component</td><td>Titanium</td><td>LP16839-0</td><td>246093002 |Component (attribute)| -> 1166006 |Titanium (substance)|</td></tr><tr><td>Divisors</td><td>Creatinine</td><td>LP32035-5</td><td>704325000 |Relative to (attribute)| -> 15373003 |Creatinine (substance)|</td></tr><tr><td>Property</td><td>MRto</td><td>LP6834-8</td><td>370130000 |Property (attribute)| -> 118545004 |Mass ratio (property) (qualifier value)|</td></tr><tr><td>Time</td><td>Pt</td><td>LP6960-1</td><td>370134009 |Time aspect (attribute)| -> 123029007 |Single point in time (qualifier value)|</td></tr><tr><td>System</td><td>Urine</td><td>LP7681-2</td><td>704327008 |Direct site (attribute)| -> 122575003 |Urine specimen (specimen)|</td></tr><tr><td>Scale</td><td>Qn</td><td>LP7753-9</td><td>370132008 |Scale type (attribute)| -> 30766002 |Quantitative (qualifier value)|</td></tr></tbody></table>

<a href="https://docs.google.com/forms/d/e/1FAIpQLScTmbZIf0UEQwYDkY27EEWBkaiYkHSbR0_9DmFrMLXoQLyL7Q/viewform?usp=pp_url&#x26;entry.1767247133=LOINC+Implementation+Guide&#x26;entry.670899847=Quality%20Observable%20with%20Ratio" class="button primary">Provide Feedback</a>


---

# 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.snomed.org/implementation-guides/loinc-implementation-guide/content-development/4.2-template-based-content-creation/4.2.5-quality-observable-with-ratio.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.
