Why Semantic Harmonization Matters
Dosing software acts on the meaning assigned to its inputs, not on the words displayed in a clinical record. Two systems may use different labels for the same drug or laboratory observation. Conversely, similar labels can refer to clinically different products or measurements. If software treats a text match as proof of equivalence, it can select the wrong model input even when each source record is internally valid.
Semantic harmonization is the controlled process of representing records from different sources using consistent clinical concepts, attributes, and units. Its purpose is not to make every source record look alike. It is to preserve clinically relevant distinctions while allowing records with genuinely equivalent meanings to be interpreted consistently. This tutorial focuses on medication concepts, laboratory observations, units, and coding systems; it does not cover service-to-service interface design or the timing of clinical events.
Specify What Must Mean the Same
Before selecting mappings, define the target concept at the level required by the dosing task. A medication record may need to identify the active ingredient, strength, dose form, and route-relevant formulation. A laboratory record may need to identify the analyte or component, specimen or system, measured property, scale, method when clinically relevant, and unit. The required attributes depend on the model input: distinctions that do not affect a particular use may still matter in another.
Terminology systems help identify concepts, but they serve different roles. RxNorm provides normalized clinical drug concepts and related drug terminology. SNOMED CT can represent clinical concepts including substances and findings. LOINC identifies laboratory and clinical observations using attributes such as component, property, time, system, scale, and, where applicable, method. UCUM provides standardized unit codes. These systems do not automatically resolve every local coding choice or prove that two records are interchangeable. The mapping specification must state which attributes are required and how exceptions are handled.
A practical assumption for a deterministic mapping is that the source record has enough information to identify its intended concept and that the target concept is defined precisely enough for the dosing application. If either condition fails, software must not silently guess. It should mark the mapping as unresolved or require an explicit, reviewed rule. A mapping can also be conditional: for example, a local code may correspond to one target concept only when a specified specimen or formulation is present.
A Controlled Harmonization Workflow
Specify the clinical attributes dosing software needs, including distinctions that could change the model input or recommendation.
Capture its code, display text, attributes, unit, and source system. Treat display text as evidence for review, not as a unique identifier of meaning.
Use an appropriate terminology where possible. Record whether the mapping is exact, conditional, broader, narrower, or unresolved, and identify any required context.
Convert compatible units by an explicit rule. Retain the source value, unit, code, and mapping information so the normalized value can be traced back.
Test representative records, boundary cases, and known non-equivalences. Confirm that unresolved or incompatible inputs are not converted into apparently valid target records.
This workflow separates two decisions that are often confused: whether two records describe the same clinical concept, and whether their numerical values can be converted to the same unit. A valid unit conversion cannot repair a concept mismatch. Likewise, matching laboratory concepts do not make their numerical values comparable if the units are incompatible or the measurement context required by the application differs.
Worked Example: Distinguishing Medication Concepts
Suppose a dosing application accepts an oral metoprolol tartrate tablet concept. A source system sends the display text “metoprolol 50 mg tablet,” while another sends “metoprolol succinate extended-release 50 mg tablet.” Determine whether both records can map to the target.
First record. The label identifies metoprolol and a 50 mg tablet, but the salt or formulation is not explicit. The target requires metoprolol tartrate. Unless the source code or additional structured attributes establish tartrate and the relevant tablet form, the mapping is ambiguous. The matching ingredient and strength do not justify an exact mapping.
Second record. This record explicitly identifies metoprolol succinate and an extended-release form. Those attributes differ from the target’s tartrate tablet concept. It must not be mapped as the target merely because the ingredient name and strength look similar. The distinction may affect the product and dosing instructions.
Result. The first record can be mapped only if its code or validated source rule resolves the missing formulation information; otherwise it remains unresolved. The second is a non-match for this target. This decision uses the defined target attributes rather than string similarity.
Laboratory Concepts and Unit Conversion
For a laboratory observation, harmonization has two linked parts. First, establish that the observations represent the same measurement concept at the level needed for the dosing model. Second, determine whether their units can be converted without changing the represented quantity. A local label such as “creatinine” may omit details carried by its code or record attributes. The mapper should inspect the observation code and relevant context, rather than assume every record with that label is interchangeable.
For a multiplicative conversion, let \(x_s\) be a numerical value in a source unit and let \(c\) be the conversion factor expressed as target units per source unit. Then the normalized value is \(x_t=x_s c\). The units must cancel correctly. If the conversion is affine rather than multiplicative, such as a temperature-scale conversion, the offset must also be included; a simple factor is not sufficient.
This expression is a dimensional-analysis check: the source unit in \(x_s\) cancels the denominator, leaving the target unit. A correct arithmetic result with the wrong dimensions is not a valid conversion. The original source value and unit should remain available alongside the normalized value, so that review can distinguish what was received from what the application used.
Worked Example: Converting a Creatinine Result
A hypothetical laboratory record contains a serum creatinine value of 1.20 mg/dL. The dosing application expects µmol/L. Assume the record has been confirmed to represent the required creatinine observation, and use the conversion factor 88.4 µmol/L per mg/dL.
Check the concept first. The conversion is appropriate only after confirming that the source observation is the creatinine measurement required by the application. A unit factor cannot make a different analyte or specimen equivalent.
Convert. Substitute the value and factor, retaining the units in the calculation:
The mg/dL units cancel, leaving µmol/L. To three significant figures, the normalized value is 106 µmol/L. The application should retain the original value of 1.20 mg/dL and record that the normalized result was obtained using the specified factor. Reporting 1.20 µmol/L would be incorrect because it applies no conversion; reporting 106 mg/dL would be incorrect because it labels the converted number with the source unit.
Worked Example: Deciding Whether Two Laboratory Codes Are Equivalent
A hypothetical source record uses the local label “drug level” and a local code. Its attributes say that the measurement is tacrolimus in whole blood, reported in ng/mL. The dosing application expects a tacrolimus whole-blood concentration in µg/L. A second source uses a standardized observation code and reports tacrolimus in plasma in ng/mL. Decide which record can be normalized for the application.
First source. The component and specimen match the target as stated. Since 1 ng/mL equals 1 µg/L, the conversion is:
For a hypothetical source value of 7.5 ng/mL, the target-unit value is 7.5 µg/L. The equality of the numerical values follows from cancellation of the factors of 1000, not from assuming that all concentration units have the same scale.
Second source. Its plasma specimen does not match the target’s whole-blood specimen. A numerical unit conversion alone cannot resolve this concept difference. Unless the application has an explicitly validated rule for this specific distinction, the plasma record must not be mapped to the whole-blood target. Identical analyte names and compatible units are insufficient for equivalence.
Mapping Types, Evidence, and Diagnostics
Mappings should communicate their degree of certainty. An exact mapping preserves the attributes required by the target. A conditional mapping is valid only when its stated conditions are met. A broader or narrower relationship indicates that one concept covers more or less than the other; it is not automatically suitable for a dosing input that requires a specific concept. An unresolved mapping signals that the available evidence does not support a safe decision. These categories are more informative than a single “matched” flag.
A mapping record should identify the source system and code, target system and code, relevant attributes, relationship type, unit rule if applicable, and provenance of the decision. It should also capture exclusions and conditions. For example, a mapping could be valid for a particular local code only when the source indicates a specified formulation. Without that condition, the same mapping could silently misclassify records.
Useful diagnostics include reviewing records that fail to map, records mapped through a broad or conditional rule, unexpected source units, and multiple source concepts collapsing to one target. Test both intended matches and deliberate non-matches. A system that maps every input has not necessarily succeeded: it may be hiding ambiguity. Conversely, an increase in unresolved records after mapping changes can be a sign that the rules are exposing distinctions that were previously being lost.
Keep the distinction between a concept mapping and a data-quality check. A mapping says how a source concept corresponds to a target concept under stated conditions. It does not establish that a particular patient record is complete, correct, or appropriate for a recommendation. Those questions require separate checks. Similarly, this tutorial does not specify how a dosing service exchanges messages with another system; consistent meaning is a prerequisite, not a substitute, for that interface work.
Common Pitfalls and Limitations
- Matching strings instead of meanings. “Metoprolol 50 mg” does not identify every formulation detail. Use codes and structured attributes, and leave a record unresolved when required distinctions cannot be established.
- Assuming a shared ingredient means a shared drug concept. Salt, strength, and dose form can distinguish products relevant to dosing. Map only at the level defined by the target use.
- Converting units before checking the observation. A mathematically valid conversion is clinically irrelevant if the analyte or specimen does not match the target concept.
- Treating a code as universal proof. Codes are meaningful within their systems and versions, and local usage may require context. Retain the source and the mapping rationale.
- Discarding source values after normalization. Without the original code, value, and unit, reviewers cannot easily trace how the normalized input was produced.
No terminology or mapping table eliminates the need for clinical review. Source systems may omit attributes, use local codes inconsistently, or change their coding practices. Some measurement methods or formulations may be non-equivalent for a particular model input even when they share a broad category. Harmonization makes these decisions explicit; it cannot create information that was never recorded.
Check Your Understanding
For each question, decide what a safe harmonization rule should do. Short solutions follow.
- A source medication label gives “drug X, 25 mg tablet,” but the target requires a specific immediate-release salt. What additional evidence is needed before an exact mapping?
- A laboratory value is 2.0 mg/L, and the target unit is µg/mL. The analyte and specimen have already been confirmed as equivalent. What is the converted value?
- Two records have the same laboratory analyte and unit, but one is serum and the target requires urine. Is unit conversion enough to map it? Explain.
- Why should a mapping specification distinguish an exact mapping from a conditional one?
- A new mapping rule causes several previously accepted records to become unresolved. Is that necessarily evidence that the rule is defective? Give one reason for your answer.
Solutions. (1) The source code or structured attributes must establish the required salt and immediate-release form; the label and strength alone do not. Without that evidence, leave the record unresolved. (2) Since 1 mg = 1000 µg and 1 L = 1000 mL, the factors cancel: \(2.0\ \text{mg/L}=2.0\ \text{µg/mL}\). (3) No. The specimen differs, and a unit conversion changes scale, not the clinical observation. Map it only if an explicit rule establishes suitability for this target. (4) A conditional mapping is valid only when its stated conditions hold; recording that distinction prevents it from being applied to records lacking the required context. (5) Not necessarily. The new rule may be exposing ambiguity or a missing attribute that an earlier, overly broad rule silently ignored. Review the changed records and the rule’s stated conditions before deciding.